Refresh 2

This commit is contained in:
n64
2019-10-05 15:08:05 -04:00
parent 1ef98ec785
commit 52e605f075
316 changed files with 16346 additions and 16367 deletions

16
diff.sh
View File

@@ -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"