| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:cc:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=cmsIVPjlEL+IgIKNcPG/4AxJHkdCAdBLln7wzsgFkgbseQ1pzLNgC | |
| xSvJ1ATpwfgf5VAH+L4ReAy2A3oDcX6rcFTVr95Yps6YmPLjAl6tLFlgicz7dz4g | |
| SPagkM3k/ulZvo57uXv30jhG/wO8i0WFkD8F+Yias5XdGcXBzmedm4= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:cc:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; s=default; | |
| bh=F6nrLJo6y5QMOHSGkmu5+KuBpeY=; b=MjQRvMqcx/QDTw3TNLzNqfntP3av | |
| fbtR4r6hq/0oO0TedC8tTfIMqDrCBpGngwMWNiOgPQsUIJxup6L3RzqNL8SPwWdP | |
| VxvrX8smMF/uQkyiP1Mqbr6hYNQrx7xDf5fs0xSMbO72X7458xvkeMrhU4ggrHiO | |
| A8b8SKRDzAGzCpY= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-50.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 |
| X-Spam-User: | qpsmtpd, 2 recipients |
| X-HELO: | mho-02-ewr.mailhop.org |
| X-Mail-Handler: | Dyn Standard SMTP by Dyn |
| X-Report-Abuse-To: | abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) |
| X-MHO-User: | U2FsdGVkX1/5wnz4/JKBgC1M9K1PscTa |
| Date: | Mon, 28 Oct 2013 14:00:05 -0400 |
| From: | Christopher Faylor <cgf-use-the-mailinglist-please AT sourceware DOT org> |
| To: | Pan ruochen <panruochen AT gmail DOT com>, gdb AT sourceware DOT org |
| Cc: | cygwin AT cygwin DOT com |
| Subject: | Re: Fwd: gdb on Cygwin cannot give correct call stacks for segment faults |
| Message-ID: | <20131028180005.GA5542@ednor.casa.cgf.cx> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | Pan ruochen <panruochen AT gmail DOT com>, gdb AT sourceware DOT org, cygwin AT cygwin DOT com |
| References: | <CALX7UOgBuWzx_8dO+Aev=1MfLLSma6CQdcQqi6iURCA1HR7snA AT mail DOT gmail DOT com> <CALX7UOiD9AxWH2aqPsDdwOHQj3wAOsOXA+qSCJv4LTOuoND96g AT mail DOT gmail DOT com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <CALX7UOiD9AxWH2aqPsDdwOHQj3wAOsOXA+qSCJv4LTOuoND96g@mail.gmail.com> |
| User-Agent: | Mutt/1.5.20 (2009-06-14) |
On Mon, Oct 28, 2013 at 12:00:17PM +0800, Pan ruochen wrote:
>Hi All,
>
>I find that my gdb on Cygwin cannot dump correct call stacks while
>segment faults arise.
This isn't a failing of gdb. It's a Cygwin problem. It can't reliably
show backtraces when a SEGV happens in Cygwin DLL code. This is a known
issue.
cgf
>Test code is as follows:
>--------------------------------------------------------------
>#include <stdio.h>
>#include <stdlib.h>
>
>void foo()
>{
> FILE * volatile dev =NULL;
> fprintf(dev, "Hello World!\n");
>}
>
>int main()
>{
> foo();
> return 0;
>}
>--------------------------------------------------------------
>
>And backtrace information is as follows:
>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?
>
>-- BR, Ruochen
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |