]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* include/java-interp.h (_Jv_InterpClass): Declare
authorkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Mar 2007 19:27:13 +0000 (19:27 +0000)
committerkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Mar 2007 19:27:13 +0000 (19:27 +0000)
        friend function _Jv_GetInterpClassSourceFile.
        * java/lang/Class.h (Class): Likewise.
        * java/lang/natClass.cc (_Jv_GetInterpClassSourceFile):
        New function.
        * gnu/classpath/jdwp/natVMVirtualMachine.cc
        (getSourceFile): Implement.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122882 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
libjava/include/java-interp.h
libjava/java/lang/Class.h
libjava/java/lang/natClass.cc

index a7e76caee02f6ea3d4086c1fcccfea46965b9721..4d349a7c7315ab4792bd56756db2cb71f23865f0 100644 (file)
@@ -1,3 +1,13 @@
+2007-03-13  Keith Seitz  <keiths@redhat.com>
+
+       * include/java-interp.h (_Jv_InterpClass): Declare
+       friend function _Jv_GetInterpClassSourceFile.
+       * java/lang/Class.h (Class): Likewise.
+       * java/lang/natClass.cc (_Jv_GetInterpClassSourceFile):
+       New function.
+       * gnu/classpath/jdwp/natVMVirtualMachine.cc
+       (getSourceFile): Implement.
+
 2007-03-13  Thomas Fitzsimmons  <fitzsim@redhat.com>
 
        * Makefile.am (AM_CXXFLAGS): Define ECJ_JAR_FILE.
index 3ea5f9a76d6c995539f1af74046adc70f4ac2a09..2229a451771161c6c46bdf3348fd507ce253dedb 100644 (file)
@@ -644,9 +644,9 @@ executeMethod (MAYBE_UNUSED jobject obj, MAYBE_UNUSED Thread *thread,
 
 jstring
 gnu::classpath::jdwp::VMVirtualMachine::
-getSourceFile (MAYBE_UNUSED jclass clazz)
+getSourceFile (jclass clazz)
 {
-  return NULL;
+  return _Jv_GetInterpClassSourceFile (clazz);
 }
 
 // A simple caching function used while single-stepping
index c294cc81896517d88225e26f6613bd51b1f37ab0..ee45faa18d895c95f27a37e6a806e9b3070629a1 100644 (file)
@@ -306,6 +306,7 @@ class _Jv_InterpClass
 #endif
 
   friend _Jv_MethodBase ** _Jv_GetFirstMethod (_Jv_InterpClass *klass);
+  friend jstring _Jv_GetInterpClassSourceFile (jclass);
 };
 
 extern inline _Jv_MethodBase **
index 80c410009ea08f7c2374731efb6d192c54353f5a..af0219892f1ec102f2779a3ba994a4e8f1cd11c3 100644 (file)
@@ -267,6 +267,7 @@ _Jv_Utf8Const *_Jv_GetClassNameUtf8 (jclass);
 // Finds a desired interpreter method in the given class or NULL if not found
 class _Jv_MethodBase;
 _Jv_MethodBase *_Jv_FindInterpreterMethod (jclass, jmethodID);
+jstring _Jv_GetInterpClassSourceFile (jclass);
 #endif
 
 jbyte _Jv_GetClassState (jclass);
@@ -568,6 +569,7 @@ private:
 #ifdef INTERPRETER
   friend _Jv_MethodBase *(::_Jv_FindInterpreterMethod) (jclass klass,
                                                        jmethodID desired_method);
+  friend jstring ::_Jv_GetInterpClassSourceFile (jclass);
 #endif
   friend jbyte (::_Jv_GetClassState) (jclass klass);
 
index 79fa59989d34b29427a4b336de9c0046eae1216e..a6b353f2a957158e65fb40226ca0e289e1393ddd 100644 (file)
@@ -2064,3 +2064,15 @@ _Jv_GetClassState (jclass klass)
   return klass->state;
 }
 
+jstring
+_Jv_GetInterpClassSourceFile (jclass klass)
+{
+  if (_Jv_IsInterpretedClass (klass))
+    {
+      _Jv_InterpClass *iclass =
+       reinterpret_cast<_Jv_InterpClass *> (klass->aux_info);
+      return iclass->source_file_name;
+    }
+
+  return NULL;
+}