diff options
author | Jeff Law <law@redhat.com> | 1995-07-27 19:57:16 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1995-07-27 19:57:16 +0000 |
commit | b339391255f1cc90d6f24375a5fb3ae5fe1e0dde (patch) | |
tree | d5defd478c3550c3e3bef6b7e79431e6d32b9458 /gdb | |
parent | ef920bd889c81fa90ef5140937cfdfba711bb6a4 (diff) | |
download | gdb-b339391255f1cc90d6f24375a5fb3ae5fe1e0dde.zip gdb-b339391255f1cc90d6f24375a5fb3ae5fe1e0dde.tar.gz gdb-b339391255f1cc90d6f24375a5fb3ae5fe1e0dde.tar.bz2 |
* lynx-nat.c (child_wait): Handle threads exiting.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/lynx-nat.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c index 4b2d288..8122cf4 100644 --- a/gdb/lynx-nat.c +++ b/gdb/lynx-nat.c @@ -666,6 +666,22 @@ child_wait (pid, ourstatus) error ("Signal for unknown thread was not SIGNEWTHREAD"); } + /* Check for thread termination. */ + else if (WIFSTOPPED(status) + && WSTOPSIG(status) == SIGTRAP + && in_thread_list (pid)) + { + int realsig; + + realsig = ptrace (PTRACE_GETTRACESIG, pid, (PTRACE_ARG3_TYPE)0, 0); + + if (realsig == SIGTHREADEXIT) + { + ptrace (PTRACE_CONT, PIDGET (pid), (PTRACE_ARG3_TYPE)0, 0); + continue; + } + } + #ifdef SPARC /* SPARC Lynx uses an byte reversed wait status; we must use the host macros to access it. These lines just a copy of |