I’m having a problem with GDB. I’m studying buffer overflow right now and I need to run the command $Info reg to find information about ebp, eip and esp but I get no results from any of them. I tried out Info reg $name with each one of them but only ebp works.
Basicly this is what happens:
(gdb) i r
rax 0x7fffffffe180 140737488347520
rbx 0x0 0
rcx 0x7fffffffe570 140737488348528
rdx 0x7fffffffe1a6 140737488347558
rsi 0x6 6
...
...
...
es 0x0 0
fs 0x0 0
---Type <return> to continue, or q <return> to quit---+
gs 0x0 0
and
(gdb) info reg $ebp
ebp 0x41414141 1094795585
but
(gdb) info reg $eip
Invalid register `eip'
How can I get the values to these parts of memory?
there is no reg called
eipin amd64 archlet me show what is
bp/ebp/rbp, a data register contains 64 bits on amd64 arch:so you can access corresponding bits by different name.
but you always access
ripas a whole word, because there is no reason to access the lower bits ofinstruction pointer, as a result, there aro noeip/ipregisters in amd64 arch