4 def stop_if_called_from_a(frame
, bp_loc
, dict):
5 thread
= frame
.GetThread()
6 process
= thread
.GetProcess()
7 target
= process
.GetTarget()
8 dbg
= target
.GetDebugger()
10 # Perform synchronous interaction with the debugger.
11 old_async
= dbg
.GetAsync()
14 # We check the call frames in order to stop only when the immediate caller
15 # of the leaf function c() is a(). If it's not the right caller, we ask the
16 # command interpreter to continue execution.
19 if thread
.GetNumFrames() >= 2:
21 thread
.frames
[0].function
.name
== "c"
22 and thread
.frames
[1].function
.name
== "a"
28 dbg
.SetAsync(old_async
)