Summary: | TestStackBacktrace gives incorrect result for innermost frame | ||
---|---|---|---|
Product: | frysk | Reporter: | Mike Cvet <mcvet> |
Component: | general | Assignee: | Unassigned <frysk-bugzilla> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | cagney, qiyaoltc, rmoseley, woodzltc, zhengyo |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Bug Depends on: | |||
Bug Blocks: | 1633, 2935, 2936, 3076, 3346 | ||
Attachments: | Patch that works around the bug in GCC |
Description
Mike Cvet
2006-09-25 20:04:48 UTC
Created attachment 1352 [details]
Patch that works around the bug in GCC
GCC over-optimizes the empty loop, such that it ends up without line number
notes, which is why debug info only mentions the previous line. Adding
something that GCC does not understand (an empty asm) will still generate the
same code, but the debug info won't be optimized away.
I'll look into improving GCC so as to not over-optimize debug info in this
case, but it looks hard and it's sort-of pointless.
Discussion about the GCC problem started at http://gcc.gnu.org/ml/gcc/2006-10/msg00199.html The bug appears also in the frysk test program funit-rt-threader.c. The while loop at line 71 is sometimes reported as being at line 71 or at line 72. *** Bug 3814 has been marked as a duplicate of this bug. *** ping? Confirmed still a problem with: gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-31) $ frysk-core/frysk/pkglibdir/funit-rt-looper 0 0 & $ frysk-core/frysk/bindir/fstack -a $! Task #28422 #0 0x0804864e in baz() /home/mark/src/frysk-obj/frysk-core/../../frysk/frysk-core/frysk/pkglibdir/funit-rt-looper.c#61 [...] # Line number should be 62, not 61. |