Fix the bug when using the heap heuristic on big-endian architectures (#1627)

pull/1632/head
Alan Li 3 years ago committed by GitHub
parent b6e742ce38
commit f2fb803957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,6 +78,12 @@ C2GDB_MAPPING = {
c_size_t: pwndbg.gdblib.typeinfo.size_t,
}
# Use correct endian for the dictionary keys
if pwndbg.gdblib.arch.endian == "little":
C2GDB_MAPPING = {k.__ctype_le__: v for k, v in C2GDB_MAPPING.items()}
else:
C2GDB_MAPPING = {k.__ctype_be__: v for k, v in C2GDB_MAPPING.items()}
class FakeGDBField:
"""

Loading…
Cancel
Save