This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
[call-frame-cfa] skip inlined frames
- From: Tom Tromey <tromey at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Mon, 31 Aug 2009 13:08:26 -0600
- Subject: [call-frame-cfa] skip inlined frames
- Reply-to: Tom Tromey <tromey at redhat dot com>
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);