This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Report the main thread.
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 26 Apr 2008 20:05:17 +0400
- Subject: [RFA] Report the main thread.
Presently, on Linux, we do add the main thread to the thread list, but we
fail to report this new thread to outside world. I think we should not
do any such special-casing -- if we want the =thread-created notification
to be usable as replacement for getting the thread, we better emit that
for all new thread.
This patch changes the behaviour. OK?
- Volodya
* linux-nat.c (linux_nat_wait): Use add_thread, not
add_thread_silent, when adding main thread.
---
gdb/linux-nat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index cac4bb7..9471cd8 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -2453,7 +2453,7 @@ linux_nat_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
lp = add_lwp (inferior_ptid);
lp->resumed = 1;
/* Add the main thread to GDB's thread list. */
- add_thread_silent (lp->ptid);
+ add_thread (lp->ptid);
set_running (lp->ptid, 1);
}
--
1.5.3.5