From 940c5d4d85492624fab8c01bfd8c98e3eadadc42 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Sat, 30 Jan 2021 15:59:27 +0100 Subject: [PATCH] Add support for gdb-dashboard --- gdb.sh | 9 +++++++++ gdbinit-dashboard | 1 + init.vim | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 gdb.sh create mode 100644 gdbinit-dashboard diff --git a/gdb.sh b/gdb.sh new file mode 100755 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 index 0000000..bcae487 --- /dev/null +++ b/gdbinit-dashboard @@ -0,0 +1 @@ +dashboard -layout registers assembly !source variables stack diff --git a/init.vim b/init.vim index c97a142..d2f90a4 100644 --- a/init.vim +++ b/init.vim @@ -304,7 +304,8 @@ let s:normal_mode_mappings = [ \ ] " termdebug split windows -let g:termdebug_wide=1 +let g:termdebug_wide = 1 +let termdebugger = $HOME . '/.vim/gdb.sh' """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -- 2.39.5