Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: drow@false.org
Cc: gdb-patches@sourceware.org
Subject: Re: [patch RFC] Re: Notes on a frame_unwind_address_in_block problem
Date: Wed, 03 Jan 2007 20:28:00 -0000	[thread overview]
Message-ID: <200701032027.l03KRv4h000275@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <20070103161257.GA14162@nevyn.them.org> (message from Daniel 	Jacobowitz on Wed, 3 Jan 2007 11:12:57 -0500)

> Date: Wed, 3 Jan 2007 11:12:57 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> On Wed, Jan 03, 2007 at 12:37:00PM +0100, Mark Kettenis wrote:
> > The basic principle of unwinding is that you get information about
> > THIS_FRAME from NEXT_FRAME; you always walk the frame chain in one
> > direction.  This means that the only requirement for calling
> > frame_unwind_xxx functions is that you have a NEXT_FRAME.  Your change
> > introduces a function that breaks this rule, by requiring THIS_FRAME
> > to be there, walking the frame chain in the other direction.  And it
> > didn't take you very long to hit the problem with that: infinite
> > recursion.
> > 
> > Now the problem we're facing is that frame_unwind_address_in_block()
> > (frame_func_unwind() is nothing but a fancy wrapper around that call)
> > cannot be implemented reliably without knowledge about THIS_FRAME; it
> > needs to know whether THIS_FRAME could be a fake frame set up by the
> > kernel in order to determine whether it is a good idea to adjust the
> > unwound PC or not.  In our current implementation that information is
> > carried by the frame type.
> > 
> > The solution I think, is to pass this information explicitly to
> > frame_unwind_address_in_block(), i.e. we change it's prototype from:
> 
> I've hit one hiccup with this... dwarf2_frame_this_id isn't calling
> frame_unwind_address_in_block, just frame_func_unwind.  So, if
> we want frame_func_unwind to do the right thing, that's the
> call site which needs to know the right frame type.

Oh sorry Daniel, I thought it was obvious that frame_func_unwind()
needed the same treatment as frame_unwind_address_in_block().

Mark


  reply	other threads:[~2007-01-03 20:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060706222157.GA1377@nevyn.them.org>
     [not found] ` <200607132020.k6DKKCSB023812@elgar.sibelius.xs4all.nl>
     [not found]   ` <20060718183910.GB17864@nevyn.them.org>
2007-01-01 19:19     ` Daniel Jacobowitz
2007-01-01 19:54       ` Mark Kettenis
2007-01-01 20:02         ` Daniel Jacobowitz
2007-01-01 20:27           ` Mark Kettenis
2007-01-01 20:35             ` Daniel Jacobowitz
2007-01-02  0:51               ` Daniel Jacobowitz
2007-01-02 19:16                 ` Mark Kettenis
2007-01-02 19:18                   ` Daniel Jacobowitz
2007-01-02 19:20                     ` Daniel Jacobowitz
2007-01-02 21:32                     ` Mark Kettenis
2007-01-03 11:37           ` Mark Kettenis
2007-01-03 14:43             ` Daniel Jacobowitz
2007-01-03 16:13             ` Daniel Jacobowitz
2007-01-03 20:28               ` Mark Kettenis [this message]
2007-01-03 20:30                 ` Daniel Jacobowitz
2007-01-03 21:58                   ` Mark Kettenis
2007-01-03 22:02                     ` Daniel Jacobowitz
2007-01-03 22:23                       ` Mark Kettenis
2007-01-03 22:29                         ` Daniel Jacobowitz
2007-02-20 12:39                           ` Daniel Jacobowitz
2007-02-20 15:31                             ` Daniel Jacobowitz
2007-02-20 16:20                               ` Daniel Jacobowitz
2007-02-22 21:28                             ` Mark Kettenis
2007-02-22 21:32                               ` Daniel Jacobowitz
2007-02-27 20:18                                 ` Daniel Jacobowitz

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=200701032027.l03KRv4h000275@brahms.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=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