Skip to content

Commit 80fe824

Browse files
committed
fix(WebServer): restore function name display in slot status bar
build_slot_response only looked up symbols from app_state.symbols (populated by GDB), but after eadcc47 switched to nm for symbol resolution, that dict is no longer populated. Now also queries FPBInject's nm symbol cache for address-to-name lookup.
1 parent 7dd925f commit 80fe824

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Tools/WebServer/utils/helpers.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,20 @@ def build_slot_response(device, app_state, get_fpb_inject):
4242
addr = sym_info
4343
symbols_reverse[addr] = sym_name
4444

45+
# Also include symbols from FPBInject nm cache (fast offline lookup)
46+
try:
47+
fpb = get_fpb_inject()
48+
if hasattr(fpb, "_get_elf_symbols"):
49+
nm_symbols = fpb._get_elf_symbols()
50+
for sym_name, sym_info in nm_symbols.items():
51+
addr = (
52+
sym_info.get("addr", 0) if isinstance(sym_info, dict) else sym_info
53+
)
54+
if addr not in symbols_reverse:
55+
symbols_reverse[addr] = sym_name
56+
except Exception:
57+
pass
58+
4559
# Build slot states from device info
4660
slots = []
4761
device_slots = info.get("slots", [])

0 commit comments

Comments
 (0)