diff options
author | rmathew <rmathew@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-14 17:14:55 +0000 |
---|---|---|
committer | rmathew <rmathew@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-14 17:14:55 +0000 |
commit | 8d33073e7284d3b26f4b0762d16b5577f014613f (patch) | |
tree | 1ac7aeccd28a2e9650dfd7a152bfcbe590ed728e /libjava/stacktrace.cc | |
parent | 199f9baaccc96ea58ddbe7e7d17d8dbf897fc199 (diff) | |
download | gcc-8d33073e7284d3b26f4b0762d16b5577f014613f.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115449 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/stacktrace.cc')
-rw-r--r-- | libjava/stacktrace.cc | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/libjava/stacktrace.cc b/libjava/stacktrace.cc index ed0700bd629..ba971ddc13e 100644 --- a/libjava/stacktrace.cc +++ b/libjava/stacktrace.cc @@ -153,13 +153,7 @@ _Jv_StackTrace::GetStackTrace(void) _Jv_UnwindState state (trace_size); state.frames = (_Jv_StackFrame *) &frames; -#ifdef SJLJ_EXCEPTIONS - // The Unwind interface doesn't work with the SJLJ exception model. - // Fall back to a platform-specific unwinder. - fallback_backtrace (&state); -#else /* SJLJ_EXCEPTIONS */ _Unwind_Backtrace (UnwindTraceFn, &state); -#endif /* SJLJ_EXCEPTIONS */ // Copy the trace and return it. int traceSize = sizeof (_Jv_StackTrace) + @@ -423,7 +417,6 @@ void _Jv_StackTrace::GetCallerInfo (jclass checkClass, jclass *caller_class, _Jv_Method **caller_meth) { -#ifndef SJLJ_EXCEPTIONS int trace_size = 20; _Jv_StackFrame frames[trace_size]; _Jv_UnwindState state (trace_size); @@ -447,9 +440,6 @@ _Jv_StackTrace::GetCallerInfo (jclass checkClass, jclass *caller_class, *caller_class = trace_data.foundClass; if (caller_meth) *caller_meth = trace_data.foundMeth; -#else - return; -#endif } // Return a java array containing the Java classes on the stack above CHECKCLASS. @@ -466,13 +456,7 @@ _Jv_StackTrace::GetClassContext (jclass checkClass) //JvSynchronized (ncodeMap); UpdateNCodeMap (); -#ifdef SJLJ_EXCEPTIONS - // The Unwind interface doesn't work with the SJLJ exception model. - // Fall back to a platform-specific unwinder. - fallback_backtrace (&state); -#else /* SJLJ_EXCEPTIONS */ _Unwind_Backtrace (UnwindTraceFn, &state); -#endif /* SJLJ_EXCEPTIONS */ // Count the number of Java frames on the stack. int jframe_count = 0; @@ -543,13 +527,7 @@ _Jv_StackTrace::GetFirstNonSystemClassLoader () //JvSynchronized (ncodeMap); UpdateNCodeMap (); -#ifdef SJLJ_EXCEPTIONS - // The Unwind interface doesn't work with the SJLJ exception model. - // Fall back to a platform-specific unwinder. - fallback_backtrace (&state); -#else /* SJLJ_EXCEPTIONS */ _Unwind_Backtrace (UnwindTraceFn, &state); -#endif /* SJLJ_EXCEPTIONS */ if (state.trace_data) return (ClassLoader *) state.trace_data; |