This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[call-frame-cfa] skip inlined frames

I'm checking this in on the call-frame-cfa branch.

This comes from this bug report:

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.


2009-08-31  Tom Tromey  <>

	* 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)
 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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]