aboutsummaryrefslogtreecommitdiff
path: root/libjava/sysdep
AgeCommit message (Collapse)AuthorFilesLines
2005-03-10New Stack Trace infrastructure.Bryce McKinlay2-0/+64
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
2004-07-07configure.host: Enable hash synchronization on Darwin.Andreas Tobler1-12/+12
2004-07-07 Andreas Tobler <a.tobler@schweiz.ch> * configure.host: Enable hash synchronization on Darwin. * sysdep/powerpc/locks.h (compare_and_swap): Use '\n' instead of ';', since this is a comment on Darwin. (compare_and_swap_release): Likewise. From-SVN: r84214
2004-03-19configure.in: Build java for hppa target.Randolph Chung1-0/+78
2004-02-10 Randolph Chung <tausq@debian.org> * configure.in: Build java for hppa target. * configure: Regenerate. * libjava/configure.host (hppa-*): Add target. * libjava/sysdeps/pa/lock.h: New file. From-SVN: r79703
2004-01-16locks.h: Don't use in/out memory constraints.Andrew Haley2-6/+6
2004-01-16 Andrew Haley <aph@redhat.com> * sysdep/x86-64/locks.h: Don't use in/out memory constraints. * sysdep/i386/locks.h: Likewise. From-SVN: r75982
2003-10-28locks.h (__cas_start_atomic): %g0 --> %%g0.David S. Miller1-2/+2
2003-10-28 David S. Miller <davem@redhat.com> * sysdep/sparc/locks.h (__cas_start_atomic): %g0 --> %%g0. From-SVN: r73006
2003-10-22mips-signal.h: New file.David Daney2-0/+195
2003-10-22 David Daney <ddaney@avtrex.com) * include/mips-signal.h: New file. * sysdep/dwarf2-backtrace.cc: New file. * sysdep/mips: New directory. * sysdep/mips/locks.h: New file. * Makefile.am(extra_cc_files): New, to allow extra c++ files to be added to libgcj. (extra_cc_source_files): Ditto. * configure.host(disable_dladdr): New shell variable passed to configure. (mips*-*-linux*): sysdeps_dir=mips, can_unwind_signal=yes, disable_dladdr=yes, use -mxgot. (mipsel*-linux* | mipsisa32el*-linux*): Enable hash synchronization. * configure.in:(mips*-*-linux*): Use sysdep/dwarf2-backtrace.cc to generate backtrace, and include/mips-signal.h as SIGNAL_HANDLER (HAVE_DLADDR): Make it depend on setting of disable_dladdr. (EXTRA_CC_FILES): New, to support conditional addition of sysdep/dwarf2-backtrace.cc. * configure: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/config.h.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. From-SVN: r72808
2003-03-22locks.h: Include ia64intrin.h.Richard Henderson1-11/+10
* sysdep/ia64/locks.h: Include ia64intrin.h. (compare_and_swap): Use __sync_bool_compare_and_swap. (compare_and_swap_release): Expose ar.ccv assignment. From-SVN: r64737
2002-10-08configure.host [s390*-*]: Enable Java interpreter.Ulrich Weigand1-0/+77
* configure.host [s390*-*]: Enable Java interpreter. Enable hash synchronization. Add sysdeps dir. * sysdep/s390/locks.h: New file. From-SVN: r57927
2002-10-01locks.h (compare_and_swap): Fix multilib support.Bo Thorsen1-0/+7
2002-09-30 Bo Thorsen <bo@suse.de> * sysdep/x86-64/locks.h (compare_and_swap): Fix multilib support. From-SVN: r57682
2002-08-01configure.host: Add SH support.Kaz Kojima1-0/+72
* configure.host: Add SH support. * sysdep/sh/locks.h: New file. From-SVN: r55922
2002-07-30locks.h: Formatting.Alan Modra1-18/+31
* sysdep/powerpc/locks.h: Formatting. (_LARX): Define. (_STCX): Define. (compare_and_swap): Use _LARX and _STCX. (compare_and_swap_release): Likewise. From-SVN: r55855
2002-07-19ieeefp.h: Add x86-64 support.Bo Thorsen1-0/+74
2002-07-19 Bo Thorsen <bo@berlioz.suse.de> * java/lang/ieeefp.h: Add x86-64 support. * configure.in: Likewise. * configure.host: Likewise. * configure: Regenerated. * sysdep/x86-64/locks.h: New file with x86-64 locks. From-SVN: r55588
2002-04-21dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer arg.David S. Miller1-0/+120
2002-04-19 David S. Miller <davem@redhat.com> * include/dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer arg. (MAKE_THROW_FRAME): Define for 32-bit and 64-bit sparc. (INIT_SEGV, INIT_FPE): Use direct __libc_sigaction installation on Sparc too. * include/sparc-signal.h (FLUSH_REGISTER_WINDOWS): Define properly for 64-bit sparc. (MAKE_THROW_FRAME): Use long for sp/retaddr so 64-bit works. * sysdeps/sparc/locks.h: New file. * configure.in (SIGNAL_HANDLER): Set to include/sparc-signal.h on all sparc Solaris configurations. Set to include/dwarf2-signal.h on sparc Linux. * configure: Regenerate * configure.host (can_unwind_signal): sparc*-linux* can do it now. From-SVN: r52575
2002-03-21posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use write_barrier, not ↵Bryce McKinlay2-0/+16
release_set. * posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use write_barrier, not release_set. * sysdep/powerpc/locks.h (write_barrier): New function. * sysdep/i386/locks.h (write_barrier): New function. From-SVN: r51101
2002-03-10configure.in: Define SLOW_PTHREAD_SELF if configure.host set slow_pthread_self.Bryce McKinlay5-0/+257
libjava: * configure.in: Define SLOW_PTHREAD_SELF if configure.host set slow_pthread_self. Set up symlink for sysdeps directory. * configure.host: Document more shell variables. Set sysdeps_dir for most platforms. Set slow_pthread_self for i686. Set enable_hash_synchronization_default and slow_pthread_self for PowerPC. * posix-threads.cc (_Jv_ThreadSelf_out_of_line): Use release_set so that memory barrier is emitted where required. * include/posix-threads.h (_Jv_ThreadSelf for SLOW_PTHREAD_SELF): Add read_barrier() to enforce ordering of reads. * sysdep/powerpc/locks.h: New file. Implementation of synchronization primitives for PowerPC. * sysdep/i386/locks.h: New file. Synchronization primitives for i386 moved from natObject.cc. * sysdep/alpha/locks.h: Likewise. * sysdep/ia64/locks.h: Likewise. * sysdep/generic/locks.h: Likewise. * java/lang/natObject.cc: Move thread synchronization primitives to system-dependent headers. gcc/java: * decl.c (java_init_decl_processing): Make sure class_type_node alignment is not less than 64 bits if hash synchronization is enabled. boehm-gc: * include/gc_priv.h: Define ALIGN_DOUBLE on 32 bit targets if GCJ support is enabled, for hash synchronization. [[Split portion of a mixed commit.]] From-SVN: r50518.2
2000-05-19Jumbo patch:Tom Tromey2-0/+363
* Imported beans and serialization * Updated IA-64 port * Miscellaneous bug fixes From-SVN: r34028