equal
deleted
inserted
replaced
27 # If the first parameter is either "-gdb" or "-gud", HotSpot will be |
27 # If the first parameter is either "-gdb" or "-gud", HotSpot will be |
28 # launched inside gdb. "-gud" means "open an Emacs window and run gdb |
28 # launched inside gdb. "-gud" means "open an Emacs window and run gdb |
29 # inside Emacs". |
29 # inside Emacs". |
30 # |
30 # |
31 # If the first parameter is "-dbx", HotSpot will be launched inside dbx. |
31 # If the first parameter is "-dbx", HotSpot will be launched inside dbx. |
32 # |
32 # |
33 # If the first parameter is "-valgrind", HotSpot will be launched |
33 # If the first parameter is "-valgrind", HotSpot will be launched |
34 # inside Valgrind (http://valgrind.kde.org) using the Memcheck skin, |
34 # inside Valgrind (http://valgrind.kde.org) using the Memcheck skin, |
35 # and with memory leak detection enabled. This currently (2005jan19) |
35 # and with memory leak detection enabled. This currently (2005jan19) |
36 # requires at least Valgrind 2.3.0. -Xmx16m will also be passed as |
36 # requires at least Valgrind 2.3.0. -Xmx16m will also be passed as |
37 # the first parameter to HotSpot, since lowering HotSpot's memory |
37 # the first parameter to HotSpot, since lowering HotSpot's memory |
43 # User changeable parameters ------------------------------------------------ |
43 # User changeable parameters ------------------------------------------------ |
44 # |
44 # |
45 |
45 |
46 # This is the name of the gdb binary to use |
46 # This is the name of the gdb binary to use |
47 if [ ! "$GDB" ] |
47 if [ ! "$GDB" ] |
48 then |
48 then |
49 GDB=gdb |
49 GDB=gdb |
50 fi |
50 fi |
51 |
51 |
52 # This is the name of the gdb binary to use |
52 # This is the name of the gdb binary to use |
53 if [ ! "$DBX" ] |
53 if [ ! "$DBX" ] |
54 then |
54 then |
55 DBX=dbx |
55 DBX=dbx |
56 fi |
56 fi |
57 |
57 |
58 # This is the name of the Valgrind binary to use |
58 # This is the name of the Valgrind binary to use |
59 if [ ! "$VALGRIND" ] |
59 if [ ! "$VALGRIND" ] |
60 then |
60 then |
61 VALGRIND=valgrind |
61 VALGRIND=valgrind |
62 fi |
62 fi |
63 |
63 |
64 # This is the name of Emacs for running GUD |
64 # This is the name of Emacs for running GUD |
65 EMACS=emacs |
65 EMACS=emacs |
96 esac |
96 esac |
97 |
97 |
98 JDK= |
98 JDK= |
99 if [ "${ALT_JAVA_HOME}" = "" ]; then |
99 if [ "${ALT_JAVA_HOME}" = "" ]; then |
100 . ${MYDIR}/jdkpath.sh |
100 . ${MYDIR}/jdkpath.sh |
101 else |
101 else |
102 JDK=${ALT_JAVA_HOME%%/jre}; |
102 JDK=${ALT_JAVA_HOME%%/jre}; |
103 fi |
103 fi |
104 |
104 |
105 if [ "${JDK}" = "" ]; then |
105 if [ "${JDK}" = "" ]; then |
106 echo Failed to find JDK. ALT_JAVA_HOME is not set or ./jdkpath.sh is empty or not found. |
106 echo Failed to find JDK. ALT_JAVA_HOME is not set or ./jdkpath.sh is empty or not found. |
112 # o $JRE/lib/$ARCH |
112 # o $JRE/lib/$ARCH |
113 # followed by the user's previous effective LD_LIBRARY_PATH, if |
113 # followed by the user's previous effective LD_LIBRARY_PATH, if |
114 # any. |
114 # any. |
115 JRE=$JDK/jre |
115 JRE=$JDK/jre |
116 JAVA_HOME=$JDK |
116 JAVA_HOME=$JDK |
|
117 export JAVA_HOME |
|
118 |
117 ARCH=@@LIBARCH@@ |
119 ARCH=@@LIBARCH@@ |
118 |
|
119 SBP=${MYDIR}:${JRE}/lib/${ARCH} |
120 SBP=${MYDIR}:${JRE}/lib/${ARCH} |
120 |
121 |
121 # Set up a suitable LD_LIBRARY_PATH |
122 |
122 |
123 # Set up a suitable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH |
123 if [ -z "$LD_LIBRARY_PATH" ] |
124 OS=`uname -s` |
124 then |
125 if [ "${OS}" = "Darwin" ] |
125 LD_LIBRARY_PATH="$SBP" |
126 then |
|
127 if [ -z "$DYLD_LIBRARY_PATH" ] |
|
128 then |
|
129 DYLD_LIBRARY_PATH="$SBP" |
|
130 else |
|
131 DYLD_LIBRARY_PATH="$SBP:$DYLD_LIBRARY_PATH" |
|
132 fi |
|
133 export DYLD_LIBRARY_PATH |
126 else |
134 else |
127 LD_LIBRARY_PATH="$SBP:$LD_LIBRARY_PATH" |
135 # not 'Darwin' |
128 fi |
136 if [ -z "$LD_LIBRARY_PATH" ] |
129 |
137 then |
130 export LD_LIBRARY_PATH |
138 LD_LIBRARY_PATH="$SBP" |
131 export JAVA_HOME |
139 else |
|
140 LD_LIBRARY_PATH="$SBP:$LD_LIBRARY_PATH" |
|
141 fi |
|
142 export LD_LIBRARY_PATH |
|
143 fi |
132 |
144 |
133 JPARMS="$@ $JAVA_ARGS"; |
145 JPARMS="$@ $JAVA_ARGS"; |
134 |
146 |
135 # Locate the gamma development launcher |
147 # Locate the gamma development launcher |
136 LAUNCHER=${MYDIR}/gamma |
148 LAUNCHER=${MYDIR}/gamma |