Calling __stdcall functions in the inferior

John Gilmore gnu@toad.com
Fri Oct 12 10:20:00 GMT 2012


> > Is there a way to call __stdcall functions in the inferior from GDB,
> > while debugging a C program?  The case in point is GetLastError, but
> > any other function from the Windows API has this problem.

If you just need this capability to debug a particular problem, add a
dummy debugging function to the source code of your buggy program,
which has the normal calling sequence, and which just calls
GetLastError and returns its result.  Then call *that* function from
GDB.

	John



More information about the Gdb mailing list