mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
* lynx-nat.c (child_wait): A thread_id of zero from wait apparently
means the process is single threaded, so there's no need to add it to the thread list. Handle case where multi-threaded process reverts back to a single-threaded process.
This commit is contained in:
@ -1,4 +1,9 @@
|
|||||||
Thu Jul 20 15:00:31 1995 Jeff Law (law@snake.cs.utah.edu)
|
Thu Jul 20 14:18:51 1995 Jeffrey A. Law <law@rtl.cygnus.com>
|
||||||
|
|
||||||
|
* lynx-nat.c (child_wait): A thread_id of zero from wait apparently
|
||||||
|
means the process is single threaded, so there's no need to add
|
||||||
|
it to the thread list. Handle case where multi-threaded process
|
||||||
|
reverts back to a single-threaded process.
|
||||||
|
|
||||||
* gdbserver/low-hppabsd.c: Remove error declaration.
|
* gdbserver/low-hppabsd.c: Remove error declaration.
|
||||||
* gdbserver/low-sparc.c: Likewise.
|
* gdbserver/low-sparc.c: Likewise.
|
||||||
|
@ -631,7 +631,7 @@ child_wait (pid, ourstatus)
|
|||||||
/* Initial thread value can only be acquired via wait, so we have to
|
/* Initial thread value can only be acquired via wait, so we have to
|
||||||
resort to this hack. */
|
resort to this hack. */
|
||||||
|
|
||||||
if (TIDGET (inferior_pid) == 0)
|
if (TIDGET (inferior_pid) == 0 && thread != 0)
|
||||||
{
|
{
|
||||||
inferior_pid = BUILDPID (inferior_pid, thread);
|
inferior_pid = BUILDPID (inferior_pid, thread);
|
||||||
add_thread (inferior_pid);
|
add_thread (inferior_pid);
|
||||||
@ -639,6 +639,11 @@ child_wait (pid, ourstatus)
|
|||||||
|
|
||||||
pid = BUILDPID (pid, thread);
|
pid = BUILDPID (pid, thread);
|
||||||
|
|
||||||
|
/* We've become a single threaded process again. */
|
||||||
|
if (thread == 0)
|
||||||
|
inferior_pid = pid;
|
||||||
|
|
||||||
|
/* Check for thread creation. */
|
||||||
if (WIFSTOPPED(status)
|
if (WIFSTOPPED(status)
|
||||||
&& WSTOPSIG(status) == SIGTRAP
|
&& WSTOPSIG(status) == SIGTRAP
|
||||||
&& !in_thread_list (pid))
|
&& !in_thread_list (pid))
|
||||||
|
Reference in New Issue
Block a user