diff --git a/pwndbg/events.py b/pwndbg/events.py index 14878e6ef..5d06a2719 100644 --- a/pwndbg/events.py +++ b/pwndbg/events.py @@ -16,9 +16,11 @@ import traceback import gdb +import pwndbg.color import pwndbg.config import pwndbg.stdio + debug = pwndbg.config.Parameter('debug-events', False, 'display internal event debugging info') pause = 0 @@ -119,6 +121,9 @@ def connect(func, event_handler, name=''): try: func() except Exception as e: + msg = "Exception during func={}.{} {!r}".format(func.__module__, func.__name__, a) + msg = pwndbg.color.red(msg) + print(msg, file=sys.stderr) traceback.print_exc() raise e