[Lldb-commits] [lldb] [lldb] Implement RegisterContextWasm (PR #151056)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 29 03:40:52 PDT 2025
================
@@ -23,19 +27,68 @@ def format_register_value(val):
return result
+class WasmStackFrame:
+ def __init__(self, address):
+ self._address = address
+
+ def format(self):
+ return format_register_value(LOAD_ADDRESS | self._address)
+
+
+class WasmCallStack:
+ def __init__(self, wasm_stack_frames):
+ self._wasm_stack_frames = wasm_stack_frames
+
+ def format(self):
----------------
DavidSpickett wrote:
Given that there is also a builtin format(), I would have defined `__str__` for these types, or the method talked about in https://docs.python.org/3/library/functions.html#format.
Then you can do `str(thing)` or `"whatever".format(thing)`.
https://github.com/llvm/llvm-project/pull/151056
More information about the lldb-commits
mailing list