This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfa] Assume thread-db loaded over a live process
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 13 Sep 2004 09:57:25 -0400
- Subject: [rfa] Assume thread-db loaded over a live process
Hello,
This patch changes:
- /* We can only poke around if there actually is a child process.
- If there is no child process alive, postpone the steps below
- until one has been created. */
- if (proc_handle.pid != 0)
- {
- enable_thread_event_reporting ();
- thread_db_find_new_threads ();
- }
+ enable_thread_event_reporting ();
+ thread_db_find_new_threads ();
this code is only executed when there is a child process so the guard
isn't needed. Tested on GNU/Linux, no change in test results.
ok?
Andrew
2004-09-11 Andrew Cagney <cagney@gnu.org>
* thread-db.c (thread_db_new_objfile): Assume that there is a
child process.
Index: thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/thread-db.c,v
retrieving revision 1.44
diff -p -u -r1.44 thread-db.c
--- thread-db.c 8 Sep 2004 19:44:22 -0000 1.44
+++ thread-db.c 13 Sep 2004 13:51:23 -0000
@@ -697,14 +697,8 @@ thread_db_new_objfile (struct objfile *o
push_target (&thread_db_ops);
using_thread_db = 1;
- /* We can only poke around if there actually is a child process.
- If there is no child process alive, postpone the steps below
- until one has been created. */
- if (proc_handle.pid != 0)
- {
- enable_thread_event_reporting ();
- thread_db_find_new_threads ();
- }
+ enable_thread_event_reporting ();
+ thread_db_find_new_threads ();
break;
default: