This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFA] Record types of method arguments when debugging
- From: Tom Tromey <tromey at redhat dot com>
- To: Kyle Galloway <kgallowa at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 03 Mar 2007 09:36:52 -0700
- Subject: Re: [RFA] Record types of method arguments when debugging
- References: <45DF4C11.7000500@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "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