mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
* 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.
This commit is contained in:
@@ -918,6 +918,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
|
||||
td_thrinfo_t ti;
|
||||
td_err_e err;
|
||||
ptid_t ptid;
|
||||
struct thread_info *tp;
|
||||
|
||||
err = td_thr_get_info_p (th_p, &ti);
|
||||
if (err != TD_OK)
|
||||
@@ -945,7 +946,8 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!in_thread_list (ptid))
|
||||
tp = find_thread_pid (ptid);
|
||||
if (tp == NULL || tp->private == NULL)
|
||||
attach_thread (ptid, th_p, &ti);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user