public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Binary Compatibility: debug info for compiled Java programs
@ 2004-06-09 12:15 Andrew Haley
  2004-06-09 13:09 ` Daniel Jacobowitz
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Andrew Haley @ 2004-06-09 12:15 UTC (permalink / raw)
  To: java; +Cc: gdb

At the gcc summit last week, we were asked about how we're going to do
debug info for programs compiled with the BC ABI.  This is a problem:
as we don't know the layout of objects at compile time, we can't
generate the usual DWARF debugging type info.

I said that there were two front-running solutions: calling into
libgcj runtime routines that access the metadata, or generating DWARF
debugging type info at run time.  Andrew Cagney objects to calling
libgcj runtime routines, because then we won't be able to debug core
files.  Also, if the runtime library is hosed for some reason, we
won't be able to debug any structures.  This is a good point, and I
suppose it more or less kills the idea.

Bryce pointed out that there is another solution that he favours,
which involves gdb reading libgcj's metadata.

I reacted badly to this idea because I found it rather distasteful.
It seems to me that to do it this way is a case of pathological
coupling that I'd like to avoid.  However, it may well be the most
efficient solution because it doesn't involve doing any extra work at
runtime.

Bryce pointed out that there's already some precedent for this, in
that C++ debugging already does something similar.  He also thinks
that doing this is easier than generating DWARF in libgcj.  I'm not
sure about that, one way or the other.

Both solutions require gdb changes: to generate DWARF data at runtime
requires some changes because gdb is used to reading debug data from
object files, not from the inferior process.

So, I'm still unsure about how to proceed.  It looks like Bryce's
suggestion is preferable on efficiency grounds, although it might be
possible to generate DWARF cheaply while laying out classes.

Bryce, sorry if I've misstated your position.  This is based on my
best recollection.

Comments welcome...

Andrew.

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

end of thread, other threads:[~2004-06-11 15:17 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09 12:15 Binary Compatibility: debug info for compiled Java programs Andrew Haley
2004-06-09 13:09 ` Daniel Jacobowitz
2004-06-09 13:19   ` Andrew Haley
2004-06-09 13:29     ` Daniel Jacobowitz
2004-06-09 13:39       ` Andrew Haley
2004-06-09 22:17         ` Daniel Jacobowitz
2004-06-09 22:37           ` Tom Tromey
2004-06-10 16:37             ` Daniel Jacobowitz
2004-06-10 16:42               ` Tom Tromey
2004-06-10 16:47                 ` Ian Lance Taylor
2004-06-10 16:58                   ` Andrew Haley
2004-06-10 17:12                     ` Ian Lance Taylor
2004-06-10 17:25                       ` Andrew Haley
2004-06-10 16:44               ` Andrew Haley
2004-06-10 16:54                 ` Daniel Jacobowitz
2004-06-09 14:13 ` Per Bothner
2004-06-09 14:20   ` Andrew Haley
2004-06-09 20:46 ` Anthony Green
2004-06-09 21:26   ` Andrew Cagney
2004-06-09 22:11     ` Anthony Green
2004-06-11 13:04     ` Andrew Haley
2004-06-11 15:11       ` Andrew Cagney
2004-06-11 15:17         ` Andrew Haley

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