From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23597 invoked by alias); 1 Oct 2008 14:48:40 -0000 Received: (qmail 23536 invoked by uid 22791); 1 Oct 2008 14:48:39 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Oct 2008 14:48:00 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 0E3F010D2A; Wed, 1 Oct 2008 14:47:58 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id E0C10104B9; Wed, 1 Oct 2008 14:47:57 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Kl2zc-00054K-TV; Wed, 01 Oct 2008 10:47:56 -0400 Date: Wed, 01 Oct 2008 14:48:00 -0000 From: Daniel Jacobowitz To: Frederic RISS Cc: gdb@sourceware.org Subject: Re: Robustify frame_unwind_address_in_block heuristic? Message-ID: <20081001144756.GA19452@caradoc.them.org> Mail-Followup-To: Frederic RISS , gdb@sourceware.org References: <1222872102.6785.516.camel@crx3051.cro.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1222872102.6785.516.camel@crx3051.cro.st.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes 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 X-SW-Source: 2008-10/txt/msg00004.txt.bz2 On Wed, Oct 01, 2008 at 04:41:42PM +0200, Frederic RISS wrote: > I have to admit that the above is a convoluted case which shouldn't show > up in a 'standard' debug session. It's also not the first time I wish > that frame unwinders were more flexible/modular, but it's the first time > that I wasn't able to work around the issue without patching GDB's core > functionality. Would it be acceptable to add a check to the above > function that checks whether pc-1 points into the same function as pc? No. That's exactly the issue this code was written to handle :-) > Or maybe someone sees another way to prevent that issue? I don't see how to generically handle this case unless you can distinguish it from this example: my_function: do_stuff call noreturn_function unrelated_function: do_unrelated_stuff But there's rarely anything to handle the special kind of call in your 'returned-to' function, so from what's on the stack, I don't know how we can tell. -- Daniel Jacobowitz CodeSourcery