[Lldb-commits] [lldb] [lldb] Handle accelerator plugin breakpoint actions on the client (PR #201489)

satyanarayana reddy janga via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 5 12:02:52 PDT 2026


================
@@ -223,6 +225,79 @@ bool GDBRemoteCommunicationClient::GetMultiBreakpointSupported() {
   return m_supports_multi_breakpoint == eLazyBoolYes;
 }
 
+bool GDBRemoteCommunicationClient::GetAcceleratorPluginsSupported() {
+  if (m_supports_accelerator_plugins == eLazyBoolCalculate)
+    GetRemoteQSupported();
+  return m_supports_accelerator_plugins == eLazyBoolYes;
+}
+
+std::optional<std::vector<AcceleratorActions>>
+GDBRemoteCommunicationClient::GetAcceleratorInitializeActions() {
+  // Get the initial actions (e.g. breakpoints to set) requested by any
+  // accelerator plugins using the "jAcceleratorPluginInitialize" packet. This
+  // is sent once when a native process is launched or attached.
+  if (!GetAcceleratorPluginsSupported())
+    return std::nullopt;
+
+  StringExtractorGDBRemote response;
+  response.SetResponseValidatorToJSON();
+  if (SendPacketAndWaitForResponse("jAcceleratorPluginInitialize", response) !=
+      PacketResult::Success)
+    return std::nullopt;
+
+  if (response.IsUnsupportedResponse())
+    return std::nullopt;
+
+  if (response.IsErrorResponse()) {
+    Debugger::ReportError(response.GetStatus().AsCString());
+    return std::nullopt;
+  }
+
+  llvm::Expected<std::vector<AcceleratorActions>> actions =
+      llvm::json::parse<std::vector<AcceleratorActions>>(response.Peek(),
+                                                         "AcceleratorActions");
+  if (actions)
+    return std::move(*actions);
+
+  // JSON parsing errors won't make sense to the user, so don't show them.
----------------
satyajanga wrote:

updated the logging


https://github.com/llvm/llvm-project/pull/201489


More information about the lldb-commits mailing list