diff options
author | Kieran Bingham <kieran@bingham.xyz> | 2016-03-16 12:22:51 +0000 |
---|---|---|
committer | Kieran Bingham <kieran@bingham.xyz> | 2016-03-16 12:22:51 +0000 |
commit | 436e9af99182dc706dfa8ce2536c09b0e42cb058 (patch) | |
tree | 081ad923972b720fa12a3366aa76e3154d6f6dd5 | |
parent | 96c9708d62b6aaa1cf00848d93940f4f8ba001a3 (diff) |
qemu: Provide a means to start GDB halted for a debug session of GDB itself
To use:
launch a target:
make qemu-run
launch a debug session in gdbserver
make qemu-gdbserver
finally launch a debug of the gdb session
make gdb-qemu-gdbserver
In the third terminal, set breakpoints as appropriate and 'c'ontinue
-rw-r--r-- | build-common/packages/qemu | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/build-common/packages/qemu b/build-common/packages/qemu index 91f8c1a..22b7891 100644 --- a/build-common/packages/qemu +++ b/build-common/packages/qemu @@ -63,9 +63,16 @@ qemu-system-aarch64: $(QEMU_HALT) \ -gdb tcp::$(QEMU_GDBSERVER_PORT) +qemu-gdbserver: GDBSERVER:=gdbserver localhost:3456 +qemu-gdbserver: qemu-gdb + +gdb-qemu-gdbserver: + gdb $(ARMGDB) -ex 'target remote localhost:3456' + qemu-gdb: # Link the Kernel VMLinux locally for python lx-symbols ln -f -s $(LINUX_BUILD)/vmlinux + $(GDBSERVER) \ $(ARMGDB) \ $(LINUX_BUILD)/vmlinux \ -iex 'add-auto-load-safe-path $(LINUX_BUILD)' \ |