From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32108 invoked by alias); 28 Nov 2001 20:32:07 -0000 Mailing-List: contact gdb-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31997 invoked from network); 28 Nov 2001 20:32:05 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by hostedprojects.ges.redhat.com with SMTP; 28 Nov 2001 20:32:05 -0000 Received: from drow by nevyn.them.org with local (Exim 3.32 #1 (Debian)) id 169BNa-0000Sg-00; Wed, 28 Nov 2001 15:32:26 -0500 Date: Wed, 21 Nov 2001 13:42:00 -0000 From: Daniel Jacobowitz To: Jason Merrill Cc: libstdc++@gcc.gnu.org, gdb@sources.redhat.com Subject: Re: C++ debugging progress Message-ID: <20011128153226.A1557@nevyn.them.org> Mail-Followup-To: Jason Merrill , libstdc++@gcc.gnu.org, gdb@sources.redhat.com References: <20011128020256.A9688@nevyn.them.org> <20011128124118.A23447@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-SW-Source: 2001-11/txt/msg00215.txt.bz2 On Wed, Nov 28, 2001 at 07:40:37PM +0000, Jason Merrill wrote: > >>>>> "Daniel" == Daniel Jacobowitz writes: > > > On Wed, Nov 28, 2001 at 09:31:07AM +0000, Jason Merrill wrote: > > >> So you're using the inheritance information in the RTTI rather than the debug > >> info? That seems unfortunate. I'm not sure why you would need to worry > >> about ordering; the debug info should tell you exactly where things are. > >> If it doesn't, it should probably be fixed. > > > In that case, the debug info absolutely needs to be fixed. > > > <1><22e>: Abbrev Number: 15 (DW_TAG_structure_type) > > DW_AT_sibling : <2df> > > DW_AT_name : Left > > DW_AT_byte_size : 12 > > DW_AT_decl_file : 1 > > DW_AT_decl_line : 2 > > DW_AT_containing_type: <22e> > > <2><23f>: Abbrev Number: 22 (DW_TAG_inheritance) > > DW_AT_type : <56> > > DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8; ) > > DW_AT_virtuality : 1 (virtual) > > DW_AT_accessibility: 1 (public) > > Yep. Since Base is a virtual base of Left, the DW_AT_data_member_location > here should be a complex expression telling the debugger to go through the > vtable. I'll get on it. > > I'll also change the stabs output to give the offset within the vtable > rather than the offset of the base in a complete object; gdb will still > need to be clever enough to know what to do with it. I should add: is there some way we can disambiguate correct and incorrect debug info after this fix? For Dwarf2 I see how to do it pretty easily. Would an explicit minus sign work? I think GDB won't croak on that. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: Jason Merrill Cc: libstdc++@gcc.gnu.org, gdb@sources.redhat.com Subject: Re: C++ debugging progress Date: Wed, 28 Nov 2001 12:32:00 -0000 Message-ID: <20011128153226.A1557@nevyn.them.org> References: <20011128020256.A9688@nevyn.them.org> <20011128124118.A23447@nevyn.them.org> X-SW-Source: 2001-11/msg00322.html Message-ID: <20011128123200.IivhxBt-5a1J6JHnU7JDxV4Fl64y92JHN04RC8qpe7g@z> On Wed, Nov 28, 2001 at 07:40:37PM +0000, Jason Merrill wrote: > >>>>> "Daniel" == Daniel Jacobowitz writes: > > > On Wed, Nov 28, 2001 at 09:31:07AM +0000, Jason Merrill wrote: > > >> So you're using the inheritance information in the RTTI rather than the debug > >> info? That seems unfortunate. I'm not sure why you would need to worry > >> about ordering; the debug info should tell you exactly where things are. > >> If it doesn't, it should probably be fixed. > > > In that case, the debug info absolutely needs to be fixed. > > > <1><22e>: Abbrev Number: 15 (DW_TAG_structure_type) > > DW_AT_sibling : <2df> > > DW_AT_name : Left > > DW_AT_byte_size : 12 > > DW_AT_decl_file : 1 > > DW_AT_decl_line : 2 > > DW_AT_containing_type: <22e> > > <2><23f>: Abbrev Number: 22 (DW_TAG_inheritance) > > DW_AT_type : <56> > > DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8; ) > > DW_AT_virtuality : 1 (virtual) > > DW_AT_accessibility: 1 (public) > > Yep. Since Base is a virtual base of Left, the DW_AT_data_member_location > here should be a complex expression telling the debugger to go through the > vtable. I'll get on it. > > I'll also change the stabs output to give the offset within the vtable > rather than the offset of the base in a complete object; gdb will still > need to be clever enough to know what to do with it. I should add: is there some way we can disambiguate correct and incorrect debug info after this fix? For Dwarf2 I see how to do it pretty easily. Would an explicit minus sign work? I think GDB won't croak on that. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer