mirror of https://github.com/pwndbg/pwndbg.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
408 B
Python
13 lines
408 B
Python
import gdb
|
|
import collections
|
|
|
|
Instruction = collections.namedtuple('Instruction', ['address', 'length', 'asm'])
|
|
|
|
def get(address, instructions=1):
|
|
address = int(address)
|
|
raw = gdb.selected_frame().architecture().disassemble(address, address+0xffffffff, instructions)
|
|
retval = []
|
|
for insn in raw:
|
|
retval.append(Instruction(insn['addr'],insn['length'], insn['asm']))
|
|
return retval
|