4 def __lldb_init_module(debugger
, internal_dict
):
5 debugger
.HandleCommand(
6 f
"command alias in_call_stack breakpoint command add --python-function {__name__}.in_call_stack -k name -v %1"
10 def in_call_stack(frame
, bp_loc
, arg_dict
, _
):
11 """Only break if the given name is in the current call stack."""
12 name
= arg_dict
.GetValueForKey("name").GetStringValue(1000)
13 thread
= frame
.GetThread()
15 for frame
in thread
.frames
:
17 symbol
= frame
.GetSymbol()
18 if symbol
and name
in frame
.GetSymbol().GetName():
21 function
= frame
.GetFunction()
22 if function
and name
in function
.GetName():