From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFC 2/5] Frame unwinding using struct value
Date: Fri, 04 Apr 2008 19:16:00 -0000 [thread overview]
Message-ID: <20080404173224.GE23283@adacore.com> (raw)
In-Reply-To: <20080331221024.GA22334@caradoc.them.org>
> (frame_register_unwind): Remove debug messages. Use
> frame_unwind_register_value.
It looks like we'll also be able to get rid of this function
at some point soon. As far as I can tell, I can only find 2 places
where it's being used:
- mep-tdep.c: But this will disappear as soon as we convert
the function using it;
- stack.c:frame_info() I think we can adjust the code to use
frame_unwind_register_value instead. The code looks like this:
/* Find out the location of the saved stack pointer with out
actually evaluating it. */
frame_register_unwind (fi, gdbarch_sp_regnum (gdbarch),
&optimized, &lval, &addr,
&realnum, NULL);
if (!optimized && lval == not_lval)
{
gdb_byte value[MAX_REGISTER_SIZE];
CORE_ADDR sp;
frame_register_unwind (fi, gdbarch_sp_regnum (gdbarch),
&optimized, &lval, &addr,
&realnum, value);
/* NOTE: cagney/2003-05-22: This is assuming that the
stack pointer was packed as an unsigned integer. That
may or may not be valid. */
sp = extract_unsigned_integer (value,
register_size (gdbarch,
gdbarch_sp_regnum (gdbarch)));
printf_filtered (" Previous frame's sp is ");
fputs_filtered (paddress (sp), gdb_stdout);
printf_filtered ("\n");
need_nl = 0;
}
else if (!optimized && lval == lval_memory)
{
printf_filtered (" Previous frame's sp at ");
fputs_filtered (paddress (addr), gdb_stdout);
printf_filtered ("\n");
need_nl = 0;
}
else if (!optimized && lval == lval_register)
{
printf_filtered (" Previous frame's sp in %s\n",
gdbarch_register_name (gdbarch, realnum));
need_nl = 0;
--
Joel
next prev parent reply other threads:[~2008-04-04 17:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-31 22:12 Daniel Jacobowitz
2008-04-01 13:23 ` Eli Zaretskii
2008-04-17 15:30 ` Daniel Jacobowitz
2008-04-04 19:10 ` Joel Brobecker
2008-04-17 15:59 ` Daniel Jacobowitz
2008-04-04 19:16 ` Joel Brobecker [this message]
2008-04-07 19:34 ` Thiago Jung Bauermann
2008-04-17 16:02 ` Daniel Jacobowitz
2008-04-30 23:31 ` Daniel Jacobowitz
[not found] ` <20080430230012.GB3801@adacore.com>
2008-05-01 3:37 ` 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=20080404173224.GE23283@adacore.com \
--to=brobecker@adacore.com \
--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