public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Project Archer <archer@sourceware.org>
Subject: [call-frame-cfa] skip inlined frames
Date: Mon, 31 Aug 2009 19:08:00 -0000	[thread overview]
Message-ID: <m3prab2445.fsf@fleche.redhat.com> (raw)

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

                 reply	other threads:[~2009-08-31 19:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3prab2445.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).