Split QEMU run, automate GDB debugging

This commit is contained in:
Ciro Santilli
2017-05-20 11:17:37 +01:00
parent c886a85f58
commit 7f6b148dc4
6 changed files with 120 additions and 33 deletions

20
rungdb Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
if [ "$#" -gt 0 ]; then
brk="-ex 'break $1'"
else
brk=""
fi
cd buildroot/output/build/linux-*.*.*/
cmd="gdb \
-ex 'add-auto-load-safe-path $(pwd)' \
-ex 'file vmlinux' \
-ex 'set arch i386:x86-64:intel' \
-ex 'target remote localhost:1234' \
$brk \
-ex 'continue' \
-ex 'disconnect' \
-ex 'set arch i386:x86-64' \
-ex 'target remote localhost:1234'
"
echo "$cmd"
eval "$cmd"