chore(debug): ♻️ Upgrade gdb version and update run scripts

This commit is contained in:
Berkus Decker 2022-01-20 01:30:40 +02:00
parent 4cdeeb8556
commit 40782ea7cc
2 changed files with 13 additions and 1 deletions

View File

@ -24,7 +24,7 @@ TARGET_BOARD = { value = "rpi4", condition = { env_not_set = ["TARGET_BOARD"] }
QEMU = { value = "qemu-system-aarch64", condition = { env_not_set = ["QEMU"] } }
# An aarch64-enabled GDB
GDB = { value = "/usr/local/opt/gdb-8.2.1-aarhc64/bin/aarch64-linux-elf-gdb", condition = { env_not_set = ["GDB"] } }
GDB = { value = "/usr/local/opt/gdb/HEAD-a2c58332-aarch64/bin/aarch64-unknown-elf-gdb", condition = { env_not_set = ["GDB"] } }
# OpenOCD with JLink support
# (RTT patch from http://openocd.zylin.com/#/c/4055/11 has already been merged into main line)
@ -137,6 +137,15 @@ script = [
'''
]
[tasks.gdb-config]
script_runner = "@duckscript"
script = [
'''
writefile ${GDB_CONNECT_FILE} "target extended-remote :5555\n"
appendfile ${GDB_CONNECT_FILE} "break 0x80000\n"
'''
]
[tasks.zellij-config]
dependencies = ["build-qemu", "kernel-binary"]
script_runner = "@duckscript"

View File

@ -31,9 +31,12 @@ script_runner = "@duckscript"
script = [
'''
writefile ${GDB_CONNECT_FILE} "target extended-remote :5555\n"
appendfile ${GDB_CONNECT_FILE} "break 0x80000\n"
appendfile ${GDB_CONNECT_FILE} "continue\n"
'''
]
# Problem: this eats STDIN! need to run in subshell or sth
[tasks.gdb]
dependencies = ["build", "kernel-binary", "gdb-config"]
env = { "RUST_GDB" = "${GDB}" }