summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdbinit16
-rwxr-xr-xinstall2
2 files changed, 17 insertions, 1 deletions
diff --git a/gdbinit b/gdbinit
index 758d532..cb20922 100644
--- a/gdbinit
+++ b/gdbinit
@@ -1,5 +1,19 @@
# dotfiles -- gdbinit
# author: johannst
-set history filename ~/.gdb_history
+set history filename ~/.gdb/gdb_history
set history save on
+
+set prompt bla>
+
+define bs
+ save breakpoints ~/.gdb/breakpoint.$arg0.save
+end
+
+define br
+ source ~/.gdb/breakpoint.$arg0.save
+end
+
+define hook-quit
+ bs q
+end
diff --git a/install b/install
index 6c56295..f332100 100755
--- a/install
+++ b/install
@@ -38,11 +38,13 @@ function bashrcInstaller() {
function gdbrcInstaller() {
local gdbinit=~/.gdbinit
+ local gdbdir=~/.gdb
touch $gdbinit
grep $gMagicNumber $gdbinit > /dev/null 2>&1
if [[ $? = 0 ]]; then
return
fi
+ if [ ! -d $gdbdir ]; then mkdir $gdbdir; fi
echo -e "\n# $gMagicNumber - Auto generated, do not delete or modify!" >> $gdbinit
echo -e "source $ABS_BASE_DIR/gdbinit" >> $gdbinit
}