diff options
author | Samuel Lidén Borell <samuel@kodafritt.se> | 2024-06-02 21:01:19 +0200 |
---|---|---|
committer | Samuel Lidén Borell <samuel@kodafritt.se> | 2024-06-02 21:01:19 +0200 |
commit | f04a0e20619deaf7512db5e5533d382a539bca22 (patch) | |
tree | 86164cf062a08bf08b463e26b867feecd08c2636 | |
parent | 5f5f70783e21f095207464e8054e42e02689041b (diff) | |
download | bpb4crash-main.tar.gz bpb4crash-main.tar.bz2 bpb4crash-main.zip |
-rwxr-xr-x | bpb4crash.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bpb4crash.sh b/bpb4crash.sh index 51c3004..bb80caf 100755 --- a/bpb4crash.sh +++ b/bpb4crash.sh @@ -179,6 +179,10 @@ mkfifo "$fifo" || { # Determine number of times that the TRACKED_FUNC function # was executed before the crash. gdb -q --interpreter=mi2 --args "$@" <"$fifo" | handle_commands 3>"$fifo" +if [ ! -e "$resultfile" ]; then + # E.g. a non-crashing program. Abort early + exit +fi read -r bp_times TRACKED_FUNC <"$resultfile" #echo "times: $bp_times" bp_times=$(($bp_times - $STEPS_BEFORE)) |