aboutsummaryrefslogtreecommitdiff
path: root/gdb/lynx-nat.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-07-04 17:40:41 +0000
committerJeff Law <law@redhat.com>1995-07-04 17:40:41 +0000
commit48f4903f369709dde852872db542afbb536acd54 (patch)
tree6f144f67e58106cff4152237e22484f07418437c /gdb/lynx-nat.c
parent7523be35520e8b0f64b5c30933e5fe447b63784e (diff)
downloadfsf-binutils-gdb-48f4903f369709dde852872db542afbb536acd54.zip
fsf-binutils-gdb-48f4903f369709dde852872db542afbb536acd54.tar.gz
fsf-binutils-gdb-48f4903f369709dde852872db542afbb536acd54.tar.bz2
* 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.
Diffstat (limited to 'gdb/lynx-nat.c')
-rw-r--r--gdb/lynx-nat.c8
1 files changed, 5 insertions, 3 deletions
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