summaryrefslogtreecommitdiff
path: root/libjava/stacktrace.cc
Commit message (Collapse)AuthorAgeFilesLines
* PR libgcj/21692rth2005-05-251-4/+5
| | | | | | | | | | | | | | * sysdep/descriptor-n.h: New file. * sysdep/descriptor-y.h: New file. * sysdep/powerpc/descriptor.h: New file. * configure.host: Set $descriptor_h appropriate for the host. * configure.ac: Link it. * configure: Regenerate. * stacktrace.cc: Include sysdep/descriptor.h. (_Jv_StackTrace::UpdateNCodeMap): Use UNWRAP_FUNCTION_DESCRIPTOR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100173 138bc75d-0d04-0410-961f-82ee72b054a4
* * stacktrace.cc (getLineNumberForFrame): Use _Jv_GetSafeArg.tromey2005-05-151-3/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99733 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.tromey2005-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (AM_CXXFLAGS): Define TOOLEXECLIBDIR. (libgcj0_convenience_la_SOURCES): Don't include gnu_xml_source_files. (libgcj0_convenience_la_LIBADD): New variable. (libgcj_la_LIBADD): Don't include sax or w3c_dom. (all_java_source_files): javax_imageio_source_files, javax_xml_source_files, and gnu_java_beans_source_files. ($(gnu_xml_source_files:.java=.lo)): Removed target. (gnu-xml.lo): New target. (javax-imageio.lo): Likewise. (javax-xml.lo): Likewise. (gnu-java-beans.lo): Likewise. (gnu_java_beans_source_files): New variable. (javax_imageio_source_files): Likewise. (javax_xml_source_files): Likewise. (javax_source_files): Moved files to other variable. (awt_java_source_files): Likewise. (ordinary_java_source_files): Added BootClassLoader.java. * java/lang/natVMClassLoader.cc (defineClass): Use boot loader, not system class loader. (initBootLoader): New method. (loadClass): Search bootLoader. * java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader): Use boot loader, not system class loader. (_Jv_UnregisterInitiatingLoader): Likewise. (_Jv_FindClass): Likewise. Ensure entries in bootstrap_class_list are unique. * java/lang/natClass.cc (getClassLoader): Don't special case system class loader. * java/lang/VMClassLoader.java (bootLoader): New field. (getResource): Use bootLoader. (getResources): Likewise. (initBootLoader): Declare. * gnu/gcj/runtime/BootClassLoader.java: New file. * external/sax/org/xml/sax/helpers/NamespaceSupport.java (EMPTY_ENUMERATION): Now package-private. * external/w3c_com/Makefile.in: Rebuilt. * external/w3c_com/Makefile.am (MULTIBUILDTOP): New variable. (w3c.jar): New target. (classes.stamp): Updated. (toolexeclib_LTLIBRARIES): Renamed from noinst_LTLIBRARIES. Changed name of library. (libw3c_gcj_la_SOURCES): New variable. (libw3c_gcj_la_GCJFLAGS): Likewise. (source_files): Renamed from lib3c_convenience_la_SOURCES. * external/sax/Makefile.in: Rebuilt. * external/sax/Makefile.am (MULTIBUILDTOP): New variable. (sax.jar): New target. (classes.stamp): Updated. (toolexeclib_LTLIBRARIES): Renamed from noinst_LTLIBRARIES. Changed name of library. (libsax_gcj_la_SOURCES): New variable. (libsax_gcj_la_GCJFLAGS): Likewise. (source_files): Renamed from libsax_convenience_la_SOURCES. * stacktrace.cc (non_system_trace_fn): Don't look at system class loader. * prims.cc (_Jv_CreateJavaVM): Initialize the bootstrap class loader. (_Jv_RunMain): Handle case where 'runtime' is NULL at exit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96960 138bc75d-0d04-0410-961f-82ee72b054a4
* * stacktrace.cc: Delete unused _Jv_FindCallingClassState.mrs2005-03-221-5/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96891 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-17 Andrew Haley <aph@redhat.com>aph2005-03-211-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | * java/lang/natVMSecurityManager.cc (getClassContext): Add new arg: klass. Pass klass to _Jv_StackTrace::GetClassContext(). * java/lang/ClassLoader.java (getParent): Pass class to VMSecurityManager.getClassContext() (getSystemClassLoader): Likewise. * java/lang/Package.java (getPackage): Likewise. (getPackages): Likewise. * java/lang/SecurityManager.java (getClassContext): Likewise. (currentClassLoader): Likewise. * java/lang/VMSecurityManager.java: (getClassContext): Likewise. (currentClassLoader) Add new arg: caller. Pass caller to VMSecurityManager.getClassContext. * stacktrace.cc (GetClassContext): Correct calculation of jframe_count. * boehm.cc (_Jv_MarkObj): (_Jv_MarkObj): Mark im->source_file_name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96803 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-15 Andreas Tobler <a.tobler@schweiz.ch>bryce2005-03-161-0/+8
| | | | | | | | | | | | | | | * stacktrace.cc (_Jv_StackTrace::UnwindTraceFn): Protect interpreter-specific code with #ifdef INTERPRETER. (_Jv_StackTrace::getLineNumberForFrame): Likewise. (_Jv_StackTrace::FillInFrameInfo): Likewise. (_Jv_StackTrace::non_system_trace_fn): Likewise. * include/java-stack.h (struct _Jv_InterpFrameInfo): Protect with #ifdef INTERPRETER. Also protect declarations that use it. * java/lang/Class.h: Move _Jv_StackTrace friend declaration outside #ifdef INTERPRETER block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96571 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-12 Andreas Tobler <a.tobler@schweiz.ch>andreast2005-03-121-1/+1
| | | | | | | | * stacktrace.cc (GetCallerInfo): Return nothing in case of SJLJ_EXCEPTIONS is defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96340 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-10 Bryce McKinlay <mckinlay@redhat.com>bryce2005-03-101-0/+527
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96253 138bc75d-0d04-0410-961f-82ee72b054a4