Dynamically include BARF source

This commit is contained in:
maride 2021-05-30 21:26:13 +02:00
parent a96370c9fe
commit c397b3640e
2 changed files with 3 additions and 2 deletions

View File

@ -21,7 +21,7 @@
# Have fun with the script! :) # Have fun with the script! :)
# include project path as include path # include project path as include path
sys.path.insert(1, "/home/maride/barf/src") sys.path.insert(1, barf_path)
# include project files # include project files
from BreakpointManager import BreakpointManager from BreakpointManager import BreakpointManager

View File

@ -11,6 +11,7 @@ NEGATIVEADDR=""
WINADDR="" WINADDR=""
KNOWNPREFIX="" KNOWNPREFIX=""
KNOWNSUFFIX="" KNOWNSUFFIX=""
BARFPATH="$(dirname $(realpath $0))/src"
# getopt is kind-of unstable across distributions and versions, so we implement it on our own # getopt is kind-of unstable across distributions and versions, so we implement it on our own
# hat-tip to https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash # hat-tip to https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
@ -76,5 +77,5 @@ if [ "$SHOWHELP" == 1 ]; then
fi fi
# ready for take-off # ready for take-off
gdb --quiet -nx --eval-command "py barf_positive_addr='$POSITIVEADDR';barf_negative_addr='$NEGATIVEADDR';barf_win_addr='$WINADDR';barf_known_prefix='$KNOWNPREFIX';barf_known_suffix='$KNOWNSUFFIX'" --command barf.py $TARGETFILE gdb --quiet -nx --eval-command "py barf_positive_addr='$POSITIVEADDR';barf_negative_addr='$NEGATIVEADDR';barf_win_addr='$WINADDR';barf_known_prefix='$KNOWNPREFIX';barf_known_suffix='$KNOWNSUFFIX';barf_path='$BARFPATH'" --command barf.py $TARGETFILE