public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Haupt <michael.haupt@oracle.com>
To: java@gcc.gnu.org
Subject: gcj and debugging
Date: Fri, 01 Feb 2013 15:10:00 -0000	[thread overview]
Message-ID: <F7594FCE-9739-4E9B-AD85-1C8C2B380CED@oracle.com> (raw)

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 about Java array objects is not given. In libgcj's array.h, there are two classes, __JArray and JArray<T> (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. 

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 nowhere 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, string?

BTW I have read a thread on this mailing list from June 2004 (http://gcc.gnu.org/ml/java/2004-06/msg00065.html), which touches upon the subject but does not really address my question.

Thanks,

Michael

-- 
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, Germany

             reply	other threads:[~2013-02-01 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 15:10 Michael Haupt [this message]
2013-02-01 17:26 ` Andrew Haley
2013-02-07 18:47 ` Tom Tromey
2013-02-09  0:38   ` David Daney
2013-02-11 16:26   ` Michael Haupt
2013-02-11 16:32     ` Andrew Haley
2013-02-11 16:47       ` Michael Haupt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F7594FCE-9739-4E9B-AD85-1C8C2B380CED@oracle.com \
    --to=michael.haupt@oracle.com \
    --cc=java@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).