10

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?

Jester
  • 56,577
  • 4
  • 81
  • 125
jay
  • 477
  • 1
  • 9
  • 17

2 Answers2

25

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

Alexey Frunze
  • 61,140
  • 12
  • 83
  • 180
6

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

  • 16 bit - ip
  • 32 bit - eip
  • 64 bit - rip
CalvT
  • 3,123
  • 6
  • 37
  • 54
0x00A5
  • 1,462
  • 1
  • 16
  • 20