From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17165 invoked by alias); 28 Oct 2013 16:12:17 -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 17150 invoked by uid 89); 28 Oct 2013 16:12:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout20.012.net.il Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 28 Oct 2013 16:12:15 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MVD00A00ZKXI700@a-mtaout20.012.net.il> for gdb@sourceware.org; Mon, 28 Oct 2013 18:12:06 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MVD00A8IZO568A0@a-mtaout20.012.net.il>; Mon, 28 Oct 2013 18:12:06 +0200 (IST) Date: Mon, 28 Oct 2013 16:12:00 -0000 From: Eli Zaretskii Subject: Re: Fwd: gdb on Cygwin cannot give correct call stacks for segment faults In-reply-to: To: Pan ruochen Cc: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83a9htfk8a.fsf@gnu.org> References: X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00163.txt.bz2 > Date: Mon, 28 Oct 2013 12:00:17 +0800 > From: Pan ruochen > > Program received signal SIGSEGV, Segmentation fault. > 0x61138b61 in _fwrite_r () from /usr/bin/cygwin1.dll > (gdb) backtrace > #0 0x61138b61 in _fwrite_r () from /usr/bin/cygwin1.dll > #1 0x76bd1194 in WaitForSingleObjectEx () > from /cygdrive/c/windows/syswow64/kernel32.dll > #2 0x76bd1148 in WaitForSingleObject () > from /cygdrive/c/windows/syswow64/kernel32.dll > #3 0x610dd558 in sig_send(_pinfo*, siginfo_t&, _cygtls*) () > from /usr/bin/cygwin1.dll > #4 0x610303b4 in exception::handle(_EXCEPTION_RECORD*, > _exception_list*, _CONTEXT*, void*) () from /usr/bin/cygwin1.dll > #5 0x77a5b499 in ntdll!LdrRemoveLoadAsDataTable () > from /cygdrive/c/windows/system32/ntdll.dll > #6 0x0028a6ac in ?? () > #7 0x77a5b46b in ntdll!LdrRemoveLoadAsDataTable () > from /cygdrive/c/windows/system32/ntdll.dll > #8 0x0028a6ac in ?? () > #9 0x77a10133 in ntdll!KiUserExceptionDispatcher () > from /cygdrive/c/windows/system32/ntdll.dll > #10 0x0028a6ac in ?? () > #11 0x61138c75 in fwrite () from /usr/bin/cygwin1.dll > #12 0x610d75e5 in _sigfe () from /usr/bin/cygwin1.dll > #13 0x0000000d in ?? () > #14 0x00000000 in ?? () > > does not give any useful clues where the segment faults arise. > So what is wrong? My crystal ball says you are looking at the wrong thread. Try "thread apply all backtrace".