Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: Re: RFC: Mark outer frames
Date: Wed, 02 Sep 2009 17:33:00 -0000	[thread overview]
Message-ID: <20090902173328.GA28209@caradoc.them.org> (raw)
In-Reply-To: <20090902170324.GC4365@adacore.com>

On Wed, Sep 02, 2009 at 10:03:24AM -0700, Joel Brobecker wrote:
> > The obvious pitfall is that the outer frame isn't a single consistent
> > frame.  So there's an ugly bit in infrun that says if we set the stack
> > pointer while inside an outer frame, and suddenly we're in a frame we
> > think we can unwind from (mostly incorrectly at this point), then
> > we've not changed functions.  Otherwise stepping through _start will
> > blow up on some platforms I tried.
> 
> Didn't we have the same problem with null_frame_id before? I guess
> not because equality to the null_frame_id is always false... The bit
> in infrun does not seem all that horrible to me, but your comment does
> suggest another way that you might think is better?

Sorry, I meant to go into that.

The magic outer frame ID is, IMO, a workaround.  What we really want
is to have frame IDs wherever we can.  Either "stack address
uncertain, but function known" or even "stack address and function
known, but outerness detected".  This requires changes to the
unwinding interface, and additional changes to each affected unwinder
to build the best IDs we can and to mark the outer frame some other
way.

I haven't spec'd out a full approach to this problem, just speculated
about it.

> +    /* The outermost frame marker is equal to itself.  This is the
> +       dodgy think about outer_frame_id, since between execution steps
>               ^^^^^ thing
> 

Thanks!

> I wouldn't mind a more detailed comment about when outer_frame_id
> should be used (we're in startup code and the associated frame has
> not been setup yet). I got confused by "there is no frame ID, but
> there is a frame".

This is, indeed, the central problem.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2009-09-02 17:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28 22:16 Daniel Jacobowitz
2009-08-29  7:24 ` Eli Zaretskii
2009-08-31 22:54 ` Joel Brobecker
2009-09-01 22:41   ` Doug Evans
2009-09-02 17:03 ` Joel Brobecker
2009-09-02 17:33   ` Daniel Jacobowitz [this message]
2009-09-03 22:52 ` Joel Brobecker
2009-09-10  2:29   ` [gdb-7.0] " Joel Brobecker
2009-09-10 19:12     ` Daniel Jacobowitz
2009-09-10 22:41       ` Joel Brobecker
2009-09-12 22:13         ` [gdb-7.0/doco] " Joel Brobecker
2009-09-12 22:14           ` Joel Brobecker
2009-09-13  3:11             ` Eli Zaretskii
2009-09-13 16:29               ` Joel Brobecker

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=20090902173328.GA28209@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@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