Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdb: require gdb-multiarch for -g #21

Merged
merged 1 commit into from
Jun 16, 2020
Merged

gdb: require gdb-multiarch for -g #21

merged 1 commit into from
Jun 16, 2020

Conversation

nickdesaulniers
Copy link
Member

Since gdb likely was only configured for the those triple.

@nathanchance
Copy link
Member

gdb-multiarch is a Debian/Ubuntu thing. We should probably do something like ${GDB:-gdb-multiarch} so that it can be easily overridden from the environment if a user is not on Debian/Ubuntu.

@nickdesaulniers
Copy link
Member Author

diff --git a/boot-qemu.sh b/boot-qemu.sh
index 3b760dc5ae89..8511d86486c3 100755
--- a/boot-qemu.sh
+++ b/boot-qemu.sh
@@ -227,7 +227,9 @@ function invoke_qemu() {
                 -s -S &
             QEMU_PID=$!
             green "Starting GDB..."
-            gdb-multiarch "${KBUILD_DIR}/vmlinux" -ex "target remote :1234"
+            set -x
+            "${GDB:-gdb-multiarch}" "${KBUILD_DIR}/vmlinux" -ex "target remote :1234"
+            set +x
             red "Killing QEMU..."
             kill -9 "${QEMU_PID}"
             wait "${QEMU_PID}" 2>/dev/null

seems to expand to

+ true /android0/kernel-all/vmlinux -ex 'target remote :1234'

am I holding it wrong?

@nickdesaulniers
Copy link
Member Author

ah, right cause we have a local $GDB

Since `gdb` likely was only configured for the those triple.
Copy link
Member

@nathanchance nathanchance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works. I was going to suggest changing the current GDB to USE_GDB to work around it but this works too.

@nickdesaulniers nickdesaulniers merged commit 5513114 into master Jun 16, 2020
@nickdesaulniers nickdesaulniers deleted the multiarch branch June 16, 2020 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants