Skip to content

Commit

Permalink
Enable exit-on-error setting to gdbstub-test.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Chun-Hung Tseng committed Nov 15, 2023
1 parent 66fdca7 commit 9135067
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .ci/gdbstub-test.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#!/usr/bin/env bash

# set -e -u -o pipefail
set -e -u -o pipefail

export PATH=`pwd`/toolchain/riscv/bin:$PATH

GDB=
prefixes=("${CROSS_COMPILE}" "riscv32-unknown-elf" "riscv-none-elf")
for prefix in "${prefixes[@]}"; do
utility=${prefix}-gdb
set +e # temporarily disable exit on error
command -v "${utility}" &> /dev/null
if [[ $? == 0 ]]; then
GDB=${utility}
fi
set -e
done

# Check if GDB is available
Expand Down

0 comments on commit 9135067

Please sign in to comment.