Suppose I have a class:
class RawMessage(NamedTuple):
data: Dict
timestamp: float
...
The keys and values in this dictionary are probably all integers, but I don't want to state that with certainty.
I additionally hvae a core dump file with the following information (There is no active process!):
(gdb) py-locals
...
msg = <RawMessage at remote 0x7fc91ea90ee0>
...
I would like to see what's in the message instead of getting a memory address. Essentially the equivalent of print(msg.data)
in python. However, I have GDB instead of python!
The following commands do not work:
(gdb) py-print msg.data
'msg.data' not found
(gdb) set $rawmessage = (PyObject*)0x7fc91ea90ee0
(gdb) p $rawmessage->data
There is no member named data.
(gdb) py msg
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'msg' is not defined
Error while executing Python code.
Do we have any ideas how to access this information? Extra credit if there's a way to run simple python code!