From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12986 invoked by alias); 1 Feb 2013 15:10:24 -0000 Received: (qmail 12973 invoked by uid 22791); 1 Feb 2013 15:10:21 -0000 X-SWARE-Spam-Status: No, hits=1.2 required=5.0 tests=AWL,BAYES_40,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,TW_GC,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Feb 2013 15:10:16 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r11FAFgx018089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 1 Feb 2013 15:10:16 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r11FAFMc005587 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 1 Feb 2013 15:10:15 GMT Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r11FAEhu001044 for ; Fri, 1 Feb 2013 09:10:14 -0600 Resent-Message-Id: <201302011510.r11FAEhu001044@acsmt356.oracle.com> Received: from dhcp-potsdam-10-165-122-246.de.oracle.com (/10.165.122.246) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 01 Feb 2013 07:10:14 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: gcj and debugging From: Michael Haupt Resent-From: Michael Haupt Date: Fri, 01 Feb 2013 15:10:00 -0000 Content-Transfer-Encoding: quoted-printable Resent-Date: Fri, 1 Feb 2013 16:11:52 +0100 Resent-To: "java@gcc.gnu.org" Message-Id: To: java@gcc.gnu.org X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg00000.txt.bz2 Hello, in a research project, I'm generating DWARF debugging info for machine code= generated from Java. I looked at some of the DWARF debug info generated by= gcj (including that contained in libgcj.so). Some things I could not figure out. Java arrays are all merely declared in the DWARF; structural information ab= out Java array objects is not given. In libgcj's array.h, there are two cla= sses, __JArray and JArray (inheriting from __Jarray), that hold a length= field and, in addition, a T* array[0]. The debug info for libgcj does not contain any structural information about= these two classes.=20 How does gdb determine that there is a length field, and how many elements = there are if the length is assigned dynamically? I reckon the latter can be= done by describing the length as a DWARF exprloc, but the description is n= owhere to be found. How does the DWARF description of a Java array look? Is this generated at run-time somehow? Do gcj-generated binaries and gdb interact in some other ways than through = DWARF when it comes to meta-info exchange? Likewise, how does gdb know how to display a java.lang.String as a, well, s= tring? BTW I have read a thread on this mailing list from June 2004 (http://gcc.gn= u.org/ml/java/2004-06/msg00065.html), which touches upon the subject but do= es not really address my question. Thanks, Michael --=20 Dr. Michael Haupt Principal Member of Technical Staff Phone: +49 331 200 7277, Fax: +49 331 200 7561 Oracle Labs Oracle Deutschland B.V. & Co. KG, Schiffbauergasse 14, 14467 Potsdam, Germa= ny