Calling __stdcall functions in the inferior

Eli Zaretskii eliz@gnu.org
Fri Oct 12 13:25:00 GMT 2012


> Date: Fri, 12 Oct 2012 13:44:49 +0200 (CEST)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> CC: gdb@sourceware.org
> 
> The way call dummies work, the fact that the callee pops the stack
> shouldn't be an issue.

Then what could be the reason that

  (gdb) p GetLastError ()

crashes?  Here's what get:

  (gdb) p GetLastError()

  Program received signal SIGSEGV, Segmentation fault.
  0x7c809163 in KERNEL32!InitializeSListHead ()
     from C:\WINDOWS\system32\kernel32.dll
  The program being debugged was signaled while in a function called from GDB.
  GDB remains in the frame where the signal was received.
  To change this behavior use "set unwindonsignal on".
  Evaluation of the expression containing the function
  (KERNEL32!GetLastError) will be abandoned.
  When the function is done executing, GDB will silently stop.



More information about the Gdb mailing list