* [call-frame-cfa] skip inlined frames
@ 2009-08-31 19:08 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2009-08-31 19:08 UTC (permalink / raw)
To: Project Archer
I'm checking this in on the call-frame-cfa branch.
This comes from this bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=516627
The bug here is that the frame was unwound using the inline unwinder.
The fix is to unwind to the first non-inline frame.
We may still run into problems with the epilogue unwinders here. I
expect these problems to be pretty rare, though. We could fix them by
either disabling the epilogue unwinders when not doing reverse debugging
(at least, I thought they were only needed in that scenario) or by
lowering their priority in the future, because IIUC GCC is now
generating proper epilogue metadata.
Tom
2009-08-31 Tom Tromey <tromey@redhat.com>
* dwarf2-frame.c (dwarf2_frame_cfa): Skip inline frames.
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 6cfaa96..932381e 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -1257,6 +1257,8 @@ dwarf2_frame_base_sniffer (struct frame_info *this_frame)
CORE_ADDR
dwarf2_frame_cfa (struct frame_info *this_frame)
{
+ while (get_frame_type (this_frame) == INLINE_FRAME)
+ this_frame = get_prev_frame (this_frame);
if (! frame_unwinder_is (this_frame, &dwarf2_frame_unwind))
error (_("can't compute CFA for this frame"));
return get_frame_base (this_frame);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-31 19:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-31 19:08 [call-frame-cfa] skip inlined frames Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).