|
|
|
|
@ -9,6 +9,7 @@ import gdb
|
|
|
|
|
from capstone import *
|
|
|
|
|
|
|
|
|
|
import pwndbg.arguments
|
|
|
|
|
import pwndbg.color
|
|
|
|
|
import pwndbg.color.context as C
|
|
|
|
|
import pwndbg.color.disasm as D
|
|
|
|
|
import pwndbg.color.nearpc as N
|
|
|
|
|
@ -55,6 +56,10 @@ def nearpc(pc=None, lines=None, to_string=False, emulate=False):
|
|
|
|
|
pc = int(pc)
|
|
|
|
|
lines = int(lines)
|
|
|
|
|
|
|
|
|
|
# Check whether we can even read this address
|
|
|
|
|
if not pwndbg.memory.peek(address):
|
|
|
|
|
return [pwndbg.color.red('Invalid address %#x' % address)]
|
|
|
|
|
|
|
|
|
|
# # Load source data if it's available
|
|
|
|
|
# pc_to_linenos = collections.defaultdict(lambda: [])
|
|
|
|
|
# lineno_to_src = {}
|
|
|
|
|
|