Resources:
remake – a GNU Makefile debugger: http://bashdb.sourceforge.net/remake/remake.html/Summary.html#Summary
BashDB – a bash script debugger: http://bashdb.sourceforge.net/bashdb.html#Top
Emacs-dbgr mode for the above: https://github.com/rocky/emacs-dbgr/wiki
Video for remake: http://showmedo.com/videotutorials/video?name=linuxBernsteinMakeDebug1&fromSeriesID=40
GDB tutorial: http://www.dirac.org/linux/gdb/
General debugging course: http://www.udacity.com/view#Course/cs259/CourseRev/1/Unit/135001/Nugget/137001
How to run gdb with libtool:
Shell:
Gdb can be run using subversion/svnrdump/.libs/lt-svnrdump. Note that this program doesn't exist until after the first post-compilation invocation of subversion/svnrdump/svnrdump itself.
Re-set $SHELL so shelling out from gdb will start your $SHELL, rather than sh.
libtool --mode=execute env SHELL=$SHELL gdb -args ./subversion/svn/svn up -r 2
The execute mode can be abbreviated to make the command a little quicker to type:
libtool e env SHELL=$SHELL gdb -args ./subversion/svn/svn up -r 2
Note that the above commands above must provide an absolute or relative path to a libtool wrapper script which wraps the executable you want to run. Even if the path to the script is on your PATH it will not work because libtool scans each argument to detect if it is a libtool wrapper script. When it finds an argument that is a libtool wrapper script it then sets the environment that the script would have and replaces the argument with the path to actual executable the script wraps. Since bare filenames on your path will not be resolved to absolute paths till the shell goes to execute them, it won't detect these scripts and won't set the environment up properly and gdb will complain that the script is not an executable.
Emacs:
Emacs 24.1.1 can run gdb with libtool inside gdb mode:
M-x gdb -> libtool --mode=execute gdb -i=mi -epoch /your/target.file