diff options
author | Keith Seitz <keiths@redhat.com> | 2007-03-13 19:27:13 +0000 |
---|---|---|
committer | Keith Seitz <kseitz@gcc.gnu.org> | 2007-03-13 19:27:13 +0000 |
commit | bde6c7a990efcfadfd832983367a8e783647aa1d (patch) | |
tree | 84c60497e614863868aee45041d96dd1611f3f1f /libjava/java/lang | |
parent | 03943c05c123b301f978f2c5f56fc692a03586cb (diff) | |
download | gcc-bde6c7a990efcfadfd832983367a8e783647aa1d.zip gcc-bde6c7a990efcfadfd832983367a8e783647aa1d.tar.gz gcc-bde6c7a990efcfadfd832983367a8e783647aa1d.tar.bz2 |
java-interp.h (_Jv_InterpClass): Declare friend function _Jv_GetInterpClassSourceFile.
* 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.
From-SVN: r122882
Diffstat (limited to 'libjava/java/lang')
-rw-r--r-- | libjava/java/lang/Class.h | 2 | ||||
-rw-r--r-- | libjava/java/lang/natClass.cc | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libjava/java/lang/Class.h b/libjava/java/lang/Class.h index 80c4100..af02198 100644 --- a/libjava/java/lang/Class.h +++ b/libjava/java/lang/Class.h @@ -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); diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index 79fa599..a6b353f 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -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; +} |