[Lldb-commits] [lldb] [lldb] Add accelerator plugin connection support (PR #201449)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 9 09:27:59 PDT 2026
================
@@ -4197,6 +4197,61 @@ ProcessGDBRemote::HandleAcceleratorActions(const AcceleratorActions &actions) {
return error;
}
+ if (actions.connect_info) {
+ if (llvm::Error error = HandleAcceleratorConnection(actions))
+ return error;
+ }
+
+ return llvm::Error::success();
+}
+
+llvm::Error ProcessGDBRemote::HandleAcceleratorConnection(
+ const AcceleratorActions &actions) {
+ const AcceleratorConnectionInfo &connect_info = *actions.connect_info;
+ Debugger &debugger = GetTarget().GetDebugger();
+
+ // Create a new (empty) target for the accelerator and connect to the GDB
+ // server the plugin is serving.
+ llvm::StringRef exe_path =
+ connect_info.exe_path ? *connect_info.exe_path : llvm::StringRef();
----------------
DavidSpickett wrote:
The ternary is ok but there is https://cppreference.com/cpp/utility/optional/value_or if you prefer the built in way.
https://github.com/llvm/llvm-project/pull/201449
More information about the lldb-commits
mailing list