mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-15 08:08:55 +00:00
* remote.c (notice_new_inferiors): Add a new inferior only when
we're going to add a new thread.
This commit is contained in:
parent
e0ba674611
commit
29c87f7ff2
@ -1,3 +1,8 @@
|
||||
2008-11-05 Pedro Alves <pedro@codesourcery.com>
|
||||
|
||||
* remote.c (notice_new_inferiors): Add a new inferior only when
|
||||
we're going to add a new thread.
|
||||
|
||||
2008-11-05 Pedro Alves <pedro@codesourcery.com>
|
||||
|
||||
* defs.h (add_inferior_continuation)
|
||||
|
14
gdb/remote.c
14
gdb/remote.c
@ -1127,13 +1127,6 @@ static ptid_t continue_thread;
|
||||
static void
|
||||
notice_new_inferiors (ptid_t currthread)
|
||||
{
|
||||
/* When connecting to a target remote, or to a target
|
||||
extended-remote which already was debugging an inferior, we may
|
||||
not know about it yet. Add it before adding its child thread, so
|
||||
notifications are emitted in a sensible order. */
|
||||
if (!in_inferior_list (ptid_get_pid (currthread)))
|
||||
add_inferior (ptid_get_pid (currthread));
|
||||
|
||||
/* If this is a new thread, add it to GDB's thread list.
|
||||
If we leave it up to WFI to do this, bad things will happen. */
|
||||
|
||||
@ -1169,6 +1162,13 @@ notice_new_inferiors (ptid_t currthread)
|
||||
return;
|
||||
}
|
||||
|
||||
/* When connecting to a target remote, or to a target
|
||||
extended-remote which already was debugging an inferior, we
|
||||
may not know about it yet. Add it before adding its child
|
||||
thread, so notifications are emitted in a sensible order. */
|
||||
if (!in_inferior_list (ptid_get_pid (currthread)))
|
||||
add_inferior (ptid_get_pid (currthread));
|
||||
|
||||
/* This is really a new thread. Add it. */
|
||||
add_thread (currthread);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user