From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: eliz@gnu.org
Cc: gdb@sourceware.org
Subject: Re: Calling __stdcall functions in the inferior
Date: Fri, 12 Oct 2012 09:54:00 -0000 [thread overview]
Message-ID: <201210120953.q9C9rqfu020865@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <83a9vs89r9.fsf@gnu.org> (message from Eli Zaretskii on Fri, 12 Oct 2012 08:50:02 +0200)
> 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.
I'm not familliar with the Windows world (and don't really have a
desire to become familliar). But I assume "normal" (non-__stdcall)
functions use the System V calling conventions? In that case there
are two things that will need to happen:
* You'll need to implement Windows-specific push_dummy_call and/or
push_dummy_code gdbarch methods for calling __stdcall functions.
* You'll need to figure out a way to distinguish __stdcall functions
from "normal" functions.
If you decide to have a go at this, please create a new
i386-windows-tdep.c file to put all the Windows-specific i386 code.
next prev parent reply other threads:[~2012-10-12 9:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-12 6:50 Eli Zaretskii
2012-10-12 9:54 ` Mark Kettenis [this message]
2012-10-12 10:20 ` John Gilmore
2012-10-12 10:44 ` Eli Zaretskii
2012-10-12 10:42 ` Eli Zaretskii
2012-10-12 11:28 ` Pedro Alves
2012-10-12 13:26 ` Eli Zaretskii
2012-10-15 13:17 ` Pierre Muller
2012-10-12 11:45 ` Mark Kettenis
2012-10-12 13:25 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201210120953.q9C9rqfu020865@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox