Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Hilfinger@otisco.mckusick.com
Cc: gdb@sources.redhat.com
Subject: Re: Discrepency between gdbarch_frame_locals_address and get_frame_locals_address?
Date: Mon, 23 Jun 2003 19:47:00 -0000	[thread overview]
Message-ID: <3EF758BA.5060108@redhat.com> (raw)
In-Reply-To: <200306231902.h5NJ2Us00812@otisco.McKusick.COM>

> Andrew,
> 
> Whilst poking around on related things, I observed that, at least on
> Linux,

Um, which GNU/Linux, which architecture, and how recent a GDB?  Lets 
assume i386 and gdb_6_0-branch.

> the values of gdbarch_frame_locals_address and
> get_frame_locals_address disagree.  The latter appears to be correct,
> since it is used in read_var_value in what I assume is the intended
> way (add SYMBOL_VALUE to get_frame_locals_address (frame) to get
> variable address).

Yes.  get_frame_locals_address returns what debug info thinks of as the 
frame base.  Local variables being specified as offsets from that 
address.  Just don't confuse it with gdb's [deprecated] get_frame_base :-(

> Would you like a patch, or is there a subtle
> point here that I am missing?

There is likely a subtle point^D^D^Dproblem vis:  The backward 
compatible path is
	get_frame_locals_address
	-> [deprecated] gdbarch_frame_locals_address
	-> get_frame_base
	-> get_frame_id.stack_addr
and, so pre-frame code has identical values for both.  New code, 
however, has a different frame ID .stack_addr and frame-locals-address.

You've probably found code using the wrong one.

Andrew



      reply	other threads:[~2003-06-23 19:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-22 22:26 Always cache memory and registers Andrew Cagney
2003-06-22 22:34 ` Daniel Jacobowitz
2003-06-22 22:55   ` Andrew Cagney
2003-06-23  3:57     ` Daniel Jacobowitz
2003-06-23 14:13       ` Andrew Cagney
2003-06-23 19:02 ` Discrepency between gdbarch_frame_locals_address and get_frame_locals_address? Paul N. Hilfinger
2003-06-23 19:47   ` Andrew Cagney [this message]

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=3EF758BA.5060108@redhat.com \
    --to=ac131313@redhat.com \
    --cc=Hilfinger@otisco.mckusick.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