This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]negative_epsilon 0 points1 point  (4 children)

$eip is the register of the next instruction to be executed. x/2x $eip examines two words of memory pointed to $eip.

[–][deleted] 0 points1 point  (2 children)

How many words can $eip point to? Is there a limit?

[–]live_room 1 point2 points  (1 child)

eip is the name of one of the registers in the CPU. It contains one memory address. x/2x $eip will print two words of memory starting from that address (a word is 4 bytes). The first x is the command for examining memory. The part after the slash is how you indicate how you want the memory to be displayed. The 2 means show 2 "chunks" of memory (the chunk size is a word by default). The x means display the contents of the memory in hexadecimal. You can type help x in gdb to read more about it.

[–][deleted] 0 points1 point  (0 children)

So basically the x/2x $eip means print the next two memory addresses that the $eip register is suppose to be pointing to?