mirror of https://github.com/pwndbg/pwndbg.git
Add dumpargs command, remove debug printing
parent
718fa41929
commit
479005837b
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import pwndbg.commands
|
||||
import pwndbg.arguments
|
||||
import pwndbg.disasm
|
||||
|
||||
@pwndbg.commands.Command
|
||||
@pwndbg.commands.OnlyWhenRunning
|
||||
def dumpargs(*a):
|
||||
result = []
|
||||
|
||||
# For call instructions, attempt to resolve the target and
|
||||
# determine the number of arguments.
|
||||
for arg, value in pwndbg.arguments.get(pwndbg.disasm.one()):
|
||||
code = False if arg.type == 'char' else True
|
||||
pretty = pwndbg.chain.format(value, code=code)
|
||||
result.append('%8s%-10s %s' % ('',arg.name+':', pretty))
|
||||
|
||||
print '\n'.join(result)
|
||||
Loading…
Reference in new issue