Re: Calling __stdcall functions in the inferior

John Gilmore
2012-10-12T10:20:37Z

> > 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