|
From: <sv...@va...> - 2007-02-16 13:57:08
|
Author: sewardj
Date: 2007-02-16 13:57:07 +0000 (Fri, 16 Feb 2007)
New Revision: 6595
Log:
--wait-for-gdb=yes: gcc 4.1.2 now appears to delete do-nothing loops, so
make the loop variable volatile so it can't do that.
Modified:
trunk/coregrind/m_main.c
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2007-02-16 13:17:40 UTC (rev 6594)
+++ trunk/coregrind/m_main.c 2007-02-16 13:57:07 UTC (rev 6595)
@@ -1586,7 +1586,8 @@
/* 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;
+ Long iters;
+ volatile Long q;
VG_(debugLog)(1, "main", "Wait for GDB\n");
VG_(printf)("pid=%d, entering delay loop\n", VG_(getpid)());
|