From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19841 invoked by alias); 2 Jan 2003 20:54:52 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19795 invoked from network); 2 Jan 2003 20:54:49 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by 209.249.29.67 with SMTP; 2 Jan 2003 20:54:49 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 6FA1B3EC4; Thu, 2 Jan 2003 20:54:33 +0000 (GMT) Message-ID: <3E14A709.9040902@redhat.com> Date: Thu, 02 Jan 2003 20:54:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz , Michal Ludvig Cc: GDB Patches Subject: Re: [RFA] Artifical dwarf2 debug info References: <3DFE1ECD.5080908@redhat.com> <20021216185750.GA24656@nevyn.them.org> <3DFE289B.3080904@redhat.com> <20021216193459.GA27215@nevyn.them.org> <3DFE3007.3040100@redhat.com> <20021216201117.GA31474@nevyn.them.org> <3DFF185B.9090806@suse.cz> <3DFF3353.2090803@redhat.com> <20021217151304.GA5778@nevyn.them.org> <3E0057EB.1080104@redhat.com> <20021218153733.GA11738@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00031.txt.bz2 fde = get_fde_for_addr (context->ra - 1); > >+ > >+ if (fde == NULL) > >+ fde = guess_generic_fde (context->ra - 1); > > > > if (fde == NULL) > > return; Just to be clear. The above is the change that I think is wrong. Instead of this function `guessing' the source of the FDE, the code needs to be re-structured so that the caller always supplies a pre-created FDE. That way a dwarf2 cfi frame can call the above function with an FDE built from the object files debug info, while an artifical frame can call it with an artifically created FDE. There is no guessing involved. -- This is part of a long standing problem - it predates dwarf2cf by many years. Instead of using recursion, people modify debug/target dependent frame code so that it attempts to directly handle all cases. Cf all the PC_IN_CALL_DUMMY(frame->next), PC_IN_SIGTRAMP(frame->next) and other tests scattered through out the -tdep.c code; and the calls to get_next_frame() in dwarf2cfi.c. Andrew