Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Michael Snyder <msnyder@vmware.com>
Cc: Pedro Alves <pedro@codesourcery.com>,
		"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
		Hui Zhu <teawater@gmail.com>
Subject: Re: [RFA] Patch to fix reverse return from subroutine error
Date: Sat, 27 Jun 2009 21:12:00 -0000	[thread overview]
Message-ID: <20090627211150.GA27691@caradoc.them.org> (raw)
In-Reply-To: <4A4687B2.2060907@vmware.com>

On Sat, Jun 27, 2009 at 01:57:22PM -0700, Michael Snyder wrote:
> The problem is that the second "frame_id_eq" test fails in
> the case where we've just stepped backward to the RET instruction
> of a function which, in forward-time, had just returned.
> 
> It's possible that what we're trying to do here is work around a
> bug in the i386 implementation of frame_unwind_id.  When I look at
> the frame_id that it returns at this point, it does not match either
> the caller or the callee, and its code_addr is particularly wrong.

I wrote about this problem in my GCC summit paper.  All released
versions of GCC generate unwind info that is wrong in epilogues.
I believe it's fixed in trunk GCC, although maybe for specific
platforms only.

In order to get this to work for my demo I had an epilogue-specific
unwinder for ARM.  It detected common epilogue sequences and analyzed
them to find the frame ID, and was installed at higher priority than
the DWARF unwinder.

I think you're going to need the same thing here, or else use the
existing gdbarch epilogue hook somehow.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2009-06-27 21:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-11  8:27 Hui Zhu
2009-06-27 18:59 ` Michael Snyder
2009-06-27 19:48   ` Pedro Alves
2009-06-27 19:56     ` Daniel Jacobowitz
2009-06-27 20:59     ` Michael Snyder
2009-06-27 21:12       ` Daniel Jacobowitz [this message]
2009-06-28 18:46         ` Michael Snyder
2009-06-28 21:09           ` Daniel Jacobowitz
2009-06-29  0:38             ` Hui Zhu

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=20090627211150.GA27691@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@vmware.com \
    --cc=pedro@codesourcery.com \
    --cc=teawater@gmail.com \
    /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