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
+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.
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
#endif
friend _Jv_MethodBase ** _Jv_GetFirstMethod (_Jv_InterpClass *klass);
+ friend jstring _Jv_GetInterpClassSourceFile (jclass);
};
extern inline _Jv_MethodBase **
// 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);
#ifdef INTERPRETER
friend _Jv_MethodBase *(::_Jv_FindInterpreterMethod) (jclass klass,
jmethodID desired_method);
+ friend jstring ::_Jv_GetInterpClassSourceFile (jclass);
#endif
friend jbyte (::_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;
+}