symbol_lookup
Resolve firmware fault addresses to function names and offsets to locate crashing code. Use ELF symbol tables for accurate bounds; sparse maps or missing symbols yield explicit warnings or not-found.
Instructions
把地址反查成「函数名+偏移」。fault 地址定位代码的关键一步。
symbol_lookup("build/app.elf", ["0x08004a2c"]) ★优先给 .elf 而不是 .map:.elf 的 .symtab 带真实 st_size,能判断 「地址还在不在这个函数内」;.map 只能靠「下一个符号 − 本符号」推断。 ★GNU ld(GCC/STM32CubeIDE/ESP-IDF)默认不往 .map 里写符号表, 同一份固件的 .map 可能只有个位数条目(实测 3 个,而 .elf 有 31 个)。 此时反查会命中段符号给出假函数名——所以本工具遇到这种稀疏 map 会 明确提示,并把同目录的 .elf 摆出来让你换源。 找不到符号时明确报"未找到",不给猜测的函数名——猜出来的名字比没名字更害人。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| addresses | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |