Sunday, October 6, 2013

Find the value for the address in GDB (Cent OS 6)

For analysis purpose we want to know the which data(message) is stored in the address. Is there any option to find the message in GDB.

In the other words we know the address (0x80488b4) of memory yet we want moreover know the message stored in that address through GDB.

Sample code :

(gdb) print option_value$1 = (const void *) 0x80488b4

If you know the type typemsg_tof the message, you could dereference it, e.g. print *(typemsg_t*) option_value

You might moreover be interested by the GDB watchpoint ability.

It is worth taking some time to read GDB documentation !

No comments:

Post a Comment