Reputation: 9570
A number can also be prepended to the format of the examine command to examine multiple units at the target address.
source: hacking the art of exploration
(gdb) x/2x $eip
0x8048384 <main+16>: 0x00fc45c7 0x83000000
(gdb) x/x $eip
0x8048384 <main+16>: 0x00fc45c7
I know that the second examine command returns the memory address that eip is currently locating. What about the first one which returns two memory address?
Upvotes: 3
Views: 1535
Reputation: 5011
The examine command of gdb has the following syntax:
x/[n][f][u]
where n, f and u are optional and n is the length, f the format and u the unit size.
Possible formats are:
If no unit size can be one of the following values:
where w is the default.
Therefore x/2x
prints 2 hexadecimal values with a size of 4 bytes from your code segment.
Upvotes: 2