aboutsummaryrefslogtreecommitdiffstats
path: root/.gdbinit
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-12-02 10:50:38 +0000
committerterminaldweller <thabogre@gmail.com>2021-12-02 10:50:38 +0000
commit5b044db592cebbe2bdb827daad081d6cba1673c8 (patch)
treea8adb838015f92007c69a16dcb35cdacd8d4759e /.gdbinit
parentmore updates (diff)
downloadscripts-5b044db592cebbe2bdb827daad081d6cba1673c8.tar.gz
scripts-5b044db592cebbe2bdb827daad081d6cba1673c8.zip
updates
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit19
1 files changed, 17 insertions, 2 deletions
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