-
| 
         I wrote a simple program to print the current RIP address at runtime. However, I noticed that the target of the unconditional jmp instruction doesn’t match the next RIP value that gets printed after the jump, here's the snippet of the log: and here's the snippet of the code that use the library: insn = 0;
ret = __sys_ptrace(
	PTRACE_PEEKTEXT, child_pid, (void *)regs.rip, &insn
);
assert(!ret);
if (ZYAN_SUCCESS(ZydisDisassembleIntel(ZYDIS_MACHINE_MODE_LONG_64, regs.rip, &insn, sizeof(insn), &instruction)))
	printf("%p: %s\n", (void *)regs.rip, instruction.text);
__sys_ptrace(PTRACE_SINGLESTEP, child_pid, NULL, NULL);if the next RIP address is  the full code is available in this repository, thanks for reading and thanks for making this great library!  | 
  
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
| 
         When the jump has the address in brackets then it is indeed a memory read and not the target address.  | 
  
Beta Was this translation helpful? Give feedback.
When the jump has the address in brackets then it is indeed a memory read and not the target address.