gcc/libjava/java/lang
Bryce McKinlay 18744d9b72 New Stack Trace infrastructure.
2005-03-10  Bryce McKinlay  <mckinlay@redhat.com>

	New Stack Trace infrastructure.
	* Makefile.am (libgcj0_convenience_la_SOURCES): Add stacktrace.cc.
	(gnu/gcj/runtime/StackTrace.lo): Removed.
	(ordinary_java_source_files): Remove obsolete files.
	(nat_source_files): Remove obsolete files. Add natVMThrowable.cc.
	* configure.host (fallback_backtrace_h): Set backtrace header
	for mingw and cygwin targets.
	* configure.ac: Make symlink for fallback backtrace headers.
	* Makefile.in, configure: Rebuilt.
	* defineclass.cc (_Jv_ClassReader::read_one_code_attribute):
	Read 'LineNumberTable' attribute.
	(_Jv_ClassReader::read_one_class_attribute): Read 'SourceFile'
	attribute.
	(_Jv_ClassReader::handleCodeAttribute): Initialize method line
	table fields.
	* exception.cc: Remove unused include.
	* interpret.cc (DIRECT_THREADED, insn_slot): Moved to java-interp.h.
	(SAVE_PC): New macro. Save current PC in the interpreter frame.
	(NULLCHECK, NULLARRAYCHECK): Use SAVE_PC.
	(_Jv_InterpMethod::compile): Translate bytecode PC values in the line
	table to direct threaded instruction values.
	(_Jv_StartOfInterpreter, _Jv_EndOfInterpreter): Removed.
	(_Jv_InterpMethod::run): No longer member function. All
	callers updated. Remove _Unwind calls. Call SAVE_PC whenever a call
	is made or where an instruction could throw.
	(_Jv_InterpMethod::get_source_line): New. Look up source line numbers
	in line_table.
	* prims.cc (catch_segv): Construct exception after MAKE_THROW_FRAME.
	(catch_fpe): Likewise.
	* stacktrace.cc: New file. Stack trace code now here.
	* gnu/gcj/runtime/MethodRef.java:
	* gnu/gcj/runtime/NameFinder.java: Mostly reimplemented. Now simply
	calls addr2line to look up PC addresses in a given binary or shared
	library.
	* gnu/gcj/runtime/StackTrace.java, gnu/gcj/runtime/natNameFinder.cc,
	gnu/gcj/runtime/natStackTrace.cc: Removed.
	* gnu/java/lang/MainThread.java (call_main): Add comment warning that
	this function name is specially recognised by the stack trace code
	and shouldn't be changed.
	* include/java-interp.h (DIRECT_THREADED, insn_slot): Moved here.
	(struct  _Jv_LineTableEntry, line_table, line_table_len): New.
	(_Jv_InterpMethod::run): Update declaration.
	(_Jv_StackTrace_): New friend. NameFinder and StackTrace no longer
	friends.
	(_Jv_InterpFrame): Renamed from _Jv_MethodChain. Add PC field.
	* include/java-stack.h: New file. Declarations for stack tracing.
	* include/jvm.h (_Jv_Frame_info): Removed.
	* java/lang/Class.h: Update friend declarations.
	* java/lang/VMClassLoader.java (getSystemClassLoader): Simplify
	exception message.
	* java/lang/VMThrowable.java (fillInStackTrace): Now native.
	(getStackTrace): Now native.
	(data): New RawDataManaged field.
	* java/lang/natClass.cc: Update includes.
	(forName): Use _Jv_StackTrace::GetCallingClass for
	calling-classloader check.
	(getClassLoader): Likewise.
	* java/lang/natRuntime.cc: Update includes.
	(_load): Use _Jv_StackTrace::GetFirstNonSystemClassLoader.
	* java/lang/natVMSecurityManager.cc: Update includes.
	(getClassContext): Use _Jv_StackTrace::GetClassContext.
	* java/lang/natVMThrowable.cc: New file. Native methods for
	VMThrowable.
	* java/lang/reflect/natArray.cc: Update includes.
	(newInstance): Use _Jv_StackTrace::GetCallingClass to implement
	accessibility check.
	* java/lang/reflect/natConstructor.cc: Update includes.
	(newInstance): Use _Jv_StackTrace::GetCallingClass to implement
	accessibility check.
	* java/lang/reflect/natField.cc: Update includes.
	(getAddr): Use _Jv_StackTrace::GetCallingClass to implement
	accessibility check.
	* java/lang/reflect/natMethod.cc: Update includes.
	(invoke): Use _Jv_StackTrace::GetCallingClass to implement
	accessibility check.
	* java/util/natResourceBundle.cc: Update includes.
	(getCallingClassLoader): Use _Jv_StackTrace::GetCallingClass.
	* java/util/logging/natLogger.cc: Update includes. Use
	_Jv_StackTrace::GetCallerInfo to get call-site info.
	* sysdep/generic/backtrace.h: Fallback backtrace code. Stub
	implementation.
	* sysdep/i386/backtrace.h: New. Fallback backtrace code. i386
	implementation.

