aboutsummaryrefslogtreecommitdiff
path: root/libjava/prims.cc
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@albatross.co.nz>2000-12-22 06:19:24 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2000-12-22 06:19:24 +0000
commit86a42a5f2443414d63765a4bc84df0530bc32557 (patch)
tree66855e76aba1a3329f80828763a2d88be59a8adb /libjava/prims.cc
parent98c17df26efeca1425578371232ecc9255f47e10 (diff)
downloadgcc-86a42a5f2443414d63765a4bc84df0530bc32557.zip
gcc-86a42a5f2443414d63765a4bc84df0530bc32557.tar.gz
gcc-86a42a5f2443414d63765a4bc84df0530bc32557.tar.bz2
Throwable.java (trace_enabled): New static field.
* java/lang/Throwable.java (trace_enabled): New static field. * java/lang/natThrowable.cc (fillInStackTrace): Do nothing if trace_enabled not set. * prims.cc (main_init): Turn off trace_enabled while creating default exception objects. From-SVN: r38442
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r--libjava/prims.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc
index c6b8d20..0658574 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -687,6 +687,10 @@ win32_exception_handler (LPEXCEPTION_POINTERS e)
static void
main_init ()
{
+ // Turn stack trace generation off while creating exception objects.
+ _Jv_InitClass (&java::lang::Throwable::class$);
+ java::lang::Throwable::trace_enabled = 0;
+
INIT_SEGV;
#ifdef HANDLE_FPE
INIT_FPE;
@@ -697,6 +701,8 @@ main_init ()
no_memory = new java::lang::OutOfMemoryError;
+ java::lang::Throwable::trace_enabled = 1;
+
#ifdef USE_LTDL
LTDL_SET_PRELOADED_SYMBOLS ();
#endif