diff options
author | Pedro Alves <palves@redhat.com> | 2008-03-25 12:26:21 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-03-25 12:26:21 +0000 |
commit | 403fe1979f7a9e128d3904731e709fadbf60ea81 (patch) | |
tree | 527a2add5ace4f83bc53ef19773a830bf1983af1 /gdb/linux-nat.c | |
parent | 710151dda51c86ee63e65409f87ad3b0ccc54936 (diff) | |
download | gdb-403fe1979f7a9e128d3904731e709fadbf60ea81.zip gdb-403fe1979f7a9e128d3904731e709fadbf60ea81.tar.gz gdb-403fe1979f7a9e128d3904731e709fadbf60ea81.tar.bz2 |
* linux-nat.c (linux_nat_attach): Add the pid we attached to, to
gdb's thread list.
(linux_nat_wait): Add main lwp to gdb's thread list.
* linux-thread-db.c (find_new_threads_callback): Also attach to
already listed threads which thread_db didn't know about yet.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index e2ef962e..9511815 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1173,6 +1173,10 @@ linux_nat_attach (char *args, int from_tty) lp = add_lwp (inferior_ptid); lp->cloned = cloned; + /* If this process is not using thread_db, then we still don't + detect any other threads, but add at least this one. */ + add_thread_silent (lp->ptid); + lp->stopped = 1; lp->resumed = 1; @@ -2387,6 +2391,8 @@ linux_nat_wait (ptid_t ptid, struct target_waitstatus *ourstatus) GET_PID (inferior_ptid)); lp = add_lwp (inferior_ptid); lp->resumed = 1; + /* Add the main thread to GDB's thread list. */ + add_thread_silent (lp->ptid); } sigemptyset (&flush_mask); |