From: Julian Seward Date: Sun, 6 Feb 2005 14:10:40 +0000 (+0000) Subject: Make --wait-for-gdb sort-of usable on amd64. I don't know why this X-Git-Tag: svn/VALGRIND_3_0_0~1087 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb0c8347a1c890c7521aa8d326ad279dd89fa2b1;p=thirdparty%2Fvalgrind.git Make --wait-for-gdb sort-of usable on amd64. I don't know why this works on x86 -- and I can't make any analogous version work on amd64. Hence return to a delay loop for the time being. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3231 --- diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index 1c9ad5ab91..ff23e3da4c 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -2686,9 +2686,13 @@ int main(int argc, char **argv) /* Hook to delay things long enough so we can get the pid and attach GDB in another shell. */ if (VG_(clo_wait_for_gdb)) { - VG_(printf)("pid=%d\n", VG_(getpid)()); - /* do "jump *$eip" to skip this in gdb */ - VG_(do_syscall0)(__NR_pause); + VG_(printf)("pid=%d, entering delay loop\n", VG_(getpid)()); + /* jrs 20050206: I don't understand why this works on x86. On + amd64 the obvious analogues (jump *$rip or jump *$rcx) don't + work. */ + /* do "jump *$eip" to skip this in gdb (x86) */ + //VG_(do_syscall0)(__NR_pause); + { Long q; for (q = 0; q < 10ULL *1000*1000*1000; q++) ; } } //--------------------------------------------------------------