[RFA] Remap variable table entries
Keith Seitz
keiths@redhat.com
Sat Jun 9 17:32:00 GMT 2007
Hi,
For some time now I've been noticing a discrepancy between variables
that should be in scope and when Eclipse actually displays them in
scope. Very, very irritating.
Turns out that we were blindly using the bytecode offsets from the debug
info without ever taking into consideration that we were compiling the
methods. As a result, the variable tables never were quite right...
The attached patch fixes this by converting the variable table entries
when the method is compiled. I've also reworked _Jv_VarLineTableEntry to
be more like _Jv_LineTableEntry, with the union for the bytecode pc and
the direct-threaded pc.
QCC?
Keith
ChangeLog
2007-06-08 Keith Seitz <keiths@redhat.com>
* include/java-interp.h (_Jv_LocalVarTableEntry): Add union
for bytecode_pc and direct-threaded pc.
Add field descriptions inline.
* defineclass.cc (read_one_code_attribute): Change from
bytecode_start_pc to bytecode_pc.
Remove unused variable "len".
* interpret.cc (compile): Remap the variable table, too.
(get_local_var_table) [DIRECT_THREADED]: Use insn_index on the
start location to map from pc_t to code index.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: var-table-reloc.patch
Type: text/x-patch
Size: 3538 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070609/fd5a8ccd/attachment.bin>
More information about the Java-patches
mailing list