nearpc: convert pc to pointer (#1048)

* nearpc: convert pc to pointer

* misc: soothe isort
pull/1051/head
egoism 3 years ago committed by GitHub
parent e867d1db0c
commit 5e78222d50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,6 @@
import argparse
import gdb
from capstone import *
import pwndbg.arguments
@ -52,6 +53,9 @@ def nearpc(pc=None, lines=None, to_string=False, emulate=False):
result = []
if pc is not None:
pc = gdb.Value(pc).cast(pwndbg.typeinfo.pvoid)
# Fix the case where we only have one argument, and
# it's a small value.
if lines is None and (pc is None or int(pc) < 0x100):

@ -1,4 +1,5 @@
import re
import gdb
import pwndbg.decorators

Loading…
Cancel
Save