From: Martin Mares Date: Sun, 24 Aug 2008 21:59:24 +0000 (+0200) Subject: Detect breakpoint instructions, which are reported as syscall #-1. X-Git-Tag: python-dummy-working~137 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=2df8a8134aabd09151bfb3bb04c2a201a60d10b0;p=moe.git Detect breakpoint instructions, which are reported as syscall #-1. --- diff --git a/box/box.c b/box/box.c index 2aaec6a..a9a9ec5 100644 --- a/box/box.c +++ b/box/box.c @@ -901,6 +901,8 @@ boxkeeper(void) static int stop_count = -1; if (ptrace(PTRACE_GETREGS, box_pid, NULL, &u) < 0) die("ptrace(PTRACE_GETREGS): %m"); + if (u.regs.orig_eax < 0) /* Process issued a breakpoint instruction */ + err("SG: Breakpoint"); stop_count++; if (!stop_count) /* Traceme request */ msg(">> Traceme request caught\n");