|
From: <sv...@va...> - 2005-06-23 21:37:48
|
Author: sewardj
Date: 2005-06-23 22:37:47 +0100 (Thu, 23 Jun 2005)
New Revision: 4006
Log:
Kludge up wait_for_gdb even more.
Modified:
trunk/coregrind/m_main.c
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-06-23 15:30:31 UTC (rev 4005)
+++ trunk/coregrind/m_main.c 2005-06-23 21:37:47 UTC (rev 4006)
@@ -2572,6 +2572,7 @@
/* Hook to delay things long enough so we can get the pid and
attach GDB in another shell. */
if (VG_(clo_wait_for_gdb)) {
+ Long q, iters;
VG_(debugLog)(1, "main", "Wait for GDB\n");
VG_(printf)("pid=3D%d, entering delay loop\n", VG_(getpid)());
/* jrs 20050206: I don't understand why this works on x86. On
@@ -2579,7 +2580,20 @@
work. */
/* do "jump *$eip" to skip this in gdb (x86) */
//VG_(do_syscall0)(__NR_pause);
- { Long q; for (q =3D 0; q < 10ULL *1000*1000*1000; q++) ; }
+
+# if defined(VGP_x86_linux)
+ iters =3D 5;
+# elif defined(VGP_amd64_linux)
+ iters =3D 10;
+# elif defined(VGP_ppc32_linux)
+ iters =3D 1;
+# else
+# error "Unknown plat"
+# endif
+
+ iters *=3D 1000*1000*1000;
+ for (q =3D 0; q < iters; q++)=20
+ ;
}
=20
//--------------------------------------------------------------
|