X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_NEUTRAL X-Spam-Check-By: sourceware.org Message-ID: <5141D1F5.9000207@cs.utoronto.ca> Date: Thu, 14 Mar 2013 09:34:45 -0400 From: Ryan Johnson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: gdb bt gives many question marks References: <603c2ab2 DOT 23bed DOT 13d67af2820 DOT Coremail DOT hgw00 AT 126 DOT com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 On 14/03/2013 3:37 AM, Ken Huang wrote: > Hi all, > > I have a problem when using gdb to debug my program in cygwin, the 'bt' command > gives me many '??'. > > So I write a quite easy program named abort.c which just aborts. after > compiled with > "gcc -g abort.c -o abort" and run with " gdb abort", it aborts as > expected. At this time > I type "bt" in gdb to see the backtrace info, but it only gives the following: My experience is that you're SOL once Windows has started its exception handling. I dont' know if it's an alternate stack, a debug info problem, or what; but the only reliable way I know to debug aborts is to `b __abort' so that gdb gets there before of Windows (I think it's two underscores, but it could be one or three). Similar issues affect other signals. In particular, SIGSEGV can often leave you in this situation -- especially if the windows exception handler itself faulted (e.g. due to a corrupt stack). Unfortunately, there's not an easy function to put a breakpoint on that catches seg faults before they head into Windows land... Ryan -- 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