From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27021 invoked by alias); 9 Sep 2008 19:44:54 -0000 Received: (qmail 27009 invoked by uid 22791); 9 Sep 2008 19:44: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 19:44:18 +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 m89JhfMK001077 for ; Tue, 9 Sep 2008 15:44:02 -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 m89JhUfN013511 for ; Tue, 9 Sep 2008 15:43:30 -0400 Received: from lindt.uglyboxes.com (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m89JhRQU000527 for ; Tue, 9 Sep 2008 15:43:29 -0400 Message-ID: <48C6D1DF.3060705@redhat.com> Date: Tue, 09 Sep 2008 19:44:00 -0000 From: Keith Seitz User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Some java questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00055.txt.bz2 Hi, I've been mucking with Daniel's DWARF2 "full names" patch, and a number issues with java and the gdb.java/jmisc.exp and gdb.java/jprint.exp tests have appeared. Both of these test cases have the following comment: # Ref PR gdb:java/1565. Don't use the simpler "break jmisc.main". # As of 2004-02-24 it wasn't working and is being tested separatly. # Before GCJ 4.1 (approximately) the demangled name did not include # a method signature; after that point it does include a trailing # signature. In the case of jmisc,exp, the test suite attempts to set breakpoints on "'jmisc.main(java.lang.String[])'" and "'jmisc.main(java.lang.String[])void'", working around the gcc bug (similar in jprint.exp). IMO, this is a very dangerous precedent. Bugs in the toolchain should not be worked around like this. They should be xfailed or (in this case), breaks at the correct "jmisc.main" should have been left in as well. IMO this bug should be closed/not-a-bug, and jmisc/jprint.exp should be "fixed". [There are several ways this could be done. The simplest is to simply break at "jmisc.main" as it should. Maybe add "jmisc.main(java.lang.String[])" as a back-up. If someone recommends a course of action, I would be happy to follow it up.] But that's not my real concern. What puzzles me is this second function "jmisc.main(java.lang.String[])void". What the heck is that, 'cause it isn't java. It looks to me like some partially demangled java method signature (which is still not valid input to a java compiler). I also note this in "info func": (gdb) info func jmisc All functions matching regular expression "jmisc": File /tmp/ccozBSfv.jar: void jmisc.jmisc(); void jmisc.main(java.lang.String[])void; Now maybe my java is really rusty after two months, but I'm pretty sure "void jmisc.main(java.lang.String[])void;" is not a valid method declaration. What's puzzling about all of this is that the gcc/gdb versions which java/1565 affect actually show something sane: (old-gdb) info func jmisc All functions matching regular expression "jmisc": File jmisc.java: void jmisc.jmisc(); void jmisc.main(java.lang.String[]); While it is true that one cannot "break jmisc.main" on those "broken" versions, one can simply do "break jmisc.main(java.lang.String[])". Any attempt to tack on the "void" either results in a "junk at end of argument list" error (without surrounding ') or a "make pending breakpoint?" query (with surrounding ' -- breakpoint never gets hit). At long last, my question is: Is gdb supposed to be able to do something with "jmisc.main(java.lang.String[])void", i.e. is it considered valid "input" to break, print, and other commands? Keith