]> git.rmz.io Git - dotfiles.git/commitdiff
gdb: increase history size and store hisfile in global location
authorSamir Benmendil <samir.benmendil@ultrahaptics.com>
Tue, 29 Jan 2019 07:17:29 +0000 (07:17 +0000)
committerSamir Benmendil <samir.benmendil@ultrahaptics.com>
Tue, 29 Jan 2019 07:17:29 +0000 (07:17 +0000)
Makefile
gdbinit

index 8a8b08afad996551517d63ad31e6f556dae1ed22..e67827e089bf8404ca2bf3a3c3cc5adb89a960ac 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ mutt: ~/.config
 .PHONY: mutt
 
 gdb:
+       mkdir ~/.local/share/gdb
        ln -sfT $(APATH)/gdbinit ~/.gdbinit
        ln -sfT $(APATH)/cgdb ~/.cgdb
 .PHONY: gdb
diff --git a/gdbinit b/gdbinit
index 9ed8ca05236519d71776adace428a9aa453d5944..aa8d6ed7ed9c34c4467560599faf8d8d834d0601 100644 (file)
--- a/gdbinit
+++ b/gdbinit
@@ -1,4 +1,12 @@
 set history save on
+set history size 10000
+
+python
+import os
+xdg_data = os.environ.get('XDG_DATA_HOME', '~/.local/share')
+gdb.execute('set history filename {}/gdb/gdb_history'.format(xdg_data))
+end
+
 set print pretty on
 set pagination off
 # set confirm off