GP-0 Updated BSim launch shell scripts

This commit is contained in:
ghidra1 2023-12-18 14:18:21 -05:00
parent d156a09c29
commit 83affc3380
2 changed files with 17 additions and 28 deletions

View file

@ -3,23 +3,18 @@
# Command-line script for interacting with a BSim database # Command-line script for interacting with a BSim database
# maximum heap memory (may be increased) # maximum heap memory (may be increased)
MAXMEM=768M MAXMEM=1G
# launch mode (fg, bg, debug, debug-suspend) # launch mode (fg, bg, debug, debug-suspend)
LAUNCH_MODE=fg LAUNCH_MODE=fg
#set debug port for debug mode if used VMARG_LIST="-Djava.awt.headless=true "
OS=`uname -s` # Resolve symbolic link if present and get the directory this script lives in.
# NOTE: "readlink -f" is best but works on Linux only, "readlink" will only work if your PWD
# contains the link you are calling (which is the best we can do on macOS), and the "echo" is the
# fallback, which doesn't attempt to do anything with links.
SCRIPT_FILE="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo "$0")"
SCRIPT_DIR="${SCRIPT_FILE%/*}"
SED=/bin/sed ${SCRIPT_DIR}/launch.sh $LAUNCH_MODE jdk "BSim" $MAXMEM "" ghidra.features.bsim.query.ingest.BSimLaunchable "$@"
if [ "$OS" = "Darwin" ]; then
SED=/usr/bin/sed
fi
LAUNCH_DIR=`echo $0 | $SED -e 's/[^\/]*$//'`
if [ "$LAUNCH_DIR" = "" ]; then
LAUNCH_DIR="./";
fi
${LAUNCH_DIR}launch.sh $LAUNCH_MODE jdk "BSim" $MAXMEM "" ghidra.features.bsim.query.ingest.BSimLaunchable "$@"

View file

@ -8,23 +8,17 @@ MAXMEM=768M
# launch mode (fg, bg, debug, debug-suspend) # launch mode (fg, bg, debug, debug-suspend)
LAUNCH_MODE=fg LAUNCH_MODE=fg
#set debug port for debug mode if used VMARG_LIST="-Djava.awt.headless=true "
OS=`uname -s` # Resolve symbolic link if present and get the directory this script lives in.
MACHINE=`uname -m` # NOTE: "readlink -f" is best but works on Linux only, "readlink" will only work if your PWD
# contains the link you are calling (which is the best we can do on macOS), and the "echo" is the
SED=/bin/sed # fallback, which doesn't attempt to do anything with links.
if [ "$OS" = "Darwin" ]; then SCRIPT_FILE="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo "$0")"
SED=/usr/bin/sed SCRIPT_DIR="${SCRIPT_FILE%/*}"
fi
LAUNCH_DIR=`echo $0 | $SED -e 's/[^\/]*$//'`
if [ "$LAUNCH_DIR" = "" ]; then
LAUNCH_DIR="./";
fi
# Some JVM's with class data sharing enabled have issues with BSim starting with Ghidra's custom # Some JVM's with class data sharing enabled have issues with BSim starting with Ghidra's custom
# classloader, so we will disable sharing # classloader, so we will disable sharing
VMARG_LIST="-Xshare:off" VMARG_LIST="-Xshare:off"
${LAUNCH_DIR}launch.sh $LAUNCH_MODE jdk "BSimControl" $MAXMEM "${VMARG_LIST}" ghidra.features.bsim.query.BSimControlLaunchable "$@" ${SCRIPT_DIR}/launch.sh $LAUNCH_MODE jdk "BSimControl" $MAXMEM "${VMARG_LIST}" ghidra.features.bsim.query.BSimControlLaunchable "$@"