Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid register eip?

I am debugging a c program with gdb in linux terminal, I disassembled it and ran it, then tried to find the memory address the the EIP register. This is what happened:

(gdb) i r eip Invalid register `eip'

Why does it say that my eip register is invalid?

like image 913
jay Avatar asked Feb 18 '12 05:02

jay


2 Answers

Is it a 64-bit program? If so, it's rip, not eip.

like image 77
Alexey Frunze Avatar answered Nov 06 '22 08:11

Alexey Frunze


Depending on your program's architecture the register can change:

  • 16 bit - ip
  • 32 bit - eip
  • 64 bit - rip
like image 42
0x00A5 Avatar answered Nov 06 '22 09:11

0x00A5