Fix printing of struct fields in `tcache` command (#2447)

* Revert "Add __repr__ and __str__ methods to GDBValue (#2408)"

This reverts commit 7ed76041b9.

* Fixes bug #2406

---------

Co-authored-by: Itay Snir <63191638+itaysnir@users.noreply.github.com>
pull/2450/head
peace-maker 1 year ago committed by GitHub
parent 15a6927248
commit fdae52404b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -161,7 +161,7 @@ class CStruct2GDB:
"""
output = "{\n"
for f in self._c_struct._fields_:
output += f" {f[0]} = {self.read_field(f[0])},\n"
output += f" {f[0]} = {self.read_field(f[0]).inner},\n"
output += "}"
return output

@ -727,12 +727,6 @@ class Value:
"""
raise NotImplementedError()
def __repr__(self):
raise NotImplementedError()
def __str__(self):
raise NotImplementedError()
class CommandHandle:
"""

@ -950,14 +950,6 @@ class GDBValue(pwndbg.dbg_mod.Value):
return GDBValue(self.inner[key])
@override
def __repr__(self):
return self.inner.__repr__()
@override
def __str__(self):
return self.inner.__str__()
class GDB(pwndbg.dbg_mod.Debugger):
@override

Loading…
Cancel
Save