jvm.h (struct _Jv_frame_info): New structure.

* include/jvm.h (struct _Jv_frame_info): New structure.
	* gnu/gcj/runtime/natNameFinder.cc: Include StringBuffer.h,
	java-interp.h.
	(lookupInterp): New method.
	(getAddrAsString): Use _Jv_frame_info.
	(dladdrLookup): Likewise.
	* gnu/gcj/runtime/NameFinder.java (lookup): Try to look up
	interpreted frame.
	(lookupInterp): Declare.
	* java/lang/natVMThrowable.cc: Include Thread.h, java-interp.h.
	(fillInStackTrace): Collect information on interpreted frames.
	Use _Jv_frame_info.
	* interpret.cc: Include Thread.h.
	(run): Create and push _Jv_MethodChain object.
	(_Jv_EndOfInterpreter): New global.
	* java/lang/Thread.java (interp_frame): New field.
	* include/java-interp.h (struct _Jv_MethodChain): New structure.
	Include NameFinder.h.

From-SVN: r56657
This commit is contained in:
Tom Tromey 2002-08-29 17:53:28 +00:00 committed by Tom Tromey
parent ce4e997039
commit 3308c46e47
8 changed files with 160 additions and 11 deletions

View file

@ -172,6 +172,12 @@ public class NameFinder
*/
native private String getAddrAsString(RawData addrs, int n);
/**
* If nth element of stack is an interpreted frame, return the
* element representing the method being interpreted.
*/
native private StackTraceElement lookupInterp(RawData addrs, int n);
/**
* Creates the nth StackTraceElement from the given native stacktrace.
*/
@ -179,11 +185,14 @@ public class NameFinder
{
StackTraceElement result;
result = dladdrLookup(addrs, n);
result = lookupInterp(addrs, n);
if (result == null)
result = dladdrLookup(addrs, n);
if (result == null)
{
String name = null;
String file = null;
String hex = getAddrAsString(addrs, n);
if (addr2line != null)