From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12653 invoked by alias); 30 May 2003 01:34:51 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 12646 invoked from network); 30 May 2003 01:34:51 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 30 May 2003 01:34:51 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19LYnP-0004m0-00; Thu, 29 May 2003 20:35:03 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19LYml-0006U1-00; Thu, 29 May 2003 21:34:23 -0400 Date: Fri, 30 May 2003 01:34:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Mark Kettenis , mludvig@suse.cz, gdb@sources.redhat.com, Alexandre Oliva Subject: Re: dwarf-frame.c question Message-ID: <20030530013423.GA24652@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Mark Kettenis , mludvig@suse.cz, gdb@sources.redhat.com, Alexandre Oliva References: <3ED381CB.5050207@suse.cz> <200305291544.h4TFi7aL031832@elgar.kettenis.dyndns.org> <3ED66564.1020506@redhat.com> <200305292222.h4TMMmGm000694@elgar.kettenis.dyndns.org> <3ED693F5.9040108@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ED693F5.9040108@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-05/txt/msg00410.txt.bz2 On Thu, May 29, 2003 at 07:12:53PM -0400, Andrew Cagney wrote: > Discussed this with AlexO (of gcc). Let us ruin your day. > > This problem can occure even without recursion. Consider the C snippet: > > foo () > { > if (i) > abort (with, lots, of parameters) > do; normal; stuff; > } > > it can be turned into: > > branch !i, 1: > push with > push lots > push of > push parameters > call abort > 1: > do > normal > stuff > > The return address can end up pointing at the ``do'' / 1: line and > that's CFI info is definitly not correct for unwinding from abort(). This suggests to me two things: - that the problem is writing CFI for a trampoline which begins at the return address. Normally that can't happen except for "magic" like signals. So there will be an FDE which includes or ends at the return PC. - that there should be a DWARF-3 extension to clarify this; is anyone interested in discussing it with the committee? > One idea (the origins of which are unknown) is for the compiler to > generate CFI info containing no addresses and have GDB look for that > dependant on the PC address being obtained using return or resume > (sigtramp, sentinel). > > However, first, does anyone know if the DWARF 2 spec has something to > say abou this? I can't see anything relevant. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer