This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] document linux_supports_tracefork_flag a bit better
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Cc: pedro at codesourcery dot com
- Date: Fri, 12 Feb 2010 17:16:47 -0800 (PST)
- Subject: [commit] document linux_supports_tracefork_flag a bit better
Hi.
Based on a response in irc, I've checked this in.
2010-02-12 Doug Evans <dje@google.com>
gdbserver/
* linux-low.c (linux_supports_tracefork_flag): Document.
(linux_look_up_symbols): Add comment.
Index: linux-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.128
diff -u -p -r1.128 linux-low.c
--- linux-low.c 1 Feb 2010 20:19:05 -0000 1.128
+++ linux-low.c 13 Feb 2010 01:11:50 -0000
@@ -2580,6 +2580,7 @@ linux_write_memory (CORE_ADDR memaddr, c
return 0;
}
+/* Non-zero if the kernel supports PTRACE_O_TRACEFORK. */
static int linux_supports_tracefork_flag;
/* Helper functions for linux_test_for_tracefork, called via clone (). */
@@ -2735,6 +2736,9 @@ linux_look_up_symbols (void)
if (proc->private->thread_db != NULL)
return;
+ /* If the kernel supports tracing forks then it also supports tracing
+ clones, and then we don't need to use the magic thread event breakpoint
+ to learn about threads. */
thread_db_init (!linux_supports_tracefork_flag);
#endif
}