* lynx-nat.c (child_wait): Don't restart new threads and loop

to the top of child_wait; let the machine independent code in
        wait_for_inferior deal with new thread notifications.

lynx-6100 (partial)
Fixes SEGV when multi-threaded program hits a breakpoint in a new
thread.
This commit is contained in:
Jeff Law
1995-06-25 02:33:33 +00:00
parent cd5431634a
commit 1657d50b38
2 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,9 @@
Sat Jun 24 19:27:37 1995 Jeffrey A. Law <law@rtl.cygnus.com>
* lynx-nat.c (child_wait): Don't restart new threads and loop
to the top of child_wait; let the machine independent code in
wait_for_inferior deal with new thread notifications.
Fri Jun 23 11:51:58 1995 Kung Hsu <kung@mexican.cygnus.com> Fri Jun 23 11:51:58 1995 Kung Hsu <kung@mexican.cygnus.com>
* remote-nindy (nindy_load): Put in target specific load, it's * remote-nindy (nindy_load): Put in target specific load, it's

View File

@ -649,13 +649,16 @@ child_wait (pid, ourstatus)
if (realsig == SIGNEWTHREAD) if (realsig == SIGNEWTHREAD)
{ {
/* Simply ignore new thread notification, as we can't do anything /* It's a new thread notification. Nothing to do here since
useful with such threads. All ptrace calls at this point just the machine independent code in wait_for_inferior will
fail for no apparent reason. The thread will eventually get a add the thread to the thread list and restart the thread
real signal when it becomes real. */ when pid != inferior_pid and pid is not in the thread
child_resume (pid, 0, TARGET_SIGNAL_0); list. We don't even want to much with realsig -- the
continue; code in wait_for_inferior expects SIGTRAP. */
;
} }
else
error ("Signal for unknown thread was not SIGNEWTHREAD");
} }
#ifdef SPARC #ifdef SPARC