From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25136 invoked by alias); 6 May 2002 23:07: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 25129 invoked from network); 6 May 2002 23:07:33 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 6 May 2002 23:07:33 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 174rZt-0006Wb-00 for ; Mon, 06 May 2002 19:07:33 -0400 Date: Mon, 06 May 2002 16:07:00 -0000 From: Daniel Jacobowitz To: Gdb List Subject: Re: question about method naming Message-ID: <20020506230733.GA25065@nevyn.them.org> Mail-Followup-To: Gdb List References: <87u1pl6u33.fsf@creche.redhat.com> <20020506193356.GA25574@nevyn.them.org> <87adrc6frc.fsf@creche.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87adrc6frc.fsf@creche.redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-05/txt/msg00047.txt.bz2 On Mon, May 06, 2002 at 05:03:19PM -0600, Tom Tromey wrote: > >>>>> "Daniel" == Daniel Jacobowitz writes: > > Tom> If I type: > Tom> b x.main > Tom> gdb tells me that there is no such method. > > Daniel> Are you working on a very current gcj? I.E. one that defaults > Daniel> to DWARF-2 output? I observe the same thing in 3.0.4 with > Daniel> -gdwarf-2, but not with -gstabs+. > > Yes. I'm using the trunk cvs gcj. > > Daniel> In this version, the stabs debug info claims that 'class x' > Daniel> has a member function 'main'. In DWARF-2 it claims that > Daniel> 'class x' has a member function 'x.main(java.lang.String[])'. > Daniel> If this is still the case in your compiler (check readelf -w > Daniel> output, search for a DW_TAG_subprogram whose name contains > Daniel> main) then I believe it is a gcj bug. > > Ok. What is the correct output? `main(java.lang.String[])'? No, `main'. The type should not be there at all. Breaking on `x.main(java.lang.String[])' or something similar should still work, because the mangled name is in scope... > I wonder if this was done because of the lack of namespace support in > gdb? In this case that would be strange (`x' is a class, not a > namespace). This is something I'll note in the bug report. That may be why. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer