aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-01-03 10:55:52 -0700
committerGary Benson <gbenson@redhat.com>2014-07-24 15:06:39 +0100
commit8009206ae2dec541b55edc488103c6c1ccb1416a (patch)
treef62cd64d3cf8d4922956fc9effc3f7f250199649 /gdb/linux-nat.c
parent314c6a3559393741f22fdd9836f83d9f364fbd2a (diff)
downloadgdb-8009206ae2dec541b55edc488103c6c1ccb1416a.zip
gdb-8009206ae2dec541b55edc488103c6c1ccb1416a.tar.gz
gdb-8009206ae2dec541b55edc488103c6c1ccb1416a.tar.bz2
Remove some GDBSERVER checks from linux-ptrace
This patch removes some GDBSERVER checks from nat/linux-ptrace.c. Currently the code uses a compile-time check to decide whether some flags should be used. This changes the code to instead let users of the module specify an additional set of flags; and then changes gdb's linux-nat.c to call this function. At some later date, when the back ends are fully merged, we will be able to remove this function again. gdb/ 2014-07-24 Tom Tromey <tromey@redhat.com> Gary Benson <gbenson@redhat.com> * nat/linux-ptrace.c (additional_flags): New global. (linux_test_for_tracesysgood, linux_test_for_tracefork): Use additional_flags; don't check GDBSERVER. (linux_ptrace_set_additional_flags): New function. * nat/linux-ptrace.h (linux_ptrace_set_additional_flags): Declare. * linux-nat.c (_initialize_linux_nat): Call linux_ptrace_set_additional_flags.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r--gdb/linux-nat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index b50a88e..7db1b3d 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -5033,6 +5033,14 @@ Enables printf debugging output."),
sigdelset (&suspend_mask, SIGCHLD);
sigemptyset (&blocked_mask);
+
+ /* Do not enable PTRACE_O_TRACEEXIT until GDB is more prepared to
+ support read-only process state. */
+ linux_ptrace_set_additional_flags (PTRACE_O_TRACESYSGOOD
+ | PTRACE_O_TRACEVFORKDONE
+ | PTRACE_O_TRACEVFORK
+ | PTRACE_O_TRACEFORK
+ | PTRACE_O_TRACEEXEC);
}