Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
romfile="$1"
symfile="${romfile%.*}.sym"
bpfile="${romfile%.*}.bp"
args=""
if [[ -f "$symfile" ]]; then
labels="${@:2}"
symbols=$(
for i in $labels BREAKPOINT; do
grep $i "$symfile"
done
)
else
symbols=""
fi
if [[ ! -z "$symbols" ]] ; then
echo "$symbols"
# write breakpoint file
echo "$symbols" | awk '{ print $1 ":rwx:cpu" }' >| $bpfile
else
# clear symbol file
echo -n >| $bpfile
fi
bsnes-plus --show-debugger "$romfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment