Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: davidm@hpl.hp.com, gdb@sources.redhat.com
Subject: Re: question on gdbarch_skip_prologue()
Date: Thu, 07 Mar 2002 00:12:00 -0000	[thread overview]
Message-ID: <1020307081116.ZM26473@localhost.localdomain> (raw)
In-Reply-To: David Mosberger <davidm@napali.hpl.hp.com> "question on gdbarch_skip_prologue()" (Mar  6, 10:28pm)

On Mar 6, 10:28pm, David Mosberger wrote:

> I'm exploring the idea of changing the ia64 backend of gdb to use
> unwind information instead of code-reading.  While looking into this,
> I started to wonder how gdbarch_skip_prologue() should be implemented.
> Some backends simply return the PC that was passed into the routine,
> i.e., they always assume a zero-size prologue.  I'm tempted to do the
> same because I worry that with optimized code, the very notion of a
> prologue becomes quite fuzzy.  For example, a prologue might contain a
> branch and, if so, there may not even be a single PC that corresponds
> to the end of the prologue.
> 
> Are there any downsides to gdbarch_skip_prologue() always returning
> the original PC?  Since the unwind info is accurate no matter what the
> PC is, there are no problems with tracking the contents of preserved
> (callee-saved) registers, but I'm wondering whether I'm missing
> anything else.

GDB currently expects that the skip_prologue() function will return a
PC that's after the last prologue instruction that saved an argument
to its "home" location (if any) in memory (or whereever the debug info
says that a parameter's location is).  The difficulty with this, of
course, is that with optimized code, it can be very difficult to
discern where this is.

Kevin


  parent reply	other threads:[~2002-03-07  8:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-06 22:28 David Mosberger
     [not found] ` <davidm@napali.hpl.hp.com>
2002-03-07  0:12   ` Kevin Buettner [this message]
2002-03-07 10:13     ` David Mosberger
2002-03-07 10:42   ` Kevin Buettner
2002-03-07 11:55     ` David Mosberger

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=1020307081116.ZM26473@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=davidm@hpl.hp.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