From 45f8ab39289f042c9ceb7b9c9498678712d3b670 Mon Sep 17 00:00:00 2001 From: aph Date: Mon, 10 Mar 2003 19:45:30 +0000 Subject: 2003-03-10 2003-02-27 Mohan Embar * 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 * 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64111 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/prims.cc | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'libjava/prims.cc') diff --git a/libjava/prims.cc b/libjava/prims.cc index 61c66540831..dc05d4b96ff 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -86,9 +86,6 @@ const char *_Jv_Jar_Class_Path; property_pair *_Jv_Environment_Properties; #endif -// The name of this executable. -static char *_Jv_execName; - // Stash the argv pointer to benefit native libraries that need it. const char **_Jv_argv; int _Jv_argc; @@ -707,22 +704,6 @@ static JArray *arg_vec; // The primary thread. static java::lang::Thread *main_thread; -char * -_Jv_ThisExecutable (void) -{ - return _Jv_execName; -} - -void -_Jv_ThisExecutable (const char *name) -{ - if (name) - { - _Jv_execName = (char *) _Jv_Malloc (strlen (name) + 1); - strcpy (_Jv_execName, name); - } -} - #ifndef DISABLE_GETENV_PROPERTIES static char * @@ -960,19 +941,6 @@ _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv, java::lang::Runtime *runtime = NULL; - -#ifdef DISABLE_MAIN_ARGS - _Jv_ThisExecutable ("[Embedded App]"); -#else -#ifdef HAVE_PROC_SELF_EXE - char exec_name[20]; - sprintf (exec_name, "/proc/%d/exe", getpid ()); - _Jv_ThisExecutable (exec_name); -#else - _Jv_ThisExecutable (argv[0]); -#endif /* HAVE_PROC_SELF_EXE */ -#endif /* DISABLE_MAIN_ARGS */ - try { // Set this very early so that it is seen when java.lang.System -- cgit v1.2.1