From ef8a6509a9e35b5b305ffb7b4fa7fdf6e43acd51 Mon Sep 17 00:00:00 2001 From: "Matt." <4922458+mbrla0@users.noreply.github.com> Date: Fri, 13 Jun 2025 18:57:07 -0300 Subject: [PATCH] Add support for `LLDBValue.string()` in array types (#3107) --- pwndbg/dbg/lldb/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pwndbg/dbg/lldb/__init__.py b/pwndbg/dbg/lldb/__init__.py index 077fcd2f3..8820e3c89 100644 --- a/pwndbg/dbg/lldb/__init__.py +++ b/pwndbg/dbg/lldb/__init__.py @@ -527,7 +527,12 @@ class LLDBValue(pwndbg.dbg_mod.Value): @override def string(self) -> str: - addr = self.inner.unsigned + if self.inner.type.IsArrayType(): + # Array types need to have their address taken in LLDB. + addr = self.inner.AddressOf().unsigned + else: + addr = self.inner.unsigned + error = lldb.SBError() # Read strings up to 4GB.