[RFA/JVMTI] Implement GetLocalVariableTable and GetMaxLocals

Tom Tromey tromey@redhat.com
Wed Feb 14 23:47:00 GMT 2007


>>>>> "Kyle" == Kyle Galloway <kgallowa@redhat.com> writes:

Kyle> So, what I have done is to change things a bit.  get_local_var_table
Kyle> now just sets the pointers to point to the strings stored in
Kyle> _Jv_InterpMethod.  in the JVMTI call, we allocate buffers of the
Kyle> correct size, then strcpy the strings over into the JVMTI structure.
Kyle> I think this addresses all the concers.

Kyle> Any other issues?

You are very, very close.

Kyle> +      _Jv_LocalVarTableEntry *table 
Kyle> +        = reinterpret_cast<_Jv_LocalVarTableEntry *>
Kyle> +            (_Jv_AllocBytes (table_len * sizeof (_Jv_LocalVarTableEntry)));

This needs to use _Jv_AllocRawObj instead of _Jv_AllocBytes.
Otherwise, the strings you create here will not be seen by the GC.

Ok with that change.  Thanks for persevering.

Tom



More information about the Java-patches mailing list