hotspot/make/hotspot.script
changeset 22734 41757c1f3946
parent 22234 da823d78ad65
child 32575 059965be379b
--- a/hotspot/make/hotspot.script	Thu Jan 30 09:41:45 2014 +0100
+++ b/hotspot/make/hotspot.script	Thu Jan 30 14:12:22 2014 -0800
@@ -49,7 +49,7 @@
     GDB=gdb
 fi
 
-# This is the name of the gdb binary to use
+# This is the name of the dbx binary to use
 if [ ! "$DBX" ]
 then
     DBX=dbx
@@ -68,9 +68,16 @@
 # End of user changeable parameters -----------------------------------------
 #
 
+OS=`uname -s`
+
 # Make sure the paths are fully specified, i.e. they must begin with /.
 REL_MYDIR=`dirname $0`
 MYDIR=`cd $REL_MYDIR && pwd`
+case "$OS" in
+CYGWIN*)
+    MYDIR=`cygpath -m "$MYDIR"`
+    ;;
+esac
 
 #
 # Look whether the user wants to run inside gdb
@@ -102,8 +109,17 @@
     JDK=@@JDK_IMPORT_PATH@@
 fi
 
-if [ "${JDK}" = "" ]; then
-    echo "Failed to find JDK.  Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty."
+if [ "${JDK}" != "" ]; then
+    case "$OS" in
+    CYGWIN*)
+        JDK=`cygpath -m "$JDK"`
+        ;;
+	esac
+
+else
+    echo "Failed to find JDK." \
+        "Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty."
+    exit 1
 fi
 
 # We will set the LD_LIBRARY_PATH as follows:
@@ -120,7 +136,6 @@
 
 
 # Set up a suitable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH
-OS=`uname -s`
 if [ "${OS}" = "Darwin" ]
 then
     if [ -z "$DYLD_LIBRARY_PATH" ]
@@ -141,7 +156,7 @@
     export LD_LIBRARY_PATH
 fi
 
-JPARMS="-Dsun.java.launcher=gamma -XXaltjvm=$MYDIR $@ $JAVA_ARGS";
+JPARMS="-XXaltjvm=$MYDIR -Dsun.java.launcher.is_altjvm=true $@ $JAVA_ARGS";
 
 # Locate the java launcher
 LAUNCHER=$JDK/bin/java
@@ -152,6 +167,11 @@
 
 GDBSRCDIR=$MYDIR
 BASEDIR=`cd $MYDIR/../../.. && pwd`
+case "$OS" in
+CYGWIN*)
+    BASEDIR=`cygpath -m "$BASEDIR"`
+    ;;
+esac
 
 init_gdb() {
 # Create a gdb script in case we should run inside gdb