From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 863 invoked by alias); 12 Oct 2012 13:25:36 -0000 Received: (qmail 844 invoked by uid 22791); 12 Oct 2012 13:25:35 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Oct 2012 13:25:28 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MBS001007SVLL00@a-mtaout20.012.net.il> for gdb@sourceware.org; Fri, 12 Oct 2012 15:25:26 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MBS001I67YEAX50@a-mtaout20.012.net.il>; Fri, 12 Oct 2012 15:25:26 +0200 (IST) Date: Fri, 12 Oct 2012 13:25:00 -0000 From: Eli Zaretskii Subject: Re: Calling __stdcall functions in the inferior In-reply-to: <201210121144.q9CBinFb005271@glazunov.sibelius.xs4all.nl> To: Mark Kettenis Cc: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83zk3r7rg8.fsf@gnu.org> References: <83a9vs89r9.fsf@gnu.org> <201210120953.q9C9rqfu020865@glazunov.sibelius.xs4all.nl> <834nm07z0s.fsf@gnu.org> <201210121144.q9CBinFb005271@glazunov.sibelius.xs4all.nl> X-IsSubscribed: yes 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/msg00069.txt.bz2 > Date: Fri, 12 Oct 2012 13:44:49 +0200 (CEST) > From: Mark Kettenis > 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.