This implements the DAP "stepOut" request.
send_gdb(ExecutionInvoker(cmd, StopKinds.STEP))
+@request("stepOut")
+def step_out(*, threadId):
+ _handle_thread_step(threadId)
+ send_gdb(ExecutionInvoker("finish", StopKinds.STEP))
+
+
@request("continue")
def continue_request(**args):
send_gdb(ExecutionInvoker("continue", None))
{
}
-int main ()
+int
+line_breakpoint_here ()
{
do_not_stop_here ();
function_breakpoint_here ();
address_breakpoint_here ();
return 0; /* BREAK */
}
+
+
+int
+main ()
+{
+ return line_breakpoint_here ();
+}
"body reason" breakpoint \
"body hitBreakpointIds" $line_bpno
+dap_check_request_and_response "return from function" stepOut \
+ {o threadId [i 1]}
+dap_wait_for_event_and_check "stopped after return" stopped \
+ "body reason" step
+
set obj [dap_check_request_and_response "evaluate global in main" \
evaluate {o expression [s global_variable]}]
dap_match_values "global value in main" [lindex $obj 0] \