When I try to use:
class MyPrinter:
def __init__(self, val):
self.val = val
def to_string(self):
return str(self.val['fData'][0]) + ":" + "%016x" % (self.val['fData'][0]).cast(gdb.lookup_type("uint64_t"))
It prints
2929725441843584891:28a879c45a82df7b
But also
9918728419520062851:-7659990ddaef5a7d
When the most significant bit is set for val
, it is interpreted as signed.
fData[]
is uint64_t
.
How can I avoid that? All my values should be unsigned.