From 97b526606f71c0c4f25965ef5ff408762b580042 Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Tue, 16 Jun 2020 10:17:19 -0700 Subject: [PATCH] gdb: require gdb-multiarch for -g Since `gdb` likely was only configured for the those triple. --- README.txt | 3 ++- boot-qemu.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 3b4e70e..128c879 100644 --- a/README.txt +++ b/README.txt @@ -27,7 +27,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. diff --git a/boot-qemu.sh b/boot-qemu.sh index a639b0b..949aca5 100755 --- a/boot-qemu.sh +++ b/boot-qemu.sh @@ -227,7 +227,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