public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* gcj and debugging
@ 2013-02-01 15:10 Michael Haupt
  2013-02-01 17:26 ` Andrew Haley
  2013-02-07 18:47 ` Tom Tromey
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Haupt @ 2013-02-01 15:10 UTC (permalink / raw)
  To: java

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-02-11 16:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-01 15:10 gcj and debugging Michael Haupt
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

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).