prims.cc (_Jv_CreateJavaVM): Install SEGV and FPE handlers...

* prims.cc (_Jv_CreateJavaVM): Install SEGV and FPE handlers,
	if desired, before the default class loader is initialised.
	Call INIT_SEGV only if HANDLE_SEGV is defined.

From-SVN: r83348
This commit is contained in:
Ranjit Mathew 2004-06-18 13:59:04 +00:00 committed by Ranjit Mathew
parent 6ca77e6fa4
commit bd760894e6
2 changed files with 15 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2004-06-18 Ranjit Mathew <rmathew@hotmail.com>
* prims.cc (_Jv_CreateJavaVM): Install SEGV and FPE handlers,
if desired, before the default class loader is initialised.
Call INIT_SEGV only if HANDLE_SEGV is defined.
2004-06-18 Ranjit Mathew <rmathew@hotmail.com> 2004-06-18 Ranjit Mathew <rmathew@hotmail.com>
* gnu/gcj/runtime/VMClassLoader.java (init): Add extensions * gnu/gcj/runtime/VMClassLoader.java (init): Add extensions

View File

@ -954,6 +954,14 @@ _Jv_CreateJavaVM (void* /*vm_args*/)
_Jv_InitGC (); _Jv_InitGC ();
_Jv_InitializeSyncMutex (); _Jv_InitializeSyncMutex ();
#ifdef HANDLE_SEGV
INIT_SEGV;
#endif
#ifdef HANDLE_FPE
INIT_FPE;
#endif
/* Initialize Utf8 constants declared in jvm.h. */ /* Initialize Utf8 constants declared in jvm.h. */
void_signature = _Jv_makeUtf8Const ("()V", 3); void_signature = _Jv_makeUtf8Const ("()V", 3);
clinit_name = _Jv_makeUtf8Const ("<clinit>", 8); clinit_name = _Jv_makeUtf8Const ("<clinit>", 8);
@ -980,15 +988,11 @@ _Jv_CreateJavaVM (void* /*vm_args*/)
// initialization of ClassLoader before we start the initialization // initialization of ClassLoader before we start the initialization
// of VMClassLoader. // of VMClassLoader.
_Jv_InitClass (&java::lang::ClassLoader::class$); _Jv_InitClass (&java::lang::ClassLoader::class$);
// Once the bootstrap loader is in place, change it into a kind of // Once the bootstrap loader is in place, change it into a kind of
// system loader, by having it read the class path. // system loader, by having it read the class path.
gnu::gcj::runtime::VMClassLoader::initialize(); gnu::gcj::runtime::VMClassLoader::initialize();
INIT_SEGV;
#ifdef HANDLE_FPE
INIT_FPE;
#endif
no_memory = new java::lang::OutOfMemoryError; no_memory = new java::lang::OutOfMemoryError;
java::lang::VMThrowable::trace_enabled = 1; java::lang::VMThrowable::trace_enabled = 1;