gdb / dbx / pstack question - getting function argument addresses from stack
Joel Brobecker
brobecker@adacore.com
Thu Jun 26 14:26:00 GMT 2008
> 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
More information about the Gdb
mailing list