Binary Compatibility: debug info for compiled Java programs

Andrew Haley
Thu Jun 10 16:58:00 GMT 2004

Ian Lance Taylor writes:
 > Tom Tromey <> writes:
 > > The symbols in the otable (and actually I've been using shorthand
 > > here, we have a second "atable" for addresses as well -- same
 > > difference though) are resolved when the class ("Foo") is linked.  In
 > > Java this is done at runtime, the JVM Spec (and perhaps the JLS) has
 > > information on the precise steps involved in class preparation and
 > > initialization.
 > By the way, Tom and Andrew, I meant to ask, but I forgot: would it
 > make sense to build the numeric otables and atables for the common
 > case, and then recompute only when required?

That's possibly true, but you'd somehow have to discover that
something had changed, and I'm not sure how you'd do that without
doing the lookups.

 > I have to think that the common case is pretty darn common--I'm
 > sure people don't spend all their time loading classes into
 > different hierarchies.

What is very common is for people to distribute Java binaries without
specifying the exact versions of the classes they depend on.  So, it's
normal for the run-time library environment of a Java program to be
different from the compile-time environment.  The whole idea of binary
compatibility is to make this possible.


More information about the Gdb mailing list