From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29681 invoked by alias); 5 Dec 2003 17:38:53 -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 29673 invoked from network); 5 Dec 2003 17:38:53 -0000 Received: from unknown (HELO hawaii.kealia.com) (209.3.10.89) by sources.redhat.com with SMTP; 5 Dec 2003 17:38:53 -0000 Received: by hawaii.kealia.com (Postfix, from userid 2049) id 8B125C6AC; Fri, 5 Dec 2003 09:38:52 -0800 (PST) To: gdb-patches@sources.redhat.com Subject: Re: [rfa/c++] cp_lookup_rtti_type, take 2 References: <20031205042237.56AFD4B35C@berman.michael-chastain.com> <20031205171658.GB27834@nevyn.them.org> From: David Carlton Date: Fri, 05 Dec 2003 17:38:00 -0000 In-Reply-To: <20031205171658.GB27834@nevyn.them.org> (Daniel Jacobowitz's message of "Fri, 5 Dec 2003 12:16:58 -0500") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00215.txt.bz2 On Fri, 5 Dec 2003 12:16:58 -0500, Daniel Jacobowitz said: > How do you suggest we do it? Some new addition to the debug info? I > don't believe we have anything at the moment that fills this need. Hmm. I thought I'd seen something appropriate in the debug info, but now I realize that I was looking for the slot for the vtable in the class, which is a quite different matter. Well, here's what I see when looking for a vtable symbol in a sample file: .uleb128 0x1d # (DIE (0x20d) DW_TAG_variable) .long .LC9 # DW_AT_name: "_ZTI1C" .long 0x21e # DW_AT_type .byte 0x1 # DW_AT_external .byte 0x1 # DW_AT_artificial .byte 0x5 # DW_AT_location .byte 0x3 # DW_OP_addr .long _ZTI1C So DW_TAG_variable + DW_AT_artificial is a start - looking for that (plus perhaps guiltily peeking at the demanged name just to make sure it starts with 'typeinfo') lets us find the vtable symbols. But that doesn't help - the DW_AT_type doesn't actually lead us to the type that it's the vtable for, and certainly none of the other attributes are going to help. Sigh. David Carlton carlton@kealia.com