From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30196 invoked by alias); 6 Jan 2004 16:36:35 -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 30188 invoked from network); 6 Jan 2004 16:36:34 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 6 Jan 2004 16:36:34 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AduBq-0005qo-NL; Tue, 06 Jan 2004 11:36:22 -0500 Date: Tue, 06 Jan 2004 16:36:00 -0000 From: Daniel Jacobowitz To: gcc@gcc.gnu.org, gdb@sources.redhat.com Subject: Re: GDB does not show variables in inlined function Message-ID: <20040106163621.GA20501@nevyn.them.org> Mail-Followup-To: gcc@gcc.gnu.org, gdb@sources.redhat.com References: <20040106144950.GA18492@artax.karlin.mff.cuni.cz> <20040106150203.GA21353@nevyn.them.org> <20040106152719.GA21416@artax.karlin.mff.cuni.cz> <20040106162324.GB28039@nevyn.them.org> <20040106163333.GE19687@artax.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040106163333.GE19687@artax.karlin.mff.cuni.cz> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-01/txt/msg00056.txt.bz2 On Tue, Jan 06, 2004 at 05:33:33PM +0100, Josef Zlomek wrote: > > > > > with inlining: > > > > > > > > > > .uleb128 0x2c # (DIE (0x2a5a) DW_TAG_variable) > > > > > .long 0x2af2 # DW_AT_abstract_origin > > > > > ^^^^^^ > > > > > .byte 0x1 # DW_AT_location > > > > > .byte 0x56 # DW_OP_reg6 > > > > > ... > > > > > .long 0x2d # DW_AT_type > > > > > .uleb128 0x24 # (DIE (0x2af2) DW_TAG_variable) > > > > > ^^^^^^ > > > > > .long .LASF850 # DW_AT_name: "incoming" > > > > > .byte 0x1 # DW_AT_decl_file > > > > > .value 0x3f32 # DW_AT_decl_line > > > > > .long 0x2d # DW_AT_type > > > > > > > > > > The location seems not to be generated for the real variable record > > > > > (2nd part after ...) with inlining. > > > > > > > > > > Should GCC generate the location for the second part (after ...) too, > > > > > should GDB be able to link the descriptions through the marked number > > > > > or something else? > > > > > > > > It's the former DIE (0x2a5a) which is in scope. It has the name > > > > "incoming" through the abstract origin chain. So this is probably a > > > > GDB issue. > > > > > > > > Up until recently that DW_AT_location in the concrete DIE was missing, > > > > I believe. You might want to try this (incredibly lame, untested) GDB > > > > patch. Let me know if it does something useful. > > > > > > Wow, that was fast! > > > Yes, it works with your patch :-) > > > > Um... Josef, what GCC are you using? I didn't check tree-ssa, but > > neither 3.3 nor HEAD produces those DW_AT_location entries, which is a > > serious (and filed in bugzilla, IIRC?) bug. > > I used HEAD (maybe few days old) and compiled var-tracking.c from hammer-3_3-branch. > I used "-g -O2 -dA" (-funit-at-a-time is default at -O2) It's really a shame that this feature was never reviewed for 3.4; it would be extremely useful. Let's make sure it goes in as soon as 3.4 has branched. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer