diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-15 22:03:19 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-15 22:03:19 +0000 |
commit | 648fb7469753f7d785415f596c2b250c635db9ad (patch) | |
tree | 6ff411e4ce4a6ce8717905d98f2d63b7479a6539 /libjava/exception.cc | |
parent | 74636a3e7b0c19f83026989b46a3712f7691b320 (diff) | |
download | gcc-648fb7469753f7d785415f596c2b250c635db9ad.tar.gz |
2000-03-15 Tom Tromey <tromey@cygnus.com>
* java/io/natFileDescriptorWin32.cc (winerr): Now static.
* prims.cc (win32_exception_handler): Reformatted.
* include/win32-threads.h (_Jv_HaveCondDestroy): New define.
(_Jv_HaveMutexDestroy): Likewise.
2000-03-15 Jon Beniston <jb7216@bristol.ac.uk>
* java/io/natFileDescriptorWin32.cc: New file.
* java/io/natFileWin32.cc: New file.
* java/net/natInetAddress.cc: Added conditional inclusion of
Windows / Winsock headers.
* java/net/natPlainDatagramSocketImpl.cc: Added conditional
inclusion of Windows / Winsock headers.
* java/net/natPlainSocketImpl.cc: Added conditional inclusion of
Windows / Winsock headers.
* include/win32-signal.h: New file.
* include/win32-threads.h: New file.
* win32-threads.cc: New file.
* exception.cc (win32_get_restart_frame): New function.
* prims.cc (win32_exception_handler): New function.
(main_init) Performs Winsock initialisation.
(main_init) Installs exeception handler.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32567 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/exception.cc')
-rw-r--r-- | libjava/exception.cc | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/libjava/exception.cc b/libjava/exception.cc index 1ee56aecd73..30ef55c078c 100644 --- a/libjava/exception.cc +++ b/libjava/exception.cc @@ -37,7 +37,7 @@ extern "C" void __throw () __attribute__ ((__noreturn__)); extern "C" void __sjthrow () __attribute__ ((__noreturn__)); extern "C" short __get_eh_table_version (void *table); extern "C" short __get_eh_table_language (void *table); - +extern "C" void *__get_eh_context (); extern "C" void * _Jv_type_matcher (java_eh_info *info, void* match_info, @@ -161,3 +161,36 @@ _Jv_Throw (void *value) __throw (); #endif } + +#ifdef USE_WIN32_SIGNALLING + +// This is a mangled version of _Jv_Throw and __sjthrow except +// rather than calling longjmp, it returns a pointer to the jmp buffer + +extern "C" int * +win32_get_restart_frame (void *value) +{ + struct eh_context *eh = (struct eh_context *)__get_eh_context (); + void ***dhc = &eh->dynamic_handler_chain; + + java_eh_info *ehinfo = *(__get_eh_info ()); + if (ehinfo == NULL) + { + _Jv_eh_alloc (); + ehinfo = *(__get_eh_info ()); + } + ehinfo->eh_info.match_function = (__eh_matcher) _Jv_type_matcher; + ehinfo->eh_info.language = EH_LANG_Java; + ehinfo->eh_info.version = 1; + ehinfo->value = value; + + // FIXME: Run clean ups? + + int *jmpbuf = (int*)&(*dhc)[2]; + + *dhc = (void**)(*dhc)[0]; + + return jmpbuf; +} + +#endif /* USE_WIN32_SIGNALLING */ |