[Lldb-commits] [lldb] [lldb] Implement RegisterContextWasm (PR #151056)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 30 08:55:03 PDT 2025


================
@@ -71,28 +124,62 @@ def qXferRead(self, obj, annex, offset, length):
         if obj == "libraries":
             xml = (
                 '<library-list><library name="%s"><section address="%d"/></library></library-list>'
-                % (self._module_name, load_address)
+                % (self._module_name, LOAD_ADDRESS)
             )
             return xml, False
         else:
             return None, False
 
     def readMemory(self, addr, length):
-        if addr < load_address:
+        if self._memory and self._memory.contains(addr):
+            chunk = self._memory.get_bytes(addr, length)
+            return chunk.hex()
----------------
DavidSpickett wrote:

We the lldb community don't but at least Debian will do for s390x. Happens infrequently though.

Looking at your use of it, it's all about slices of bytes rather than interpreting those as some other type. So I think it's fine.

The "fix", should we need it, will be to use an array of numbers. Which is not hard to implement at short notice.

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


More information about the lldb-commits mailing list