[Lldb-commits] [lldb] [lldb-dap] Simplify `readMemory` (PR #109485)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 23 00:43:14 PDT 2024
================
@@ -93,20 +93,19 @@ def test_readMemory(self):
# We can read the complete string
mem = self.dap_server.request_readMemory(memref, 0, 5)["body"]
- self.assertEqual(mem["unreadableBytes"], 0)
self.assertEqual(b64decode(mem["data"]), b"dead\0")
# Use an offset
mem = self.dap_server.request_readMemory(memref, 2, 3)["body"]
self.assertEqual(b64decode(mem["data"]), b"ad\0")
# Reads of size 0 are successful
- # VS-Code sends those in order to check if a `memoryReference` can actually be dereferenced.
+ # VS Code sends those in order to check if a `memoryReference` can actually be dereferenced.
mem = self.dap_server.request_readMemory(memref, 0, 0)
self.assertEqual(mem["success"], True)
self.assertEqual(mem["body"]["data"], "")
# Reads at offset 0x0 fail
mem = self.dap_server.request_readMemory("0x0", 0, 6)
self.assertEqual(mem["success"], False)
- self.assertEqual(mem["message"], "Memory region is not readable")
+ self.assertEqual(mem["message"], "memory read failed for 0x0")
----------------
labath wrote:
I suspect the error message will be different on windows. I'd probably just delete this check (and that's what I did in my PR).
https://github.com/llvm/llvm-project/pull/109485
More information about the lldb-commits
mailing list