package gnu.classpath.jdwp;
import gnu.classpath.jdwp.event.EventRequest;
+import gnu.classpath.jdwp.exception.JdwpException;
import gnu.classpath.jdwp.exception.InvalidClassException;
import gnu.classpath.jdwp.exception.InvalidObjectException;
import gnu.classpath.jdwp.id.ObjectId;
*
* @param thread the thread to suspend
*/
- public static native void suspendThread (Thread thread);
+ public static native void suspendThread (Thread thread)
+ throws JdwpException;
/**
* Suspend all threads
*/
public static void suspendAllThreads ()
+ throws JdwpException
{
// Our JDWP thread group -- don't suspend any of those threads
Thread current = Thread.currentThread ();
*
* @param thread the thread to resume
*/
- public static native void resumeThread (Thread thread);
+ public static native void resumeThread (Thread thread)
+ throws JdwpException;
/**
* Resume all threads. This simply decrements the thread's
* to run.
*/
public static void resumeAllThreads ()
+ throws JdwpException
{
// Our JDWP thread group -- don't resume
Thread current = Thread.currentThread ();
* @param thread the thread whose suspend count is desired
* @return the number of times the thread has been suspended
*/
- public static native int getSuspendCount (Thread thread);
+ public static native int getSuspendCount (Thread thread)
+ throws JdwpException;
/**
* Returns a count of the number of loaded classes in the VM
*/
- public static native int getAllLoadedClassesCount ();
+ public static native int getAllLoadedClassesCount ()
+ throws JdwpException;
/**
* Returns an iterator over all the loaded classes in the VM
*/
- public static native Iterator getAllLoadedClasses ();
+ public static native Iterator getAllLoadedClasses ()
+ throws JdwpException;
/**
* Returns the status of the given class
* @return a flag containing the class's status
* @see JdwpConstants.ClassStatus
*/
- public static native int getClassStatus (Class clazz);
+ public static native int getClassStatus (Class clazz)
+ throws JdwpException;
/**
* @return a list of frames
*/
public static native ArrayList getFrames (Thread thread, int strart,
- int length);
+ int length)
+ throws JdwpException;
/**
* Returns the frame for a given thread with the frame ID in
* @param bb buffer containing the frame's ID
* @return the desired frame
*/
- public static native VMFrame getFrame (Thread thread, ByteBuffer bb);
+ public static native VMFrame getFrame (Thread thread, ByteBuffer bb)
+ throws JdwpException;
/**
* Returns the number of frames in the thread's stack
* @param thread the thread for which to get a frame count
* @return the number of frames in the thread's stack
*/
- public static native int getFrameCount (Thread thread);
+ public static native int getFrameCount (Thread thread)
+ throws JdwpException;
/**
* @return integer status of the thread
* @see JdwpConstants.ThreadStatus
*/
- public static native int getThreadStatus (Thread thread);
+ public static native int getThreadStatus (Thread thread)
+ throws JdwpException;
/**
* Returns a list of all classes which this class loader has been
* @param cl the class loader
* @return a list of all visible classes
*/
- public static native ArrayList getLoadRequests (ClassLoader cl);
+ public static native ArrayList getLoadRequests (ClassLoader cl)
+ throws JdwpException;
/**
* Executes a method in the virtual machine
public static native MethodResult executeMethod (Object obj, Thread thread,
Class clazz, Method method,
Object[] values,
- boolean nonVirtual);
+ boolean nonVirtual)
+ throws JdwpException;
/**
* "Returns variable information for the method. The variable table
* @param method the method for which variable information is desired
* @return a result object containing the information
*/
- public static native VariableTable getVarTable (Class clazz, Method method);
+ public static native VariableTable getVarTable (Class clazz, Method method)
+ throws JdwpException;
/**
* "Returns line number information for the method, if present. The line
* @param method the method whose line table is desired
* @return a result object containing the line table
*/
- public static native LineTable getLineTable (Class clazz, Method method);
+ public static native LineTable getLineTable (Class clazz, Method method)
+ throws JdwpException;
/**
* "Returns the name of source file in which a reference type was declared"
* @return a string containing the source file name; "no path information
* for the file is included"
*/
- public static native String getSourceFile (Class clazz);
+ public static native String getSourceFile (Class clazz)
+ throws JdwpException;
/**
* Register a request from the debugger
* or do some internal work to set up the event notification (useful for
* execution-related events like breakpoints, single-stepping, etc.).
*/
- public static native void registerEvent (EventRequest request);
+ public static native void registerEvent (EventRequest request)
+ throws JdwpException;
/**
* Unregisters the given request
*
* @param request the request to unregister
*/
- public static native void unregisterEvent (EventRequest request);
+ public static native void unregisterEvent (EventRequest request)
+ throws JdwpException;
/**
*
* @param kind the type of events to clear
*/
- public static native void clearEvents (byte kind);
+ public static native void clearEvents (byte kind)
+ throws JdwpException;
}