- Suggest SELinux permissions problem; no assertion failure anymore (BZ

232371).
- Related: rhbz#232371
This commit is contained in:
Jan Kratochvil 2007-03-16 00:49:33 +00:00
commit 8955b7e320
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,17 @@
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=232371
diff -u -rup gdb-6.6-orig/gdb/linux-nat.c gdb-6.6/gdb/linux-nat.c
--- gdb-6.6-orig/gdb/linux-nat.c 2007-03-15 19:55:40.000000000 -0400
+++ gdb-6.6/gdb/linux-nat.c 2007-03-15 20:02:09.000000000 -0400
@@ -1014,6 +1014,10 @@ lin_lwp_attach_lwp (ptid_t ptid, int ver
{
/* Try again with __WCLONE to check cloned processes. */
pid = my_waitpid (GET_LWP (ptid), &status, __WCLONE);
+ if (pid == -1 && errno == ECHILD)
+ error (_("Can't attach %s (%s) - possible SELinux denial,"
+ " check your /var/log/messages for `avc: denied'"),
+ target_pid_to_str (ptid), safe_strerror (errno));
lp->cloned = 1;
}