This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb / dbx / pstack question - getting function argument addresses from stack


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]