[debug][bindings][python] Let lldb narrow list of symbols

Marshalling the full list of symbols to Python and filtering that was
slow for binaries with large numbers of symbols.

^KT-63749
This commit is contained in:
Martin Kretzschmar
2023-11-30 11:43:04 +01:00
committed by Space Team
parent 78f492394c
commit 12905858fc
@@ -77,7 +77,7 @@ def _symbol_loaded_address(name, debugger = lldb.debugger):
process = target.GetProcess() process = target.GetProcess()
thread = process.GetSelectedThread() thread = process.GetSelectedThread()
frame = thread.GetSelectedFrame() frame = thread.GetSelectedFrame()
candidates = list(filter(lambda x: x.name == name, frame.module.symbols)) candidates = frame.module.symbol[name]
# take first # take first
for candidate in candidates: for candidate in candidates:
address = candidate.GetStartAddress().GetLoadAddress(target) address = candidate.GetStartAddress().GetLoadAddress(target)