This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb / dbx / pstack question - getting function argument addresses from stack
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pavel Chernikov <pchernik at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 26 Jun 2008 10:26:33 -0400
- Subject: Re: gdb / dbx / pstack question - getting function argument addresses from stack
- References: <7611a2ff0806260620k4e4f6765l6a306c7e363fa12e@mail.gmail.com>
> 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