Fixes wrong pc/ip display in context introduced in 9fd5d35 (#477)

Before this PR we could get wrong RIP (like off by one) when single stepping through the code:

```
[...]

 RIP  0x555555559850 ◂— xor    ebp, ebp
───────────────────────[ DISASM ]──────────────────────
   0x555555559850    xor    ebp, ebp
 ► 0x555555559852    mov    r9, rdx <0x7ffff7de59a0>

[...]

pwndbg> i r rip
rip            0x555555559852	0x555555559852
```

The patch fixes the issue by reassigning GDB stop signal handler to getting register values.
pull/478/head
Disconnect3d 8 years ago committed by GitHub
parent f56f27155e
commit 7815953781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -266,6 +266,7 @@ ARCH_GET_GS = 0x1004
class module(ModuleType):
last = {}
@pwndbg.memoize.reset_on_stop
@pwndbg.memoize.reset_on_prompt
def __getattr__(self, attr):
attr = attr.lstrip('$')

Loading…
Cancel
Save