From: "Pavel Chernikov" <pchernik@gmail.com>
To: "Joel Brobecker" <brobecker@adacore.com>
Cc: gdb@sourceware.org
Subject: Re: gdb / dbx / pstack question - getting function argument addresses from stack
Date: Thu, 26 Jun 2008 15:03:00 -0000 [thread overview]
Message-ID: <7611a2ff0806260803q226a05f8s833d9907d42e589c@mail.gmail.com> (raw)
In-Reply-To: <20080626142633.GB3595@adacore.com>
Hi Joel,
Thanks for the reply! It's starting to make sense... Would you mind
elaborating on "issue a series of print commands"? I'm not sure of
what exactly I need to print...
Thanks,
-Pavel
On Thu, Jun 26, 2008 at 10:26 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Example:
>> dbx: [1] strlen(0x0, 0x0, 0x5, 0x7efefeff, 0x81010100, 0xffbee178), at
>> 0xff1332ec
>> gdb: #0 0xff1332ec in strlen () from /usr/lib/libc.so.1
>>
>> Question 1: is it possible to achieve the same thing with gdb (ability
>> to see function argument addresses)? If not, is there another utility
>> that can be used?
>
> There is no way that I know of, right now, to get the information
> printed inside the argument section of the frame info. However,
> what the dbx is doing, I believe, is simply printing the contents
> of the %i0-%i5 registers. This trick only works on Sparc.
>
> Based on the description of what you're trying to do, you should be able
> to write a small script/program that starts the debugger with your core
> file, extracts the backtrace, then selects one frame after the other and
> issue a series of print commands. Your script/program would then
> post-process the output and stuff the value of the registers where you
> want to see them.
>
> --
> Joel
>
next prev parent reply other threads:[~2008-06-26 15:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-26 13:20 Pavel Chernikov
2008-06-26 14:26 ` Joel Brobecker
2008-06-26 15:03 ` Pavel Chernikov [this message]
2008-06-26 16:25 ` Joel Brobecker
2008-06-26 18:09 ` Pavel Chernikov
2008-06-26 18:47 ` Michael Snyder
2008-06-26 18:57 ` Pavel Chernikov
2008-06-26 19:04 ` Daniel Jacobowitz
2008-06-26 19:06 ` Joel Brobecker
2008-06-26 19:11 ` Michael Snyder
2008-06-26 18:50 ` Joel Brobecker
2008-06-26 19:01 ` Pavel Chernikov
2008-06-26 19:07 ` Michael Snyder
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=7611a2ff0806260803q226a05f8s833d9907d42e589c@mail.gmail.com \
--to=pchernik@gmail.com \
--cc=brobecker@adacore.com \
--cc=gdb@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