mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 00:46:45 +08:00
[Examples] Move structured-data unpacking out of the loop. (NFC)
There's no need to repeat this work in the loop.
This commit is contained in:
@@ -9,10 +9,10 @@ def __lldb_init_module(debugger, internal_dict):
|
||||
|
||||
def in_call_stack(frame, bp_loc, arg_dict, _):
|
||||
"""Only break if the given name is in the current call stack."""
|
||||
name = arg_dict.GetValueForKey('name').GetStringValue(1000)
|
||||
thread = frame.GetThread()
|
||||
found = False
|
||||
for frame in thread.frames:
|
||||
name = arg_dict.GetValueForKey('name').GetStringValue(1000)
|
||||
# Check the symbol.
|
||||
symbol = frame.GetSymbol()
|
||||
if symbol and name in frame.GetSymbol().GetName():
|
||||
|
||||
Reference in New Issue
Block a user