From 8009206ae2dec541b55edc488103c6c1ccb1416a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 3 Jan 2014 10:55:52 -0700 Subject: 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 Gary Benson * 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. --- gdb/linux-nat.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/linux-nat.c') 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); } -- cgit v1.1