summaryrefslogtreecommitdiffstats
path: root/development/gdb-dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'development/gdb-dashboard')
-rw-r--r--development/gdb-dashboard/README32
-rw-r--r--development/gdb-dashboard/doinst.sh14
-rw-r--r--development/gdb-dashboard/gdb-dashboard.SlackBuild51
-rw-r--r--development/gdb-dashboard/gdb-dashboard.info10
-rw-r--r--development/gdb-dashboard/slack-desc19
5 files changed, 126 insertions, 0 deletions
diff --git a/development/gdb-dashboard/README b/development/gdb-dashboard/README
new file mode 100644
index 0000000000..702c676e3f
--- /dev/null
+++ b/development/gdb-dashboard/README
@@ -0,0 +1,32 @@
+GDB dashboard is a standalone .gdbinit file written using the Python API
+that enables a modular interface showing relevant information about the
+program being debugged. Its main goal is to reduce the number of GDB
+commands needed to inspect the status of current program thus allowing
+the developer to primarily focus on the control flow.
+
+There are a few ways to enable the dashboard:
+
+* Add the following line to the end of ~/.gdbinit:
+
+ source /etc/gdbinit.d/dashboard
+
+* Enable in the GDB command using the -x flag:
+
+ gdb -q -x /etc/gdbinit.d/dashboard ...
+
+or if using cgdb too:
+
+ cgdb -- -q -x /etc/gdbinit.d/dashboard ...
+
+You may find that using cgdb and dashboard together works best with a
+vertical split.
+
+ Press:
+
+ <Esc> to enter cgdb CLI.
+ <Ctrl-W> to toggle split orientation.
+ i to return to GDB insert mode.
+
+Or add to ~/.cgdb/cdgbrc:
+
+ set wso=vertical
diff --git a/development/gdb-dashboard/doinst.sh b/development/gdb-dashboard/doinst.sh
new file mode 100644
index 0000000000..cec075ce53
--- /dev/null
+++ b/development/gdb-dashboard/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/gdbinit.d/dashboard.new
diff --git a/development/gdb-dashboard/gdb-dashboard.SlackBuild b/development/gdb-dashboard/gdb-dashboard.SlackBuild
new file mode 100644
index 0000000000..36fd8afbe4
--- /dev/null
+++ b/development/gdb-dashboard/gdb-dashboard.SlackBuild
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+# Slackware build script for gdb-dashboard.
+# by D Woodfall <dave@slackbuilds.org>
+# Licensed under the WTFPL.
+# See http://www.wtfpl.net/txt/copying/ for details.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=gdb-dashboard
+VERSION=${VERSION:-20240131}
+COMMITVER="b96e429c0db4b35c38302dd8c6cd90c65152f211"
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+ARCH=noarch
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$COMMITV
+tar xvf $CWD/$PRGNAM-$COMMITVER.tar.gz
+cd $PRGNAM-$COMMITVER
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+install -D -m 644 .gdbinit $PKG/etc/gdbinit.d/dashboard.new
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/gdb-dashboard/gdb-dashboard.info b/development/gdb-dashboard/gdb-dashboard.info
new file mode 100644
index 0000000000..589f876789
--- /dev/null
+++ b/development/gdb-dashboard/gdb-dashboard.info
@@ -0,0 +1,10 @@
+PRGNAM="gdb-dashboard"
+VERSION="20240131"
+HOMEPAGE="https://github.com/cyrus-and/gdb-dashboard"
+DOWNLOAD="https://github.com/cyrus-and/gdb-dashboard/archive/b96e429c0db4b35c38302dd8c6cd90c65152f211/gdb-dashboard-b96e429c0db4b35c38302dd8c6cd90c65152f211.tar.gz"
+MD5SUM="c199d1b7c6f1d957ead27cff23402c77"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="D Woodfall"
+EMAIL="dave@slackbuilds.org"
diff --git a/development/gdb-dashboard/slack-desc b/development/gdb-dashboard/slack-desc
new file mode 100644
index 0000000000..7ece9b2bcd
--- /dev/null
+++ b/development/gdb-dashboard/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+gdb-dashboard: gdb-dashboard (An advanced gdb python interface)
+gdb-dashboard:
+gdb-dashboard: GDB dashboard is a standalone .gdbinit file written using the Python
+gdb-dashboard: API that enables a modular interface showing relevant information
+gdb-dashboard: about the program being debugged. Its main goal is to reduce the
+gdb-dashboard: number of GDB commands needed to inspect the status of current
+gdb-dashboard: program thus allowing the developer to primarily focus on the control
+gdb-dashboard: flow.
+gdb-dashboard:
+gdb-dashboard: https://github.com/cyrus-and/gdb-dashboard/
+gdb-dashboard: