From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3162 invoked by alias); 12 Oct 2012 11:45:02 -0000 Received: (qmail 3067 invoked by uid 22791); 12 Oct 2012 11:45:00 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Oct 2012 11:44:56 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q9CBiogc027921; Fri, 12 Oct 2012 13:44:50 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q9CBinFb005271; Fri, 12 Oct 2012 13:44:49 +0200 (CEST) Date: Fri, 12 Oct 2012 11:45:00 -0000 Message-Id: <201210121144.q9CBinFb005271@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: eliz@gnu.org CC: gdb@sourceware.org In-reply-to: <834nm07z0s.fsf@gnu.org> (message from Eli Zaretskii on Fri, 12 Oct 2012 12:41:55 +0200) Subject: Re: Calling __stdcall functions in the inferior References: <83a9vs89r9.fsf@gnu.org> <201210120953.q9C9rqfu020865@glazunov.sibelius.xs4all.nl> <834nm07z0s.fsf@gnu.org> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00067.txt.bz2 > Date: Fri, 12 Oct 2012 12:41:55 +0200 > From: Eli Zaretskii > > > Date: Fri, 12 Oct 2012 11:53:52 +0200 (CEST) > > From: Mark Kettenis > > CC: gdb@sourceware.org > > > > > Date: Fri, 12 Oct 2012 08:50:02 +0200 > > > From: Eli Zaretskii > > > > > > 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.