From 40782ea7cc661fed17f8372caa4186752c50adfa Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Thu, 20 Jan 2022 01:30:40 +0200 Subject: [PATCH] =?UTF-8?q?chore(debug):=20=E2=99=BB=EF=B8=8F=20Upgrade=20?= =?UTF-8?q?gdb=20version=20and=20update=20run=20scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile.toml | 11 ++++++++++- nucleus/Makefile.toml | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile.toml b/Makefile.toml index 092f29a..c365f4d 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -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" diff --git a/nucleus/Makefile.toml b/nucleus/Makefile.toml index 3d6249d..bb1175a 100644 --- a/nucleus/Makefile.toml +++ b/nucleus/Makefile.toml @@ -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}" }