aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2006-08-04 20:34:02 +0000
committerKeith Seitz <kseitz@gcc.gnu.org>2006-08-04 20:34:02 +0000
commit27d8ff9b8349ec64ebeeb7ccc6c4516580bf3a81 (patch)
tree6eb4caac232c45b7f3bfb8d655d8ded27ab7c1f5 /libjava
parentcc011e7f12afb47a0487e9645bc125681b8b136f (diff)
downloadgcc-27d8ff9b8349ec64ebeeb7ccc6c4516580bf3a81.zip
gcc-27d8ff9b8349ec64ebeeb7ccc6c4516580bf3a81.tar.gz
gcc-27d8ff9b8349ec64ebeeb7ccc6c4516580bf3a81.tar.bz2
VMFrame.java: Update to Classpath 0.91.
* gnu/classpath/jdwp/VMFrame.java: Update to Classpath 0.91. * gnu/classpath/jdwp/VMIdManager.java: Likewise. * gnu/classpath/jdwp/VMMethod.java: Likewise. * gnu/classpath/jdwp/VMVirtualMachine: Likewise. * gnu/classpath/jdwp/natVMFrame.java: New file. * gnu/classpath/jdwp/natVMMethod.java: New file. * gnu/classpath/jdwp/natVMVirtualMachine.java: New file. * Makefile.am (nat_source_files): Add new filles. * Makefile.in: Regenerated. From-SVN: r115934
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog12
-rw-r--r--libjava/Makefile.am3
-rw-r--r--libjava/Makefile.in43
-rw-r--r--libjava/gnu/classpath/jdwp/VMFrame.java4
-rw-r--r--libjava/gnu/classpath/jdwp/VMIdManager.java16
-rw-r--r--libjava/gnu/classpath/jdwp/VMMethod.java14
-rw-r--r--libjava/gnu/classpath/jdwp/VMVirtualMachine.java65
-rw-r--r--libjava/gnu/classpath/jdwp/natVMFrame.cc26
-rw-r--r--libjava/gnu/classpath/jdwp/natVMMethod.cc47
-rw-r--r--libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc240
10 files changed, 419 insertions, 51 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 8b10aab..485aa7f 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,15 @@
+2006-08-01 Keith Seitz <keiths@redhat.com>
+
+ * gnu/classpath/jdwp/VMFrame.java: Update to Classpath 0.91.
+ * gnu/classpath/jdwp/VMIdManager.java: Likewise.
+ * gnu/classpath/jdwp/VMMethod.java: Likewise.
+ * gnu/classpath/jdwp/VMVirtualMachine: Likewise.
+ * gnu/classpath/jdwp/natVMFrame.java: New file.
+ * gnu/classpath/jdwp/natVMMethod.java: New file.
+ * gnu/classpath/jdwp/natVMVirtualMachine.java: New file.
+ * Makefile.am (nat_source_files): Add new filles.
+ * Makefile.in: Regenerated.
+
2006-08-03 Tom Tromey <tromey@redhat.com>
* jvmti.cc (REQUIRE_PHASE): New macro.
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index 54ab516..bf9f7a0 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -771,6 +771,9 @@ gkeytool_DEPENDENCIES = libgcj-tools.la
## This lists all the C++ source files in subdirectories.
nat_source_files = \
gnu/classpath/natSystemProperties.cc \
+gnu/classpath/jdwp/natVMFrame.cc \
+gnu/classpath/jdwp/natVMMethod.cc \
+gnu/classpath/jdwp/natVMVirtualMachine.cc \
gnu/gcj/natCore.cc \
gnu/gcj/convert/JIS0208_to_Unicode.cc \
gnu/gcj/convert/JIS0212_to_Unicode.cc \
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index 06831cd..57649f0 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -252,7 +252,10 @@ am__DEPENDENCIES_4 =
am__libgcj_la_SOURCES_DIST = prims.cc jni.cc jvmti.cc exception.cc \
stacktrace.cc link.cc defineclass.cc interpret.cc verify.cc \
java/lang/Class.java java/lang/Object.java \
- gnu/classpath/natSystemProperties.cc gnu/gcj/natCore.cc \
+ gnu/classpath/natSystemProperties.cc \
+ gnu/classpath/jdwp/natVMFrame.cc \
+ gnu/classpath/jdwp/natVMMethod.cc \
+ gnu/classpath/jdwp/natVMVirtualMachine.cc gnu/gcj/natCore.cc \
gnu/gcj/convert/JIS0208_to_Unicode.cc \
gnu/gcj/convert/JIS0212_to_Unicode.cc \
gnu/gcj/convert/Unicode_to_JIS.cc gnu/gcj/convert/natIconv.cc \
@@ -295,7 +298,10 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc jvmti.cc exception.cc \
boehm.cc nogc.cc posix.cc win32.cc darwin.cc posix-threads.cc \
win32-threads.cc no-threads.cc
am__objects_2 = gnu/classpath/natSystemProperties.lo \
- gnu/gcj/natCore.lo gnu/gcj/convert/JIS0208_to_Unicode.lo \
+ gnu/classpath/jdwp/natVMFrame.lo \
+ gnu/classpath/jdwp/natVMMethod.lo \
+ gnu/classpath/jdwp/natVMVirtualMachine.lo gnu/gcj/natCore.lo \
+ gnu/gcj/convert/JIS0208_to_Unicode.lo \
gnu/gcj/convert/JIS0212_to_Unicode.lo \
gnu/gcj/convert/Unicode_to_JIS.lo gnu/gcj/convert/natIconv.lo \
gnu/gcj/convert/natInput_EUCJIS.lo \
@@ -618,7 +624,6 @@ bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
-build_libsubdir = @build_libsubdir@
build_os = @build_os@
build_subdir = @build_subdir@
build_vendor = @build_vendor@
@@ -7085,6 +7090,9 @@ gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
gkeytool_DEPENDENCIES = libgcj-tools.la
nat_source_files = \
gnu/classpath/natSystemProperties.cc \
+gnu/classpath/jdwp/natVMFrame.cc \
+gnu/classpath/jdwp/natVMMethod.cc \
+gnu/classpath/jdwp/natVMVirtualMachine.cc \
gnu/gcj/natCore.cc \
gnu/gcj/convert/JIS0208_to_Unicode.cc \
gnu/gcj/convert/JIS0212_to_Unicode.cc \
@@ -7417,6 +7425,19 @@ gnu/classpath/$(DEPDIR)/$(am__dirstamp):
@: > gnu/classpath/$(DEPDIR)/$(am__dirstamp)
gnu/classpath/natSystemProperties.lo: gnu/classpath/$(am__dirstamp) \
gnu/classpath/$(DEPDIR)/$(am__dirstamp)
+gnu/classpath/jdwp/$(am__dirstamp):
+ @$(mkdir_p) gnu/classpath/jdwp
+ @: > gnu/classpath/jdwp/$(am__dirstamp)
+gnu/classpath/jdwp/$(DEPDIR)/$(am__dirstamp):
+ @$(mkdir_p) gnu/classpath/jdwp/$(DEPDIR)
+ @: > gnu/classpath/jdwp/$(DEPDIR)/$(am__dirstamp)
+gnu/classpath/jdwp/natVMFrame.lo: gnu/classpath/jdwp/$(am__dirstamp) \
+ gnu/classpath/jdwp/$(DEPDIR)/$(am__dirstamp)
+gnu/classpath/jdwp/natVMMethod.lo: gnu/classpath/jdwp/$(am__dirstamp) \
+ gnu/classpath/jdwp/$(DEPDIR)/$(am__dirstamp)
+gnu/classpath/jdwp/natVMVirtualMachine.lo: \
+ gnu/classpath/jdwp/$(am__dirstamp) \
+ gnu/classpath/jdwp/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/$(am__dirstamp):
@$(mkdir_p) gnu/gcj
@: > gnu/gcj/$(am__dirstamp)
@@ -7781,6 +7802,12 @@ mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f classpath/tools/libgcj_tools_la-tools.$(OBJEXT)
-rm -f classpath/tools/libgcj_tools_la-tools.lo
+ -rm -f gnu/classpath/jdwp/natVMFrame.$(OBJEXT)
+ -rm -f gnu/classpath/jdwp/natVMFrame.lo
+ -rm -f gnu/classpath/jdwp/natVMMethod.$(OBJEXT)
+ -rm -f gnu/classpath/jdwp/natVMMethod.lo
+ -rm -f gnu/classpath/jdwp/natVMVirtualMachine.$(OBJEXT)
+ -rm -f gnu/classpath/jdwp/natVMVirtualMachine.lo
-rm -f gnu/classpath/natSystemProperties.$(OBJEXT)
-rm -f gnu/classpath/natSystemProperties.lo
-rm -f gnu/gcj/convert/JIS0208_to_Unicode.$(OBJEXT)
@@ -7976,6 +8003,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@classpath/tools/$(DEPDIR)/libgcj_tools_la-tools.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/classpath/$(DEPDIR)/natSystemProperties.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/classpath/jdwp/$(DEPDIR)/natVMFrame.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/classpath/jdwp/$(DEPDIR)/natVMMethod.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/classpath/jdwp/$(DEPDIR)/natVMVirtualMachine.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/$(DEPDIR)/natCore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/JIS0208_to_Unicode.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/JIS0212_to_Unicode.Plo@am__quote@
@@ -8313,6 +8343,7 @@ clean-libtool:
-rm -rf .libs _libs
-rm -rf classpath/tools/.libs classpath/tools/_libs
-rm -rf gnu/classpath/.libs gnu/classpath/_libs
+ -rm -rf gnu/classpath/jdwp/.libs gnu/classpath/jdwp/_libs
-rm -rf gnu/gcj/.libs gnu/gcj/_libs
-rm -rf gnu/gcj/convert/.libs gnu/gcj/convert/_libs
-rm -rf gnu/gcj/io/.libs gnu/gcj/io/_libs
@@ -8716,6 +8747,8 @@ distclean-generic:
-rm -f classpath/tools/$(am__dirstamp)
-rm -f gnu/classpath/$(DEPDIR)/$(am__dirstamp)
-rm -f gnu/classpath/$(am__dirstamp)
+ -rm -f gnu/classpath/jdwp/$(DEPDIR)/$(am__dirstamp)
+ -rm -f gnu/classpath/jdwp/$(am__dirstamp)
-rm -f gnu/gcj/$(DEPDIR)/$(am__dirstamp)
-rm -f gnu/gcj/$(am__dirstamp)
-rm -f gnu/gcj/convert/$(DEPDIR)/$(am__dirstamp)
@@ -8777,7 +8810,7 @@ clean-am: clean-binPROGRAMS clean-dbexecLTLIBRARIES clean-generic \
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf ./$(DEPDIR) classpath/tools/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/security/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) classpath/tools/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/classpath/jdwp/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/security/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-local distclean-tags
@@ -8808,7 +8841,7 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf ./$(DEPDIR) classpath/tools/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/security/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) classpath/tools/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/classpath/jdwp/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/security/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/zip/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/libjava/gnu/classpath/jdwp/VMFrame.java b/libjava/gnu/classpath/jdwp/VMFrame.java
index 840ca09..cd21302 100644
--- a/libjava/gnu/classpath/jdwp/VMFrame.java
+++ b/libjava/gnu/classpath/jdwp/VMFrame.java
@@ -76,14 +76,14 @@ public class VMFrame
*
* @param slot the slot containing the variable
*/
- public Object getValue(int slot) { return null; }
+ public native Object getValue(int slot);
/**
* Assigns the given variable to the given value.
* @param slot The slot which contains the variable
* @param value The value to assign the variable to
*/
- public void setValue(int slot, Object value) { }
+ public native void setValue(int slot, Object value);
/**
* Get the object which is represented by 'this' in the context of the frame,
diff --git a/libjava/gnu/classpath/jdwp/VMIdManager.java b/libjava/gnu/classpath/jdwp/VMIdManager.java
index 23cbb7b..8d423e9 100644
--- a/libjava/gnu/classpath/jdwp/VMIdManager.java
+++ b/libjava/gnu/classpath/jdwp/VMIdManager.java
@@ -1,7 +1,7 @@
/* VMIdManager.java -- A reference/example implementation of a manager for
JDWP object/reference type IDs
- Copyright (C) 2005 Free Software Foundation
+ Copyright (C) 2005, 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -48,11 +48,9 @@ import gnu.classpath.jdwp.id.*;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.SoftReference;
-import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Hashtable;
-import java.util.Iterator;
/**
* This class manages objects and referencetypes that are reported
@@ -76,6 +74,10 @@ import java.util.Iterator;
* <b>NOTE:</b> All IDs handled by the ID manager (all object and reference
* type IDs) are assumed to be of type <code>long</code>.
*
+ * <b>NOTE:</b> This class does not manage virtual machine-specific types,
+ * like methods, fields, and frames. These already have unique IDs within
+ * the virtual machine and do not need further abstraction here.
+ *
* @author Keith Seitz (keiths@redhat.com)
*/
public class VMIdManager
@@ -99,9 +101,6 @@ public class VMIdManager
// ObjectId and ArrayId are special cases. See newObjectId.
_idList.put (ClassLoaderId.typeClass, ClassLoaderId.class);
_idList.put (ClassObjectId.typeClass, ClassObjectId.class);
- //_idList.put (FieldId.typeClass, FieldId.class);
- //_idList.put (FrameId.typeClass, FrameId.class);
- //_idList.put (MethodId.typeClass, MethodId.class);
_idList.put (StringId.typeClass, StringId.class);
_idList.put (ThreadId.typeClass, ThreadId.class);
_idList.put (ThreadGroupId.typeClass, ThreadGroupId.class);
@@ -110,7 +109,7 @@ public class VMIdManager
/**
* Returns a new id for the given object
*
- * @param object the object for which an id is desired
+ * @param obj SoftReference of the object for which an id is desired
* @returns a suitable object id
*/
public static ObjectId newObjectId (SoftReference obj)
@@ -170,7 +169,7 @@ public class VMIdManager
/**
* Returns a new reference type id for the given class
*
- * @param clazz the <code>Class</code> for which an id is desired
+ * @param ref SoftReference to the desired type
* @returns a suitable reference type id or null when the
* reference is cleared.
*/
@@ -187,6 +186,7 @@ public class VMIdManager
id = new InterfaceReferenceTypeId ();
else
id = new ClassReferenceTypeId ();
+ id.setReference (ref);
synchronized (_ridLock)
{
id.setId (++_lastRid);
diff --git a/libjava/gnu/classpath/jdwp/VMMethod.java b/libjava/gnu/classpath/jdwp/VMMethod.java
index a4bbb51..d345bc1 100644
--- a/libjava/gnu/classpath/jdwp/VMMethod.java
+++ b/libjava/gnu/classpath/jdwp/VMMethod.java
@@ -103,17 +103,17 @@ public class VMMethod
/**
* Returns the name of this method
*/
- public String getName() { return null; }
+ public native String getName();
/**
* Returns the signature of this method
*/
- public String getSignature() { return null; }
+ public native String getSignature();
/**
* Returns the method's modifier flags
*/
- public int getModifiers() { return -1; }
+ public native int getModifiers();
/**
* "Returns line number information for the method, if present. The line
@@ -125,8 +125,8 @@ public class VMMethod
* @return the line table
* @throws JdwpException
*/
- public LineTable getLineTable()
- { return null; }
+ public native LineTable getLineTable()
+ throws JdwpException;
/**
* "Returns variable information for the method. The variable table
@@ -137,8 +137,8 @@ public class VMMethod
* @return the variable table
* @throws JdwpException
*/
- public VariableTable getVariableTable()
- { return null; }
+ public native VariableTable getVariableTable()
+ throws JdwpException;
/**
* Returns a string representation of this method (not
diff --git a/libjava/gnu/classpath/jdwp/VMVirtualMachine.java b/libjava/gnu/classpath/jdwp/VMVirtualMachine.java
index ac81d95..d4985bf 100644
--- a/libjava/gnu/classpath/jdwp/VMVirtualMachine.java
+++ b/libjava/gnu/classpath/jdwp/VMVirtualMachine.java
@@ -62,7 +62,8 @@ public class VMVirtualMachine
*
* @param thread the thread to suspend
*/
- public static void suspendThread (Thread thread) { }
+ public static native void suspendThread (Thread thread)
+ throws JdwpException;
/**
* Suspend all threads
@@ -114,7 +115,8 @@ public class VMVirtualMachine
*
* @param thread the thread to resume
*/
- public static void resumeThread (Thread thread) { }
+ public static native void resumeThread (Thread thread)
+ throws JdwpException;
/**
* Resume all threads. This simply decrements the thread's
@@ -164,17 +166,20 @@ public class VMVirtualMachine
* @param thread the thread whose suspend count is desired
* @return the number of times the thread has been suspended
*/
- public static int getSuspendCount (Thread thread) { return -1; }
+ public static native int getSuspendCount (Thread thread)
+ throws JdwpException;
/**
* Returns a count of the number of loaded classes in the VM
*/
- public static int getAllLoadedClassesCount () { return -1; }
+ public static native int getAllLoadedClassesCount ()
+ throws JdwpException;
/**
* Returns an iterator over all the loaded classes in the VM
*/
- public static Iterator getAllLoadedClasses () { return null; }
+ public static native Iterator getAllLoadedClasses ()
+ throws JdwpException;
/**
* Returns the status of the given class
@@ -183,7 +188,8 @@ public class VMVirtualMachine
* @return a flag containing the class's status
* @see JdwpConstants.ClassStatus
*/
- public static int getClassStatus (Class clazz) { return -1; }
+ public static native int getClassStatus (Class clazz)
+ throws JdwpException;
/**
* Returns all of the methods defined in the given class. This
@@ -192,8 +198,8 @@ public class VMVirtualMachine
* @param klass the class whose methods are desired
* @return an array of virtual machine methods
*/
- public static VMMethod[] getAllClassMethods (Class klass)
- { return null; }
+ public static native VMMethod[] getAllClassMethods (Class klass)
+ throws JdwpException;
/**
* A factory method for getting valid virtual machine methods
@@ -206,8 +212,8 @@ public class VMVirtualMachine
* in the class
* @throws JdwpException for any other error
*/
- public static VMMethod getClassMethod(Class klass, long id)
- { return null; }
+ public static native VMMethod getClassMethod(Class klass, long id)
+ throws JdwpException;
/**
* Returns the thread's call stack
@@ -217,9 +223,9 @@ public class VMVirtualMachine
* @param length number of frames to return (-1 for all frames)
* @return a list of frames
*/
- public static ArrayList getFrames (Thread thread, int strart,
+ public static native ArrayList getFrames (Thread thread, int start,
int length)
- { return null; }
+ throws JdwpException;
/**
* Returns the frame for a given thread with the frame ID in
@@ -231,8 +237,8 @@ public class VMVirtualMachine
* @param bb buffer containing the frame's ID
* @return the desired frame
*/
- public static VMFrame getFrame (Thread thread, ByteBuffer bb)
- { return null; }
+ public static native VMFrame getFrame (Thread thread, ByteBuffer bb)
+ throws JdwpException;
/**
* Returns the number of frames in the thread's stack
@@ -240,8 +246,8 @@ public class VMVirtualMachine
* @param thread the thread for which to get a frame count
* @return the number of frames in the thread's stack
*/
- public static int getFrameCount (Thread thread)
- { return -1; }
+ public static native int getFrameCount (Thread thread)
+ throws JdwpException;
/**
@@ -251,8 +257,8 @@ public class VMVirtualMachine
* @return integer status of the thread
* @see JdwpConstants.ThreadStatus
*/
- public static int getThreadStatus (Thread thread)
- { return -1; }
+ public static native int getThreadStatus (Thread thread)
+ throws JdwpException;
/**
* Returns a list of all classes which this class loader has been
@@ -261,8 +267,8 @@ public class VMVirtualMachine
* @param cl the class loader
* @return a list of all visible classes
*/
- public static ArrayList getLoadRequests (ClassLoader cl)
- { return null; }
+ public static native ArrayList getLoadRequests (ClassLoader cl)
+ throws JdwpException;
/**
* Executes a method in the virtual machine
@@ -276,11 +282,11 @@ public class VMVirtualMachine
* (instance methods only) "
* @return a result object containing the results of the invocation
*/
- public static MethodResult executeMethod (Object obj, Thread thread,
+ public static native MethodResult executeMethod (Object obj, Thread thread,
Class clazz, Method method,
Object[] values,
boolean nonVirtual)
- { return null; }
+ throws JdwpException;
/**
* "Returns the name of source file in which a reference type was declared"
@@ -289,8 +295,8 @@ public class VMVirtualMachine
* @return a string containing the source file name; "no path information
* for the file is included"
*/
- public static String getSourceFile (Class clazz)
- { return null; }
+ public static native String getSourceFile (Class clazz)
+ throws JdwpException;
/**
* Register a request from the debugger
@@ -301,16 +307,16 @@ public class VMVirtualMachine
* or do some internal work to set up the event notification (useful for
* execution-related events like breakpoints, single-stepping, etc.).
*/
- public static 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 void unregisterEvent (EventRequest request)
- { }
+ public static native void unregisterEvent (EventRequest request)
+ throws JdwpException;
/**
@@ -318,5 +324,6 @@ public class VMVirtualMachine
*
* @param kind the type of events to clear
*/
- public static void clearEvents (byte kind) { }
+ public static native void clearEvents (byte kind)
+ throws JdwpException;
}
diff --git a/libjava/gnu/classpath/jdwp/natVMFrame.cc b/libjava/gnu/classpath/jdwp/natVMFrame.cc
new file mode 100644
index 0000000..de3b844
--- /dev/null
+++ b/libjava/gnu/classpath/jdwp/natVMFrame.cc
@@ -0,0 +1,26 @@
+// natFrame.cc -- native support for VMFrame.java
+
+/* Copyright (C) 2006 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+#include <gcj/cni.h>
+
+#include <gnu/classpath/jdwp/VMFrame.h>
+
+using namespace java::lang;
+
+Object*
+gnu::classpath::jdwp::VMFrame::getValue (jint slot)
+{
+ return 0;
+}
+
+void
+gnu::classpath::jdwp::VMFrame::setValue (jint slot, Object* value)
+{
+}
diff --git a/libjava/gnu/classpath/jdwp/natVMMethod.cc b/libjava/gnu/classpath/jdwp/natVMMethod.cc
new file mode 100644
index 0000000..eb1d6fd
--- /dev/null
+++ b/libjava/gnu/classpath/jdwp/natVMMethod.cc
@@ -0,0 +1,47 @@
+// natVMMethod.cc -- native support for VMMethod
+
+/* Copyright (C) 2006 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+#include <config.h>
+#include <gcj/cni.h>
+
+#include <gnu/classpath/jdwp/VMMethod.h>
+#include <gnu/classpath/jdwp/util/LineTable.h>
+#include <gnu/classpath/jdwp/util/VariableTable.h>
+
+java::lang::String*
+gnu::classpath::jdwp::VMMethod::getName ()
+{
+ return NULL;
+}
+
+java::lang::String*
+gnu::classpath::jdwp::VMMethod::getSignature ()
+{
+ return NULL;
+}
+
+jint
+gnu::classpath::jdwp::VMMethod::getModifiers ()
+{
+ return 0;
+}
+
+gnu::classpath::jdwp::util::LineTable*
+gnu::classpath::jdwp::VMMethod::getLineTable ()
+{
+ return NULL;
+}
+
+
+gnu::classpath::jdwp::util::VariableTable*
+gnu::classpath::jdwp::VMMethod::getVariableTable ()
+{
+ return NULL;
+}
diff --git a/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
new file mode 100644
index 0000000..ef4605b
--- /dev/null
+++ b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
@@ -0,0 +1,240 @@
+// natVMVirtualMachine.cc - native support for VMVirtualMachine
+
+/* Copyright (C) 2006 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+#include <config.h>
+#include <gcj/cni.h>
+
+#include <java/lang/Class.h>
+#include <java/lang/ClassLoader.h>
+#include <java/lang/Thread.h>
+#include <java/nio/ByteBuffer.h>
+#include <java/util/ArrayList.h>
+#include <java/util/Iterator.h>
+
+#include <gnu/classpath/jdwp/VMFrame.h>
+#include <gnu/classpath/jdwp/VMMethod.h>
+#include <gnu/classpath/jdwp/VMVirtualMachine.h>
+#include <gnu/classpath/jdwp/event/EventRequest.h>
+#include <gnu/classpath/jdwp/util/MethodResult.h>
+
+using namespace java::lang;
+using namespace gnu::classpath::jdwp::event;
+using namespace gnu::classpath::jdwp::util;
+
+void
+gnu::classpath::jdwp::VMVirtualMachine ::suspendThread (Thread *thread)
+{
+}
+
+void
+gnu::classpath::jdwp::VMVirtualMachine::resumeThread (Thread *thread)
+{
+}
+
+jint
+gnu::classpath::jdwp::VMVirtualMachine::getSuspendCount (Thread *thread)
+{
+ return 0;
+}
+
+void
+gnu::classpath::jdwp::VMVirtualMachine::registerEvent (EventRequest *request)
+{
+ switch (request->getEventKind ())
+ {
+ case EventRequest::EVENT_SINGLE_STEP:
+ break;
+
+ case EventRequest::EVENT_BREAKPOINT:
+ break;
+
+ case EventRequest::EVENT_FRAME_POP:
+ break;
+
+ case EventRequest::EVENT_EXCEPTION:
+ break;
+
+ case EventRequest::EVENT_USER_DEFINED:
+ break;
+
+ case EventRequest::EVENT_THREAD_START:
+ break;
+
+ case EventRequest::EVENT_THREAD_END:
+ break;
+
+ case EventRequest::EVENT_CLASS_PREPARE:
+ break;
+
+ case EventRequest::EVENT_CLASS_LOAD:
+ break;
+
+ case EventRequest::EVENT_CLASS_UNLOAD:
+ break;
+
+ case EventRequest::EVENT_FIELD_ACCESS:
+ break;
+
+ case EventRequest::EVENT_FIELD_MODIFY:
+ break;
+
+ case EventRequest::EVENT_METHOD_ENTRY:
+ break;
+
+ case EventRequest::EVENT_METHOD_EXIT:
+ break;
+
+ case EventRequest::EVENT_VM_INIT:
+ break;
+
+ case EventRequest::EVENT_VM_DEATH:
+ break;
+ }
+}
+
+void
+gnu::classpath::jdwp::VMVirtualMachine::unregisterEvent (EventRequest *request)
+{
+ switch (request->getEventKind ())
+ {
+ case EventRequest::EVENT_SINGLE_STEP:
+ break;
+
+ case EventRequest::EVENT_BREAKPOINT:
+ break;
+
+ case EventRequest::EVENT_FRAME_POP:
+ break;
+
+ case EventRequest::EVENT_EXCEPTION:
+ break;
+
+ case EventRequest::EVENT_USER_DEFINED:
+ break;
+
+ case EventRequest::EVENT_THREAD_START:
+ break;
+
+ case EventRequest::EVENT_THREAD_END:
+ break;
+
+ case EventRequest::EVENT_CLASS_PREPARE:
+ break;
+
+ case EventRequest::EVENT_CLASS_LOAD:
+ break;
+
+ case EventRequest::EVENT_CLASS_UNLOAD:
+ break;
+
+ case EventRequest::EVENT_FIELD_ACCESS:
+ break;
+
+ case EventRequest::EVENT_FIELD_MODIFY:
+ break;
+
+ case EventRequest::EVENT_METHOD_ENTRY:
+ break;
+
+ case EventRequest::EVENT_METHOD_EXIT:
+ break;
+
+ case EventRequest::EVENT_VM_INIT:
+ break;
+
+ case EventRequest::EVENT_VM_DEATH:
+ break;
+ }
+}
+
+void
+gnu::classpath::jdwp::VMVirtualMachine::clearEvents (jbyte kind)
+{
+}
+
+jint
+gnu::classpath::jdwp::VMVirtualMachine::getAllLoadedClassesCount (void)
+{
+ return 0;
+}
+
+java::util::Iterator *
+gnu::classpath::jdwp::VMVirtualMachine::getAllLoadedClasses (void)
+{
+ return NULL;
+}
+
+jint
+gnu::classpath::jdwp::VMVirtualMachine::getClassStatus (jclass klass)
+{
+ return 0;
+}
+
+JArray<gnu::classpath::jdwp::VMMethod *> *
+gnu::classpath::jdwp::VMVirtualMachine::getAllClassMethods (jclass klass)
+{
+ return NULL;
+}
+
+gnu::classpath::jdwp::VMMethod *
+gnu::classpath::jdwp::VMVirtualMachine::getClassMethod (jclass klass, jlong id)
+{
+ return NULL;
+}
+
+java::util::ArrayList *
+gnu::classpath::jdwp::VMVirtualMachine::getFrames (Thread *thread,
+ jint start,
+ jint length)
+{
+ return NULL;
+}
+
+gnu::classpath::jdwp::VMFrame *
+gnu::classpath::jdwp::VMVirtualMachine::getFrame (Thread *thread,
+ ::java::nio::ByteBuffer *bb)
+{
+ return NULL;
+}
+
+jint
+gnu::classpath::jdwp::VMVirtualMachine::getFrameCount (Thread *thread)
+{
+ return 0;
+}
+
+jint
+gnu::classpath::jdwp::VMVirtualMachine::getThreadStatus (Thread *thread)
+{
+ return 0;
+}
+
+java::util::ArrayList *
+gnu::classpath::jdwp::VMVirtualMachine::getLoadRequests (ClassLoader *cl)
+{
+ return NULL;
+}
+
+MethodResult *
+gnu::classpath::jdwp::VMVirtualMachine::executeMethod (jobject obj,
+ Thread *thread,
+ jclass clazz,
+ reflect::Method *method,
+ jobjectArray values,
+ jboolean nonVirtual)
+{
+ return NULL;
+}
+
+jstring
+gnu::classpath::jdwp::VMVirtualMachine::getSourceFile (jclass clazz)
+{
+ return NULL;
+}