This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Re: [RFA] Record types of method arguments when debugging


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

Kyle> This patch add a change to the DEBUG interpreter to record the types
Kyle> of the method arguments so their slots appear valid when accessing
Kyle> local variables.  Since method arguments occupy slots from the
Kyle> beginning of a method call and are rarely written to, it is necessary
Kyle> to set their type flags at method invocation.  This fixes a problem
Kyle> when accessing local variables from JVMTI where slots occupied by
Kyle> method arguments would appear invalid.

Kyle> Questions/Comments?

Looks pretty good, a couple nits though.

Kyle> +  for (int i = 0; signature[i] != ')' && i <= sig_len; i++)

signature[0] is '('.  So you should probably start with i = 1.
Maybe this affects some earlier patch as well?  I forget.

Kyle> +      else if (signature[i] == 'F')
Kyle> +        {
Kyle> +          frame_desc.locals_type[type_ctr] = 'f';

In retrospect it is sort of funny not to re-use signature characters
verbatim in the locals_type array.

Kyle> +          frame_desc.locals_type[type_ctr+1] = 'x';

Spaces around the '+'.  This occurs in a couple places.

Tom


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