From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25083 invoked by alias); 20 Jan 2002 20:43:21 -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 25035 invoked from network); 20 Jan 2002 20:43:19 -0000 Received: from unknown (HELO bothner.com) (216.102.199.253) by sources.redhat.com with SMTP; 20 Jan 2002 20:43:19 -0000 Received: from bothner.com (eureka.bothner.com [192.168.1.9]) by bothner.com (8.11.6/8.11.6) with ESMTP id g0KKidM04097; Sun, 20 Jan 2002 12:44:39 -0800 Message-ID: <3C4B2C01.2070701@bothner.com> Date: Sun, 20 Jan 2002 12:43:00 -0000 From: Per Bothner User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7+) Gecko/20020111 X-Accept-Language: en-us MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com Subject: Re: patch to robustify gnuv3_rtti_type References: <3C49D9DF.4040700@bothner.com> <20020119183848.A32307@nevyn.them.org> <3C4A0C1F.6070903@bothner.com> <20020119192000.A1028@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg00595.txt.bz2 Daniel Jacobowitz wrote: > Go look at gnuv3_rtti_type again. It's misnamed; it does not use RTTI > at all. It only looks that the vtable exists and has a name demangled to > 'vtable for '. Yes. With my current patches (gcc and gdb), I get when debugging Java runtime (written in C++): (gdb) whatis source type = Class * (gdb) p *source can't find class named `java::lang::Class', as given by C++ RTTI That is actually an improvement. The problem at this point is inconsistent handling of namespaces bwteeen g++ and gcj. gcj emits a class named 'java.lang.Class' (including the periods), while g++ emits plain 'Class'. So gdb does not realize these are the same class. And neither g++ or gcj emits proper namespace information. I think this is one of the biggest stumbling-blocks to proper Java debugging. What is the current status of support for namepace-handling in gdb? If we fix gcj so it emits the same debug into as g++ (i.e. 'java.lang.Class' is emitted as plain 'Class'), can gdb "do the right thing" based on the mangled names? If not, can gdb handle dwarf2 namespace information (which g++ currently supresses)? -- --Per Bothner per@bothner.com http://www.bothner.com/per/