MCPcopy Create free account
hub / github.com/FastLED/FastLED / parse_nm_symbols

Function parse_nm_symbols

ci/bin_bloat_analysis.py:92–111  ·  view source on GitHub ↗

Returns (addr, size, type, mangled_name).

()

Source from the content-addressed store, hash-verified

90
91
92def parse_nm_symbols() -> list[tuple[int, int, str, str]]:
93 """Returns (addr, size, type, mangled_name)."""
94 out = subprocess.check_output(
95 [str(NM), "--print-size", "--size-sort", "--radix=d", str(ELF)],
96 text=True,
97 )
98 syms: list[tuple[int, int, str, str]] = []
99 for line in out.splitlines():
100 parts = line.split(maxsplit=3)
101 if len(parts) < 4:
102 continue
103 try:
104 addr = int(parts[0])
105 size = int(parts[1])
106 t = parts[2]
107 name = parts[3]
108 syms.append((addr, size, t, name))
109 except ValueError:
110 continue
111 return syms
112
113
114def batch_demangle(names: list[str]) -> dict[str, str]:

Callers 1

mainFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected