From: Tom Hughes Date: Wed, 21 Apr 2004 15:39:57 +0000 (+0000) Subject: Change the debugger attachment code to send the STOP signal to the X-Git-Tag: svn/VALGRIND_2_1_2~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a2ebbc8f0542e5fac7f11a63660e480ba305d5c;p=thirdparty%2Fvalgrind.git Change the debugger attachment code to send the STOP signal to the 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 --- diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index 5ffca110a2..9da5b98d27 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -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, ®s) == 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];