Merge pull request #1760 from volatilityfoundation/bugfix/volshell_dt_traceback

Fix traceback in volshell's `dt()`
This commit is contained in:
ikelos
2025-04-08 08:09:37 +01:00
committed by GitHub
+9 -6
View File
@@ -621,12 +621,15 @@ class Volshell(interfaces.plugins.PluginInterface):
if isinstance(value, objects.Pointer):
# show pointers in hex to match output for struct addrs
# highlight null or unreadable pointers
if value == 0:
suffix = " (null pointer)"
elif not value.is_readable():
suffix = " (unreadable pointer)"
else:
suffix = ""
try:
if value == 0:
suffix = " (null pointer)"
elif not value.is_readable():
suffix = " (unreadable pointer)"
else:
suffix = ""
except exceptions.SymbolError as exc:
suffix = f" (unknown sized {exc.symbol_name})"
return f"{hex(value)}{suffix}"
elif isinstance(value, objects.PrimitiveObject):
return repr(value)