I have this address, 0x8002bf20, and I need to see what's inside there. I know GDB does nice things like "print x" and I'll see something like struct ex {x: 1, y: 2}
I need to see that kind of print output for this address I need to examine.
Thanks.
If you know the type of the structure at that address, you can coerce GDB to print it with:
(gdb) print *(struct mystruct *) 0x8002bf20
If you do not know the type of the structure, then the best you can do is the x
command which you already mentioned -- although do be aware that there's no harm in casting to the 'wrong' type, so you can try various structures with print *(struct mystruct *)
until the output looks plausible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With