From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30943 invoked by alias); 6 Aug 2013 15:34:13 -0000 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 Received: (qmail 30910 invoked by uid 89); 6 Aug 2013 15:34:12 -0000 X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_NIX_SPAM,RDNS_NONE,SPF_SOFTFAIL autolearn=no version=3.3.1 Received: from Unknown (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 06 Aug 2013 15:34:11 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MR4000008CJD500@a-mtaout21.012.net.il> for gdb@sourceware.org; Tue, 06 Aug 2013 18:33:54 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MR4000OW8KH9470@a-mtaout21.012.net.il> for gdb@sourceware.org; Tue, 06 Aug 2013 18:33:54 +0300 (IDT) Date: Tue, 06 Aug 2013 15:34:00 -0000 From: Eli Zaretskii Subject: How to debug fatal exceptions on Windows? To: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83y58evno4.fsf@gnu.org> X-SW-Source: 2013-08/txt/msg00010.txt.bz2 I need the help of the wizards here, thanks in advance. For some time now people who track Emacs development on Windows (using MinGW) report crashes that seem like some fatal exception that is caught by the top-level exception handler installed by the MinGW startup code. Here's a recent example with the backtrace: #0 0x75639bfd in KERNELBASE!DebugBreak () from /cygdrive/c/Windows/SYSTEM32/KERNELBASE.dll #1 0x01156c53 in emacs_abort () at w32fns.c:7717 #2 0x0100145d in terminate_due_to_signal (sig=11, backtrace_limit=40) at emacs.c:344 #3 0x011472bb in handle_fatal_signal (sig=11) at sysdep.c:1638 #4 0x01147296 in deliver_thread_signal (sig=11, handler=0x11472a2 ) at sysdep.c:1614 #5 0x011472ef in deliver_fatal_thread_signal (sig=11) at sysdep.c:1650 #6 0x010011ea in _gnu_exception_handler@4 () #7 0x7564084e in UnhandledExceptionFilter () from /cygdrive/c/Windows/SYSTEM32/KERNELBASE.dll #8 0x008867a4 in ?? () #9 0x775fbf2c in ntdll!RtlCreateUserThread () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll #10 0x775dbf0c in ntdll!RtlInitializeExceptionChain () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll #11 0x00000000 in ?? () gnu_exception_handler is the handler installed by startup. The problem is that given this information it is impossible to say which code triggered the problem (or at least I don't know how), and thus the problem, whatever it is, goes unsolved. Could someone suggest techniques for how to dig deeper into such problems in order to find out which application code causes this? If additional diagnostic code should be added to Emacs, that is OK, as long as that additional code can be in the application, not in the startup code. TIA