Only get pc for r2 when the process is running (#584)

pull/589/head
Sudhakar Verma 7 years ago committed by Disconnect3d
parent db8fa6c70b
commit 7d71cdd991

@ -25,10 +25,11 @@ def r2(arguments, no_seek=False):
# Build up the command line to run
cmd = ['radare2', filename]
if pwndbg.proc.alive:
addr = pwndbg.regs.pc
if pwndbg.elf.get_elf_info(filename).is_pie:
addr -= pwndbg.elf.exe().address
if not no_seek and pwndbg.proc.alive:
if not no_seek:
cmd.extend(['-s', hex(addr)])
cmd += arguments

Loading…
Cancel
Save