This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
patch for bug 3259
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Mike Cvet <mcvet at redhat dot com>
- Cc: Andrew Cagney <cagney at redhat dot com>, frysk at sources dot redhat dot com
- Date: Fri, 06 Oct 2006 04:05:40 -0300
- Subject: patch for bug 3259
- Organization: Red Hat OS Tools Group
- References: <or7izhgq9s.fsf@free.oliva.athome.lsd.ic.unicamp.br> <4523BD82.3070302@redhat.com> <1160063678.2050.51.camel@towel.toronto.redhat.com>
On Oct 5, 2006, Mike Cvet <mcvet@redhat.com> wrote:
> http://sourceware.org/bugzilla/show_bug.cgi?id=3259
> For whatever reason, the unwinding expects the innermost frame to be
> looping at line 61, when in fact it should be 62. This doesn't happen in
> the following backtrace testcase, or anywhere else I've seen... a
> strange anomaly.
I've just attached a patch to bugzilla that works around the compiler
over-optimization of debug info that causes this symptom. Ok to
install?
for frysk-core/frysk/pkglibexecdir
from Alexandre Oliva <aoliva@redhat.com>
* funit-rt-looper.c (baz): Avoid overoptimization of the
infinite loop's debug info.
for frysk-core/frysk/rt/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* tests/TestStackBacktrace.java (TestLib): Revert.
Index: frysk/frysk-core/frysk/rt/tests/TestStackBacktrace.java
===================================================================
--- frysk.orig/frysk-core/frysk/rt/tests/TestStackBacktrace.java 2006-10-05 23:37:39.000000000 -0300
+++ frysk/frysk-core/frysk/rt/tests/TestStackBacktrace.java 2006-10-06 03:43:51.000000000 -0300
@@ -156,8 +156,7 @@ public class TestStackBacktrace
assertEquals("baz", frame.getMethodName());
assertNull(frame.getInner());
- if (!brokenXXX(3295))
- assertEquals(62, frame.getLineNumber());
+ assertEquals(62, frame.getLineNumber());
frame = frame.getOuter();
assertTrue(frame.getSourceFile().endsWith(
Index: frysk/frysk-core/frysk/pkglibexecdir/funit-rt-looper.c
===================================================================
--- frysk.orig/frysk-core/frysk/pkglibexecdir/funit-rt-looper.c 2006-10-06 03:47:15.000000000 -0300
+++ frysk/frysk-core/frysk/pkglibexecdir/funit-rt-looper.c 2006-10-06 03:57:10.000000000 -0300
@@ -59,7 +59,7 @@ void *signal_parent(void* args)
void baz()
{
lock = 0;
- while(1);
+ while(1) asm(""); /* GCC generates bad debug info without the asm. */
}
void bar()
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Secretary for FSF Latin America http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}