* infrun.c (wait_for_inferior): When we hit a breakpoint for the

wrong thread, make sure to write the fixed PC value into the thread
        that stopped.  Restart all threads after single stepping over a
        breakpoint for a different thread.
        * breakpoint.c (set_momentary_breakpoint): Make momentary
        breakpoints thread specific in a multi-threaded program.
        * lynx-nat.c (child_resume): Add some comments.  Correctly
        choose between the single and multi-threaded step and continue
        ptrace calls.

Some of the lynx-6100 single stepping fixes.
This commit is contained in:
Jeff Law
1995-07-04 17:40:41 +00:00
parent 7523be3552
commit 48f4903f36
3 changed files with 81 additions and 23 deletions

View File

@ -705,14 +705,16 @@ child_resume (pid, step, signal)
errno = 0;
/* If pid == -1, then we want to step/continue all threads, else
we only want to step/continue a single thread. */
if (pid == -1)
{
/* Resume all threads. */
pid = inferior_pid;
func = step ? PTRACE_SINGLESTEP : PTRACE_CONT;
}
else
func = step ? PTRACE_SINGLESTEP_ONE : PTRACE_CONT_ONE;
func = step ? PTRACE_SINGLESTEP_ONE : PTRACE_CONT;
/* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
it was. (If GDB wanted it to start some other way, we have already