Skip to content
Snippets Groups Projects
  1. Sep 04, 2007
    • Andrew Haley's avatar
      [multiple changes] · f202305d
      Andrew Haley authored
      2007-09-04  Andrew Haley  <aph@redhat.com>
      
      	PR java/27908
      	* testsuite/libjava.lang/PR27908.java
      	({run1,run2,run3}.isRunning): New Method.
      	(main): Fix race condition.
      
      2007-08-29  Andrew Haley  <aph@redhat.com>
      
      	* gnu/classpath/natVMStackWalker.cc (VMStackWalker::getCallingClass):
      	Make sure we're not sibcalled.
      	(GET_CALLING_CLASS): Define for ARM EABI.
      
      2007-08-22  Andrew Haley  <aph@redhat.com>
      
      	* configure.host (BACKTRACESPEC): Add arm*-linux*.
      
      2007-08-22  Andrew Haley  <aph@redhat.com>
      
      	* configure.ac (LIBSTDCXXSPEC): New.
      	* configure.host: Add arm*-linux* to pthread test.
      	* configure.ac (LIBGCJTESTSPEC): Add path to libstdc++ for ARM
      	EABI.
      	* testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Use
      	-fexceptions for ARM EABI.
      	* testsuite/lib/libjava.exp (libjava_arguments): Add libgcj-test.spec.
      	(libjava_invoke): Log the invocation.
      
      2007-08-15  Andrew Haley  <aph@redhat.com>
      
      	* configure.ac (extra_ldflags): Define.
      	* Makefile.am: Use extra_ldflags for all executables.
      
      2007-08-14  Andrew Haley  <aph@redhat.com>
      
      	* sysdep/arm/backtrace.h: Remove stubs for _Unwind_GetIPInfo,
      	_Unwind_GetRegionStart, and _Unwind_Backtrace.
      
      2007-07-27  Andrew Haley  <aph@redhat.com>
      
      	* gnu/classpath/natVMStackWalker.cc (GET_CALLING_CLASS): Stub for
      	ARM EABI.
      	* exception.cc (get_exception_header_from_ue): New.
      	(get_ttype_entry): ARM EABI version.
      	(PERSONALITY_FUNCTION): Add ARM EABI code.
      	* sysdep/arm/backtrace.h: New file.
      	* stacktrace.cc (_URC_NORMAL_STOP): New.
      	* configure.ac (extra_ldflags_libjava): Add libsupc++.la for ARM
      	EABI.
      	* configure.host (BACKTRACESPEC): Add arm/backtrace.h.
      
      From-SVN: r128098
      f202305d
  2. Jul 31, 2007
    • David Daney's avatar
      configure.ac (INTERPRETER): New AM_CONDITIONAL. · 86acf60c
      David Daney authored
      	* configure.ac (INTERPRETER): New AM_CONDITIONAL.
      	* scripts/makemake.tcl (package_map): Mark jdwp and jvmti packages
      	as being for interpreter only.  Place interpreter related files in
      	'if INTERPRETER' block.
      	(interpreter_package_files): New list.
      	(interpreter_header_vars): Ditto.
      	(emit_package_rule_to_list): Renamed from emit_package_rule with
      	new target list parameter.
      	(emit_package_rule): Rewritten to call emit_package_rule_to_list.
      	(emit_interpreter_rule): New function.
      	(emit_source_var): Place interpreter related files in
      	interpreter_header_vars.
      	* Makefile.am (ACLOCAL_AMFLAGS): Add -I libltdl.
      	(libgcj_interpret_source_files): New variable.
      	(libgcj_la_SOURCES): Move jvmti.cc and  interpret.cc to
      	libgcj_interpret_source_files and include
      	libgcj_interpret_source_files.
      	(nat_jdwp_source_files): New variable.
      	(nat_jvmti_source_files): Ditto.
      	(nat_source_files): Move jdwp and jvmti related files to
      	nat_jdwp_source_files and nat_jvmti_source_files and include
      	nat_jdwp_source_files and nat_jvmti_source_files.
      	* Makefile.in: Regenerate.
      	* include/Makefile.in: Ditto.
      	* testsuite/Makefile.in: Ditto.
      	* gcj/Makefile.in: Ditto.
      	* sources.am: Ditto.
      	* configure: Ditto.
      	* include/config.h.in: Ditto.
      	* interpret.cc: Remove #ifdef INTERPRETER block.
      	* stacktrace.cc (UnwindTraceFn): Do not handle proxy frames if
      	interpreter disabled.
      	* include/java-interp.h (_Jv_FrameType): Move outside of
      	#ifdef INTERPRETER block.
      	* include/execution.h (_Jv_IndirectCompiledEngine::do_get_closure_list,
      	_Jv_InterpreterEngine, _Jv_soleInterpreterEngine): Place in
      	#ifdef INTERPRETER block.
      	* jni.cc (jvmti.h, jvmti-int.h):  Only include if INTERPRETER is
      	defined.
      	(_Jv_JNI_PopSystemFrame, _Jv_JNI_GetEnv): Only do jvmti processing
      	if INTERPRETER is defined.
      	* prims.cc (jvmti.h, jvmti-int.h, Jdwp.h, VMVirtualMachine.h):  Only
      	include if INTERPRETER is defined.
      	(defaultJdwpOptions, jdwpOptions, jvmti_agent_onload_func,
      	jvmti_agent_onunload_func, jvmti_agentonload, jvmti_agentonunload,
      	jvmti_agent_opts, load_jvmti_agent): Only define if INTERPRETER is
      	defined.
      	(parse_x_arg): Only process 'runjdwp:' if INTERPRETER is defined.
      	(parse_init_args): Only process jvmti related options if
      	INTERPRETER is defined.
      	(_Jv_CreateJavaVM): Only call _Jv_JVMTI_Init if INTERPRETER is
      	defined.
      	(_Jv_RunMain): Only do jvmti and jdwp processing if INTERPRETER is
      	defined.
      	* link.cc (jvmti.h, jvmti-int.h):  Only include if INTERPRETER is
      	defined.
      	(_Jv_ThrowNoClassDefFoundError, _Jv_Linker::create_error_method):
      	Define if if INTERPRETER is not defined.
      	(_Jv_Linker::wait_for_state): Only do jvmti proccessing if
      	INTERPRETER is defined.
      	* boehm.cc (closure_list_pointer, finalize_closure_list,
      	_Jv_ClosureListFinalizer): Only define if INTERPRETER is
      	defined.
      	* java/lang/natThread.cc (jvmti.h, jvmti-int.h):  Only include if
      	INTERPRETER is defined.
      	(finish_, _Jv_NotifyThreadStart): Only do jvmti proccessing if
      	INTERPRETER is defined.
      	* java/lang/Class.h (_Jv_InterpreterEngine): Move declaration
      	and friend declaration inside #ifdef INTERPRETER block.
      	* java/lang/natClass.cc (_Jv_ClosureList::releaseClosures,
      	_Jv_ClosureList::registerClosure, _Jv_GetInterpClassSourceFile):
      	Only define if INTERPRETER is defined.
      	* java/lang/reflect/natVMProxy.cc (UnsupportedOperationException.h):
      	Include.
      	(generateProxyClass): Throw UnsupportedOperationException unless
      	INTERPRETER is defined.
      
      From-SVN: r127097
      86acf60c
  3. Jan 29, 2007
    • Kyle Galloway's avatar
      java-interp.h: Added _Jv_Frame class and its two subclasses _Jv_InterpFrame and _Jv_NativeFrame. · 39273131
      Kyle Galloway authored
      2007-01-29  Kyle Galloway  <kgallowa@redhat.com>
      
      	* include/java-interp.h:  Added _Jv_Frame class and its two
      	subclasses _Jv_InterpFrame and _Jv_NativeFrame.  Also moved
      	_Jv_FrameType from java-stack.h.
      	* include/java-stack.h: Removed _Jv_FrameType.
      	* java/lang/Thread.java: Added frame member to hold new
      	composite frame stack.
      	* java/lang/Thread.h: Regenerated.
      	* java/lang/Thread.class: Rebuilt.
      	* jni.cc (_Jv_JNIMethod::call): Push a frame onto the stack when
      	calling a JNI method.
      	* jvmti.cc (_Jv_JVMTI_GetStackTrace): New Method.
      	(_Jv_JVMTI_GetFrameCount): New method.
      	* stacktrace.cc (UnwindTraceFn): Modified to use new _Jv_Frame
      	classes.
      	* testsuite/libjava.jvmti/interp/getstacktrace.jar: New test.
      	* testsuite/libjava.jvmti/interp/natgetstacktrace.cc: New test.
      	* testsuite/libjava.jvmti/interp/getstacktrace.h: New test.
      	* testsuite/libjava.jvmti/interp/getstacktrace.jar: New test.
      	* testsuite/libjava.jvmti/interp/getstacktrace.out: Output file
      	for test.
      
      From-SVN: r121314
      39273131
  4. Jan 09, 2007
  5. Oct 28, 2006
    • Keith Seitz's avatar
      java-stack.h (ncodeMap): Declare. · f356a436
      Keith Seitz authored
              * include/java-stack.h (ncodeMap): Declare.
              (_Jv_StackTrace): Make _Jv_GetMethodDeclaringClass friend.
              * java/lang/Class.h (_Jv_GetMethodDeclaringClass): Declare.
              * java/lang/natClass.cc (_Jv_GetMethodDeclaringClass): New
              function.
              * stacktrace.cc (ncodeMap): Redefine from file global to global
              for class _Jv_StackTrace.
              (_Jv_StackTrace::UpdateNCodeMap): Add interpreted classes, too,
              so that _Jv_GetMethodDeclaringClass can find them all.
              (_Jv_StackTrace::ClassForFrame): Exclude interpreted classes.
              * jvmti.cc (_Jv_JVMTI_GetMethodDeclaringClass): New function.
              (_Jv_JVMTI_Interface): Define GetMethodDeclaringClass function.
      
      From-SVN: r118100
      f356a436
  6. Sep 27, 2006
    • Jack Howarth's avatar
      re PR target/26792 (need to use autoconf when using newly-added libgcc functions) · d4708d9d
      Jack Howarth authored
      2006-09-26  Jack Howarth  <howarth@bromo.med.uc.edu>
      
      	PR target/26792:
      	* exception.cc (PERSONALITY_FUNCTION): use _Unwind_GetIP
      	if HAVE_GETIPINFO not defined.
      	* stacktrace.cc (_Jv_StackTrace::UnwindTraceFn): Likewise.
      	(_Jv_StackTrace::getLineNumberForFrame): Likewise.
      	* configure.ac: use GCC_CHECK_UNWIND_GETIPINFO.
      	* aclocal.m4, configure, include/config.h.in, Makefile.in:
      	Rebuilt.
      
      From-SVN: r117259
      d4708d9d
  7. Aug 15, 2006
    • Kyle Galloway's avatar
      java-interp.h (_Jv_InterpMethod::run_debug): New method. · 50ac2500
      Kyle Galloway authored
      2006-08-15  Kyle Galloway  <kgallowa@redhat.com>
      
        * include/java-interp.h (_Jv_InterpMethod::run_debug): New method.
        * interpret.cc: Added placeholder for debug variable type info to STORE*
        macros.
        (_Jv_InterpMethod::run_debug): New method.
        (_Jv_InterpMethod::run_sync_object_debug): New method.
        (_Jv_InterpMethod::run_sync_class_debug): New method.
        (_Jv_InterpMethod::run_normal_debug): New method.
        (_Jv_InterpMethod::run_class_debug): New method.
        (_Jv_InterpMethod::ncode ()): Changed to select either debug or normal
        versions of these functions.
        * interpret-run.cc: New file, holds contents of old 	
        _Jv_InterpMethod::run method.
        * stacktrace.cc (_Jv_StackTrace::UnwindTraceFn): Changed to select
        appropriate function for debug or normal mode.
      
      From-SVN: r116167
      50ac2500
  8. Aug 10, 2006
    • Gary Benson's avatar
      java-stack.h (GetAccessControlStack): Change return type. · 3c95dcfd
      Gary Benson authored
      2006-08-10  Gary Benson  <gbenson@redhat.com>
      
      	* include/java-stack.h (GetAccessControlStack): Change return
      	type.
      	* stacktrace.cc (accesscontrol_trace_fn): Record the number of
      	Java frames encountered.
      	(GetAccessControlStack): Return a flag indicating whether a call to
      	doPrivileged was encountered rather than an array of method names.
      	* java/security/natVMAccessController.cc (getStack): Change return
      	type.
      	* java/security/VMAccessController.java (getStack): Likewise.
      	(getContext): Change to reflect the above.
      
      From-SVN: r116058
      3c95dcfd
  9. Aug 09, 2006
    • Gary Benson's avatar
      stacktrace.cc (accesscontrol_trace_fn): Skip non-Java frames. · 9e7ef3a8
      Gary Benson authored
      2006-08-09  Gary Benson  <gbenson@redhat.com>
      
      	* stacktrace.cc (accesscontrol_trace_fn): Skip non-Java frames.
      
      From-SVN: r116038
      9e7ef3a8
    • Gary Benson's avatar
      java-stack.h (accesscontrol_trace_fn): Declare. · c7dc750a
      Gary Benson authored
      2006-08-09  Gary Benson  <gbenson@redhat.com>
      
      	* include/java-stack.h (accesscontrol_trace_fn): Declare.
      	(GetAccessControlStack): Likewise.
      	(GetClassMethodStack): Remove.
      	* stacktrace.cc (accesscontrol_trace_fn): New method.
      	(GetAccessControlStack): Likewise.
      	(GetClassMethodStack): Remove.
      	* java/security/natVMAccessController.cc (getStack): Use
      	GetAccessControlStack.
      
      From-SVN: r116032
      c7dc750a
  10. Jul 28, 2006
    • Gary Benson's avatar
      re PR libgcj/13604 (AccessController unfinished) · 464fc7a1
      Gary Benson authored
      
      2006-07-28  Gary Benson  <gbenson@redhat.com>
      	    Casey Marshall <csm@gnu.org>
      
      	PR libgcj/13604:
      	* include/java-stack.h (GetClassMethodStack): Declare.
      	* stacktrace.cc (GetClassMethodStack): New method.
      	* java/security/AccessController.java: Removed.
      	* java/security/VMAccessController.java: New file.
      	* java/security/natVMAccessController.cc: Likewise.
      	* Makefile.am (nat_source_files): Added the above.
      	* sources.am, Makefile.in: Rebuilt.
      
      
      Co-Authored-By: default avatarCasey Marshall <csm@gnu.org>
      
      From-SVN: r115793
      464fc7a1
  11. Jul 14, 2006
    • Ranjit Mathew's avatar
      stacktrace.cc (_Jv_StackTrace::GetStackTrace): Unconditionally use _Unwind_Backtrace(). · 38b19a92
      Ranjit Mathew authored
      	* stacktrace.cc (_Jv_StackTrace::GetStackTrace): Unconditionally use
      	_Unwind_Backtrace().
      	(_Jv_StackTrace::GetCallerInfo): Enable even for targets using SJLJ
      	EH.
      	(_Jv_StackTrace::GetClassContext): Unconditionally use
      	_Unwind_Backtrace().
      	(_Jv_StackTrace::GetFirstNonSystemClassLoader): Likewise.
      	* sysdep/i386/backtrace.h (HAVE_FALLBACK_BACKTRACE): Do not define.
      	(_Unwind_GetIPInfo): Define macro if SJLJ EH is in use.
      	(_Unwind_GetRegionStart): Likewise.
      	(_Unwind_Backtrace): Likewise.
      	(fallback_backtrace): Accept additional unwind trace function
      	argument.  Call it during unwinding.  Stop when any of _Jv_RunMain(),
      	_Jv_ThreadStart() or main() is seen during unwinding.
      	* sysdep/generic/backtrace.h (fallback_backtrace): Accept an
      	additional unwind trace function argument.
      
      From-SVN: r115449
      38b19a92
  12. Jul 12, 2006
  13. Jul 06, 2006
    • Bryce McKinlay's avatar
      stacktrace.cc (ClassForFrame): Remove commented-out code. · 21dc6684
      Bryce McKinlay authored
      2006-07-06  Bryce McKinlay <mckinlay@redhat.com>
      
              * stacktrace.cc (ClassForFrame): Remove commented-out code.
              (UnwindTraceFn): Use _Unwind_GetIPInfo and adjust IP
              only when needed.
              (getLineNumberForFrame): Don't adjust IP here.
              * testsuite/libjava.lang/StackTrace.java: New test case.
              * testsuite/libjava.lang/StackTrace.out: Ditto.
      
      From-SVN: r115235
      21dc6684
  14. Jun 29, 2006
    • Ranjit Mathew's avatar
      javaprims.h (_Jv_uintptr_t): New typedef similar to uintptr_t in C99. · 33792684
      Ranjit Mathew authored
      	* gcj/javaprims.h (_Jv_uintptr_t): New typedef similar to uintptr_t in
      	C99.
      	* include/java-stack.h: Include stdlib.h.
      	(_Jv_AddrInfo): New structure to hold address information.
      	* include/posix.h (_Jv_platform_dladdr): Declare.
      	* include/win32.h (_Jv_platform_dladdr): Declare.
      	(backtrace): Remove declaration.
      	* posix.cc: Include dlfcn.h if available.  Include java-stack.h.
      	(_Jv_platform_dladdr): Define.
      	* win32.cc: Include string.h.  Include java-stack.h.
      	(backtrace): Remove.
      	(_Jv_platform_dladdr): Define.
      	* sysdep/i386/backtrace.h (fallback_backtrace): Check that a potential
      	frame pointer value is 32-bit word-aligned.  Use operand of the CALL
      	instruction calling the current function to find its starting address.
      	* stacktrace.cc: Do not include dlfcn.h.  Include platform.h.
      	(_Jv_StackTrace::getLineNumberForFrame): Use _Jv_platform_dladdr()
      	instead of dladdr().
      	(_Jv_StackTrace::GetStackTraceElements): Use nCodeMap even for Windows.
      	(_Jv_StackTrace::GetClassContext): Use fallback_backtrace() for
      	targets with SJLJ exceptions instead of using _Unwind_Backtrace().
      	(_Jv_StackTrace::GetFirstNonSystemClassLoader): Likewise.
      
      From-SVN: r115069
      33792684
  15. Jun 06, 2006
    • David Daney's avatar
      gcj.texi (libgcj Runtime Properties): Document gnu.gcj.runtime.NameFinder.show_raw and... · 696dad4b
      David Daney authored
      2006-06-05  David Daney  <ddaney@avtrex.com>
      
      	* gcj.texi (libgcj Runtime Properties): Document
      	gnu.gcj.runtime.NameFinder.show_raw and
      	gnu.gcj.runtime.NameFinder.remove_unknown.
      
      2006-06-05  David Daney  <ddaney@avtrex.com>
      
      	* gnu/gcj/runtime/NameFinder.java (show_raw): New field.
      	(showRaw): New method.
      	* stacktrace.cc : Include gnu/gcj/runtime/StringBuffer.h.
      	(getLineNumberForFrame): Show IP offset in trace if line number
      	not available and show_raw true.
      
      From-SVN: r114437
      696dad4b
  16. May 30, 2006
  17. May 15, 2006
  18. Feb 17, 2006
    • Andrew Haley's avatar
      stacktrace.cc (GetStackTraceElements): Call... · 24ca2a96
      Andrew Haley authored
      stacktrace.cc (GetStackTraceElements): Call gnu::gcj::runtime::NameFinder::removeUnknown() to determine if...
      
      2006-02-16  Andrew Haley  <aph@redhat.com>
      
              * stacktrace.cc (GetStackTraceElements): Call
              gnu::gcj::runtime::NameFinder::removeUnknown() to determine if
              non-Java frames should be removed from a printed stack trace.
              Pass methodName to getLineNumberForFrame().
              (getLineNumberForFrame): Set method_name from info.dli_sname.
              * gnu/gcj/runtime/NameFinder.java (removeUnknown): New method.
              (remove_unknown): New variable.
              * include/java-stack.h (_Jv_StackTrace::getLineNumberForFrame):
              Add methodName arg.
      
      From-SVN: r111181
      24ca2a96
  19. Nov 30, 2005
  20. Aug 21, 2005
  21. May 25, 2005
    • Richard Henderson's avatar
      re PR libgcj/21692 (unexpected java.lang.NoClassDefFoundError) · eb2925b6
      Richard Henderson authored
              PR libgcj/21692
              * 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.
      
      From-SVN: r100173
      eb2925b6
  22. May 15, 2005
  23. Mar 24, 2005
    • Tom Tromey's avatar
      Makefile.in: Rebuilt. · aa893047
      Tom Tromey authored
      	* Makefile.in: Rebuilt.
      	* 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.
      
      From-SVN: r96960
      aa893047
  24. Mar 22, 2005
  25. Mar 21, 2005
    • Andrew Haley's avatar
      natVMSecurityManager.cc (getClassContext): Add new arg: klass. · e5a8980b
      Andrew Haley authored
      2005-03-17  Andrew Haley  <aph@redhat.com>
      
      	* 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.
      
      From-SVN: r96803
      e5a8980b
  26. Mar 16, 2005
    • Andreas Tobler's avatar
      stacktrace.cc (_Jv_StackTrace::UnwindTraceFn): Protect interpreter-specific... · 455d8f06
      Andreas Tobler authored
      stacktrace.cc (_Jv_StackTrace::UnwindTraceFn): Protect interpreter-specific code with #ifdef INTERPRETER.
      
      2005-03-15  Andreas Tobler  <a.tobler@schweiz.ch>
      
              * 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.
      
      From-SVN: r96571
      455d8f06
  27. Mar 12, 2005
  28. Mar 10, 2005
    • Bryce McKinlay's avatar
      New Stack Trace infrastructure. · 18744d9b
      Bryce McKinlay authored
      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
      18744d9b
Loading