[Lldb-commits] [lldb] [lldb] Add QSupported key to report watchpoint types supported (PR #80376)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 2 11:37:15 PST 2024


================
@@ -403,6 +403,22 @@ void GDBRemoteCommunicationClient::GetRemoteQSupported() {
         x.split(compressions, ',');
         if (!compressions.empty())
           MaybeEnableCompression(compressions);
+      } else if (x.consume_front("SupportedWatchpointTypes=")) {
+        llvm::SmallVector<llvm::StringRef, 4> watchpoint_types;
+        x.split(watchpoint_types, ',');
+        m_watchpoint_types =
+            WatchpointHardwareFeature::eWatchpointHardwareFeatureUnknown;
+        for (auto wp_type : watchpoint_types) {
+          if (wp_type == "x86_64")
+            m_watchpoint_types |=
+                WatchpointHardwareFeature::eWatchpointHardwareX86;
+          if (wp_type == "aarch64-mask")
+            m_watchpoint_types |=
+                WatchpointHardwareFeature::eWatchpointHardwareArmMASK;
+          if (wp_type == "aarch64-bas")
+            m_watchpoint_types |=
+                WatchpointHardwareFeature::eWatchpointHardwareArmBAS;
+        }
----------------
jasonmolenda wrote:

I thought about putting the gdb remote serial protocol names in lldb-enumerations.h but they're gdb RSP specific strings and I don't expect them to be used anywhere else.

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


More information about the lldb-commits mailing list