[cp-patches] RFC: 3 more JDWP events

Keith Seitz keiths at redhat.com
Fri Jun 9 20:04:29 UTC 2006


Kyle Galloway wrote:

A few nits, mainly typos and other frivolity.

> Index: gnu/classpath/jdwp/event/MethodEntryEvent.java
> ===================================================================
> RCS file: gnu/classpath/jdwp/event/MethodEntryEvent.java
> diff -N gnu/classpath/jdwp/event/MethodEntryEvent.java
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ gnu/classpath/jdwp/event/MethodEntryEvent.java	1 Jan 1970 00:00:00 -0000
> @@ -0,0 +1,113 @@
> +/* MethodEntryEvent.java -- n event specifying that a method has been invoked

typo

> +/**
> + * Notification from the VM that that a method has been invoked
> + * 
> + * @author Kyle Galloway (kgallowa at redhat.com)
> + */
> +public class MethodEntryEvent
> +    extends Event
> +{
> +  // The thread where the event occurred
> +  Thread _thread;
> +
> +  // the location where the event occurred
> +  Location _location;
> +
> +  //object instance
> +  Object _instance;

Should these be private?

> +  /**
> +   * Writes the event to the given stream
> +   * 
> +   * @param outStream the output stream to write the event to
> +   */
> +  protected void _writeData(DataOutputStream outStream) throws IOException

The "throws" thing again.

> Index: gnu/classpath/jdwp/event/MethodExitEvent.java
> ===================================================================
> RCS file: gnu/classpath/jdwp/event/MethodExitEvent.java
> diff -N gnu/classpath/jdwp/event/MethodExitEvent.java
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ gnu/classpath/jdwp/event/MethodExitEvent.java	1 Jan 1970 00:00:00 -0000
> @@ -0,0 +1,110 @@
> +/* MethodExitEvent.java -- n event specifying that a method has returned

Same typo :-)

> +/**
> + * Notification from the VM that that a method has returned
> + * 
> + * @author Kyle Galloway (kgallowa at redhat.com)
> + */
> +public class MethodExitEvent
> +    extends Event
> +{
> +  // The thread where the event occurred
> +  Thread _thread;
> +
> +  // the location where the event occurred
> +  Location _location;
> +
> +  // object instance
> +  Object _instance;

Same visibility question: private?


> +  /**
> +   * Writes the event to the given stream
> +   * 
> +   * @param outStream the output stream to write the event to
> +   */
> +  protected void _writeData(DataOutputStream outStream) throws IOException

:-)

> Index: gnu/classpath/jdwp/event/SingleStepEvent.java
> ===================================================================
> RCS file: gnu/classpath/jdwp/event/SingleStepEvent.java
> diff -N gnu/classpath/jdwp/event/SingleStepEvent.java
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ gnu/classpath/jdwp/event/SingleStepEvent.java	1 Jan 1970 00:00:00 -0000
> @@ -0,0 +1,113 @@
> +/**
> + * Notification from the VM that a single step has compleated including the
> + * thread and location stepped to
> + * 
> + * @author Kyle Galloway (kgallowa at redhat.com)
> + */
> +public class SingleStepEvent
> +    extends Event
> +{
> +  // the thread where the event occurred
> +  Thread _thread;
> +
> +  // the location where the event occurred
> +  Location _location;
> +
> +  //object instance
> +  Object _instance;

Visibility again...

> +  /**
> +   * Returns a specific filtering parameter for this event. Valid types are
> +   * thread and location
> +   * 
> +   * @param type the type of parameter desired
> +   * @returns the desired parameter or null
> +   */
> +  public Object getParameter(int type)
> +  {
> +    if (type == EVENT_THREAD)
> +      return _thread;
> +    else if (type == EVENT_LOCATION)
> +      return _location;
> +
> +    return null;
> +  }

Missing EVENT_INSTANCE? [Not that any debugger on the planet would ever 
use modifiers with a single step other than depth...]

> +  /**
> +   * Writes the event to the given stream
> +   * 
> +   * @param outStream the output stream to write the event to
> +   */
> +  protected void _writeData(DataOutputStream outStream) throws IOException

:-)

Otherwise, all looks good.

Keith



More information about the Classpath-patches mailing list