You are not logged in.
Pages: 1
i built this as i wanted to debug my shell scripts (natch)
first you have to patch and rebuild bash, i also used the stock Arch patch and PKGBUILD for this. However, i am unclear on all the provides, replaces and conflicts crap - how the hell do you set these right so it replaces a core pkg without causing loads of errors and forcing you to use -Sfd?
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
pkgname=bash-debug
pkgver=3.0
pkgrel=1
pkgdesc="The GNU Bourne Again shell, rebuilt with debugger support"
url="http://www.gnu.org/software/bash/bash.html"
license=""
backup=(etc/profile)
depends=('glibc' 'readline')
conflicts=('bash')
replaces=('bash')
provides=('bash')
install=
source=(ftp://ftp.cwru.edu/pub/bash/bash-3.0.tar.gz profile
bash-history.patch http://heanet.dl.sourceforge.net/sourceforge/bashdb/bashdb-3.00-0.01.tar.gz)
md5sums=('26c4d642e29b3533d8d754995bc277b3' '719b60711ee609850277bd0848516136'
'7108b64d6b21b74764a602e142ca6b2c' '7f96a4cb9c9e124e19b20cba852bbbea')
build() {
# build bash built as for arch + bashdb patch
cd $startdir/src/bash-3.0
patch -Np1 -i ../bash-history.patch || return 1
patch -Np1 -i ../bashdb-3.00-0.01/patch/bash-3.00.patch
./configure --prefix=/usr --with-curses --enable-readline --enable-debugger
make || return 1
make DESTDIR=$startdir/pkg install
mv $startdir/pkg/usr/bin $startdir/pkg/bin
# we don't want bashbug
rm -f $startdir/pkg/bin/bashbug
rm -f $startdir/pkg/usr/man/man1/bashbug.1
install -D -m644 ../profile $startdir/pkg/etc/profile
ln -sf bash $startdir/pkg/bin/sh
}
and then this is the debugger itself - this one is a bit hacky as the configure is absolutely useless!
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
pkgname=bashdb
pkgver=3.00
pkgrel=1
pkgdesc=""
url="http://bashdb.sourceforge.net"
license=""
backup=(etc/profile)
makedepends=('bash-debug' 'texinfo')
depends=('glibc' 'readline' 'bash-debug')
source=(http://heanet.dl.sourceforge.net/sourceforge/bashdb/$pkgname-$pkgver-0.01.tar.gz)
md5sums=('7f96a4cb9c9e124e19b20cba852bbbea')
build() {
# build bashdb
cd $startdir/src/$pkgname-$pkgver-0.01
# configure is PATHETIC but we'll run it anyway!
./configure --prefix=/usr
# some really crappy hacks to get compile to finish!
cat ./Makefile | sed "s|PKGDATADIR = /usr/local/lib/bashdb|PKGDATADIR = $startdir/pkg/usr/share/bashdb|g" >./Makefile.new && mv ./Makefile.new ./Makefile
cat ./Makefile | sed "s|/usr/local/lib/bashdb|$startdir/pkg/usr/share/bashdb|g" >./Makefile.new && mv ./Makefile.new ./Makefile
make || return 1
make prefix=$startdir/pkg/usr install
# make the symlink that configure can't make for us!
ln -sf dbg-main.inc $startdir/pkg/usr/share/bashdb/bashdb-main.inc
}
i haven't actually figured out how to use it - i have seen it running in emacs - which appears to make more user friendly but i have never used emacs
EDIT: looks like ddd is the way to go with it - it was ddd i saw not emacs!
Offline
um - i couldn't really get this to work and the recompiled bash was messing things up - any suggestions? also ddd couldn't even find the debugger
Offline
Pages: 1