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

Function addr2line_batch

ci/bin_bloat_attribute.py:76–95  ·  view source on GitHub ↗
(addrs: list[int])

Source from the content-addressed store, hash-verified

74
75
76def addr2line_batch(addrs: list[int]) -> dict[int, str]:
77 if not addrs:
78 return {}
79 inp = "\n".join(f"0x{a:x}" for a in addrs)
80 proc = subprocess.run(
81 [str(ADDR2LINE), "-e", str(ELF)],
82 input=inp,
83 capture_output=True,
84 text=True,
85 check=True,
86 )
87 out_lines = proc.stdout.splitlines()
88 res: dict[int, str] = {}
89 for a, ln in zip(addrs, out_lines):
90 # strip line:col
91 f = ln.strip()
92 f = re.sub(r":\d+(?::\d+)?$", "", f)
93 f = re.sub(r" \(discriminator \d+\)", "", f)
94 res[a] = f
95 return res
96
97
98# Map filename → high-level category

Callers 1

mainFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected