From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20071 invoked by alias); 30 May 2003 20:32:31 -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 20034 invoked from network); 30 May 2003 20:32:30 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 30 May 2003 20:32:30 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 52E612B2F; Fri, 30 May 2003 16:32:17 -0400 (EDT) Message-ID: <3ED7BFD1.7060902@redhat.com> Date: Fri, 30 May 2003 20:32:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy Cc: Mark Kettenis , mludvig@suse.cz, gdb@sources.redhat.com, Alexandre Oliva Subject: Re: dwarf-frame.c question 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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00421.txt.bz2 > Andrew Cagney writes: > >> 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). > > > I don't understand this. Could you explain the idea in more detail? A similar technique to the line number information where there are two line number entries for the start of function so that GDB can find the end of the function prologue given: int foo (int i) { int j = i * i; return j; } In this case there would be two CFI entries covering the code at "1:" (assuming its possible): > 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 - [1:, 1:): describing the lost return instruction - [1:, end-of-function) describing the real code GDB could pick 'n' choose. The other thing to do is to test this on an alternative compiler that generates CFI. Andrew