================
@@ -81,7 +200,41 @@ LLDBServerMockAcceleratorPlugin::BreakpointWasHit(
response.disable_bp = true;
response.auto_resume_native = false;
break;
+ case kBreakpointIDConnect: {
+ // The program reached its connection hook. Ask the client to create a
+ // second target and connect to our in-process mock accelerator GDB
+ // server.
+ response.disable_bp = true;
+ response.auto_resume_native = false;
+ AcceleratorActions actions = GetNewAcceleratorAction();
+ actions.session_name = "Mock Accelerator Session";
+ actions.connect_info = CreateConnection();
+ response.actions = std::move(actions);
+ break;
+ }
}
return response;
}
+
+std::optional<AcceleratorConnectionInfo>
+LLDBServerMockAcceleratorPlugin::CreateConnection() {
----------------
satyajanga wrote:
moved the code to this function.
but unfortunately all the instance variables (m_mock_main_loop,
m_mock_main_loop_thread, m_listen_socket, and m_read_handles) I added are still
needed for accept/serve.
https://github.com/llvm/llvm-project/pull/201449
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits