diff options
author | Andrew Haley <aph@redhat.com> | 2003-03-10 19:45:30 +0000 |
---|---|---|
committer | Andrew Haley <aph@redhat.com> | 2003-03-10 19:45:30 +0000 |
commit | ea5bf8fb7bb06735a53bc1bb1f1c94dda588f056 (patch) | |
tree | a4c3279fd9e6344dedbfac2337937e049b960715 /libjava/win32.cc | |
parent | beaf15f30f265d734500388320dcb39f5670c394 (diff) |
2003-03-10 2003-02-27 Mohan Embar <gnustuff@thisiscool.com>
* include/jvm.h: removed declaration of _Jv_ThisExecutable()
setter; made return value of getter const char* instead of char*
* prims.cc: removed all references to _Jv_ThisExecutable().
These are in the platform-specific sections now.
* posix.cc: define platform-specific _Jv_ThisExecutable().
Handle DISABLE_MAIN_ARGS and HAVE_PROC_SELF_EXE cases
* win32.cc: define platform-specific _Jv_ThisExecutable()
using GetModuleFilename()
* java/lang/natRuntime.cc: set gnu.gcj.progname property
to argv[0] instead of _Jv_ThisExecutable()
2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
* gnu/gcj/runtime/NameFinder.java (usingAddr2name): New flag
that is set if we are using addr2name.awk instead of addr2line.
(NameFinder): Set usingAddr2name if using addr2name.awk.
(getExternalLabel): New native method to convert a method
name to an external label.
(lookup): Convert name given by addr2line to an external label
before demangling.
* gnu/gcj/runtime/natNameFinder.cc (LABEL_PREFIX): New string
constant representing the prefix attached to method names to
convert them to an external label.
(gnu::gcj::runtime::NameFinder::getExternalLabel): Define
using LABEL_PREFIX.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@64111 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/win32.cc')
-rw-r--r-- | libjava/win32.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libjava/win32.cc b/libjava/win32.cc index 59c3be244b6..6fc2de08760 100644 --- a/libjava/win32.cc +++ b/libjava/win32.cc @@ -28,6 +28,15 @@ win32_exception_handler (LPEXCEPTION_POINTERS e) return EXCEPTION_CONTINUE_SEARCH; } +// Platform-specific executable name +static char exec_name[MAX_PATH]; + // initialized in _Jv_platform_initialize() + +const char *_Jv_ThisExecutable (void) +{ + return exec_name; +} + // Platform-specific VM initialization. void _Jv_platform_initialize (void) @@ -37,8 +46,12 @@ _Jv_platform_initialize (void) if (WSAStartup (MAKEWORD (1, 1), &data)) MessageBox (NULL, "Error initialising winsock library.", "Error", MB_OK | MB_ICONEXCLAMATION); + // Install exception handler SetUnhandledExceptionFilter (win32_exception_handler); + + // Initialize our executable name + GetModuleFileName(NULL, exec_name, sizeof(exec_name)); } // gettimeofday implementation. |