From-SVN: r96253
2005-03-10 19:02:21 +00:00
..
ref re PR libgcj/10596 (Reference and String.intern don't work together) 2003-09-29 21:13:55 +00:00
reflect New Stack Trace infrastructure. 2005-03-10 19:02:21 +00:00
AbstractMethodError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ArithmeticException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ArrayIndexOutOfBoundsException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ArrayStoreException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
AssertionError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Boolean.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Byte.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Character.java Character.java, [...]: Reorder "final static" to "static final". 2004-11-24 13:33:01 +00:00
CharSequence.java Byte.java, [...]: Fixed javadocs, coding style and argument names all over. 2004-04-20 12:30:19 +00:00
Class.h New Stack Trace infrastructure. 2005-03-10 19:02:21 +00:00
Class.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ClassCastException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ClassCircularityError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ClassFormatError.java
ClassLoader.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ClassNotFoundException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Cloneable.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
CloneNotSupportedException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Comparable.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Compiler.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Double.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
dtoa.c dtoa.c (_dtoa_r): Initialize variables ilim, ilim1 and spec_case. 2005-03-05 08:47:58 +01:00
e_acos.c
e_asin.c dtoa.c (_dtoa_r): Initialize variables ilim, ilim1 and spec_case. 2005-03-05 08:47:58 +01:00
e_atan2.c
e_exp.c dtoa.c (_dtoa_r): Initialize variables ilim, ilim1 and spec_case. 2005-03-05 08:47:58 +01:00
e_fmod.c
e_log.c
e_pow.c cni.h: CNI now expands to Compiled Native Interface. 2003-07-08 21:27:37 +00:00
e_rem_pio2.c dtoa.c (_dtoa_r): Initialize variables ilim, ilim1 and spec_case. 2005-03-05 08:47:58 +01:00
e_remainder.c
e_scalb.c
e_sqrt.c
EcosProcess.java
Error.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Exception.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ExceptionInInitializerError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
fdlibm.h fdlibm.h: Merge an AIX define from GNU Classpath. 2005-03-09 21:57:25 +01:00
Float.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ieeefp.h Add m32r support. 2004-10-21 09:36:47 +00:00
IllegalAccessError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
IllegalAccessException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
IllegalArgumentException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
IllegalMonitorStateException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
IllegalStateException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
IllegalThreadStateException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
IncompatibleClassChangeError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
IndexOutOfBoundsException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
InheritableThreadLocal.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
InstantiationError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
InstantiationException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Integer.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
InternalError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
InterruptedException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
k_cos.c
k_rem_pio2.c
k_sin.c
k_tan.c
LinkageError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Long.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Math.java 2004-10-22 Michael Koch <konqueror@gmx.de> 2004-10-22 17:14:29 +00:00
mprec.c
mprec.h fdlibm.h: Merge an AIX define from GNU Classpath. 2005-03-09 21:57:25 +01:00
natCharacter.cc
natClass.cc New Stack Trace infrastructure. 2005-03-10 19:02:21 +00:00
natClassLoader.cc natVMClassLoader.cc (defineClass): Reference 'systemClassLoader' field directly. 2005-03-09 20:58:17 +00:00
natDouble.cc natDouble.cc (parseDouble): Reverted patch of 2003-11-13. 2003-11-26 18:02:34 +00:00
natEcosProcess.cc
natFloat.cc
natMath.cc
natObject.cc natObject.cc (_Jv_ObjectCheckMonitor): Initialize the sync_info element of the object if needed. 2005-01-05 05:09:09 +00:00
natPosixProcess.cc natPosixProcess.cc (waitForSignal): Ignore return value of sigsuspend. 2004-09-14 13:09:31 -07:00
natRuntime.cc New Stack Trace infrastructure. 2005-03-10 19:02:21 +00:00
natString.cc * Merged gcj-abi-2-dev-branch to trunk. 2004-11-25 03:47:08 +00:00
natStringBuffer.cc natStringBuffer.cc (regionMatches): New function. 2003-03-24 00:50:18 +00:00
natSystem.cc natSystem.cc (getenv0): Don't assume environment variable is Latin 1 coded. 2004-06-15 13:43:33 +00:00
natThread.cc jni.h (_Jv_JNIEnv::bottom_locals): New field. 2005-01-14 07:36:27 +00:00
natVMClassLoader.cc natVMClassLoader.cc (defineClass): Reference 'systemClassLoader' field directly. 2005-03-09 20:58:17 +00:00
natVMSecurityManager.cc New Stack Trace infrastructure. 2005-03-10 19:02:21 +00:00
natVMThrowable.cc New Stack Trace infrastructure. 2005-03-10 19:02:21 +00:00
natWin32Process.cc natPosixProcess.cc (startProcess): Implement standard streams using FileChannelImpl, not FileDescriptor. 2004-02-29 11:14:20 -08:00
NegativeArraySizeException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
NoClassDefFoundError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
NoSuchFieldError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
NoSuchFieldException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
NoSuchMethodError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
NoSuchMethodException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
NullPointerException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Number.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
NumberFormatException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Object.h * java/lang/Object.h (_JvObjectPrefix): Declare as extern "Java". 2005-02-22 18:29:43 +00:00
Object.java Object.java: Added javadocs all over (merged from GNU classpath). 2004-11-16 21:37:29 +00:00
OutOfMemoryError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Package.java PR libgcj/12016, PR libgcj/18405, PR libgcj/17738: 2005-01-10 19:39:26 +00:00
PosixProcess.java re PR libgcj/11801 (Problems with Process.waitFor() and exitValue()) 2004-08-12 16:20:11 +00:00
Process.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Runnable.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
Runtime.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
RuntimeException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
RuntimePermission.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
s_atan.c
s_ceil.c
s_copysign.c
s_cos.c
s_fabs.c
s_floor.c
s_rint.c
s_scalbn.c
s_sin.c
s_tan.c
SecurityException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
SecurityManager.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
sf_fabs.c
sf_rint.c
Short.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
StackOverflowError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
StackTraceElement.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
StrictMath.java Math.java, [...]: Reworked import statements, HTML in javadocs and modifier orders. 2004-10-18 10:41:56 +00:00
String.java String.java (rehash): Removed. 2004-11-23 21:33:01 +00:00
StringBuffer.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
StringIndexOutOfBoundsException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
strtod.c dtoa.c (_dtoa_r): Initialize variables ilim, ilim1 and spec_case. 2005-03-05 08:47:58 +01:00
System.java System.java: Revert accidential change. 2004-10-18 11:09:11 +00:00
Thread.java re PR libgcj/17784 (Thread.interrupt doesn't do security checks) 2005-01-13 20:26:38 +00:00
ThreadDeath.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ThreadGroup.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
ThreadLocal.java Math.java, [...]: Reworked import statements, HTML in javadocs and modifier orders. 2004-10-18 10:41:56 +00:00
Throwable.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
UnknownError.java
UnsatisfiedLinkError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
UnsupportedClassVersionError.java
UnsupportedOperationException.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
VerifyError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
VirtualMachineError.java GThreadNativeMethodRunner.java, [...]: Fixed usage of @author tag... 2005-02-17 07:48:58 +00:00
VMClassLoader.java New Stack Trace infrastructure. 2005-03-10 19:02:21 +00:00
VMCompiler.java VMCompiler.java (md5Digest): New field. 2005-03-07 19:51:10 +00:00
VMSecurityManager.java * Merged gcj-abi-2-dev-branch to trunk. 2004-11-25 03:47:08 +00:00
VMThrowable.java New Stack Trace infrastructure. 2005-03-10 19:02:21 +00:00
Void.java Math.java, [...]: Reworked import statements, HTML in javadocs and modifier orders. 2004-10-18 10:41:56 +00:00
w_acos.c
w_asin.c
w_atan2.c
w_exp.c w_exp.c (o_threshold, [...]): Define only if _IEEE_LIBM is undefined. 2003-06-06 03:34:36 +00:00
w_fmod.c
w_log.c
w_pow.c
w_remainder.c
w_sqrt.c
Win32Process.java re PR libgcj/12231 ([win32] Console applications spawned via Runtime.exec( ) in a GUI application flash console window) 2003-11-07 03:16:49 +00:00