From 6e184ebb5aa0461936a6db408a7fa48541a0e80d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Barri=C3=A9?= Date: Thu, 10 Apr 2025 15:24:52 +0200 Subject: Fix LLDB heap_page command Move _append_command_output and _append_expression to LLDBInterface, and use it from HeapPageCommand after setting result. --- misc/lldb_rb/commands/heap_page_command.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'misc/lldb_rb/commands/heap_page_command.py') diff --git a/misc/lldb_rb/commands/heap_page_command.py b/misc/lldb_rb/commands/heap_page_command.py index b56a3eae4e..2eed3c3bee 100644 --- a/misc/lldb_rb/commands/heap_page_command.py +++ b/misc/lldb_rb/commands/heap_page_command.py @@ -8,14 +8,15 @@ class HeapPageCommand(RbBaseCommand): help_string = "prints out 'struct heap_page' for a VALUE pointer in the page" def call(self, debugger, command, exe_ctx, result): + self.result = result self.t_heap_page_body = self.target.FindFirstType("struct heap_page_body") self.t_heap_page_ptr = self.target.FindFirstType("struct heap_page").GetPointerType() page = self._get_page(self.frame.EvaluateExpression(command)) page.Cast(self.t_heap_page_ptr) - self._append_expression(debugger, "(struct heap_page *) %0#x" % page.GetValueAsUnsigned(), result) - self._append_expression(debugger, "*(struct heap_page *) %0#x" % page.GetValueAsUnsigned(), result) + self._append_expression("(struct heap_page *) %0#x" % page.GetValueAsUnsigned()) + self._append_expression("*(struct heap_page *) %0#x" % page.GetValueAsUnsigned()) def _get_page(self, val): addr = val.GetValueAsUnsigned() -- cgit v1.2.3