Skip to content

Commit

Permalink
gdb: require gdb-multiarch for -g (#21)
Browse files Browse the repository at this point in the history
Since `gdb` likely was only configured for the those triple.
  • Loading branch information
nickdesaulniers authored Jun 16, 2020
1 parent 95e78d3 commit 5513114
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Optional parameters:
Invokes 'set -x' for debugging the script.

-g | --gdb:
Add '-s -S' to the QEMU invocation to allow debugging via GDB.
Add '-s -S' to the QEMU invocation to allow debugging via GDB (will invoke
`$GDB_BIN` env var else `gdb-multiarch`).

-h | --help:
Prints this message then exits.
Expand Down
2 changes: 1 addition & 1 deletion boot-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function invoke_qemu() {
-s -S &
QEMU_PID=$!
green "Starting GDB..."
gdb "${KBUILD_DIR}/vmlinux" -ex "target remote :1234"
"${GDB_BIN:-gdb-multiarch}" "${KBUILD_DIR}/vmlinux" -ex "target remote :1234"
red "Killing QEMU..."
kill -9 "${QEMU_PID}"
wait "${QEMU_PID}" 2>/dev/null
Expand Down

0 comments on commit 5513114

Please sign in to comment.