From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3646 invoked by alias); 12 Oct 2012 10:44:51 -0000 Received: (qmail 3638 invoked by uid 22791); 12 Oct 2012 10:44:50 -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,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Oct 2012 10:44:39 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MBS00E000EREU00@a-mtaout23.012.net.il> for gdb@sourceware.org; Fri, 12 Oct 2012 12:44:17 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MBS00E600HSA760@a-mtaout23.012.net.il>; Fri, 12 Oct 2012 12:44:17 +0200 (IST) Date: Fri, 12 Oct 2012 10:44:00 -0000 From: Eli Zaretskii Subject: Re: Calling __stdcall functions in the inferior In-reply-to: <201210121020.q9CAKMk7022512@new.toad.com> To: John Gilmore Cc: mark.kettenis@xs4all.nl, gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83391k7ywt.fsf@gnu.org> References: <83a9vs89r9.fsf@gnu.org> <201210120953.q9C9rqfu020865@glazunov.sibelius.xs4all.nl> <201210121020.q9CAKMk7022512@new.toad.com> 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/msg00065.txt.bz2 > cc: eliz@gnu.org, gdb@sourceware.org > Date: Fri, 12 Oct 2012 03:20:22 -0700 > From: John Gilmore > > If you just need this capability to debug a particular problem, add a > dummy debugging function to the source code of your buggy program, > which has the normal calling sequence, and which just calls > GetLastError and returns its result. Then call *that* function from > GDB. Yes, Emacs on Windows already does that. I just thought there's a better way, but I guess not. Thanks.