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: Calling __stdcall functions in the inferior


> Date: Fri, 12 Oct 2012 12:41:55 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > Date: Fri, 12 Oct 2012 11:53:52 +0200 (CEST)
> > From: Mark Kettenis <mark.kettenis@xs4all.nl>
> > CC: gdb@sourceware.org
> > 
> > > Date: Fri, 12 Oct 2012 08:50:02 +0200
> > > From: Eli Zaretskii <eliz@gnu.org>
> > > 
> > > 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.
> > 
> > Probably not.  We only implement the System V and Darwin calling
> > conventions for i386.
> 
> But we also support Pascal, AFAIK, which uses this convention: the
> callee pops the stack.  The only difference is that the arguments are
> pushed right to left, unlike with Pascal.  So I thought we already had
> this somewhere...

The way call dummies work, the fact that the callee pops the stack
shouldn't be an issue.


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