From 5b044db592cebbe2bdb827daad081d6cba1673c8 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Thu, 2 Dec 2021 14:20:38 +0330 Subject: updates --- .gdbinit | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to '.gdbinit') diff --git a/.gdbinit b/.gdbinit index 50bee92..c76d101 100644 --- a/.gdbinit +++ b/.gdbinit @@ -11,14 +11,14 @@ source /usr/local/lib/python3.8/dist-packages/voltron/entry.py # load custom scripts python import glob -python_dir = "/home/devi/scripts/gdb/auto-load" +python_dir = "/home/devi/scripts/gdb" py_files = glob.glob(f"{python_dir}/*.py") for py_file in py_files: gdb.execute(f'source {py_file}') end # configs -set listsize 20 +set listsize 13 set follow-fork-mode child set detach-on-fork on # set backtrace-past-main on @@ -58,3 +58,18 @@ end define btall thread apply all backtrace end + +# custom signals +handle SIGUSR1 nopass +handle SIGUSR2 nopass +handle SIGUSR3 nopass +handle SIGUSR4 nopass +handle SIGUSR5 nopass + +# kill all inferiors before exit +python + import subprocess + inferiors = gdb.inferiors() + for inferior in inferiors: + subprocess.run(["kill","-9",repr(intferior.pid)]) +end -- cgit v1.2.3