================
@@ -0,0 +1,105 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+from lldbsuite.test.gdbclientutils import *
+from lldbsuite.test.lldbgdbclient import GDBRemoteTestBase
+
+# Test that lldb will cache when a register is unavailable,
+# and not request the value multiple times at a stop event.
+#
+# Also test that a stop reply packet which indicates that
+# the register cannot be read currently will keep lldb from
+# trying to read it again.
+
+
+class TestUnavailableRegisters(GDBRemoteTestBase):
+    @skipIfXmlSupportMissing
+    @skipIfLLVMTargetMissing("AArch64")
+    def test(self):
+        class MyResponder(MockGDBServerResponder):
+            def __init__(self):
+                super().__init__()
+                self.initial_x2_read = True
+
+            def haltReason(self):
+                return 
"T02thread:1ff0d;threads:1ff0d;thread-pcs:000000010001bc00;00:0100000000000000;01:;03:0500000000000000;04:00bc010001000000;"
+
+            def threadStopInfo(self, threadnum):
+                return 
"T02thread:1ff0d;threads:1ff0d;thread-pcs:000000010001bc00;00:0100000000000000;01:;03:0500000000000000;04:00bc010001000000;"
----------------
DavidSpickett wrote:

These strings look identical, if they are:
```
def haltReason(self):
  return "....

def threadStopInfo(self):
  return self.haltReason()
```

https://github.com/llvm/llvm-project/pull/193894
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to