Add support for gdb-dashboard
authorStefan Huber <shuber@sthu.org>
Sat, 30 Jan 2021 14:59:27 +0000 (15:59 +0100)
committerStefan Huber <shuber@sthu.org>
Sat, 30 Jan 2021 14:59:27 +0000 (15:59 +0100)
gdb.sh [new file with mode: 0755]
gdbinit-dashboard [new file with mode: 0644]
init.vim

diff --git a/gdb.sh b/gdb.sh
new file mode 100755 (executable)
index 0000000..a1bbc34
--- /dev/null
+++ b/gdb.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+GDBARGS=""
+
+if [ -e ~/.gdbinit ] && grep -q dashboard ~/.gdbinit; then
+    GDBARGS="${GDBARGS} -x ~/.vim/gdbinit-dashboard"
+fi
+
+exec gdb ${GDBARGS} "$@"
diff --git a/gdbinit-dashboard b/gdbinit-dashboard
new file mode 100644 (file)
index 0000000..bcae487
--- /dev/null
@@ -0,0 +1 @@
+dashboard -layout registers assembly !source variables stack
index c97a142a3345e793f5af5076ecad34093edecd79..d2f90a4d058b5c9e749cb5959b03363fd3e142c3 100644 (file)
--- a/init.vim
+++ b/init.vim
@@ -304,7 +304,8 @@ let s:normal_mode_mappings = [
       \ ]
 
 " termdebug split windows
       \ ]
 
 " termdebug split windows
-let g:termdebug_wide=1
+let g:termdebug_wide = 1
+let termdebugger = $HOME . '/.vim/gdb.sh'
 
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""