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
Subject: Re: frame cache
Date: Tue, 24 Jul 2007 18:34:00 -0000	[thread overview]
Message-ID: <20070724182207.GB18953@caradoc.them.org> (raw)
In-Reply-To: <46A64079.2010704@eagercon.com>

On Tue, Jul 24, 2007 at 11:10:01AM -0700, Michael Eager wrote:
> This seems odd.  The function is <target>_analyze_prologue()
> not <target>_analyze_part_of_a_prologue().  The prologue isn't going
> to change depending on where the program stopped.  <target>_skip_prologue()
> can return a pc based on whatever a complete analysis reveals.
> 
> In i386, for example, the "pc limit" (called current_pc) passed
> to i386_analyze_prologue() is 0xffffffff.  Sparc is similar.
> Neither seem to restrict how far the analyze_prologue function scans.

Yes.  But when you are analyzing the prologue for a frame cache, it is
important to restrict it to the current PC.  Otherwise obviously bad
things happen when you're stopped on the first or second instruction
of the function.  So the result of that analysis is not always the
same for a given function.

> I do see that some targets merge skip_prologue and analyze_prologue.
> Are there other methods?  It would seem to me that for any function
> that has DWARF data, one can locate the end of the prologue without
> reading data from the target.  I don't see any target which does this.

Some targets found it easier to have two separate methods.  Others use
line number info, or some combination - e.g. mips_skip_prologue ->
skip_prologue_using_sal.  Nothing tries to use the .debug_line
prologue flag, since GCC doesn't generate it yet.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-07-24 18:22 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       ` Daniel Jacobowitz [this message]
2007-07-24 18:34       ` Mark Kettenis
2007-07-24 17:17 ` Daniel Jacobowitz
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=20070724182207.GB18953@caradoc.them.org \
    --to=drow@false.org \
    --cc=eager@eagercon.com \
    --cc=gdb@sources.redhat.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