3

How can i set RIP in "info registers" of a program with gdb? Like you do for eax, you type "set $eax=0", but how can i do for rip?

ks1322
  • 33,961
  • 14
  • 109
  • 164
c0bra
  • 31
  • 1
  • 5
  • 2
    Yes, `set $pc = 0x123456`. RIP isn't a "normal" register, so GDB treats it specially using the general "program counter" name regardless of architecture. – Peter Cordes Jul 12 '19 at 09:26

1 Answers1

0

rip is the instruction pointer, you'd use the jump instruction to set it and continue from the new address.

Simon Richter
  • 28,572
  • 1
  • 42
  • 64