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


Right, understood - thanks for pointing that out to me. I should have
mentioned that the original platform was SPARC Solaris and the new
platform is I386 Linux.

With that said, am I absolutely-totally-100% out of luck with being
able to find function argument addresses? Or is there some way of
doing this?

Ideally, I'd like to write the following solution in C:
* List all function calls with corresponding function argument list
for each function

Thanks,
-Pavel


On Thu, Jun 26, 2008 at 2:47 PM, Michael Snyder <msnyder@specifix.com> wrote:
> On Thu, 2008-06-26 at 14:08 -0400, Pavel Chernikov wrote:
>> >    (gdb) print /x $i0
>> >    $1 = 0xfeedface
>>
>> As you've mentioned previously, this only works on Solaris. Am I
>> totally out of luck on Linux?
>
> It only works on *sparc*.
>
> You would be just as out of luck on i386-solaris, but
> you could do the same trick on sparc-linux.
>
> Intel is a very different architecture, you know:
> there is not such a simple way of guessing where
> all the function arguments are stored.
>
>
>
>


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