This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Java field offsets [was; GCC 4.0 RC2 Available]


Andrew Haley wrote:
However, these fields are real, and they are used, but we shouldn't
output any debug info for them.

Does Dwarf support "computed field offsets"? (This might be needed for Ada, to.) If so, the Right Thing might be to emit DIEs so gdb can calculate the field offsets, mimicing the normal "indirect dispatch".

Not to say this is worth doing, even if possible. It would probably
be a lot of work to have gdb understand computed offsets, and unless
it is needed for something else, it's not worth it for Java.

That is because we want a solution that also works for dynamically
loaded interpreted classes, and the solution is to get the offsets
from the run-time data structures, rather than the debug information.
There is some partially-bit-rotted code in gdb to extract type
information from run-time Class information, but it was fragile
because it didn't fit well with gdb's obstack-based memory management.
The situation might be different now.

OTOH, just like we now use Dwarf2 unwind-info for exception handling,
perhaps we could use Dwarf debug information for reflection information.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]