]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Change the debugger attachment code to send the STOP signal to the
authorTom Hughes <tom@compton.nu>
Wed, 21 Apr 2004 15:39:57 +0000 (15:39 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 21 Apr 2004 15:39:57 +0000 (15:39 +0000)
forked process before using ptrace() to continue it, instead of asking
ptrace to deliver it, as that doesn't seem to work on some versions
of linux.

CCMAIL: 77824-done@bugs.kde.org

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2380

coregrind/vg_main.c

index 5ffca110a241adc73a816fba7cef29aadc878253..9da5b98d279109955ea5e582b58aa5824959b54d 100644 (file)
@@ -350,7 +350,8 @@ void VG_(start_debugger) ( Int tid )
       if ((res = VG_(waitpid)(pid, &status, 0)) == pid &&
           WIFSTOPPED(status) && WSTOPSIG(status) == SIGSTOP &&
           ptrace(PTRACE_SETREGS, pid, NULL, &regs) == 0 &&
-          ptrace(PTRACE_DETACH, pid, NULL, SIGSTOP) == 0) {
+          kill(pid, SIGSTOP) == 0 &&
+          ptrace(PTRACE_DETACH, pid, NULL, 0) == 0) {
          Char pidbuf[15];
          Char file[30];
          Char buf[100];