Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Michael Eager <eager@eagercon.com>
Cc: gdb@sources.redhat.com, Vladimir Prus <vladimir@codesourcery.com>
Subject: Re: frame cache
Date: Tue, 24 Jul 2007 17:17:00 -0000	[thread overview]
Message-ID: <20070724171452.GA15843@caradoc.them.org> (raw)
In-Reply-To: <46A63051.7060208@eagercon.com>

On Tue, Jul 24, 2007 at 10:01:05AM -0700, Michael Eager wrote:
> I have a couple questions about the <target>_frame_cache
> structure and functions.
> 
> 1)  This appears to be a single-entry cache.  Why not keep
>     multiple entries?

No, it isn't single-entry.  The common code in frame.c is responsible
for passing a pointer to the correct place to store the cache for the
current frame.

> 2)  The data in the frame cache seems to be of two different
>     types:
>     a)  Fixed, based on analyzing the code: register offsets,
>         stack alignment, framelessness, etc.
>     b)  Variable, based on the call: return pc, frame base
> 
>     It looks to me that the object code is analyzed repeatedly
>     and this fixed information is discarded along with the
>     variable information.
> 
>     Why not keep a persistent cache of function specific fixed
>     data and only discard the call-specific data when the frame
>     cache is cleared?

No good reason.  I have thought about doing this before.  It's not
fundamentally different from the way the DWARF unwinder works; the
persistent part of the cache would be approximately an FDE.  It's a
little tricky to implement, since we still need to detect stopping
within the prologue, but not too tricky.  I suppose bonus points would
be awarded for constructing an actual FDE :-)

> Is there any documentation about what target-specific data
> the frame cache is supposed to contain or how the functions are
> supposed to work?

Not really, because it's completely up to the target what goes in
them; it varies quite a bit between targets.

Vlad, didn't you say a week or two ago that you'd been working on some
frame docs?

-- 
Daniel Jacobowitz
CodeSourcery


  parent reply	other threads:[~2007-07-24 17:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-24 17:08 Michael Eager
2007-07-24 17:14 ` Michael Eager
2007-07-24 17:36   ` Daniel Jacobowitz
2007-07-24 18:19     ` Michael Eager
2007-07-24 18:34       ` Mark Kettenis
2007-07-24 18:34       ` Daniel Jacobowitz
2007-07-24 17:17 ` Daniel Jacobowitz [this message]
2007-07-24 18:10   ` Michael Eager
2007-07-24 18:22     ` Daniel Jacobowitz
2007-07-24 18:45       ` Michael Eager
2007-07-24 18:45     ` Mark Kettenis
2007-07-24 19:08       ` Michael Eager
2007-07-25  2:18         ` Paul Koning
2007-07-27  9:18         ` Wenbo Yang
2007-07-30 22:01           ` Michael Eager
2007-07-30 23:07             ` Mark Kettenis
2007-07-31  3:51             ` Wenbo Yang

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=20070724171452.GA15843@caradoc.them.org \
    --to=drow@false.org \
    --cc=eager@eagercon.com \
    --cc=gdb@sources.redhat.com \
    --cc=vladimir@codesourcery.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