Bug 12237 - set backtrace past-zero-pc
Summary: set backtrace past-zero-pc
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: backtrace (show other bugs)
Version: HEAD
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-18 23:29 UTC by Jan Kratochvil
Modified: 2010-11-18 23:29 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Draft patch. (1.76 KB, application/octet-stream)
2010-11-18 23:29 UTC, Jan Kratochvil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2010-11-18 23:29:58 UTC
Created attachment 5129 [details]
Draft patch.

Sometimes corrupted stack stops stack unwinding.  User should have a way to request further unwinding so that the backtraces "synces" up again.

Fedora contained:
gdb-6.3-framepczero-20040927.patch
gdb-6.3-bt-past-zero-20051201.patch

but those work only in marginal cases, as shown on the attached testcase.

Still there is a problem:

(gdb) bt
#0  marker () at ./gdb.base/bt-past-zero-pc.c:23
#1  0x0000000000400573 in clear_stack (end=0x0) at ./gdb.base/bt-past-zero-pc.c:38
#2  0x0000000000000000 in ?? ()
#3  0x0000000000000000 in ?? ()
#4  0x0000000000000000 in ?? ()
#5  0x00007ffff7b4c730 in ?? () from /lib64/libc.so.6
#6  0x00007fffffffdd18 in ?? ()
#7  0x00007fffffffdd40 in ?? ()
#8  0x00000000004005a5 in stub () at ./gdb.base/bt-past-zero-pc.c:52
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Frames #2 upwards already have $rbp == 0.
DWARF frame #8 therefore cannot unwind futher.

There should be a main() frame #9.