You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
Refresh 2
This commit is contained in:
16
diff.sh
16
diff.sh
@@ -70,11 +70,15 @@ fi
|
||||
START="$1"
|
||||
BASE=0
|
||||
|
||||
if [ $DIFF_OBJ != 1 ] && [ $MAKE = 1 ]; then
|
||||
make $MAKEFLAGS "$MYIMG"
|
||||
fi
|
||||
|
||||
set +e
|
||||
|
||||
if [ -n "$MAPFILE" ]; then
|
||||
if [ -n "$MAPFILE" ] && [ "${START:0:2}" != "0x" ]; then
|
||||
LINE=$(grep "$1$" $MAPFILE)
|
||||
if [[ -n "$LINE" && "${1:0:2}" != "0x" ]]; then
|
||||
if [ -n "$LINE" ]; then
|
||||
START=$(echo $LINE | cut -d' ' -f1)
|
||||
if [[ $DIFF_OBJ = 1 ]]; then
|
||||
LINE2=$(grep "$1$\|^ .text" $MAPFILE | grep "$1$" -B1 | head -n1)
|
||||
@@ -88,6 +92,11 @@ if [ -n "$MAPFILE" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! [[ "$START" =~ ^[0-9] ]]; then
|
||||
echo "Function $1 not found in map file." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
if [[ $DIFF_OBJ = 1 ]]; then
|
||||
@@ -109,9 +118,6 @@ if [[ $DIFF_OBJ = 1 ]]; then
|
||||
$OBJDUMP $OBJFILE | grep "<$1>:" -A1000 > $MYDUMP
|
||||
DIFF_ARGS+=" -o"
|
||||
else
|
||||
if [[ $MAKE = 1 ]]; then
|
||||
make $MAKEFLAGS "$MYIMG"
|
||||
fi
|
||||
END="$START + 0x1000"
|
||||
if [[ $# -ge 2 ]]; then
|
||||
END="$2"
|
||||
|
||||
Reference in New Issue
Block a user