From 48f4903f369709dde852872db542afbb536acd54 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 4 Jul 1995 17:40:41 +0000 Subject: * 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. --- gdb/lynx-nat.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gdb/lynx-nat.c') diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c index f0e817e..1ab9cc7 100644 --- a/gdb/lynx-nat.c +++ b/gdb/lynx-nat.c @@ -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 -- cgit v1.1