[Lldb-commits] [lldb] [lldb] Add support for gdb-style 'x' packet (PR #124733)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 30 04:48:42 PST 2025


================
@@ -0,0 +1,36 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+from lldbsuite.test.gdbclientutils import *
+from lldbsuite.test.lldbgdbclient import GDBRemoteTestBase
+
+
+class TestReadMemory(GDBRemoteTestBase):
+    def test_x_with_prefix(self):
+        class MyResponder(MockGDBServerResponder):
+            def qSupported(self, client_features):
+                return super().qSupported(client_features) + ";binary-upload+"
+
+            def x(self, addr, length):
+                return "bfoobar" if addr == 0x1000 else "E01"
----------------
labath wrote:

Yeah, I think that's enough. I generally try to avoid raising errors from the mock server runs, as it runs on a different thread, and the result of its abrupt termination isn't pretty.

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


More information about the lldb-commits mailing list