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: Debugging variable arguments functions (stdarg)


On Fri, 16 Jul 2010 20:57:57 +0200, Petr HluzÃn wrote:
> Workaround B:
> Get value of stack pointer (RSP?) of frame MysqlWrapper() and dump raw
> memory around the address. You should see these values somewhere
> around:
> 0x00000000004041e2 (return address in MysqlWrapper)
> 0x406bf0 (the third argument to WriteLog)
> Between these two values should be the values of 3rd and 4th argument.

This is not so simple on x86_64, it passes even (first few) stdarg parameters
in registers.
	http://www.x86-64.org/documentation/abi.pdf


Regards,
Jan


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