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.
lokinet/contrib/ci/gdb-filter.py

24 lines
673 B
Python

def exit_handler (event):
code = 1
if hasattr(event, "exit_code"):
code = event.exit_code
with open("exit.out.txt", 'w') as f:
f.write("{}".format(code))
def crash_handler (event):
if (isinstance(event, gdb.SignalEvent)):
log_file_name = "crash.out.txt"
gdb.execute("set logging file " + log_file_name )
gdb.execute("set logging on")
gdb.execute("set logging redirect on")
4 years ago
gdb.execute("thread apply all bt full")
gdb.execute("q")
gdb.events.stop.connect(crash_handler)
gdb.events.exited.connect(exit_handler)
gdb.execute("set confirm off")
gdb.execute("set pagination off")
gdb.execute("r")
gdb.execute("q")