Add nm helper target

This commit is contained in:
Berkus Decker 2020-11-04 22:22:53 +02:00
parent 6da44a69ac
commit 79028dba96
3 changed files with 16 additions and 0 deletions

View File

@ -30,3 +30,6 @@ openocd:
gdb:
cargo make gdb
nm:
cargo make nm

View File

@ -80,6 +80,12 @@ just gdb
If you launch OpenOCD or QEMU before, then gdb shall connect to it and allow you to load the kernel binary directly into memory. Type `load` in gdb to do that.
### To see kernel symbols and their values
```
just nm
```
### To see kernel disassembly
You need to have [Hopper](https://hopperapp.com) and hopperv4 cli helper installed.

View File

@ -78,6 +78,13 @@ script = [
"rust-gdb -x ${GDB_CONNECT_FILE} ${KERNEL_ELF}"
]
[tasks.nm]
dependencies = ["build", "kernel-binary"]
script = [
"${NM} -- ${KERNEL_ELF} | sort"
]
#install_crate = "cargo-binutils"
[tasks.sdcard]
dependencies = ["build", "kernel-binary"]
script_runner = "@duckscript"