From 600dd0bb30d9d8d5c7645156c1c50ad68ec1b334 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Tue, 3 May 2022 19:02:56 +0200 Subject: kernel: stacktraces on panic() --- tools/stacktrace_resolve.awk | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tools/stacktrace_resolve.awk (limited to 'tools') diff --git a/tools/stacktrace_resolve.awk b/tools/stacktrace_resolve.awk new file mode 100644 index 0000000..a8254a7 --- /dev/null +++ b/tools/stacktrace_resolve.awk @@ -0,0 +1,11 @@ +/k\/[0-9A-Fa-f]{8}/ { + print; + addr = substr($0, match($0, /k\/[0-9A-Fa-f]{8}/) + 2, RLENGTH - 2); + if (addr != "00000000") { + printf " "; + system("addr2line -psfe out/fs/boot/kernel.bin 0x" addr); + } + next; +} + +{ print; } -- cgit v1.2.3