[RFA] Step & Breakpoint co-located events

Keith Seitz keiths@redhat.com
Wed May 16 17:49:00 GMT 2007


Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
> There's a small bug in here...
> 
> Keith> +  _event_list = new ::java::util::ArrayList ();
>  
> Keith> +      JArray<Event *> *events
> Keith> +	= (JArray<Event *> *) VMVirtualMachine::_event_list->toArray ();
> 
> toArray always returns an Object[].
> If you want an Event[] you have to use the toArray(Object[]) form.

I've fixed that, and I've rewritten the notification in that function a 
bit. It now always adds the breakpoint event to the list, converts to an 
array, and calls Jdwp.notify(Event[]). It doesn't really seem to save us 
much for an additional code path. [Okay, it's still a malloc and a copy, 
but this is really non-critical code anyway.]

Patch for that is attached. Look better?

Keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: toarray.patch
Type: text/x-patch
Size: 1236 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070516/ba1dcaa1/attachment.bin>


More information about the Java-patches mailing list