Debugging variable arguments functions (stdarg)

Jan Kratochvil jan.kratochvil@redhat.com
Fri Jul 16 19:12:00 GMT 2010


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



More information about the Gdb mailing list