From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11358 invoked by alias); 31 Dec 2004 20:16:57 -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 11010 invoked from network); 31 Dec 2004 20:16:48 -0000 Received: from unknown (HELO dberlin.org) (68.164.203.246) by sourceware.org with SMTP; 31 Dec 2004 20:16:48 -0000 Received: from [127.0.0.1] (HELO dberlin.org) by dberlin.org (CommuniGate Pro SMTP 4.2.6) with ESMTP-TLS id 7632530; Fri, 31 Dec 2004 15:16:47 -0500 Date: Fri, 31 Dec 2004 20:16:00 -0000 From: Daniel Berlin To: "H. J. Lu" cc: Daniel Jacobowitz , gcc@gcc.gnu.org, GDB Subject: Re: Gdb generates location list without DW_AT_frame_base In-Reply-To: <20041231201127.GA4344@lucon.org> Message-ID: References: <20041230192424.GA16440@lucon.org> <20041230193618.GA16661@lucon.org> <20041230195642.GA16984@lucon.org> <20041230200720.GA11027@nevyn.them.org> <20041230202346.GA17311@lucon.org> <20041230202828.GA11668@nevyn.them.org> <1104440193.20792.38.camel@DYN253786YKT> <20041230210451.GA17966@lucon.org> <20041231195734.GA4125@lucon.org> <20041231201127.GA4344@lucon.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-SW-Source: 2004-12/txt/msg00146.txt.bz2 > > This patch seems to generate better debug info. You missed a whole bunch of cases where we are arbitrarily passing true to mem_loc_descriptor or loc_descriptor. You also *can* generate a frame base for the testcase you sent me, we just don't use all the info we could to generate it. See the last patch i sent you which adds code to the add_location_or_const_value_attribute routine. Also, whether we generate a frame_base has *nothing* to do with the setting of TREE_PUBLIC. The code says: else if (!DECL_EXTERNAL (decl)) { .... /* Define the "frame base" location for this routine. We use the frame pointer or stack pointer registers, since the RTL for local variables is relative to one of them. */ if (frame_base_decl && lookup_decl_loc (frame_base_decl) != NULL) { add_location_or_const_value_attribute (subr_die, frame_base_decl, DW_AT_frame_base); } else { fp_reg = frame_pointer_needed ? hard_frame_pointer_rtx : stack_pointer_rtx; add_AT_loc (subr_die, DW_AT_frame_base, reg_loc_descriptor (fp_reg)); } }