Module Name:    src
Committed By:   joerg
Date:           Fri Aug 20 15:34:14 UTC 2010

Modified Files:
        src/gnu/dist/gdb6/gdb: inf-ptrace.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/gnu/dist/gdb6/gdb/inf-ptrace.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/gdb6/gdb/inf-ptrace.c
diff -u src/gnu/dist/gdb6/gdb/inf-ptrace.c:1.1.1.2 src/gnu/dist/gdb6/gdb/inf-ptrace.c:1.2
--- src/gnu/dist/gdb6/gdb/inf-ptrace.c:1.1.1.2	Sun Jul  2 20:14:18 2006
+++ src/gnu/dist/gdb6/gdb/inf-ptrace.c	Fri Aug 20 15:34:13 2010
@@ -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"));
 }

Reply via email to