Most things work for Python2.7

pull/3/head
Zach Riggle 11 years ago
parent aa654bf8fa
commit 9645ca195b

@ -110,7 +110,9 @@ def save_signal(signal):
last_signal = result = []
if isinstance(signal, gdb.ExitedEvent):
result.append(pwndbg.color.red('Exited: %r' % signal.exit_code))
# Booooo old gdb
if hasattr(signal, 'exit_code'):
result.append(pwndbg.color.red('Exited: %r' % signal.exit_code))
elif isinstance(signal, gdb.SignalEvent):
msg = 'Program received signal %s' % signal.stop_signal

@ -23,6 +23,7 @@ def rreload(module, paths=[''], mdict=None):
for attribute_name in dir(module):
attribute = getattr(module, attribute_name)
if attribute_name == 'inthook': continue
if type(attribute) is not types.ModuleType: continue
if not attribute.__name__.startswith(name): continue
if attribute in mdict[module]: continue
@ -32,6 +33,8 @@ def rreload(module, paths=[''], mdict=None):
_reload(module)
# Need to re-fire all events
@pwndbg.commands.Command
def reload(*a):
rreload(pwndbg)

@ -4,6 +4,11 @@ import traceback
debug = False
pause = 0
# In order to support reloading, we must be able to re-fire
# all 'objfile' and 'stop' events.
on_stop = []
on_new_objfile = []
class Pause(object):
def __enter__(self, *a, **kw):
global pause

@ -65,7 +65,8 @@ blacklist = ['regexp.h', 'xf86drm.h', 'libxl_json.h', 'xf86drmMode.h',
'caca0.h', 'xenguest.h', '_libxl_types_json.h', 'term_entry.h', 'slcurses.h',
'pcreposix.h', 'sudo_plugin.h', 'tic.h', 'sys/elf.h', 'sys/vm86.h',
'xenctrlosdep.h', 'xenctrl.h', 'cursesf.h', 'cursesm.h', 'gdbm.h', 'dbm.h',
'gcrypt-module.h', 'term.h', 'gmpxx.h', 'pcap/namedb.h', 'pcap-namedb.h']
'gcrypt-module.h', 'term.h', 'gmpxx.h', 'pcap/namedb.h', 'pcap-namedb.h',
'evr.h', 'mpc.h', 'fdt.h', 'mpfr.h', 'evrpc.h']
def load(name):
try:
@ -100,7 +101,7 @@ def load(name):
{name} foo;
'''.format(**locals())
filename = '%s/%s_%s' % (tempdir, arch, name)
filename = '%s/%s_%s' % (tempdir, arch, '-'.join(name.split()))
if not os.path.exists(filename + '.o'):
with open(filename + '.cc', 'w+') as f:

Loading…
Cancel
Save