From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15118 invoked by alias); 9 Sep 2008 21:18:53 -0000 Received: (qmail 15108 invoked by uid 22791); 9 Sep 2008 21:18:53 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Sep 2008 21:18:16 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m89LHdYw021688 for ; Tue, 9 Sep 2008 17:17:59 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m89LHRE5023592 for ; Tue, 9 Sep 2008 17:17:28 -0400 Received: from opsy.redhat.com (vpn-10-113.bos.redhat.com [10.16.10.113]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m89LHQlW011909; Tue, 9 Sep 2008 17:17:27 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id A2DC637827D; Tue, 9 Sep 2008 15:17:52 -0600 (MDT) To: Keith Seitz Cc: gdb@sourceware.org Subject: Re: Some java questions References: <48C6D1DF.3060705@redhat.com> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Tue, 09 Sep 2008 21:18:00 -0000 In-Reply-To: <48C6D1DF.3060705@redhat.com> (Keith Seitz's message of "Tue\, 09 Sep 2008 12\:43\:27 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00056.txt.bz2 >>>>> "Keith" == Keith Seitz writes: Keith> But that's not my real concern. What puzzles me is this second Keith> function "jmisc.main(java.lang.String[])void". What the heck is that, Keith> cause it isn't java. It looks to me like some partially demangled java Keith> method signature (which is still not valid input to a java compiler). To support Java 1.5, we had to add return types to name mangling. These are needed due to covariant return types. What you are seeing here is just how the demangler chooses to print this information. E.g., when I 'nm --demangle=java' a simple java program, I see: 0804891e T h.main(java.lang.String[])void U java.lang.Object.toString()java.lang.String [etc] Keith> At long last, my question is: Is gdb supposed to be able to do Keith> something with "jmisc.main(java.lang.String[])void", i.e. is it Keith> considered valid "input" to break, print, and other commands? FYI -- nobody really maintains the gcj support in gdb. It would be nice to be able to break on a method that can only be differentiated by its return type. Normally, though, I think only one of the methods like this really matters -- the rest are just bridge methods and probably not interesting. It might be tricky for gdb to sort this out though. Tom