X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4A50E9C6.4030202@gmail.com> Date: Sun, 05 Jul 2009 18:58:30 +0100 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Segmentation fault when exception is thrown or assertion fails [g++/gcc] References: <4A50A18B DOT 6070407 AT gmail DOT com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Roman Werpachowski wrote: > On Sun, Jul 5, 2009 at 1:50 PM, Dave Korn wrote: >> Well, what happened was that there's a bug somewhere, and while cygwin was >> in the process of dumping the stack trace for the abort caused by your >> assertion firing, > > One more question: how can I use this stack trace to debug genuine > errors? "gdb -c" cannot load it. It's not a full core dump, it's just a stack backtrace in human-readable format. If you copy and paste the addresses in the second column (Function) into "addr2line --exe " (and assuming you compiled with debug info), it'll turn them into a list of addresses. (Note that in the examples you gave, all the addresses were in the cygwin DLL, because the compiler had optimised the implied abort() call in the assert() in your main() function into a tail-call; effectively your code had already returned from main.) cheers, DaveK -- 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