Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/gdb6/gdb PT_STEP historically ignores the argument....



details:   https://anonhg.NetBSD.org/src/rev/f8aa8f32e82c
branches:  trunk
changeset: 757226:f8aa8f32e82c
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Aug 20 15:34:13 2010 +0000

description:
PT_STEP historically ignores the argument. Indepent of whether this
behavior will be restored, pass down 0 for now to unbreak single
stepping after the thread changes.

diffstat:

 gnu/dist/gdb6/gdb/inf-ptrace.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r f085cc4b3b74 -r f8aa8f32e82c gnu/dist/gdb6/gdb/inf-ptrace.c
--- a/gnu/dist/gdb6/gdb/inf-ptrace.c    Fri Aug 20 15:01:11 2010 +0000
+++ b/gnu/dist/gdb6/gdb/inf-ptrace.c    Fri Aug 20 15:34:13 2010 +0000
@@ -317,7 +317,7 @@
 inf_ptrace_resume (ptid_t ptid, int step, enum target_signal signal)
 {
   pid_t pid = ptid_get_pid (ptid);
-  int request = PT_CONTINUE;
+  int request = PT_CONTINUE, sig = target_signal_to_host (signal);
 
   if (pid == -1)
     /* Resume all threads.  Traditionally ptrace() only supports
@@ -332,13 +332,14 @@
          all possible successor instructions), so we don't have to
          worry about that here.  */
       request = PT_STEP;
+      sig = 0;
     }
 
   /* An address of (PTRACE_TYPE_ARG3)1 tells ptrace to continue from
      where it was.  If GDB wanted it to start some other way, we have
      already written a new program counter value to the child.  */
   errno = 0;
-  ptrace (request, pid, (PTRACE_TYPE_ARG3)1, target_signal_to_host (signal));
+  ptrace (request, pid, (PTRACE_TYPE_ARG3)1, sig);
   if (errno != 0)
     perror_with_name (("ptrace"));
 }



Home | Main Index | Thread Index | Old Index