Revert "[LoongArch] Eliminate the redundant sign extension of division (#107971)"
[llvm-project.git] / lldb / test / API / functionalities / conditional_break / conditional_break.py
blob6bd28fdd1e26d83ee3ea85c0d1d2e9cf3522bc44
1 import lldb
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()
12 dbg.SetAsync(True)
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.
18 should_stop = True
19 if thread.GetNumFrames() >= 2:
20 if (
21 thread.frames[0].function.name == "c"
22 and thread.frames[1].function.name == "a"
24 should_stop = True
25 else:
26 should_stop = False
28 dbg.SetAsync(old_async)
29 return should_stop