18from .events
import StopKinds, exec_and_expect_stop
19from .server
import capability, request
20from .startup
import in_gdb_thread, send_gdb, send_gdb_with_response
21from .state
import set_thread
42 gdb.execute(
"set scheduler-locking " + arg, from_tty=
True, to_string=
True)
48 gdb.newest_frame().select()
52@request("next", response=False)
54 *, threadId: int, singleThread: bool =
False, granularity: str =
"statement", **args
58 if granularity ==
"instruction":
60 exec_and_expect_stop(cmd, StopKinds.STEP)
63@capability("supportsSteppingGranularity")
64@capability("supportsSingleThreadExecutionRequests")
65@request("stepIn", response=False)
67 *, threadId: int, singleThread: bool =
False, granularity: str =
"statement", **args
71 if granularity ==
"instruction":
73 exec_and_expect_stop(cmd, StopKinds.STEP)
76@request("stepOut", response=False)
77def step_out(*, threadId: int, singleThread: bool =
False, **args):
79 exec_and_expect_stop(
"finish", StopKinds.STEP)
87@request("continue", on_dap_thread=True)
90 send_gdb(
lambda: exec_and_expect_stop(
"continue",
None))
91 return {
"allThreadsContinued":
not locked}
step_in(*int threadId, bool singleThread=False, str granularity="statement", **args)
step_out(*int threadId, bool singleThread=False, **args)
_handle_thread_step(thread_id, single_thread, select=False)
continue_request(*int threadId, bool singleThread=False, **args)