--- bash-2.05b-2.orig/debian/README.bash_completion
+++ bash-2.05b-2/debian/README.bash_completion
@@ -0,0 +1,17 @@
+			Programmable Completion
+			=======================
+
+[BUG REPORTING: Please direct all enhancement requests directly to the
+ bash_completion maintainer, the completion script won't be changed for
+ Debian specific enhancements. If you find a real bug, report it the usual
+ way. The bash_completion author can be reached at
+ http://freshmeat.net/projects/bashcompletion/
+
+ If you find a newer version on freshmeat, you can replace it, if you did
+ not change the Debian version.
+]
+
+To enable programmable completion for bash on Debian, uncomment the
+bash_completion lines in /etc/bash.bashrc to source /etc/bash_completion.
+/etc/bash_completion sources ~/.bash_completion, if it exists.
+
--- bash-2.05b-2.orig/debian/skel.bash_logout
+++ bash-2.05b-2/debian/skel.bash_logout
@@ -0,0 +1,7 @@
+# ~/.bash_logout: executed by bash(1) when login shell exits.
+
+# when leaving the console clear the screen to increase privacy
+
+case "`tty`" in
+    /dev/tty[0-9]*) clear
+esac
--- bash-2.05b-2.orig/debian/inputrc.arrows
+++ bash-2.05b-2/debian/inputrc.arrows
@@ -0,0 +1,30 @@
+# This file controls the behaviour of line input editing for
+# programs that use the Gnu Readline library.
+#
+# Arrow keys in keypad mode
+#
+"\C-[OD"        backward-char
+"\C-[OC"        forward-char
+"\C-[OA"        previous-history
+"\C-[OB"        next-history
+#
+# Arrow keys in ANSI mode
+#
+"\C-[[D"        backward-char
+"\C-[[C"        forward-char
+"\C-[[A"        previous-history
+"\C-[[B"        next-history
+#
+# Arrow keys in 8 bit keypad mode
+#
+"\C-M-OD"       backward-char
+"\C-M-OC"       forward-char
+"\C-M-OA"       previous-history
+"\C-M-OB"       next-history
+#
+# Arrow keys in 8 bit ANSI mode
+#
+"\C-M-[D"       backward-char
+"\C-M-[C"       forward-char
+"\C-M-[A"       previous-history
+"\C-M-[B"       next-history
--- bash-2.05b-2.orig/debian/README.abs-guide
+++ bash-2.05b-2/debian/README.abs-guide
@@ -0,0 +1,26 @@
+[ This is just a pointer to a document, which you might find helpful]
+
+			Advanced Bash-Scripting Guide
+
+		A complete guide to shell scripting, using Bash
+
+			Mendel Cooper - Brindlesoft
+
+			thegrendel@theriver.com
+
+
+This tutorial assumes no previous knowledge of scripting or programming, but
+progresses rapidly toward an intermediate/advanced level of instruction
+(...all the while sneaking in little snippets of UNIX wisdom and lore). It
+serves as a textbook, a manual for self-study, and a reference and source
+of knowledge on shell scripting techniques. The exercises and heavily-
+commented examples invite active reader participation, under the premise that
+the only way to really learn scripting is to write scripts.
+
+The guide is availabe at http://tldp.org/LDP/abs/html/
+
+The latest update of this document, as an archived "tarball" including both
+the SGML source and rendered HTML, may be downloaded from the author's home
+site (http://personal.riverusers.com/~thegrendel/abs-guide-2.1.tar.bz2). See
+the change log for a revision history
+(http://personal.riverusers.com/~thegrendel/Change.log).
--- bash-2.05b-2.orig/debian/etc.inputrc
+++ bash-2.05b-2/debian/etc.inputrc
@@ -0,0 +1,13 @@
+# /etc/inputrc - global inputrc for libreadline
+# See readline(3readline) and `info readline' for more information.
+
+# Be 8 bit clean.
+set input-meta on
+set output-meta on
+
+# To allow the use of german 8bit-characters like the german umlauts, comment
+# out the two lines below. However this makes the meta key not work as a meta
+# key, which is annoying to those which don't need to type in 8-bit characters.
+
+#set meta-flag on
+#set convert-meta off
--- bash-2.05b-2.orig/debian/patches/rl-header.dpatch
+++ bash-2.05b-2/debian/patches/rl-header.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: include stdio.h in readline.h
+--- lib/readline/readline.h~	Thu Aug  5 14:10:59 1999
++++ lib/readline/readline.h	Mon Oct  9 20:32:56 2000
+@@ -32,6 +32,7 @@
+ #  include "keymaps.h"
+ #  include "tilde.h"
+ #else
++#  include <stdio.h>
+ #  include <readline/rlstdc.h>
+ #  include <readline/keymaps.h>
+ #  include <readline/tilde.h>
--- bash-2.05b-2.orig/debian/patches/deb-examples.dpatch
+++ bash-2.05b-2/debian/patches/deb-examples.dpatch
@@ -0,0 +1,30 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: document readline header location on Debian systems
+
+diff -u ./examples/loadables/README.orig ./examples/loadables/README
+--- ./examples/loadables/README.orig	Thu May  7 20:31:34 1998
++++ ./examples/loadables/README	Thu Nov 11 20:32:57 1999
+@@ -31,3 +31,6 @@
+ the canonical example.  There is no real `builtin writers' programming
+ guide'.  The file template.c provides a template to use for creating
+ new loadable builtins.
++
++On Debian GNU/Linux systems, the bash headers are in /usr/include/bash.
++The appropriate options are already set in the example Makefile.
+
--- bash-2.05b-2.orig/debian/patches/man-fignore.dpatch
+++ bash-2.05b-2/debian/patches/man-fignore.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: bash(1): mention quoting when assigning to FIGNORE
+
+--- doc/bash.1~	Fri May 31 00:45:57 2002
++++ doc/bash.1	Fri May 31 00:48:52 2002
+@@ -1456,7 +1456,9 @@
+ is excluded from the list of matched filenames.
+ A sample value is
+ .if t \f(CW".o:~"\fP.
+-.if n ".o:~".
++.if n ".o:~"
++(Quoting is needed when assigning a value to this variable,
++which contains tildes).
+ .TP
+ .B GLOBIGNORE
+ A colon-separated list of patterns defining the set of filenames to
--- bash-2.05b-2.orig/debian/patches/template.dpatch
+++ bash-2.05b-2/debian/patches/template.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: <your description>
--- bash-2.05b-2.orig/debian/patches/rl-inputrc.dpatch
+++ bash-2.05b-2/debian/patches/rl-inputrc.dpatch
@@ -0,0 +1,91 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: Support for /etc/inputrc in addition to ~/inputrc
+
+diff -r -u readline4-4.2.orig/bind.c readline4-4.2/bind.c
+--- readline4-4.2.orig/lib/readline/bind.c	Wed Nov  8 18:39:01 2000
++++ readline4-4.2/lib/readline/bind.c	Tue Feb  6 18:24:42 2001
+@@ -593,6 +593,9 @@
+ /* The last key bindings file read. */
+ static char *last_readline_init_file = (char *)NULL;
+ 
++/* Flag to read system init file */
++static int read_system_init_file = 0;
++
+ /* The file we're currently reading key bindings from. */
+ static const char *current_readline_init_file;
+ static int current_readline_init_include_level;
+@@ -670,7 +673,7 @@
+    to the first non-null filename from this list:
+      1. the filename used for the previous call
+      2. the value of the shell variable `INPUTRC'
+-     3. ~/.inputrc
++     3. /etc/inputrc and ~/.inputrc
+    If the file existed and could be opened and read, 0 is returned,
+    otherwise errno is returned. */
+ int
+@@ -681,14 +684,23 @@
+   if (filename == 0)
+     {
+       filename = last_readline_init_file;
+-      if (filename == 0)
++      if (filename == 0) {
+         filename = sh_get_env_value ("INPUTRC");
+-      if (filename == 0)
++	read_system_init_file = 0;
++      }
++      if (filename == 0) {
+ 	filename = DEFAULT_INPUTRC;
++	read_system_init_file = 1;
++      }
+     }
+ 
+-  if (*filename == 0)
++  if (*filename == 0) {
+     filename = DEFAULT_INPUTRC;
++    read_system_init_file = 1;
++  }
++
++  if (read_system_init_file)
++    _rl_read_init_file (SYSTEM_INPUTRC, 0);
+ 
+ #if defined (__MSDOS__)
+   if (_rl_read_init_file (filename, 0) == 0)
+--- readline4-4.2.orig/lib/readline/doc/rluser.texinfo	Mon Feb  5 15:38:11 2001
++++ readline4-4.2/lib/readline/doc/rluser.texinfo	Tue Feb  6 18:24:42 2001
+@@ -332,7 +332,8 @@
+ @ifclear BashFeatures
+ file is taken from the value of the environment variable @env{INPUTRC}.  If
+ @end ifclear
+-that variable is unset, the default is @file{~/.inputrc}.
++that variable is unset, Readline will read both @file{/etc/inputrc} and 
++@file{~/.inputrc}.
+ 
+ When a program which uses the Readline library starts up, the
+ init file is read, and the key bindings are set.
+diff -r -u readline4-4.2.orig/rlconf.h readline4-4.2/rlconf.h
+--- readline4-4.2.orig/lib/readline/rlconf.h	Thu Aug  5 14:11:14 1999
++++ readline4-4.2/lib/readline/rlconf.h	Tue Feb  6 18:24:42 2001
+@@ -39,6 +39,7 @@
+ 
+ /* The final, last-ditch effort file name for an init file. */
+ #define DEFAULT_INPUTRC "~/.inputrc"
++#define SYSTEM_INPUTRC "/etc/inputrc"
+ 
+ /* If defined, expand tabs to spaces. */
+ #define DISPLAY_TABS
--- bash-2.05b-2.orig/debian/patches/man-vx-opts.dpatch
+++ bash-2.05b-2/debian/patches/man-vx-opts.dpatch
@@ -0,0 +1,34 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: document -v / -x options
+
+--- ./doc/bash.1~	Wed Jan 20 22:48:04 1999
++++ ./doc/bash.1	Sun Nov 14 13:26:59 1999
+@@ -104,6 +104,12 @@
+ This option allows the positional parameters to be set
+ when invoking an interactive shell.
+ .TP
++.B \-v
++Print shell input lines as they are read.
++.TP
++.B \-x
++Print commands and their arguments as they are executed.
++.TP
+ .B \-D
+ A list of all double-quoted strings preceded by \fB$\fP
+ is printed on the standard ouput.
--- bash-2.05b-2.orig/debian/patches/bashbug-editor.dpatch
+++ bash-2.05b-2/debian/patches/bashbug-editor.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: send bug reports to Debian bash maintainer too.
+
+--- ./support/bashbug.sh~	Mon Nov 27 17:15:21 2000
++++ ./support/bashbug.sh	Tue Feb  6 18:54:48 2001
+@@ -98,6 +98,7 @@
+ 		esac ;;
+ esac
+ 
++BUGBASH="${BUGBASH},bash@packages.debian.org"
+ BUGADDR="${1-$BUGBASH}"
+ 
+ if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
--- bash-2.05b-2.orig/debian/patches/deb-bash-config.dpatch
+++ bash-2.05b-2/debian/patches/deb-bash-config.dpatch
@@ -0,0 +1,83 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: Changed compile time configuration options:
+# DP: 
+# DP: - Set the default path to comply with Debian policy
+# DP: 
+# DP: - Define DONT_REPORT_SIGPIPE: We don't want to see `Broken pipe' messages
+# DP:   when a job like `cat jobs.c | exit 1' is executed. Fixes part of #7047,
+# DP:   #10259, #10433 and #10494. Comment from the upstream author: "The
+# DP:   default bash behavior with respect to the exit status of a pipeline
+# DP:   will not change.  Changing it as suggested in the discussion of #10494
+# DP:   would render bash incompatible with every other shell out there.".
+# DP: 
+# DP: - Enable System-wide .bashrc file for interactive shells.
+# DP: 
+# DP: - Enable System-wide .bash_logout  file for interactive shells.
+# DP: 
+# DP: - make non-interactive shells begun with argv[0][0] == '-'
+# DP:   run the startup files when not in posix mode.
+# DP: 
+# DP: - try to check whether bash is being run by sshd and source
+# DP:   the .bashrc if so (like the rshd behavior).
+
+--- bash-2.05a.orig/config-top.h	Wed Oct 24 19:28:49 2001
++++ bash-2.05a/config-top.h	Fri Nov  2 11:16:00 2001
+@@ -29,19 +29,19 @@
+ 
+ /* Define DONT_REPORT_SIGPIPE if you don't want to see `Broken pipe' messages
+    when a job like `cat jobs.c | exit 1' is executed. */
+-/* #define DONT_REPORT_SIGPIPE */
++#define DONT_REPORT_SIGPIPE
+ 
+ /* The default value of the PATH variable. */
+ #ifndef DEFAULT_PATH_VALUE
+ #define DEFAULT_PATH_VALUE \
+-  "/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:."
++  "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+ #endif
+ 
+ /* The value for PATH when invoking `command -p'.  This is only used when
+    the Posix.2 confstr () function, or CS_PATH define are not present. */
+ #ifndef STANDARD_UTILS_PATH
+ #define STANDARD_UTILS_PATH \
+-  "/bin:/usr/bin:/usr/ucb:/sbin:/usr/sbin:/etc:/usr/etc"
++  "/bin:/usr/bin:/sbin:/usr/sbin"
+ #endif
+ 
+ /* Default primary and secondary prompt strings. */
+@@ -49,15 +49,15 @@
+ #define SPROMPT "> "
+ 
+ /* System-wide .bashrc file for interactive shells. */
+-/* #define SYS_BASHRC "/etc/bash.bashrc" */
++#define SYS_BASHRC "/etc/bash.bashrc"
+ 
+ /* System-wide .bash_logout for login shells. */
+-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
++#define SYS_BASH_LOGOUT "/etc/bash.bash_logout"
+ 
+ /* Define this to make non-interactive shells begun with argv[0][0] == '-'
+    run the startup files when not in posix mode. */
+-/* #define NON_INTERACTIVE_LOGIN_SHELLS */
++#define NON_INTERACTIVE_LOGIN_SHELLS
+ 
+ /* Define this if you want bash to try to check whether it's being run by
+    sshd and source the .bashrc if so (like the rshd behavior). */
+-/* #define SSH_SOURCE_BASHRC */
++#define SSH_SOURCE_BASHRC
--- bash-2.05b-2.orig/debian/patches/rl-deb-build.dpatch
+++ bash-2.05b-2/debian/patches/rl-deb-build.dpatch
@@ -0,0 +1,85 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: Debian specific patches that allow libreadline to be built
+# DP: as a static _and_ a shared library.
+
+--- ./lib/readline/Makefile.in~	Thu Feb 18 18:12:41 1999
++++ ./lib/readline/Makefile.in	Thu Nov 11 13:35:06 1999
+@@ -5,7 +5,8 @@
+ #############################################################################
+ 
+ srcdir = @srcdir@
+-VPATH = .:@srcdir@
++vpath %.c $(srcdir)
++vpath %.h $(srcdir)
+ topdir = @top_srcdir@
+ BUILD_DIR = @BUILD_DIR@
+ 
+@@ -32,12 +33,16 @@
+ CPPFLAGS = @CPPFLAGS@
+ LDFLAGS = @LDFLAGS@
+ 
+-DEFS = @DEFS@
++ifndef NOFPIC
++PICFLAGS = -fPIC
++endif
++
++DEFS = @DEFS@ -D_REENTRANT
+ LOCAL_DEFS = @LOCAL_DEFS@
+ 
+ INCLUDES = -I. -I$(BUILD_DIR) -I$(topdir) -I$(topdir)/lib
+ 
+-CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
++CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS) $(PICFLAGS)
+ 
+ .c.o:
+ 	${RM} $@
+@@ -86,7 +91,22 @@
+ 
+ ##########################################################################
+ 
+-all: libreadline.a libhistory.a
++all: libreadline.so libhistory.so staticlibs
++
++staticlibs:
++	test -d static || mkdir static
++	$(MAKE) -C static -f $(BUILD_DIR)/lib/readline/Makefile \
++		srcdir=$(srcdir) NOFPIC=1 libreadline.a libhistory.a
++
++libreadline.so: $(OBJECTS)
++	$(RM) -f $@
++	$(CC) $(LDFLAGS) -shared -Wl,-soname,libreadline.so.$(SOVERSION) \
++		-o libreadline.so $(OBJECTS) -lncurses
++
++libhistory.so: history.o
++	$(RM) -f $@
++	$(CC) $(LDFLAGS) -shared -Wl,-soname,libhistory.so.$(SOVERSION) \
++		-o libhistory.so $(HISTOBJ) xmalloc.o
+ 
+ libreadline.a: $(OBJECTS)
+ 	$(RM) $@
+@@ -117,7 +137,8 @@
+ 	$(CTAGS) $(CSOURCES) $(HSOURCES)
+ 
+ clean:	force
+-	$(RM) $(OBJECTS) *.a
++	-$(RM) $(OBJECTS) *.a *.so
++	-$(RM) -r static
+ 	-( cd doc && $(MAKE) $(MFLAGS) $@ )
+ 
+ mostlyclean: clean
--- bash-2.05b-2.orig/debian/patches/rl-examples.dpatch
+++ bash-2.05b-2/debian/patches/rl-examples.dpatch
@@ -0,0 +1,43 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: Modified readline examples to properly build with Debian setup.
+
+--- ./lib/readline/examples/Makefile.orig	Fri Nov 26 23:13:35 1999
++++ ./lib/readline/examples/Makefile	Fri Nov 26 23:15:19 1999
+@@ -1,8 +1,8 @@
+ # This is the Makefile for the examples subdirectory of readline. -*- text -*-
+ #
+ EXECUTABLES = fileman rltest rl
+-CFLAGS  = -g -I../.. -I.. -DREADLINE_LIBRARY
+-LDFLAGS = -g -L..
++CFLAGS  = -g
++LDFLAGS = -g
+ 
+ .c.o:
+ 	$(CC) $(CFLAGS) -c $<
+--- ./lib/readline/examples/rl.c~	Mon Nov  8 22:22:03 1999
++++ ./lib/readline/examples/rl.c	Fri Dec 31 17:34:30 1999
+@@ -11,7 +11,7 @@
+ 
+ #include <stdio.h>
+ #include <sys/types.h>
+-#include "posixstat.h"
++#include <sys/stat.h>
+ 
+ #if defined (READLINE_LIBRARY)
+ #  include "readline.h"
--- bash-2.05b-2.orig/debian/patches/rl-del-backspace-policy.dpatch
+++ bash-2.05b-2/debian/patches/rl-del-backspace-policy.dpatch
@@ -0,0 +1,47 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: Handle Debian Backspace/Delete keyboard policy
+
+--- lib/readline/terminal.c.orig	Mon Mar  4 18:23:09 2002
++++ lib/readline/terminal.c	Fri Jul 19 08:25:48 2002
+@@ -148,6 +148,9 @@
+ /* Insert key */
+ static char *_rl_term_kI;
+ 
++/* The key sequence sent by the Delete key, if any. */
++static char *_rl_term_kD;
++
+ /* Cursor control */
+ static char *_rl_term_vs;	/* very visible */
+ static char *_rl_term_ve;	/* normal */
+@@ -314,6 +317,7 @@
+   { "ic", &_rl_term_ic },
+   { "im", &_rl_term_im },
+   { "kH", &_rl_term_kH },	/* home down ?? */
++  { "kD", &_rl_term_kD },	/* delete */
+   { "kI", &_rl_term_kI },	/* insert */
+   { "kd", &_rl_term_kd },
+   { "ke", &_rl_term_ke },	/* end keypad mode */
+@@ -496,6 +500,7 @@
+ 
+   _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line);	/* Home */
+   _rl_bind_if_unbound (_rl_term_at7, rl_end_of_line);	/* End */
++  _rl_bind_if_unbound (_rl_term_kD, rl_delete);	        /* Delete */
+ 
+   _rl_keymap = xkeymap;
+ }
--- bash-2.05b-2.orig/debian/patches/privmode.dpatch
+++ bash-2.05b-2/debian/patches/privmode.dpatch
@@ -0,0 +1,36 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: XXX missing description
+# DP: 
+# DP: Comment from Chet Ramey <chet@nike.ins.cwru.edu>:
+# DP: 
+# DP: Nope.  This will allow setuid scripts if not called as `sh' and not 
+# DP: called with the -p option.  I won't install this. 
+ 
+
+--- bash-2.02.1.orig/shell.c
++++ bash-2.02.1/shell.c
+@@ -378,7 +378,7 @@
+   if (dump_translatable_strings)
+     read_but_dont_execute = 1;
+ 
+-  if (running_setuid && privileged_mode == 0)
++  if (running_setuid && privileged_mode == 0 && act_like_sh == 0)
+     disable_priv_mode ();
+ 
+   /* Need to get the argument to a -c option processed in the
--- bash-2.05b-2.orig/debian/patches/various.dpatch
+++ bash-2.05b-2/debian/patches/various.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: a header include change
+
+--- bash-2.02.1.orig/general.h
++++ bash-2.02.1/general.h
+@@ -21,6 +21,7 @@
+ #if !defined (_GENERAL_H_)
+ #define _GENERAL_H_
+ 
++#include <sys/types.h>
+ #include "stdc.h"
+ 
+ #include "bashtypes.h"
--- bash-2.05b-2.orig/debian/patches/man-builtin.dpatch
+++ bash-2.05b-2/debian/patches/man-builtin.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: fix man page include
+
+--- doc/builtins.1~	Mon Nov 29 22:30:13 1999
++++ doc/builtins.1	Tue Aug  1 21:54:06 2000
+@@ -10,6 +10,6 @@
+ ulimit, umask, unalias, unset, until, wait, while \- bash built-in commands, see \fBbash\fR(1)
+ .SH BASH BUILTIN COMMANDS
+ .nr zZ 1
+-.so bash.1
++.so /usr/share/man/man1/bash.1
+ .SH SEE ALSO
+ bash(1), sh(1)
--- bash-2.05b-2.orig/debian/patches/man-arithmetic.dpatch
+++ bash-2.05b-2/debian/patches/man-arithmetic.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: document deprecated syntax for arithmetic evaluation.
+
+--- doc/bash.1~	Sun Apr 29 23:35:03 2001
++++ doc/bash.1	Sat Jul 21 21:48:33 2001
+@@ -2301,6 +2301,9 @@
+ \fB$((\fP\fIexpression\fP\fB))\fP
+ .RE
+ .PP
++The old format \fB$[\fP\fIexpression\fP\fB]\fP is deprecated and will
++be removed in upcoming versions of bash.
++.PP
+ The
+ .I expression
+ is treated as if it were within double quotes, but a double quote
--- bash-2.05b-2.orig/debian/patches/report-155436.dpatch
+++ bash-2.05b-2/debian/patches/report-155436.dpatch
@@ -0,0 +1,62 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+From: Satoshi Koike <s-koike@jaist.ac.jp>
+Sender: Satoshi Koike <s-koike@scene.jaist.ac.jp>
+To: submit@bugs.debian.org
+Subject: Bug#155436: bash: Completion by TAB in quoted sequence(`...`) with Multibyte Locale
+Date: Mon, 05 Aug 2002 06:29:19 +0900
+
+Package: bash
+Version: 2.05b-2
+Severity: normal
+
+# DP: Completion by TAB in quoted sequence(`...`) with Multibyte Locale
+
+I use bash with Japanese Locale (ja_JP.eucJP). When I use the command
+completion by [TAB] key in quoted sequence using `...`, bash freeze
+and I must push Ctrl-C for getting bash prompt.
+
+The followed is example.
+
+> $ echo `pwd[TAB]
+[bash is freezing and pushing Ctrl-C will get prompt]
+
+I checked the source code, and I knew that bash stopped in function
+unclosed_pair(char *, int, char *) in subst.c. unclosed_pair() uses
+the macro ADVANCE_CHAR defined in include/shmbutil.h. This macro
+increases the pointer variable, but it doesn't increase in the
+multibyte environment. Because in the multibyte environment, it
+increases the pointer using the return value of mbrlen(3). mbrlen()
+returns ZERO when the given word is the termination.
+
+So, I think that the macro ADVANCED_CHAR will be change like the
+followed patch.
+
+------------------------------ patch ------------------------------
+--- include/shmbutil.h.orig	2002-08-05 06:26:13.000000000 +0900
++++ include/shmbutil.h	2002-08-05 06:19:37.000000000 +0900
+@@ -120,6 +120,8 @@
+ 		state = state_bak; \
+ 		(_i)++; \
+ 	      } \
++            else if (mblength == 0) \
++              (_i)++; \
+ 	    else \
+ 	      (_i) += mblength; \
+ 	  } \
+------------------------------ patch ------------------------------
--- bash-2.05b-2.orig/debian/patches/bash205b-001.dpatch
+++ bash-2.05b-2/debian/patches/bash205b-001.dpatch
@@ -0,0 +1,52 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: bash-2.05b upstream patch 001
+
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release: 2.05b
+Patch-ID: bash205b-001
+
+Bug-Reported-by:    taviso@sdf.lonestar.org
+Bug-Reference-ID:   <200208021107.g72B723d021352@darkstar.example.net>
+Bug-Reference-URL:  http://mail.gnu.org/pipermail/bug-bash/2002-August/004980.html
+
+Bug-Description:
+
+Bash goes into an infinite loop and eventually crashes with a SIGSEGV
+when some keys on the numeric keypad are pressed, possibly in combination
+with the shift key.
+
+Patch:
+
+*** ../bash-2.05b/lib/readline/bind.c	Thu Jan 24 11:15:52 2002
+--- lib/readline/bind.c	Wed Jul 31 09:11:18 2002
+***************
+*** 312,316 ****
+  	     and the function bound  to `a' to be executed when the user
+  	     types `abx', leaving `bx' in the input queue. */
+! 	  if (k.function /* && k.type == ISFUNC */)
+  	    {
+  	      map[ANYOTHERKEY] = k;
+--- 312,316 ----
+  	     and the function bound  to `a' to be executed when the user
+  	     types `abx', leaving `bx' in the input queue. */
+! 	  if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR))
+  	    {
+  	      map[ANYOTHERKEY] = k;
--- bash-2.05b-2.orig/debian/patches/bash205b-002.dpatch
+++ bash-2.05b-2/debian/patches/bash205b-002.dpatch
@@ -0,0 +1,46 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: bash-2.05b upstream patch 002
+
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release: 2.05b
+Patch-ID: bash205b-002
+
+Bug-Reported-by:  rwhron@earthlink.net
+Bug-Reference-ID: <20020724000454.GA15210@rushmore> (bug-bash)
+Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-July/004856.html
+
+Bug-Description:
+
+Repeating an edit in vi-mode with `.' does not work.
+
+Patch:
+
+*** ../bash-2.05b/lib/readline/readline.c	Wed Mar 13 17:10:46 2002
+--- lib/readline/readline.c	Tue Jul 30 17:46:44 2002
+***************
+*** 685,688 ****
+--- 685,689 ----
+  #if defined (VI_MODE)
+    if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
++       key != ANYOTHERKEY &&
+        _rl_vi_textmod_command (key))
+      _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
+
--- bash-2.05b-2.orig/debian/patches/bash205b-003.dpatch
+++ bash-2.05b-2/debian/patches/bash205b-003.dpatch
@@ -0,0 +1,77 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: bash-2.05b upstream patch 003
+
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release: 2.05b
+Patch-ID: bash205b-003
+
+Bug-Reported-by:   jan.q.bruun-andersen@posten.se
+Bug-Reference-ID:  <BE156C6450189B4ABAF7381F0AD4724A0165674F@002exmbs002.ad.posten.se>
+Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-July/004789.html
+
+Bug-Description:
+
+In certain cases, Bash appends a space instead of a slash to a directory
+name relative to the current directory when performing command name
+completion.  This affects partial completion of intermediate directory
+names.
+
+Patch:
+
+*** ../bash-2.05b/bashline.c	Tue May  7 15:52:42 2002
+--- bashline.c	Sat Aug  3 11:40:16 2002
+***************
+*** 1045,1049 ****
+--- 1045,1052 ----
+        else
+  	{
++ #define CMD_IS_DIR(x)	(absolute_pathname(x) == 0 && *(x) != '~' && test_for_directory (x))
++ 
+  	  matches = rl_completion_matches (text, command_word_completion_function);
++ 
+  	  /* If we are attempting command completion and nothing matches, we
+  	     do not want readline to perform filename completion for us.  We
+***************
+*** 1053,1057 ****
+  	  if (matches == (char **)NULL)
+  	    rl_ignore_some_completions_function = bash_ignore_filenames;
+! 	  else if (matches[1] == 0 && *matches[0] != '/')
+  	    /* Turn off rl_filename_completion_desired so readline doesn't
+  	       append a slash if there is a directory with the same name
+--- 1056,1060 ----
+  	  if (matches == (char **)NULL)
+  	    rl_ignore_some_completions_function = bash_ignore_filenames;
+! 	  else if (matches[1] == 0 && CMD_IS_DIR(matches[0]))
+  	    /* Turn off rl_filename_completion_desired so readline doesn't
+  	       append a slash if there is a directory with the same name
+***************
+*** 1062,1066 ****
+  	       conflict. */
+  	    rl_filename_completion_desired = 0;
+! 	  else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && *matches[0] != '/')
+  	    /* There are multiple instances of the same match (duplicate
+  	       completions haven't yet been removed).  In this case, all of
+--- 1065,1069 ----
+  	       conflict. */
+  	    rl_filename_completion_desired = 0;
+! 	  else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0]))
+  	    /* There are multiple instances of the same match (duplicate
+  	       completions haven't yet been removed).  In this case, all of
--- bash-2.05b-2.orig/debian/patches/bash205b-004.dpatch
+++ bash-2.05b-2/debian/patches/bash205b-004.dpatch
@@ -0,0 +1,60 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: bash-2.05b upstream patch 004
+
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release: 2.05b
+Patch-ID: bash205b-004
+
+Bug-Reported-by:   c.f.a.johnson@rogers.com
+Bug-Reference-ID:  <aji8sb$1aa9bi$2@ID-136730.news.dfncis.de>
+Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-August/005074.html
+
+Bug-Description:
+
+A bug in the bash variable expansion code causes leading blanks in a
+variable's value to be ignored when computing its length.
+
+Patch:
+
+*** ../bash-2.05b/subst.c	Mon Jun 24 07:59:45 2002
+--- subst.c	Sat Aug 17 17:28:46 2002
+***************
+*** 1639,1647 ****
+  /* This performs word splitting and quoted null character removal on
+     STRING. */
+! #if 0
+! #define issep(c)	((separators)[1] ? (member ((c), separators)) : (c) == (separators)[0])
+! #else
+! #define issep(c)	((separators)[1] ? isifs(c) : (c) == (separators)[0])
+! #endif
+  
+  WORD_LIST *
+--- 1639,1646 ----
+  /* This performs word splitting and quoted null character removal on
+     STRING. */
+! #define issep(c) \
+! 	(((separators)[0]) ? ((separators)[1] ? isifs(c) \
+! 					      : (c) == (separators)[0]) \
+! 			   : 0)
+  
+  WORD_LIST *
+
+
--- bash-2.05b-2.orig/debian/patches/s390-build.dpatch
+++ bash-2.05b-2/debian/patches/s390-build.dpatch
@@ -0,0 +1,82 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: eliminate build warning on s390
+
+From: Chet Ramey <chet@nike.ins.cwru.edu>
+To: Gerhard Tonn <GerhardTonn@swol.de>
+Cc: chet@po.cwru.edu, doko@debian.org
+Subject: Debian Bash bug #160731
+Date: Thu, 26 Sep 2002 14:04:56 -0400
+
+Try this patch, and see what happens.  It should eliminate the warning,
+at least.  Your line numbers will vary.
+
+Chet
+
+*** ../bash-2.05b/parse.y	Tue May 21 11:57:30 2002
+--- ./parse.y	Thu Sep 26 12:08:19 2002
+***************
+*** 4525,4529 ****
+  set_line_mbstate ()
+  {
+!   int i, previ, len;
+    mbstate_t mbs, prevs;
+    size_t mbclen;
+--- 4534,4538 ----
+  set_line_mbstate ()
+  {
+!   int i, previ, len, c;
+    mbstate_t mbs, prevs;
+    size_t mbclen;
+***************
+*** 4540,4544 ****
+        mbs = prevs;
+  
+!       if (shell_input_line[i] == EOF)
+  	{
+  	  int j;
+--- 4549,4554 ----
+        mbs = prevs;
+  
+!       c = shell_input_line[i];
+!       if (c == EOF)
+  	{
+  	  int j;
+***************
+*** 4564,4568 ****
+        else
+  	{
+! 	  /* mbrlen doesn't return any other values */
+  	}
+  
+--- 4574,4582 ----
+        else
+  	{
+! 	  /* XXX - what to do if mbrlen returns 0? (null wide character) */
+! 	  int j;
+! 	  for (j = i; j < len; j++)
+! 	    shell_input_line_property[j] = 1;
+! 	  break;
+  	}
+  
+
+-- 
+``The lyf so short, the craft so long to lerne.'' - Chaucer
+( ``Discere est Dolere'' -- chet )
+
+Chet Ramey, ITS, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/
--- bash-2.05b-2.orig/debian/patches/rl-8bit-init.dpatch
+++ bash-2.05b-2/debian/patches/rl-8bit-init.dpatch
@@ -0,0 +1,57 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+On Tue, 29 Oct 2002 19:11:32 +0900
+Fumitoshi UKAI <ukai@debian.or.jp> wrote:
+
+--- bash-2.05b.orig/lib/readline/nls.c	2001-10-16 03:32:29.000000000 +0900
++++ bash-2.05b/lib/readline/nls.c	2002-10-29 19:07:36.000000000 +0900
+@@ -87,7 +87,8 @@
+   char *t;
+ 
+   /* Set the LC_CTYPE locale category from environment variables. */
+-  t = setlocale (LC_CTYPE, "");
++  // t = setlocale (LC_CTYPE, "");
++  t = setlocale (LC_CTYPE, NULL);
+   if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
+     {
+       _rl_meta_flag = 1;
+
+I explain about this patch.
+
+0) bash invokes with system locale setting configured in /etc/environment
+   or C locale(from login, sshd or others).
+1) eval ~/.bashrc and others. 
+   if there are locale setting, such as LANG=ll_CC, it will call
+   setlocale(LC_ALL, value); in bash/locale.c:set_lang()
+2) after startup script done, bash initializes terminal.
+   while terminal initialization, it checks current locale 
+   in lib/readline/nls.c:_rl_init_eightbit().
+   However, it will call setlocale(LC_CTYPE, ""), so it will
+   *modify* locale category LC_CTYPE according to process environment.
+   Here, bash runs in LANG=C or something configured at starting up - 0).
+   Locale configuration in 1) doesn't change bash's environment, it only
+   call setlocale(LC_ALL, value) and set environment variables for bash's 
+   child process.
+   So, readline consider that bash runs in C locale (configued in 0)), 
+   so that it disable 8bit or multibyte features.
+
+It can be solved with this patch. In lib/readline/nls.c:_rl_init_eightbit(),
+it doesn't need to *modify* LC_CTYPE.  What is required here is to *query*
+locale category LC_CTYPE. So, it should use NULL for locale args for 
+setlocale() here.
+
--- bash-2.05b-2.orig/debian/patches/rbash-manpage.dpatch
+++ bash-2.05b-2/debian/patches/rbash-manpage.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: doc/rbash.1: fix bash(1) reference
+
+--- doc/rbash.1~	1999-11-29 22:30:03.000000000 +0100
++++ doc/rbash.1	2003-02-21 16:15:59.000000000 +0100
+@@ -3,6 +3,6 @@
+ rbash \- restricted bash, see \fBbash\fR(1)
+ .SH RESTRICTED SHELL
+ .nr zY 1
+-.so bash.1
++.so man1/bash.1
+ .SH SEE ALSO
+ bash(1)
--- bash-2.05b-2.orig/debian/patches/builtins-shift.dpatch
+++ bash-2.05b-2/debian/patches/builtins-shift.dpatch
@@ -0,0 +1,41 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+From: Ken Shan <ken@digitas.harvard.edu>
+Cc: 159996@bugs.debian.org
+Subject: Bug#159996: bash: shift with no argument causes segfault
+Date: Tue, 22 Oct 2002 01:09:31 -0400
+
+# DP: Subject: Bug#159996: bash: shift with no argument causes segfault
+# DP: The bug is only triggered by "shopt -s shift_verbose".  It is a null
+# DP: pointer dereference caused by an erroneous assumption that, when the
+# DP: number of arguments to shift exceeds the number of arguments available
+# DP: for shifting, the latter is always explicitly specified on the command
+# DP: line rather than left implicit at the default 1.  Here is a patch:
+
+--- builtins/shift.def.orig	2002-10-22 01:05:10.000000000 -0400
++++ builtins/shift.def	2002-10-22 01:05:06.000000000 -0400
+@@ -68,7 +68,7 @@
+   else if (times > number_of_args ())
+     {
+       if (print_shift_error)
+-	sh_erange (list->word->word, "shift count");
++	sh_erange (list ? list->word->word : NULL, "shift count");
+       return (EXECUTION_FAILURE);
+     }
+ 
+
--- bash-2.05b-2.orig/debian/patches/execute-cmd.dpatch
+++ bash-2.05b-2/debian/patches/execute-cmd.dpatch
@@ -0,0 +1,121 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: execute_cmd.c: conditionalize on enabled bash features
+
+--- src/execute_cmd.c~	2002-03-18 19:24:22.000000000 +0100
++++ src/execute_cmd.c	2003-05-25 22:08:02.000000000 +0200
+@@ -286,12 +286,18 @@
+     {
+       if (currently_executing_command->type == cm_simple)
+ 	return currently_executing_command->value.Simple->line;
++#if defined (COND_COMMAND)
+       else if (currently_executing_command->type == cm_cond)
+ 	return currently_executing_command->value.Cond->line;
++#endif
++#if defined (DPAREN_ARITHMETIC)
+       else if (currently_executing_command->type == cm_arith)
+ 	return currently_executing_command->value.Arith->line;
++#endif
++#if defined (ARITH_FOR_COMMAND)
+       else if (currently_executing_command->type == cm_arith_for)
+ 	return currently_executing_command->value.ArithFor->line;
++#endif
+       else
+ 	return line_number;
+     }
+@@ -801,7 +807,7 @@
+       exec_result = execute_cond_command (command->value.Cond);
+       break;
+ #endif
+-    
++
+     case cm_function_def:
+       exec_result = execute_intern_function (command->value.Function_def->name,
+ 					     command->value.Function_def->command);
+@@ -916,7 +922,7 @@
+    characters after the decimal point, the optional `l' means to format
+    using minutes and seconds (MMmNN[.FF]s), like the `times' builtin',
+    and the last character is one of
+-   
++
+ 		R	number of seconds of `real' time
+ 		U	number of seconds of `user' time
+ 		S	number of seconds of `system' time
+@@ -2351,7 +2357,7 @@
+ #if 0
+   debug_print_cond_command (cond_command);
+ #endif
+-  last_command_exit_value = result = execute_cond_node (cond_command);  
++  last_command_exit_value = result = execute_cond_node (cond_command);
+   return (result);
+ }
+ #endif /* COND_COMMAND */
+@@ -2808,7 +2814,7 @@
+ 	  push_scope (VC_BLTNENV, temporary_env);
+ 	  if (subshell == 0)
+ 	    add_unwind_protect (pop_scope, "1");
+-          temporary_env = (HASH_TABLE *)NULL;	  
++          temporary_env = (HASH_TABLE *)NULL;
+ 	}
+     }
+ 
+@@ -2881,7 +2887,7 @@
+ 
+   debug_trap = TRAP_STRING(DEBUG_TRAP);
+   error_trap = TRAP_STRING(ERROR_TRAP);
+-  
++
+   /* The order of the unwind protects for debug_trap and error_trap is
+      important here!  unwind-protect commands are run in reverse order
+      of registration.  If this causes problems, take out the xfree
+@@ -2960,7 +2966,7 @@
+   bitmap = new_fd_bitmap (FD_BITMAP_DEFAULT_SIZE);
+   begin_unwind_frame ("execute-shell-function");
+   add_unwind_protect (dispose_fd_bitmap, (char *)bitmap);
+-      
++
+   ret = execute_function (var, words, 0, bitmap, 0, 0);
+ 
+   dispose_fd_bitmap (bitmap);
+@@ -3115,7 +3121,7 @@
+       if (saved_undo_list)
+ 	dispose_redirects (saved_undo_list);
+       redirection_undo_list = exec_redirection_undo_list;
+-      saved_undo_list = exec_redirection_undo_list = (REDIRECT *)NULL;      
++      saved_undo_list = exec_redirection_undo_list = (REDIRECT *)NULL;
+       discard_unwind_frame ("saved_redirects");
+     }
+ 
+@@ -3363,7 +3369,7 @@
+   /* If there is more text on the line, then it is an argument for the
+      interpreter. */
+ 
+-  if (STRINGCHAR(i))  
++  if (STRINGCHAR(i))
+     {
+       for (start = i; STRINGCHAR(i); i++)
+ 	;
+@@ -3458,7 +3464,7 @@
+ 	len = -1; \
+     } \
+   while (0)
+-      
++
+ /* Call execve (), handling interpreting shell scripts, and handling
+    exec failures. */
+ int
--- bash-2.05b-2.orig/debian/patches/bash205b-005.dpatch
+++ bash-2.05b-2/debian/patches/bash205b-005.dpatch
@@ -0,0 +1,105 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: bash-2.05b upstream patch 005
+
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release: 2.05b
+Patch-ID: bash205b-005
+
+Bug-Reported-by:	Jim Meyering <jim@meyering.net>
+Bug-Reference-ID:	<87bs6v8iib.fsf@pixie.eng.ascend.com>
+Bug-Reference-URL:	http://mail.gnu.org/archive/html/bug-bash/2002-09/msg00047.html
+
+Bug-Description:
+
+When in a locale with multibyte characters, the readline display updater
+will occasionally cause a segmentation fault when attempting to compute
+the length of the first multibyte character on the line.
+
+Patch:
+
+*** ../bash-2.05b/lib/readline/mbutil.c	Tue Jun  4 11:54:29 2002
+--- lib/readline/mbutil.c	Mon Aug  5 11:20:39 2002
+***************
+*** 206,210 ****
+      {
+        /* shorted to compose multibyte char */
+!       memset (ps, 0, sizeof(mbstate_t));
+        return -2;
+      }
+--- 206,211 ----
+      {
+        /* shorted to compose multibyte char */
+!       if (ps)
+! 	memset (ps, 0, sizeof(mbstate_t));
+        return -2;
+      }
+***************
+*** 213,217 ****
+        /* invalid to compose multibyte char */
+        /* initialize the conversion state */
+!       memset (ps, 0, sizeof(mbstate_t));
+        return -1;
+      }
+--- 214,219 ----
+        /* invalid to compose multibyte char */
+        /* initialize the conversion state */
+!       if (ps)
+! 	memset (ps, 0, sizeof(mbstate_t));
+        return -1;
+      }
+***************
+*** 226,232 ****
+  int
+  _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
+!      char *buf1, *buf2;
+!      mbstate_t *ps1, *ps2;
+!      int pos1, pos2;
+  {
+    int i, w1, w2;
+--- 228,237 ----
+  int
+  _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
+!      char *buf1;
+!      int pos1;
+!      mbstate_t *ps1;
+!      char *buf2;
+!      int pos2;
+!      mbstate_t *ps2;
+  {
+    int i, w1, w2;
+***************
+*** 277,282 ****
+  	  /* clear the state of the byte sequence, because
+  	     in this case effect of mbstate is undefined  */
+! 	  memset (ps, 0, sizeof (mbstate_t));
+  	}
+        else
+  	pos += tmp;
+--- 282,290 ----
+  	  /* clear the state of the byte sequence, because
+  	     in this case effect of mbstate is undefined  */
+! 	  if (ps)
+! 	    memset (ps, 0, sizeof (mbstate_t));
+  	}
++       else if (tmp == 0)
++ 	pos++;
+        else
+  	pos += tmp;
--- bash-2.05b-2.orig/debian/patches/bash205b-006.dpatch
+++ bash-2.05b-2/debian/patches/bash205b-006.dpatch
@@ -0,0 +1,127 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: bash-2.05b upstream patch 005
+
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release: 2.05b
+Patch-ID: bash205b-006
+
+Bug-Reported-by:	clowenst@ucsd.edu
+Bug-Reference-ID:	<156388ec.0212021151.51a48df1@posting.google.com>
+Bug-Reference-URL:	
+
+Bug-Description:
+
+When running in a locale with multibyte characters, the readline display
+updater will use carriage returns when drawing the line, overwriting any
+partial output already on the screen and not terminated by a newline.
+
+Patch:
+
+*** ../bash-2.05b/lib/readline/display.c	Tue Jun  4 10:54:47 2002
+--- lib/readline/display.c	Fri Sep 13 16:22:57 2002
+***************
+*** 71,75 ****
+  
+  #if defined (HANDLE_MULTIBYTE)
+! static int _rl_col_width PARAMS((char *, int, int));
+  static int *_rl_wrapped_line;
+  #else
+--- 71,75 ----
+  
+  #if defined (HANDLE_MULTIBYTE)
+! static int _rl_col_width PARAMS((const char *, int, int));
+  static int *_rl_wrapped_line;
+  #else
+***************
+*** 1349,1355 ****
+  	      _rl_output_some_chars (nfd + lendiff, temp - lendiff);
+  #if 0
+- 	      _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff;
+- #else
+  	      _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
+  #endif
+  	    }
+--- 1349,1355 ----
+  	      _rl_output_some_chars (nfd + lendiff, temp - lendiff);
+  #if 0
+  	      _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
++ #else
++ 	      _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
+  #endif
+  	    }
+***************
+*** 1511,1516 ****
+    /* If we have multibyte characters, NEW is indexed by the buffer point in
+       a multibyte string, but _rl_last_c_pos is the display position.  In
+!      this case, NEW's display position is not obvious. */
+!   if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return;
+  #else
+    if (_rl_last_c_pos == new) return;
+--- 1511,1523 ----
+    /* If we have multibyte characters, NEW is indexed by the buffer point in
+       a multibyte string, but _rl_last_c_pos is the display position.  In
+!      this case, NEW's display position is not obvious and must be
+!      calculated. */
+!   if (MB_CUR_MAX == 1 || rl_byte_oriented)
+!     {
+!       if (_rl_last_c_pos == new)
+! 	return;
+!     }
+!   else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
+!     return;
+  #else
+    if (_rl_last_c_pos == new) return;
+***************
+*** 1595,1603 ****
+      {
+        if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+! 	{
+! 	  tputs (_rl_term_cr, 1, _rl_output_character_function);
+! 	  for (i = 0; i < new; i++)
+! 	    putc (data[i], rl_outstream);
+! 	}
+        else
+  	_rl_backspace (_rl_last_c_pos - new);
+--- 1602,1606 ----
+      {
+        if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+! 	_rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
+        else
+  	_rl_backspace (_rl_last_c_pos - new);
+***************
+*** 2118,2122 ****
+  static int
+  _rl_col_width (str, start, end)
+!      char *str;
+       int start, end;
+  {
+--- 2121,2125 ----
+  static int
+  _rl_col_width (str, start, end)
+!      const char *str;
+       int start, end;
+  {
+***************
+*** 2194,2196 ****
+  }
+  #endif /* HANDLE_MULTIBYTE */
+- 	  
+--- 2197,2198 ----
--- bash-2.05b-2.orig/debian/patches/bash205b-007.dpatch
+++ bash-2.05b-2/debian/patches/bash205b-007.dpatch
@@ -0,0 +1,68 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: bash-2.05b upstream patch 005
+
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release: 2.05b
+Patch-ID:  bash205b-007
+
+Bug-Reported-by:	dman@dman.ddts.net
+Bug-Reference-ID:	<15893.26358.129589.503364@gargle.gargle.HOWL>
+Bug-Reference-URL:	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=175127
+
+Bug-Description:
+
+Using the vi editing mode's case-changing commands in a locale with
+multibyte characters will cause garbage characters to be inserted into
+the editing buffer.
+
+Patch:
+
+*** ../bash-2.05b/lib/readline/vi_mode.c	Thu May 23 13:27:58 2002
+--- lib/readline/vi_mode.c	Tue Feb  4 15:11:07 2003
+***************
+*** 681,685 ****
+  {
+    wchar_t wc;
+!   char mb[MB_LEN_MAX];
+    mbstate_t ps;
+  
+--- 681,686 ----
+  {
+    wchar_t wc;
+!   char mb[MB_LEN_MAX+1];
+!   int mblen;
+    mbstate_t ps;
+  
+***************
+*** 704,708 ****
+        if (wc)
+  	{
+! 	  wctomb (mb, wc);
+  	  rl_begin_undo_group ();
+  	  rl_delete (1, 0);
+--- 705,711 ----
+        if (wc)
+  	{
+! 	  mblen = wctomb (mb, wc);
+! 	  if (mblen >= 0)
+! 	    mb[mblen] = '\0';
+  	  rl_begin_undo_group ();
+  	  rl_delete (1, 0);
--- bash-2.05b-2.orig/debian/patches/random.dpatch
+++ bash-2.05b-2/debian/patches/random.dpatch
@@ -0,0 +1,111 @@
+#! /bin/sh -e
+
+dir=.
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+    dir=$3
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch)
+	patch $pdir -f --no-backup-if-mismatch -p1 < $0
+	echo '2.05' > $dir/_distribution
+	echo '0' > $dir/_patchlevel
+	cd $dir && autoconf
+	rm -f $dir/_distribution $dir/_patchlevel
+	;;
+    -unpatch)
+	patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+	rm -f $dir/configure $dir/_distribution $dir/_patchlevel
+	;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# DP: use the system random functions
+
+--- bash-2.05-old/configure.in	Mon Nov  6 14:21:35 2000
++++ bash-2.05/configure.in	Sun Nov 26 20:42:06 2000
+@@ -479,6 +479,9 @@
+ 		siginterrupt memmove ttyname gethostbyname getservbyname \
+ 		inet_aton strpbrk setvbuf pathconf)
+ 
++dnl checks for random functions
++AC_CHECK_FUNCS(random srandom)
++
+ dnl checks for locale functions
+ AC_CHECK_HEADERS(libintl.h)
+ AC_CHECK_FUNCS(gettext textdomain bindtextdomain)
+--- bash-2.05-old/config.h.in	Mon Oct  2 15:44:22 2000
++++ bash-2.05/config.h.in	Sun Nov 26 21:51:18 2000
+@@ -462,6 +462,9 @@
+ /* Define if you have the putenv function.  */
+ #undef HAVE_PUTENV
+ 
++/* Define if you have the random function.  */
++#undef HAVE_RANDOM
++
+ /* Define if you have the readlink function. */
+ #undef HAVE_READLINK
+ 
+@@ -524,6 +527,9 @@
+ 
+ /* Define if you have the strsignal function or macro. */
+ #undef HAVE_STRSIGNAL
++
++/* Define if you have the srandom function.  */
++#undef HAVE_SRANDOM
+ 
+ /* Define if you have the sysconf function. */
+ #undef HAVE_SYSCONF
+--- bash-2.05b/variables.c~	2002-06-25 15:43:33.000000000 +0200
++++ bash-2.05b/variables.c	2004-04-14 08:26:10.000000000 +0200
+@@ -1038,17 +1038,26 @@
+ /* The random number seed.  You can change this by setting RANDOM. */
+ static unsigned long rseed = 1;
+ static int last_random_value;
++#if defined(HAVE_RANDOM)
++static char random_state[32];
++#endif
+ 
+-/* A linear congruential random number generator based on the example
+-   one in the ANSI C standard.  This one isn't very good, but a more
+-   complicated one is overkill. */
++/* Use the random number genrator provided by the standard C library,
++   else use a linear congruential random number generator based on the
++   ANSI C standard.  This one isn't very good (the values are alternately
++   odd and even, for example), but a more complicated one is overkill. */
+ 
+ /* Returns a pseudo-random number between 0 and 32767. */
+ static int
+ brand ()
+ {
++#if defined(HAVE_RANDOM)
++  rseed = (unsigned int) ((32767.0 * random()) / (RAND_MAX + 1.0));
++  return rseed;
++#else
+   rseed = rseed * 1103515245 + 12345;
+   return ((unsigned int)((rseed >> 16) & 32767));	/* was % 32768 */
++#endif
+ }
+ 
+ /* Set the random number generator seed to SEED. */
+@@ -1056,8 +1065,14 @@
+ sbrand (seed)
+      unsigned long seed;
+ {
++#if defined(HAVE_SRANDOM)
++  initstate((unsigned int) seed, random_state, sizeof(random_state));
++  setstate(random_state);
++  srandom((unsigned int) seed);
++#else
+   rseed = seed;
+   last_random_value = 0;
++#endif
+ }
+ 
+ static SHELL_VAR *
--- bash-2.05b-2.orig/debian/patches/bashdb.dpatch
+++ bash-2.05b-2/debian/patches/bashdb.dpatch
@@ -0,0 +1,44033 @@
+#! /bin/sh -e
+
+dir=.
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+    dir=$3
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch)
+	patch $pdir -f --no-backup-if-mismatch -p1 < $0
+	rm -f $dir/aclocal.m4
+	rm -f $dir/configure
+	rm -f $dir/doc/bashref.info
+	rm -f $dir/examples/bashdb/bashdb.el
+	rm -f $dir/lib/readline/doc/Makefile
+	rm -f $dir/parser-built
+	rm -f $dir/pathnames.h
+	rm -f $dir/y.tab.[ch]
+	(cd $dir && aclocal -I . -I debugger)
+	(cd $dir && autoconf)
+	for i in config.guess config.sub elisp-comp install-sh \
+		 missing mkinstalldirs
+	do
+	    cp -p /usr/share/automake-1.7/$i $dir/debugger/
+	done
+	for i in mdate-sh texinfo.tex; do
+	    cp -p /usr/share/automake-1.7/$i $dir/debugger/doc/
+	done
+	(cd $dir/debugger && aclocal -I ..)
+	cp -p $dir/debugger/elisp-comp $dir/debugger/emacs/.
+	(cd $dir/debugger && automake)
+	(cd $dir/debugger && autoconf)
+	;;
+    -unpatch)
+	patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+	;;
+    *)
+	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+	exit 1
+esac
+exit 0
+
+# how to construct this file:
+# - unpack the upstream bash source
+# - unpack the bashdb source
+# - apply bash the seven bash upstream patches
+# - diff -ur --unidirectional-new-file \
+         --exclude CVS --exclude=.cvsignore --exclude=/db/ \
+#        bash-2.05b bashdb
+
+# DP: bashdb changes
+
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/ChangeLog cvs/ChangeLog
+--- bash-2.05b/ChangeLog	1970-01-01 01:00:00.000000000 +0100
++++ cvs/ChangeLog	2003-06-01 03:18:28.000000000 +0200
+@@ -0,0 +1,4559 @@
++2003-05-27 07:32  rockyb
++
++	* lib/readline/histfile.c: Bug: uninitalized initial bp1
++
++2003-05-27 07:22  rockyb
++
++	* lib/readline/histfile.c: This time, for sure.
++
++2003-05-27 07:19  rockyb
++
++	* lib/readline/histfile.c: Wasn't updating bp1. There's still a bug
++	in truncating the history though.
++
++2003-05-24 16:45  rockyb
++
++	* tests/: history.right, run-histexpand, run-history: Update
++	history regression tests for new code.
++
++2003-05-24 16:29  rockyb
++
++	* configure.in: Get ready for yet another release...
++
++2003-05-24 16:22  rockyb
++
++	* builtins/history.def: Small typo.
++
++2003-05-24 16:13  rockyb
++
++	* ChangeLog, bashhist.c, builtins/history.def, doc/bashref.texi:
++	Add timestamp to history file. Environment variable HISTTIMEFORMAT
++	controls how to display.
++
++2003-05-24 16:11  rockyb
++
++	* lib/readline/examples/.cvsignore: Useful file.
++
++2003-05-24 16:10  rockyb
++
++	* lib/readline/: histfile.c, history.c, history.h,
++	examples/Makefile, examples/histexamp.c: Add timestamps to history
++	files.	Makefile: add targets for histexamp
++
++2003-05-21 03:45  rockyb
++
++	* doc/bashdb.texi: Clarification of "stepi" for scripting
++	languages.
++
++2003-05-21 03:43  rockyb
++
++	* configure.in: [no log message]
++
++2003-05-20 14:02  rockyb
++
++	* debugger/dbg-init.inc: More OS-independent (output independent)
++	test if a terminal is attached.
++
++2003-05-07 19:12  rockyb
++
++	* execute_cmd.c: Cater to older C compilers.
++
++2003-04-29 20:33  rockyb
++
++	* debugger/NEWS: [no log message]
++
++2003-04-29 20:22  rockyb
++
++	* debugger/: bashdb, dbg-cmds.inc, dbg-fns.inc, dbg-init.inc: Bug:
++	Was using source filename rather than canonicalized (expanded)
++	filename.
++
++2003-04-29 20:21  rockyb
++
++	* debugger/tests/: debug.right, list.right, sig.right: Basename
++	made to work like basename.
++
++2003-04-07 23:29  rockyb
++
++	* MANIFEST, configure.in, debugger/ddd/ddd-3.3.1-bashdb.diff: We
++	now have this all in CVS as well as a file release.
++
++2003-04-07 23:28  rockyb
++
++	* doc/: bashdb.texi, version.texi.in: [no log message]
++
++2003-04-07 23:27  rockyb
++
++	* debugger/tests/sig.right: Line number always changing on me.
++
++2003-04-07 23:26  rockyb
++
++	* debugger/tests/: misc.cmd, misc.right: Give invalid command to
++	get "Invalid command" back.
++
++2003-04-07 23:24  rockyb
++
++	* debugger/dbg-cmds.inc: Use gdb undefined command message.
++
++2003-04-02 02:45  rockyb
++
++	* doc/: bashdb.texi, bashdb.texi: [no log message]
++
++2003-04-02 02:34  rockyb
++
++	* doc/bashdb.texi: Lots of little typos. Apparently @xxx{} doesn't
++	work as expected.
++
++2003-04-01 10:12  rockyb
++
++	* doc/bashdb.texi: Add section on using bashdb from DDD.
++	
++	Breakpoints now start at 1.
++	
++	Update to reflect changed breakpoint output.
++	
++	Document "set annotate"
++	
++	Minor corrections.
++
++2003-03-31 10:09  rockyb
++
++	* debugger/: NEWS, dbg-brk.inc, tests/action.right,
++	tests/brkpt1.right, tests/brkpt2.right, tests/display.right,
++	tests/tbreak.right, tests/watch1.right: Numbers in
++	breakpoint/watchpoint/action numbers are printed in a "%-3d" rather
++	than (I think the nicer) %3d" to match gdb's output. This helps ddd
++	parse breakpoints.
++
++2003-03-30 22:04  rockyb
++
++	* debugger/: NEWS, dbg-brk.inc, tests/action.right,
++	tests/brkpt1.cmd, tests/brkpt1.right, tests/brkpt2.cmd,
++	tests/brkpt2.right, tests/brkpt3.cmd, tests/brkpt3.right,
++	tests/bugIFS.right, tests/debug.right, tests/display.right,
++	tests/finish.right, tests/parm.right, tests/tbreak.right,
++	tests/watch2.right: Breakpoints are now are origin 1 to match gdb.
++	It also helps ddd.
++
++2003-03-27 00:34  rockyb
++
++	* debugger/dbg-pre.inc.in: Ooops - changed dbg-pre.inc but should
++	have changed this one instead.
++
++2003-03-26 09:09  rockyb
++
++	* debugger/tests/: list.cmd, list.right: Add test of filename
++	canonicalization
++
++2003-03-26 09:05  rockyb
++
++	* debugger/: dbg-file.inc, dbg-io.inc: Add routine to resolve based
++	on dir and then expand a filename.  Hopefully will be more
++	permissive in specified and work more like gdb.
++
++2003-03-26 09:01  rockyb
++
++	* debugger/dbg-brk.inc: Expand filename only the breakpoint exists.
++
++2003-03-25 23:30  rockyb
++
++	* debugger/dbg-list.inc: When set annotate=1 expand full filenames
++	when listing source lines.
++
++2003-03-25 23:29  rockyb
++
++	* debugger/dbg-file.inc: Bug in testing absolute file name.
++
++2003-03-25 18:46  rockyb
++
++	* debugger/: dbg-brk.inc, dbg-file.inc, dbg-list.inc,
++	tests/brkpt3.cmd, tests/brkpt3.right, tests/list.right:
++	Canonicalize filenames in list and breakpoint commands and update
++	regression tests to make sure we don't slip back.
++
++2003-03-21 19:16  rockyb
++
++	* debugger/: dbg-file.inc, dbg-set.inc: Small stuff.
++
++2003-03-21 18:54  rockyb
++
++	* debugger/: bashdb, dbg-brk.inc, dbg-file.inc, dbg-fns.inc,
++	dbg-help.inc, dbg-init.inc, dbg-set.inc, tests/brkpt2.right,
++	tests/debug.right, tests/finish.right, tests/parm.right,
++	tests/sig.right, tests/tbreak.right: Add "show dir" and directory
++	search in filename lookup (such as for breakpoints or line
++	listing).
++
++2003-03-21 12:59  rockyb
++
++	* debugger/: dbg-sig.inc, tests/sig.right: Signal received message
++	is now gdb's. This simplifies ddd handling.
++
++2003-03-21 12:56  rockyb
++
++	* debugger/TODO: Current sitiation.
++
++2003-03-02 13:52  rockyb
++
++	* debugger/ddd/ddd-3.3.1-bashdb.diff: Spelled g++ option
++	incorrectly!
++
++2003-02-27 05:14  rockyb
++
++	* debugger/: dbg-brk.inc, dbg-file.inc, dbg-fns.inc, dbg-help.inc,
++	dbg-io.inc: _filenames -> _Dbg_filenames. Array now has expanded
++	name Add routine to print filename in form appropriate to
++	annotation and basename only
++
++2003-02-27 02:33  rockyb
++
++	* debugger/NEWS, doc/bashdb.texi, tests/dbg-fns,
++	tests/dbg-is-fn.right, tests/dbg-is-fn.tests: _bashdb_ -> _Dbg_
++
++2003-02-27 02:27  rockyb
++
++	* debugger/: bashdb, dbg-brk.inc, dbg-cmds.inc, dbg-file.inc,
++	dbg-fns.inc, dbg-help.inc, dbg-hist.inc, dbg-init.inc, dbg-io.inc,
++	dbg-list.inc, dbg-main.inc, dbg-pre.inc.in, dbg-set-d-vars.inc,
++	dbg-set.inc, dbg-sig-ret.inc, dbg-sig.inc, dbg-stack.inc,
++	tests/bugIFS.cmd, tests/misc.cmd, tests/misc.right,
++	tests/sig.right: All _bashdb_ variables renamed _Dbg_. Might help
++	for debuggers in other POSIX shells.
++
++2003-02-26 23:34  rockyb
++
++	* debugger/: NEWS, dbg-help.inc, dbg-init.inc, dbg-set.inc,
++	tests/misc.cmd, tests/misc.right: Add "set annotate." More better
++	set/show regression tests.
++
++2003-02-25 11:22  rockyb
++
++	* debugger/: dbg-brk.inc, tests/brkpt2.right, tests/watch1.right: A
++	little closer to gdb. Mesage reads   breakpoint already hit 1 time
++	or   breakpoint already hit n times
++
++2003-02-25 10:55  rockyb
++
++	* debugger/: dbg-brk.inc, tests/action.right, tests/brkpt1.right,
++	tests/brkpt2.right, tests/brkpt3.right, tests/bugIFS.right,
++	tests/debug.right, tests/display.right, tests/finish.right,
++	tests/parm.right, tests/tbreak.right, tests/watch1.right,
++	tests/watch2.right: Make breakpoints look more like gdb. It helps
++	ddd parsing.
++
++2003-02-24 22:21  rockyb
++
++	* doc/bashdb.texi: Clarify use of -L option.
++
++2003-02-23 15:40  rockyb
++
++	* debugger/dbg-file.inc: Add tilde to list of translation
++	characters.
++
++2003-02-19 18:45  rockyb
++
++	* debugger/dbg-brk.inc, debugger/dbg-cmds.inc, debugger/dbg-io.inc,
++	debugger/dbg-sig.inc, doc/bashdb.texi: Some declare -a's turned
++	into typeset -a on the hope (from David Korn) that this will be
++	legal ksh.
++
++2003-02-17 19:23  rockyb
++
++	* debugger/.cvsignore: bashdb- -> dbg-
++
++2003-02-17 19:23  rockyb
++
++	* MANIFEST, configure.in, debugger/Makefile.am,
++	debugger/bashdb-sig-ret.inc, debugger/dbg-sig-ret.inc:
++	Miscellaneous small changes for new version and bashdb- -> dbg-
++	changes.
++
++2003-02-17 19:09  rockyb
++
++	* tests/dbg-is-fn.tests: bashdb- -> dbg- change
++
++2003-02-17 19:02  rockyb
++
++	* debugger/: Makefile.am, TODO, bashdb, bashdb-brk.inc,
++	bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc, bashdb-help.inc,
++	bashdb-hist.inc, bashdb-init.inc, bashdb-io.inc, bashdb-list.inc,
++	bashdb-main.inc, bashdb-set-d-vars.inc, bashdb-set.inc,
++	bashdb-sig.inc, bashdb-stack.inc, dbg-brk.inc, dbg-cmds.inc,
++	dbg-file.inc, dbg-fns.inc, dbg-help.inc, dbg-hist.inc,
++	dbg-init.inc, dbg-io.inc, dbg-list.inc, dbg-main.inc, dbg-pre.inc,
++	dbg-set-d-vars.inc, dbg-set.inc, dbg-sig.inc, dbg-stack.inc,
++	tests/sig.right, bashdb-pre.inc.in, dbg-pre.inc, dbg-pre.inc.in:
++	bashdb -> dbg to facilitate porting to other POSIX shells.
++
++2003-02-17 17:01  rockyb
++
++	* MANIFEST, execute_cmd.c, subst.c, trap.c, trap.h,
++	debugger/bashdb-fns.inc, support/mksignames.c,
++	tests/dbg-support.right, tests/dbg-support.tests,
++	tests/errors.right: Remove SUBEXIT trap.
++
++2003-02-17 17:00  rockyb
++
++	* doc/bashdb.texi: Decscribe "print" command a little better. Also,
++	it's 2003.
++
++2003-02-17 16:18  rockyb
++
++	* builtins/source.def: Small doc fix to mention optional ARGUMENTS.
++	Thanks to Chet Ramey for pointing this out.
++
++2003-02-17 13:15  rockyb
++
++	* debugger/: bashdb-brk.inc, tests/brkpt3.cmd, tests/brkpt3.right,
++	tests/tbreak.cmd, tests/tbreak.right: I think I've gotten over the
++	hurdle of passing information back.  Removing breakpoints in a
++	subshell and having that persist now works.
++
++2003-02-17 07:34  rockyb
++
++	* debugger/bashdb-brk.inc: Perhaps some cleanup.
++
++2003-02-17 06:51  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc,
++	bashdb-sig.inc, tests/brkpt3.cmd, tests/brkpt3.right,
++	tests/sig.right, tests/subshell3.right: State saving bugs: save
++	state of more breakpoint/action variables, step/next variables.
++
++2003-02-16 20:08  rockyb
++
++	* debugger/: NEWS, bashdb-brk.inc, bashdb-file.inc, bashdb-sig.inc:
++	Probably just beating around problems. Perhaps closer. Perhaps not.
++
++2003-02-16 20:05  rockyb
++
++	* debugger/tests/: Makefile.am, brkpt3.cmd, brkpt3.right,
++	brkpt3.tests, run-brkpt, run-brkpt2, run-subshell, sig.right,
++	subshell1.cmd, subshell1.right, subshell2.cmd, subshell2.right,
++	subshell3.cmd, subshell3.right, subshell4.cmd, subshell4.right,
++	subshell4.tests: run-brkpt and run-subshell does all 1.. tests. 
++	Add another subshell and brkpt test.
++
++2003-02-16 12:18  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc,
++	bashdb-fns.inc, bashdb-sig.inc: More state recorded in subshell
++	journal:   Enable/disable   fntrace options
++	
++	having breakpoints persist inside a subshell now works.  (Removing
++	has problems though, as does saving/restoring the step counter)
++
++2003-02-16 12:14  rockyb
++
++	* MANIFEST, debugger/tests/subshell2.right: multi->subshell
++
++2003-02-16 12:13  rockyb
++
++	* debugger/tests/: Makefile.am, multi.sh, multi1.cmd, multi1.right,
++	multi1.tests, multi2.cmd, multi2.right, multi2.tests, multi3.cmd,
++	multi3.right, multi3.tests, run-subshell, sig.right, subshell.sh,
++	subshell1.cmd, subshell1.right, subshell1.tests, subshell2.cmd,
++	subshell2.tests, subshell3.cmd, subshell3.right, subshell3.tests,
++	subshell4.cmd, subshell4.right: multi -> subshell
++
++2003-02-16 08:34  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-file.inc, bashdb-fns.inc,
++	bashdb-sig.inc, tests/multi4.right: Back to the future. Back to a
++	single journal file. Can't get SUBEXIT working and this seems to be
++	more reliable (albeit more work/slower).
++
++2003-02-14 19:04  rockyb
++
++	* MANIFEST, debugger/tests/sig.right: Small changes.
++
++2003-02-14 18:49  rockyb
++
++	* debugger/tests/: multi4.cmd, multi4.right, multi4.tests: Add
++	another multi test for quit 0 n.
++
++2003-02-14 18:47  rockyb
++
++	* debugger/: NEWS, TODO, bashdb-sig.inc, tests/multi3.cmd,
++	tests/run-multi: Bug in quit 0 n.
++
++2003-02-14 18:38  rockyb
++
++	* debugger/CHANGES: Note BASH_SUBSHELL. Some typographical mistakes
++	corrected.
++
++2003-02-14 18:33  rockyb
++
++	* execute_cmd.c, subst.c, trap.c, trap.h, builtins/caller.def,
++	doc/bashref.texi, support/mksignames.c, tests/dbg-support.right,
++	tests/dbg-support.tests: Bug: caller() now works like it is
++	supposed to. It had mismatched fn/lineno/source levels. It also now
++	returns null if no caller.
++	
++	Add SUBEXIT trap to perform action when a subshell is exited.
++
++2003-02-14 18:31  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2003-02-14 18:25  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc,
++	bashdb-set-d-vars.inc, bashdb-sig.inc: Better journal mechanism:
++	Now have journal per subshell. (Journal is used to pass information
++	between subshell and parent)
++	
++	There were escaping bugs in putting history entries into the
++	journal and retrieving them.
++	
++	Debugger "Print" now works like quote does. We were having
++	substituion problems before, e.g. "This can't happen" (the single
++	quote in the string).
++	
++	bashdb-fns.inc: New fn _bashdb_esq_dq. Save last_xxx state even if
++	we don't enter the debugger.
++
++2003-02-14 18:16  rockyb
++
++	* debugger/tests/: action.cmd, brkpt1.cmd, brkpt1.right,
++	brkpt2.cmd, brkpt2.right, display.cmd, finish.cmd, finish.right,
++	list.cmd, misc.cmd, misc.right, multi3.cmd, multi3.right, parm.cmd,
++	run-multi, search.cmd, search.right, sig.cmd, sig.right, skip.cmd,
++	skip.right, tbreak.cmd, tbreak.right, watch1.cmd, watch1.right:
++	Print now expands * so add quotes around. Some small
++	regularizations.  multi: quit 0 2 now works so note that.a
++
++2003-02-13 15:22  rockyb
++
++	* print_cmd.c: "\n" snuck in on last change in
++	print_case_command_head.
++
++2003-02-12 19:55  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc,
++	bashdb-fns.inc, bashdb-help.inc, bashdb-hist.inc, bashdb-init.inc,
++	bashdb-io.inc, bashdb-list.inc, bashdb-main.inc, bashdb-set.inc,
++	bashdb-sig.inc, bashdb-stack.inc: Try to make more ksh-93
++	compatible.
++	
++	declare -> typeset (except when using declare -p or declare -a). 
++	source -> .
++
++2003-02-12 01:47  rockyb
++
++	* debugger/bashdb: Small changes to make a little more consistent
++	with ksh93
++
++2002-12-31 23:25  rockyb
++
++	* debugger/bashdb-pre.inc.in: Comment more.
++
++2002-12-31 23:17  rockyb
++
++	* debugger/bashdb-file.inc: Add % to list of translated file
++	characters.
++
++2002-12-31 23:12  rockyb
++
++	* debugger/bashdb-fns.inc: [no log message]
++
++2002-12-31 11:57  rockyb
++
++	* debugger/: bashdb-fns.inc, bashdb-list.inc, bashdb-sig.inc: Make
++	all bashdb functions begin _bashdb - were were missing a couple of
++	routines.
++
++2002-12-30 23:23  rockyb
++
++	* debugger/NEWS: [no log message]
++
++2002-12-30 23:20  rockyb
++
++	* debugger/bashdb-file.inc: Add + to list of translated file2var
++	characters.
++
++2002-12-29 05:08  masata-y
++
++	* doc/bashdb.texi: Added my name again.
++
++2002-12-25 10:30  rockyb
++
++	* debugger/bashdb-cmds.inc: More state saved.
++
++2002-12-25 10:20  rockyb
++
++	* debugger/NEWS: Recent stuff.
++
++2002-12-25 10:18  rockyb
++
++	* debugger/: TODO, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-file.inc, bashdb-hist.inc, bashdb-set.inc, bashdb-sig.inc,
++	tests/misc.right, tests/multi3.cmd, tests/multi3.right,
++	tests/run-multi, tests/sig.right: Start the tedious task of having
++	a mechanism for setting variables that in a subshell so that its
++	value appears in its parent shell.
++
++2002-12-25 00:01  rockyb
++
++	* debugger/TODO: [no log message]
++
++2002-12-24 23:14  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc: Fix setting
++	breakpoints over restart. Needed to save the _brkpt_filevar and
++	_action_filevar arrays as well as _brkpt_count and _brkpt_cond
++	arrays.
++	
++	If we are in a subshell, we need to save BASHB_RESTART_FILE so it
++	will get set in sup-shells.
++
++2002-12-24 22:13  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-12-24 22:13  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-file.inc, bashdb-sig.inc:
++	Bug/Feature fix: Restart now quits all subshells before issuing its
++	restart (exec) command.
++
++2002-12-20 21:31  rockyb
++
++	* debugger/bashdb-fns.inc: Small typo.
++
++2002-12-20 13:13  rockyb
++
++	* debugger/tests/Makefile.am: Add run-bugIFS.
++
++2002-12-20 12:22  rockyb
++
++	* debugger/TODO: Update.
++
++2002-12-20 12:17  rockyb
++
++	* debugger/NEWS: -  Bug: if IFS set character in filename: the
++	filename would be truncated.	 Handle IFS save/restore more
++	pervasively by saving on DEBUG handler	   entry.
++
++2002-12-20 12:13  rockyb
++
++	* MANIFEST: Add bug-IFS tests.
++
++2002-12-20 12:12  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-fns.inc: Save and restore IFS
++	on debug signal handler. It means we can remove custom
++	save/restores elsewhere in the code.
++
++2002-12-20 12:11  rockyb
++
++	* debugger/tests/: bugIFS, bugIFS.cmd, bugIFS.right, bugIFS.sh,
++	bugIFS.tests, run-bugIFS: Regression test of recent bug when not
++	setting IFS on signal entry.
++
++2002-12-20 12:09  rockyb
++
++	* debugger/tests/sig.right: Update for IFS bug fix.
++
++2002-12-10 04:45  rockyb
++
++	* debugger/bashdb-brk.inc: More bash-oriented way to strip off a
++	suffix.
++
++2002-12-10 01:45  rockyb
++
++	* execute_cmd.c, subst.c: Let BASH_SUBSHELL catch more cases. In
++	particular, command substitution.
++
++2002-12-10 01:44  rockyb
++
++	* doc/bashdb.texi: Even more on quit/return.
++
++2002-12-10 01:28  rockyb
++
++	* doc/bashdb.texi: More on how quit and return are similar and
++	different.
++
++2002-12-10 01:06  rockyb
++
++	* doc/bashref.texi: Spelling mistake.
++
++2002-12-10 01:05  rockyb
++
++	* debugger/emacs/gud.el: Eval expression command is "x" not "pe"
++
++2002-12-10 01:04  rockyb
++
++	* debugger/TODO: [no log message]
++
++2002-12-09 08:16  rockyb
++
++	* MANIFEST, execute_cmd.c, externs.h, print_cmd.c,
++	debugger/CHANGES: "set -x" now show "for", "case" and "select"
++	headers ( "for x in", "case c in", "select s")
++
++2002-12-09 08:12  rockyb
++
++	* tests/: run-set-x, set-x.right, set-x.tests: Add "set -x" tests
++
++2002-12-09 07:13  rockyb
++
++	* debugger/tests/version: not needed?
++
++2002-12-08 01:26  rockyb
++
++	* doc/bashdb.texi: Note DDD and GNU Emacs frontents in sample
++	session.
++
++2002-12-08 01:21  rockyb
++
++	* doc/bashdb.texi: Another example mistake. "pe" doesn't exist any
++	more. We use "x".
++
++2002-12-08 01:17  rockyb
++
++	* doc/bashdb.texi: Output "echo 1" in wrong place.
++
++2002-12-08 00:58  rockyb
++
++	* htdocs/index.html: Add screenshot for ddd.
++
++2002-12-08 00:54  rockyb
++
++	* htdocs/bashdb-ddd.png: Show an example that is less obviously
++	buggy!
++
++2002-12-08 00:38  rockyb
++
++	* htdocs/bashdb-ddd.png: Screenshot in DDD.
++
++2002-12-07 23:21  rockyb
++
++	* doc/bashdb.texi: Correct sample session a bit. It really needs
++	more work
++
++2002-12-07 22:44  rockyb
++
++	* ChangeLog: [no log message]
++
++2002-12-07 22:43  rockyb
++
++	* MANIFEST: Add Changelog.
++
++2002-12-07 22:42  rockyb
++
++	* configure.in, debugger/ChangeLog, debugger/NEWS: Get ready for
++	yet another release.
++
++2002-12-07 22:11  rockyb
++
++	* doc/bashdb.texi: Small typos
++
++2002-12-07 21:59  rockyb
++
++	* doc/bashdb.texi: Revise "restart" command to reflect current
++	state. Document BASHDB_RESTART_FILE and other BASHDB_ and BASH_
++	variables.
++
++2002-12-07 16:54  rockyb
++
++	* debugger/ChangeLog: [no log message]
++
++2002-12-07 16:49  rockyb
++
++	* debugger/bashdb-main.inc: Make sure we can read the restart file.
++
++2002-12-07 16:48  rockyb
++
++	* debugger/bashdb-cmds.inc: Forgot to unset flag which says to
++	reread the file.
++
++2002-12-07 16:43  rockyb
++
++	* debugger/: ChangeLog, bashdb, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-main.inc, tests/brkpt2.right, tests/debug.right,
++	tests/finish.right, tests/parm.right, tests/sig.right: Preserve
++	breakpoints, watchpoints, debugger set variables on a restart.
++
++2002-12-07 16:41  rockyb
++
++	* debugger/Makefile.am: Remove compile of bashdb.elc. It's going
++	away anyway.
++
++2002-12-07 10:24  rockyb
++
++	* debugger/NEWS: As appropriate.
++
++2002-12-07 10:23  rockyb
++
++	* execute_cmd.c, externs.h, print_cmd.c, debugger/ChangeLog: print
++	select head - "select s in"
++
++2002-12-07 08:35  rockyb
++
++	* debugger/bashdb-io.inc: [no log message]
++
++2002-12-07 08:18  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-12-07 08:16  rockyb
++
++	* debugger/bashdb-io.inc: bashdb-io.inc (_bashdb_readlin): - When
++	reading large files which takes a long time, print out status every
++	1000 lines.
++
++2002-12-07 08:02  rockyb
++
++	* MANIFEST, parse.y, debugger/NEWS, tests/heredoc.right,
++	tests/heredoc.tests, tests/run-heredoc: Bug: (parse.y) line number
++	was not updated properly when in a here documented with an unquoted
++	delimter and containing backslash newline.
++	
++	Update and modernize tests and make executable.
++
++2002-12-06 22:57  rockyb
++
++	* tests/dbg-multicmd.right: A tad more correct than the preview
++	"right" check.
++
++2002-12-06 22:51  rockyb
++
++	* bashline.c, subst.c, lib/readline/bind.c,
++	lib/readline/readline.c: Add Official bash 2.05b patches
++
++2002-12-06 22:49  rockyb
++
++	* print_cmd.c: Add routines to print for and case headers "for i
++	in" or "case c in".
++
++2002-12-06 22:48  rockyb
++
++	* externs.h: Add definitions for print_for_head and
++	print_case_head.
++
++2002-12-06 22:48  rockyb
++
++	* execute_cmd.c: set BASH_COMMAND to for_head (for i in xxx) and
++	case_head (case c in).
++
++2002-12-06 22:47  rockyb
++
++	* debugger/bashdb-sig-ret.inc: Not used, but it if it were, this
++	would be right. Need to save/restore IFS around a "set -"
++
++2002-12-06 22:44  rockyb
++
++	* debugger/bashdb-list.inc: Typo.
++
++2002-12-06 22:43  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-12-06 11:27  rockyb
++
++	* debugger/emacs/: gud.el, gud.el.diff: A typo. Also modified DB
++	when I meant to modify bashdb.
++
++2002-12-03 19:46  rockyb
++
++	* debugger/bashdb-help.inc: Typo.
++
++2002-12-03 19:34  rockyb
++
++	* debugger/bashdb-fns.inc: Remove previous variable test. Not
++	needed?
++
++2002-12-03 19:24  rockyb
++
++	* debugger/bashdb-fns.inc: Bug in set was set of IFS messing up
++	"set" parsing. This time for sure!?
++
++2002-12-03 18:36  rockyb
++
++	* debugger/bashdb-fns.inc: More precise function comment.
++
++2002-12-03 18:34  rockyb
++
++	* debugger/bashdb-fns.inc: Bug: if _bashdb_old_set_opts was null.
++	Test now.
++
++2002-12-02 09:42  rockyb
++
++	* doc/bashdb.texi: Document set showcommand
++
++2002-12-02 08:20  rockyb
++
++	* debugger/TODO: Update as appropriate.
++
++2002-12-02 06:58  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-12-02 06:48  rockyb
++
++	* MANIFEST: MANIFEST: add debugger multi tests version.texi.in: new
++	version of manuals.
++
++2002-12-02 06:42  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-file.inc, bashdb-init.inc:
++	bashdb-file.inc: source persistent only if it exists. 
++	bashdb-init.inc/bashdb-cmds.inc: read persistent, write persistent.
++
++2002-12-02 06:41  rockyb
++
++	* debugger/bashdb-help.inc: Update doc for "x/examine"
++
++2002-12-02 06:41  rockyb
++
++	* debugger/bashdb-sig.inc: Hack (but works more often) cleanup of
++	persistent file.
++
++2002-12-02 06:40  rockyb
++
++	* debugger/: CHANGES, NEWS, TODO: As appropriate.
++
++2002-12-02 06:39  rockyb
++
++	* debugger/tests/: Makefile.am, run-misc, run-sig: Makefile.am: add
++	run-multi run-sig: line number changes run-misc: bad testing of
++	return codes. Wasn't doing second test.
++
++2002-12-02 05:50  rockyb
++
++	* doc/bashdb.texi: Document quit command. Has been put in command
++	reference and cross-referenced with return.  Subshell parenthesis
++	noted.
++	
++	Some typos corrected. Help listing updated.
++
++2002-12-02 05:15  rockyb
++
++	* doc/.cvsignore: Add bashdb.tmp
++
++2002-12-02 05:14  rockyb
++
++	* doc/: bashref.texi, version.texi.in: Update for this version.
++
++2002-12-02 04:55  rockyb
++
++	* doc/version.texi.in: Typo
++
++2002-12-02 04:54  rockyb
++
++	* configure.in: Time for another release.
++
++2002-12-02 04:53  rockyb
++
++	* doc/bashref.texi: Update CHANGES - include BASH_SUBSHELL for
++	example.
++
++2002-12-02 04:32  rockyb
++
++	* debugger/CHANGES: Update as appropriate.
++
++2002-12-01 16:26  rockyb
++
++	* debugger/tests/: multi3.cmd, multi3.tests: Regression test for
++	multi-statement lines and quit multiple levels
++
++2002-12-01 16:24  rockyb
++
++	* debugger/tests/: misc.right, multi.sh, multi1.cmd, multi1.right,
++	multi1.tests, multi2.cmd, multi2.right, multi2.tests, multi3.right,
++	run-multi, sig.right: Regression tests for multi-statement lines
++	and new quit command.
++
++2002-11-30 19:34  rockyb
++
++	* debugger/tests/misc.right: Was checking buggy history command.
++
++2002-11-30 19:13  rockyb
++
++	* debugger/bashdb-hist.inc: Typo.. "H count" was broken.
++
++2002-11-30 01:16  masata-y
++
++	* debugger/bashdb: Fix a typo.
++
++2002-11-26 10:47  rockyb
++
++	* debugger/: bashdb-init.inc, bashdb-set-d-vars.inc: More elegant
++	(and I wonder if not more robust) way to set $1 via set.  Use "set
++	-- xx yy" rather than "set xx yy"
++
++2002-11-26 07:24  rockyb
++
++	* MANIFEST: Add README, add examples/bashdb/bashdb.el
++
++2002-11-26 07:23  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-11-26 07:20  rockyb
++
++	* examples/bashdb/: README, bashdb.el: Remove bashdb.el as it is
++	likely to cause confusion. Set expectations for the code in this
++	directory.
++
++2002-11-26 07:09  rockyb
++
++	* debugger/emacs/gud.el.diff: Set default minibuf-mod-map in bashdb
++	read call from Masatake YAMATO and add link to
++	http://bashdb.sourceforge.net
++
++2002-11-26 07:04  rockyb
++
++	* debugger/emacs/gud.el: Add HTTP reference.
++
++2002-11-26 06:34  rockyb
++
++	* debugger/emacs/gud.el: Change from Masatake YAMATO in running
++	bash initially. Uses gud-minibuffer-local-map now.
++
++2002-11-23 00:17  rockyb
++
++	* debugger/bashdb-sig.inc: Don't wipe temp files unless subshell is
++	0. Likewise don't enter command shell if subshell is not 0. Don't
++	know that this will make much difference, but I guess it's the
++	right thing to do.
++
++2002-11-23 00:15  rockyb
++
++	* debugger/tests/misc.right: Output changed because of "set
++	showcommand"
++
++2002-11-22 22:02  rockyb
++
++	* debugger/bashdb-help.inc: Document help "set showcommand"
++
++2002-11-22 21:50  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-11-22 21:50  rockyb
++
++	* debugger/bashdb-init.inc: Bug: if no script we were running "set"
++	to dump environment.
++
++2002-11-22 20:57  rockyb
++
++	* execute_cmd.c, variables.c, debugger/bashdb-cmds.inc,
++	debugger/bashdb-list.inc, debugger/bashdb-set.inc,
++	debugger/emacs/bashdb.el, debugger/emacs/gud.el,
++	debugger/tests/sig.right, doc/bashref.texi: We now keep track of
++	the subshell level: dynamic veriable BASH_SUBSHELL and the debugger
++	prints these as ()'s inside of the prompt.
++
++2002-11-21 00:44  rockyb
++
++	* debugger/ddd/ddd-3.3.1-bashdb.diff: Display bash variables of the
++	form ${foo} or even ${foo[bar]##/*} now.
++
++2002-11-20 12:00  rockyb
++
++	* debugger/TODO: Current state of things and known bugs.
++
++2002-11-20 10:11  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-11-20 10:09  rockyb
++
++	* support/Makefile.in: Remove man2html objects and actually all
++	objects.
++
++2002-11-20 10:00  rockyb
++
++	* support/.cvsignore: Add man2html binary
++
++2002-11-20 09:59  rockyb
++
++	* support/man2html: This is an OS-specific  *binary*
++
++2002-11-20 09:55  rockyb
++
++	* debugger/bashdb-init.inc: "bash --debugger script args" was not
++	setting args properly.
++
++2002-11-19 23:42  rockyb
++
++	* doc/Makefile.in: Failiers in this directory aren't important.
++
++2002-11-19 23:31  rockyb
++
++	* debugger/tests/sig.right: Output chagned yet again.
++
++2002-11-19 23:03  rockyb
++
++	* debugger/tests/debug.right: Change to have it work with different
++	paths. Use basename setting.
++
++2002-11-19 23:02  rockyb
++
++	* debugger/bashdb-cmds.inc: Changes to have regression tests work
++	with different paths.
++
++2002-11-19 22:27  rockyb
++
++	* debugger/tests/run-sig: Typo.
++
++2002-11-19 22:22  rockyb
++
++	* debugger/tests/sig.right: [no log message]
++
++2002-11-19 22:20  rockyb
++
++	* debugger/tests/: brkpt2.right, debug.right, finish.right,
++	parm.right: Shortend bashdb.
++
++2002-11-19 22:17  rockyb
++
++	* debugger/bashdb: We have a better expand_fn now if we need it.
++
++2002-11-19 21:44  rockyb
++
++	* debugger/Makefile.am: This is a pain. Get date and autoregen
++	right on bashdb-pre.inc.
++
++2002-11-19 21:41  rockyb
++
++	* doc/Makefile.in: No really!
++
++2002-11-19 21:39  rockyb
++
++	* doc/Makefile.in: This time, for sure!
++
++2002-11-19 21:37  rockyb
++
++	* debugger/tests/misc.right: Made more like GDB output for ddd.
++
++2002-11-19 21:26  rockyb
++
++	* MANIFEST, configure.in, debugger/TODO, doc/Makefile.in: Mostly
++	hacks to make a distribution work smoothly.  MANIFEST: add DVI's.
++	This reduce TeX dependency, okay? TODO: document bugs configure.in
++	touch files so that we have right the first time.
++
++2002-11-19 20:27  rockyb
++
++	* configure.in: Remove touch in output. Is now handled in
++	Makefiles.
++
++2002-11-19 20:26  rockyb
++
++	* debugger/bashdb-cmds.inc: Variable name typo. When rerunning,
++	show full command now. Is messing up a bit too much.
++
++2002-11-19 20:25  rockyb
++
++	* debugger/bashdb-set.inc: Update help.
++
++2002-11-19 20:21  rockyb
++
++	* debugger/bashdb: Remove readonly attributes because when we run
++	as a subshell these want to get set again. May have to rethink how
++	to do.
++
++2002-11-19 20:20  rockyb
++
++	* doc/Makefile.in: Put touch of version.texi to avoid redoing
++	unnecessary work and force users to have TeX installed.
++
++2002-11-19 20:20  rockyb
++
++	* debugger/Makefile.am: Put touch inside build of bashd-pre.inc to
++	avoid redoing work.
++
++2002-11-19 20:19  rockyb
++
++	* debugger/bashdb-help.inc: Add set documentation. Put messages in
++	a form that DDD will understand without any hassle.
++
++2002-11-19 16:03  rockyb
++
++	* tests/dbg-multicmd.right: Added case tests.
++
++2002-11-19 16:02  rockyb
++
++	* MANIFEST: Add newest member of debugger bashdb-file.inc.
++
++2002-11-19 16:01  rockyb
++
++	* debugger/NEWS: Update as appropriate. Gee there are lots of
++	changes, mostly bug fixes.
++
++2002-11-19 15:55  rockyb
++
++	* tests/: trap.right, trap.tests: Remove SIGCHILD in trap list
++	since FreeBSD lists in another order.
++
++2002-11-19 15:52  rockyb
++
++	* tests/: dbg-multicmd.right, dbg-multicmd.tests, run-dbg-multicmd:
++	New regression test to check BASH_COMMAND.
++
++2002-11-19 15:47  rockyb
++
++	* execute_cmd.c: Preserve line number selector, i.e. the "foo, bar,
++	baz" of in "case foo, bar baz in ..."
++
++2002-11-19 15:32  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-help.inc, bashdb-io.inc, bashdb-main.inc: Canonicalize
++	filevars via a file expand routine. Allows multpile to refer to a
++	given file.
++	
++	Add option to have files show only short (basename) names, useful
++	in testing
++	
++	Add set/show of these.
++	
++	Bug in not setting fntrace correctly on debugger exit.
++	
++	Add -c option on bashdb. Analogous to "bash -c string"
++
++2002-11-19 15:28  rockyb
++
++	* debugger/tests/: brkpt2.cmd, brkpt2.right, misc.right, parm.cmd,
++	parm.right: *.cmd: added a couple of info files to check that we
++	read in files only once.  misc: added "set/show debugger and
++	basename" *.right: corresponding new output
++
++2002-11-19 15:16  rockyb
++
++	* debugger/: bashdb-help.inc, bashdb-set.inc: Add set/show options
++	to debug debugger and have filenames get listed as basename only.
++
++2002-11-19 15:15  rockyb
++
++	* debugger/: Makefile.am, bashdb-file.inc: Break out more routines
++	into bashdb-file.inc.  Add _bashdb_expand_filename to canonicalize
++	file names.
++
++2002-11-19 10:40  rockyb
++
++	* debugger/tests/sig.right: Numbers keep changing...
++
++2002-11-19 10:36  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, tests/brkpt2.right:
++	Fix bug in continue comand. Moved code from bashdb-brk.inc to
++	bashdb-cmds.inc
++
++2002-11-19 03:07  rockyb
++
++	* configure.in: Remove AC_CONFIG_HEADER of non-h files since it
++	munges first line. Boooooo! Setting time back now with touch.
++
++2002-11-19 03:03  rockyb
++
++	* debugger/tests/: brkpt2.cmd, brkpt2.right: Small change to make
++	regression test work on FreeBSD.
++
++2002-11-19 02:58  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-init.inc, bashdb-list.inc,
++	bashdb-pre.inc.in: Use common routines now. Spelled "Bourne"
++	incorrectly in bashdb-{pre,init}.inc
++
++2002-11-19 02:57  rockyb
++
++	* debugger/tests/brkpt1.right: some output changed: linespecs
++	aren't necessarily lines. Erroneously "break" instead of "clear" as
++	a result of cut-and-paste.
++
++2002-11-19 02:55  rockyb
++
++	* debugger/bashdb-fns.inc: Add common routines _bashdb_check_line
++	and _bashdb_get_maxline.  Reduces code bulk while making things
++	more reliable. _get_maxline now reads in the file if it hasn't been
++	read in yet.
++
++2002-11-19 02:53  rockyb
++
++	* debugger/bashdb-io.inc: Test to see if file exists before
++	reading. We could probably do better, but will need more code
++	reorganization for this.
++
++2002-11-18 22:59  rockyb
++
++	* configure.in: Take care by using AC_CONFIG_HEADERS not to update
++	a release file if it doesn't need updating. This allows the
++	maintainer/distributor to create a DVI and have it not get
++	recreated if that's not needed. In this way users are not forced
++	say to have TeX installed.
++
++2002-11-18 22:15  rockyb
++
++	* debugger/tests/brkpt1.right: Ditto.
++
++2002-11-18 22:14  rockyb
++
++	* debugger/bashdb-brk.inc: A little closer for FreeBSD...
++
++2002-11-18 22:08  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-stack.inc, tests/brkpt1.right,
++	tests/brkpt2.right, tests/debug.right, tests/finish.right,
++	tests/parm.right, tests/sig.right: Even closer to getting FreeBSD
++	regression tests work okay.
++
++2002-11-18 21:50  rockyb
++
++	* debugger/: bashdb-list.inc, tests/list.right: More changes to
++	make FreeBSD regression tests work out -- more to come...
++
++2002-11-18 21:44  rockyb
++
++	* debugger/tests/: brkpt2.right, dbg-test1.sub, watch2.right: More
++	changes to make FreeBSD regression tests work.
++
++2002-11-18 21:31  rockyb
++
++	* debugger/: bashdb, bashdb-brk.inc, bashdb-init.inc,
++	bashdb-list.inc, bashdb-stack.inc, tests/action.right,
++	tests/action.tests, tests/brkpt1.right, tests/brkpt1.tests,
++	tests/brkpt2.right, tests/brkpt2.tests, tests/debug.right,
++	tests/debug.tests, tests/display.right, tests/display.tests,
++	tests/finish.right, tests/finish.tests, tests/list.right,
++	tests/list.tests, tests/misc.right, tests/misc.tests,
++	tests/parm.right, tests/parm.tests, tests/search.right,
++	tests/search.tests, tests/sig.right, tests/sig.tests,
++	tests/skip.right, tests/skip.tests, tests/tbreak.right,
++	tests/tbreak.tests, tests/watch1.right, tests/watch1.tests,
++	tests/watch2.right, tests/watch2.tests: Add -B option to list only
++	basename in debugger output. Is useful for FreeBSD which list files
++	as foo rather than ./foo.
++
++2002-11-18 19:42  rockyb
++
++	* MANIFEST, configure.in: Get ready for version 0.33. Derived files
++	have been shuffled around.  I think though the overall organization
++	is a tad better.
++
++2002-11-18 19:40  rockyb
++
++	* debugger/: .cvsignore, bashdb-pre.inc.in: Release information
++	included via bashdb-pre.inc (via bashdb-pre.inc.in)
++
++2002-11-18 19:38  rockyb
++
++	* doc/: .cvsignore, Makefile.in, bashdb.texi, bashdb.texi.in,
++	bashref.texi, version.texi.in: Add release information
++	automatically via version.texi include file.
++
++2002-11-18 19:36  rockyb
++
++	* debugger/: Makefile.am, NEWS, bashdb, bashdb-init.inc,
++	bashdb-init.inc.in, bashdb.in, tests/brkpt2.right,
++	tests/debug.right, tests/finish.right, tests/misc-output.right,
++	tests/parm.right, tests/sig.right: Add release information via new
++	file bashdb-pre.in rather than modify bashdb-init.inc and bashdb
++
++2002-11-18 09:32  rockyb
++
++	* debugger/NEWS: typo
++
++2002-11-18 09:30  rockyb
++
++	* debugger/NEWS: Note configure script bug fix.
++
++2002-11-18 08:59  rockyb
++
++	* configure.in: Bug: remove --with-debugger-start-file since this
++	isn't a "package." Instead we set via variable DEBUGGER_START_FILE.
++	Thanks to c_thomps@ecolinux.no-ip.com for reporting the problem!
++	
++	Clean up a little, version and release numbers are now set in one
++	place.
++
++2002-11-18 08:57  rockyb
++
++	* debugger/configure.in: Clean up a little.
++
++2002-11-17 20:36  rockyb
++
++	* Makefile.in: Add doc to list of things in all made. I *think*
++	this is correct...
++
++2002-11-17 20:26  rockyb
++
++	* MANIFEST, configure.in, debugger/Makefile.am, doc/Makefile.in,
++	doc/bashref.texi: Changes to make .in targets get recreated.
++
++2002-11-17 20:23  rockyb
++
++	* doc/bashdb.texi: Is now derived from bashdb.texi.in
++
++2002-11-17 20:22  rockyb
++
++	* doc/bashdb.texi.in: More stuff was trunctated. Wonder if it has
++	to do with sourceforge move?
++	
++	Make references to version get updated automatically.
++
++2002-11-17 19:44  rockyb
++
++	* debugger/: NEWS, TODO: Update to reflect current situation.
++
++2002-11-17 19:42  rockyb
++
++	* debugger/tests/: brkpt2.right, debug.right, finish.right,
++	parm.right, sig.right: Line numbers inside signal handlers changed.
++
++2002-11-17 19:41  rockyb
++
++	* debugger/bashdb-sig.inc: Bug: don't set exit handler inside debug
++	trap handler. Seems to kick to be inhereted on subshells and then
++	we call the exit routine too often.
++	
++	exit_handler more like the other handlers. Understands
++	"stop/nostop, print/noprint stack/nostack". Does more of the same
++	things before entering cmdloop that debug_handler does via a more
++	common debugger enter routine.
++	
++	Saving _curline now done in common debbber enter routine
++
++2002-11-17 19:38  rockyb
++
++	* debugger/bashdb-cmds.inc: File got trunctated. Like
++	bashdb-help.inc -- Hmm. Something's fishy.
++	
++	Anyway, "debug" with no arguments now uses the last command rather
++	the last statement. This should be correct more often.
++
++2002-11-17 19:34  rockyb
++
++	* debugger/: bashdb-fns.inc, bashdb-main.inc: _curline is now set
++	by BASH_LINENO rather than passing as a parameter to the trap.
++	
++	Add this common thing inside common debugger enter routine.
++
++2002-11-17 19:30  rockyb
++
++	* debugger/bashdb-help.inc: info signals now shows EXIT in list.
++	
++	Some help text got truncated.
++	
++	Move CVS Id line to end to facilitate debugging.
++
++2002-11-17 19:26  rockyb
++
++	* debugger/Makefile.am: Add new .in files to distribution
++
++2002-11-17 19:23  rockyb
++
++	* debugger/bashdb: Derived now from bashdb.in
++
++2002-11-17 19:23  rockyb
++
++	* debugger/bashdb-init.inc: Derived now from bashdb-init.in
++
++2002-11-17 19:22  rockyb
++
++	* MANIFEST, configure.in, debugger/bashdb-init.inc.in,
++	debugger/bashdb.in: bashdb and bashdb-init.inc are now derived so
++	that we can automatically put in the release number.
++
++2002-11-16 11:44  rockyb
++
++	* htdocs/index.html: Add link to Bash reference manual which has
++	better error reporting and debugging support.
++
++2002-11-16 11:18  rockyb
++
++	* doc/bashref.texi: Go over debugger changes. Add debug RETURN, and
++	BASH_COMMAND for example.
++
++2002-11-16 11:17  rockyb
++
++	* debugger/CHANGES: Update as appropriate
++
++2002-11-16 09:55  rockyb
++
++	* execute_cmd.c, externs.h, print_cmd.c, trap.c, variables.c: Add
++	feature to save in BASH_COMMAND the command that is about to be
++	executed (provided it's not a "trap" statement). This is useful
++	*inside* a trap handler to know what was being run at the time of
++	the trap: the source code line isn't enough since there can be many
++	commands on one line. And in fact for an "eval" the command may
++	change from say "eval $foo" to "echo this is my life."
++
++2002-11-16 09:50  rockyb
++
++	* debugger/tests/: brkpt2.right, debug.right, finish.right,
++	parm.right, sig.right, skip.right: Recent changes to bashdb-sig.inc
++	changed call-stack line numbers.  These tests notice the line
++	number change.
++
++2002-11-16 09:49  rockyb
++
++	* debugger/bashdb-list.inc: We now print the statement to be
++	executed if it was on the same line/file and the statement part is
++	different from the last time we ran this.
++
++2002-11-16 09:48  rockyb
++
++	* debugger/emacs/gud.el: Patched version for emacs 21.2 of gud.el
++	with bash support.
++
++2002-11-16 09:47  rockyb
++
++	* debugger/emacs/gud.el.diff: Patches that I hope will be on the
++	next version of Emacs (assuming the paperwork isn't lost, people
++	don't forget about the patch as a result of the time delay to do
++	the paperwork and so on.)
++
++2002-11-16 09:45  rockyb
++
++	* debugger/emacs/bashdb.el: Move from parent directory here. May
++	have also added provision for "finish" command.
++
++2002-11-16 09:40  rockyb
++
++	* debugger/: bashdb-main.inc, bashdb-sig.inc: Now save the command
++	that is to be executed next.
++
++2002-11-16 09:38  rockyb
++
++	* debugger/bashdb-fns.inc: Add common function
++	_bashdb_set_to_return_from_debugger to regularize the things that
++	need to be done on exit. There are more now, since we are saving
++	the last command executed on this line of the source file.
++
++2002-11-16 09:36  rockyb
++
++	* debugger/bashdb-init.inc: Need to skip more initially for "bashdb
++	-c" setup.
++
++2002-11-16 09:25  rockyb
++
++	* debugger/bashdb: Add -c option analogous to "bash -c".
++
++2002-11-15 08:31  rockyb
++
++	* doc/bashdb.texi: Update edition number and correct note x takes
++	an expression but repeats old one if not given.
++
++2002-11-15 07:52  rockyb
++
++	* doc/bashdb.texi: Document better how x command works. Mention
++	that DDD is available. Numerous small improvements.
++
++2002-11-14 22:25  rockyb
++
++	* debugger/ddd/ddd-3.3.1-bashdb.diff: This time, for sure!
++
++2002-11-14 19:16  rockyb
++
++	* MANIFEST, execute_cmd.c, tests/dbg-support.right: Bug: Somehow a
++	statement is messing up the simple cmd's Simple.line.  So don't use
++	that in retrieving the line number. Would like to understand why
++	this is so, and if we could really simplify executing_line_number.
++
++2002-11-14 15:56  rockyb
++
++	* debugger/ddd/ddd-3.3.1-bashdb.diff: Final diff patch for ddd?
++
++2002-11-14 15:45  rockyb
++
++	* debugger/: NEWS, bashdb-cmds.inc, ddd/ddd-3.3.1-bashdb.diff,
++	tests/brkpt2.cmd, tests/brkpt2.right, tests/sig.right: More
++	improvements to "x" command. Use print as a fallback...
++
++2002-11-14 09:25  rockyb
++
++	* configure.in, debugger/bashdb-help.inc, debugger/tests/sig.right,
++	doc/bashdb.texi: configuure.in: get ready for version 0.32
++	bashdb.texi: minor typo changes debugger/help/sig: Remove "Num"
++	from title as it is no longer there.
++
++2002-11-14 09:08  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-11-14 09:03  rockyb
++
++	* tests/run-all: Bug: was not using right shell to run tests.
++
++2002-11-14 08:15  rockyb
++
++	* debugger/: bashdb-help.inc, bashdb-sig.inc, tests/sig.right: A
++	tad more like gdb: no signal numbers listed. No longer trap on
++	SIGWINCH.
++
++2002-11-14 01:09  rockyb
++
++	* MANIFEST: bashdb.el listed in old location.
++
++2002-11-14 01:08  rockyb
++
++	* tests/: run-dbg-support, run-dbg-support2, run-type: Remove
++	"export" -- messes up occasionally.
++
++2002-11-13 23:39  rockyb
++
++	* debugger/: NEWS, bashdb-help.inc, bashdb-sig.inc,
++	tests/sig.right: Add help for "handle". Tidy generic signal handler
++	more and make more general (e.g unconditinally turn off set
++	tracing).
++
++2002-11-13 23:22  rockyb
++
++	* debugger/: bashdb-fns.inc, bashdb-sig.inc, tests/sig.right: Clean
++	up signal handling code a small amount by creating a common routine
++	to set some global variables.
++
++2002-11-13 19:42  rockyb
++
++	* MANIFEST, doc/bashdb.texi: MANIFEST: add new ddd-3.3.1 patch. 
++	bashdb.texi: docment handle command
++
++2002-11-13 19:33  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-help.inc, bashdb-sig.inc,
++	tests/sig.cmd, tests/sig.right, tests/sig.sh: Signal handling is
++	more like gdb now. No doubt there're room for improvement, but this
++	is probably a big improvement.
++
++2002-11-13 19:32  rockyb
++
++	* debugger/ddd/ddd-3.3.1-bashdb.diff: Patches to make ddd work.
++
++2002-11-12 15:20  rockyb
++
++	* debugger/: NEWS, TODO, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-init.inc, bashdb-sig.inc, tests/sig.right: Some work on
++	signal handling. More is there, more to do. So what else is new?
++
++2002-11-12 12:22  rockyb
++
++	* doc/bashdb.texi: Add "info break count". More examples. Embolden
++	typed example output. Remove some duplicate index entries.
++
++2002-11-12 11:50  rockyb
++
++	* debugger/tests/: brkpt1.cmd, brkpt1.right: Add error tests on
++	"info break". And add test for "info break n."
++
++2002-11-12 09:30  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-11-12 09:29  rockyb
++
++	* debugger/tests/: misc.right, sig.right: Recent changes in code
++	are reflected changed output (line numbers or help text)
++
++2002-11-12 09:26  rockyb
++
++	* doc/bashdb.texi: Add documentation for "condition" command.
++
++2002-11-12 07:45  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc: Add
++	gdb's "condition" command.
++
++2002-11-12 07:42  rockyb
++
++	* debugger/bashdb-sig.inc: Oops --- typo in variable name.
++
++2002-11-12 07:41  rockyb
++
++	* debugger/bashdb-sig.inc: Add provision for debugging debugger.
++
++2002-11-12 07:40  rockyb
++
++	* debugger/bashdb-io.inc: Add more file translation characters for
++	", [, and ] and reorder letters to make mnemonic.
++
++2002-11-12 07:39  rockyb
++
++	* debugger/tests/: brkpt1.cmd, brkpt1.right: Add regression tests
++	for new "condition" command.
++
++2002-11-12 07:37  rockyb
++
++	* tests/: dbg-support.right, dbg-support2.right: Got these two
++	output "right" files reversed, - sorta.
++
++2002-11-11 23:56  rockyb
++
++	* debugger/bashdb-sig.inc: Caught another routine that didn't start
++	_bashdb_
++
++2002-11-11 23:45  rockyb
++
++	* debugger/TODO: Cross many things off list.
++
++2002-11-11 23:45  rockyb
++
++	* debugger/NEWS: Update as appropriate - major changes.
++
++2002-11-11 23:44  rockyb
++
++	* debugger/Makefile.am: Move bashdb.el into emacs directory.
++
++2002-11-11 23:42  rockyb
++
++	* MANIFEST: Add debugger emacs and ddd directories.
++
++2002-11-11 23:41  rockyb
++
++	* execute_cmd.c: Line number reporting improved.
++	
++	Fix bug in using trap line numbers inside traps. BASH_LINENO had
++	been wrong for the parts inside of a trap.
++	
++	Fix bug in case line numbers reporting line number of "esac" rather
++	than case clause.
++	
++	The organization of the how line numbers work should really be
++	rethought. Here we've done a lot of saving and restoring when that
++	shoudl probably be done elsewhere.
++
++2002-11-11 23:39  rockyb
++
++	* tests/: dbg-support.right, dbg-support2.tests: Would you believe
++	we were checking for erroneous values. Put in the trap reporting a
++	line number that (when working properly) *should* change.
++
++2002-11-11 23:37  rockyb
++
++	* tests/run-dbg-support2: Make it so we can run standalone.
++
++2002-11-11 23:36  rockyb
++
++	* debugger/tests/sig.right: Had had wrong line numbers. This time,
++	for sure!
++
++2002-11-11 16:45  rockyb
++
++	* debugger/bashdb.el: Moved inside emacs directory now.
++
++2002-11-11 07:28  rockyb
++
++	* execute_cmd.c: Simplifer and I think a tad more line-number
++	accurate.
++
++2002-11-10 21:26  rockyb
++
++	* execute_cmd.c, trap.c, debugger/NEWS: Believe it or not, the C
++	files have gotten a little bit *simpler*. We are closer towards
++	having line numbers recorded accurately in BASH_LINENO (although
++	things are not perfect yet).
++
++2002-11-10 21:06  rockyb
++
++	* MANIFEST: Make tests 755 so they can more easily be run
++	standalone.
++
++2002-11-10 21:05  rockyb
++
++	* debugger/tests/brkpt2.right: Would you believe that we had been
++	checking an erroneous down all along?
++
++2002-11-10 21:04  rockyb
++
++	* tests/: dbg-support.right, dbg-support.tests, run-dbg-support:
++	Would you believe that we had been checking wrong stuff all along?
++
++2002-11-10 14:39  rockyb
++
++	* debugger/: bashdb-help.inc, bashdb-stack.inc, bashdb.el,
++	tests/brkpt2.right, tests/misc.right: bashdb-help: Make more like
++	gdb - facilitates use in ddd.  bashdb-stack.inc: Fix bug in
++	"stack_down". (There's another one though lurking) bashdb.el: add
++	key mapping for finish and other keymappings tests/misc: change in
++	"show" output tests/brkpt2: perhaps better although not quite
++	perfect.
++
++2002-11-10 11:35  rockyb
++
++	* debugger/bashdb-help.inc: Add help for finish command. Invalid
++	help command now reports what gdb does.
++
++2002-11-09 23:54  rockyb
++
++	* debugger/bashdb-help.inc: Missed a place that should have added
++	_bashdb.
++
++2002-11-09 20:28  rockyb
++
++	* debugger/bashdb-set.inc: Make show command work like gdb.
++
++2002-11-09 20:16  rockyb
++
++	* debugger/bashdb-io.inc: Missed a couple more "builtin printf"'s
++
++2002-11-09 20:15  rockyb
++
++	* debugger/bashdb-io.inc: Specify *builtin* printf.
++
++2002-11-09 20:12  rockyb
++
++	* debugger/tests/finish.cmd: gdb "finish" (= perl5db "return")
++	regression test.
++
++2002-11-09 20:07  rockyb
++
++	* tests/: run-trap, run-type: If there's an error we save in a file
++	specific for this test.  Is more standalone now.
++
++2002-11-09 10:07  rockyb
++
++	* tests/shopt.right: Update for add set -o errtrace option
++
++2002-11-09 07:38  rockyb
++
++	* debugger/: Makefile.am, NEWS, bashdb-cmds.inc, bashdb-help.inc,
++	bashdb-hist.inc, bashdb-io.inc, bashdb-main.inc, bashdb-set.inc,
++	tests/misc.cmd, tests/misc.right, tests/sig.cmd, tests/sig.right,
++	tests/sig.sh: echo -> builtin echo Add "info signals" and "info
++	handler" Break out history into new file bashdb-hist.inc.  Help
++	command change v -> M
++
++2002-11-09 07:36  rockyb
++
++	* doc/bashdb.texi: Revise info on signal handling and expand
++	history command section.
++
++2002-11-09 07:34  rockyb
++
++	* configure.in: Get redy for a new release.
++
++2002-11-09 07:34  rockyb
++
++	* MANIFEST: Update with current list.
++
++2002-11-09 07:34  rockyb
++
++	* trap.c: A hack to stop the core dump until I figure out why we
++	are trying to free a mangled string.
++
++2002-11-08 21:29  rockyb
++
++	* debugger/tests/sig.sh: Regression test for signal handling.
++
++2002-11-08 21:24  rockyb
++
++	* tests/: dbg-support2.right, dbg-support2.tests, run-dbg-support2:
++	Regression tests for skipping an instruction.
++
++2002-11-08 21:22  rockyb
++
++	* MANIFEST: Add run-support2 and +x tests/run-*
++
++2002-11-08 21:08  rockyb
++
++	* debugger/tests/sig.right: [no log message]
++
++2002-11-08 21:08  rockyb
++
++	* debugger/bashdb-sig.inc: Previous flie was horribly truncated.
++
++2002-11-07 05:34  rockyb
++
++	* debugger/tests/run-sig: Fix bug in reporting a pass when we fail.
++
++2002-11-05 22:43  rockyb
++
++	* MANIFEST, execute_cmd.c, flags.c, flags.h, trap.c, trap.h,
++	builtins/set.def, debugger/bashdb-sig-ret.inc,
++	debugger/tests/Makefile.am, debugger/tests/finish.right,
++	debugger/tests/finish.tests, debugger/tests/run-finish,
++	debugger/tests/run-sig, doc/bashdb.texi: bashdb.texi: Document
++	finish command.
++	
++	debugger/tests*, MANIFEST, Makefile.am: Add finish command test.
++	
++	*sig: add signal save/restor test
++
++2002-11-02 15:17  rockyb
++
++	* debugger/NEWS: Today's hacks.
++
++2002-11-02 14:47  rockyb
++
++	* debugger/tests/run-sig: Signal handler testing.
++
++2002-11-02 14:46  rockyb
++
++	* debugger/: Makefile.am, bashdb-list.inc, bashdb-sig-ret.inc,
++	bashdb-sig.inc, tests/Makefile.am, tests/sig.cmd, tests/sig.right,
++	tests/sig.sh, tests/sig.tests: Save/restore signals on entering
++	debugger.
++
++2002-11-02 10:17  rockyb
++
++	* trap.c: Clear trap RETURN on function calls.
++
++2002-11-02 10:16  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-sig.inc: Workaround? for bash
++	bug introduced implementing "trap RETURN"
++
++2002-11-02 09:17  rockyb
++
++	* trap.c: Save and restore return code $? across run_return_trap
++	calls.
++
++2002-11-02 09:15  rockyb
++
++	* debugger/bashdb-sig.inc: [no log message]
++
++2002-11-02 09:15  rockyb
++
++	* debugger/bashdb-sig.inc: Small comment changes.
++
++2002-11-02 09:12  rockyb
++
++	* debugger/CHANGES: Reflects better the changes.
++
++2002-11-02 09:03  rockyb
++
++	* debugger/CHANGES: Update as appropriate.
++
++2002-11-02 08:12  rockyb
++
++	* builtins/return.def, debugger/NEWS, debugger/bashdb-cmds.inc,
++	debugger/bashdb-sig.inc, debugger/bashdb-stack.inc,
++	debugger/tests/brkpt2.right, debugger/tests/parm.right: Fix bug
++	where stack trace current line entry was sometimes wrong.  No
++	longer mangle line number in stack changing commands.
++	
++	Printing source line on "RETURN" debugger call.
++
++2002-11-01 07:14  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-io.inc, bashdb-list.inc, bashdb-main.inc, bashdb-sig.inc:
++	Add gdb's finish or perl5db's return. Line number on return
++	statement is funny and there are some bugs to make fully work.
++	
++	Now all debugger routines start _bashdb.
++
++2002-11-01 07:11  rockyb
++
++	* execute_cmd.c, trap.c, trap.h, support/mksignames.c,
++	tests/dbg-is-fn.right, tests/dbg-is-fn.tests: Add:   trap fn ...
++	RETURN
++	
++	Line numbers when trap is called are a little off (for use in a
++	debugger), but this works.
++
++2002-10-31 05:59  rockyb
++
++	* debugger/TODO: [no log message]
++
++2002-10-30 22:11  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-10-30 22:03  rockyb
++
++	* configure.in, debugger/bashdb-cmds.inc, debugger/bashdb-help.inc,
++	debugger/tests/misc.cmd, debugger/tests/misc.right,
++	doc/bashdb.texi: Allow negative numbers in history commands.  Get
++	ready for release 0.30.
++
++2002-10-30 07:55  rockyb
++
++	* doc/bashdb.texi: /tmp/fact.sh -> fact.sh in example.
++
++2002-10-30 07:46  rockyb
++
++	* doc/bashdb.texi: Index history commands.
++
++2002-10-30 07:13  rockyb
++
++	* debugger/TODO: Cross some things off the list.
++
++2002-10-30 07:02  rockyb
++
++	* doc/bashdb.texi: Add documentation on history command.  Minor
++	typographical improvements.
++
++2002-10-29 08:54  rockyb
++
++	* debugger/: NEWS, bashdb-cmds.inc, bashdb-help.inc,
++	tests/misc.cmd, tests/misc.right: Make history command more robust
++	and allow for more features.  How allows for !n:p. We now give an
++	error message if the history numbers are out of range. Separate
++	history parsing into a subroutine to tidy and facilitate future
++	features.
++
++2002-10-27 00:05  rockyb
++
++	* debugger/NEWS: Update as appropriate.
++
++2002-10-27 00:02  rockyb
++
++	* debugger/bashdb-set-d-vars.inc: Better way to set dollar
++	parameters. It handles more than $1..$9 and sets $# correctly too.
++
++2002-10-26 23:17  rockyb
++
++	* debugger/bashdb-init.inc: bug in bashdb --debugger some local's
++	must be declares.
++
++2002-10-26 10:29  rockyb
++
++	* doc/bashdb.texi: Add doc for -t option and "set editing" Revise
++	example a little for current output.
++
++2002-10-26 10:27  rockyb
++
++	* debugger/: NEWS, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-help.inc, bashdb-init.inc, bashdb-set.inc: Fix/change
++	history. Numbers now match prompt numbers. Can use !n as well as hi
++	n
++	
++	Add GDB's "set editing" command.
++	
++	_bashdb_help_set added to show set commands. Made more like GDB's
++	output.
++
++2002-10-26 10:25  rockyb
++
++	* debugger/tests/: misc.cmd, misc.right: Output changes as a result
++	of:
++	
++	 - Fix/change history. Numbers now match prompt numbers.
++	-  Add test of GDB's "set args" command.  -  Add test of  GDB's
++	"set editing" command.
++
++2002-10-25 08:34  rockyb
++
++	* doc/bashdb.texi: Add info about set args, show args, controlling
++	tty, setting and showing the prompt.
++
++2002-10-25 08:15  rockyb
++
++	* debugger/: bashdb-cmds.inc, tests/misc.cmd, tests/misc.right:
++	Make H be like perl's. Fix history (hi) command. Don't but some
++	commands like comment and history in the history. Test.
++
++2002-10-25 08:05  rockyb
++
++	* debugger/: bashdb-cmds.inc, tests/misc.cmd, tests/misc.right:
++	Make H be more like perl's. Make hi work.
++
++2002-10-25 07:07  rockyb
++
++	* debugger/: bashdb-set.inc, tests/brkpt2.right, tests/debug.right,
++	tests/list.right, tests/misc.right, tests/parm.right,
++	tests/run-misc: Tidy up show output. Tests changed largely as a
++	result of size increase in bashdb from last change.  run-misc:
++	wasn't giving an error is diff failed on first diff check.
++
++2002-10-25 06:44  rockyb
++
++	* debugger/NEWS: Latest news...
++
++2002-10-25 06:41  rockyb
++
++	* debugger/: bashdb, bashdb-cmds.inc, bashdb-set.inc,
++	tests/misc-output.right, tests/misc.cmd, tests/misc.right,
++	tests/run-misc: Add "set/show prompt." Make prompt customizable. 
++	bashdb: all -t to be a filename.
++
++2002-10-25 06:39  rockyb
++
++	* MANIFEST: One more file...
++
++2002-10-24 09:33  rockyb
++
++	* debugger/: bashdb-set.inc, bashdb-sig.inc: Comment about why
++	slightly more complex loop to set args.
++
++2002-10-24 09:08  rockyb
++
++	* debugger/: NEWS, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-help.inc, bashdb-init.inc, bashdb-io.inc, bashdb-set.inc,
++	tests/brkpt2.right, tests/debug.right, tests/misc.cmd,
++	tests/misc.right, tests/parm.right: -  Fix bugs in debugger output
++	when debugged program redirects I/O
++	
++	-  Add GDB's "set args" command
++
++2002-10-23 09:04  rockyb
++
++	* debugger/bashdb: Remove debug statement accidentally committed.
++
++2002-10-23 08:51  rockyb
++
++	* debugger/: bashdb, bashdb-init.inc, bashdb-io.inc,
++	tests/brkpt2.right, tests/debug.right, tests/parm.right: bashdb,
++	bashdb-init.inc: Add -t option to set tty bashdb-io.inc: bug in not
++	testing _bashdb_tty in _bashdb_printf tests: output changes bashdb
++	script has gotten larger.
++
++2002-10-23 08:49  rockyb
++
++	* debugger/TODO: Update as appropriate.
++
++2002-10-23 08:26  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
++	bashdb-init.inc, bashdb-io.inc, bashdb-set.inc, tests/misc.cmd,
++	tests/misc.right: Change variable $_tty to $_bashdb_tty
++	
++	All "read -e -p" now have input and output redirected.
++	
++	Implement tty command to set tty.
++
++2002-10-22 13:36  masata-y
++
++	* htdocs/: bashdb-break.png, bashdb-where.png, index.html: Added
++	new screenshot.
++
++2002-10-22 06:25  rockyb
++
++	* debugger/bashdb-cmds.inc: Fix bug in printing debugger prompt
++	when debugged program has redirected stderr. Thanks to Masatake
++	YAMATO.
++
++2002-10-21 10:59  rockyb
++
++	* debugger/bashdb-cmds.inc: Remove trailing blanks.
++
++2002-10-21 10:48  rockyb
++
++	* debugger/: bashdb-io.inc, bashdb-list.inc, bashdb-sig.inc: Just
++	format changes: remove blanks at the ends of some lines.
++
++2002-10-21 10:26  rockyb
++
++	* debugger/.cvsignore: Allow for different versions of autotools.
++
++2002-10-21 10:25  rockyb
++
++	* debugger/bashdb-help.inc: Bug in "help return" -- missing some
++	lines there.
++
++2002-10-21 10:00  rockyb
++
++	* .cvsignore: Handle embedded version numbers for automate.
++
++2002-10-19 09:26  rockyb
++
++	* debugger/bashdb-help.inc, doc/bashdb.texi: Add documentation for
++	new command return.  bashdb.texi: had duplicate help screens
++
++2002-10-19 09:08  rockyb
++
++	* debugger/NEWS: Minor typographical changes.
++
++2002-10-18 23:24  rockyb
++
++	* debugger/: bashdb-cmds.inc, tests/debug.right: Make so regression
++	test is portable. A hack for now
++
++2002-10-18 23:16  rockyb
++
++	* debugger/: bashdb-cmds.inc, tests/debug.cmd, tests/debug.right:
++	Correct debug test.
++
++2002-10-18 23:14  rockyb
++
++	* debugger/tests/debug2.cmd: Need to have a separate file for debug
++	after nested one level.
++
++2002-10-18 23:13  rockyb
++
++	* MANIFEST: Need yet another command file to test "debug" nested
++	one level deep.
++
++2002-10-18 22:40  rockyb
++
++	* debugger/bashdb-set-d-vars.inc: To set dollar variables ($1, $2,
++	... $?) before evaluation of a user expression.
++
++2002-10-18 22:37  rockyb
++
++	* MANIFEST: This time, for sure!
++
++2002-10-18 22:34  rockyb
++
++	* MANIFEST: More of the same.
++
++2002-10-18 22:31  rockyb
++
++	* MANIFEST: Add missing file.
++
++2002-10-18 22:14  rockyb
++
++	* MANIFEST, debugger/tests/Makefile.am, debugger/tests/run-watch2,
++	debugger/tests/watch2.cmd, debugger/tests/watch2.right,
++	debugger/tests/watch2.tests: Add more tests.
++
++2002-10-18 21:41  rockyb
++
++	* MANIFEST: Fix filename typo
++
++2002-10-18 21:31  rockyb
++
++	* MANIFEST, trap.c, debugger/Makefile.am, debugger/bashdb-brk.inc,
++	debugger/bashdb-cmds.inc, debugger/bashdb-fns.inc,
++	debugger/bashdb-io.inc, debugger/bashdb-sig.inc,
++	debugger/tests/debug.cmd, debugger/tests/debug.right,
++	debugger/tests/debug.sh, debugger/tests/debug.tests,
++	debugger/tests/parm.right, debugger/tests/run-debug,
++	doc/bashdb.texi, doc/bashref.texi: A better way of handling setting
++	dollar variables.
++	
++	Add debug test.
++
++2002-10-18 08:44  rockyb
++
++	* debugger/: bashdb-brk.inc, NEWS: Set $1, $2 before
++	watch-expression evaluation
++
++2002-10-18 08:10  rockyb
++
++	* debugger/: NEWS, bashdb-cmds.inc, bashdb-sig.inc: $? is saved and
++	preserved for use inside "eval" and "print"
++
++2002-10-18 08:06  rockyb
++
++	* debugger/tests/: parm.cmd, parm.sh: Test that $? is saved and
++	preserved in eval and print.
++
++2002-10-18 06:38  rockyb
++
++	* debugger/bashdb-set.inc: Correct show version to add more
++	sources.
++
++2002-10-18 06:33  rockyb
++
++	* MANIFEST, execute_cmd.c, trap.c, doc/bashdb.texi: execute_cmd.c:
++	small bug fixes to "return" statement bashdb.texi: document return
++	
++	MANIFEST: add skip.sh
++
++2002-10-18 06:32  rockyb
++
++	* debugger/: NEWS, bashdb-cmds.inc, bashdb-sig.inc: Fix bug in skip
++	*count*.
++
++2002-10-18 06:31  rockyb
++
++	* debugger/tests/: action.cmd, tbreak.cmd: Add CVS Id lines.
++
++2002-10-18 06:30  rockyb
++
++	* debugger/tests/: skip.cmd, skip.right, skip.sh, skip.tests: More
++	thorough tests of skip command.
++
++2002-10-18 06:30  rockyb
++
++	* debugger/tests/: parm.cmd, parm.right, parm.sh: Add return tests.
++	More detailed dollar tests.
++
++2002-10-17 08:56  rockyb
++
++	* debugger/: NEWS, TODO, bashdb-cmds.inc, bashdb-main.inc,
++	tests/brkpt2.right, tests/parm.right: bashdb-main.inc: Bug in
++	changing to _bashdb_libdir bashdb-cmds.inc: number of times nested
++	in debug listed via exported variable		       BASHDB_LEVEL
++
++2002-10-17 08:11  rockyb
++
++	* debugger/bashdb-cmds.inc: Remove debugging statments.
++
++2002-10-17 00:10  rockyb
++
++	* debugger/: NEWS, TODO, bashdb, bashdb-cmds.inc: Get "debug"
++	working much better:   variables (e.g. $0) are substituted now.   
++	"bash --debugger" invocations work since we no longer fork   
++	_libdir renamed to _bashdb_libdir (in bashdb).	  We add "-L
++	_bashdb_libdir" when executing via bashdb script.
++
++2002-10-16 23:12  rockyb
++
++	* doc/Makefile.in: Correct make uninstall -- this time for sure!
++
++2002-10-16 23:12  rockyb
++
++	* Makefile.in: Correct make uninstall target - add debugger
++	directory.
++
++2002-10-16 22:55  rockyb
++
++	* doc/Makefile.in: Bug in uninstall targets. Was missing trailing
++	;'s
++
++2002-10-16 08:41  rockyb
++
++	* debugger/bashdb-help.inc, doc/bashdb.texi: Document skip and
++	debug.
++
++2002-10-16 08:40  rockyb
++
++	* debugger/bashdb-cmds.inc: Make skip work like next/step.
++
++2002-10-16 08:39  rockyb
++
++	* configure.in: Get ready for another release.
++
++2002-10-16 08:22  rockyb
++
++	* debugger/NEWS: As appropriate.
++
++2002-10-15 23:40  rockyb
++
++	* debugger/tests/skip.right: Correct output from skip test.
++
++2002-10-15 23:29  rockyb
++
++	* debugger/bashdb-help.inc, doc/bashdb.texi, doc/bashref.texi:
++	Document skip command.
++
++2002-10-15 22:57  rockyb
++
++	* MANIFEST, execute_cmd.c, trap.c, trap.h,
++	debugger/bashdb-cmds.inc, debugger/bashdb-sig.inc,
++	debugger/tests/Makefile.am, debugger/tests/run-skip,
++	debugger/tests/skip.cmd, debugger/tests/skip.tests,
++	doc/bashref.texi: Add ability to skip execution of a command.
++	Debugger command: skip
++
++2002-10-15 22:55  rockyb
++
++	* builtins/caller.def: Documentation improvement.
++
++2002-10-12 09:26  rockyb
++
++	* doc/bashdb.texi: Update stack example and help display to match
++	current settings.
++
++2002-10-11 23:18  rockyb
++
++	* debugger/NEWS: Update to reflect current sitiation
++
++2002-10-11 23:17  rockyb
++
++	* debugger/: bashdb-list.inc, tests/search.cmd, tests/search.right:
++	Fix bug in search forward not resetting line to start.
++	
++	Search now lists only one line same as gdb and perl5db do.  Update
++	tests as appropriate.
++
++2002-10-11 08:36  rockyb
++
++	* configure.in: Get ready for release 0.28
++
++2002-10-11 08:27  rockyb
++
++	* doc/bashref.texi: Document BASH_ARGC and BASH_ARGV. Change
++	workign on BASH_LINENO and BASH_SOURCE a little.
++
++2002-10-10 21:40  rockyb
++
++	* MANIFEST: Add parm tests.
++
++2002-10-10 21:39  rockyb
++
++	* debugger/tests/parm.sh: To keep run-parm and parm.right company.
++
++2002-10-10 21:21  rockyb
++
++	* debugger/tests/: parm.cmd, parm.right: Add an action command.
++	Forgot to check in parm.right.
++
++2002-10-10 21:08  rockyb
++
++	* debugger/TODO: Update to reflect current situtation: parameters
++	now work.
++
++2002-10-10 20:57  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-main.inc, bashdb-sig.inc,
++	tests/parm.cmd: Fix bug so that $1 preserve embedded blanks (or
++	more precisely, embedded IFS) that they might have had.
++
++2002-10-10 08:47  rockyb
++
++	* debugger/bashdb-cmds.inc: Bug in _bashdb_cmd_eval. Was not
++	erasing evalfile before starting if $1.. was empty, so we'd have
++	accumulated output.
++
++2002-10-10 08:34  rockyb
++
++	* .cvsignore: Add more good derived stuff (from autotools)
++
++2002-10-10 08:34  rockyb
++
++	* array.c, execute_cmd.c, shell.c, variables.c, variables.h,
++	builtins/common.c, builtins/common.h, builtins/evalfile.c,
++	tests/array.right: Add ability to show function and shell
++	parameters. Added BASH arrays BASH_ARGC and BASH_ARGV.
++	
++	array.c: handle more error contitions.	array.right: change for new
++	array variables
++
++2002-10-10 08:30  rockyb
++
++	* debugger/.cvsignore: Add more good derived stuff (from autotools)
++
++2002-10-10 08:26  rockyb
++
++	* debugger/tests/: run-brkpt1, run-brkpt2, run-display, run-list,
++	run-misc, run-parm, run-search, run-tbreak, run-watch1: Make all
++	run* have these two properties:
++	
++	File checked against is now custom for that test (and is called
++	*test*.check) to facilitate running batch tests and moving that to
++	*test*.right or for just comparison.
++	
++	Globbing turned off on diff in case there is an discrepency and the
++	difference has a pattern character like *.
++
++2002-10-10 08:20  rockyb
++
++	* debugger/tests/run-action: File checked against is now custom for
++	that test (and is called *test*.check) to facilitate running batch
++	tests and moving that to *test*.right or for just comparison.
++
++2002-10-10 08:17  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-io.inc, bashdb-sig.inc,
++	bashdb-stack.inc, tests/Makefile.am, tests/misc.cmd,
++	tests/parm.cmd, tests/parm.tests, tests/run-display: Add parameters
++	in stack trace. And can now refer to $1 $2 $3 in print and eval
++	commands.
++
++2002-10-10 08:06  rockyb
++
++	* debugger/tests/: brkpt2.right, misc.right: Updated for new stack
++	tracing format and $1, $2 evaluation.
++
++2002-10-10 08:05  rockyb
++
++	* debugger/tests/: run-brkpt1, run-brkpt2, run-list, run-misc,
++	run-parm: File checked against is now custom for that test (and is
++	called *test*.check) to facilitate running batch tests and moving
++	that to *test*.right or for just comparison.
++
++2002-10-03 08:40  rockyb
++
++	* debugger/: bashdb-list.inc, tests/search.cmd, tests/search.right:
++	Fix up search command to do the right thing more often. However
++	need to make another pass to match gdb semantics more perfectly. 
++	Save last search pattern and can be repeated if no pattern given.
++
++2002-10-03 01:12  rockyb
++
++	* MANIFEST: Forgot another.
++
++2002-10-03 01:10  rockyb
++
++	* MANIFEST: Forgot one: run-action.
++
++2002-10-03 01:08  rockyb
++
++	* doc/bashdb.texi: Document search.
++
++2002-10-03 01:06  rockyb
++
++	* MANIFEST: Break out list/search routines. Add action and search
++	regression tests.
++
++2002-09-24 13:30  rockyb
++
++	* debugger/: Makefile.am, NEWS, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-help.inc, bashdb-io.inc, bashdb-list.inc, bashdb-main.inc,
++	bashdb-sig.inc, tests/Makefile.am, tests/action.cmd,
++	tests/action.right, tests/action.tests, tests/brkpt1.right,
++	tests/brkpt2.right, tests/run-action, tests/run-search,
++	tests/search.cmd, tests/search.right, tests/search.tests,
++	tests/tbreak.right, tests/watch1.right: Add "search" "reverse"
++	(forward/backward searching) and Perl's "a" (action) commands.
++	bashdb-list.inc split off for the debugger growth.
++
++2002-09-24 12:29  rockyb
++
++	* configure.in: In preparation for yet another release - when I get
++	back from hiking.
++
++2002-09-24 01:26  rockyb
++
++	* debugger/bashdb-help.inc: Add tb to help list.
++
++2002-09-23 18:45  rockyb
++
++	* debugger/NEWS: [no log message]
++
++2002-09-23 18:19  rockyb
++
++	* debugger/NEWS: [no log message]
++
++2002-09-23 18:09  rockyb
++
++	* debugger/NEWS: Make mroe readible.
++
++2002-09-23 17:57  rockyb
++
++	* cvscompile.sh: Spelling typo.
++
++2002-09-23 17:52  rockyb
++
++	* debugger/bashdb.el: Small typo
++
++2002-09-23 17:47  rockyb
++
++	* debugger/bashdb.el: Messed up on author and didn't comment
++	properly.
++
++2002-09-23 17:41  rockyb
++
++	* debugger/MANIFEST: This really isn't used. Autotools rules. (But
++	really we do a make dist in the parent directory.)
++
++2002-09-23 17:39  rockyb
++
++	* MANIFEST: Add display tests.
++
++2002-09-23 17:06  rockyb
++
++	* configure.in: Time for yet another release. (Really should figure
++	out a way to do this by changing another file...)
++
++2002-09-23 09:30  rockyb
++
++	* doc/bashdb.texi: Document display routines. Some unfinished
++	things had been finished Add Masatake YAMATO.
++
++2002-09-23 09:09  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-io.inc, tests/display.right:
++	Change format of display output to identify display number and
++	expression.
++
++2002-09-22 07:40  rockyb
++
++	* debugger/: bashdb-help.inc, tests/Makefile.am, tests/display.cmd,
++	tests/display.right, tests/display.tests, tests/run-display: Add
++	display regression test.  bashdb-help.inc: change lines to
++	linespecs in help. Add missing _bashdb_msg.
++
++2002-09-21 22:46  rockyb
++
++	* debugger/bashdb.el: Don't know how to spell my own name!
++
++2002-09-21 22:35  rockyb
++
++	* debugger/bashdb-help.inc: Add help for display. correct en/dis
++	help to watchpoint and display.
++
++2002-09-21 22:07  rockyb
++
++	* htdocs/index.html: Add Masatake YAMATO's screenshot link.
++
++2002-09-21 22:01  rockyb
++
++	* htdocs/index.html: Adding with g+w.
++
++2002-09-21 22:00  rockyb
++
++	* htdocs/index.html: Remove so I can recreate with g+w.
++
++2002-09-21 21:41  rockyb
++
++	* debugger/: NEWS, TODO, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-help.inc, tests/misc.right: Add gdb's auto display commands
++	(display, undisplay, enable/disable display)
++
++2002-09-21 06:41  rockyb
++
++	* debugger/bashdb-cmds.inc: debug command a tad better -- now
++	allows for command to get run.
++
++2002-09-21 06:17  rockyb
++
++	* debugger/bashdb-cmds.inc: Okay, now get out some of the bugs in
++	the "debug" command.  More work is needed to make this more
++	seamless. (In particular need to skip over execution after debugged
++	execution happens).
++
++2002-09-21 05:50  rockyb
++
++	* debugger/: NEWS, bashdb-cmds.inc, bashdb-sig.inc,
++	tests/tbreak.cmd, tests/tbreak.right: Add provision to debug into a
++	script ("debug" command), and leave script without going back into
++	debugger command loop (BASHDB_QUIT_ON_QUIT environment variable).
++
++2002-09-19 14:50  rockyb
++
++	* builtins/caller.def: Add Perl-like caller function
++
++2002-09-19 14:49  rockyb
++
++	* MANIFEST, builtins/Makefile.in, debugger/NEWS,
++	tests/dbg-support.right, tests/dbg-support.tests: Add caller
++	builtin
++
++2002-09-19 13:01  masata-y
++
++	* debugger/: bashdb-help.inc, bashdb.el: bashdb-help.inc: fix
++	typo(tbreak, down), added [count] in up command's help message. 
++	bashdb.el: added gud-tbreak.
++
++2002-09-19 12:51  masata-y
++
++	* debugger/bashdb.el: added simple comments about how to install
++	bashdb.el.  provided bashdb.
++
++2002-09-19 12:39  masata-y
++
++	* autogen.sh, cvscompile.sh: autogen.sh: invoked bootstrap.sh in
++	the current directory(.).  cvscompile.sh: invoked autogen.sh in the
++	current directory(.).
++
++2002-09-18 23:04  rockyb
++
++	* doc/bashdb.texi: Document tbreak, enable and disable. Remove
++	references to catchpoints.
++
++2002-09-18 22:04  rockyb
++
++	* cvscompile.sh: Basically changed name to autogen.sh. This is for
++	compatibility oniy.
++
++2002-09-18 22:04  rockyb
++
++	* MANIFEST: Add tbreak tests
++
++2002-09-18 22:03  rockyb
++
++	* debugger/tests/: Makefile.am, run-tbreak, tbreak.cmd,
++	tbreak.right, tbreak.tests: Regression test for temporary break:
++	tbreak
++
++2002-09-18 21:37  rockyb
++
++	* debugger/: NEWS, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-help.inc, bashdb-sig.inc, tests/brkpt1.right,
++	tests/brkpt2.right: Add temporary break.
++
++2002-09-18 21:06  rockyb
++
++	* autogen.sh, bootstrap.sh: Creates derived files when starting a
++	CVS project. autogen.sh is bootstrap with an invocation of
++	configure.
++	
++	Names suggested from autotools book of Gary V. Vaughan et. al by
++	way of information provided by Masatake YAMATO.
++
++2002-09-18 21:02  rockyb
++
++	* INSTALL: Update instructions as per information from Masatake
++	YAMATO.
++
++2002-09-18 02:03  rockyb
++
++	* debugger/bashdb-help.inc: Document "break" command change args
++	help linespec in online help where appropriate.
++
++2002-09-17 09:01  rockyb
++
++	* debugger/NEWS: typo.
++
++2002-09-17 08:03  rockyb
++
++	* debugger/NEWS: Last minute additions for version 0.25 - recent
++	doc changes.
++
++2002-09-17 08:00  rockyb
++
++	* configure.in: Get ready for version 0.25.
++
++2002-09-17 08:00  rockyb
++
++	* INSTALL: Modify for debugger-enabled version of bash.
++
++2002-09-17 07:57  rockyb
++
++	* README: Customize for the debug-enabled version of bash. Is more
++	helpful, I think.
++
++2002-09-17 07:56  rockyb
++
++	* debugger/INSTALL: Remove generic instructions and customize for
++	something specific for the debugger. Should be more helpful, I
++	think.
++
++2002-09-17 07:07  rockyb
++
++	* README: Revise for BASH debugger.
++
++2002-09-17 06:54  rockyb
++
++	* MANIFEST: Add new miscellaneous tests.
++
++2002-09-16 17:37  rockyb
++
++	* debugger/: NEWS, bashdb-fns.inc, bashdb-main.inc, bashdb-sig.inc:
++	Move debug trap handler to bashdb-sig.inc and rename it, well,
++	debug_trap_handler.
++	
++	Save restart set parameters and inside set -xv (at least
++	initially).
++
++2002-09-16 17:33  rockyb
++
++	* debugger/tests/: Makefile.am, dbg-test2.sh, misc.cmd, misc.right,
++	misc.tests, prof1.cmd, prof2.cmd, run-misc: Add tests of
++	miscellaneous commands:   source, info args, show args, show
++	warranty, and show copying.
++
++2002-09-14 18:26  rockyb
++
++	* debugger/NEWS: Update.
++
++2002-09-14 18:25  rockyb
++
++	* MANIFEST: Add new brkpt2 tests
++
++2002-09-14 18:24  rockyb
++
++	* doc/bashdb.texi: Change documentation of "info args" and ARG.
++	Reorganize sections a bit so there's more in the command reference.
++	Document _bashdb_ variables.
++
++2002-09-14 18:14  rockyb
++
++	* debugger/bashdb-help.inc: Change info args to match closer gdb.
++	Is now $1, $2 and so on rather than initial program arguments.
++
++2002-09-14 17:54  rockyb
++
++	* debugger/: bashdb-fns.inc, bashdb-main.inc: Now support $1 $2 as
++	${ARG[1}}, ${ARG[2]}.
++
++2002-09-14 17:53  rockyb
++
++	* debugger/tests/: Makefile.am, brkpt1.right, brkpt2.cmd,
++	brkpt2.right, dbg-test1.sh, list.right, watch1.right: Modify
++	dbg-test1.sh so we can test parameters.  In the future though,
++	probably time to start a dbg-test2.sh
++	
++	Makefile.am: add brkpt2 test.
++
++2002-09-14 15:39  rockyb
++
++	* debugger/tests/: brkpt2.cmd, brkpt2.right, brkpt2.tests,
++	run-brkpt2: Now that we have a real command file mechanism, use it
++	to test correct functioning of break, watch, watche, step, next,
++	continue and stack handling.
++
++2002-09-14 14:51  rockyb
++
++	* debugger/bashdb-cmds.inc: Missed place in renaming _hi to
++	_bashdb_hi
++
++2002-09-14 12:19  rockyb
++
++	* debugger/: NEWS, TODO, bashdb, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-init.inc, bashdb-sig.inc: Variable name cleanup: more now
++	start with _bashdb
++
++2002-09-14 12:09  rockyb
++
++	* debugger/bashdb-cmds.inc: Some variable name cleanup and removal.
++
++2002-09-14 11:40  rockyb
++
++	* debugger/bashdb-cmds.inc: Correct "restart" command when running
++	via "bash -c ..."
++
++2002-09-14 07:36  rockyb
++
++	* debugger/: NEWS, bashdb-init.inc, bashdb-io.inc: Small cleanups.
++	BOGUS file renamed to *BOGUS*.
++
++2002-09-14 07:21  rockyb
++
++	* debugger/: bashdb, bashdb-cmds.inc, bashdb-help.inc,
++	bashdb-init.inc, bashdb-main.inc: Clean up code for debugger source
++	command. Add "info source"
++
++2002-09-14 01:09  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-init.inc: Slightly cleaner
++	code.
++
++2002-09-14 00:51  rockyb
++
++	* debugger/: NEWS, bashdb-cmds.inc, bashdb-init.inc: Command files
++	now nest and pick up where they left off in between script
++	execution. There are still some minor cleanups and a small bug here
++	or there.
++
++2002-09-13 23:04  rockyb
++
++	* shell.c, shell.h, variables.c, debugger/bashdb-cmds.inc,
++	debugger/bashdb-fns.inc, debugger/bashdb-init.inc,
++	debugger/bashdb-io.inc: bash --debugger -c "..." now works. (Bug in
++	restarting currently though.  restart now picks up full bash name
++	from BASH environment variable.
++	
++	To accomplish the above, environment variable BASH_EXECUTION_STRING
++	was added which contains the contents what was passed after -c.
++
++2002-09-13 21:38  rockyb
++
++	* error.c: Fix bug when no source file and have an error.
++
++2002-09-13 21:24  rockyb
++
++	* debugger/: NEWS, bashdb-brk.inc: Fix bug where "watche x > 24"
++	was creating output to file 24
++
++2002-09-13 21:23  rockyb
++
++	* debugger/tests/watch1.right: Now, more right.
++
++2002-09-13 15:34  rockyb
++
++	* configure.in, doc/bashdb.texi: Getting ready for 0.24 release.
++
++2002-09-13 15:24  rockyb
++
++	* tests/: func.right, trap.right: Updated for new function.
++
++2002-09-13 15:24  rockyb
++
++	* debugger/tests/: brkpt1.right, list.right: Update for merged
++	commands.
++
++2002-09-13 15:09  rockyb
++
++	* debugger/NEWS: Add: Function names now supported by changing the
++	semantics of declare -F.
++
++2002-09-13 15:09  rockyb
++
++	* builtins/declare.def, doc/bashref.texi: Change semantics of
++	declare -F: now adds source file and line number.
++
++2002-09-13 15:06  rockyb
++
++	* execute_cmd.c, debugger/NEWS, doc/bashdb.texi,
++	tests/dbg-support.right, tests/dbg-support.tests: Function names
++	now supported. As a result, can now set breakpoints on them.
++	However in non-interactive mode the line number is wrong. It is the
++	caller line.
++
++2002-09-13 15:03  rockyb
++
++	* debugger/: TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
++	tests/list.right: Function names now supported. As a result, can
++	now set breakpoints on them.  However in non-interactive mode the
++	line number is wrong. It is the caller line.
++	
++	As a result of the above, now extended these commands to include
++	linespecs: continue, break, list.
++
++2002-09-13 11:12  rockyb
++
++	* debugger/tests/dbg-test1.sh: Remove CVS id line which messes up
++	regression testing.
++
++2002-09-12 18:35  rockyb
++
++	* debugger/tests/: list.cmd, list.right: More tests, better doc on
++	tests.
++
++2002-09-12 18:21  rockyb
++
++	* builtins/evalstring.c: Just doc/grammar changes.
++
++2002-09-12 18:19  rockyb
++
++	* MANIFEST: Add new file: dbg-test1.sub
++
++2002-09-12 18:18  rockyb
++
++	* debugger/: NEWS, bashdb-cmds.inc, bashdb-io.inc: Add list
++	file:line. Rename internal routines from print to list since that's
++	what the command is called.
++
++2002-09-12 18:17  rockyb
++
++	* debugger/tests/dbg-test1.sub: Now have sourced file in debugger
++	test.
++
++2002-09-12 18:16  rockyb
++
++	* debugger/tests/: brkpt1.right, dbg-test1.sh, list.cmd,
++	list.right: Add check of list file:line.
++
++2002-09-12 18:10  rockyb
++
++	* tests/dbg-support.sub: Minor.
++
++2002-09-12 16:17  rockyb
++
++	* debugger/: bashdb-cmds.inc, bashdb-fns.inc: Change names of
++	variables so as not to conflict with user variables.  Thus more of
++	them are prefaced with "_bashdb_." May have introduced a bug in the
++	renaming though...
++
++2002-09-12 16:16  rockyb
++
++	* execute_cmd.c: List lines in "for var in" before each time it is
++	executed rather than just once. Line number setting also tries to
++	do the right thing so that error messages on the line are reported
++	correctly too.
++
++2002-09-12 16:10  rockyb
++
++	* tests/dbg-support.right: Make sure "for word in ..." gives line
++	number of "for" every time the for loop is executed, not just the
++	*first* time.
++
++2002-09-12 16:09  rockyb
++
++	* tests/: errors.right, errors.tests: Add checks on errors in "for
++	word in ..." loops. Should have line number of "for"
++
++2002-09-12 06:50  rockyb
++
++	* tests/: dbg-support.right, dbg-support.tests: Check that we list
++	a "for" line number.
++
++2002-09-12 06:44  rockyb
++
++	* command.h, execute_cmd.c, make_cmd.c, make_cmd.h, parse.y,
++	debugger/NEWS, debugger/TODO: Now list/stop line of "for" or
++	"select".
++
++2002-09-12 06:41  rockyb
++
++	* doc/bashdb.texi: Minor.
++
++2002-09-12 06:40  rockyb
++
++	* MANIFEST: Remove brkpt tests - usable ones under debugger/tests
++
++2002-09-11 22:36  rockyb
++
++	* debugger/TODO: Note more line number problems.
++
++2002-09-11 22:36  rockyb
++
++	* debugger/bashdb-sig.inc: Add cmd-loop loop in exit handler so we
++	in fact don't exit!
++
++2002-09-11 22:13  rockyb
++
++	* debugger/bashdb-fns.inc: Don't go into debugger command loop when
++	called from the debugger: (the caller is _bashdb_).
++
++2002-09-11 19:32  rockyb
++
++	* htdocs/index.html: Now list download by date descending.
++
++2002-09-11 18:40  rockyb
++
++	* doc/bashdb.texi: Small grammar change.
++
++2002-09-11 18:33  rockyb
++
++	* htdocs/index.html: Add link to documentation.
++
++2002-09-11 17:24  rockyb
++
++	* tests/: brkpt.right, brkpt.tests, brkpt1.test, brkpt2.test,
++	brkpt3.test, brkpt4.test, brkpt5.test, run-brkpt: Some of these are
++	now in debugger/tests
++
++2002-09-11 17:12  rockyb
++
++	* MANIFEST, configure.in: Getting ready for release 0.23
++
++2002-09-11 08:43  rockyb
++
++	* doc/bashdb.texi: Document recent changes to debugger:   W suffix
++	on breakpoint/watchpoint numbers,   break file:line   Condition
++	9999.
++
++2002-09-11 07:39  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-fns.inc, bashdb-init.inc,
++	tests/brkpt1.cmd, tests/brkpt1.right, tests/watch1.right: Add break
++	file:line syntax. Add counts on watchpoints and display of this on
++	listing. Display breakpoint number when adding.  i
++
++2002-09-11 07:38  rockyb
++
++	* debugger/NEWS: Version 0.23 changes (so far)
++
++2002-09-11 00:36  rockyb
++
++	* debugger/bashdb-cmds.inc: Make safe for tampering with IFS.
++
++2002-09-10 13:29  rockyb
++
++	* debugger/tests/: list.cmd, list.right: Add tests of set/show
++	listsize.
++
++2002-09-10 13:25  rockyb
++
++	* debugger/bashdb-cmds.inc: Fix bug in comment without space after
++	#, e.g. #foo.
++
++2002-09-10 13:13  rockyb
++
++	* debugger/bashdb-cmds.inc: Improve comment pattern so "#foo" works
++	as does "# foo."
++
++2002-09-10 12:53  rockyb
++
++	* debugger/tests/Makefile.am: Add watch1 test.
++
++2002-09-10 12:49  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc: Bugs fixed in getting
++	watch command regression tests hammered out;   eval now checks for
++	tty, listing watchpoints quotes expressions.
++
++2002-09-10 12:40  rockyb
++
++	* debugger/tests/: run-watch1, watch1.cmd, watch1.right,
++	watch1.tests: Add first watchpoint tests (enough that we can handle
++	with incomplete command files).
++
++2002-09-10 11:47  rockyb
++
++	* debugger/TODO: Cross a couple of things off the list.
++
++2002-09-10 11:39  rockyb
++
++	* Makefile.in: Make check now runs check in debugger as well.
++
++2002-09-10 11:02  rockyb
++
++	* debugger/bashdb-brk.inc: Test to see that line breaks are inside
++	lines Remove bug in not setting break condition correctly.  Message
++	if no breakpoints have been set.
++
++2002-09-10 11:00  rockyb
++
++	* debugger/bashdb-cmds.inc: More crud in comments.
++
++2002-09-10 10:59  rockyb
++
++	* debugger/bashdb-cmds.inc: Removed some crud.
++
++2002-09-10 10:58  rockyb
++
++	* debugger/bashdb-cmds.inc: Rename to _bashdb_cmd_break to be
++	consistent in naming.
++
++2002-09-10 10:56  rockyb
++
++	* debugger/tests/: Makefile.am, brkpt1.cmd, brkpt1.right,
++	brkpt1.tests, run-brkpt1: Add breakpoint tests - or those that we
++	can test out right now...
++
++2002-09-10 10:55  rockyb
++
++	* debugger/tests/list.tests: More generic format.
++
++2002-09-10 09:47  rockyb
++
++	* tests/: dbg-list.right, dbg-list.tests, list.cmd, run-dbg-list:
++	Now located under debugger/tests
++
++2002-09-10 09:08  rockyb
++
++	* debugger/: Makefile.am, configure.in: Add support to create/run
++	regression tests in tests directory.
++
++2002-09-10 09:07  rockyb
++
++	* debugger/tests/.cvsignore: A fact of life.
++
++2002-09-10 09:06  rockyb
++
++	* debugger/tests/: Makefile.am, dbg-test1.sh, list.cmd, list.right,
++	list.tests, run-all, run-list, version: Debugger tests are now
++	separated from bash tests, so we can test that separately. And we
++	now use automake's code too!
++
++2002-09-10 00:06  rockyb
++
++	* doc/bashdb.texi: Remove some more gdb things with respect to I/O
++	redirection that just aren't here.
++
++2002-09-09 23:12  rockyb
++
++	* doc/bashdb.texi: More on the differences between x, eval and
++	print. Clean up some ugly grammar.
++
++2002-09-09 22:50  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc: Enable/disable of
++	watchpoints done. delete, enable and disable will allow suffix "w"
++	for watchpoint.
++
++2002-09-09 20:55  rockyb
++
++	* debugger/bashdb-help.inc: Add help for set command. Minor text
++	changes.
++
++2002-09-09 19:45  rockyb
++
++	* debugger/NEWS: Add case statement work.
++
++2002-09-09 19:41  rockyb
++
++	* .cvsignore: This too is (now) derived.
++
++2002-09-09 19:41  rockyb
++
++	* parse.y, tests/dbg-support.right, tests/dbg-support.tests: Wasn't
++	handling nested cases.
++
++2002-09-09 19:09  rockyb
++
++	* debugger/TODO: Update as appropriate.
++
++2002-09-09 19:02  rockyb
++
++	* debugger/TODO: Update as appropriate.
++
++2002-09-09 19:01  rockyb
++
++	* tests/: dbg-list.right, dbg-list.tests: Tests debugger list
++	command.
++
++2002-09-09 19:00  rockyb
++
++	* tests/: list.cmd, run-dbg-list: Test debugger list command.
++
++2002-09-09 18:59  rockyb
++
++	* command.h, execute_cmd.c, make_cmd.c, make_cmd.h, parse.y,
++	tests/dbg-support.right, tests/dbg-support.tests: Add line number
++	for beginning of case/select; debug now lists those lines.
++
++2002-09-09 18:56  rockyb
++
++	* tests/: brkpt.right, brkpt1.test, brkpt3.test, brkpt4.test,
++	brkpt5.test: Modify for current situation. These need to be redone
++	since they're wrong anyway. Split out status dbg tests?
++
++2002-09-09 17:16  rockyb
++
++	* Makefile.in: Add rule  to make derived aclocal.m4.
++	
++	Should get rid of Makefile.in and go with Makefile.am. But this
++	diverges bash even more.
++
++2002-09-09 14:26  rockyb
++
++	* MANIFEST: Add new file bashlocal.m4
++
++2002-09-09 14:25  rockyb
++
++	* bashlocal.m4, configure.in, cvscompile.sh: Add --lispdir to
++	configure and pass this along to debugger.  Derived file aclocal.m4
++	no longer in repository. BASH-specific macros moved to bashlocal.m4
++
++2002-09-09 12:58  rockyb
++
++	* cvscompile.sh: Also need to run aclocal.
++
++2002-09-09 12:50  rockyb
++
++	* cvscompile.sh: Add missing debugger autoconf.
++
++2002-09-09 12:39  rockyb
++
++	* MANIFEST, cvscompile.sh, debugger/Makefile.am, debugger/TODO,
++	debugger/configure.in: Use Automake AM_LISPDIR rather than trying
++	to roll this code on my own (and failing). Thanks to Masatake
++	YAMATO!
++
++2002-09-09 12:37  rockyb
++
++	* debugger/NEWS: Add 0.22 features.
++
++2002-09-09 12:27  rockyb
++
++	* doc/bashdb.texi: Document watche. Put more command names in info
++	nodes. Move doc order around a little.
++
++2002-09-09 12:22  rockyb
++
++	* htdocs/index.html: Project page now points to Sourceforge
++	Summary, not Admin.  Thanks to Masatake YAMATO.
++
++2002-09-08 18:57  rockyb
++
++	* debugger/bashdb-set.inc: Set/show commands
++
++2002-09-07 14:43  rockyb
++
++	* doc/bashdb.texi: Doc frame command. Small corrections to editing
++	in emacs.
++
++2002-09-07 14:41  rockyb
++
++	* debugger/bashdb-cmds.inc: Add frame command. Version command is
++	now a separate command.
++
++2002-09-07 14:35  rockyb
++
++	* debugger/bashdb-stack.inc: Get frame with args command hammered
++	out properly.
++
++2002-09-07 09:36  rockyb
++
++	* debugger/bashdb-io.inc: Some error correction and error message
++	on list command.
++
++2002-09-07 09:35  rockyb
++
++	* debugger/bashdb-cmds.inc: Ooops - forgot to allow set/show as
++	valid commands here. Move CVS Id to end.
++
++2002-09-07 09:09  rockyb
++
++	* MANIFEST, configure.in, debugger/Makefile.am,
++	debugger/bashdb-cmds.inc, debugger/bashdb-fns.inc,
++	debugger/bashdb-help.inc, debugger/bashdb-init.inc,
++	debugger/bashdb-io.inc, debugger/bashdb-main.inc, doc/bashdb.texi:
++	Start set/show commands.  List now takes up where it left off. 
++	Move some CVS id lines to the end to facilitate debugging Some
++	minor improvements.
++
++2002-09-06 03:06  rockyb
++
++	* debugger/: bashdb-brk.inc, bashdb-help.inc, bashdb-main.inc:
++	Minor formating changes or typos.
++
++2002-09-06 01:59  rockyb
++
++	* configure.in: Release change
++
++2002-09-06 01:56  rockyb
++
++	* debugger/Makefile.am: Include new guy bashdb-sig.inc.
++
++2002-09-06 00:52  rockyb
++
++	* doc/bashdb.texi: Today's update. All sections are at least
++	minimally done, so Manual minimally finished.
++
++2002-09-05 22:39  rockyb
++
++	* MANIFEST, debugger/bashdb-cmds.inc, debugger/bashdb-main.inc,
++	debugger/bashdb-sig.inc, tests/brkpt.right: Add signal handlers for
++	interrupt and exit. Now we catch when the program stopped and
++	report that.
++
++2002-09-05 22:37  rockyb
++
++	* debugger/TODO: Update as appropriate.
++
++2002-09-05 10:54  rockyb
++
++	* debugger/bashdb-main.inc: Slightly better?
++
++2002-09-05 10:53  rockyb
++
++	* debugger/bashdb-main.inc: Test to see if we are using a
++	debugger-enabled bash, and give up if not.
++
++2002-09-05 09:54  rockyb
++
++	* doc/bashdb.texi: Closer...
++
++2002-09-05 08:56  rockyb
++
++	* debugger/bashdb-brk.inc: Add null line + if in break command.
++
++2002-09-05 08:55  rockyb
++
++	* tests/: brkpt.right, brkpt2.test: Add test for null line + if
++	"break if" command
++
++2002-09-05 00:47  rockyb
++
++	* MANIFEST: Add in debugger breakpoint regression test.
++
++2002-09-05 00:47  rockyb
++
++	* tests/brkpt.tests: Put debugger bash in explicitly.
++
++2002-09-05 00:27  rockyb
++
++	* tests/run-all: To make work on Solaris's (and probably other's)
++	/bin/sh.
++
++2002-09-04 23:31  rockyb
++
++	* htdocs/index.html: Slight mods. Still plain as sin.
++
++2002-09-04 23:25  rockyb
++
++	* htdocs/index.html: Run through ispell.
++
++2002-09-04 23:22  rockyb
++
++	* htdocs/index.html: Correct group id.
++
++2002-09-04 23:10  rockyb
++
++	* htdocs/index.html: Lousy Web page.
++
++2002-09-04 22:24  rockyb
++
++	* debugger/TODO: Update.
++
++2002-09-04 22:12  rockyb
++
++	* configure.in: Rename release name.
++
++2002-09-04 22:11  rockyb
++
++	* tests/: bashdb-bp.tests, brkpt.right, brkpt.tests, brkpt1.test,
++	brkpt2.test, brkpt3.test, brkpt4.test, brkpt5.test, run-brkpt:
++	Regression tests for breakpoint. Actually the "right" file isn't
++	right due to a bug in debugger comand-file processing. However it
++	is largely right and this keeps us from breaking things even more.
++
++2002-09-04 22:09  rockyb
++
++	* tests/: run-dbg-is-fn, run-dbg-support: Just #!../bash lines and
++	perhaps clue Emacs in that these are scripts.
++
++2002-09-04 22:08  rockyb
++
++	* debugger/: bashdb, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-fns.inc, bashdb-help.inc, bashdb-init.inc, bashdb-io.inc:
++	Redo the way breakpoints are handled. Is more like gdb than
++	perltdb.
++	
++	Now have enable/disable and breakpoint conditions.
++	
++	Some other minor changes. Like testing to see if we have an
++	attached tty.
++
++2002-09-03 13:49  rockyb
++
++	* MANIFEST: We install as bash.info, not bashref.
++
++2002-09-03 13:47  rockyb
++
++	* doc/bashdb.texi: Minor corrections. Mostly to options-processing
++	area.
++
++2002-09-03 13:22  rockyb
++
++	* debugger/bashdb: Change option -s to -q as it is in gdb.
++
++2002-09-03 13:09  rockyb
++
++	* doc/.cvsignore: Forgot yet another...
++
++2002-09-03 13:08  rockyb
++
++	* doc/.cvsignore: Boy, doc's have lots of temporary files!
++
++2002-09-03 13:00  rockyb
++
++	* cvscompile.sh: Script for kicking everything off from CVS
++	initially.
++
++2002-09-03 12:47  rockyb
++
++	* debugger/: bashdb, bashdb-init.inc: Add more options - x: command
++	file run, n: no init file run, -V show version, and -s silient. All
++	compatible with GDB.
++
++2002-09-03 12:36  rockyb
++
++	* debugger/bashdb-help.inc: Minor change to refer to doc.
++
++2002-09-03 12:35  rockyb
++
++	* doc/fdl.texi: Perhaps should not be in CVS since I didn't write.
++	But it is part of distribution. Remove later if can figure out a
++	way to get it from somewhere else.
++
++2002-09-03 12:34  rockyb
++
++	* doc/gpl.texi: Perhaps should not be in CVS since I didn't write.
++	However it is part of distribution. Remove later if can figure out
++	a better way.
++
++2002-09-03 12:30  rockyb
++
++	* debugger/Makefile.am: Add newly-created file bashdb-io.inc
++
++2002-09-03 12:28  rockyb
++
++	* MANIFEST: Add missing files to make bashdb.texi documentation and
++	build debugger.
++
++2002-09-03 12:25  rockyb
++
++	* doc/Makefile.in: Incorrectly spelled directory in TEXINPUTS. Now
++	should build bashdb.texi correctly.
++
++2002-09-03 07:25  rocky
++
++	* .cvsignore: Ignore distribution file.
++
++2002-09-03 07:24  rocky
++
++	* Makefile.in: Remove distribution tar.gz file. Also tilde files
++	(from CVS checkouts).
++
++2002-09-03 07:22  rocky
++
++	* doc/.cvsignore: Many derived files here.
++
++2002-09-03 07:18  rocky
++
++	* MANIFEST: Add missing files for making a distribution.
++
++2002-09-03 07:00  rocky
++
++	* tests/errors.right: Previous version was completely bogus.
++
++2002-09-02 23:22  rocky
++
++	* doc/bashdb.texi: Changes for today: sections reorganized, gdb
++	stuff chopped out. Now has a command index. And text modified for
++	the BASH debugger.
++	
++	About 2/3 of the way correct.
++
++2002-09-02 23:19  rocky
++
++	* doc/Makefile.in: Change to allow automatic build of bashdb doc.
++
++2002-09-02 23:18  rocky
++
++	* support/texi2dvi: Perhaps shouldn't be in CVS, but do so for now.
++
++2002-09-02 23:18  rocky
++
++	* support/man2html: Perhaps shouldn't be in CVS - but do so for
++	now...x
++
++2002-09-02 23:17  rocky
++
++	* support/Makefile.in: Add missing CC_FOR_BUILD
++
++2002-09-02 22:37  rocky
++
++	* debugger/: TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-help.inc, bashdb-init.inc, bashdb-io.inc, bashdb-main.inc,
++	bashdb-stack.inc: Major cleanup/expansion and a
++	bug/misunderstanding removed. Now reads in files once. Unset
++	breakpoint code no longer inlined. "info files" now works Stack
++	trace bug when via "info stack" fixed. bashdb-io.inc created.
++
++2002-09-02 15:29  rocky
++
++	* debugger/: bashdb, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-fns.inc, bashdb-help.inc, bashdb-init.inc: Add info command.
++	In the process, we now	allow getting tty and args.
++
++2002-09-02 00:36  rocky
++
++	* support/: mkdist, texi2html: Not sure if this should be here. For
++	now okay.
++
++2002-09-02 00:36  rocky
++
++	* MANIFEST: Add more good stuff like the bashdb reference.
++
++2002-09-02 00:35  rocky
++
++	* debugger/TODO: Revise as appropriate.
++
++2002-09-02 00:32  rocky
++
++	* doc/bashdb.texi: [no log message]
++
++2002-09-02 00:29  rocky
++
++	* doc/bashdb.texi: Grossly inaccurate but there's stuff in here
++	that is in fact correct.  More later...
++
++2002-09-02 00:28  rocky
++
++	* debugger/bashdb-help.inc: Update to reflect current situation.
++
++2002-09-02 00:16  rocky
++
++	* debugger/: bashdb-cmds.inc, bashdb-help.inc, bashdb-stack.inc:
++	Add bt backtrace as an alias for where, or T. Add parameter to
++	specify how many frames to list on bt.
++
++2002-09-01 19:57  rocky
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-stack.inc:
++	Mostly formatting. Change basic indent from 4 to 2. Stack commands
++	were duplicated in bashdb-cmds.inc, and a file identifier incorrect
++	in bashdb-brk.inc
++
++2002-09-01 11:05  rocky
++
++	* debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-help.inc, bashdb-main.inc: Minor: correct function comments
++	at top of file.
++
++2002-09-01 11:05  rocky
++
++	* debugger/Makefile.am: Break into more smaller files.
++
++2002-09-01 11:04  rocky
++
++	* debugger/bashdb-stack.inc: Break away from bashdb-cmds.inc
++
++2002-09-01 10:41  rocky
++
++	* debugger/bashdb-brk.inc: Things with breakpoints are now in a
++	separate file.
++
++2002-09-01 10:40  rocky
++
++	* debugger/bashdb-help.inc: Things with breakpoints and watchpoints
++	(and later actions) are now their own separate file
++
++2002-09-01 10:39  rocky
++
++	* debugger/bashdb-help.inc: Help is now it's own separate file.
++
++2002-09-01 05:46  rocky
++
++	* MANIFEST: Add debugger files
++
++2002-09-01 05:32  rocky
++
++	* debugger/: bashdb-cmds.inc, bashdb-fns.inc: Change pe to x. On
++	watch, set initial value (and display it).  Allow dump of variable.
++	Add internal function _is_var.
++
++2002-09-01 04:08  rocky
++
++	* debugger/bashdb-fns.inc: Separate watch variables from watch
++	expressions
++
++2002-09-01 04:07  rocky
++
++	* debugger/bashdb-init.inc: Add array to note if watchpoint is
++	arithmetic or not.
++
++2002-09-01 04:06  rocky
++
++	* debugger/bashdb-cmds.inc: Separate out watch variable and watch
++	expressions.
++
++2002-09-01 02:47  rocky
++
++	* debugger/bashdb-init.inc: Set default next/step default value.
++
++2002-08-31 23:34  rocky
++
++	* debugger/: bashdb-cmds.inc, bashdb-init.inc: Make more like gdb.
++	Implement aliases: run, shell. Add Init file startup ~.bashdbinit.
++	Save args on print and pe.
++
++2002-08-30 22:33  rocky
++
++	* tests/: dbg-support.right, dbg-support.tests: Add tests to make
++	sure command substitution traces properly and produces the correct
++	call stack.
++
++2002-08-30 22:31  rocky
++
++	* tests/: errors.right, errors.sub, errors.tests: Add tests that
++	make sure sourced file names appear.
++
++2002-08-30 20:44  rocky
++
++	* error.c: Now correctly reports the file location in the presence
++	of sourced files.
++
++2002-08-30 20:44  rocky
++
++	* debugger/CHANGES: Note watchpoints, and line number changes.
++
++2002-08-30 16:17  rocky
++
++	* debugger/: bashdb-cmds.inc, bashdb-fns.inc: Small cleanups.
++	Remove function break code which doesn't work anyway.
++
++2002-08-30 12:46  rocky
++
++	* debugger/: bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: Add
++	watchpoints. Help and commands now allow unique prefix, e.g. del
++	for delete.
++
++2002-08-30 12:20  rocky
++
++	* debugger/AUTHORS: Again.
++
++2002-08-30 12:18  rocky
++
++	* debugger/AUTHORS: More precies.
++
++2002-08-30 12:18  rocky
++
++	* subst.c: Reset line number if interactive.
++
++2002-08-30 12:17  rocky
++
++	* trap.c: Respect function tracing if "set -o fntrace is in
++	effect."
++
++2002-08-30 00:55  rocky
++
++	* debugger/TODO: Add watchpoints as requested by Bert Caridad.
++
++2002-08-28 23:27  rocky
++
++	* builtins/fc.def: Added new extra parameter (renumber_line) on
++	parse_and_execute.
++
++2002-08-27 20:56  rocky
++
++	* debugger/bashdb-cmds.inc: Fixed bug Inadvertently added by change
++	\? to ?. (Is now '?') to help emacs script editing.
++
++2002-08-27 20:52  rocky
++
++	* debugger/bashdb-cmds.inc: Doc continue enhancement.
++
++2002-08-27 20:51  rocky
++
++	* debugger/: bashdb-cmds.inc, bashdb-fns.inc: clearing breakpoints
++	now works via a workaround.
++
++2002-08-27 20:48  rocky
++
++	* debugger/TODO: Update to reflect current situation.
++
++2002-08-26 23:53  rocky
++
++	* debugger/TODO: Did "up" and "down" - remove from list.
++
++2002-08-26 23:52  rocky
++
++	* debugger/bashdb.el: Add back in "up" and "down" which we have
++	(but perldb doesn't).
++
++2002-08-26 23:51  rocky
++
++	* debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-init.inc: "Up [count} and down {count] working. Stack trace
++	is now more like gdb than perl. Probably will move more in that
++	direction, too.
++	
++	Note: There may be some funniness in FUNCNAME BASH_SOURCE and
++	BASH_LINENO.
++
++2002-08-26 09:22  rocky
++
++	* debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-init.inc: S !pat now works. Some alphabetization of commands
++	and more subroutings in bashdb-cmds start _bashdb_cmd_. init Has
++	where we are in stack for getting ready to put in up and down.
++
++2002-08-26 09:20  rocky
++
++	* debugger/TODO: Update.
++
++2002-08-26 09:20  rocky
++
++	* debugger/NEWS: More features - note that we're useful even if you
++	don't use the debugger.
++
++2002-08-26 08:06  rocky
++
++	* debugger/bashdb-cmds.inc: This time, for sure!
++
++2002-08-26 08:05  rocky
++
++	* debugger/bashdb-cmds.inc: - now lists up to _curline Bug in
++	restart for bash --debugger
++
++2002-08-26 06:55  rocky
++
++	* debugger/bashdb: Minor changes.
++
++2002-08-26 05:45  rocky
++
++	* builtins/evalstring.c, debugger/CHANGES, debugger/TODO,
++	tests/errors.right: Fix off-by-one line number error in command
++	subtitutions $(), `` and {}.
++
++2002-08-25 23:10  rocky
++
++	* debugger/bashdb-cmds.inc: Help for individual commands.
++
++2002-08-25 23:09  rocky
++
++	* debugger/TODO: Added emacs lisp install. help on commands and
++	fixed substutution line numbers.
++
++2002-08-25 23:08  rocky
++
++	* debugger/: .cvsignore, Makefile.am, configure.in: batch-compile
++	and install emacs lisp files. (First cut: no doubt there's room for
++	improvement.)
++
++2002-08-25 20:27  rocky
++
++	* debugger/bashdb-cmds.inc: A couple more.
++
++2002-08-25 20:17  rocky
++
++	* debugger/bashdb-cmds.inc: Add long-form of commands.
++
++2002-08-25 20:17  rocky
++
++	* debugger/bashdb: Replace a [ with [[
++
++2002-08-25 17:50  rocky
++
++	* debugger/CHANGES: Note line number change in command
++	substitution.
++
++2002-08-25 17:42  rocky
++
++	* bashline.c, jobs.c, parse.y, shell.c, subst.c, trap.c,
++	variables.c, builtins/common.h, builtins/eval.def,
++	builtins/evalfile.c, builtins/evalstring.c: Line number fix on
++	sourced files and command substitution.  Added additional parameter
++	to parse_and_execute to indicate whether or not to reset the line
++	number.
++
++2002-08-25 17:23  rocky
++
++	* tests/dbg-support.right: Really this is the same as version 1.3.
++	Changes in output were really bugs! Sourced file needs line number
++	resetting.
++
++2002-08-25 16:12  rocky
++
++	* tests/dbg-support.tests: A couple more command substitution tests
++	and comments.
++
++2002-08-25 13:56  rocky
++
++	* tests/: dbg-support.right, dbg-support.tests, errors.right:
++	Update for line number change in running subshells.
++
++2002-08-25 13:13  rocky
++
++	* builtins/evalstring.c: Don't reset line number in running
++	subshells. This makes it hard for a debugger to track down where
++	you were.
++	
++	Would like to understand the benefit of this though.
++
++2002-08-25 12:14  rocky
++
++	* doc/.cvsignore: add another derived file.
++
++2002-08-25 12:13  rocky
++
++	* debugger/TODO: Another bug with subshells found.
++
++2002-08-25 09:58  rocky
++
++	* Makefile.in: Remake pathnames.h if it is missing
++
++2002-08-25 09:58  rocky
++
++	* debugger/: TODO, bashdb-cmds.inc: Fix restart in bash --debugger
++
++2002-08-25 02:18  rocky
++
++	* debugger/: bashdb, bashdb-cmds.inc, bashdb-init.inc,
++	bashdb-main.inc: Minor variable name corrections and changes.
++	Mostly to do with version command. Typo in bashdb.
++
++2002-08-25 02:04  rocky
++
++	* configure.in, debugger/AUTHORS, debugger/Makefile.am,
++	debugger/PERMISSION, debugger/TODO, debugger/bashdb,
++	debugger/bashdb-cmds.inc, debugger/bashdb-fns.inc,
++	debugger/bashdb-init.inc, debugger/bashdb-main.inc: Last minute
++	cleanups before initial Savannah CVS import.
++
++2002-08-24 18:13  rocky
++
++	* debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc: Mostly small
++	extensions to make this match perl5db:	- Add Subroutine list (S) 
++	- Add list functions (l func)  - Add variable dump (V)	- Note
++	where we haven't finished implementing parameters  - Fix help
++	
++	bashdb: rename functions to more system-like names (so won't appear
++	in function list)
++
++2002-08-24 18:08  rocky
++
++	* debugger/: TODO, NEWS: Update as appropriate.
++
++2002-08-24 16:57  rocky
++
++	* tests/: dbg-fns, dbg-fns.dat, dbg-is-fn.right, dbg-is-fn.tests,
++	dbg-support.right, run-dbg-is-fn: New tests: dbg-is-fn. Correct
++	output on dbg-support.right and set up for another new test
++
++2002-08-24 16:51  rocky
++
++	* tests/: dbg-support.right, dbg-support.tests, run-dbg-support:
++	CVS cleanup: add CVS Id line.  Correct ooutput and allow tests to
++	be executable as is.
++
++2002-08-24 00:58  rocky
++
++	* debugger/TODO: Fixed "continue"
++
++2002-08-24 00:55  rocky
++
++	* debugger/: bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc:
++	Breakpoints now work! setting, deleting, clearing all, listing.
++
++2002-08-23 14:15  rocky
++
++	* debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc: CVS cleanup:
++	add CVS lines
++
++2002-08-23 14:13  rocky
++
++	* debugger/bashdb-fns.inc: Command "Continue" ('c") now runs
++	silently.
++
++2002-08-23 14:11  rocky
++
++	* .cvsignore: More of the same.
++
++2002-08-23 12:16  rocky
++
++	* tests/: dbg-support.right, dbg-support.sub, dbg-support.tests,
++	run-dbg-support: Debugging extensions to bash test.
++
++2002-08-23 08:39  rocky
++
++	* tests/.cvsignore: The usual.
++
++2002-08-23 08:35  rocky
++
++	* .cvsignore, builtins/.cvsignore: CVS cleanup.
++
++2002-08-23 08:31  rocky
++
++	* lib/: tilde/.cvsignore, sh/.cvsignore: The usual.
++
++2002-08-23 08:30  rocky
++
++	* lib/termcap/.cvsignore: This usual.
++
++2002-08-23 08:27  rocky
++
++	* .cvsignore, lib/readline/.cvsignore, lib/readline/doc/Makefile,
++	support/texi2dvi, support/texi2html: CVS cleanup.
++
++2002-08-23 08:22  rocky
++
++	* shell.c: Move execution of debugger init after setting up
++	argument list $0 and $*.
++
++2002-08-23 07:57  rocky
++
++	* debugger/: TODO, bashdb, bashdb-fns.inc, bashdb-init.inc: Get
++	dual execution of "bashdb" and "bash --debugger" with respect to
++	command-line arguments. In bashdb however, $0 is bashdb not the
++	program.
++
++2002-08-23 07:56  rocky
++
++	* debugger/bashdb.el: Remove looking for "--emacs" option in
++	calling bashdb. This is used in perldb but I don't know if we need
++	it here. It might get added later when we know what this is about
++	and decide it's necessary.
++
++2002-08-23 00:19  rocky
++
++	* examples/loadables/.cvsignore,
++	examples/loadables/perl/.cvsignore, lib/.cvsignore,
++	lib/glob/.cvsignore, lib/malloc/.cvsignore: The usual.
++
++2002-08-23 00:18  rocky
++
++	* doc/.cvsignore: The usual
++
++2002-08-23 00:17  rocky
++
++	* .cvsignore, array.h, command.h, configure.in, flags.h,
++	pathnames.h.in, shell.c, variables.h, builtins/evalfile.c,
++	builtins/source.def, doc/bashref.texi: "bash --debugger" now kicks
++	things off.
++
++2002-08-23 00:13  rocky
++
++	* .cvsignore, builtins/.cvsignore, support/.cvsignore,
++	examples/.cvsignore: The usual.
++
++2002-08-23 00:08  rocky
++
++	* debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-init.inc, bashdb-main.inc, bashdb.el: Changes so that we can
++	support "bash --debugger"
++
++2002-08-22 23:29  rocky
++
++	* debugger/: CHANGES, TODO: Update to reflect current state of
++	things.
++
++2002-08-22 08:13  rocky
++
++	* debugger/bashdb: _cleanup -> _bashdb_cleanup
++
++2002-08-22 08:03  rocky
++
++	* debugger/bashdb: Bug: not handling -T correctly. Also add emacs
++	mode.
++
++2002-08-22 07:58  rocky
++
++	* debugger/: Makefile.am, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-init.inc, bashdb-main.inc: Split bashdb-fns into multiple
++	*.inc files
++
++2002-08-22 07:56  rocky
++
++	* debugger/.cvsignore: Yet more of the usual ignored files...
++
++2002-08-22 07:54  rocky
++
++	* debugger/.cvsignore: CVS: Useful file.
++
++2002-08-21 19:53  rocky
++
++	* debugger/: CHANGES, bashdb, bashdb-main.inc: Now source the file
++	to be debugged rather than use that hacky temp file.  x
++
++2002-08-20 13:48  rocky
++
++	* Makefile.in: Include debugger in installing
++
++2002-08-20 12:56  rocky
++
++	* tests/array.right: add BASH_LINENO
++
++2002-08-20 12:17  rocky
++
++	* tests/: array.right, run-all, shopt.right: Revise for new
++	options.  run-all now allows running a specified set of tests
++
++2002-08-20 12:15  rocky
++
++	* builtins/set.def: Add fntrace or -d option
++
++2002-08-20 12:14  rocky
++
++	* array.c, execute_cmd.c, flags.c, make_cmd.c, shell.c,
++	variables.c, builtins/evalfile.c: Add BASH_LINENO, BASH_SOURCE_FILE
++	arrays Turn FUNCNAME into an ARRAY.  Add fntrace or -d set option
++
++2002-08-20 12:10  rocky
++
++	* debugger/: bashdb, bashdb-main.inc: Bogosity in assuming
++	single-file script removed.  Now tracks source file correctly (in
++	conjunction with changes in bash)
++
++2002-08-20 12:08  rocky
++
++	* debugger/bashdb.el: [no log message]
++
++2002-08-20 12:07  rocky
++
++	* debugger/bashdb.el: Add GPL
++
++2002-08-20 12:05  rocky
++
++	* debugger/README: Add CVS id line
++
++2002-08-20 12:05  rocky
++
++	* debugger/README: No longer a modification but a rewrite. Note
++	that bashdb now requires my patches.
++
++2002-08-20 12:04  rocky
++
++	* debugger/: AUTHORS, CHANGES, COPYING, ChangeLog, INSTALL,
++	Makefile.am, NEWS, TODO, configure.in: Automake'd and autoconf'd
++
++2002-08-20 11:34  rocky
++
++	* debugger/bashdb-main.inc: Add stack trace.  Some typos corrected.
++
++2002-08-20 11:31  rocky
++
++	* debugger/bashdb-main.inc: Add GPL
++
++2002-08-20 11:16  rocky
++
++	* AUTHORS, CHANGES, COMPAT, COPYING, INSTALL, MANIFEST,
++	Makefile.in, NEWS, NOTES, POSIX, RBASH, README, Y2K, alias.c,
++	alias.h, array.c, array.h, arrayfunc.c, arrayfunc.h, bashansi.h,
++	bashhist.c, bashhist.h, bashintl.h, bashjmp.h, bashline.c,
++	bashline.h, bashtypes.h, bracecomp.c, braces.c, builtins.h,
++	command.h, config-bot.h, config-top.h, config.h.in, configure.in,
++	conftypes.h, copy_cmd.c, dispose_cmd.c, dispose_cmd.h, error.c,
++	error.h, eval.c, execute_cmd.c, execute_cmd.h, expr.c, externs.h,
++	findcmd.c, findcmd.h, flags.c, flags.h, general.c, general.h,
++	hashcmd.c, hashcmd.h, hashlib.c, hashlib.h, input.c, input.h,
++	jobs.c, jobs.h, list.c, locale.c, mailcheck.c, mailcheck.h,
++	make_cmd.c, make_cmd.h, mksyntax.c, nojobs.c, parse.y, parser.h,
++	patchlevel.h, pathexp.c, pathexp.h, pcomplete.c, pcomplete.h,
++	pcomplib.c, print_cmd.c, quit.h, redir.c, redir.h, shell.c,
++	shell.h, sig.c, sig.h, siglist.c, siglist.h, stringlib.c, subst.c,
++	subst.h, syntax.h, test.c, test.h, trap.c, trap.h, unwind_prot.c,
++	unwind_prot.h, variables.c, variables.h, version.c, xmalloc.c,
++	xmalloc.h, CWRU/PLATFORMS, CWRU/README, CWRU/changelog,
++	CWRU/mh-folder-comp, CWRU/sh-redir-hack, CWRU/misc/bison,
++	CWRU/misc/errlist.c, CWRU/misc/hpux10-dlfcn.h,
++	CWRU/misc/open-files.c, CWRU/misc/sigs.c, CWRU/misc/sigstat.c,
++	builtins/Makefile.in, builtins/alias.def, builtins/bashgetopt.c,
++	builtins/bashgetopt.h, builtins/bind.def, builtins/break.def,
++	builtins/builtin.def, builtins/cd.def, builtins/colon.def,
++	builtins/command.def, builtins/common.c, builtins/common.h,
++	builtins/complete.def, builtins/declare.def, builtins/echo.def,
++	builtins/enable.def, builtins/eval.def, builtins/evalfile.c,
++	builtins/evalstring.c, builtins/exec.def, builtins/exit.def,
++	builtins/fc.def, builtins/fg_bg.def, builtins/getopt.c,
++	builtins/getopt.h, builtins/getopts.def, builtins/hash.def,
++	builtins/help.def, builtins/history.def, builtins/inlib.def,
++	builtins/jobs.def, builtins/kill.def, builtins/let.def,
++	builtins/mkbuiltins.c, builtins/printf.def, builtins/psize.c,
++	builtins/psize.sh, builtins/pushd.def, builtins/read.def,
++	builtins/reserved.def, builtins/return.def, builtins/set.def,
++	builtins/setattr.def, builtins/shift.def, builtins/shopt.def,
++	builtins/source.def, builtins/suspend.def, builtins/test.def,
++	builtins/times.def, builtins/trap.def, builtins/type.def,
++	builtins/ulimit.def, builtins/umask.def, builtins/wait.def,
++	cross-build/beos-sig.h, cross-build/cygwin32.cache,
++	cross-build/opennt.cache, cross-build/win32sig.h,
++	cross-build/x86-beos.cache, doc/FAQ, doc/INTRO, doc/Makefile.in,
++	doc/README, doc/article.ms, doc/bash.1, doc/bashbug.1,
++	doc/bashref.texi, doc/builtins.1, doc/htmlpost.sh, doc/rbash.1,
++	doc/texinfo.tex, examples/bashdb/PERMISSION,
++	examples/bashdb/bashdb, examples/bashdb/bashdb.el,
++	examples/complete/complete-examples,
++	examples/complete/complete.freebsd,
++	examples/complete/complete.gnu-longopt,
++	examples/complete/complete.ianmac,
++	examples/complete/complete2.ianmac, examples/functions/array-stuff,
++	examples/functions/array-to-string, examples/functions/autoload,
++	examples/functions/autoload.v2, examples/functions/autoload.v3,
++	examples/functions/basename, examples/functions/basename2,
++	examples/functions/coproc.bash, examples/functions/coshell.README,
++	examples/functions/coshell.bash, examples/functions/csh-compat,
++	examples/functions/dirfuncs, examples/functions/dirname,
++	examples/functions/emptydir, examples/functions/exitstat,
++	examples/functions/external, examples/functions/fact,
++	examples/functions/fstty, examples/functions/func,
++	examples/functions/gethtml, examples/functions/getoptx.bash,
++	examples/functions/inetaddr, examples/functions/inpath,
++	examples/functions/isnum.bash, examples/functions/isnum2,
++	examples/functions/isvalidip, examples/functions/jdate.bash,
++	examples/functions/jj.bash, examples/functions/keep,
++	examples/functions/ksh-cd, examples/functions/ksh-compat-test,
++	examples/functions/kshenv, examples/functions/login,
++	examples/functions/lowercase, examples/functions/manpage,
++	examples/functions/mhfold, examples/functions/notify.bash,
++	examples/functions/pathfuncs, examples/functions/recurse,
++	examples/functions/repeat2, examples/functions/repeat3,
++	examples/functions/seq, examples/functions/seq2,
++	examples/functions/shcat, examples/functions/shcat2,
++	examples/functions/sort-pos-params, examples/functions/substr,
++	examples/functions/substr2, examples/functions/term,
++	examples/functions/whatis, examples/functions/whence,
++	examples/functions/which, examples/functions/xalias.bash,
++	examples/functions/xfind.bash, examples/loadables/Makefile.in,
++	examples/loadables/README, examples/loadables/basename.c,
++	examples/loadables/cat.c, examples/loadables/cut.c,
++	examples/loadables/dirname.c, examples/loadables/finfo.c,
++	examples/loadables/getconf.c, examples/loadables/getconf.h,
++	examples/loadables/head.c, examples/loadables/hello.c,
++	examples/loadables/id.c, examples/loadables/ln.c,
++	examples/loadables/logname.c, examples/loadables/mkdir.c,
++	examples/loadables/necho.c, examples/loadables/pathchk.c,
++	examples/loadables/print.c, examples/loadables/printenv.c,
++	examples/loadables/push.c, examples/loadables/realpath.c,
++	examples/loadables/rmdir.c, examples/loadables/sleep.c,
++	examples/loadables/sync.c, examples/loadables/tee.c,
++	examples/loadables/template.c, examples/loadables/truefalse.c,
++	examples/loadables/tty.c, examples/loadables/uname.c,
++	examples/loadables/unlink.c, examples/loadables/whoami.c,
++	examples/loadables/perl/Makefile.in,
++	examples/loadables/perl/README, examples/loadables/perl/bperl.c,
++	examples/loadables/perl/iperl.c, examples/misc/aliasconv.bash,
++	examples/misc/aliasconv.sh, examples/misc/cshtobash,
++	examples/misc/suncmd.termcap, examples/obashdb/PERMISSION,
++	examples/obashdb/README, examples/obashdb/bashdb,
++	examples/obashdb/bashdb.fns, examples/obashdb/bashdb.pre,
++	examples/scripts/adventure.sh, examples/scripts/bcsh.sh,
++	examples/scripts/cat.sh, examples/scripts/center,
++	examples/scripts/dd-ex.sh, examples/scripts/fixfiles.bash,
++	examples/scripts/hanoi.bash, examples/scripts/inpath,
++	examples/scripts/krand.bash, examples/scripts/line-input.bash,
++	examples/scripts/nohup.bash, examples/scripts/precedence,
++	examples/scripts/randomcard.bash, examples/scripts/scrollbar,
++	examples/scripts/scrollbar2, examples/scripts/self-repro,
++	examples/scripts/showperm.bash, examples/scripts/shprompt,
++	examples/scripts/spin.bash, examples/scripts/timeout,
++	examples/scripts/vtree2, examples/scripts/vtree3,
++	examples/scripts/vtree3a, examples/scripts/websrv.sh,
++	examples/scripts/xterm_title, examples/scripts/zprintf,
++	examples/scripts.noah/PERMISSION, examples/scripts.noah/README,
++	examples/scripts.noah/aref.bash,
++	examples/scripts.noah/bash.sub.bash,
++	examples/scripts.noah/bash_version.bash,
++	examples/scripts.noah/meta.bash, examples/scripts.noah/mktmp.bash,
++	examples/scripts.noah/number.bash,
++	examples/scripts.noah/prompt.bash,
++	examples/scripts.noah/remap_keys.bash,
++	examples/scripts.noah/require.bash,
++	examples/scripts.noah/send_mail.bash,
++	examples/scripts.noah/shcat.bash,
++	examples/scripts.noah/source.bash,
++	examples/scripts.noah/string.bash, examples/scripts.noah/stty.bash,
++	examples/scripts.noah/y_or_n_p.bash,
++	examples/scripts.v2/PERMISSION, examples/scripts.v2/README,
++	examples/scripts.v2/arc2tarz, examples/scripts.v2/bashrand,
++	examples/scripts.v2/cal2day.bash, examples/scripts.v2/cdhist.bash,
++	examples/scripts.v2/corename, examples/scripts.v2/fman,
++	examples/scripts.v2/frcp, examples/scripts.v2/lowercase,
++	examples/scripts.v2/ncp, examples/scripts.v2/newext,
++	examples/scripts.v2/nmv, examples/scripts.v2/pages,
++	examples/scripts.v2/pf, examples/scripts.v2/pmtop,
++	examples/scripts.v2/ren, examples/scripts.v2/rename,
++	examples/scripts.v2/repeat, examples/scripts.v2/shprof,
++	examples/scripts.v2/untar, examples/scripts.v2/uudec,
++	examples/scripts.v2/uuenc, examples/scripts.v2/vtree,
++	examples/scripts.v2/where, examples/startup-files/Bash_aliases,
++	examples/startup-files/Bash_profile,
++	examples/startup-files/Bashrc.bfox, examples/startup-files/README,
++	examples/startup-files/bash-profile, examples/startup-files/bashrc,
++	examples/startup-files/apple/README,
++	examples/startup-files/apple/aliases,
++	examples/startup-files/apple/bash.defaults,
++	examples/startup-files/apple/environment,
++	examples/startup-files/apple/login,
++	examples/startup-files/apple/logout,
++	examples/startup-files/apple/rc, include/ansi_stdlib.h,
++	include/chartypes.h, include/filecntl.h, include/maxpath.h,
++	include/memalloc.h, include/ocache.h, include/posixdir.h,
++	include/posixjmp.h, include/posixstat.h, include/posixtime.h,
++	include/posixwait.h, include/shmbutil.h, include/shtty.h,
++	include/stdc.h, include/systimes.h, include/typemax.h,
++	include/unionwait.h, lib/glob/Makefile.in, lib/glob/collsyms.h,
++	lib/glob/glob.c, lib/glob/glob.h, lib/glob/glob_loop.c,
++	lib/glob/ndir.h, lib/glob/sm_loop.c, lib/glob/smatch.c,
++	lib/glob/strmatch.c, lib/glob/strmatch.h, lib/glob/xmbsrtowcs.c,
++	lib/glob/doc/Makefile, lib/glob/doc/glob.texi,
++	lib/malloc/Makefile.in, lib/malloc/alloca.c,
++	lib/malloc/getpagesize.h, lib/malloc/i386-alloca.s,
++	lib/malloc/imalloc.h, lib/malloc/malloc.c, lib/malloc/mstats.h,
++	lib/malloc/shmalloc.h, lib/malloc/stats.c, lib/malloc/stub.c,
++	lib/malloc/table.c, lib/malloc/table.h, lib/malloc/trace.c,
++	lib/malloc/watch.c, lib/malloc/watch.h, lib/malloc/x386-alloca.s,
++	lib/malloc/xleaktrace, lib/malloc/xmalloc.c, lib/readline/COPYING,
++	lib/readline/ChangeLog, lib/readline/Makefile.in,
++	lib/readline/README, lib/readline/STANDALONE,
++	lib/readline/ansi_stdlib.h, lib/readline/bind.c,
++	lib/readline/callback.c, lib/readline/chardefs.h,
++	lib/readline/compat.c, lib/readline/complete.c,
++	lib/readline/display.c, lib/readline/emacs_keymap.c,
++	lib/readline/funmap.c, lib/readline/histexpand.c,
++	lib/readline/histfile.c, lib/readline/histlib.h,
++	lib/readline/history.c, lib/readline/history.h,
++	lib/readline/histsearch.c, lib/readline/input.c,
++	lib/readline/isearch.c, lib/readline/keymaps.c,
++	lib/readline/keymaps.h, lib/readline/kill.c, lib/readline/macro.c,
++	lib/readline/mbutil.c, lib/readline/misc.c, lib/readline/nls.c,
++	lib/readline/parens.c, lib/readline/posixdir.h,
++	lib/readline/posixjmp.h, lib/readline/posixstat.h,
++	lib/readline/readline.c, lib/readline/readline.h,
++	lib/readline/rlconf.h, lib/readline/rldefs.h,
++	lib/readline/rlmbutil.h, lib/readline/rlprivate.h,
++	lib/readline/rlshell.h, lib/readline/rlstdc.h,
++	lib/readline/rltty.c, lib/readline/rltty.h,
++	lib/readline/rltypedefs.h, lib/readline/rlwinsize.h,
++	lib/readline/savestring.c, lib/readline/search.c,
++	lib/readline/shell.c, lib/readline/signals.c, lib/readline/tcap.h,
++	lib/readline/terminal.c, lib/readline/text.c, lib/readline/tilde.c,
++	lib/readline/tilde.h, lib/readline/undo.c, lib/readline/util.c,
++	lib/readline/vi_keymap.c, lib/readline/vi_mode.c,
++	lib/readline/xmalloc.c, lib/readline/xmalloc.h,
++	lib/readline/doc/Makefile, lib/readline/doc/hist.texinfo,
++	lib/readline/doc/hstech.texinfo, lib/readline/doc/hsuser.texinfo,
++	lib/readline/doc/manvers.texinfo, lib/readline/doc/rlman.texinfo,
++	lib/readline/doc/rltech.texinfo, lib/readline/doc/rluser.texinfo,
++	lib/readline/doc/rluserman.texinfo, lib/readline/examples/Inputrc,
++	lib/readline/examples/Makefile, lib/readline/examples/excallback.c,
++	lib/readline/examples/fileman.c, lib/readline/examples/histexamp.c,
++	lib/readline/examples/manexamp.c, lib/readline/examples/rl.c,
++	lib/readline/examples/rlcat.c, lib/readline/examples/rltest.c,
++	lib/sh/Makefile.in, lib/sh/clktck.c, lib/sh/clock.c,
++	lib/sh/fmtullong.c, lib/sh/fmtulong.c, lib/sh/fmtumax.c,
++	lib/sh/getcwd.c, lib/sh/getenv.c, lib/sh/inet_aton.c,
++	lib/sh/itos.c, lib/sh/mailstat.c, lib/sh/makepath.c,
++	lib/sh/memset.c, lib/sh/mktime.c, lib/sh/netconn.c,
++	lib/sh/netopen.c, lib/sh/oslib.c, lib/sh/pathcanon.c,
++	lib/sh/pathphys.c, lib/sh/rename.c, lib/sh/setlinebuf.c,
++	lib/sh/shquote.c, lib/sh/shtty.c, lib/sh/snprintf.c,
++	lib/sh/spell.c, lib/sh/strcasecmp.c, lib/sh/strerror.c,
++	lib/sh/strftime.c, lib/sh/strindex.c, lib/sh/stringlist.c,
++	lib/sh/stringvec.c, lib/sh/strpbrk.c, lib/sh/strtod.c,
++	lib/sh/strtoimax.c, lib/sh/strtol.c, lib/sh/strtoll.c,
++	lib/sh/strtoul.c, lib/sh/strtoull.c, lib/sh/strtoumax.c,
++	lib/sh/strtrans.c, lib/sh/times.c, lib/sh/timeval.c,
++	lib/sh/tmpfile.c, lib/sh/vprint.c, lib/sh/xstrchr.c,
++	lib/sh/zcatfd.c, lib/sh/zread.c, lib/sh/zwrite.c,
++	lib/termcap/Makefile.in, lib/termcap/ltcap.h,
++	lib/termcap/termcap.c, lib/termcap/termcap.h, lib/termcap/tparam.c,
++	lib/termcap/version.c, lib/termcap/grot/COPYING,
++	lib/termcap/grot/ChangeLog, lib/termcap/grot/INSTALL,
++	lib/termcap/grot/Makefile.in, lib/termcap/grot/NEWS,
++	lib/termcap/grot/README, lib/termcap/grot/configure,
++	lib/termcap/grot/configure.in, lib/termcap/grot/termcap.info,
++	lib/termcap/grot/termcap.info-1, lib/termcap/grot/termcap.info-2,
++	lib/termcap/grot/termcap.info-3, lib/termcap/grot/termcap.info-4,
++	lib/termcap/grot/termcap.texi, lib/termcap/grot/texinfo.tex,
++	lib/tilde/Makefile.in, lib/tilde/README, lib/tilde/shell.c,
++	lib/tilde/tilde.c, lib/tilde/tilde.h, lib/tilde/doc/Makefile,
++	lib/tilde/doc/tilde.texi, support/Makefile.in, support/SYMLINKS,
++	support/bash.xbm, support/bashbug.sh, support/bashversion.c,
++	support/config.guess, support/config.sub, support/fixlinks,
++	support/install.sh, support/man2html.c, support/missing,
++	support/mkclone, support/mkconffiles, support/mkdirs,
++	support/mksignames.c, support/mkversion.sh, support/printenv.c,
++	support/printenv.sh, support/recho.c, support/rlvers.sh,
++	support/shobj-conf, support/texi2dvi, support/texi2html,
++	support/xenix-link.sh, support/zecho.c, tests/README,
++	tests/arith-for.right, tests/arith-for.tests, tests/arith.right,
++	tests/arith.tests, tests/array-at-star, tests/array.right,
++	tests/array.tests, tests/array2.right, tests/braces-tests,
++	tests/braces.right, tests/builtins.right, tests/builtins.tests,
++	tests/builtins1.sub, tests/builtins2.sub, tests/cond.right,
++	tests/cond.tests, tests/cprint.right, tests/cprint.tests,
++	tests/dollar-at-star, tests/dollar.right, tests/dstack.right,
++	tests/dstack.tests, tests/dstack2.right, tests/dstack2.tests,
++	tests/errors.right, tests/errors.tests, tests/exec.right,
++	tests/exec1.sub, tests/exec2.sub, tests/exec3.sub, tests/exec4.sub,
++	tests/exec5.sub, tests/exec6.sub, tests/execscript,
++	tests/exp-tests, tests/exp.right, tests/extglob.right,
++	tests/extglob.tests, tests/extglob2.right, tests/extglob2.tests,
++	tests/func.right, tests/func.tests, tests/func1.sub,
++	tests/func2.sub, tests/func3.sub, tests/getopts.right,
++	tests/getopts.tests, tests/getopts1.sub, tests/getopts2.sub,
++	tests/getopts3.sub, tests/getopts4.sub, tests/getopts5.sub,
++	tests/getopts6.sub, tests/getopts7.sub, tests/glob-test,
++	tests/glob.right, tests/glob1.sub, tests/heredoc.right,
++	tests/heredoc.tests, tests/herestr.right, tests/herestr.tests,
++	tests/histexp.right, tests/histexp.tests, tests/history.list,
++	tests/history.right, tests/history.tests, tests/ifs.right,
++	tests/ifs.tests, tests/input-line.sh, tests/input-line.sub,
++	tests/input.right, tests/invert.right, tests/invert.tests,
++	tests/jobs.right, tests/jobs.tests, tests/jobs1.sub,
++	tests/jobs2.sub, tests/jobs3.sub, tests/more-exp.right,
++	tests/more-exp.tests, tests/new-exp.right, tests/new-exp.tests,
++	tests/new-exp1.sub, tests/new-exp2.sub, tests/new-exp3.sub,
++	tests/nquote.right, tests/nquote.tests, tests/nquote1.right,
++	tests/nquote1.tests, tests/nquote2.right, tests/nquote2.tests,
++	tests/nquote3.right, tests/nquote3.tests, tests/posix2.right,
++	tests/posix2.tests, tests/posixpat.right, tests/posixpat.tests,
++	tests/prec.right, tests/precedence, tests/printf.right,
++	tests/printf.tests, tests/quote.right, tests/quote.tests,
++	tests/read.right, tests/read.tests, tests/read1.sub,
++	tests/read2.sub, tests/read3.sub, tests/read4.sub,
++	tests/redir.right, tests/redir.tests, tests/redir1.sub,
++	tests/redir2.sub, tests/redir3.in1, tests/redir3.in2,
++	tests/redir3.sub, tests/redir4.in1, tests/redir4.sub,
++	tests/redir5.sub, tests/rhs-exp.right, tests/rhs-exp.tests,
++	tests/rsh.right, tests/rsh.tests, tests/run-all, tests/run-arith,
++	tests/run-arith-for, tests/run-array, tests/run-array2,
++	tests/run-braces, tests/run-builtins, tests/run-cond,
++	tests/run-cprint, tests/run-dirstack, tests/run-dollars,
++	tests/run-errors, tests/run-execscript, tests/run-exp-tests,
++	tests/run-extglob, tests/run-extglob2, tests/run-func,
++	tests/run-getopts, tests/run-glob-test, tests/run-heredoc,
++	tests/run-herestr, tests/run-histexpand, tests/run-history,
++	tests/run-ifs, tests/run-input-test, tests/run-invert,
++	tests/run-jobs, tests/run-minimal, tests/run-more-exp,
++	tests/run-new-exp, tests/run-nquote, tests/run-nquote1,
++	tests/run-nquote2, tests/run-nquote3, tests/run-posix2,
++	tests/run-posixpat, tests/run-precedence, tests/run-printf,
++	tests/run-quote, tests/run-read, tests/run-redir,
++	tests/run-rhs-exp, tests/run-rsh, tests/run-set-e, tests/run-shopt,
++	tests/run-strip, tests/run-test, tests/run-tilde, tests/run-trap,
++	tests/run-type, tests/run-varenv, tests/set-e-test,
++	tests/set-e.right, tests/shopt.right, tests/shopt.tests,
++	tests/source1.sub, tests/source2.sub, tests/source3.sub,
++	tests/source4.sub, tests/source5.sub, tests/strip.right,
++	tests/strip.tests, tests/test.right, tests/test.tests,
++	tests/tilde-tests, tests/tilde.right, tests/trap.right,
++	tests/trap.tests, tests/trap1.sub, tests/trap2.sub,
++	tests/trap2a.sub, tests/type.right, tests/type.tests,
++	tests/varenv.right, tests/varenv.sh, tests/varenv1.sub,
++	tests/varenv2.sub, tests/version, tests/version.mini,
++	tests/misc/dev-tcp.tests, tests/misc/perf-script,
++	tests/misc/perftest, tests/misc/read-nchars.tests,
++	tests/misc/redir-t2.sh, tests/misc/run-r2.sh,
++	tests/misc/sigint-1.sh, tests/misc/sigint-2.sh,
++	tests/misc/sigint-3.sh, tests/misc/sigint-4.sh,
++	tests/misc/test-minus-e.1, tests/misc/test-minus-e.2,
++	tests/misc/wait-bg.tests: Initial revision
++
++2002-08-20 11:16  rocky
++
++	* AUTHORS, CHANGES, COMPAT, COPYING, INSTALL, MANIFEST,
++	Makefile.in, NEWS, NOTES, POSIX, RBASH, README, Y2K, alias.c,
++	alias.h, array.c, array.h, arrayfunc.c, arrayfunc.h, bashansi.h,
++	bashhist.c, bashhist.h, bashintl.h, bashjmp.h, bashline.c,
++	bashline.h, bashtypes.h, bracecomp.c, braces.c, builtins.h,
++	command.h, config-bot.h, config-top.h, config.h.in, configure.in,
++	conftypes.h, copy_cmd.c, dispose_cmd.c, dispose_cmd.h, error.c,
++	error.h, eval.c, execute_cmd.c, execute_cmd.h, expr.c, externs.h,
++	findcmd.c, findcmd.h, flags.c, flags.h, general.c, general.h,
++	hashcmd.c, hashcmd.h, hashlib.c, hashlib.h, input.c, input.h,
++	jobs.c, jobs.h, list.c, locale.c, mailcheck.c, mailcheck.h,
++	make_cmd.c, make_cmd.h, mksyntax.c, nojobs.c, parse.y, parser.h,
++	patchlevel.h, pathexp.c, pathexp.h, pcomplete.c, pcomplete.h,
++	pcomplib.c, print_cmd.c, quit.h, redir.c, redir.h, shell.c,
++	shell.h, sig.c, sig.h, siglist.c, siglist.h, stringlib.c, subst.c,
++	subst.h, syntax.h, test.c, test.h, trap.c, trap.h, unwind_prot.c,
++	unwind_prot.h, variables.c, variables.h, version.c, xmalloc.c,
++	xmalloc.h, CWRU/PLATFORMS, CWRU/README, CWRU/changelog,
++	CWRU/mh-folder-comp, CWRU/sh-redir-hack, CWRU/misc/bison,
++	CWRU/misc/errlist.c, CWRU/misc/hpux10-dlfcn.h,
++	CWRU/misc/open-files.c, CWRU/misc/sigs.c, CWRU/misc/sigstat.c,
++	builtins/Makefile.in, builtins/alias.def, builtins/bashgetopt.c,
++	builtins/bashgetopt.h, builtins/bind.def, builtins/break.def,
++	builtins/builtin.def, builtins/cd.def, builtins/colon.def,
++	builtins/command.def, builtins/common.c, builtins/common.h,
++	builtins/complete.def, builtins/declare.def, builtins/echo.def,
++	builtins/enable.def, builtins/eval.def, builtins/evalfile.c,
++	builtins/evalstring.c, builtins/exec.def, builtins/exit.def,
++	builtins/fc.def, builtins/fg_bg.def, builtins/getopt.c,
++	builtins/getopt.h, builtins/getopts.def, builtins/hash.def,
++	builtins/help.def, builtins/history.def, builtins/inlib.def,
++	builtins/jobs.def, builtins/kill.def, builtins/let.def,
++	builtins/mkbuiltins.c, builtins/printf.def, builtins/psize.c,
++	builtins/psize.sh, builtins/pushd.def, builtins/read.def,
++	builtins/reserved.def, builtins/return.def, builtins/set.def,
++	builtins/setattr.def, builtins/shift.def, builtins/shopt.def,
++	builtins/source.def, builtins/suspend.def, builtins/test.def,
++	builtins/times.def, builtins/trap.def, builtins/type.def,
++	builtins/ulimit.def, builtins/umask.def, builtins/wait.def,
++	cross-build/beos-sig.h, cross-build/cygwin32.cache,
++	cross-build/opennt.cache, cross-build/win32sig.h,
++	cross-build/x86-beos.cache, doc/FAQ, doc/INTRO, doc/Makefile.in,
++	doc/README, doc/article.ms, doc/bash.1, doc/bashbug.1,
++	doc/bashref.texi, doc/builtins.1, doc/htmlpost.sh, doc/rbash.1,
++	doc/texinfo.tex, examples/bashdb/PERMISSION,
++	examples/bashdb/bashdb, examples/bashdb/bashdb.el,
++	examples/complete/complete-examples,
++	examples/complete/complete.freebsd,
++	examples/complete/complete.gnu-longopt,
++	examples/complete/complete.ianmac,
++	examples/complete/complete2.ianmac, examples/functions/array-stuff,
++	examples/functions/array-to-string, examples/functions/autoload,
++	examples/functions/autoload.v2, examples/functions/autoload.v3,
++	examples/functions/basename, examples/functions/basename2,
++	examples/functions/coproc.bash, examples/functions/coshell.README,
++	examples/functions/coshell.bash, examples/functions/csh-compat,
++	examples/functions/dirfuncs, examples/functions/dirname,
++	examples/functions/emptydir, examples/functions/exitstat,
++	examples/functions/external, examples/functions/fact,
++	examples/functions/fstty, examples/functions/func,
++	examples/functions/gethtml, examples/functions/getoptx.bash,
++	examples/functions/inetaddr, examples/functions/inpath,
++	examples/functions/isnum.bash, examples/functions/isnum2,
++	examples/functions/isvalidip, examples/functions/jdate.bash,
++	examples/functions/jj.bash, examples/functions/keep,
++	examples/functions/ksh-cd, examples/functions/ksh-compat-test,
++	examples/functions/kshenv, examples/functions/login,
++	examples/functions/lowercase, examples/functions/manpage,
++	examples/functions/mhfold, examples/functions/notify.bash,
++	examples/functions/pathfuncs, examples/functions/recurse,
++	examples/functions/repeat2, examples/functions/repeat3,
++	examples/functions/seq, examples/functions/seq2,
++	examples/functions/shcat, examples/functions/shcat2,
++	examples/functions/sort-pos-params, examples/functions/substr,
++	examples/functions/substr2, examples/functions/term,
++	examples/functions/whatis, examples/functions/whence,
++	examples/functions/which, examples/functions/xalias.bash,
++	examples/functions/xfind.bash, examples/loadables/Makefile.in,
++	examples/loadables/README, examples/loadables/basename.c,
++	examples/loadables/cat.c, examples/loadables/cut.c,
++	examples/loadables/dirname.c, examples/loadables/finfo.c,
++	examples/loadables/getconf.c, examples/loadables/getconf.h,
++	examples/loadables/head.c, examples/loadables/hello.c,
++	examples/loadables/id.c, examples/loadables/ln.c,
++	examples/loadables/logname.c, examples/loadables/mkdir.c,
++	examples/loadables/necho.c, examples/loadables/pathchk.c,
++	examples/loadables/print.c, examples/loadables/printenv.c,
++	examples/loadables/push.c, examples/loadables/realpath.c,
++	examples/loadables/rmdir.c, examples/loadables/sleep.c,
++	examples/loadables/sync.c, examples/loadables/tee.c,
++	examples/loadables/template.c, examples/loadables/truefalse.c,
++	examples/loadables/tty.c, examples/loadables/uname.c,
++	examples/loadables/unlink.c, examples/loadables/whoami.c,
++	examples/loadables/perl/Makefile.in,
++	examples/loadables/perl/README, examples/loadables/perl/bperl.c,
++	examples/loadables/perl/iperl.c, examples/misc/aliasconv.bash,
++	examples/misc/aliasconv.sh, examples/misc/cshtobash,
++	examples/misc/suncmd.termcap, examples/obashdb/PERMISSION,
++	examples/obashdb/README, examples/obashdb/bashdb,
++	examples/obashdb/bashdb.fns, examples/obashdb/bashdb.pre,
++	examples/scripts/adventure.sh, examples/scripts/bcsh.sh,
++	examples/scripts/cat.sh, examples/scripts/center,
++	examples/scripts/dd-ex.sh, examples/scripts/fixfiles.bash,
++	examples/scripts/hanoi.bash, examples/scripts/inpath,
++	examples/scripts/krand.bash, examples/scripts/line-input.bash,
++	examples/scripts/nohup.bash, examples/scripts/precedence,
++	examples/scripts/randomcard.bash, examples/scripts/scrollbar,
++	examples/scripts/scrollbar2, examples/scripts/self-repro,
++	examples/scripts/showperm.bash, examples/scripts/shprompt,
++	examples/scripts/spin.bash, examples/scripts/timeout,
++	examples/scripts/vtree2, examples/scripts/vtree3,
++	examples/scripts/vtree3a, examples/scripts/websrv.sh,
++	examples/scripts/xterm_title, examples/scripts/zprintf,
++	examples/scripts.noah/PERMISSION, examples/scripts.noah/README,
++	examples/scripts.noah/aref.bash,
++	examples/scripts.noah/bash.sub.bash,
++	examples/scripts.noah/bash_version.bash,
++	examples/scripts.noah/meta.bash, examples/scripts.noah/mktmp.bash,
++	examples/scripts.noah/number.bash,
++	examples/scripts.noah/prompt.bash,
++	examples/scripts.noah/remap_keys.bash,
++	examples/scripts.noah/require.bash,
++	examples/scripts.noah/send_mail.bash,
++	examples/scripts.noah/shcat.bash,
++	examples/scripts.noah/source.bash,
++	examples/scripts.noah/string.bash, examples/scripts.noah/stty.bash,
++	examples/scripts.noah/y_or_n_p.bash,
++	examples/scripts.v2/PERMISSION, examples/scripts.v2/README,
++	examples/scripts.v2/arc2tarz, examples/scripts.v2/bashrand,
++	examples/scripts.v2/cal2day.bash, examples/scripts.v2/cdhist.bash,
++	examples/scripts.v2/corename, examples/scripts.v2/fman,
++	examples/scripts.v2/frcp, examples/scripts.v2/lowercase,
++	examples/scripts.v2/ncp, examples/scripts.v2/newext,
++	examples/scripts.v2/nmv, examples/scripts.v2/pages,
++	examples/scripts.v2/pf, examples/scripts.v2/pmtop,
++	examples/scripts.v2/ren, examples/scripts.v2/rename,
++	examples/scripts.v2/repeat, examples/scripts.v2/shprof,
++	examples/scripts.v2/untar, examples/scripts.v2/uudec,
++	examples/scripts.v2/uuenc, examples/scripts.v2/vtree,
++	examples/scripts.v2/where, examples/startup-files/Bash_aliases,
++	examples/startup-files/Bash_profile,
++	examples/startup-files/Bashrc.bfox, examples/startup-files/README,
++	examples/startup-files/bash-profile, examples/startup-files/bashrc,
++	examples/startup-files/apple/README,
++	examples/startup-files/apple/aliases,
++	examples/startup-files/apple/bash.defaults,
++	examples/startup-files/apple/environment,
++	examples/startup-files/apple/login,
++	examples/startup-files/apple/logout,
++	examples/startup-files/apple/rc, include/ansi_stdlib.h,
++	include/chartypes.h, include/filecntl.h, include/maxpath.h,
++	include/memalloc.h, include/ocache.h, include/posixdir.h,
++	include/posixjmp.h, include/posixstat.h, include/posixtime.h,
++	include/posixwait.h, include/shmbutil.h, include/shtty.h,
++	include/stdc.h, include/systimes.h, include/typemax.h,
++	include/unionwait.h, lib/glob/Makefile.in, lib/glob/collsyms.h,
++	lib/glob/glob.c, lib/glob/glob.h, lib/glob/glob_loop.c,
++	lib/glob/ndir.h, lib/glob/sm_loop.c, lib/glob/smatch.c,
++	lib/glob/strmatch.c, lib/glob/strmatch.h, lib/glob/xmbsrtowcs.c,
++	lib/glob/doc/Makefile, lib/glob/doc/glob.texi,
++	lib/malloc/Makefile.in, lib/malloc/alloca.c,
++	lib/malloc/getpagesize.h, lib/malloc/i386-alloca.s,
++	lib/malloc/imalloc.h, lib/malloc/malloc.c, lib/malloc/mstats.h,
++	lib/malloc/shmalloc.h, lib/malloc/stats.c, lib/malloc/stub.c,
++	lib/malloc/table.c, lib/malloc/table.h, lib/malloc/trace.c,
++	lib/malloc/watch.c, lib/malloc/watch.h, lib/malloc/x386-alloca.s,
++	lib/malloc/xleaktrace, lib/malloc/xmalloc.c, lib/readline/COPYING,
++	lib/readline/ChangeLog, lib/readline/Makefile.in,
++	lib/readline/README, lib/readline/STANDALONE,
++	lib/readline/ansi_stdlib.h, lib/readline/bind.c,
++	lib/readline/callback.c, lib/readline/chardefs.h,
++	lib/readline/compat.c, lib/readline/complete.c,
++	lib/readline/display.c, lib/readline/emacs_keymap.c,
++	lib/readline/funmap.c, lib/readline/histexpand.c,
++	lib/readline/histfile.c, lib/readline/histlib.h,
++	lib/readline/history.c, lib/readline/history.h,
++	lib/readline/histsearch.c, lib/readline/input.c,
++	lib/readline/isearch.c, lib/readline/keymaps.c,
++	lib/readline/keymaps.h, lib/readline/kill.c, lib/readline/macro.c,
++	lib/readline/mbutil.c, lib/readline/misc.c, lib/readline/nls.c,
++	lib/readline/parens.c, lib/readline/posixdir.h,
++	lib/readline/posixjmp.h, lib/readline/posixstat.h,
++	lib/readline/readline.c, lib/readline/readline.h,
++	lib/readline/rlconf.h, lib/readline/rldefs.h,
++	lib/readline/rlmbutil.h, lib/readline/rlprivate.h,
++	lib/readline/rlshell.h, lib/readline/rlstdc.h,
++	lib/readline/rltty.c, lib/readline/rltty.h,
++	lib/readline/rltypedefs.h, lib/readline/rlwinsize.h,
++	lib/readline/savestring.c, lib/readline/search.c,
++	lib/readline/shell.c, lib/readline/signals.c, lib/readline/tcap.h,
++	lib/readline/terminal.c, lib/readline/text.c, lib/readline/tilde.c,
++	lib/readline/tilde.h, lib/readline/undo.c, lib/readline/util.c,
++	lib/readline/vi_keymap.c, lib/readline/vi_mode.c,
++	lib/readline/xmalloc.c, lib/readline/xmalloc.h,
++	lib/readline/doc/Makefile, lib/readline/doc/hist.texinfo,
++	lib/readline/doc/hstech.texinfo, lib/readline/doc/hsuser.texinfo,
++	lib/readline/doc/manvers.texinfo, lib/readline/doc/rlman.texinfo,
++	lib/readline/doc/rltech.texinfo, lib/readline/doc/rluser.texinfo,
++	lib/readline/doc/rluserman.texinfo, lib/readline/examples/Inputrc,
++	lib/readline/examples/Makefile, lib/readline/examples/excallback.c,
++	lib/readline/examples/fileman.c, lib/readline/examples/histexamp.c,
++	lib/readline/examples/manexamp.c, lib/readline/examples/rl.c,
++	lib/readline/examples/rlcat.c, lib/readline/examples/rltest.c,
++	lib/sh/Makefile.in, lib/sh/clktck.c, lib/sh/clock.c,
++	lib/sh/fmtullong.c, lib/sh/fmtulong.c, lib/sh/fmtumax.c,
++	lib/sh/getcwd.c, lib/sh/getenv.c, lib/sh/inet_aton.c,
++	lib/sh/itos.c, lib/sh/mailstat.c, lib/sh/makepath.c,
++	lib/sh/memset.c, lib/sh/mktime.c, lib/sh/netconn.c,
++	lib/sh/netopen.c, lib/sh/oslib.c, lib/sh/pathcanon.c,
++	lib/sh/pathphys.c, lib/sh/rename.c, lib/sh/setlinebuf.c,
++	lib/sh/shquote.c, lib/sh/shtty.c, lib/sh/snprintf.c,
++	lib/sh/spell.c, lib/sh/strcasecmp.c, lib/sh/strerror.c,
++	lib/sh/strftime.c, lib/sh/strindex.c, lib/sh/stringlist.c,
++	lib/sh/stringvec.c, lib/sh/strpbrk.c, lib/sh/strtod.c,
++	lib/sh/strtoimax.c, lib/sh/strtol.c, lib/sh/strtoll.c,
++	lib/sh/strtoul.c, lib/sh/strtoull.c, lib/sh/strtoumax.c,
++	lib/sh/strtrans.c, lib/sh/times.c, lib/sh/timeval.c,
++	lib/sh/tmpfile.c, lib/sh/vprint.c, lib/sh/xstrchr.c,
++	lib/sh/zcatfd.c, lib/sh/zread.c, lib/sh/zwrite.c,
++	lib/termcap/Makefile.in, lib/termcap/ltcap.h,
++	lib/termcap/termcap.c, lib/termcap/termcap.h, lib/termcap/tparam.c,
++	lib/termcap/version.c, lib/termcap/grot/COPYING,
++	lib/termcap/grot/ChangeLog, lib/termcap/grot/INSTALL,
++	lib/termcap/grot/Makefile.in, lib/termcap/grot/NEWS,
++	lib/termcap/grot/README, lib/termcap/grot/configure,
++	lib/termcap/grot/configure.in, lib/termcap/grot/termcap.info,
++	lib/termcap/grot/termcap.info-1, lib/termcap/grot/termcap.info-2,
++	lib/termcap/grot/termcap.info-3, lib/termcap/grot/termcap.info-4,
++	lib/termcap/grot/termcap.texi, lib/termcap/grot/texinfo.tex,
++	lib/tilde/Makefile.in, lib/tilde/README, lib/tilde/shell.c,
++	lib/tilde/tilde.c, lib/tilde/tilde.h, lib/tilde/doc/Makefile,
++	lib/tilde/doc/tilde.texi, support/Makefile.in, support/SYMLINKS,
++	support/bash.xbm, support/bashbug.sh, support/bashversion.c,
++	support/config.guess, support/config.sub, support/fixlinks,
++	support/install.sh, support/man2html.c, support/missing,
++	support/mkclone, support/mkconffiles, support/mkdirs,
++	support/mksignames.c, support/mkversion.sh, support/printenv.c,
++	support/printenv.sh, support/recho.c, support/rlvers.sh,
++	support/shobj-conf, support/texi2dvi, support/texi2html,
++	support/xenix-link.sh, support/zecho.c, tests/README,
++	tests/arith-for.right, tests/arith-for.tests, tests/arith.right,
++	tests/arith.tests, tests/array-at-star, tests/array.right,
++	tests/array.tests, tests/array2.right, tests/braces-tests,
++	tests/braces.right, tests/builtins.right, tests/builtins.tests,
++	tests/builtins1.sub, tests/builtins2.sub, tests/cond.right,
++	tests/cond.tests, tests/cprint.right, tests/cprint.tests,
++	tests/dollar-at-star, tests/dollar.right, tests/dstack.right,
++	tests/dstack.tests, tests/dstack2.right, tests/dstack2.tests,
++	tests/errors.right, tests/errors.tests, tests/exec.right,
++	tests/exec1.sub, tests/exec2.sub, tests/exec3.sub, tests/exec4.sub,
++	tests/exec5.sub, tests/exec6.sub, tests/execscript,
++	tests/exp-tests, tests/exp.right, tests/extglob.right,
++	tests/extglob.tests, tests/extglob2.right, tests/extglob2.tests,
++	tests/func.right, tests/func.tests, tests/func1.sub,
++	tests/func2.sub, tests/func3.sub, tests/getopts.right,
++	tests/getopts.tests, tests/getopts1.sub, tests/getopts2.sub,
++	tests/getopts3.sub, tests/getopts4.sub, tests/getopts5.sub,
++	tests/getopts6.sub, tests/getopts7.sub, tests/glob-test,
++	tests/glob.right, tests/glob1.sub, tests/heredoc.right,
++	tests/heredoc.tests, tests/herestr.right, tests/herestr.tests,
++	tests/histexp.right, tests/histexp.tests, tests/history.list,
++	tests/history.right, tests/history.tests, tests/ifs.right,
++	tests/ifs.tests, tests/input-line.sh, tests/input-line.sub,
++	tests/input.right, tests/invert.right, tests/invert.tests,
++	tests/jobs.right, tests/jobs.tests, tests/jobs1.sub,
++	tests/jobs2.sub, tests/jobs3.sub, tests/more-exp.right,
++	tests/more-exp.tests, tests/new-exp.right, tests/new-exp.tests,
++	tests/new-exp1.sub, tests/new-exp2.sub, tests/new-exp3.sub,
++	tests/nquote.right, tests/nquote.tests, tests/nquote1.right,
++	tests/nquote1.tests, tests/nquote2.right, tests/nquote2.tests,
++	tests/nquote3.right, tests/nquote3.tests, tests/posix2.right,
++	tests/posix2.tests, tests/posixpat.right, tests/posixpat.tests,
++	tests/prec.right, tests/precedence, tests/printf.right,
++	tests/printf.tests, tests/quote.right, tests/quote.tests,
++	tests/read.right, tests/read.tests, tests/read1.sub,
++	tests/read2.sub, tests/read3.sub, tests/read4.sub,
++	tests/redir.right, tests/redir.tests, tests/redir1.sub,
++	tests/redir2.sub, tests/redir3.in1, tests/redir3.in2,
++	tests/redir3.sub, tests/redir4.in1, tests/redir4.sub,
++	tests/redir5.sub, tests/rhs-exp.right, tests/rhs-exp.tests,
++	tests/rsh.right, tests/rsh.tests, tests/run-all, tests/run-arith,
++	tests/run-arith-for, tests/run-array, tests/run-array2,
++	tests/run-braces, tests/run-builtins, tests/run-cond,
++	tests/run-cprint, tests/run-dirstack, tests/run-dollars,
++	tests/run-errors, tests/run-execscript, tests/run-exp-tests,
++	tests/run-extglob, tests/run-extglob2, tests/run-func,
++	tests/run-getopts, tests/run-glob-test, tests/run-heredoc,
++	tests/run-herestr, tests/run-histexpand, tests/run-history,
++	tests/run-ifs, tests/run-input-test, tests/run-invert,
++	tests/run-jobs, tests/run-minimal, tests/run-more-exp,
++	tests/run-new-exp, tests/run-nquote, tests/run-nquote1,
++	tests/run-nquote2, tests/run-nquote3, tests/run-posix2,
++	tests/run-posixpat, tests/run-precedence, tests/run-printf,
++	tests/run-quote, tests/run-read, tests/run-redir,
++	tests/run-rhs-exp, tests/run-rsh, tests/run-set-e, tests/run-shopt,
++	tests/run-strip, tests/run-test, tests/run-tilde, tests/run-trap,
++	tests/run-type, tests/run-varenv, tests/set-e-test,
++	tests/set-e.right, tests/shopt.right, tests/shopt.tests,
++	tests/source1.sub, tests/source2.sub, tests/source3.sub,
++	tests/source4.sub, tests/source5.sub, tests/strip.right,
++	tests/strip.tests, tests/test.right, tests/test.tests,
++	tests/tilde-tests, tests/tilde.right, tests/trap.right,
++	tests/trap.tests, tests/trap1.sub, tests/trap2.sub,
++	tests/trap2a.sub, tests/type.right, tests/type.tests,
++	tests/varenv.right, tests/varenv.sh, tests/varenv1.sub,
++	tests/varenv2.sub, tests/version, tests/version.mini,
++	tests/misc/dev-tcp.tests, tests/misc/perf-script,
++	tests/misc/perftest, tests/misc/read-nchars.tests,
++	tests/misc/redir-t2.sh, tests/misc/run-r2.sh,
++	tests/misc/sigint-1.sh, tests/misc/sigint-2.sh,
++	tests/misc/sigint-3.sh, tests/misc/sigint-4.sh,
++	tests/misc/test-minus-e.1, tests/misc/test-minus-e.2,
++	tests/misc/wait-bg.tests: Imported sources
++
++2000-04-03 08:54  rocky
++
++	* debugger/bashdb-main.inc: Typo. Cut over to version control id.
++
++2000-04-02 23:26  rocky
++
++	* debugger/: MANIFEST, PERMISSION, README, bashdb, bashdb-main.inc,
++	bashdb.el: Initial revision
++
++2000-04-02 23:26  rocky
++
++	* debugger/: MANIFEST, PERMISSION, README, bashdb, bashdb-main.inc,
++	bashdb.el: Imported sources
++
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/INSTALL cvs/INSTALL
+--- bash-2.05b/INSTALL	2002-06-26 23:09:18.000000000 +0200
++++ cvs/INSTALL	2002-09-19 03:02:08.000000000 +0200
+@@ -1,9 +1,42 @@
+ Basic Installation
+ ==================
+ 
+-These are installation instructions for Bash.
++These are installation instructions for Bash. 
+ 
+-The simplest way to compile Bash is:
++To get the most recent version of this software from CVS anonymously...
++
++  cvs -d:pserver:anonymous@cvs.bashdb.sourceforge.net:/cvsroot/bashdb login
++
++when asked for a password just hit the <enter> or <return> key.
++
++  cd directory-of-place-you-want-this-to-be-put-under
++
++The command below will create a directory underneath this.
++
++  cvs -z3 -d:pserver:anonymous@cvs.bashdb.sourceforge.net:/cvsroot/bashdb checkout bashdb
++
++After this you need to run either bootstrap.sh or autogen.sh to create
++some files which are used in the build process. This needs to be done
++only once. Use bootstrap.sh if you don't want to run configure; this
++might be the case in cross-compiling. autogen.sh runs bootstrap.sh and
++then runs configure.
++
++If you have already have the CVS files checked out (i.e. you did the
++above once), but now want to just receive recent updates...
++
++  cd directory-where-above-checkout-put-files
++
++Note: this is not the directory you were in but one directory down
++from that; probably something-.../bashdb.
++
++  cvs -d:pserver:anonymous@cvs.bashdb.sourceforge.net:/cvsroot/bashdb login
++
++when asked for a password just hit the <enter> or <return> key.
++
++  cvs -z3 -d:pserver:anonymous@cvs.bashdb.sourceforge.net:/cvsroot/bashdb update .
++
++If you have obtained this as a source tarball, or have followed the
++instructions above, the simplest way to compile Bash is:
+ 
+   1. `cd' to the directory containing the source code and type
+      `./configure' to configure Bash for your system.  If you're using
+@@ -11,16 +44,21 @@
+      ./configure' instead to prevent `csh' from trying to execute
+      `configure' itself.
+ 
++     To see ways to customization configuration, type 
++     ./configure --help.
++
+      Running `configure' takes some time.  While running, it prints
+      messages telling which features it is checking for.
+ 
+   2. Type `make' to compile Bash and build the `bashbug' bug reporting
+      script.
+ 
+-  3. Optionally, type `make tests' to run the Bash test suite.
++  3. Optionally, type `make check' to run the Bash test suite.
+ 
+-  4. Type `make install' to install `bash' and `bashbug'.  This will
+-     also install the manual pages and Info file.
++  4. Type `make install' to install `bash', 'bashdb' and `bashbug'.
++     This will also install the manual pages and Info file. Please
++     also see debugger/INSTALL for information on installation of the
++     debugger portion.
+ 
+ The `configure' shell script attempts to guess correct values for
+ various system-dependent variables used during compilation.  It uses
+@@ -44,8 +82,8 @@
+ 
+ If you need to do unusual things to compile Bash, please try to figure
+ out how `configure' could check whether or not to do them, and mail
+-diffs or instructions to <bash-maintainers@gnu.org> so they can be
+-considered for the next release.
++diffs or instructions to <bashdb-devel@lists.sourceforge.org> so they
++can be considered for the next release.
+ 
+ The file `configure.in' is used to create `configure' by a program
+ called Autoconf.  You only need `configure.in' if you want to change it
+@@ -171,6 +209,10 @@
+      Print the version of Autoconf used to generate the `configure'
+      script, and exit.
+ 
++`--with-lispdir'    Override the default lisp directory to use for installing
++                    the Emacs bashdb scripts
++
++
+ `configure' also accepts some other, not widely used, boilerplate
+ options.  `configure --help' prints the complete list.
+ 
+@@ -365,3 +407,5 @@
+ not meant to be changed; beware of the consequences if you do.  Read
+ the comments associated with each definition for more information about
+ its effect.
++
++$Id: INSTALL,v 1.3 2002/09/19 01:02:08 rockyb Exp $
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/MANIFEST cvs/MANIFEST
+--- bash-2.05b/MANIFEST	2002-05-13 19:09:00.000000000 +0200
++++ cvs/MANIFEST	2003-09-01 21:57:21.000000000 +0200
+@@ -8,6 +8,10 @@
+ CWRU/misc	d
+ builtins	d
+ cross-build	d
++debugger	d
++debugger/emacs	d
++debugger/doc	d
++debugger/test	d
+ doc	d
+ examples	d
+ examples/bashdb	d
+@@ -38,6 +42,7 @@
+ support		d
+ tests		d
+ tests/misc	d
++ChangeLog	f
+ CHANGES		f
+ COMPAT		f
+ COPYING		f
+@@ -56,6 +61,7 @@
+ config-top.h	f
+ config-bot.h	f
+ config.h.in	f
++bashlocal.m4	f
+ aclocal.m4	f
+ array.c		f
+ arrayfunc.c	f
+@@ -140,7 +146,7 @@
+ redir.h		f
+ bashtypes.h	f
+ mailcheck.h	f
+-pathnames.h	f
++pathnames.h.in	f
+ xmalloc.h	f
+ y.tab.c		f
+ y.tab.h		f
+@@ -150,6 +156,7 @@
+ builtins/bind.def	f
+ builtins/break.def	f
+ builtins/builtin.def	f
++builtins/caller.def	f
+ builtins/cd.def		f
+ builtins/colon.def	f
+ builtins/command.def	f
+@@ -312,7 +319,6 @@
+ lib/readline/rlstdc.h	f
+ lib/readline/rlprivate.h	f
+ lib/readline/xmalloc.h	f
+-lib/readline/doc/Makefile	f
+ lib/readline/doc/manvers.texinfo	f
+ lib/readline/doc/rlman.texinfo	f
+ lib/readline/doc/rltech.texinfo	f
+@@ -417,6 +423,182 @@
+ CWRU/changelog		f
+ CWRU/sh-redir-hack	f
+ CWRU/mh-folder-comp	f
++debugger/AUTHORS	f
++debugger/CHANGES	f
++debugger/COPYING	f
++debugger/ChangeLog	f
++debugger/INSTALL	f
++debugger/Makefile	f
++debugger/Makefile.am	f
++debugger/Makefile.in	f
++debugger/NEWS		f
++debugger/README		f
++debugger/THANKS		f
++debugger/TODO		f
++debugger/aclocal.m4	f
++debugger/acinclude.m4	f
++debugger/bashdb		f       755
++debugger/bashdb.in	f       755
++debugger/dbg-brk.inc	f
++debugger/dbg-cmds.inc	f
++debugger/dbg-file.inc	f
++debugger/dbg-fns.inc	f
++debugger/dbg-help.inc	f
++debugger/dbg-hist.inc	f
++debugger/dbg-init.inc	f
++debugger/dbg-io.inc	f
++debugger/dbg-list.inc	f
++debugger/dbg-main.inc.in	f
++debugger/dbg-pre.inc.in	f
++debugger/dbg-set.inc	f
++debugger/dbg-set-d-vars.inc	f
++debugger/dbg-sig.inc		f
++debugger/dbg-sig-ret.inc	f
++debugger/dbg-stack.inc		f
++debugger/configure		f 	755
++debugger/configure.ac		f
++debugger/elisp-comp		f
++debugger/install-sh		f	755
++debugger/missing		f	755
++debugger/mkinstalldirs		f	755
++debugger/doc/Makefile		f
++debugger/doc/Makefile.am	f
++debugger/doc/Makefile.in	f
++debugger/doc/bashdb.1		f
++debugger/doc/bashdb.info	f
++debugger/doc/bashdb.info-1	f
++debugger/doc/bashdb.info-2	f
++debugger/doc/bashdb.info-3	f
++debugger/doc/bashdb.info-4	f
++debugger/doc/bashdb.texi	f
++debugger/doc/bashdb.html	f
++debugger/doc/bashdb-man.html	f
++debugger/doc/bashdb-man.pod	f
++debugger/doc/fdl.texi		f
++debugger/doc/gpl.texi		f
++debugger/doc/mdate-sh		f
++debugger/doc/version.texi	f
++debugger/doc/version.texi.in	f
++debugger/emacs/Makefile		f
++debugger/emacs/Makefile.am	f
++debugger/emacs/Makefile.in	f
++debugger/emacs/gud.el		f
++debugger/emacs/gud.el.diff	f
++debugger/emacs/bashdb.el	f
++debugger/test/Makefile		f
++debugger/test/Makefile.am	f
++debugger/test/Makefile.in	f
++debugger/test/check_common	f
++debugger/test/check_common.in	f
++debugger/test/dbg-test1.sh	f       755
++debugger/test/dbg-test1.sub	f
++debugger/test/dbg-test2.sh	f       755
++debugger/test/action.cmd	f
++debugger/test/action.right	f
++debugger/test/action.tests	f	755
++debugger/test/brkpt1.cmd	f
++debugger/test/brkpt1.right	f
++debugger/test/brkpt1.tests	f	755
++debugger/test/brkpt2.cmd	f
++debugger/test/brkpt2.right	f
++debugger/test/brkpt2.tests	f	755
++debugger/test/brkpt3.cmd	f
++debugger/test/brkpt3.right	f
++debugger/test/brkpt3.tests	f	755
++debugger/test/bugIFS		f
++debugger/test/bugIFS.cmd	f
++debugger/test/bugIFS.right	f
++debugger/test/bugIFS.sh	f	755
++debugger/test/bugIFS.tests	f	755
++debugger/test/debug.cmd	f
++debugger/test/debug2.cmd	f
++debugger/test/debug.right	f
++debugger/test/debug.sh		f	755
++debugger/test/debug.tests	f	755
++debugger/test/display.cmd	f
++debugger/test/display.right	f
++debugger/test/display.tests	f	755
++debugger/test/finish.cmd	f
++debugger/test/finish.right	f
++debugger/test/finish.tests	f	755
++debugger/test/list.cmd		f
++debugger/test/list.right	f
++debugger/test/list.tests	f	755
++debugger/test/misc.cmd		f
++debugger/test/misc.right	f
++debugger/test/misc-output.right f
++debugger/test/multi.sh		f	755
++debugger/test/multi1.tests	f
++debugger/test/multi1.cmd	f
++debugger/test/multi1.right	f
++debugger/test/multi2.tests	f
++debugger/test/multi2.cmd	f
++debugger/test/multi2.right	f
++debugger/test/multi3.tests	f
++debugger/test/multi3.cmd	f
++debugger/test/multi3.right	f
++debugger/test/multi4.tests	f
++debugger/test/multi4.cmd	f
++debugger/test/multi4.right	f
++debugger/test/misc-output.right f
++debugger/test/misc.tests	f	755
++debugger/test/subshell.sh 	f	755
++debugger/test/subshell1.cmd	f
++debugger/test/subshell1.right	f
++debugger/test/subshell1.tests	f	755
++debugger/test/subshell2.cmd	f
++debugger/test/subshell2.right	f
++debugger/test/subshell2.tests	f	755
++debugger/test/subshell3.cmd	f
++debugger/test/subshell3.right	f
++debugger/test/subshell3.tests	f	755
++debugger/test/subshell4.cmd	f
++debugger/test/subshell4.right	f
++debugger/test/subshell4.tests	f	755
++debugger/test/parm.cmd		f
++debugger/test/parm.right	f
++debugger/test/parm.sh		f       755
++debugger/test/parm.tests	f	755
++debugger/test/prof1.cmd	f
++debugger/test/prof2.cmd	f	
++debugger/test/search.cmd	f
++debugger/test/search.right	f
++debugger/test/search.tests	f	755
++debugger/test/sig.cmd		f
++debugger/test/sig.right	f
++debugger/test/sig.sh	        f	755
++debugger/test/sig.tests	f	755
++debugger/test/skip.cmd		f
++debugger/test/skip.right	f
++debugger/test/skip.sh	        f	755
++debugger/test/skip.tests	f	755
++debugger/test/tbreak.cmd	f
++debugger/test/tbreak.right	f
++debugger/test/tbreak.tests	f	755
++debugger/test/watch1.cmd	f
++debugger/test/watch1.right	f
++debugger/test/watch1.tests	f	755
++debugger/test/watch2.cmd	f
++debugger/test/watch2.right	f
++debugger/test/watch2.tests	f	755
++debugger/test/run-action	f	755
++debugger/test/run-all		f	755
++debugger/test/run-brkpt	f	755
++debugger/test/run-bugIFS	f	755
++debugger/test/run-debug	f	755
++debugger/test/run-display	f	755
++debugger/test/run-finish	f	755
++debugger/test/run-list		f	755
++debugger/test/run-misc		f	755
++debugger/test/run-multi		f	755
++debugger/test/run-parm		f	755
++debugger/test/run-search	f	755
++debugger/test/run-sig		f	755
++debugger/test/run-skip		f	755
++debugger/test/run-subshell	f	755
++debugger/test/run-tbreak	f	755
++debugger/test/run-watch1	f	755
++debugger/test/run-watch2	f	755
+ doc/FAQ		f
+ doc/Makefile.in	f
+ doc/bash.1	f
+@@ -427,7 +609,13 @@
+ doc/INTRO	f
+ doc/texinfo.tex	f
+ doc/bashref.texi	f
+-doc/bashref.info	f
++doc/bashref.dvi	f
++doc/bashref.html	f
++doc/bash.info	f
++doc/version.texi	f
++doc/version.texi.in	f
++doc/fdl.texi	f
++doc/gpl.texi	f
+ doc/article.ms	f
+ doc/htmlpost.sh	f	755
+ support/Makefile.in	f
+@@ -441,6 +629,7 @@
+ support/mkclone		f	755
+ support/mkconffiles	f	755
+ support/mkdirs		f	755
++support/mkdist		f	755
+ support/mkversion.sh	f	755
+ support/mksignames.c	f
+ support/bashbug.sh	f
+@@ -456,8 +645,8 @@
+ support/shobj-conf	f	755
+ support/rlvers.sh	f	755
+ examples/bashdb/PERMISSION	f
++examples/bashdb/README	f
+ examples/bashdb/bashdb		f
+-examples/bashdb/bashdb.el	f
+ examples/obashdb/PERMISSION	f
+ examples/obashdb/README	f
+ examples/obashdb/bashdb	f
+@@ -611,10 +800,13 @@
+ tests/array2.right	f
+ tests/braces-tests	f
+ tests/braces.right	f
++tests/bashdb-bp.tests	f 	755
+ tests/builtins.tests	f
+ tests/builtins.right	f
+ tests/builtins1.sub	f
+ tests/builtins2.sub	f
++tests/check_common	f
++tests/check_common.in	f
+ tests/source1.sub	f
+ tests/source2.sub	f
+ tests/source3.sub	f
+@@ -622,15 +814,25 @@
+ tests/source5.sub	f
+ tests/cond.tests	f
+ tests/cond.right	f
+-tests/cprint.tests	f
++tests/dbg-fns		f
++tests/dbg-fns.dat	f
++tests/dbg-is-fn.right	f
++tests/dbg-is-fn.tests	f	755
++tests/dbg-support.sub	f
++tests/dbg-support.right	f	
++tests/dbg-support.tests	f	755
++tests/dbg-support2.right	f	
++tests/dbg-support2.tests	f	755
+ tests/cprint.right	f
++tests/cprint.tests	f
+ tests/dollar-at-star	f
+ tests/dollar.right	f
+ tests/dstack.tests	f
+ tests/dstack.right	f
+ tests/dstack2.tests	f
+ tests/dstack2.right	f
+-tests/errors.tests	f
++tests/errors.sub	f
++tests/errors.tests	f	755
+ tests/errors.right	f
+ tests/execscript	f
+ tests/exec.right	f
+@@ -663,7 +865,7 @@
+ tests/glob-test		f
+ tests/glob1.sub		f
+ tests/glob.right	f
+-tests/heredoc.tests	f
++tests/heredoc.tests	f	755
+ tests/heredoc.right	f
+ tests/herestr.tests	f
+ tests/herestr.right	f
+@@ -695,9 +897,9 @@
+ tests/nquote.right	f
+ tests/nquote1.tests	f
+ tests/nquote1.right	f
+-tests/nquote2.tests	f
++tests/nquote2.tests	f	755
+ tests/nquote2.right	f
+-tests/nquote3.tests	f
++tests/nquote3.tests	f	755
+ tests/nquote3.right	f
+ tests/posix2.tests	f
+ tests/posix2.right	f
+@@ -709,13 +911,13 @@
+ tests/printf.right	f
+ tests/quote.tests	f
+ tests/quote.right	f
+-tests/read.tests	f
++tests/read.tests	f	755
+ tests/read.right	f
+ tests/read1.sub		f
+ tests/read2.sub		f
+ tests/read3.sub		f
+ tests/read4.sub		f
+-tests/redir.tests	f
++tests/redir.tests	f	755
+ tests/redir.right	f
+ tests/redir1.sub	f
+ tests/redir2.sub	f
+@@ -725,77 +927,83 @@
+ tests/redir4.sub	f
+ tests/redir4.in1	f
+ tests/redir5.sub	f
+-tests/rhs-exp.tests	f
++tests/rhs-exp.tests	f	755
+ tests/rhs-exp.right	f
+ tests/rsh.tests		f
+ tests/rsh.right		f
+-tests/run-all		f
+-tests/run-minimal	f
+-tests/run-arith-for	f
+-tests/run-arith		f
+-tests/run-array		f
+-tests/run-array2	f
+-tests/run-braces	f
+-tests/run-builtins	f
+-tests/run-cond		f
+-tests/run-cprint	f
+-tests/run-dirstack	f
+-tests/run-dollars	f
+-tests/run-errors	f
+-tests/run-execscript	f
+-tests/run-exp-tests	f
+-tests/run-extglob	f
+-tests/run-extglob2	f
+-tests/run-func		f
+-tests/run-getopts	f
+-tests/run-glob-test	f
+-tests/run-heredoc	f
+-tests/run-herestr	f
+-tests/run-histexpand	f
+-tests/run-history	f
+-tests/run-ifs		f
+-tests/run-input-test	f
+-tests/run-invert	f
+-tests/run-jobs		f
+-tests/run-more-exp	f
+-tests/run-new-exp	f
+-tests/run-nquote	f
+-tests/run-nquote1	f
+-tests/run-nquote2	f
+-tests/run-nquote3	f
+-tests/run-posix2	f
+-tests/run-posixpat	f
+-tests/run-precedence	f
+-tests/run-printf	f
+-tests/run-quote		f
+-tests/run-read		f
+-tests/run-redir		f
+-tests/run-rhs-exp	f
+-tests/run-rsh		f
+-tests/run-set-e		f
+-tests/run-shopt		f
+-tests/run-strip		f
+-tests/run-test		f
+-tests/run-tilde		f
+-tests/run-trap		f
+-tests/run-type		f
+-tests/run-varenv	f
++tests/run-all		f	755
++tests/run-minimal	f	755
++tests/run-arith-for	f	755
++tests/run-arith		f	755
++tests/run-array		f	755
++tests/run-array2	f	755
++tests/run-braces	f	755
++tests/run-builtins	f	755
++tests/run-cond		f	755
++tests/run-cprint	f	755
++tests/run-dirstack	f	755
++tests/run-dbg-is-fn	f	755
++tests/run-dbg-support	f	755
++tests/run-dbg-support2	f	755
++tests/run-dollars	f	755
++tests/run-errors	f	755
++tests/run-execscript	f	755
++tests/run-exp-tests	f	755
++tests/run-extglob	f	755
++tests/run-extglob2	f	755
++tests/run-func		f	755
++tests/run-getopts	f	755
++tests/run-glob-test	f	755
++tests/run-heredoc	f	755
++tests/run-herestr	f	755
++tests/run-histexpand	f	755
++tests/run-history	f	755
++tests/run-ifs		f	755
++tests/run-input-test	f	755
++tests/run-invert	f	755
++tests/run-jobs		f	755
++tests/run-more-exp	f	755
++tests/run-new-exp	f	755
++tests/run-nquote	f	755
++tests/run-nquote1	f	755
++tests/run-nquote2	f	755
++tests/run-nquote3	f	755
++tests/run-posix2	f	755
++tests/run-posixpat	f	755
++tests/run-precedence	f	755
++tests/run-printf	f	755
++tests/run-quote		f	755
++tests/run-read		f	755
++tests/run-redir		f	755
++tests/run-rhs-exp	f	755
++tests/run-rsh		f	755
++tests/run-set-e		f	755
++tests/run-set-x		f	755
++tests/run-shopt		f	755
++tests/run-strip		f	755
++tests/run-test		f	755
++tests/run-tilde		f	755
++tests/run-trap		f	755
++tests/run-type		f	755
++tests/run-varenv	f	755
+ tests/set-e-test	f
+ tests/set-e.right	f
+-tests/shopt.tests	f	
++tests/set-x.tests	f	755
++tests/set-x.right	f
++tests/shopt.tests	f	755
+ tests/shopt.right	f
+-tests/strip.tests	f
++tests/strip.tests	f	755
+ tests/strip.right	f
+-tests/test.tests	f
++tests/test.tests	f	755
+ tests/test.right	f
+-tests/tilde-tests	f
++tests/tilde-tests	f	755
+ tests/tilde.right	f
+-tests/trap.tests	f
++tests/trap.tests	f	755
+ tests/trap.right	f
+ tests/trap1.sub		f	755
+ tests/trap2.sub		f	755
+ tests/trap2a.sub	f	755
+-tests/type.tests	f
++tests/type.tests	f	755
+ tests/type.right	f
+ tests/varenv.right	f
+ tests/varenv.sh		f
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/Makefile.in cvs/Makefile.in
+--- bash-2.05b/Makefile.in	2002-05-31 19:44:23.000000000 +0200
++++ cvs/Makefile.in	2003-09-08 08:40:14.000000000 +0200
+@@ -38,6 +38,7 @@
+ man3dir = $(mandir)/$(manpfx)3
+ 
+ htmldir = @htmldir@
++transform = @program_transform_name@
+ 
+ # Support an alternate destination root directory for package building
+ DESTDIR =
+@@ -395,6 +396,7 @@
+ DEFSRC=$(BUILTIN_SRCDIR)
+ BUILTIN_ABSSRC=${topdir}/builtins
+ DEFDIR = $(dot)/builtins
++DEBUGGERDIR = $(dot)/debugger
+ 
+ BUILTIN_DEFS = $(DEFSRC)/alias.def $(DEFSRC)/bind.def $(DEFSRC)/break.def \
+ 	       $(DEFSRC)/builtin.def $(DEFSRC)/cd.def $(DEFSRC)/colon.def \
+@@ -464,7 +466,7 @@
+ # Keep GNU Make from exporting the entire environment for small machines.
+ .NOEXPORT:
+ 
+-.made: $(Program) bashbug
++.made: .prebuild $(Program) bashbug doc debugger
+ 	@echo "$(Program) last made for a $(Machine) running $(OS)" >.made
+ 
+ $(Program):  .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP)
+@@ -473,6 +475,14 @@
+ 	ls -l $(Program)
+ 	size $(Program)
+ 
++.prebuild:
++	@(oldpwd=`pwd`; cd $(srcdir) &&\
++	if test "X`pwd`" != "X$(BUILD_DIR)" ; then \
++		${CP} $$oldpwd/pathnames.h $(srcdir)/ ; \
++		${CP} $$oldpwd/doc/version.texi $(srcdir)/doc/ ; \
++		${CP} $$oldpwd/doc/version.texi $(srcdir)/debugger/doc/ ; \
++	fi)
++
+ .build:	$(SOURCES) config.h Makefile version.h $(VERSPROG)
+ 	@echo
+ 	@echo "	  ***********************************************************"
+@@ -498,6 +508,9 @@
+ lint:
+ 	${MAKE} ${MFLAGS} CFLAGS='${GCC_LINT_FLAGS}' .made
+ 
++aclocal.m4: bashlocal.m4
++	aclocal -I @srcdir@
++
+ version.h:  $(SOURCES) config.h Makefile 
+ 	$(SHELL) $(SUPPORT_SRC)mkversion.sh -b -S ${topdir} -s $(RELSTATUS) -d $(Version) -o newversion.h \
+ 		&& mv newversion.h version.h
+@@ -594,8 +607,8 @@
+ # For the justification of the following Makefile rules, see node
+ # `Automatic Remaking' in GNU Autoconf documentation.
+ 
+-Makefile makefile:	config.status $(srcdir)/Makefile.in
+-	CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
++Makefile makefile pathnames.h:	config.status $(srcdir)/Makefile.in
++	CONFIG_HEADERS= $(SHELL) ./config.status
+ 
+ Makefiles makefiles:	config.status $(srcdir)/Makefile.in
+ 	@for mf in $(CREATED_MAKEFILES); do \
+@@ -627,6 +640,9 @@
+ doc documentation:  force
+ 	@(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) )
+ 
++debugger: force
++	@( cd $(DEBUGGERDIR) ; $(MAKE) $(MFLAGS) info man html )
++
+ info dvi ps: force
+ 	@(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) CFLAGS='$(CCFLAGS)' $@ )
+ 
+@@ -646,13 +662,14 @@
+ 	@${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(infodir)
+ 
+ install:	.made installdirs
+-	$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program)
+-	$(INSTALL_SCRIPT) $(INSTALLMODE2) bashbug $(DESTDIR)$(bindir)/bashbug
++	$(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/`echo $(Program) | sed '$(transform)'`
++	$(INSTALL_SCRIPT) $(INSTALLMODE2) bashbug $(DESTDIR)$(bindir)/`echo bashbug | sed '$(transform)'`
+ 	-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
+ 		man1dir=$(man1dir) man1ext=$(man1ext) \
+ 		man3dir=$(man3dir) man3ext=$(man3ext) \
+ 		infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ )
+ 	-( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
++	-( cd $(DEBUGGERDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+ 
+ install-strip:
+ 	$(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
+@@ -660,17 +677,21 @@
+ 		DESTDIR=$(DESTDIR) install
+ 
+ uninstall:	.made
+-	$(RM) $(DESTDIR)$(bindir)/$(Program) $(DESTDIR)$(bindir)/bashbug
++	for p in $(DESTDIR)$(bindir)/$(Program) $(DESTDIR)$(bindir)/bashbug; do \
++		$(RM) $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`; \
++	done
+ 	-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
+ 		man1dir=$(man1dir) man1ext=$(man1ext) \
+ 		man3dir=$(man3dir) man3ext=$(man3ext) \
+ 		infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ )
++	-( cd $(DEBUGGERDIR) ; $(MAKE) $(MFLAGS) $@ )
+ 
+ .PHONY: basic-clean clean realclean maintainer-clean distclean mostlyclean maybe-clean
+ 
+ basic-clean:
+ 	$(RM) $(OBJECTS) $(Program) bashbug
+-	$(RM) .build .made version.h
++	$(RM) .build .made version.h pathname.h 
++	$(RM) *.tar.gz *~ */*~
+ 
+ clean:	basic-clean
+ 	( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
+@@ -747,16 +768,16 @@
+ 	@cp $(TESTS_SUPPORT) tests
+ 	@( cd $(srcdir)/tests && \
+ 		PATH=$$PATH:$(BUILD_DIR)/tests THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
++	@( cd $(srcdir)/debugger && make check )
+ 
+ symlinks:
+ 	$(SHELL) $(SUPPORT_SRC)fixlinks -s $(srcdir)
+ 
+ dist:	force
+-	@echo Bash distributions are created using $(srcdir)/support/mkdist.
+-	@echo Here is a sample of the necessary commands:
+-	@echo $(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${Program} $(Version)-${RELSTATUS}
+-	@echo tar cf $(Program)-$(Version)-${RELSTATUS}.tar ${Program}-$(Version)-${RELSTATUS}
+-	@echo gzip $(Program)-$(Version)-${RELSTATUS}.tar
++	$(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${Program} $(Version)-${RELSTATUS}
++	tar cf $(Program)-$(Version)-${RELSTATUS}.tar ${Program}-$(Version)-${RELSTATUS}
++	gzip $(Program)-$(Version)-${RELSTATUS}.tar
++	rm -fr $(Program)-$(Version)-${RELSTATUS}
+ 
+ depend:	depends
+ 
+@@ -767,6 +788,10 @@
+ hashtest:	hashlib.c
+ 	$(CC) -DTEST_HASHING $(CCFLAGS) -o $@ $(srcdir)/hashlib.c
+ 
++arraytest:	array.c xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a
++	$(CC) -c -DTEST_ARRAY $(CCFLAGS) -o arraytest.o $(srcdir)/array.c
++	$(CC) $(CCFLAGS) -o $@ $(srcdir)/arraytest.o xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a list.o
++
+ ############################ DEPENDENCIES ###############################
+ 
+ # Files that depend on the definitions in config-top.h, which are not meant
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/README cvs/README
+--- bash-2.05b/README	2002-04-04 18:02:55.000000000 +0200
++++ cvs/README	2002-09-17 13:57:46.000000000 +0200
+@@ -1,15 +1,20 @@
+ Introduction
+ ============
+ 
+-This is GNU Bash, version 2.05b.  Bash is the GNU Project's Bourne
+-Again SHell, a complete implementation of the POSIX.2 shell spec,
+-but also with interactive command line editing, job control on
+-architectures that support it, csh-like features such as history
+-substitution and brace expansion, and a slew of other features. 
+-For more information on the features of Bash that are new to this
+-type of shell, see the file `doc/bashref.texi'.  There is also a
+-large Unix-style man page.  The man page is the definitive description
+-of the shell's features. 
++This is GNU Bash, version 2.05b-debugger.  A patched version of Bash
++2.05b to provide debugging support and better error reporting. 
++
++Bash is the GNU Project's Bourne Again SHell, a complete
++implementation of the POSIX.2 shell spec, but also with interactive
++command line editing, job control on architectures that support it,
++csh-like features such as history substitution and brace expansion,
++and a slew of other features.  For more information on the features of
++Bash that are new to this type of shell, see the file
++`doc/bashref.texi'.  There is also a large Unix-style man page.  The
++man page is the definitive description of the shell's features.
++
++For more information on the features of the Bash debugger, see
++doc/bashdb.texi.
+ 
+ See the file CWRU/POSIX.NOTES for a discussion of how Bash differs
+ from the POSIX.2 spec and a description of the Bash `posix mode'.
+@@ -27,8 +32,13 @@
+ `doc/FAQ'.
+ 
+ To compile Bash, try typing `./configure', then `make'.  Bash
+-auto-configures the build process, so no further intervention
+-should be necessary.  Bash builds with `gcc' by default if it is
++auto-configures the build process, so no most intervention is not
++necessary.  However one can customize where the binaries should go or
++where to install debugger lisp files. To see the list of
++customizations available, type ./configure --help.
++
++
++Bash builds with `gcc' by default if it is
+ available.  If you want to use `cc' instead, type
+ 
+ 	CC=cc ./configure
+@@ -50,8 +60,21 @@
+ Reporting Bugs
+ ==============
+ 
+-Bug reports for bash should be sent to:
++If the problem is in the debugger rather than bash (i.e. you don't
++have the same problem using an unpatched version of Bash, send bug
++reports to:
++
++	bug-bashdb@sourceforge.net.
++
++The discussion list `bug-devel@gnu.org' contains developer information
++and discussions of new features or behavior changes that people would
++like.  This mailing list is also available as a usenet newsgroup:
++gnu.bash.bug.
+ 
++If the problem is not debugger-related (i.e. you do have the same
++problem using an unmodified version bash), send bug reports to 
++
++Bug reports for bash should be sent to:
+ 	bug-bash@gnu.org
+ 
+ using the `bashbug' program that is built and installed at the same
+@@ -88,3 +111,8 @@
+ 
+ Chet Ramey
+ chet@po.cwru.edu
++
++with modifications for the Bash Debugger by Rocky Bernstein 
++rocky@panix.com
++
++$Id: README,v 1.3 2002/09/17 11:57:46 rockyb Exp $
+Only in bash-2.05b: aclocal.m4
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/array.c cvs/array.c
+--- bash-2.05b/array.c	2002-03-18 19:16:50.000000000 +0100
++++ cvs/array.c	2002-10-10 14:34:00.000000000 +0200
+@@ -365,8 +365,10 @@
+ array_dispose_element(ae)
+ ARRAY_ELEMENT	*ae;
+ {
+-	FREE(ae->value);
+-	free(ae);
++  if (NULL != ae) {
++    FREE(ae->value);
++    free(ae);
++  }
+ }
+ 
+ /*
+@@ -650,10 +652,67 @@
+ }
+ #endif
+ 
++/*
++  Delete the beginning of array A, subtracting one from all other
++  array element indices. 
++  Return the element. The caller should dispose of it.
++*/
++ARRAY_ELEMENT *
++array_unshift_element(a)
++ARRAY	*a;
++{
++	register ARRAY_ELEMENT *ae, *first;
++
++	if (!a || array_empty(a))
++		return((ARRAY_ELEMENT *) NULL);
++	first=element_forw(a->head);
++	first->next->prev = first->prev;
++	first->prev->next = first->next;
++	a->num_elements--;
++	a->max_index--;
++
++	/* Renumber the element array indices. */
++	for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) 
++	  element_index(ae)--;
++
++	return(first);
++}
++
++/*
++  Add a new element with index to beginning of array a, adding one to
++  all other array indices. Return the number of elements after adding.
++ */
++int
++array_shift_element(a, v)
++ARRAY	*a;
++char	*v;
++{
++  register ARRAY_ELEMENT *new, *ae, *temp;
++  arrayind_t i=0;
++  
++  if (!a)
++    return(-1);
++  new = array_create_element(0, v);
++  temp=element_forw(a->head);
++  ADD_BEFORE(temp, new);
++
++  a->num_elements++;
++  a->max_index++;
++  
++  /*
++   * Renumber all the other elements in the array.
++   */
++  for (ae = element_forw(new); ae != a->head; ae = element_forw(ae)) {
++    element_index(ae) = ++i;
++  }
++  return (a->num_elements);
++}
++
++
+ #if defined (TEST_ARRAY)
+ /*
+  * To make a running version, compile -DTEST_ARRAY and link with:
+- * 	xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a
++ * 	xmalloc.o syntax.o list.o lib/malloc/libmalloc.a lib/sh/libsh.a
+  */
+ int interrupt_immediately = 0;
+ 
+@@ -723,21 +782,6 @@
+ 	return (REVERSE_LIST (wl, WORD_LIST *));
+ }
+ 
+-GENERIC_LIST *
+-list_reverse (list)
+-GENERIC_LIST	*list;
+-{
+-	register GENERIC_LIST *next, *prev;
+-
+-	for (prev = 0; list; ) {
+-		next = list->next;
+-		list->next = prev;
+-		prev = list;
+-		list = next;
+-	}
+-	return prev;
+-}
+-
+ char *
+ pat_subst(s, t, u, i)
+ char	*s, *t, *u;
+@@ -772,7 +816,7 @@
+ 
+ main()
+ {
+-	ARRAY	*a, *new_a, *copy_of_a;
++ 	ARRAY	*a, *new_a, *copy_of_a, *stack;
+ 	ARRAY_ELEMENT	*ae, *aew;
+ 	char	*s;
+ 
+@@ -784,24 +828,29 @@
+ 	array_insert(a, 12, "twelve");
+ 	array_insert(a, 42, "forty-two");
+ 	print_array(a);
++	printf("\n=> s = array_to_string(a, \" \", 0);\n");
+ 	s = array_to_string (a, " ", 0);
+ 	printf("s = %s\n", s);
++	printf("\n=> copy_of_a = array_from_string(s, \" \");\n");
+ 	copy_of_a = array_from_string(s, " ");
+-	printf("copy_of_a:");
+ 	print_array(copy_of_a);
+ 	array_dispose(copy_of_a);
+ 	printf("\n");
+ 	free(s);
++	printf("=> s = array_remove(a, 4);\n");
+ 	ae = array_remove(a, 4);
+ 	array_dispose_element(ae);
++	printf("=> s = array_remove(a, 1029);\n");
+ 	ae = array_remove(a, 1029);
+ 	array_dispose_element(ae);
++	printf("=> s = array_insert(a, 16, \"sixteen\"\n);\n");
+ 	array_insert(a, 16, "sixteen");
+ 	print_array(a);
++	printf("\n=> s = array_to_string(a, \" \", 0);\n");
+ 	s = array_to_string (a, " ", 0);
+ 	printf("s = %s\n", s);
++	printf("\n=> copy_of_a = array_from_string(s, \" \");\n");
+ 	copy_of_a = array_from_string(s, " ");
+-	printf("copy_of_a:");
+ 	print_array(copy_of_a);
+ 	array_dispose(copy_of_a);
+ 	printf("\n");
+@@ -811,10 +860,11 @@
+ 	array_insert(a, 0, "zero");
+ 	array_insert(a, 134, "");
+ 	print_array(a);
++	printf("\n=> s = array_to_string(a, \":\", 0);\n");
+ 	s = array_to_string (a, ":", 0);
+ 	printf("s = %s\n", s);
++	printf("\n=> copy_of_a = array_from_string(s, \" \");\n");
+ 	copy_of_a = array_from_string(s, ":");
+-	printf("copy_of_a:");
+ 	print_array(copy_of_a);
+ 	array_dispose(copy_of_a);
+ 	printf("\n");
+@@ -857,6 +907,23 @@
+ 	printf("\n");
+ 	array_dispose(a);
+ 	array_dispose(new_a);
++
++ 	stack = array_create();
++ 	array_shift_element(stack, "first");
++ 	print_array(stack);
++	printf("\n=> array_shift_element(stack, \"second\");\n");
++ 	array_shift_element(stack, "second");
++ 	print_array(stack);
++	printf("\n=> array_unshift_element(stack);\n");
++ 	ae = array_unshift_element(stack);
++ 	array_dispose_element(ae);
++ 	print_array(stack);
++	printf("\n=> array_unshift_element(stack);\n");
++ 	ae = array_unshift_element(stack);
++ 	array_dispose_element(ae);
++ 	print_array(stack);
++	printf("** should see empty nothing above.***\n");
++	array_dispose(stack);
+ }
+ 
+ #endif /* TEST_ARRAY */
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/array.h cvs/array.h
+--- bash-2.05b/array.h	2002-03-14 14:42:51.000000000 +0100
++++ cvs/array.h	2002-08-23 06:17:00.000000000 +0200
+@@ -51,6 +51,7 @@
+ extern void	array_walk __P((ARRAY   *, sh_ae_map_func_t *));
+ 
+ extern ARRAY_ELEMENT *array_shift __P((ARRAY *, int, int));
++extern ARRAY_ELEMENT *array_unshift_element __P((ARRAY *));
+ extern int	array_rshift __P((ARRAY *, int, char *));
+ extern ARRAY	*array_quote __P((ARRAY *));
+ 
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/autogen.sh cvs/autogen.sh
+--- bash-2.05b/autogen.sh	1970-01-01 01:00:00.000000000 +0100
++++ cvs/autogen.sh	2002-09-19 18:39:08.000000000 +0200
+@@ -0,0 +1,20 @@
++#!/bin/sh
++# $Id: autogen.sh,v 1.2 2002/09/19 16:39:08 masata-y Exp $ 
++# Run this to generate all the initial Makefiles, etc.
++
++./bootstrap.sh $@
++
++echo " + Running 'configure $@':"
++if [ -z "$*" ]; then
++    echo "   ** If you wish to pass arguments to ./configure, please"
++    echo "   ** specify them on the command line."
++fi
++
++./configure "$@" && \
++    echo "Now type 'make' to compile $PKG_NAME" || exit 1
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
++
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/bashhist.c cvs/bashhist.c
+--- bash-2.05b/bashhist.c	2002-03-12 16:29:56.000000000 +0100
++++ cvs/bashhist.c	2003-05-24 22:13:47.000000000 +0200
+@@ -206,6 +206,7 @@
+   history_quotes_inhibit_expansion = 1;
+   history_search_delimiter_chars = ";&()|<>";
+   history_inhibit_expansion_function = bash_history_inhibit_expansion;
++  history_comment_char = '#';
+ }
+ 
+ void
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/bashline.c cvs/bashline.c
+--- bash-2.05b/bashline.c	2002-05-07 21:52:42.000000000 +0200
++++ cvs/bashline.c	2002-12-07 04:51:32.000000000 +0100
+@@ -747,7 +747,7 @@
+   /* Now, POSIX.1-2001 and SUSv3 say that the commands executed from the
+      temporary file should be placed into the history.  We don't do that
+      yet. */
+-  r = parse_and_execute (command, (editing_mode == VI_EDITING_MODE) ? "v" : "C-xC-e", SEVAL_NOHIST);
++  r = parse_and_execute (command, (editing_mode == VI_EDITING_MODE) ? "v" : "C-xC-e", SEVAL_NOHIST, 0);
+ 
+   current_command_line_count = cclc;
+ 
+@@ -1044,7 +1044,10 @@
+ 	}
+       else
+ 	{
++#define CMD_IS_DIR(x)	(absolute_pathname(x) == 0 && *(x) != '~' && test_for_directory (x))
++
+ 	  matches = rl_completion_matches (text, command_word_completion_function);
++
+ 	  /* If we are attempting command completion and nothing matches, we
+ 	     do not want readline to perform filename completion for us.  We
+ 	     still want to be able to complete partial pathnames, so set the
+@@ -1052,7 +1055,7 @@
+ 	     filenames and leave directories in the match list. */
+ 	  if (matches == (char **)NULL)
+ 	    rl_ignore_some_completions_function = bash_ignore_filenames;
+-	  else if (matches[1] == 0 && *matches[0] != '/')
++	  else if (matches[1] == 0 && CMD_IS_DIR(matches[0]))
+ 	    /* Turn off rl_filename_completion_desired so readline doesn't
+ 	       append a slash if there is a directory with the same name
+ 	       in the current directory, or other filename-specific things.
+@@ -1061,7 +1064,7 @@
+ 	       looking in the current directory anyway, so there's no
+ 	       conflict. */
+ 	    rl_filename_completion_desired = 0;
+-	  else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && *matches[0] != '/')
++	  else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0]))
+ 	    /* There are multiple instances of the same match (duplicate
+ 	       completions haven't yet been removed).  In this case, all of
+ 	       the matches will be the same, and the duplicate removal code
+@@ -2717,7 +2720,7 @@
+   ts = save_token_state ();
+ 
+   cmd = savestring (cmd);
+-  parse_and_execute (cmd, "bash_execute_unix_command", SEVAL_NOHIST);
++  parse_and_execute (cmd, "bash_execute_unix_command", SEVAL_NOHIST, 0);
+ 
+   current_command_line_count = old_line_count;
+   restore_token_state (ts);
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/bashlocal.m4 cvs/bashlocal.m4
+--- bash-2.05b/bashlocal.m4	1970-01-01 01:00:00.000000000 +0100
++++ cvs/bashlocal.m4	2002-09-09 20:25:01.000000000 +0200
+@@ -0,0 +1,1792 @@
++dnl
++dnl Bash specific tests
++dnl
++dnl Some derived from PDKSH 5.1.3 autoconf tests
++dnl
++
++AC_DEFUN(BASH_C_LONG_LONG,
++[AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
++[if test "$GCC" = yes; then
++  ac_cv_c_long_long=yes
++else
++AC_TRY_RUN([
++int
++main()
++{
++long long foo = 0;
++exit(sizeof(long long) < sizeof(long));
++}
++], ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
++fi])
++if test $ac_cv_c_long_long = yes; then
++  AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.])
++fi
++])
++
++dnl
++dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX
++dnl (< changed to <=) added.
++dnl
++AC_DEFUN(BASH_C_LONG_DOUBLE,
++[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
++[if test "$GCC" = yes; then
++  ac_cv_c_long_double=yes
++else
++AC_TRY_RUN([
++int
++main()
++{
++  /* The Stardent Vistra knows sizeof(long double), but does not
++     support it. */
++  long double foo = 0.0;
++  /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
++  /* On IRIX 5.3, the compiler converts long double to double with a warning,
++     but compiles this successfully. */
++  exit(sizeof(long double) <= sizeof(double));
++}
++], ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
++fi])
++if test $ac_cv_c_long_double = yes; then
++  AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.])
++fi
++])
++
++dnl
++dnl Check for <inttypes.h>.  This is separated out so that it can be
++dnl AC_REQUIREd.
++dnl
++dnl BASH_HEADER_INTTYPES
++AC_DEFUN(BASH_HEADER_INTTYPES,
++[
++ AC_CHECK_HEADERS(inttypes.h)
++])
++
++dnl
++dnl check for typedef'd symbols in header files, but allow the caller to
++dnl specify the include files to be checked in addition to the default
++dnl 
++dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND])
++AC_DEFUN(BASH_CHECK_TYPE,
++[
++AC_REQUIRE([AC_HEADER_STDC])dnl
++AC_REQUIRE([BASH_HEADER_INTTYPES])
++AC_MSG_CHECKING(for $1)
++AC_CACHE_VAL(bash_cv_type_$1,
++[AC_EGREP_CPP($1, [#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
++#endif
++#if HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
++$2
++], bash_cv_type_$1=yes, bash_cv_type_$1=no)])
++AC_MSG_RESULT($bash_cv_type_$1)
++ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then
++	AC_DEFINE($4)
++	fi])
++if test $bash_cv_type_$1 = no; then
++  AC_DEFINE_UNQUOTED($1, $3)
++fi
++])
++
++dnl
++dnl BASH_CHECK_DECL(FUNC)
++dnl
++dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like
++dnl AC_CHECK_DECL
++dnl
++AC_DEFUN(BASH_CHECK_DECL,
++[
++AC_REQUIRE([AC_HEADER_STDC])
++AC_REQUIRE([BASH_HEADER_INTTYPES])
++AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1,
++[AC_TRY_LINK(
++[
++#if STDC_HEADERS
++#  include <stdlib.h>
++#endif
++#if HAVE_INTTYPES_H
++#  include <inttypes.h>
++#endif
++],
++[return !$1;],
++bash_cv_decl_$1=yes, bash_cv_decl_$1=no)])
++bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
++if test $bash_cv_decl_$1 = yes; then
++  AC_DEFINE_UNQUOTED($bash_tr_func, 1)
++else
++  AC_DEFINE_UNQUOTED($bash_tr_func, 0)
++fi
++])
++
++AC_DEFUN(BASH_DECL_PRINTF,
++[AC_MSG_CHECKING(for declaration of printf in <stdio.h>)
++AC_CACHE_VAL(bash_cv_printf_declared,
++[AC_TRY_RUN([
++#include <stdio.h>
++#ifdef __STDC__
++typedef int (*_bashfunc)(const char *, ...);
++#else
++typedef int (*_bashfunc)();
++#endif
++main()
++{
++_bashfunc pf;
++pf = (_bashfunc) printf;
++exit(pf == 0);
++}
++], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
++   [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes)
++    bash_cv_printf_declared=yes]
++)])
++AC_MSG_RESULT($bash_cv_printf_declared)
++if test $bash_cv_printf_declared = yes; then
++AC_DEFINE(PRINTF_DECLARED)
++fi
++])
++
++AC_DEFUN(BASH_DECL_SBRK,
++[AC_MSG_CHECKING(for declaration of sbrk in <unistd.h>)
++AC_CACHE_VAL(bash_cv_sbrk_declared,
++[AC_EGREP_HEADER(sbrk, unistd.h,
++ bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)])
++AC_MSG_RESULT($bash_cv_sbrk_declared)
++if test $bash_cv_sbrk_declared = yes; then
++AC_DEFINE(SBRK_DECLARED)
++fi
++])
++
++dnl
++dnl Check for sys_siglist[] or _sys_siglist[]
++dnl
++AC_DEFUN(BASH_DECL_UNDER_SYS_SIGLIST,
++[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h])
++AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
++[AC_TRY_COMPILE([
++#include <sys/types.h>
++#include <signal.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif], [ char *msg = _sys_siglist[2]; ],
++  bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
++  [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
++AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
++if test $bash_cv_decl_under_sys_siglist = yes; then
++AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
++fi
++])
++
++AC_DEFUN(BASH_UNDER_SYS_SIGLIST,
++[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
++AC_MSG_CHECKING([for _sys_siglist in system C library])
++AC_CACHE_VAL(bash_cv_under_sys_siglist,
++[AC_TRY_RUN([
++#include <sys/types.h>
++#include <signal.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++#ifndef UNDER_SYS_SIGLIST_DECLARED
++extern char *_sys_siglist[];
++#endif
++main()
++{
++char *msg = (char *)_sys_siglist[2];
++exit(msg == 0);
++}],
++	bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
++	[AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
++	 bash_cv_under_sys_siglist=no])])
++AC_MSG_RESULT($bash_cv_under_sys_siglist)
++if test $bash_cv_under_sys_siglist = yes; then
++AC_DEFINE(HAVE_UNDER_SYS_SIGLIST)
++fi
++])
++
++AC_DEFUN(BASH_SYS_SIGLIST,
++[AC_REQUIRE([AC_DECL_SYS_SIGLIST])
++AC_MSG_CHECKING([for sys_siglist in system C library])
++AC_CACHE_VAL(bash_cv_sys_siglist,
++[AC_TRY_RUN([
++#include <sys/types.h>
++#include <signal.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++#ifndef SYS_SIGLIST_DECLARED
++extern char *sys_siglist[];
++#endif
++main()
++{
++char *msg = sys_siglist[2];
++exit(msg == 0);
++}],
++	bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
++	[AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no)
++	 bash_cv_sys_siglist=no])])
++AC_MSG_RESULT($bash_cv_sys_siglist)
++if test $bash_cv_sys_siglist = yes; then
++AC_DEFINE(HAVE_SYS_SIGLIST)
++fi
++])
++
++dnl Check for the various permutations of sys_siglist and make sure we
++dnl compile in siglist.o if they're not defined
++AC_DEFUN(BASH_CHECK_SYS_SIGLIST, [
++AC_REQUIRE([BASH_SYS_SIGLIST])
++AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
++AC_REQUIRE([BASH_FUNC_STRSIGNAL])
++if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
++  SIGLIST_O=siglist.o
++else
++  SIGLIST_O=
++fi
++AC_SUBST([SIGLIST_O])
++])
++
++dnl Check for sys_errlist[] and sys_nerr, check for declaration
++AC_DEFUN(BASH_SYS_ERRLIST,
++[AC_MSG_CHECKING([for sys_errlist and sys_nerr])
++AC_CACHE_VAL(bash_cv_sys_errlist,
++[AC_TRY_LINK([#include <errno.h>],
++[extern char *sys_errlist[];
++ extern int sys_nerr;
++ char *msg = sys_errlist[sys_nerr - 1];],
++    bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl
++AC_MSG_RESULT($bash_cv_sys_errlist)
++if test $bash_cv_sys_errlist = yes; then
++AC_DEFINE(HAVE_SYS_ERRLIST)
++fi
++])
++
++dnl
++dnl Check if dup2() does not clear the close on exec flag
++dnl
++AC_DEFUN(BASH_FUNC_DUP2_CLOEXEC_CHECK,
++[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag)
++AC_CACHE_VAL(bash_cv_dup2_broken,
++[AC_TRY_RUN([
++#include <sys/types.h>
++#include <fcntl.h>
++main()
++{
++  int fd1, fd2, fl;
++  fd1 = open("/dev/null", 2);
++  if (fcntl(fd1, 2, 1) < 0)
++    exit(1);
++  fd2 = dup2(fd1, 1);
++  if (fd2 < 0)
++    exit(2);
++  fl = fcntl(fd2, 1, 0);
++  /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
++  exit(fl != 1);
++}
++], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no,
++    [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no)
++     bash_cv_dup2_broken=no])
++])
++AC_MSG_RESULT($bash_cv_dup2_broken)
++if test $bash_cv_dup2_broken = yes; then
++AC_DEFINE(DUP2_BROKEN)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_STRSIGNAL,
++[AC_MSG_CHECKING([for the existence of strsignal])
++AC_CACHE_VAL(bash_cv_have_strsignal,
++[AC_TRY_LINK([#include <sys/types.h>
++#include <signal.h>],
++[char *s = (char *)strsignal(2);],
++ bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)])
++AC_MSG_RESULT($bash_cv_have_strsignal)
++if test $bash_cv_have_strsignal = yes; then
++AC_DEFINE(HAVE_STRSIGNAL)
++fi
++])
++
++dnl Check to see if opendir will open non-directories (not a nice thing)
++AC_DEFUN(BASH_FUNC_OPENDIR_CHECK,
++[AC_REQUIRE([AC_HEADER_DIRENT])dnl
++AC_MSG_CHECKING(if opendir() opens non-directories)
++AC_CACHE_VAL(bash_cv_opendir_not_robust,
++[AC_TRY_RUN([
++#include <stdio.h>
++#include <sys/types.h>
++#include <fcntl.h>
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif /* HAVE_UNISTD_H */
++#if defined(HAVE_DIRENT_H)
++# include <dirent.h>
++#else
++# define dirent direct
++# ifdef HAVE_SYS_NDIR_H
++#  include <sys/ndir.h>
++# endif /* SYSNDIR */
++# ifdef HAVE_SYS_DIR_H
++#  include <sys/dir.h>
++# endif /* SYSDIR */
++# ifdef HAVE_NDIR_H
++#  include <ndir.h>
++# endif
++#endif /* HAVE_DIRENT_H */
++main()
++{
++DIR *dir;
++int fd, err;
++err = mkdir("/tmp/bash-aclocal", 0700);
++if (err < 0) {
++  perror("mkdir");
++  exit(1);
++}
++unlink("/tmp/bash-aclocal/not_a_directory");
++fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
++write(fd, "\n", 1);
++close(fd);
++dir = opendir("/tmp/bash-aclocal/not_a_directory");
++unlink("/tmp/bash-aclocal/not_a_directory");
++rmdir("/tmp/bash-aclocal");
++exit (dir == 0);
++}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
++    [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
++     bash_cv_opendir_not_robust=no]
++)])
++AC_MSG_RESULT($bash_cv_opendir_not_robust)
++if test $bash_cv_opendir_not_robust = yes; then
++AC_DEFINE(OPENDIR_NOT_ROBUST)
++fi
++])
++
++dnl
++AC_DEFUN(BASH_TYPE_SIGHANDLER,
++[AC_MSG_CHECKING([whether signal handlers are of type void])
++AC_CACHE_VAL(bash_cv_void_sighandler,
++[AC_TRY_COMPILE([#include <sys/types.h>
++#include <signal.h>
++#ifdef signal
++#undef signal
++#endif
++#ifdef __cplusplus
++extern "C"
++#endif
++void (*signal ()) ();],
++[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl
++AC_MSG_RESULT($bash_cv_void_sighandler)
++if test $bash_cv_void_sighandler = yes; then
++AC_DEFINE(VOID_SIGHANDLER)
++fi
++])
++
++dnl
++dnl A signed 16-bit integer quantity
++dnl
++AC_DEFUN(BASH_TYPE_BITS16_T,
++[
++if test "$ac_cv_sizeof_short" = 2; then
++  AC_CHECK_TYPE(bits16_t, short)
++elif test "$ac_cv_sizeof_char" = 2; then
++  AC_CHECK_TYPE(bits16_t, char)
++else
++  AC_CHECK_TYPE(bits16_t, short)
++fi
++])
++
++dnl
++dnl An unsigned 16-bit integer quantity
++dnl
++AC_DEFUN(BASH_TYPE_U_BITS16_T,
++[
++if test "$ac_cv_sizeof_short" = 2; then
++  AC_CHECK_TYPE(u_bits16_t, unsigned short)
++elif test "$ac_cv_sizeof_char" = 2; then
++  AC_CHECK_TYPE(u_bits16_t, unsigned char)
++else
++  AC_CHECK_TYPE(u_bits16_t, unsigned short)
++fi
++])
++
++dnl
++dnl A signed 32-bit integer quantity
++dnl
++AC_DEFUN(BASH_TYPE_BITS32_T,
++[
++if test "$ac_cv_sizeof_int" = 4; then
++  AC_CHECK_TYPE(bits32_t, int)
++elif test "$ac_cv_sizeof_long" = 4; then
++  AC_CHECK_TYPE(bits32_t, long)
++else
++  AC_CHECK_TYPE(bits32_t, int)
++fi
++])
++
++dnl
++dnl An unsigned 32-bit integer quantity
++dnl
++AC_DEFUN(BASH_TYPE_U_BITS32_T,
++[
++if test "$ac_cv_sizeof_int" = 4; then
++  AC_CHECK_TYPE(u_bits32_t, unsigned int)
++elif test "$ac_cv_sizeof_long" = 4; then
++  AC_CHECK_TYPE(u_bits32_t, unsigned long)
++else
++  AC_CHECK_TYPE(u_bits32_t, unsigned int)
++fi
++])
++
++AC_DEFUN(BASH_TYPE_PTRDIFF_T,
++[
++if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
++  AC_CHECK_TYPE(ptrdiff_t, int)
++elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
++  AC_CHECK_TYPE(ptrdiff_t, long)
++elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
++  AC_CHECK_TYPE(ptrdiff_t, [long long])
++else
++  AC_CHECK_TYPE(ptrdiff_t, int)
++fi
++])
++
++dnl
++dnl A signed 64-bit quantity
++dnl
++AC_DEFUN(BASH_TYPE_BITS64_T,
++[
++if test "$ac_cv_sizeof_char_p" = 8; then
++  AC_CHECK_TYPE(bits64_t, char *)
++elif test "$ac_cv_sizeof_double" = 8; then
++  AC_CHECK_TYPE(bits64_t, double)
++elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
++  AC_CHECK_TYPE(bits64_t, [long long])
++elif test "$ac_cv_sizeof_long" = 8; then
++  AC_CHECK_TYPE(bits64_t, long)
++else
++  AC_CHECK_TYPE(bits64_t, double)
++fi
++])
++
++AC_DEFUN(BASH_TYPE_LONG_LONG,
++[
++AC_CACHE_CHECK([for long long], bash_cv_type_long_long,
++[AC_TRY_LINK([
++long long ll = 1; int i = 63;],
++[
++long long llm = (long long) -1;
++return ll << i | ll >> i | llm / ll | llm % ll;
++], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')])
++if test "$bash_cv_type_long_long" = 'long long'; then
++  AC_DEFINE(HAVE_LONG_LONG, 1)
++fi
++])
++
++AC_DEFUN(BASH_TYPE_UNSIGNED_LONG_LONG,
++[
++AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long,
++[AC_TRY_LINK([
++unsigned long long ull = 1; int i = 63;],
++[
++unsigned long long ullmax = (unsigned long long) -1;
++return ull << i | ull >> i | ullmax / ull | ullmax % ull;
++], bash_cv_type_unsigned_long_long='unsigned long long',
++   bash_cv_type_unsigned_long_long='unsigned long')])
++if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
++  AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1)
++fi
++])
++
++dnl
++dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0)
++dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use
++dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3).  To simplify
++dnl matters, this just checks for rlim_t, quad_t, or long.
++dnl
++AC_DEFUN(BASH_TYPE_RLIMIT,
++[AC_MSG_CHECKING(for size and type of struct rlimit fields)
++AC_CACHE_VAL(bash_cv_type_rlimit,
++[AC_TRY_COMPILE([#include <sys/types.h>
++#include <sys/resource.h>],
++[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[
++AC_TRY_RUN([
++#include <sys/types.h>
++#include <sys/time.h>
++#include <sys/resource.h>
++main()
++{
++#ifdef HAVE_QUAD_T
++  struct rlimit rl;
++  if (sizeof(rl.rlim_cur) == sizeof(quad_t))
++    exit(0);
++#endif
++  exit(1);
++}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long,
++        [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long)
++         bash_cv_type_rlimit=long])])
++])
++AC_MSG_RESULT($bash_cv_type_rlimit)
++if test $bash_cv_type_rlimit = quad_t; then
++AC_DEFINE(RLIMTYPE, quad_t)
++elif test $bash_cv_type_rlimit = rlim_t; then
++AC_DEFINE(RLIMTYPE, rlim_t)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_LSTAT,
++[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an
++dnl inline function in <sys/stat.h>.
++AC_CACHE_CHECK([for lstat], bash_cv_func_lstat,
++[AC_TRY_LINK([
++#include <sys/types.h>
++#include <sys/stat.h>
++],[ lstat(".",(struct stat *)0); ],
++bash_cv_func_lstat=yes, bash_cv_func_lstat=no)])
++if test $bash_cv_func_lstat = yes; then
++  AC_DEFINE(HAVE_LSTAT)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_INET_ATON,
++[
++AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton,
++[AC_TRY_LINK([
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
++struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ],
++bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)])
++if test $bash_cv_func_inet_aton = yes; then
++  AC_DEFINE(HAVE_INET_ATON)
++else
++  AC_LIBOBJ(inet_aton)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_GETENV,
++[AC_MSG_CHECKING(to see if getenv can be redefined)
++AC_CACHE_VAL(bash_cv_getenv_redef,
++[AC_TRY_RUN([
++#ifdef HAVE_UNISTD_H
++#  include <unistd.h>
++#endif
++#ifndef __STDC__
++#  ifndef const
++#    define const
++#  endif
++#endif
++char *
++getenv (name)
++#if defined (__linux__) || defined (__bsdi__) || defined (convex)
++     const char *name;
++#else
++     char const *name;
++#endif /* !__linux__ && !__bsdi__ && !convex */
++{
++return "42";
++}
++main()
++{
++char *s;
++/* The next allows this program to run, but does not allow bash to link
++   when it redefines getenv.  I'm not really interested in figuring out
++   why not. */
++#if defined (NeXT)
++exit(1);
++#endif
++s = getenv("ABCDE");
++exit(s == 0);	/* force optimizer to leave getenv in */
++}
++], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no,
++   [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes)
++    bash_cv_getenv_redef=yes]
++)])
++AC_MSG_RESULT($bash_cv_getenv_redef)
++if test $bash_cv_getenv_redef = yes; then
++AC_DEFINE(CAN_REDEFINE_GETENV)
++fi
++])
++
++# We should check for putenv before calling this
++AC_DEFUN(BASH_FUNC_STD_PUTENV,
++[
++AC_REQUIRE([AC_HEADER_STDC])
++AC_REQUIRE([AC_C_PROTOTYPES])
++AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv,
++[AC_TRY_LINK([
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
++#endif
++#ifndef __STDC__
++#  ifndef const
++#    define const
++#  endif
++#endif
++#ifdef PROTOTYPES
++extern int putenv (char *);
++#else
++extern int putenv ();
++#endif
++],
++[return (putenv == 0);],
++bash_cv_std_putenv=yes, bash_cv_std_putenv=no
++)])
++if test $bash_cv_std_putenv = yes; then
++AC_DEFINE(HAVE_STD_PUTENV)
++fi
++])
++
++# We should check for unsetenv before calling this
++AC_DEFUN(BASH_FUNC_STD_UNSETENV,
++[
++AC_REQUIRE([AC_HEADER_STDC])
++AC_REQUIRE([AC_C_PROTOTYPES])
++AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv,
++[AC_TRY_LINK([
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
++#endif
++#ifndef __STDC__
++#  ifndef const
++#    define const
++#  endif
++#endif
++#ifdef PROTOTYPES
++extern int unsetenv (const char *);
++#else
++extern int unsetenv ();
++#endif
++],
++[return (unsetenv == 0);],
++bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no
++)])
++if test $bash_cv_std_unsetenv = yes; then
++AC_DEFINE(HAVE_STD_UNSETENV)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_ULIMIT_MAXFDS,
++[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize)
++AC_CACHE_VAL(bash_cv_ulimit_maxfds,
++[AC_TRY_RUN([
++main()
++{
++long maxfds = ulimit(4, 0L);
++exit (maxfds == -1L);
++}
++], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
++   [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no)
++    bash_cv_ulimit_maxfds=no]
++)])
++AC_MSG_RESULT($bash_cv_ulimit_maxfds)
++if test $bash_cv_ulimit_maxfds = yes; then
++AC_DEFINE(ULIMIT_MAXFDS)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_GETCWD,
++[AC_MSG_CHECKING([if getcwd() calls popen()])
++AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
++[AC_TRY_RUN([
++#include <stdio.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++
++#ifndef __STDC__
++#ifndef const
++#define const
++#endif
++#endif
++
++int popen_called;
++
++FILE *
++popen(command, type)
++     const char *command;
++     const char *type;
++{
++	popen_called = 1;
++	return (FILE *)NULL;
++}
++
++FILE *_popen(command, type)
++     const char *command;
++     const char *type;
++{
++  return (popen (command, type));
++}
++
++int
++pclose(stream)
++FILE *stream;
++{
++	return 0;
++}
++
++int
++_pclose(stream)
++FILE *stream;
++{
++	return 0;
++}
++
++main()
++{
++	char	lbuf[32];
++	popen_called = 0;
++	getcwd(lbuf, 32);
++	exit (popen_called);
++}
++], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
++   [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
++    bash_cv_getcwd_calls_popen=no]
++)])
++AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
++if test $bash_cv_getcwd_calls_popen = yes; then
++AC_DEFINE(GETCWD_BROKEN)
++AC_LIBOBJ(getcwd)
++fi
++])
++
++dnl
++dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every
++dnl system, we can't use AC_PREREQ
++dnl
++AC_DEFUN(BASH_FUNC_GETHOSTBYNAME,
++[if test "X$bash_cv_have_gethostbyname" = "X"; then
++_bash_needmsg=yes
++else
++AC_MSG_CHECKING(for gethostbyname in socket library)
++_bash_needmsg=
++fi
++AC_CACHE_VAL(bash_cv_have_gethostbyname,
++[AC_TRY_LINK([#include <netdb.h>],
++[ struct hostent *hp;
++  hp = gethostbyname("localhost");
++], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)]
++)
++if test "X$_bash_needmsg" = Xyes; then
++    AC_MSG_CHECKING(for gethostbyname in socket library)
++fi
++AC_MSG_RESULT($bash_cv_have_gethostbyname)
++if test "$bash_cv_have_gethostbyname" = yes; then
++AC_DEFINE(HAVE_GETHOSTBYNAME)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_FNMATCH_EXTMATCH,
++[AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH)
++AC_CACHE_VAL(bash_cv_fnm_extmatch,
++[AC_TRY_RUN([
++#include <fnmatch.h>
++
++main()
++{
++#ifdef FNM_EXTMATCH
++  exit (0);
++#else
++  exit (1);
++#endif
++}
++], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no,
++    [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no)
++     bash_cv_fnm_extmatch=no])
++])
++AC_MSG_RESULT($bash_cv_fnm_extmatch)
++if test $bash_cv_fnm_extmatch = yes; then
++AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_POSIX_SETJMP,
++[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
++AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp)
++AC_CACHE_VAL(bash_cv_func_sigsetjmp,
++[AC_TRY_RUN([
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++#include <sys/types.h>
++#include <signal.h>
++#include <setjmp.h>
++
++main()
++{
++#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
++exit (1);
++#else
++
++int code;
++sigset_t set, oset;
++sigjmp_buf xx;
++
++/* get the mask */
++sigemptyset(&set);
++sigemptyset(&oset);
++sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
++sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
++
++/* save it */
++code = sigsetjmp(xx, 1);
++if (code)
++  exit(0);	/* could get sigmask and compare to oset here. */
++
++/* change it */
++sigaddset(&set, SIGINT);
++sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
++
++/* and siglongjmp */
++siglongjmp(xx, 10);
++exit(1);
++#endif
++}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
++    [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
++     bash_cv_func_sigsetjmp=missing]
++)])
++AC_MSG_RESULT($bash_cv_func_sigsetjmp)
++if test $bash_cv_func_sigsetjmp = present; then
++AC_DEFINE(HAVE_POSIX_SIGSETJMP)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_STRCOLL,
++[
++AC_MSG_CHECKING(whether or not strcoll and strcmp differ)
++AC_CACHE_VAL(bash_cv_func_strcoll_broken,
++[AC_TRY_RUN([
++#include <stdio.h>
++#if defined (HAVE_LOCALE_H)
++#include <locale.h>
++#endif
++
++main(c, v)
++int     c;
++char    *v[];
++{
++        int     r1, r2;
++        char    *deflocale, *defcoll;
++
++#ifdef HAVE_SETLOCALE
++        deflocale = setlocale(LC_ALL, "");
++	defcoll = setlocale(LC_COLLATE, "");
++#endif
++
++#ifdef HAVE_STRCOLL
++	/* These two values are taken from tests/glob-test. */
++        r1 = strcoll("abd", "aXd");
++#else
++	r1 = 0;
++#endif
++        r2 = strcmp("abd", "aXd");
++
++	/* These two should both be greater than 0.  It is permissible for
++	   a system to return different values, as long as the sign is the
++	   same. */
++
++        /* Exit with 1 (failure) if these two values are both > 0, since
++	   this tests whether strcoll(3) is broken with respect to strcmp(3)
++	   in the default locale. */
++	exit (r1 > 0 && r2 > 0);
++}
++], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no,
++   [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no)
++    bash_cv_func_strcoll_broken=no]
++)])
++AC_MSG_RESULT($bash_cv_func_strcoll_broken)
++if test $bash_cv_func_strcoll_broken = yes; then
++AC_DEFINE(STRCOLL_BROKEN)
++fi
++])
++
++AC_DEFUN(BASH_FUNC_PRINTF_A_FORMAT,
++[AC_MSG_CHECKING([for printf floating point output in hex notation])
++AC_CACHE_VAL(bash_cv_printf_a_format,
++[AC_TRY_RUN([
++#include <stdio.h>
++#include <string.h>
++
++int
++main()
++{
++	double y = 0.0;
++	char abuf[1024];
++
++	sprintf(abuf, "%A", y);
++	exit(strchr(abuf, 'P') == (char *)0);
++}
++], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no,
++   [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no)
++    bash_cv_printf_a_format=no]
++)])
++AC_MSG_RESULT($bash_cv_printf_a_format)
++if test $bash_cv_printf_a_format = yes; then
++AC_DEFINE(HAVE_PRINTF_A_FORMAT)
++fi
++])
++
++AC_DEFUN(BASH_STRUCT_TERMIOS_LDISC,
++[
++AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[
++#include <sys/types.h>
++#include <termios.h>
++])
++])
++
++AC_DEFUN(BASH_STRUCT_TERMIO_LDISC,
++[
++AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[
++#include <sys/types.h>
++#include <termio.h>
++])
++])
++
++dnl
++dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS
++dnl
++dnl sets bash_cv_struct_stat_st_blocks
++dnl
++dnl unused for now; we'll see how AC_CHECK_MEMBERS works
++dnl
++AC_DEFUN(BASH_STRUCT_ST_BLOCKS,
++[
++AC_MSG_CHECKING([for struct stat.st_blocks])
++AC_CACHE_VAL(bash_cv_struct_stat_st_blocks,
++[AC_TRY_COMPILE(
++[
++#include <sys/types.h>
++#include <sys/stat.h>
++],
++[
++main()
++{
++static struct stat a;
++if (a.st_blocks) return 0;
++return 0;
++}
++], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no)
++])
++AC_MSG_RESULT($bash_cv_struct_stat_st_blocks)
++if test "$bash_cv_struct_stat_st_blocks" = "yes"; then
++AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
++fi
++])
++
++AC_DEFUN(BASH_CHECK_LIB_TERMCAP,
++[
++if test "X$bash_cv_termcap_lib" = "X"; then
++_bash_needmsg=yes
++else
++AC_MSG_CHECKING(which library has the termcap functions)
++_bash_needmsg=
++fi
++AC_CACHE_VAL(bash_cv_termcap_lib,
++[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
++    [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
++        [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
++	    [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
++	        bash_cv_termcap_lib=gnutermcap)])])])])
++if test "X$_bash_needmsg" = "Xyes"; then
++AC_MSG_CHECKING(which library has the termcap functions)
++fi
++AC_MSG_RESULT(using $bash_cv_termcap_lib)
++if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
++LDFLAGS="$LDFLAGS -L./lib/termcap"
++TERMCAP_LIB="./lib/termcap/libtermcap.a"
++TERMCAP_DEP="./lib/termcap/libtermcap.a"
++elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
++TERMCAP_LIB=-ltermcap
++TERMCAP_DEP=
++elif test $bash_cv_termcap_lib = libtinfo; then
++TERMCAP_LIB=-ltinfo
++TERMCAP_DEP=
++elif test $bash_cv_termcap_lib = libncurses; then
++TERMCAP_LIB=-lncurses
++TERMCAP_DEP=
++else
++TERMCAP_LIB=-lcurses
++TERMCAP_DEP=
++fi
++])
++
++dnl
++dnl Check for the presence of getpeername in libsocket.
++dnl If libsocket is present, check for libnsl and add it to LIBS if
++dnl it's there, since most systems with libsocket require linking
++dnl with libnsl as well.  This should only be called if getpeername
++dnl was not found in libc.
++dnl
++dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT
++dnl	  AS WELL
++dnl
++AC_DEFUN(BASH_CHECK_LIB_SOCKET,
++[
++if test "X$bash_cv_have_socklib" = "X"; then
++_bash_needmsg=
++else
++AC_MSG_CHECKING(for socket library)
++_bash_needmsg=yes
++fi
++AC_CACHE_VAL(bash_cv_have_socklib,
++[AC_CHECK_LIB(socket, getpeername,
++        bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)])
++if test "X$_bash_needmsg" = Xyes; then
++  AC_MSG_RESULT($bash_cv_have_socklib)
++  _bash_needmsg=
++fi
++if test $bash_cv_have_socklib = yes; then
++  # check for libnsl, add it to LIBS if present
++  if test "X$bash_cv_have_libnsl" = "X"; then
++    _bash_needmsg=
++  else
++    AC_MSG_CHECKING(for libnsl)
++    _bash_needmsg=yes
++  fi
++  AC_CACHE_VAL(bash_cv_have_libnsl,
++	   [AC_CHECK_LIB(nsl, t_open,
++		 bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)])
++  if test "X$_bash_needmsg" = Xyes; then
++    AC_MSG_RESULT($bash_cv_have_libnsl)
++    _bash_needmsg=
++  fi
++  if test $bash_cv_have_libnsl = yes; then
++    LIBS="-lsocket -lnsl $LIBS"
++  else
++    LIBS="-lsocket $LIBS"
++  fi
++  AC_DEFINE(HAVE_LIBSOCKET)
++  AC_DEFINE(HAVE_GETPEERNAME)
++fi
++])
++
++AC_DEFUN(BASH_STRUCT_DIRENT_D_INO,
++[AC_REQUIRE([AC_HEADER_DIRENT])
++AC_MSG_CHECKING(if struct dirent has a d_ino member)
++AC_CACHE_VAL(bash_cv_dirent_has_dino,
++[AC_TRY_COMPILE([
++#include <stdio.h>
++#include <sys/types.h>
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif /* HAVE_UNISTD_H */
++#if defined(HAVE_DIRENT_H)
++# include <dirent.h>
++#else
++# define dirent direct
++# ifdef HAVE_SYS_NDIR_H
++#  include <sys/ndir.h>
++# endif /* SYSNDIR */
++# ifdef HAVE_SYS_DIR_H
++#  include <sys/dir.h>
++# endif /* SYSDIR */
++# ifdef HAVE_NDIR_H
++#  include <ndir.h>
++# endif
++#endif /* HAVE_DIRENT_H */
++],[
++struct dirent d; int z; z = d.d_ino;
++], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
++AC_MSG_RESULT($bash_cv_dirent_has_dino)
++if test $bash_cv_dirent_has_dino = yes; then
++AC_DEFINE(STRUCT_DIRENT_HAS_D_INO)
++fi
++])
++
++AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO,
++[AC_REQUIRE([AC_HEADER_DIRENT])
++AC_MSG_CHECKING(if struct dirent has a d_fileno member)
++AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
++[AC_TRY_COMPILE([
++#include <stdio.h>
++#include <sys/types.h>
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif /* HAVE_UNISTD_H */
++#if defined(HAVE_DIRENT_H)
++# include <dirent.h>
++#else
++# define dirent direct
++# ifdef HAVE_SYS_NDIR_H
++#  include <sys/ndir.h>
++# endif /* SYSNDIR */
++# ifdef HAVE_SYS_DIR_H
++#  include <sys/dir.h>
++# endif /* SYSDIR */
++# ifdef HAVE_NDIR_H
++#  include <ndir.h>
++# endif
++#endif /* HAVE_DIRENT_H */
++],[
++struct dirent d; int z; z = d.d_fileno;
++], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
++AC_MSG_RESULT($bash_cv_dirent_has_d_fileno)
++if test $bash_cv_dirent_has_d_fileno = yes; then
++AC_DEFINE(STRUCT_DIRENT_HAS_D_FILENO)
++fi
++])
++
++AC_DEFUN(BASH_STRUCT_TIMEVAL,
++[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h)
++AC_CACHE_VAL(bash_cv_struct_timeval,
++[
++AC_EGREP_HEADER(struct timeval, sys/time.h,
++		bash_cv_struct_timeval=yes,
++		AC_EGREP_HEADER(struct timeval, time.h,
++			bash_cv_struct_timeval=yes,
++			bash_cv_struct_timeval=no))
++])
++AC_MSG_RESULT($bash_cv_struct_timeval)
++if test $bash_cv_struct_timeval = yes; then
++  AC_DEFINE(HAVE_TIMEVAL)
++fi
++])
++
++AC_DEFUN(BASH_STRUCT_WINSIZE,
++[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
++AC_CACHE_VAL(bash_cv_struct_winsize_header,
++[AC_TRY_COMPILE([#include <sys/types.h>
++#include <sys/ioctl.h>], [struct winsize x;],
++  bash_cv_struct_winsize_header=ioctl_h,
++  [AC_TRY_COMPILE([#include <sys/types.h>
++#include <termios.h>], [struct winsize x;],
++  bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other)
++])])
++if test $bash_cv_struct_winsize_header = ioctl_h; then
++  AC_MSG_RESULT(sys/ioctl.h)
++  AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
++elif test $bash_cv_struct_winsize_header = termios_h; then
++  AC_MSG_RESULT(termios.h)
++  AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS)
++else
++  AC_MSG_RESULT(not found)
++fi
++])
++
++dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
++AC_DEFUN(BASH_SYS_SIGNAL_VINTAGE,
++[AC_REQUIRE([AC_TYPE_SIGNAL])
++AC_MSG_CHECKING(for type of signal functions)
++AC_CACHE_VAL(bash_cv_signal_vintage,
++[
++  AC_TRY_LINK([#include <signal.h>],[
++    sigset_t ss;
++    struct sigaction sa;
++    sigemptyset(&ss); sigsuspend(&ss);
++    sigaction(SIGINT, &sa, (struct sigaction *) 0);
++    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
++  ], bash_cv_signal_vintage=posix,
++  [
++    AC_TRY_LINK([#include <signal.h>], [
++	int mask = sigmask(SIGINT);
++	sigsetmask(mask); sigblock(mask); sigpause(mask);
++    ], bash_cv_signal_vintage=4.2bsd,
++    [
++      AC_TRY_LINK([
++	#include <signal.h>
++	RETSIGTYPE foo() { }], [
++		int mask = sigmask(SIGINT);
++		sigset(SIGINT, foo); sigrelse(SIGINT);
++		sighold(SIGINT); sigpause(SIGINT);
++        ], bash_cv_signal_vintage=svr3, bash_cv_signal_vintage=v7
++    )]
++  )]
++)
++])
++AC_MSG_RESULT($bash_cv_signal_vintage)
++if test "$bash_cv_signal_vintage" = posix; then
++AC_DEFINE(HAVE_POSIX_SIGNALS)
++elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
++AC_DEFINE(HAVE_BSD_SIGNALS)
++elif test "$bash_cv_signal_vintage" = svr3; then
++AC_DEFINE(HAVE_USG_SIGHOLD)
++fi
++])
++
++dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process.
++AC_DEFUN(BASH_SYS_PGRP_SYNC,
++[AC_REQUIRE([AC_FUNC_GETPGRP])
++AC_MSG_CHECKING(whether pgrps need synchronization)
++AC_CACHE_VAL(bash_cv_pgrp_pipe,
++[AC_TRY_RUN([
++#ifdef HAVE_UNISTD_H
++#  include <unistd.h>
++#endif
++main()
++{
++# ifdef GETPGRP_VOID
++#  define getpgID()	getpgrp()
++# else
++#  define getpgID()	getpgrp(0)
++#  define setpgid(x,y)	setpgrp(x,y)
++# endif
++	int pid1, pid2, fds[2];
++	int status;
++	char ok;
++
++	switch (pid1 = fork()) {
++	  case -1:
++	    exit(1);
++	  case 0:
++	    setpgid(0, getpid());
++	    exit(0);
++	}
++	setpgid(pid1, pid1);
++
++	sleep(2);	/* let first child die */
++
++	if (pipe(fds) < 0)
++	  exit(2);
++
++	switch (pid2 = fork()) {
++	  case -1:
++	    exit(3);
++	  case 0:
++	    setpgid(0, pid1);
++	    ok = getpgID() == pid1;
++	    write(fds[1], &ok, 1);
++	    exit(0);
++	}
++	setpgid(pid2, pid1);
++
++	close(fds[1]);
++	if (read(fds[0], &ok, 1) != 1)
++	  exit(4);
++	wait(&status);
++	wait(&status);
++	exit(ok ? 0 : 5);
++}
++], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes,
++   [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no)
++    bash_cv_pgrp_pipe=no])
++])
++AC_MSG_RESULT($bash_cv_pgrp_pipe)
++if test $bash_cv_pgrp_pipe = yes; then
++AC_DEFINE(PGRP_PIPE)
++fi
++])
++
++AC_DEFUN(BASH_SYS_REINSTALL_SIGHANDLERS,
++[AC_REQUIRE([AC_TYPE_SIGNAL])
++AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
++AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
++AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
++[AC_TRY_RUN([
++#include <signal.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++
++typedef RETSIGTYPE sigfunc();
++
++int nsigint;
++
++#ifdef HAVE_POSIX_SIGNALS
++sigfunc *
++set_signal_handler(sig, handler)
++     int sig;
++     sigfunc *handler;
++{
++  struct sigaction act, oact;
++  act.sa_handler = handler;
++  act.sa_flags = 0;
++  sigemptyset (&act.sa_mask);
++  sigemptyset (&oact.sa_mask);
++  sigaction (sig, &act, &oact);
++  return (oact.sa_handler);
++}
++#else
++#define set_signal_handler(s, h) signal(s, h)
++#endif
++
++RETSIGTYPE
++sigint(s)
++int s;
++{
++  nsigint++;
++}
++
++main()
++{
++	nsigint = 0;
++	set_signal_handler(SIGINT, sigint);
++	kill((int)getpid(), SIGINT);
++	kill((int)getpid(), SIGINT);
++	exit(nsigint != 2);
++}
++], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes,
++   [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no)
++    bash_cv_must_reinstall_sighandlers=no]
++)])
++AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers)
++if test $bash_cv_must_reinstall_sighandlers = yes; then
++AC_DEFINE(MUST_REINSTALL_SIGHANDLERS)
++fi
++])
++
++dnl check that some necessary job control definitions are present
++AC_DEFUN(BASH_SYS_JOB_CONTROL_MISSING,
++[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
++AC_MSG_CHECKING(for presence of necessary job control definitions)
++AC_CACHE_VAL(bash_cv_job_control_missing,
++[AC_TRY_RUN([
++#include <sys/types.h>
++#ifdef HAVE_SYS_WAIT_H
++#include <sys/wait.h>
++#endif
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++#include <signal.h>
++
++/* Add more tests in here as appropriate. */
++main()
++{
++/* signal type */
++#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
++exit(1);
++#endif
++
++/* signals and tty control. */
++#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
++exit (1);
++#endif
++
++/* process control */
++#if !defined (WNOHANG) || !defined (WUNTRACED) 
++exit(1);
++#endif
++
++/* Posix systems have tcgetpgrp and waitpid. */
++#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
++exit(1);
++#endif
++
++#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
++exit(1);
++#endif
++
++/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
++#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
++exit(1);
++#endif
++
++exit(0);
++}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
++    [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
++     bash_cv_job_control_missing=missing]
++)])
++AC_MSG_RESULT($bash_cv_job_control_missing)
++if test $bash_cv_job_control_missing = missing; then
++AC_DEFINE(JOB_CONTROL_MISSING)
++fi
++])
++
++dnl check whether named pipes are present
++dnl this requires a previous check for mkfifo, but that is awkward to specify
++AC_DEFUN(BASH_SYS_NAMED_PIPES,
++[AC_MSG_CHECKING(for presence of named pipes)
++AC_CACHE_VAL(bash_cv_sys_named_pipes,
++[AC_TRY_RUN([
++#include <sys/types.h>
++#include <sys/stat.h>
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++
++/* Add more tests in here as appropriate. */
++main()
++{
++int fd, err;
++
++#if defined (HAVE_MKFIFO)
++exit (0);
++#endif
++
++#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
++exit (1);
++#endif
++
++#if defined (NeXT)
++exit (1);
++#endif
++err = mkdir("/tmp/bash-aclocal", 0700);
++if (err < 0) {
++  perror ("mkdir");
++  exit(1);
++}
++fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
++if (fd == -1) {
++  rmdir ("/tmp/bash-aclocal");
++  exit (1);
++}
++close(fd);
++unlink ("/tmp/bash-aclocal/sh-np-autoconf");
++rmdir ("/tmp/bash-aclocal");
++exit(0);
++}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
++    [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
++     bash_cv_sys_named_pipes=missing]
++)])
++AC_MSG_RESULT($bash_cv_sys_named_pipes)
++if test $bash_cv_sys_named_pipes = missing; then
++AC_DEFINE(NAMED_PIPES_MISSING)
++fi
++])
++
++AC_DEFUN(BASH_SYS_DEFAULT_MAIL_DIR,
++[AC_MSG_CHECKING(for default mail directory)
++AC_CACHE_VAL(bash_cv_mail_dir,
++[if test -d /var/mail; then
++   bash_cv_mail_dir=/var/mail
++ elif test -d /var/spool/mail; then
++   bash_cv_mail_dir=/var/spool/mail
++ elif test -d /usr/mail; then
++   bash_cv_mail_dir=/usr/mail
++ elif test -d /usr/spool/mail; then
++   bash_cv_mail_dir=/usr/spool/mail
++ else
++   bash_cv_mail_dir=unknown
++ fi
++])
++AC_MSG_RESULT($bash_cv_mail_dir)
++AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir")
++])
++
++AC_DEFUN(BASH_HAVE_TIOCGWINSZ,
++[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
++AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl,
++[AC_TRY_COMPILE([#include <sys/types.h>
++#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
++  bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)])
++AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl)
++if test $bash_cv_tiocgwinsz_in_ioctl = yes; then   
++AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
++fi
++])
++
++AC_DEFUN(BASH_HAVE_TIOCSTAT,
++[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
++AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl,
++[AC_TRY_COMPILE([#include <sys/types.h>
++#include <sys/ioctl.h>], [int x = TIOCSTAT;],
++  bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)])
++AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl)
++if test $bash_cv_tiocstat_in_ioctl = yes; then   
++AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL)
++fi
++])
++
++AC_DEFUN(BASH_HAVE_FIONREAD,
++[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
++AC_CACHE_VAL(bash_cv_fionread_in_ioctl,
++[AC_TRY_COMPILE([#include <sys/types.h>
++#include <sys/ioctl.h>], [int x = FIONREAD;],
++  bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)])
++AC_MSG_RESULT($bash_cv_fionread_in_ioctl)
++if test $bash_cv_fionread_in_ioctl = yes; then   
++AC_DEFINE(FIONREAD_IN_SYS_IOCTL)
++fi
++])
++
++dnl
++dnl See if speed_t is declared in <sys/types.h>.  Some versions of linux
++dnl require a definition of speed_t each time <termcap.h> is included,
++dnl but you can only get speed_t if you include <termios.h> (on some
++dnl versions) or <sys/types.h> (on others).
++dnl
++AC_DEFUN(BASH_CHECK_SPEED_T,
++[AC_MSG_CHECKING(for speed_t in sys/types.h)
++AC_CACHE_VAL(bash_cv_speed_t_in_sys_types,
++[AC_TRY_COMPILE([#include <sys/types.h>], [speed_t x;],
++  bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)])
++AC_MSG_RESULT($bash_cv_speed_t_in_sys_types)
++if test $bash_cv_speed_t_in_sys_types = yes; then   
++AC_DEFINE(SPEED_T_IN_SYS_TYPES)
++fi
++])
++
++AC_DEFUN(BASH_CHECK_GETPW_FUNCS,
++[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h)
++AC_CACHE_VAL(bash_cv_getpw_declared,
++[AC_EGREP_CPP(getpwuid,
++[
++#include <sys/types.h>
++#ifdef HAVE_UNISTD_H
++#  include <unistd.h>
++#endif
++#include <pwd.h>
++],
++bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)])
++AC_MSG_RESULT($bash_cv_getpw_declared)
++if test $bash_cv_getpw_declared = yes; then
++AC_DEFINE(HAVE_GETPW_DECLS)
++fi
++])
++
++AC_DEFUN(BASH_CHECK_DEV_FD,
++[AC_MSG_CHECKING(whether /dev/fd is available)
++AC_CACHE_VAL(bash_cv_dev_fd,
++[if test -d /dev/fd  && test -r /dev/fd/0; then
++   bash_cv_dev_fd=standard
++ elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
++   bash_cv_dev_fd=whacky
++ else
++   bash_cv_dev_fd=absent
++ fi
++])
++AC_MSG_RESULT($bash_cv_dev_fd)
++if test $bash_cv_dev_fd = "standard"; then
++  AC_DEFINE(HAVE_DEV_FD)
++  AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/")
++elif test $bash_cv_dev_fd = "whacky"; then
++  AC_DEFINE(HAVE_DEV_FD)
++  AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/")
++fi
++])
++
++AC_DEFUN(BASH_CHECK_DEV_STDIN,
++[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
++AC_CACHE_VAL(bash_cv_dev_stdin,
++[if test -d /dev/fd && test -r /dev/stdin; then
++   bash_cv_dev_stdin=present
++ elif test -d /proc/self/fd && test -r /dev/stdin; then
++   bash_cv_dev_stdin=present
++ else
++   bash_cv_dev_stdin=absent
++ fi
++])
++AC_MSG_RESULT($bash_cv_dev_stdin)
++if test $bash_cv_dev_stdin = "present"; then
++  AC_DEFINE(HAVE_DEV_STDIN)
++fi
++])
++
++dnl
++dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions
++dnl
++AC_DEFUN(BASH_CHECK_KERNEL_RLIMIT,
++[AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines])
++AC_CACHE_VAL(bash_cv_kernel_rlimit,
++[AC_TRY_COMPILE([
++#include <sys/types.h>
++#include <sys/resource.h>
++],
++[
++  int f;
++  f = RLIMIT_DATA;
++], bash_cv_kernel_rlimit=no,
++[AC_TRY_COMPILE([
++#include <sys/types.h>
++#define _KERNEL
++#include <sys/resource.h>
++#undef _KERNEL
++],
++[
++	int f;
++        f = RLIMIT_DATA;
++], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)]
++)])
++AC_MSG_RESULT($bash_cv_kernel_rlimit)
++if test $bash_cv_kernel_rlimit = yes; then
++AC_DEFINE(RLIMIT_NEEDS_KERNEL)
++fi
++])
++
++dnl
++dnl Check for 64-bit off_t -- used for malloc alignment
++dnl
++dnl C does not allow duplicate case labels, so the compile will fail if
++dnl sizeof(off_t) is > 4.
++dnl
++AC_DEFUN(BASH_CHECK_OFF_T_64,
++[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64,
++AC_TRY_COMPILE([
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++#include <sys/types.h>
++],[
++switch (0) case 0: case (sizeof (off_t) <= 4):;
++], bash_cv_off_t_64=no, bash_cv_off_t_64=yes))
++if test $bash_cv_off_t_64 = yes; then
++        AC_DEFINE(HAVE_OFF_T_64)
++fi])
++
++AC_DEFUN(BASH_CHECK_RTSIGS,
++[AC_MSG_CHECKING(for unusable real-time signals due to large values)
++AC_CACHE_VAL(bash_cv_unusable_rtsigs,
++[AC_TRY_RUN([
++#include <sys/types.h>
++#include <signal.h>
++
++#ifndef NSIG
++#  define NSIG 64
++#endif
++
++main ()
++{
++  int n_sigs = 2 * NSIG;
++#ifdef SIGRTMIN
++  int rtmin = SIGRTMIN;
++#else
++  int rtmin = 0;
++#endif
++
++  exit(rtmin < n_sigs);
++}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no,
++    [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes)
++     bash_cv_unusable_rtsigs=yes]
++)])
++AC_MSG_RESULT($bash_cv_unusable_rtsigs)
++if test $bash_cv_unusable_rtsigs = yes; then
++AC_DEFINE(UNUSABLE_RT_SIGNALS)
++fi
++])
++
++dnl
++dnl check for availability of multibyte characters and functions
++dnl
++AC_DEFUN(BASH_CHECK_MULTIBYTE,
++[
++AC_CHECK_HEADERS(wctype.h)
++AC_CHECK_HEADERS(wchar.h)
++AC_CHECK_HEADERS(langinfo.h)
++
++AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
++AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
++
++AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
++[AC_TRY_RUN([
++#include <wchar.h>
++int
++main ()
++{
++  mbstate_t ps;
++  return 0;
++}], bash_cv_have_mbstate_t=yes,  bash_cv_have_mbstate_t=no)])
++if test $bash_cv_have_mbstate_t = yes; then
++	AC_DEFINE(HAVE_MBSTATE_T)
++fi
++
++AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset,
++[AC_TRY_LINK(
++[#include <langinfo.h>],
++[char* cs = nl_langinfo(CODESET);],
++bash_cv_langinfo_codeset=yes, bash_cv_langinfo_codeset=no)])
++if test $bash_cv_langinfo_codeset = yes; then
++  AC_DEFINE(HAVE_LANGINFO_CODESET)
++fi
++
++])
++
++dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
++dnl require:
++dnl	AC_PROG_CC
++dnl	BASH_CHECK_LIB_TERMCAP
++
++AC_DEFUN(RL_LIB_READLINE_VERSION,
++[
++AC_REQUIRE([BASH_CHECK_LIB_TERMCAP])
++
++AC_MSG_CHECKING([version of installed readline library])
++
++# What a pain in the ass this is.
++
++# save cpp and ld options
++_save_CFLAGS="$CFLAGS"
++_save_LDFLAGS="$LDFLAGS"
++_save_LIBS="$LIBS"
++
++# Don't set ac_cv_rl_prefix if the caller has already assigned a value.  This
++# allows the caller to do something like $_rl_prefix=$withval if the user
++# specifies --with-installed-readline=PREFIX as an argument to configure
++
++if test -z "$ac_cv_rl_prefix"; then
++test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
++fi
++
++eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
++eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
++
++LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
++CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
++LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
++
++AC_TRY_RUN([
++#include <stdio.h>
++#include <readline/readline.h>
++
++main()
++{
++	FILE *fp;
++	fp = fopen("conftest.rlv", "w");
++	if (fp == 0) exit(1);
++	fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
++	fclose(fp);
++	exit(0);
++}
++],
++ac_cv_rl_version=`cat conftest.rlv`,
++ac_cv_rl_version='0.0',
++ac_cv_rl_version='4.2')
++
++CFLAGS="$_save_CFLAGS"
++LDFLAGS="$_save_LDFLAGS"
++LIBS="$_save_LIBS"
++
++RL_MAJOR=0
++RL_MINOR=0
++
++# (
++case "$ac_cv_rl_version" in
++2*|3*|4*|5*|6*|7*|8*|9*)
++	RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
++	RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'`
++	;;
++esac
++
++# (((
++case $RL_MAJOR in
++[[0-9][0-9]])	_RL_MAJOR=$RL_MAJOR ;;
++[[0-9]])	_RL_MAJOR=0$RL_MAJOR ;;
++*)		_RL_MAJOR=00 ;;
++esac
++
++# (((
++case $RL_MINOR in
++[[0-9][0-9]])	_RL_MINOR=$RL_MINOR ;;
++[[0-9]])	_RL_MINOR=0$RL_MINOR ;;
++*)		_RL_MINOR=00 ;;
++esac
++
++RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
++
++# Readline versions greater than 4.2 have these defines in readline.h
++
++if test $ac_cv_rl_version = '0.0' ; then
++	AC_MSG_WARN([Could not test version of installed readline library.])
++elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
++	# set these for use by the caller
++	RL_PREFIX=$ac_cv_rl_prefix
++	RL_LIBDIR=$ac_cv_rl_libdir
++	RL_INCLUDEDIR=$ac_cv_rl_includedir
++	AC_MSG_RESULT($ac_cv_rl_version)
++else
++
++AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library])
++AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library])
++AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library])
++
++AC_SUBST(RL_VERSION)
++AC_SUBST(RL_MAJOR)
++AC_SUBST(RL_MINOR)
++
++# set these for use by the caller
++RL_PREFIX=$ac_cv_rl_prefix
++RL_LIBDIR=$ac_cv_rl_libdir
++RL_INCLUDEDIR=$ac_cv_rl_includedir
++
++AC_MSG_RESULT($ac_cv_rl_version)
++
++fi
++])
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/bootstrap.sh cvs/bootstrap.sh
+--- bash-2.05b/bootstrap.sh	1970-01-01 01:00:00.000000000 +0100
++++ cvs/bootstrap.sh	2003-09-01 21:57:32.000000000 +0200
+@@ -0,0 +1,55 @@
++#!/bin/sh
++# $Id: bootstrap.sh,v 1.4 2003/08/29 15:29:38 snikkt Exp $ 
++# Run this to generate all the initial Makefiles, etc.
++
++# Check how echo works in this /bin/sh
++case `echo -n` in
++-n)     _echo_n=   _echo_c='\c';;
++*)      _echo_n=-n _echo_c=;;
++esac
++
++srcdir=`dirname $0`
++test -z "$srcdir" && srcdir=.
++
++(test -f $srcdir/configure.in) || {
++    echo -n "*** Error ***: Directory "\`$srcdir\'" does not look like the"
++    echo " top-level directory"
++    exit 1
++}
++
++(echo $_echo_n " + Running aclocal: $_echo_c"; \
++    aclocal -I . -I debugger ; \
++ echo "done.")
++rc=$?
++(test -n $rc ) || exit $rc
++
++(echo $_echo_n " + Running autoconf: $_echo_c"; \
++    autoconf; \
++ echo "done.")
++
++rc=$?
++(test -n $rc ) || exit $rc
++
++(echo $_echo_n " + Running aclocal in debugger: $_echo_c"; \
++    cd debugger && aclocal -I .; \
++ echo "done.")
++rc=$?
++(test -n $rc ) || exit $rc
++
++(echo $_echo_n " + Running autoconf in debugger: $_echo_c"; \
++    cd debugger && autoconf; \
++ echo "done.")
++rc=$?
++(test -n $rc ) || exit $rc
++
++(echo $_echo_n " + Running automake in debugger: $_echo_c"; \
++    cd debugger && automake --add-missing; \
++ echo "done.")
++rc=$?
++(test -n $rc ) || exit $rc
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
++
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/Makefile.in cvs/builtins/Makefile.in
+--- bash-2.05b/builtins/Makefile.in	2002-04-23 15:24:23.000000000 +0200
++++ cvs/builtins/Makefile.in	2002-09-19 20:49:51.000000000 +0200
+@@ -118,7 +118,7 @@
+ 	  $(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \
+ 	  $(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \
+ 	  $(srcdir)/reserved.def $(srcdir)/pushd.def $(srcdir)/shopt.def \
+-	  $(srcdir)/printf.def $(srcdir)/complete.def
++	  $(srcdir)/printf.def $(srcdir)/complete.def $(srcdir)/caller.def
+ 
+ STATIC_SOURCE = common.c evalstring.c evalfile.c getopt.c bashgetopt.c \
+ 		getopt.h 
+@@ -130,7 +130,8 @@
+ 	exit.o fc.o fg_bg.o hash.o help.o history.o jobs.o kill.o let.o \
+ 	pushd.o read.o return.o set.o setattr.o shift.o source.o \
+ 	suspend.o test.o times.o trap.o type.o ulimit.o umask.o \
+-	wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o complete.o
++	wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o \
++	complete.o caller.o
+ 
+ CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h
+ 
+@@ -214,48 +215,6 @@
+ 
+ $(OFILES):	$(MKBUILTINS) ../config.h
+ 
+-alias.o: alias.def
+-bind.o: bind.def
+-break.o: break.def
+-builtin.o: builtin.def
+-cd.o: cd.def
+-colon.o: colon.def
+-command.o: command.def
+-declare.o: declare.def
+-echo.o: echo.def
+-enable.o: enable.def
+-eval.o: eval.def
+-exec.o: exec.def
+-exit.o: exit.def
+-fc.o: fc.def
+-fg_bg.o: fg_bg.def
+-hash.o: hash.def
+-help.o: help.def
+-history.o: history.def
+-jobs.o: jobs.def
+-kill.o: kill.def
+-let.o: let.def
+-printf.o: printf.def
+-pushd.o: pushd.def
+-read.o: read.def
+-return.o: return.def
+-set.o: set.def
+-setattr.o: setattr.def
+-shift.o: shift.def
+-shopt.o: shopt.def
+-source.o: source.def
+-suspend.o: suspend.def
+-test.o: test.def
+-times.o: times.def
+-trap.o: trap.def
+-type.o: type.def
+-ulimit.o: ulimit.def
+-umask.o: umask.def
+-wait.o: wait.def
+-getopts.o: getopts.def
+-reserved.o: reserved.def
+-complete.o: complete.def
+-
+ # C files
+ bashgetopt.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h
+ bashgetopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h
+@@ -550,3 +509,7 @@
+ complete.o: ${srcdir}/common.h ${srcdir}/bashgetopt.h
+ 
+ #bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h
++
++#;;; Local Variables: ***
++#;;; mode:makefile ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/caller.def cvs/builtins/caller.def
+--- bash-2.05b/builtins/caller.def	1970-01-01 01:00:00.000000000 +0100
++++ cvs/builtins/caller.def	2003-02-15 00:33:44.000000000 +0100
+@@ -0,0 +1,148 @@
++This file is caller.def, from which is created caller.c.  It implements the
++builtin "caller" in Bash.
++
++Copyright (C) 2002 Rocky Bernstein for Free Software Foundation, Inc.
++
++This file is part of GNU Bash, the Bourne Again SHell.
++
++Bash is free software; you can redistribute it and/or modify it under
++the terms of the GNU General Public License as published by the Free
++Software Foundation; either version 2, or (at your option) any later
++version.
++
++Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++WARRANTY; without even the implied warranty of MERCHANTABILITY or
++FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++for more details.
++
++You should have received a copy of the GNU General Public License along
++with Bash; see the file COPYING.  If not, write to the Free Software
++Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++$PRODUCES caller.c
++
++$BUILTIN caller
++$FUNCTION caller_builtin
++$SHORT_DOC caller [EXPR]
++
++Returns the context of the current subroutine call.  
++
++Without EXPR, returns returns "$line $filename".  With EXPR, it
++returns "$line $subroutine $filename", and this extra information that
++can be used used to print a stack trace,
++
++The value of EXPR indicates how many call frames to go back before the
++current one; the top frame number would be 0.
++$END
++
++#include <config.h>
++#include <stdio.h>
++#include "chartypes.h"
++#include "bashtypes.h"
++
++#if defined (HAVE_UNISTD_H)
++#  ifdef _MINIX
++#    include <sys/types.h>
++#  endif
++#  include <unistd.h>
++#endif
++
++#include <errno.h>
++
++#include "../shell.h"
++#include "common.h"
++#include "builtext.h"
++
++#ifdef LOADABLE_BUILTIN
++#  include "builtins.h"
++#endif
++
++#if !defined (errno)
++extern int errno;
++#endif /* !errno */
++
++int
++caller_builtin (list)
++     WORD_LIST *list;
++{
++  SHELL_VAR *funcname_var    = find_variable ("FUNCNAME");
++  ARRAY     *funcname_a      = array_cell (funcname_var);
++  SHELL_VAR *bash_source_var = find_variable ("BASH_SOURCE");
++  ARRAY     *bash_source_a   = array_cell (bash_source_var);
++  SHELL_VAR *bash_lineno_var = find_variable ("BASH_LINENO");
++  ARRAY     *bash_lineno_a   = array_cell (bash_lineno_var);
++  ARRAY_ELEMENT *ae;
++  char *lineno_str="";
++  char *source_str="";
++  char *funcname_str="";
++   
++  intmax_t num;
++
++  if (!bash_lineno_a || array_empty(bash_lineno_a))
++    return (EXECUTION_FAILURE);
++
++  if (!bash_source_a || array_empty(bash_source_a))
++    return (EXECUTION_FAILURE);
++
++  /* If there is no argument list, then give short form:
++     line filename.
++  */
++  if (list == NULL) {
++    lineno_str=array_reference(bash_lineno_a, 0);
++    source_str=array_reference(bash_source_a, 1);
++    printf("%s %s\n", 
++	   lineno_str ? lineno_str : "NULL" , 
++	   source_str ? source_str : "NULL");
++    return (EXECUTION_SUCCESS);
++  }
++  
++  if (legal_number (list->word->word, &num)) {
++    lineno_str=array_reference(bash_lineno_a, num);
++    source_str=array_reference(bash_source_a, num+1);
++    funcname_str=array_reference(funcname_a, num+1);
++
++    if (!funcname_a || array_empty(funcname_a) 
++	|| NULL == lineno_str || NULL == source_str || NULL == funcname_str )
++      return (EXECUTION_FAILURE);
++
++    printf("%s %s %s\n", lineno_str, funcname_str, source_str);
++  } else {
++    sh_invalidnum (list->word->word);
++    builtin_usage ();
++    return (EXECUTION_FAILURE);
++  }
++  
++  
++  return (EXECUTION_SUCCESS);
++}
++
++
++#ifdef LOADABLE_BUILTIN
++static char *caller_doc[] = {
++  "Returns the context of the current subroutine call.",
++  "",
++  "Without EXPR, returns returns \"$line $filename\".  With EXPR, it",
++  "returns \"$line $subroutine $filename\"; this extra information,",
++  "for example, can be used used to print a stack trace.",
++  "",
++  "The value of EXPR indicates how many call frames to go back before the",
++  "current one; the top frame number would be 0.",
++  (char *)NULL
++};
++
++struct builtin caller_struct = {
++	"caller",
++	caller_builtin,
++	BUILTIN_ENABLED,
++	caller_doc,
++	"pushd [EXPR]",
++	0
++};
++
++#endif /* LOADABLE_BUILTIN */
++
++/* 
++ * Local variables:
++ *  mode: C
++ * End:
++ */
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/common.c cvs/builtins/common.c
+--- bash-2.05b/builtins/common.c	2002-06-28 18:24:31.000000000 +0200
++++ cvs/builtins/common.c	2002-10-10 14:34:04.000000000 +0200
+@@ -48,6 +48,7 @@
+ #include "../builtins.h"
+ #include "../input.h"
+ #include "../execute_cmd.h"
++#include "../variables.h"
+ #include "../trap.h"
+ #include "bashgetopt.h"
+ #include "common.h"
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/common.h cvs/builtins/common.h
+--- bash-2.05b/builtins/common.h	2002-05-10 18:25:08.000000000 +0200
++++ cvs/builtins/common.h	2002-10-10 14:34:04.000000000 +0200
+@@ -77,6 +77,7 @@
+ 
+ extern char **make_builtin_argv __P((WORD_LIST *, int *));
+ extern void remember_args __P((WORD_LIST *, int));
++extern void forget_args __P((WORD_LIST *));
+ 
+ extern int dollar_vars_changed __P((void));
+ extern void set_dollar_vars_unchanged __P((void));
+@@ -145,7 +146,7 @@
+ extern WORD_LIST *get_directory_stack __P((void));
+ 
+ /* Functions from evalstring.c */
+-extern int parse_and_execute __P((char *, const char *, int));
++extern int parse_and_execute __P((char *, const char *, int, int));
+ extern void parse_and_execute_cleanup __P((void));
+ 
+ /* Functions from evalfile.c */
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/declare.def cvs/builtins/declare.def
+--- bash-2.05b/builtins/declare.def	2002-04-08 19:20:55.000000000 +0200
++++ cvs/builtins/declare.def	2002-09-13 21:09:09.000000000 +0200
+@@ -32,7 +32,8 @@
+ 
+   -a	to make NAMEs arrays (if supported)
+   -f	to select from among function names only
+-  -F	to display function names without definitions
++  -F	to display function name, line number and source-file name 
++        without definitions
+   -i	to make NAMEs have the `integer' attribute
+   -r	to make NAMEs readonly
+   -t	to make NAMEs have the `trace' attribute
+@@ -309,9 +310,15 @@
+ 		  /* declare -[Ff] name [name...] */
+ 		  if (flags_on == att_function && flags_off == 0)
+ 		    {
+-		      t = nodefs ? var->name
+-				 : named_function_string (name, function_cell (var), 1);
+-		      printf ("%s\n", t);
++		      if (nodefs) {
++			FUNCTION_DEF *shell_fn = find_function_def(var->name);
++
++			printf ("%s %d %s\n", var->name, shell_fn->line,
++				shell_fn->source_file);
++		      } else
++			printf ("%s\n", 
++				named_function_string (name, 
++						       function_cell(var), 1));
+ 		    }
+ 		  else		/* declare -[fF] -[rx] name [name...] */
+ 		    {
+@@ -440,3 +447,9 @@
+ 		       : ((any_failed == 0) ? EXECUTION_SUCCESS
+   					    : EXECUTION_FAILURE));
+ }
++
++/* 
++ * Local variables:
++ *  mode: C
++ * End:
++ */
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/eval.def cvs/builtins/eval.def
+--- bash-2.05b/builtins/eval.def	2002-04-08 19:21:04.000000000 +0200
++++ cvs/builtins/eval.def	2002-08-25 23:42:10.000000000 +0200
+@@ -49,5 +49,5 @@
+   list = loptend;	/* skip over possible `--' */
+ 
+   /* Note that parse_and_execute () frees the string it is passed. */
+-  return (list ? parse_and_execute (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);
++  return (list ? parse_and_execute (string_list (list), "eval", SEVAL_NOHIST, 0) : EXECUTION_SUCCESS);
+ }
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/evalfile.c cvs/builtins/evalfile.c
+--- bash-2.05b/builtins/evalfile.c	2002-02-21 21:08:52.000000000 +0100
++++ cvs/builtins/evalfile.c	2002-10-10 14:34:04.000000000 +0200
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1996 Free Software Foundation, Inc.
++/* Copyright (C) 1996,2002 Free Software Foundation, Inc.
+ 
+    This file is part of GNU Bash, the Bourne Again SHell.
+ 
+@@ -80,6 +80,17 @@
+   size_t file_size;
+   sh_vmsg_func_t *errfunc;
+ 
++  SHELL_VAR *funcname_var    = find_variable ("FUNCNAME");
++  ARRAY     *funcname_a      = array_cell (funcname_var);
++  SHELL_VAR *bash_source_var = find_variable ("BASH_SOURCE");
++  ARRAY     *bash_source_a   = array_cell (bash_source_var);
++  SHELL_VAR *bash_lineno_var = find_variable ("BASH_LINENO");
++  ARRAY     *bash_lineno_a   = array_cell (bash_lineno_var);
++  SHELL_VAR *bash_argv_var    = find_variable ("BASH_ARGV");
++  ARRAY     *bash_argv_a      = array_cell (bash_argv_var);
++  SHELL_VAR *bash_argc_var    = find_variable ("BASH_ARGC");
++  ARRAY     *bash_argc_a      = array_cell (bash_argc_var);
++
+   USE_VAR(pflags);
+ 
+   fd = open (filename, O_RDONLY);
+@@ -175,6 +186,11 @@
+ 
+   return_catch_flag++;
+   sourcelevel++;
++  array_shift_element(bash_source_a, savestring(filename));
++  array_shift_element(bash_lineno_a, itos(executing_line_number ()));
++  array_shift_element(bash_argv_a, savestring(filename));
++  array_shift_element(bash_argc_a, itos(1));
++  array_shift_element(funcname_a, savestring("source"));
+ 
+   /* set the flags to be passed to parse_and_execute */
+   pflags = (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
+@@ -191,8 +207,8 @@
+       parse_and_execute_cleanup ();
+       result = return_catch_value;
+     }
+-  else
+-    result = parse_and_execute (string, filename, pflags);
++  else 
++    result = parse_and_execute (string, filename, pflags, 1);
+ 
+   if (flags & FEVAL_UNWINDPROT)
+     run_unwind_frame ("_evalfile");
+@@ -205,6 +221,11 @@
+       COPY_PROCENV (old_return_catch, return_catch);
+     }
+ 
++  array_dispose_element(array_unshift_element(bash_source_a));
++  array_dispose_element(array_unshift_element(bash_lineno_a));
++  array_dispose_element(array_unshift_element(funcname_a));
++  array_dispose_element(array_unshift_element(bash_argc_a));
++  array_dispose_element(array_unshift_element(bash_argv_a));
+   return ((flags & FEVAL_BUILTIN) ? result : 1);
+ }
+ 
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/evalstring.c cvs/builtins/evalstring.c
+--- bash-2.05b/builtins/evalstring.c	2002-04-04 20:38:50.000000000 +0200
++++ cvs/builtins/evalstring.c	2002-09-13 00:21:04.000000000 +0200
+@@ -84,13 +84,17 @@
+    	(flags & SEVAL_INTERACT) -> interactive = 1;
+    	(flags & SEVAL_NOHIST) -> call bash_history_disable ()
+    	(flags & SEVAL_NOFREE) -> don't free STRING when finished
++
++   reset_line_number causes the line number to be reset to 1, or preserves
++   the line number that we were at inside some other script.
+ */
+ 
+ int
+-parse_and_execute (string, from_file, flags)
++parse_and_execute (string, from_file, flags, reset_line_number)
+      char *string;
+      const char *from_file;
+      int flags;
++     int reset_line_number;
+ {
+   int code, x;
+   volatile int should_jump_to_top_level, last_result;
+@@ -129,7 +133,16 @@
+   end_unwind_frame ();
+ 
+   parse_and_execute_level++;
+-  push_stream (1);	/* reset the line number */
++
++  push_stream (reset_line_number);
++
++  /* If we don't want to reset the line, number we have to subtract
++     one, because we will add one just before executing the next
++     command. (Resetting sets the line_number to 0; the first line
++     number is 1).
++   */
++  if (!reset_line_number) line_number--;
++
+   indirection_level++;
+   if (flags & (SEVAL_NONINT|SEVAL_INTERACT))
+     interactive = (flags & SEVAL_NONINT) ? 0 : 1;
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/fc.def cvs/builtins/fc.def
+--- bash-2.05b/builtins/fc.def	2002-03-19 20:05:18.000000000 +0100
++++ cvs/builtins/fc.def	2002-08-29 05:27:39.000000000 +0200
+@@ -266,7 +266,7 @@
+ 
+       fprintf (stderr, "%s\n", command);
+       fc_replhist (command);	/* replace `fc -s' with command */
+-      return (parse_and_execute (command, "fc", SEVAL_NOHIST));
++      return (parse_and_execute (command, "fc", SEVAL_NOHIST, 0));
+     }
+ 
+   /* This is the second form of the command (the list-or-edit-and-rerun
+@@ -367,7 +367,7 @@
+       command = (char *)xmalloc (3 + strlen (FC_EDIT_COMMAND) + strlen (fn));
+       sprintf (command, "%s %s", FC_EDIT_COMMAND, fn);
+     }
+-  retval = parse_and_execute (command, "fc", SEVAL_NOHIST);
++  retval = parse_and_execute (command, "fc", SEVAL_NOHIST, 0);
+   if (retval != EXECUTION_SUCCESS)
+     {
+       unlink (fn);
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/history.def cvs/builtins/history.def
+--- bash-2.05b/builtins/history.def	2002-03-19 20:06:33.000000000 +0100
++++ cvs/builtins/history.def	2003-05-24 22:22:20.000000000 +0200
+@@ -34,16 +34,25 @@
+ append the contents to the history list instead.  `-a' means
+ to append history lines from this session to the history file.
+ Argument `-n' means to read all history lines not already read
+-from the history file and append them to the history list.  If
+-FILENAME is given, then that is used as the history file else
+-if $HISTFILE has a value, that is used, else ~/.bash_history.
+-If the -s option is supplied, the non-option ARGs are appended to
+-the history list as a single entry.  The -p option means to perform
+-history expansion on each ARG and display the result, without storing
+-anything in the history list.
++from the history file and append them to the history list.  
++
++If FILENAME is given, then that is used as the history file else if $HISTFILE 
++has a value, that is used, else ~/.bash_history.  If the -s
++option is supplied, the non-option ARGs are appended to the history
++list as a single entry.  The -p option means to perform history
++expansion on each ARG and display the result, without storing anything
++in the history list.
++
++The format of the timestamp shown in a command history is controlled
++by the $HISTTIMEFORMAT environment variable via strftime; the default
++value is '%a %T ' (abbreviated weekday name and 24-hour time with
++seconds). Note the trailing blank. See strftime(3) for a list of time
++conversion specifiers.
++
+ $END
+ 
+ #include <config.h>
++#include <time.h>
+ 
+ #if defined (HISTORY)
+ #include "../bashtypes.h"
+@@ -214,6 +223,19 @@
+ #define histline(i) (hlist[(i)]->line)
+ #define histdata(i) (hlist[(i)]->data)
+ 
++static char *
++histtime(HIST_ENTRY *hlist, const char *hist_time_format) 
++{
++  static char time_str[100];
++  time_t t = history_get_time(hlist);
++  
++  if (t != 0) 
++    strftime(time_str, 100, hist_time_format, localtime(&t));
++  else
++    strcpy(time_str, "?? ");
++  return time_str;
++}
++
+ static void
+ display_history (list)
+      WORD_LIST *list;
+@@ -235,6 +257,11 @@
+ 
+   if (hlist)
+     {
++      char *hist_time_format = get_string_value ("HISTTIMEFORMAT");
++
++      if (hist_time_format == NULL) 
++	hist_time_format = "%a %T ";
++      
+       for (i = 0;  hlist[i]; i++)
+ 	;
+ 
+@@ -246,9 +273,9 @@
+       while (hlist[i])
+ 	{
+ 	  QUIT;
+-	  printf ("%5d%c %s\n", i + history_base,
++	  printf ("%5d%c %s%s\n", i + history_base,
+ 		  histdata(i) ? '*' : ' ',
+-		  histline(i));
++		  histtime(hlist[i], hist_time_format), histline(i));
+ 	  i++;
+ 	}
+     }
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/return.def cvs/builtins/return.def
+--- bash-2.05b/builtins/return.def	2002-04-08 19:23:25.000000000 +0200
++++ cvs/builtins/return.def	2002-11-02 14:12:05.000000000 +0100
+@@ -54,6 +54,7 @@
+ {
+   return_catch_value = get_exitstat (list);
+ 
++  run_return_trap ();
+   if (return_catch_flag)
+     longjmp (return_catch, 1);
+   else
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/set.def cvs/builtins/set.def
+--- bash-2.05b/builtins/set.def	2002-07-10 22:17:20.000000000 +0200
++++ cvs/builtins/set.def	2002-11-06 04:43:08.000000000 +0100
+@@ -76,7 +76,9 @@
+ #if defined (READLINE)
+             emacs        use an emacs-style line editing interface
+ #endif /* READLINE */
++            fntrace      same as -d
+             errexit      same as -e
++            errtrace     same as -E
+             hashall      same as -h
+ #if defined (BANG_HISTORY)
+             histexpand   same as -H
+@@ -172,6 +174,8 @@
+   { "emacs",     '\0', (int *)NULL, set_edit_mode, get_edit_mode },
+ #endif
+   { "errexit",	  'e', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL  },
++  { "errtrace",	  'E', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL  },
++  { "fntrace",	  'd', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL  },
+   { "hashall",    'h', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL  },
+ #if defined (BANG_HISTORY)
+   { "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL  },
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/shift.def cvs/builtins/shift.def
+--- bash-2.05b/builtins/shift.def	2002-03-19 20:08:56.000000000 +0100
++++ cvs/builtins/shift.def	2003-08-11 10:06:30.000000000 +0200
+@@ -68,7 +68,7 @@
+   else if (times > number_of_args ())
+     {
+       if (print_shift_error)
+-	sh_erange (list->word->word, "shift count");
++	sh_erange (list ? list->word->word : NULL, "shift count");
+       return (EXECUTION_FAILURE);
+     }
+ 
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/source.def cvs/builtins/source.def
+--- bash-2.05b/builtins/source.def	2002-05-10 18:36:56.000000000 +0200
++++ cvs/builtins/source.def	2003-02-17 22:18:53.000000000 +0100
+@@ -23,16 +23,20 @@
+ 
+ $BUILTIN source
+ $FUNCTION source_builtin
+-$SHORT_DOC source filename
++$SHORT_DOC source FILENAME [ARGUMENTS]
+ Read and execute commands from FILENAME and return.  The pathnames
+ in $PATH are used to find the directory containing FILENAME.
++If any ARGUMENTS are supplied, they become the positional parameters when 
++FILENAME is executed.
+ $END
+ $BUILTIN .
+ $DOCNAME dot
+ $FUNCTION source_builtin
+-$SHORT_DOC . filename
++$SHORT_DOC . FILENAME [ARGUMENTS]
+ Read and execute commands from FILENAME and return.  The pathnames
+ in $PATH are used to find the directory containing FILENAME.
++If any ARGUMENTS are supplied, they become the positional parameters when 
++FILENAME is executed.
+ $END
+ /* source.c - Implements the `.' and `source' builtins. */
+ 
+@@ -52,10 +56,12 @@
+ 
+ #include "../bashansi.h"
+ 
++#include "../flags.h"
+ #include "../shell.h"
+ #include "../findcmd.h"
+ #include "common.h"
+ #include "bashgetopt.h"
++#include "../trap.h"
+ 
+ #if !defined (errno)
+ extern int errno;
+@@ -143,9 +149,29 @@
+     }
+   set_dollar_vars_unchanged ();
+ 
+-  result = source_file (filename);
++  { 
++    char *debug_trap = TRAP_STRING(DEBUG_TRAP);
+ 
++    if (debug_trap && !function_trace_mode)
++    {
++      debug_trap = savestring (debug_trap);
++      add_unwind_protect (xfree, debug_trap);
++      add_unwind_protect (set_debug_trap, debug_trap);
++      restore_default_signal (DEBUG_TRAP);
++    }
++
++
++    result = source_file (filename);
++    
++  }
++  
+   run_unwind_frame ("source");
+ 
+   return (result);
+ }
++
++/* 
++ * Local variables:
++ *  mode: C
++ * End:
++ */
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/command.h cvs/command.h
+--- bash-2.05b/command.h	2002-03-12 21:28:36.000000000 +0100
++++ cvs/command.h	2002-09-12 12:44:32.000000000 +0200
+@@ -195,6 +195,7 @@
+ /* The CASE command. */
+ typedef struct case_com {
+   int flags;			/* See description of CMD flags. */
++  int line;	                /* The line number of command */
+   WORD_DESC *word;		/* The thing to test. */
+   PATTERN_LIST *clauses;	/* The clauses to test against, or NULL. */
+ } CASE_COM;
+@@ -202,6 +203,7 @@
+ /* FOR command. */
+ typedef struct for_com {
+   int flags;		/* See description of CMD flags. */
++  int line;	        /* The line number of command */
+   WORD_DESC *name;	/* The variable name to get mapped over. */
+   WORD_LIST *map_list;	/* The things to map over.  This is never NULL. */
+   COMMAND *action;	/* The action to execute.
+@@ -224,6 +226,7 @@
+ /* KSH SELECT command. */
+ typedef struct select_com {
+   int flags;		/* See description of CMD flags. */
++  int line;	        /* The line number of command */
+   WORD_DESC *name;	/* The variable name to get mapped over. */
+   WORD_LIST *map_list;	/* The things to map over.  This is never NULL. */
+   COMMAND *action;	/* The action to execute.
+@@ -290,6 +293,7 @@
+   WORD_DESC *name;		/* The name of the function. */
+   COMMAND *command;		/* The parsed execution tree. */
+   int line;			/* Line number the function def starts on. */
++  char *source_file;		/* The source file containing function. */
+ } FUNCTION_DEF;
+ 
+ /* A command that is `grouped' allows pipes and redirections to affect all
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/config-bot.h cvs/config-bot.h
+--- bash-2.05b/config-bot.h	2002-04-16 23:01:03.000000000 +0200
++++ cvs/config-bot.h	2003-06-06 06:01:11.000000000 +0200
+@@ -104,7 +104,7 @@
+ /* For platforms which support the ISO C amendement 1 functionality we
+    support user defined character classes.  */
+ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
+-#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
++#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_WCWIDTH)
+ #  include <wchar.h>
+ #  include <wctype.h>
+ #  if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/config.h.in cvs/config.h.in
+--- bash-2.05b/config.h.in	2002-06-25 15:48:52.000000000 +0200
++++ cvs/config.h.in	2003-08-11 10:06:03.000000000 +0200
+@@ -582,6 +582,9 @@
+ /* Define if you have the putenv function.  */
+ #undef HAVE_PUTENV
+ 
++/* Define if you have the random function.  */
++#undef HAVE_RANDOM
++
+ /* Define if you have the readlink function. */
+ #undef HAVE_READLINK
+ 
+@@ -663,6 +666,9 @@
+ /* Define if you have the strsignal function or macro. */
+ #undef HAVE_STRSIGNAL
+ 
++/* Define if you have the srandom function.  */
++#undef HAVE_SRANDOM
++
+ /* Define if you have the sysconf function. */
+ #undef HAVE_SYSCONF
+ 
+Only in bash-2.05b: configure
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/configure.in cvs/configure.in
+--- bash-2.05b/configure.in	2002-07-16 15:31:25.000000000 +0200
++++ cvs/configure.in	2003-09-01 21:57:33.000000000 +0200
+@@ -1,11 +1,11 @@
+ dnl
+-dnl Configure script for bash-2.05
++dnl Configure script for bash with debugger
+ dnl
+-dnl report bugs to chet@po.cwru.edu
++dnl report bugs to rocky@panix.com
+ dnl
+ dnl Process this file with autoconf to produce a configure script.
+ 
+-# Copyright (C) 1987-2002 Free Software Foundation, Inc.
++# Copyright (C) 1987-2003 Free Software Foundation, Inc.
+ 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -22,21 +22,28 @@
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ # 02111-1307, USA.
+ 
+-AC_REVISION([for Bash 2.05b, version 2.144, from autoconf version] AC_ACVERSION)dnl
++define(bashvers, 2.05b)
++define(relstatus, rebash-0.43)
+ 
+-AC_INIT(bash, 2.05b, bug-bash@gnu.org)
++AC_INIT([bash],[bashvers-relstatus],[rocky@panix.com])
++
++AM_PATH_LISPDIR
++AC_ARG_PROGRAM
+ 
+ dnl make sure we are using a recent autoconf version
+-AC_PREREQ(2.50)
++AC_PREREQ(2.53)
+ 
+ AC_CONFIG_SRCDIR(shell.h)
++if test x$ac_srcdir = x ; then
++	ac_srcdir=.
++fi
+ dnl where to find install.sh, config.sub, and config.guess
+ AC_CONFIG_AUX_DIR(./support)
+ AC_CONFIG_HEADERS(config.h)
+ 
+ dnl checks for version info
+-BASHVERS=2.05b
+-RELSTATUS=release
++BASHVERS=bashvers
++RELSTATUS=relstatus
+ 
+ dnl defaults for debug settings
+ case "$RELSTATUS" in
+@@ -44,9 +51,8 @@
+ *)	DEBUG= MALLOC_DEBUG= ;;
+ esac
+ 
+-dnl canonicalize the host and os so we can do some tricky things before
+-dnl parsing options
+-AC_CANONICAL_HOST
++dnl Allow package selection (for installation), Setting bashdb as default
++AC_BASHDB_PACKAGE([bashdb])
+ 
+ dnl configure defaults
+ opt_bash_malloc=yes
+@@ -92,6 +98,9 @@
+ *)			opt_memscramble=yes ;;
+ esac
+ 
++dnl variables to configure
++AC_ARG_VAR(DEBUGGER_START_FILE, [location of debugger startup file])
++
+ dnl arguments to configure
+ dnl packages
+ AC_ARG_WITH(afs, AC_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval)
+@@ -138,6 +147,34 @@
+ 	prefer_curses=yes
+ fi
+ 
++if test -z "${DEBUGGER_START_FILE}"; then
++       ac_debugger_start_file=${datadir}/${PACKAGE}/dbg-main.inc
++       DEBUGGER_START_FILE=`(
++            test "x$prefix" = xNONE && prefix="$ac_default_prefix"
++            test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
++            eval echo "$ac_debugger_start_file"
++       )`
++fi
++
++dnl We use a diff in regression testing
++AC_PATH_PROG(DIFF, diff, no)
++DIFF_OPTS=
++
++if test "$DIFF" = no ; then
++   AC_PATH_PROG(DIFF, cmp, no)
++else 
++   dnl Try for GNU diff options.
++  # MSDOG output uses \r\n rather than \n in tests
++  for diff_opt in -w --unified ; do 
++    if $DIFF $diff_opt ./configure ./configure > /dev/null 2>&1; then
++      AC_MSG_RESULT([adding $diff_opt to diff in regression tests])
++      DIFF_OPTS="$DIFF_OPTS $diff_opt"
++    fi
++  done
++fi
++AC_SUBST(DIFF)
++AC_SUBST(DIFF_OPTS)
++
+ dnl optional shell features in config.h.in
+ opt_minimal_config=no
+ 
+@@ -327,8 +364,7 @@
+ AC_MINIX
+ 
+ dnl test for non-Unix variants
+-AC_CYGWIN
+-AC_MINGW32
++AC_CANONICAL_HOST()
+ 
+ AC_SYS_LARGEFILE
+ 
+@@ -345,7 +381,7 @@
+ 
+ if test "x$cross_compiling" = "xyes"; then
+     case "${host}" in
+-    *-cygwin*)
++    *cygwin*)
+ 	cross_cache=${srcdir}/cross-build/cygwin32.cache
+ 	SIGNAMES_H='$(srcdir)/cross-build/win32sig.h'
+ 	;;
+@@ -394,7 +430,7 @@
+ 
+ if test "$opt_static_link" = yes; then
+ 	# if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
+-	if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then
++	if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
+ 		STATIC_LD="-static" 
+ 		case "$host_os" in
+ 		solaris2*)	;;
+@@ -609,6 +645,9 @@
+ 
+ AC_FUNC_MKTIME
+ 
++dnl checks for random functions
++AC_CHECK_FUNCS(random srandom)
++
+ dnl checks for locale functions
+ AC_CHECK_HEADERS(libintl.h)
+ AC_CHECK_FUNCS(gettext textdomain bindtextdomain)
+@@ -631,7 +670,8 @@
+ fi
+ 
+ dnl this defines SYS_SIGLIST_DECLARED
+-AC_DECL_SYS_SIGLIST
++AC_CHECK_DECLS([sys_siglist])
++
+ 
+ dnl network functions -- check for inet_aton again
+ if test "$ac_cv_func_inet_aton" != 'yes'; then
+@@ -945,11 +985,29 @@
+ #AC_SUBST(ALLOCA_SOURCE)
+ #AC_SUBST(ALLOCA_OBJECT)
+ 
+-AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
++AC_CONFIG_SUBDIRS(debugger)
++
++AC_CONFIG_FILES([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
+ 	  lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
+-	  lib/tilde/Makefile doc/Makefile support/Makefile \
+-	  examples/loadables/Makefile examples/loadables/perl/Makefile],
+-[
++	  lib/tilde/Makefile  doc/Makefile  \
++	  tests/check_common \
++	  support/Makefile pathnames.h \
++	  examples/loadables/Makefile examples/loadables/perl/Makefile])
++
++# We don't want TeX do be a requirement for compilation.
++if ! test -e $ac_srcdir/doc/version.texi ;then
++	AC_CONFIG_FILES([ doc/version.texi ])
++fi
++
++AC_CONFIG_COMMANDS([default],[[
+ # Makefile uses this timestamp file to record whether config.h is up to date.
+ echo timestamp > stamp-h
+-])
++# Until we get CVS to set these +x
++chmod +x $ac_srcdir/tests/run-*
++# Keep old dates on these so we don't gratuitously have make do work.
++if test -e $ac_srcdir/doc/version.texi ;then
++	echo timestamp > $ac_srcdir/doc/stamp-vti
++	touch -cr $ac_srcdir/configure.in doc/version.texi $ac_srcdir/doc/stamp-vti
++fi
++]],[[]])
++AC_OUTPUT
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/cvscompile.sh cvs/cvscompile.sh
+--- bash-2.05b/cvscompile.sh	1970-01-01 01:00:00.000000000 +0100
++++ cvs/cvscompile.sh	2002-09-23 23:57:39.000000000 +0200
+@@ -0,0 +1,21 @@
++#!/bin/sh
++# $Id: cvscompile.sh,v 1.8 2002/09/23 21:57:39 rockyb Exp $ 
++# Run this to generate all the initial Makefiles, etc.
++
++# As reported by Masatake  YAMATO, 
++
++# In the Autotools book written by Gary V. Vaughan, et al.,
++# bootstrap.sh and autogen.sh are are used for initializing files that
++# are derived and are therefore not checked into CVS. The difference
++# between bootstrap.sh and autogen.sh is running configure at the end
++# of script or not; autogen.sh runs and bootstrap.sh does not.  So
++# autogen.sh is found in many projects; bootstrap.sh is good for cross
++# compiling.
++
++./autogen.sh $@
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
++
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/AUTHORS cvs/debugger/AUTHORS
+--- bash-2.05b/debugger/AUTHORS	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/AUTHORS	2002-08-30 18:20:26.000000000 +0200
+@@ -0,0 +1,9 @@
++R. Bernstein (rocky@panix.com)
++
++with ideas from (via a predecessor bashdb): 
++	
++Bill Rosenblatt,
++Michael Loukides,
++Cigy Cyriac, 
++Chet Ramey, 
++Gary V. Vaughan
+\ No newline at end of file
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/CHANGES cvs/debugger/CHANGES
+--- bash-2.05b/debugger/CHANGES	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/CHANGES	2003-06-01 03:18:40.000000000 +0200
+@@ -0,0 +1,132 @@
++-------------------------------
++CHANGES TO THE BASH INTERPRETER
++-------------------------------
++
++Added timestamped history and customized display via strftime and the 
++HISTTIMEFORMAT environment variable.
++
++Added --debugger option which sources debugger startup script.
++
++Extended FUNCNAME variable to be an array indicating the call stack of
++function names in effect. The top-level "function" name is "main."
++
++Extended "declare -F fn" to return the source file name and the line number
++inside that of fn.
++
++Added dynamic BASH_ARGC and BASH_ARGV arrays which store all of the
++parameters.  ARGC gives the number of parameters in a call. BASH_ARGV
++are the parameters in stack like fashion. Last parameter of last call
++is on top, first parameter of initial call is on the bottom (index 0).
++
++Added dynamic BASH_SOURCE array variable to give the file names associated 
++with FUNCNAME.
++
++Using BASH_SOURCE we now report the right filename when you have an
++evaluation error in a sourced file.
++
++Added dynamic BASH_LINENO array variable to give the source file line
++numbers names associated with FUNCNAME.
++
++LINENO: All line numbers are now relative to the beginning of a file,
++not relative to a function name.
++
++Added dynamic BASH_COMMAND variable which is the command to be
++executed (or is executing) unless the command is a "trap" in which
++case it is the command that will be executed after the trap completes.
++
++Added dynamic BASH_SUBSHELL variable gives the number of subshells
++that you are nested in.
++
++Added a set shell option (set -o fntrace or set -d) which
++causes the TRAP DEBUG setting (whether the value is on or off) to
++persist when entering a function. It also does likewise for the
++"source" builtin and command substitution.
++
++Added a new trap "RETURN" which calls a handler every time a
++function or sourced file is returned. 
++
++Added a new trap "SUBEXIT" which calls a handler every time a
++subshell exits.
++
++Added caller() builtin function which works like Perl's builtin. 
++
++trap DEBUG will skip the next statement to be executed if the
++handler returns 2 (or sets $? to 2).
++
++Line number on command substitution `` $() and { } is the line number
++of the source file, and not relative to the beginning of the
++substitution (which is usually 1). For debugging absolute line numbers
++are useful. Even outside of debugging, when reporting errors it's hard
++to see how error messages like these generated from errors.tests in the previous versions of bash (<=2.05):
++
++./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
++./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
++
++are as helpful than what we get now with absolute line numbers:
++
++./errors.tests: line 212: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
++./errors.tests: line 213: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
++
++Line numbers probably a little more accurate on tracing and
++LINENO. 
++
++"for" variables, and "case" conditions and "select" selectors are
++listed on "set -x" tracing and debugging. 
++
++---------
++CHANGES TO EXTERNAL BASH DEBUGGER AND ITS LIBRARY CODE
++
++First I've tried to make this look more like gdb and perldb which are
++much richer debuggers. Probably the easiest part was to hack into the
++Emacs GUD (Grand Unified Debugger) code to work with bashdb. Making
++bashdb work with DDD, a debugger GUI front end was likewise
++straightforward (although requiring copious additions to many files -
++the changes were basically, "do this like Perl or do this like GDB"). 
++
++By now (Aug 2002), most of Michael Loukides' and Bill Rosenblatt's ksh
++debugger code (circa 1995 and before) has been replaced.
++
++The hackery of creating and running a concatenated file with debugging
++routines include (bashdb.pre and bashdb.fns) has been eliminated. Now
++we just source the debugged file or, better, do a funny "source"
++inside bash itself to get $0 correct and the the call stack correct.
++
++There is now some option processing in bashdb script.  In particular
++use -L to tell bashdb where the directory of the debugger code. There
++is more verbose usage reporting.
++
++There is now an internal source-line array for *each* source file seen
++in debugger execution. The original code always retrieved from a text
++file (and it was presumed that there was only one). Since changes to
++the source after the program is running aren't reflected in the
++execution of the code, reading the source file to retrieve source text
++if that text was modified in the midst of debugging may give the wrong
++source line text. In this respect caching source lines may be more
++accurate. 
++
++There had been a variable which stored breakpoints as a string of line
++numbers, e.g. "3|23|45|". Using "|" as a field separator perhaps was
++convenient since one could then call egrep (without the trailing "|")
++to list a line number. Such was life in days when arrays were not a
++considered to be standard in POSIX-like shells, and bash still has
++provisions for conditionally compiling array support in.  However,
++nowadays I think it safe to assume the array datatype standard; it is
++POSIX.
++
++So I've removed this breakpoint variable and replaced it with an
++array. As for finding the line associated with the breakpoint, I added
++another array to store the source line for that.
++
++I've added watchpoints as are found in perl5db or gdb.
++
++With the breakpoint array, I also added breakpoint conditions and
++one-time breakpoints, whether the breakpoint is enabled or disabled,
++all analogous to gdb.
++
++Signal handling was added, and saving and restoring $?, $1, $2, the
++"set" options.
++
++With this, I think we've gotten over the main hurdle of getting a
++decent debugger for bash.
++
++$Id: CHANGES,v 1.14 2003/06/01 01:18:40 rockyb Exp $
+\ No newline at end of file
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/COPYING cvs/debugger/COPYING
+--- bash-2.05b/debugger/COPYING	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/COPYING	2002-08-20 18:04:30.000000000 +0200
+@@ -0,0 +1,340 @@
++		    GNU GENERAL PUBLIC LICENSE
++		       Version 2, June 1991
++
++ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
++                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ Everyone is permitted to copy and distribute verbatim copies
++ of this license document, but changing it is not allowed.
++
++			    Preamble
++
++  The licenses for most software are designed to take away your
++freedom to share and change it.  By contrast, the GNU General Public
++License is intended to guarantee your freedom to share and change free
++software--to make sure the software is free for all its users.  This
++General Public License applies to most of the Free Software
++Foundation's software and to any other program whose authors commit to
++using it.  (Some other Free Software Foundation software is covered by
++the GNU Library General Public License instead.)  You can apply it to
++your programs, too.
++
++  When we speak of free software, we are referring to freedom, not
++price.  Our General Public Licenses are designed to make sure that you
++have the freedom to distribute copies of free software (and charge for
++this service if you wish), that you receive source code or can get it
++if you want it, that you can change the software or use pieces of it
++in new free programs; and that you know you can do these things.
++
++  To protect your rights, we need to make restrictions that forbid
++anyone to deny you these rights or to ask you to surrender the rights.
++These restrictions translate to certain responsibilities for you if you
++distribute copies of the software, or if you modify it.
++
++  For example, if you distribute copies of such a program, whether
++gratis or for a fee, you must give the recipients all the rights that
++you have.  You must make sure that they, too, receive or can get the
++source code.  And you must show them these terms so they know their
++rights.
++
++  We protect your rights with two steps: (1) copyright the software, and
++(2) offer you this license which gives you legal permission to copy,
++distribute and/or modify the software.
++
++  Also, for each author's protection and ours, we want to make certain
++that everyone understands that there is no warranty for this free
++software.  If the software is modified by someone else and passed on, we
++want its recipients to know that what they have is not the original, so
++that any problems introduced by others will not reflect on the original
++authors' reputations.
++
++  Finally, any free program is threatened constantly by software
++patents.  We wish to avoid the danger that redistributors of a free
++program will individually obtain patent licenses, in effect making the
++program proprietary.  To prevent this, we have made it clear that any
++patent must be licensed for everyone's free use or not licensed at all.
++
++  The precise terms and conditions for copying, distribution and
++modification follow.
++
++		    GNU GENERAL PUBLIC LICENSE
++   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
++
++  0. This License applies to any program or other work which contains
++a notice placed by the copyright holder saying it may be distributed
++under the terms of this General Public License.  The "Program", below,
++refers to any such program or work, and a "work based on the Program"
++means either the Program or any derivative work under copyright law:
++that is to say, a work containing the Program or a portion of it,
++either verbatim or with modifications and/or translated into another
++language.  (Hereinafter, translation is included without limitation in
++the term "modification".)  Each licensee is addressed as "you".
++
++Activities other than copying, distribution and modification are not
++covered by this License; they are outside its scope.  The act of
++running the Program is not restricted, and the output from the Program
++is covered only if its contents constitute a work based on the
++Program (independent of having been made by running the Program).
++Whether that is true depends on what the Program does.
++
++  1. You may copy and distribute verbatim copies of the Program's
++source code as you receive it, in any medium, provided that you
++conspicuously and appropriately publish on each copy an appropriate
++copyright notice and disclaimer of warranty; keep intact all the
++notices that refer to this License and to the absence of any warranty;
++and give any other recipients of the Program a copy of this License
++along with the Program.
++
++You may charge a fee for the physical act of transferring a copy, and
++you may at your option offer warranty protection in exchange for a fee.
++
++  2. You may modify your copy or copies of the Program or any portion
++of it, thus forming a work based on the Program, and copy and
++distribute such modifications or work under the terms of Section 1
++above, provided that you also meet all of these conditions:
++
++    a) You must cause the modified files to carry prominent notices
++    stating that you changed the files and the date of any change.
++
++    b) You must cause any work that you distribute or publish, that in
++    whole or in part contains or is derived from the Program or any
++    part thereof, to be licensed as a whole at no charge to all third
++    parties under the terms of this License.
++
++    c) If the modified program normally reads commands interactively
++    when run, you must cause it, when started running for such
++    interactive use in the most ordinary way, to print or display an
++    announcement including an appropriate copyright notice and a
++    notice that there is no warranty (or else, saying that you provide
++    a warranty) and that users may redistribute the program under
++    these conditions, and telling the user how to view a copy of this
++    License.  (Exception: if the Program itself is interactive but
++    does not normally print such an announcement, your work based on
++    the Program is not required to print an announcement.)
++
++These requirements apply to the modified work as a whole.  If
++identifiable sections of that work are not derived from the Program,
++and can be reasonably considered independent and separate works in
++themselves, then this License, and its terms, do not apply to those
++sections when you distribute them as separate works.  But when you
++distribute the same sections as part of a whole which is a work based
++on the Program, the distribution of the whole must be on the terms of
++this License, whose permissions for other licensees extend to the
++entire whole, and thus to each and every part regardless of who wrote it.
++
++Thus, it is not the intent of this section to claim rights or contest
++your rights to work written entirely by you; rather, the intent is to
++exercise the right to control the distribution of derivative or
++collective works based on the Program.
++
++In addition, mere aggregation of another work not based on the Program
++with the Program (or with a work based on the Program) on a volume of
++a storage or distribution medium does not bring the other work under
++the scope of this License.
++
++  3. You may copy and distribute the Program (or a work based on it,
++under Section 2) in object code or executable form under the terms of
++Sections 1 and 2 above provided that you also do one of the following:
++
++    a) Accompany it with the complete corresponding machine-readable
++    source code, which must be distributed under the terms of Sections
++    1 and 2 above on a medium customarily used for software interchange; or,
++
++    b) Accompany it with a written offer, valid for at least three
++    years, to give any third party, for a charge no more than your
++    cost of physically performing source distribution, a complete
++    machine-readable copy of the corresponding source code, to be
++    distributed under the terms of Sections 1 and 2 above on a medium
++    customarily used for software interchange; or,
++
++    c) Accompany it with the information you received as to the offer
++    to distribute corresponding source code.  (This alternative is
++    allowed only for noncommercial distribution and only if you
++    received the program in object code or executable form with such
++    an offer, in accord with Subsection b above.)
++
++The source code for a work means the preferred form of the work for
++making modifications to it.  For an executable work, complete source
++code means all the source code for all modules it contains, plus any
++associated interface definition files, plus the scripts used to
++control compilation and installation of the executable.  However, as a
++special exception, the source code distributed need not include
++anything that is normally distributed (in either source or binary
++form) with the major components (compiler, kernel, and so on) of the
++operating system on which the executable runs, unless that component
++itself accompanies the executable.
++
++If distribution of executable or object code is made by offering
++access to copy from a designated place, then offering equivalent
++access to copy the source code from the same place counts as
++distribution of the source code, even though third parties are not
++compelled to copy the source along with the object code.
++
++  4. You may not copy, modify, sublicense, or distribute the Program
++except as expressly provided under this License.  Any attempt
++otherwise to copy, modify, sublicense or distribute the Program is
++void, and will automatically terminate your rights under this License.
++However, parties who have received copies, or rights, from you under
++this License will not have their licenses terminated so long as such
++parties remain in full compliance.
++
++  5. You are not required to accept this License, since you have not
++signed it.  However, nothing else grants you permission to modify or
++distribute the Program or its derivative works.  These actions are
++prohibited by law if you do not accept this License.  Therefore, by
++modifying or distributing the Program (or any work based on the
++Program), you indicate your acceptance of this License to do so, and
++all its terms and conditions for copying, distributing or modifying
++the Program or works based on it.
++
++  6. Each time you redistribute the Program (or any work based on the
++Program), the recipient automatically receives a license from the
++original licensor to copy, distribute or modify the Program subject to
++these terms and conditions.  You may not impose any further
++restrictions on the recipients' exercise of the rights granted herein.
++You are not responsible for enforcing compliance by third parties to
++this License.
++
++  7. If, as a consequence of a court judgment or allegation of patent
++infringement or for any other reason (not limited to patent issues),
++conditions are imposed on you (whether by court order, agreement or
++otherwise) that contradict the conditions of this License, they do not
++excuse you from the conditions of this License.  If you cannot
++distribute so as to satisfy simultaneously your obligations under this
++License and any other pertinent obligations, then as a consequence you
++may not distribute the Program at all.  For example, if a patent
++license would not permit royalty-free redistribution of the Program by
++all those who receive copies directly or indirectly through you, then
++the only way you could satisfy both it and this License would be to
++refrain entirely from distribution of the Program.
++
++If any portion of this section is held invalid or unenforceable under
++any particular circumstance, the balance of the section is intended to
++apply and the section as a whole is intended to apply in other
++circumstances.
++
++It is not the purpose of this section to induce you to infringe any
++patents or other property right claims or to contest validity of any
++such claims; this section has the sole purpose of protecting the
++integrity of the free software distribution system, which is
++implemented by public license practices.  Many people have made
++generous contributions to the wide range of software distributed
++through that system in reliance on consistent application of that
++system; it is up to the author/donor to decide if he or she is willing
++to distribute software through any other system and a licensee cannot
++impose that choice.
++
++This section is intended to make thoroughly clear what is believed to
++be a consequence of the rest of this License.
++
++  8. If the distribution and/or use of the Program is restricted in
++certain countries either by patents or by copyrighted interfaces, the
++original copyright holder who places the Program under this License
++may add an explicit geographical distribution limitation excluding
++those countries, so that distribution is permitted only in or among
++countries not thus excluded.  In such case, this License incorporates
++the limitation as if written in the body of this License.
++
++  9. The Free Software Foundation may publish revised and/or new versions
++of the General Public License from time to time.  Such new versions will
++be similar in spirit to the present version, but may differ in detail to
++address new problems or concerns.
++
++Each version is given a distinguishing version number.  If the Program
++specifies a version number of this License which applies to it and "any
++later version", you have the option of following the terms and conditions
++either of that version or of any later version published by the Free
++Software Foundation.  If the Program does not specify a version number of
++this License, you may choose any version ever published by the Free Software
++Foundation.
++
++  10. If you wish to incorporate parts of the Program into other free
++programs whose distribution conditions are different, write to the author
++to ask for permission.  For software which is copyrighted by the Free
++Software Foundation, write to the Free Software Foundation; we sometimes
++make exceptions for this.  Our decision will be guided by the two goals
++of preserving the free status of all derivatives of our free software and
++of promoting the sharing and reuse of software generally.
++
++			    NO WARRANTY
++
++  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
++REPAIR OR CORRECTION.
++
++  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGES.
++
++		     END OF TERMS AND CONDITIONS
++
++	    How to Apply These Terms to Your New Programs
++
++  If you develop a new program, and you want it to be of the greatest
++possible use to the public, the best way to achieve this is to make it
++free software which everyone can redistribute and change under these terms.
++
++  To do so, attach the following notices to the program.  It is safest
++to attach them to the start of each source file to most effectively
++convey the exclusion of warranty; and each file should have at least
++the "copyright" line and a pointer to where the full notice is found.
++
++    <one line to give the program's name and a brief idea of what it does.>
++    Copyright (C) 19yy  <name of author>
++
++    This program is free software; you can redistribute it and/or modify
++    it under the terms of the GNU General Public License as published by
++    the Free Software Foundation; either version 2 of the License, or
++    (at your option) any later version.
++
++    This program is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++    GNU General Public License for more details.
++
++    You should have received a copy of the GNU General Public License
++    along with this program; if not, write to the Free Software
++    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++
++
++Also add information on how to contact you by electronic and paper mail.
++
++If the program is interactive, make it output a short notice like this
++when it starts in an interactive mode:
++
++    Gnomovision version 69, Copyright (C) 19yy name of author
++    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
++    This is free software, and you are welcome to redistribute it
++    under certain conditions; type `show c' for details.
++
++The hypothetical commands `show w' and `show c' should show the appropriate
++parts of the General Public License.  Of course, the commands you use may
++be called something other than `show w' and `show c'; they could even be
++mouse-clicks or menu items--whatever suits your program.
++
++You should also get your employer (if you work as a programmer) or your
++school, if any, to sign a "copyright disclaimer" for the program, if
++necessary.  Here is a sample; alter the names:
++
++  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
++  `Gnomovision' (which makes passes at compilers) written by James Hacker.
++
++  <signature of Ty Coon>, 1 April 1989
++  Ty Coon, President of Vice
++
++This General Public License does not permit incorporating your program into
++proprietary programs.  If your program is a subroutine library, you may
++consider it more useful to permit linking proprietary applications with the
++library.  If this is what you want to do, use the GNU Library General
++Public License instead of this License.
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/ChangeLog cvs/debugger/ChangeLog
+--- bash-2.05b/debugger/ChangeLog	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/ChangeLog	2003-08-02 22:33:22.000000000 +0200
+@@ -0,0 +1,2258 @@
++2003-08-02 16:20  rockyb
++
++	* dbg-cmds.inc, dbg-help.inc, doc/bashdb.texi: Doc changes.
++
++2003-08-02 16:19  rockyb
++
++	* configure.ac: Time for another release.
++
++2003-08-02 16:12  rockyb
++
++	* test/: misc.right, sig.right: Help changed. Not sure why sig
++	keeps changing though.
++
++2003-08-02 15:54  rockyb
++
++	* Makefile.am, dbg-file.inc, dbg-help.inc, dbg-io.inc,
++	dbg-list.inc: Add _Dbg_ in front of more debugger variables. In
++	particular: _read_ -> _Dbg_read_ _maxline_  -> _Dbg_maxline_
++	_source_ -> _Dbg_source_
++
++2003-08-02 15:53  rockyb
++
++	* test/: misc-output.right, misc.right, sig.right: Add test of V
++	command. sig: line number again changed.
++
++2003-08-02 15:52  rockyb
++
++	* test/misc.cmd: Add test of V command.
++
++2003-08-02 15:51  rockyb
++
++	* dbg-cmds.inc: Routine to list variables and values by pattern
++	possibly inverted.  Code courtesy of Mikael Andersson
++	<snikkt@telia.com>.
++
++2003-08-02 15:46  rockyb
++
++	* THANKS: This is long overdue, even if it is meager.
++
++2003-08-01 06:45  rockyb
++
++	* dbg-help.inc: Add "help show <command>" and "help info <command>"
++	.
++
++2003-07-31 23:48  rockyb
++
++	* dbg-help.inc: Missing a line for "help V"
++
++2003-06-19 10:49  rockyb
++
++	* TODO: Simple typo.
++
++2003-06-13 17:49  rockyb
++
++	* NEWS, ChangeLog: [no log message]
++
++2003-06-08 23:19  rockyb
++
++	* configure.ac: It's = not == in tests
++
++2003-06-08 10:39  rockyb
++
++	* configure.ac, test/Makefile.am, test/action.tests,
++	test/bugIFS.tests, test/display.tests, test/finish.tests,
++	test/run-action, test/run-brkpt, test/run-brkpt1, test/run-bugIFS,
++	test/run-debug, test/run-display, test/run-finish, test/run-list,
++	test/run-misc, test/run-multi, test/run-parm, test/run-search,
++	test/run-sig, test/run-skip, test/run-subshell, test/run-tbreak,
++	test/run-watch1, test/run-watch2, test/skip.tests,
++	test/subshell1.tests, test/subshell2.tests, test/subshell3.tests:
++	Debugger regression tests now will use diff --u if possible.  Will
++	revert even to cmp if diff is not around.  check_common: common
++	routines and setup to simplify/unify regression testing
++
++2003-06-06 01:01  rockyb
++
++	* NEWS, test/run-multi: Bash patches 005-007.  run-multi: set
++	THIS_SH so it runs under cygwin (and others).
++
++2003-06-03 14:28  rockyb
++
++	* test/: Makefile.am, multi1.right, multi1.tests, multi2.right,
++	multi2.tests, multi3.right, multi3.tests, multi4.tests, run-multi:
++	Add multi tests
++
++2003-06-03 14:27  rockyb
++
++	* Makefile.am: Add EXTEXT for M$ OS's.
++
++2003-06-03 13:08  rockyb
++
++	* test/: Makefile.am, multi.sh, multi1.cmd, multi1.tests,
++	multi2.cmd, multi2.tests, multi3.cmd, multi3.tests, multi4.right,
++	run-multi: Add multi tests
++
++2003-06-02 05:06  rockyb
++
++	* configure.ac: [no log message]
++
++2003-06-02 05:03  rockyb
++
++	* configure.ac: Create bashdb as executable.
++
++2003-06-01 11:07  rockyb
++
++	* Makefile.am: Make sure bash is copied before running "make check"
++
++2003-06-01 10:35  rockyb
++
++	* doc/.cvsignore: [no log message]
++
++2003-06-01 10:35  rockyb
++
++	* .cvsignore, doc/.cvsignore, doc/fdl.texi: CVS maintainance.
++
++2003-06-01 10:32  rockyb
++
++	* ChangeLog, Makefile.am, configure.ac: configure.ac: set unique
++	distribution name Makefile.am: include doc directory.
++
++2003-06-01 10:31  rockyb
++
++	* doc/: Makefile.am, bashdb.texi, gpl.texi, version.texi.in: Except
++	Makefile.am, moved from bash doc directory.  Makefile.am: pretty
++	standard stuff.
++
++2003-06-01 10:29  rockyb
++
++	* doc/.cvsignore: [no log message]
++
++2003-06-01 10:25  rockyb
++
++	* NEWS: [no log message]
++
++2003-06-01 09:23  rockyb
++
++	* test/: brkpt1.tests, brkpt2.right, brkpt2.tests, brkpt3.tests,
++	debug.tests, list.tests, misc.tests, parm.tests, run-brkpt,
++	run-debug, run-list, run-misc, run-parm, run-search, run-sig,
++	run-tbreak, run-watch2, search.tests, sig.tests, tbreak.tests,
++	watch2.tests: make check and make distcheck now work.
++
++2003-05-31 22:43  rockyb
++
++	* Makefile.am: Seems to be needed for make dist to work.
++
++2003-05-31 22:23  rockyb
++
++	* configure.ac: configure.in -> configure.ac
++
++2003-05-31 22:15  rockyb
++
++	* test/: Makefile.am, run-action, run-brkpt, run-brkpt1,
++	run-bugIFS, run-debug, run-display, run-finish, run-list, run-misc,
++	run-multi, run-parm, run-search, run-sig, run-skip, run-subshell,
++	run-tbreak, run-watch1, run-watch2, skip.tests, subshell1.tests,
++	tbreak.tests: Closer to getting "make distcheck" working. "make
++	check" is currently broken for a couple of tests.
++
++2003-05-31 21:35  rockyb
++
++	* test/: brkpt3.tests, debug.tests, display.tests, finish.tests,
++	list.tests, subshell2.tests, subshell3.tests, subshell4.tests,
++	tbreak.tests, watch1.tests, watch2.tests: changes  to making "make
++	dist" work
++
++2003-05-31 21:18  rockyb
++
++	* CHANGES, Makefile.am, bashdb, bashdb.in, configure.in,
++	dbg-file.inc, test/.cvsignore, test/Makefile.am, test/action.cmd,
++	test/action.right, test/action.tests, test/brkpt1.cmd,
++	test/brkpt1.right, test/brkpt1.tests, test/brkpt2.cmd,
++	test/brkpt2.right, test/brkpt2.tests, test/brkpt3.cmd,
++	test/brkpt3.right, test/brkpt3.tests, test/bugIFS, test/bugIFS.cmd,
++	test/bugIFS.right, test/bugIFS.sh, test/bugIFS.tests,
++	test/dbg-test1.sh, test/dbg-test1.sub, test/dbg-test2.sh,
++	test/debug.cmd, test/debug.right, test/debug.sh, test/debug.tests,
++	test/debug2.cmd, test/display.cmd, test/display.right,
++	test/display.tests, test/finish.cmd, test/finish.right,
++	test/finish.tests, test/list.cmd, test/list.right, test/list.tests,
++	test/misc-output.right, test/misc.cmd, test/misc.right,
++	test/misc.tests, test/multi4.cmd, test/multi4.right,
++	test/multi4.tests, test/parm.cmd, test/parm.right, test/parm.sh,
++	test/parm.tests, test/prof1.cmd, test/prof2.cmd, test/run-action,
++	test/run-all, test/run-brkpt, test/run-brkpt1, test/run-bugIFS,
++	test/run-debug, test/run-display, test/run-finish, test/run-list,
++	test/run-misc, test/run-multi, test/run-parm, test/run-search,
++	test/run-sig, test/run-skip, test/run-subshell, test/run-tbreak,
++	test/run-watch1, test/run-watch2, test/search.cmd,
++	test/search.right, test/search.tests, test/sig.cmd, test/sig.right,
++	test/sig.sh, test/sig.tests, test/skip.cmd, test/skip.right,
++	test/skip.sh, test/skip.tests, test/subshell.sh,
++	test/subshell1.cmd, test/subshell1.right, test/subshell1.tests,
++	test/subshell2.cmd, test/subshell2.right, test/subshell2.tests,
++	test/subshell3.cmd, test/subshell3.right, test/subshell3.tests,
++	test/subshell4.cmd, test/subshell4.right, test/subshell4.tests,
++	test/tbreak.cmd, test/tbreak.right, test/tbreak.tests,
++	test/watch1.cmd, test/watch1.right, test/watch1.tests,
++	test/watch2.cmd, test/watch2.right, test/watch2.tests:
++	configure->configure.ac tests->test bashdb no longer has hard-coded
++	#! some changes to make "make distcheck" work... More changes
++	later..
++
++2003-05-27 19:54  rockyb
++
++	* NEWS: [no log message]
++
++2003-05-20 14:02  rockyb
++
++	* dbg-init.inc: More OS-independent (output independent) test if a
++	terminal is attached.
++
++2003-04-29 20:33  rockyb
++
++	* NEWS: [no log message]
++
++2003-04-29 20:22  rockyb
++
++	* bashdb, dbg-cmds.inc, dbg-fns.inc, dbg-init.inc: Bug: Was using
++	source filename rather than canonicalized (expanded) filename.
++
++2003-04-07 23:24  rockyb
++
++	* dbg-cmds.inc: Use gdb undefined command message.
++
++2003-03-31 10:09  rockyb
++
++	* NEWS, dbg-brk.inc: Numbers in breakpoint/watchpoint/action
++	numbers are printed in a "%-3d" rather than (I think the nicer)
++	%3d" to match gdb's output. This helps ddd parse breakpoints.
++
++2003-03-30 22:04  rockyb
++
++	* NEWS, dbg-brk.inc: Breakpoints are now are origin 1 to match gdb.
++	It also helps ddd.
++
++2003-03-27 00:34  rockyb
++
++	* dbg-pre.inc.in: Ooops - changed dbg-pre.inc but should have
++	changed this one instead.
++
++2003-03-26 09:05  rockyb
++
++	* dbg-file.inc, dbg-io.inc: Add routine to resolve based on dir and
++	then expand a filename.  Hopefully will be more permissive in
++	specified and work more like gdb.
++
++2003-03-26 09:01  rockyb
++
++	* dbg-brk.inc: Expand filename only the breakpoint exists.
++
++2003-03-25 23:30  rockyb
++
++	* dbg-list.inc: When set annotate=1 expand full filenames when
++	listing source lines.
++
++2003-03-25 23:29  rockyb
++
++	* dbg-file.inc: Bug in testing absolute file name.
++
++2003-03-25 18:46  rockyb
++
++	* dbg-brk.inc, dbg-file.inc, dbg-list.inc: Canonicalize filenames
++	in list and breakpoint commands and update regression tests to make
++	sure we don't slip back.
++
++2003-03-21 19:16  rockyb
++
++	* dbg-file.inc, dbg-set.inc: Small stuff.
++
++2003-03-21 18:54  rockyb
++
++	* bashdb, dbg-brk.inc, dbg-file.inc, dbg-fns.inc, dbg-help.inc,
++	dbg-init.inc, dbg-set.inc: Add "show dir" and directory search in
++	filename lookup (such as for breakpoints or line listing).
++
++2003-03-21 12:59  rockyb
++
++	* dbg-sig.inc: Signal received message is now gdb's. This
++	simplifies ddd handling.
++
++2003-03-21 12:56  rockyb
++
++	* TODO: Current sitiation.
++
++2003-02-27 05:14  rockyb
++
++	* dbg-brk.inc, dbg-file.inc, dbg-fns.inc, dbg-help.inc, dbg-io.inc:
++	_filenames -> _Dbg_filenames. Array now has expanded name Add
++	routine to print filename in form appropriate to annotation and
++	basename only
++
++2003-02-27 02:33  rockyb
++
++	* NEWS: _bashdb_ -> _Dbg_
++
++2003-02-27 02:27  rockyb
++
++	* bashdb, dbg-brk.inc, dbg-cmds.inc, dbg-file.inc, dbg-fns.inc,
++	dbg-help.inc, dbg-hist.inc, dbg-init.inc, dbg-io.inc, dbg-list.inc,
++	dbg-main.inc, dbg-pre.inc.in, dbg-set-d-vars.inc, dbg-set.inc,
++	dbg-sig-ret.inc, dbg-sig.inc, dbg-stack.inc: All _bashdb_ variables
++	renamed _Dbg_. Might help for debuggers in other POSIX shells.
++
++2003-02-26 23:34  rockyb
++
++	* NEWS, dbg-help.inc, dbg-init.inc, dbg-set.inc: Add "set
++	annotate." More better set/show regression tests.
++
++2003-02-25 11:22  rockyb
++
++	* dbg-brk.inc: A little closer to gdb. Mesage reads   breakpoint
++	already hit 1 time or	breakpoint already hit n times
++
++2003-02-25 10:55  rockyb
++
++	* dbg-brk.inc: Make breakpoints look more like gdb. It helps ddd
++	parsing.
++
++2003-02-23 15:40  rockyb
++
++	* dbg-file.inc: Add tilde to list of translation characters.
++
++2003-02-19 18:45  rockyb
++
++	* dbg-brk.inc, dbg-cmds.inc, dbg-io.inc, dbg-sig.inc: Some declare
++	-a's turned into typeset -a on the hope (from David Korn) that this
++	will be legal ksh.
++
++2003-02-17 19:23  rockyb
++
++	* .cvsignore: bashdb- -> dbg-
++
++2003-02-17 19:23  rockyb
++
++	* Makefile.am, bashdb-sig-ret.inc, dbg-sig-ret.inc: Miscellaneous
++	small changes for new version and bashdb- -> dbg- changes.
++
++2003-02-17 19:02  rockyb
++
++	* Makefile.am, TODO, bashdb, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-file.inc, bashdb-fns.inc, bashdb-help.inc, bashdb-hist.inc,
++	bashdb-init.inc, bashdb-io.inc, bashdb-list.inc, bashdb-main.inc,
++	bashdb-set-d-vars.inc, bashdb-set.inc, bashdb-sig.inc,
++	bashdb-stack.inc, dbg-brk.inc, dbg-cmds.inc, dbg-file.inc,
++	dbg-fns.inc, dbg-help.inc, dbg-hist.inc, dbg-init.inc, dbg-io.inc,
++	dbg-list.inc, dbg-main.inc, dbg-pre.inc, dbg-set-d-vars.inc,
++	dbg-set.inc, dbg-sig.inc, dbg-stack.inc, bashdb-pre.inc.in,
++	dbg-pre.inc, dbg-pre.inc.in: bashdb -> dbg to facilitate porting to
++	other POSIX shells.
++
++2003-02-17 17:02  rockyb
++
++	* bashdb-fns.inc: Remove SUBEXIT trap.
++
++2003-02-17 13:15  rockyb
++
++	* bashdb-brk.inc: I think I've gotten over the hurdle of passing
++	information back.  Removing breakpoints in a subshell and having
++	that persist now works.
++
++2003-02-17 07:34  rockyb
++
++	* bashdb-brk.inc: Perhaps some cleanup.
++
++2003-02-17 06:51  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc, bashdb-sig.inc:
++	State saving bugs: save state of more breakpoint/action variables,
++	step/next variables.
++
++2003-02-16 20:08  rockyb
++
++	* NEWS, bashdb-brk.inc, bashdb-file.inc, bashdb-sig.inc: Probably
++	just beating around problems. Perhaps closer. Perhaps not.
++
++2003-02-16 12:18  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc,
++	bashdb-sig.inc: More state recorded in subshell journal:  
++	Enable/disable	 fntrace options
++	
++	having breakpoints persist inside a subshell now works.  (Removing
++	has problems though, as does saving/restoring the step counter)
++
++2003-02-16 08:34  rockyb
++
++	* bashdb-brk.inc, bashdb-file.inc, bashdb-fns.inc, bashdb-sig.inc:
++	Back to the future. Back to a single journal file. Can't get
++	SUBEXIT working and this seems to be more reliable (albeit more
++	work/slower).
++
++2003-02-14 18:47  rockyb
++
++	* NEWS, TODO, bashdb-sig.inc: Bug in quit 0 n.
++
++2003-02-14 18:38  rockyb
++
++	* CHANGES: Note BASH_SUBSHELL. Some typographical mistakes
++	corrected.
++
++2003-02-14 18:31  rockyb
++
++	* NEWS: Update as appropriate.
++
++2003-02-14 18:25  rockyb
++
++	* bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc,
++	bashdb-set-d-vars.inc, bashdb-sig.inc: Better journal mechanism:
++	Now have journal per subshell. (Journal is used to pass information
++	between subshell and parent)
++	
++	There were escaping bugs in putting history entries into the
++	journal and retrieving them.
++	
++	Debugger "Print" now works like quote does. We were having
++	substituion problems before, e.g. "This can't happen" (the single
++	quote in the string).
++	
++	bashdb-fns.inc: New fn _bashdb_esq_dq. Save last_xxx state even if
++	we don't enter the debugger.
++
++2003-02-12 19:55  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc,
++	bashdb-help.inc, bashdb-hist.inc, bashdb-init.inc, bashdb-io.inc,
++	bashdb-list.inc, bashdb-main.inc, bashdb-set.inc, bashdb-sig.inc,
++	bashdb-stack.inc: Try to make more ksh-93 compatible.
++	
++	declare -> typeset (except when using declare -p or declare -a). 
++	source -> .
++
++2003-02-12 01:47  rockyb
++
++	* bashdb: Small changes to make a little more consistent with ksh93
++
++2002-12-31 23:25  rockyb
++
++	* bashdb-pre.inc.in: Comment more.
++
++2002-12-31 23:17  rockyb
++
++	* bashdb-file.inc: Add % to list of translated file characters.
++
++2002-12-31 23:12  rockyb
++
++	* bashdb-fns.inc: [no log message]
++
++2002-12-31 11:57  rockyb
++
++	* bashdb-fns.inc, bashdb-list.inc, bashdb-sig.inc: Make all bashdb
++	functions begin _bashdb - were were missing a couple of routines.
++
++2002-12-30 23:23  rockyb
++
++	* NEWS: [no log message]
++
++2002-12-30 23:20  rockyb
++
++	* bashdb-file.inc: Add + to list of translated file2var characters.
++
++2002-12-25 10:30  rockyb
++
++	* bashdb-cmds.inc: More state saved.
++
++2002-12-25 10:20  rockyb
++
++	* NEWS: Recent stuff.
++
++2002-12-25 10:18  rockyb
++
++	* TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc,
++	bashdb-hist.inc, bashdb-set.inc, bashdb-sig.inc: Start the tedious
++	task of having a mechanism for setting variables that in a subshell
++	so that its value appears in its parent shell.
++
++2002-12-25 00:01  rockyb
++
++	* TODO: [no log message]
++
++2002-12-24 23:14  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc: Fix setting breakpoints over
++	restart. Needed to save the _brkpt_filevar and _action_filevar
++	arrays as well as _brkpt_count and _brkpt_cond arrays.
++	
++	If we are in a subshell, we need to save BASHB_RESTART_FILE so it
++	will get set in sup-shells.
++
++2002-12-24 22:13  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-12-24 22:13  rockyb
++
++	* bashdb-cmds.inc, bashdb-file.inc, bashdb-sig.inc: Bug/Feature
++	fix: Restart now quits all subshells before issuing its restart
++	(exec) command.
++
++2002-12-20 21:31  rockyb
++
++	* bashdb-fns.inc: Small typo.
++
++2002-12-20 12:22  rockyb
++
++	* TODO: Update.
++
++2002-12-20 12:17  rockyb
++
++	* NEWS: -  Bug: if IFS set character in filename: the filename
++	would be truncated.	Handle IFS save/restore more pervasively by
++	saving on DEBUG handler     entry.
++
++2002-12-20 12:12  rockyb
++
++	* bashdb-cmds.inc, bashdb-fns.inc: Save and restore IFS on debug
++	signal handler. It means we can remove custom save/restores
++	elsewhere in the code.
++
++2002-12-10 04:45  rockyb
++
++	* bashdb-brk.inc: More bash-oriented way to strip off a suffix.
++
++2002-12-10 01:05  rockyb
++
++	* emacs/gud.el: Eval expression command is "x" not "pe"
++
++2002-12-10 01:04  rockyb
++
++	* TODO: [no log message]
++
++2002-12-09 08:16  rockyb
++
++	* CHANGES: "set -x" now show "for", "case" and "select" headers (
++	"for x in", "case c in", "select s")
++
++2002-12-07 22:42  rockyb
++
++	* ChangeLog, NEWS: Get ready for yet another release.
++
++2002-12-07 16:54  rockyb
++
++	* ChangeLog: [no log message]
++
++2002-12-07 16:49  rockyb
++
++	* bashdb-main.inc: Make sure we can read the restart file.
++
++2002-12-07 16:48  rockyb
++
++	* bashdb-cmds.inc: Forgot to unset flag which says to reread the
++	file.
++
++2002-12-07 16:43  rockyb
++
++	* ChangeLog, bashdb, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-main.inc: Preserve breakpoints, watchpoints, debugger set
++	variables on a restart.
++
++2002-12-07 16:41  rockyb
++
++	* Makefile.am: Remove compile of bashdb.elc. It's going away
++	anyway.
++
++2002-12-07 10:24  rockyb
++
++	* NEWS: As appropriate.
++
++2002-12-07 10:23  rockyb
++
++	* ChangeLog: print select head - "select s in"
++
++2002-12-07 08:35  rockyb
++
++	* bashdb-io.inc: [no log message]
++
++2002-12-07 08:18  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-12-07 08:16  rockyb
++
++	* bashdb-io.inc: bashdb-io.inc (_bashdb_readlin): - When reading
++	large files which takes a long time, print out status every 1000
++	lines.
++
++2002-12-07 08:02  rockyb
++
++	* NEWS: Bug: (parse.y) line number was not updated properly when in
++	a here documented with an unquoted delimter and containing
++	backslash newline.
++	
++	Update and modernize tests and make executable.
++
++2002-12-06 22:47  rockyb
++
++	* bashdb-sig-ret.inc: Not used, but it if it were, this would be
++	right. Need to save/restore IFS around a "set -"
++
++2002-12-06 22:44  rockyb
++
++	* bashdb-list.inc: Typo.
++
++2002-12-06 22:43  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-12-06 11:27  rockyb
++
++	* emacs/: gud.el, gud.el.diff: A typo. Also modified DB when I
++	meant to modify bashdb.
++
++2002-12-03 19:46  rockyb
++
++	* bashdb-help.inc: Typo.
++
++2002-12-03 19:34  rockyb
++
++	* bashdb-fns.inc: Remove previous variable test. Not needed?
++
++2002-12-03 19:24  rockyb
++
++	* bashdb-fns.inc: Bug in set was set of IFS messing up "set"
++	parsing. This time for sure!?
++
++2002-12-03 18:36  rockyb
++
++	* bashdb-fns.inc: More precise function comment.
++
++2002-12-03 18:34  rockyb
++
++	* bashdb-fns.inc: Bug: if _bashdb_old_set_opts was null. Test now.
++
++2002-12-02 08:20  rockyb
++
++	* TODO: Update as appropriate.
++
++2002-12-02 06:58  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-12-02 06:42  rockyb
++
++	* bashdb-cmds.inc, bashdb-file.inc, bashdb-init.inc:
++	bashdb-file.inc: source persistent only if it exists. 
++	bashdb-init.inc/bashdb-cmds.inc: read persistent, write persistent.
++
++2002-12-02 06:41  rockyb
++
++	* bashdb-help.inc: Update doc for "x/examine"
++
++2002-12-02 06:41  rockyb
++
++	* bashdb-sig.inc: Hack (but works more often) cleanup of persistent
++	file.
++
++2002-12-02 06:40  rockyb
++
++	* CHANGES, NEWS, TODO: As appropriate.
++
++2002-12-02 04:32  rockyb
++
++	* CHANGES: Update as appropriate.
++
++2002-11-30 19:13  rockyb
++
++	* bashdb-hist.inc: Typo.. "H count" was broken.
++
++2002-11-30 01:16  masata-y
++
++	* bashdb: Fix a typo.
++
++2002-11-26 10:47  rockyb
++
++	* bashdb-init.inc, bashdb-set-d-vars.inc: More elegant (and I
++	wonder if not more robust) way to set $1 via set.  Use "set -- xx
++	yy" rather than "set xx yy"
++
++2002-11-26 07:23  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-11-26 07:09  rockyb
++
++	* emacs/gud.el.diff: Set default minibuf-mod-map in bashdb read
++	call from Masatake YAMATO and add link to
++	http://bashdb.sourceforge.net
++
++2002-11-26 07:04  rockyb
++
++	* emacs/gud.el: Add HTTP reference.
++
++2002-11-26 06:34  rockyb
++
++	* emacs/gud.el: Change from Masatake YAMATO in running bash
++	initially. Uses gud-minibuffer-local-map now.
++
++2002-11-23 00:17  rockyb
++
++	* bashdb-sig.inc: Don't wipe temp files unless subshell is 0.
++	Likewise don't enter command shell if subshell is not 0. Don't know
++	that this will make much difference, but I guess it's the right
++	thing to do.
++
++2002-11-22 22:02  rockyb
++
++	* bashdb-help.inc: Document help "set showcommand"
++
++2002-11-22 21:50  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-11-22 21:50  rockyb
++
++	* bashdb-init.inc: Bug: if no script we were running "set" to dump
++	environment.
++
++2002-11-22 20:57  rockyb
++
++	* bashdb-cmds.inc, bashdb-list.inc, bashdb-set.inc,
++	emacs/bashdb.el, emacs/gud.el: We now keep track of the subshell
++	level: dynamic veriable BASH_SUBSHELL and the debugger prints these
++	as ()'s inside of the prompt.
++
++2002-11-20 12:00  rockyb
++
++	* TODO: Current state of things and known bugs.
++
++2002-11-20 10:11  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-11-20 09:55  rockyb
++
++	* bashdb-init.inc: "bash --debugger script args" was not setting
++	args properly.
++
++2002-11-19 23:02  rockyb
++
++	* bashdb-cmds.inc: Changes to have regression tests work with
++	different paths.
++
++2002-11-19 22:17  rockyb
++
++	* bashdb: We have a better expand_fn now if we need it.
++
++2002-11-19 21:44  rockyb
++
++	* Makefile.am: This is a pain. Get date and autoregen right on
++	bashdb-pre.inc.
++
++2002-11-19 21:26  rockyb
++
++	* TODO: Mostly hacks to make a distribution work smoothly. 
++	MANIFEST: add DVI's. This reduce TeX dependency, okay? TODO:
++	document bugs configure.in touch files so that we have right the
++	first time.
++
++2002-11-19 20:26  rockyb
++
++	* bashdb-cmds.inc: Variable name typo. When rerunning, show full
++	command now. Is messing up a bit too much.
++
++2002-11-19 20:25  rockyb
++
++	* bashdb-set.inc: Update help.
++
++2002-11-19 20:21  rockyb
++
++	* bashdb: Remove readonly attributes because when we run as a
++	subshell these want to get set again. May have to rethink how to
++	do.
++
++2002-11-19 20:20  rockyb
++
++	* Makefile.am: Put touch inside build of bashd-pre.inc to avoid
++	redoing work.
++
++2002-11-19 20:19  rockyb
++
++	* bashdb-help.inc: Add set documentation. Put messages in a form
++	that DDD will understand without any hassle.
++
++2002-11-19 16:01  rockyb
++
++	* NEWS: Update as appropriate. Gee there are lots of changes,
++	mostly bug fixes.
++
++2002-11-19 15:32  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc, bashdb-help.inc,
++	bashdb-io.inc, bashdb-main.inc: Canonicalize filevars via a file
++	expand routine. Allows multpile to refer to a given file.
++	
++	Add option to have files show only short (basename) names, useful
++	in testing
++	
++	Add set/show of these.
++	
++	Bug in not setting fntrace correctly on debugger exit.
++	
++	Add -c option on bashdb. Analogous to "bash -c string"
++
++2002-11-19 15:16  rockyb
++
++	* bashdb-help.inc, bashdb-set.inc: Add set/show options to debug
++	debugger and have filenames get listed as basename only.
++
++2002-11-19 15:15  rockyb
++
++	* Makefile.am, bashdb-file.inc: Break out more routines into
++	bashdb-file.inc.  Add _bashdb_expand_filename to canonicalize file
++	names.
++
++2002-11-19 10:36  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc: Fix bug in continue comand.
++	Moved code from bashdb-brk.inc to bashdb-cmds.inc
++
++2002-11-19 02:58  rockyb
++
++	* bashdb-brk.inc, bashdb-init.inc, bashdb-list.inc,
++	bashdb-pre.inc.in: Use common routines now. Spelled "Bourne"
++	incorrectly in bashdb-{pre,init}.inc
++
++2002-11-19 02:55  rockyb
++
++	* bashdb-fns.inc: Add common routines _bashdb_check_line and
++	_bashdb_get_maxline.  Reduces code bulk while making things more
++	reliable. _get_maxline now reads in the file if it hasn't been read
++	in yet.
++
++2002-11-19 02:53  rockyb
++
++	* bashdb-io.inc: Test to see if file exists before reading. We
++	could probably do better, but will need more code reorganization
++	for this.
++
++2002-11-18 22:14  rockyb
++
++	* bashdb-brk.inc: A little closer for FreeBSD...
++
++2002-11-18 22:08  rockyb
++
++	* bashdb-brk.inc, bashdb-stack.inc: Even closer to getting FreeBSD
++	regression tests work okay.
++
++2002-11-18 21:50  rockyb
++
++	* bashdb-list.inc: More changes to make FreeBSD regression tests
++	work out -- more to come...
++
++2002-11-18 21:31  rockyb
++
++	* bashdb, bashdb-brk.inc, bashdb-init.inc, bashdb-list.inc,
++	bashdb-stack.inc: Add -B option to list only basename in debugger
++	output. Is useful for FreeBSD which list files as foo rather than
++	./foo.
++
++2002-11-18 19:40  rockyb
++
++	* .cvsignore, bashdb-pre.inc.in: Release information included via
++	bashdb-pre.inc (via bashdb-pre.inc.in)
++
++2002-11-18 19:36  rockyb
++
++	* Makefile.am, NEWS, bashdb, bashdb-init.inc, bashdb-init.inc.in,
++	bashdb.in: Add release information via new file bashdb-pre.in
++	rather than modify bashdb-init.inc and bashdb
++
++2002-11-18 09:32  rockyb
++
++	* NEWS: typo
++
++2002-11-18 09:30  rockyb
++
++	* NEWS: Note configure script bug fix.
++
++2002-11-18 08:57  rockyb
++
++	* configure.in: Clean up a little.
++
++2002-11-17 20:26  rockyb
++
++	* Makefile.am: Changes to make .in targets get recreated.
++
++2002-11-17 19:44  rockyb
++
++	* NEWS, TODO: Update to reflect current situation.
++
++2002-11-17 19:41  rockyb
++
++	* bashdb-sig.inc: Bug: don't set exit handler inside debug trap
++	handler. Seems to kick to be inhereted on subshells and then we
++	call the exit routine too often.
++	
++	exit_handler more like the other handlers. Understands
++	"stop/nostop, print/noprint stack/nostack". Does more of the same
++	things before entering cmdloop that debug_handler does via a more
++	common debugger enter routine.
++	
++	Saving _curline now done in common debbber enter routine
++
++2002-11-17 19:38  rockyb
++
++	* bashdb-cmds.inc: File got trunctated. Like bashdb-help.inc --
++	Hmm. Something's fishy.
++	
++	Anyway, "debug" with no arguments now uses the last command rather
++	the last statement. This should be correct more often.
++
++2002-11-17 19:34  rockyb
++
++	* bashdb-fns.inc, bashdb-main.inc: _curline is now set by
++	BASH_LINENO rather than passing as a parameter to the trap.
++	
++	Add this common thing inside common debugger enter routine.
++
++2002-11-17 19:30  rockyb
++
++	* bashdb-help.inc: info signals now shows EXIT in list.
++	
++	Some help text got truncated.
++	
++	Move CVS Id line to end to facilitate debugging.
++
++2002-11-17 19:26  rockyb
++
++	* Makefile.am: Add new .in files to distribution
++
++2002-11-17 19:23  rockyb
++
++	* bashdb: Derived now from bashdb.in
++
++2002-11-17 19:23  rockyb
++
++	* bashdb-init.inc: Derived now from bashdb-init.in
++
++2002-11-17 19:22  rockyb
++
++	* bashdb-init.inc.in, bashdb.in: bashdb and bashdb-init.inc are now
++	derived so that we can automatically put in the release number.
++
++2002-11-16 11:17  rockyb
++
++	* CHANGES: Update as appropriate
++
++2002-11-16 09:49  rockyb
++
++	* bashdb-list.inc: We now print the statement to be executed if it
++	was on the same line/file and the statement part is different from
++	the last time we ran this.
++
++2002-11-16 09:48  rockyb
++
++	* emacs/gud.el: Patched version for emacs 21.2 of gud.el with bash
++	support.
++
++2002-11-16 09:47  rockyb
++
++	* emacs/gud.el.diff: Patches that I hope will be on the next
++	version of Emacs (assuming the paperwork isn't lost, people don't
++	forget about the patch as a result of the time delay to do the
++	paperwork and so on.)
++
++2002-11-16 09:45  rockyb
++
++	* emacs/bashdb.el: Move from parent directory here. May have also
++	added provision for "finish" command.
++
++2002-11-16 09:40  rockyb
++
++	* bashdb-main.inc, bashdb-sig.inc: Now save the command that is to
++	be executed next.
++
++2002-11-16 09:38  rockyb
++
++	* bashdb-fns.inc: Add common function
++	_bashdb_set_to_return_from_debugger to regularize the things that
++	need to be done on exit. There are more now, since we are saving
++	the last command executed on this line of the source file.
++
++2002-11-16 09:36  rockyb
++
++	* bashdb-init.inc: Need to skip more initially for "bashdb -c"
++	setup.
++
++2002-11-16 09:25  rockyb
++
++	* bashdb: Add -c option analogous to "bash -c".
++
++2002-11-14 15:45  rockyb
++
++	* NEWS, bashdb-cmds.inc: More improvements to "x" command. Use
++	print as a fallback...
++
++2002-11-14 09:25  rockyb
++
++	* bashdb-help.inc: configuure.in: get ready for version 0.32
++	bashdb.texi: minor typo changes debugger/help/sig: Remove "Num"
++	from title as it is no longer there.
++
++2002-11-14 09:08  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-11-14 08:15  rockyb
++
++	* bashdb-help.inc, bashdb-sig.inc: A tad more like gdb: no signal
++	numbers listed. No longer trap on SIGWINCH.
++
++2002-11-13 23:39  rockyb
++
++	* NEWS, bashdb-help.inc, bashdb-sig.inc: Add help for "handle".
++	Tidy generic signal handler more and make more general (e.g
++	unconditinally turn off set tracing).
++
++2002-11-13 23:22  rockyb
++
++	* bashdb-fns.inc, bashdb-sig.inc: Clean up signal handling code a
++	small amount by creating a common routine to set some global
++	variables.
++
++2002-11-13 19:33  rockyb
++
++	* bashdb-cmds.inc, bashdb-help.inc, bashdb-sig.inc: Signal handling
++	is more like gdb now. No doubt there're room for improvement, but
++	this is probably a big improvement.
++
++2002-11-12 15:20  rockyb
++
++	* NEWS, TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-init.inc,
++	bashdb-sig.inc: Some work on signal handling. More is there, more
++	to do. So what else is new?
++
++2002-11-12 09:30  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-11-12 07:45  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc: Add gdb's
++	"condition" command.
++
++2002-11-12 07:42  rockyb
++
++	* bashdb-sig.inc: Oops --- typo in variable name.
++
++2002-11-12 07:41  rockyb
++
++	* bashdb-sig.inc: Add provision for debugging debugger.
++
++2002-11-12 07:40  rockyb
++
++	* bashdb-io.inc: Add more file translation characters for ", [, and
++	] and reorder letters to make mnemonic.
++
++2002-11-11 23:56  rockyb
++
++	* bashdb-sig.inc: Caught another routine that didn't start _bashdb_
++
++2002-11-11 23:45  rockyb
++
++	* TODO: Cross many things off list.
++
++2002-11-11 23:45  rockyb
++
++	* NEWS: Update as appropriate - major changes.
++
++2002-11-11 23:44  rockyb
++
++	* Makefile.am: Move bashdb.el into emacs directory.
++
++2002-11-11 16:45  rockyb
++
++	* bashdb.el: Moved inside emacs directory now.
++
++2002-11-10 21:26  rockyb
++
++	* NEWS: Believe it or not, the C files have gotten a little bit
++	*simpler*. We are closer towards having line numbers recorded
++	accurately in BASH_LINENO (although things are not perfect yet).
++
++2002-11-10 14:39  rockyb
++
++	* bashdb-help.inc, bashdb-stack.inc, bashdb.el: bashdb-help: Make
++	more like gdb - facilitates use in ddd.  bashdb-stack.inc: Fix bug
++	in "stack_down". (There's another one though lurking) bashdb.el:
++	add key mapping for finish and other keymappings tests/misc: change
++	in "show" output tests/brkpt2: perhaps better although not quite
++	perfect.
++
++2002-11-10 11:35  rockyb
++
++	* bashdb-help.inc: Add help for finish command. Invalid help
++	command now reports what gdb does.
++
++2002-11-09 23:54  rockyb
++
++	* bashdb-help.inc: Missed a place that should have added _bashdb.
++
++2002-11-09 20:28  rockyb
++
++	* bashdb-set.inc: Make show command work like gdb.
++
++2002-11-09 20:16  rockyb
++
++	* bashdb-io.inc: Missed a couple more "builtin printf"'s
++
++2002-11-09 20:15  rockyb
++
++	* bashdb-io.inc: Specify *builtin* printf.
++
++2002-11-09 07:38  rockyb
++
++	* Makefile.am, NEWS, bashdb-cmds.inc, bashdb-help.inc,
++	bashdb-hist.inc, bashdb-io.inc, bashdb-main.inc, bashdb-set.inc:
++	echo -> builtin echo Add "info signals" and "info handler" Break
++	out history into new file bashdb-hist.inc.  Help command change v
++	-> M
++
++2002-11-08 21:08  rockyb
++
++	* bashdb-sig.inc: Previous flie was horribly truncated.
++
++2002-11-05 22:43  rockyb
++
++	* bashdb-sig-ret.inc: bashdb.texi: Document finish command.
++	
++	debugger/tests*, MANIFEST, Makefile.am: Add finish command test.
++	
++	*sig: add signal save/restor test
++
++2002-11-02 15:17  rockyb
++
++	* NEWS: Today's hacks.
++
++2002-11-02 14:46  rockyb
++
++	* Makefile.am, bashdb-list.inc, bashdb-sig-ret.inc, bashdb-sig.inc:
++	Save/restore signals on entering debugger.
++
++2002-11-02 10:16  rockyb
++
++	* bashdb-cmds.inc, bashdb-sig.inc: Workaround? for bash bug
++	introduced implementing "trap RETURN"
++
++2002-11-02 09:15  rockyb
++
++	* bashdb-sig.inc: [no log message]
++
++2002-11-02 09:15  rockyb
++
++	* bashdb-sig.inc: Small comment changes.
++
++2002-11-02 09:12  rockyb
++
++	* CHANGES: Reflects better the changes.
++
++2002-11-02 09:03  rockyb
++
++	* CHANGES: Update as appropriate.
++
++2002-11-02 08:12  rockyb
++
++	* NEWS, bashdb-cmds.inc, bashdb-sig.inc, bashdb-stack.inc: Fix bug
++	where stack trace current line entry was sometimes wrong.  No
++	longer mangle line number in stack changing commands.
++	
++	Printing source line on "RETURN" debugger call.
++
++2002-11-01 07:14  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc, bashdb-io.inc,
++	bashdb-list.inc, bashdb-main.inc, bashdb-sig.inc: Add gdb's finish
++	or perl5db's return. Line number on return statement is funny and
++	there are some bugs to make fully work.
++	
++	Now all debugger routines start _bashdb.
++
++2002-10-31 05:59  rockyb
++
++	* TODO: [no log message]
++
++2002-10-30 22:11  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-10-30 22:03  rockyb
++
++	* bashdb-cmds.inc, bashdb-help.inc: Allow negative numbers in
++	history commands.  Get ready for release 0.30.
++
++2002-10-30 07:13  rockyb
++
++	* TODO: Cross some things off the list.
++
++2002-10-29 08:54  rockyb
++
++	* NEWS, bashdb-cmds.inc, bashdb-help.inc: Make history command more
++	robust and allow for more features.  How allows for !n:p. We now
++	give an error message if the history numbers are out of range.
++	Separate history parsing into a subroutine to tidy and facilitate
++	future features.
++
++2002-10-27 00:05  rockyb
++
++	* NEWS: Update as appropriate.
++
++2002-10-27 00:02  rockyb
++
++	* bashdb-set-d-vars.inc: Better way to set dollar parameters. It
++	handles more than $1..$9 and sets $# correctly too.
++
++2002-10-26 23:17  rockyb
++
++	* bashdb-init.inc: bug in bashdb --debugger some local's must be
++	declares.
++
++2002-10-26 10:27  rockyb
++
++	* NEWS, bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
++	bashdb-init.inc, bashdb-set.inc: Fix/change history. Numbers now
++	match prompt numbers. Can use !n as well as hi n
++	
++	Add GDB's "set editing" command.
++	
++	_bashdb_help_set added to show set commands. Made more like GDB's
++	output.
++
++2002-10-25 08:15  rockyb
++
++	* bashdb-cmds.inc: Make H be like perl's. Fix history (hi) command.
++	Don't but some commands like comment and history in the history.
++	Test.
++
++2002-10-25 08:05  rockyb
++
++	* bashdb-cmds.inc: Make H be more like perl's. Make hi work.
++
++2002-10-25 07:07  rockyb
++
++	* bashdb-set.inc: Tidy up show output. Tests changed largely as a
++	result of size increase in bashdb from last change.  run-misc:
++	wasn't giving an error is diff failed on first diff check.
++
++2002-10-25 06:44  rockyb
++
++	* NEWS: Latest news...
++
++2002-10-25 06:41  rockyb
++
++	* bashdb, bashdb-cmds.inc, bashdb-set.inc: Add "set/show prompt."
++	Make prompt customizable.  bashdb: all -t to be a filename.
++
++2002-10-24 09:33  rockyb
++
++	* bashdb-set.inc, bashdb-sig.inc: Comment about why slightly more
++	complex loop to set args.
++
++2002-10-24 09:08  rockyb
++
++	* NEWS, bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
++	bashdb-init.inc, bashdb-io.inc, bashdb-set.inc: -  Fix bugs in
++	debugger output when debugged program redirects I/O
++	
++	-  Add GDB's "set args" command
++
++2002-10-23 09:04  rockyb
++
++	* bashdb: Remove debug statement accidentally committed.
++
++2002-10-23 08:51  rockyb
++
++	* bashdb, bashdb-init.inc, bashdb-io.inc: bashdb, bashdb-init.inc:
++	Add -t option to set tty bashdb-io.inc: bug in not testing
++	_bashdb_tty in _bashdb_printf tests: output changes bashdb script
++	has gotten larger.
++
++2002-10-23 08:49  rockyb
++
++	* TODO: Update as appropriate.
++
++2002-10-23 08:26  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
++	bashdb-init.inc, bashdb-io.inc, bashdb-set.inc: Change variable
++	$_tty to $_bashdb_tty
++	
++	All "read -e -p" now have input and output redirected.
++	
++	Implement tty command to set tty.
++
++2002-10-22 06:25  rockyb
++
++	* bashdb-cmds.inc: Fix bug in printing debugger prompt when
++	debugged program has redirected stderr. Thanks to Masatake YAMATO.
++
++2002-10-21 10:59  rockyb
++
++	* bashdb-cmds.inc: Remove trailing blanks.
++
++2002-10-21 10:48  rockyb
++
++	* bashdb-io.inc, bashdb-list.inc, bashdb-sig.inc: Just format
++	changes: remove blanks at the ends of some lines.
++
++2002-10-21 10:26  rockyb
++
++	* .cvsignore: Allow for different versions of autotools.
++
++2002-10-21 10:25  rockyb
++
++	* bashdb-help.inc: Bug in "help return" -- missing some lines
++	there.
++
++2002-10-19 09:26  rockyb
++
++	* bashdb-help.inc: Add documentation for new command return. 
++	bashdb.texi: had duplicate help screens
++
++2002-10-19 09:08  rockyb
++
++	* NEWS: Minor typographical changes.
++
++2002-10-18 23:24  rockyb
++
++	* bashdb-cmds.inc: Make so regression test is portable. A hack for
++	now
++
++2002-10-18 23:16  rockyb
++
++	* bashdb-cmds.inc: Correct debug test.
++
++2002-10-18 22:40  rockyb
++
++	* bashdb-set-d-vars.inc: To set dollar variables ($1, $2, ... $?)
++	before evaluation of a user expression.
++
++2002-10-18 21:31  rockyb
++
++	* Makefile.am, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-io.inc, bashdb-sig.inc: A better way of handling setting
++	dollar variables.
++	
++	Add debug test.
++
++2002-10-18 08:44  rockyb
++
++	* bashdb-brk.inc, NEWS: Set $1, $2 before watch-expression
++	evaluation
++
++2002-10-18 08:10  rockyb
++
++	* NEWS, bashdb-cmds.inc, bashdb-sig.inc: $? is saved and preserved
++	for use inside "eval" and "print"
++
++2002-10-18 06:38  rockyb
++
++	* bashdb-set.inc: Correct show version to add more sources.
++
++2002-10-18 06:32  rockyb
++
++	* NEWS, bashdb-cmds.inc, bashdb-sig.inc: Fix bug in skip *count*.
++
++2002-10-17 08:56  rockyb
++
++	* NEWS, TODO, bashdb-cmds.inc, bashdb-main.inc: bashdb-main.inc:
++	Bug in changing to _bashdb_libdir bashdb-cmds.inc: number of times
++	nested in debug listed via exported variable		     
++	BASHDB_LEVEL
++
++2002-10-17 08:11  rockyb
++
++	* bashdb-cmds.inc: Remove debugging statments.
++
++2002-10-17 00:10  rockyb
++
++	* NEWS, TODO, bashdb, bashdb-cmds.inc: Get "debug" working much
++	better:   variables (e.g. $0) are substituted now.    "bash
++	--debugger" invocations work since we no longer fork	_libdir
++	renamed to _bashdb_libdir (in bashdb).	  We add "-L
++	_bashdb_libdir" when executing via bashdb script.
++
++2002-10-16 08:41  rockyb
++
++	* bashdb-help.inc: Document skip and debug.
++
++2002-10-16 08:40  rockyb
++
++	* bashdb-cmds.inc: Make skip work like next/step.
++
++2002-10-16 08:22  rockyb
++
++	* NEWS: As appropriate.
++
++2002-10-15 23:29  rockyb
++
++	* bashdb-help.inc: Document skip command.
++
++2002-10-15 22:57  rockyb
++
++	* bashdb-cmds.inc, bashdb-sig.inc: Add ability to skip execution of
++	a command. Debugger command: skip
++
++2002-10-11 23:18  rockyb
++
++	* NEWS: Update to reflect current sitiation
++
++2002-10-11 23:17  rockyb
++
++	* bashdb-list.inc: Fix bug in search forward not resetting line to
++	start.
++	
++	Search now lists only one line same as gdb and perl5db do.  Update
++	tests as appropriate.
++
++2002-10-10 21:08  rockyb
++
++	* TODO: Update to reflect current situtation: parameters now work.
++
++2002-10-10 20:57  rockyb
++
++	* bashdb-cmds.inc, bashdb-main.inc, bashdb-sig.inc: Fix bug so that
++	$1 preserve embedded blanks (or more precisely, embedded IFS) that
++	they might have had.
++
++2002-10-10 08:47  rockyb
++
++	* bashdb-cmds.inc: Bug in _bashdb_cmd_eval. Was not erasing
++	evalfile before starting if $1.. was empty, so we'd have
++	accumulated output.
++
++2002-10-10 08:30  rockyb
++
++	* .cvsignore: Add more good derived stuff (from autotools)
++
++2002-10-10 08:17  rockyb
++
++	* bashdb-cmds.inc, bashdb-io.inc, bashdb-sig.inc, bashdb-stack.inc:
++	Add parameters in stack trace. And can now refer to $1 $2 $3 in
++	print and eval commands.
++
++2002-10-03 08:40  rockyb
++
++	* bashdb-list.inc: Fix up search command to do the right thing more
++	often. However need to make another pass to match gdb semantics
++	more perfectly.  Save last search pattern and can be repeated if no
++	pattern given.
++
++2002-09-24 13:30  rockyb
++
++	* Makefile.am, NEWS, bashdb-brk.inc, bashdb-cmds.inc,
++	bashdb-help.inc, bashdb-io.inc, bashdb-list.inc, bashdb-main.inc,
++	bashdb-sig.inc: Add "search" "reverse" (forward/backward searching)
++	and Perl's "a" (action) commands. bashdb-list.inc split off for the
++	debugger growth.
++
++2002-09-24 01:26  rockyb
++
++	* bashdb-help.inc: Add tb to help list.
++
++2002-09-23 18:45  rockyb
++
++	* NEWS: [no log message]
++
++2002-09-23 18:19  rockyb
++
++	* NEWS: [no log message]
++
++2002-09-23 18:09  rockyb
++
++	* NEWS: Make mroe readible.
++
++2002-09-23 17:52  rockyb
++
++	* bashdb.el: Small typo
++
++2002-09-23 17:47  rockyb
++
++	* bashdb.el: Messed up on author and didn't comment properly.
++
++2002-09-23 17:41  rockyb
++
++	* MANIFEST: This really isn't used. Autotools rules. (But really we
++	do a make dist in the parent directory.)
++
++2002-09-23 09:09  rockyb
++
++	* bashdb-brk.inc, bashdb-io.inc: Change format of display output to
++	identify display number and expression.
++
++2002-09-22 07:40  rockyb
++
++	* bashdb-help.inc: Add display regression test.  bashdb-help.inc:
++	change lines to linespecs in help. Add missing _bashdb_msg.
++
++2002-09-21 22:46  rockyb
++
++	* bashdb.el: Don't know how to spell my own name!
++
++2002-09-21 22:35  rockyb
++
++	* bashdb-help.inc: Add help for display. correct en/dis help to
++	watchpoint and display.
++
++2002-09-21 21:41  rockyb
++
++	* NEWS, TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc: Add
++	gdb's auto display commands (display, undisplay, enable/disable
++	display)
++
++2002-09-21 06:41  rockyb
++
++	* bashdb-cmds.inc: debug command a tad better -- now allows for
++	command to get run.
++
++2002-09-21 06:17  rockyb
++
++	* bashdb-cmds.inc: Okay, now get out some of the bugs in the
++	"debug" command.  More work is needed to make this more seamless.
++	(In particular need to skip over execution after debugged execution
++	happens).
++
++2002-09-21 05:50  rockyb
++
++	* NEWS, bashdb-cmds.inc, bashdb-sig.inc: Add provision to debug
++	into a script ("debug" command), and leave script without going
++	back into debugger command loop (BASHDB_QUIT_ON_QUIT environment
++	variable).
++
++2002-09-19 14:49  rockyb
++
++	* NEWS: Add caller builtin
++
++2002-09-19 13:01  masata-y
++
++	* bashdb-help.inc, bashdb.el: bashdb-help.inc: fix typo(tbreak,
++	down), added [count] in up command's help message.  bashdb.el:
++	added gud-tbreak.
++
++2002-09-19 12:51  masata-y
++
++	* bashdb.el: added simple comments about how to install bashdb.el. 
++	provided bashdb.
++
++2002-09-18 21:37  rockyb
++
++	* NEWS, bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
++	bashdb-sig.inc: Add temporary break.
++
++2002-09-18 02:03  rockyb
++
++	* bashdb-help.inc: Document "break" command change args help
++	linespec in online help where appropriate.
++
++2002-09-17 09:01  rockyb
++
++	* NEWS: typo.
++
++2002-09-17 08:03  rockyb
++
++	* NEWS: Last minute additions for version 0.25 - recent doc
++	changes.
++
++2002-09-17 07:56  rockyb
++
++	* INSTALL: Remove generic instructions and customize for something
++	specific for the debugger. Should be more helpful, I think.
++
++2002-09-16 17:37  rockyb
++
++	* NEWS, bashdb-fns.inc, bashdb-main.inc, bashdb-sig.inc: Move debug
++	trap handler to bashdb-sig.inc and rename it, well,
++	debug_trap_handler.
++	
++	Save restart set parameters and inside set -xv (at least
++	initially).
++
++2002-09-14 18:26  rockyb
++
++	* NEWS: Update.
++
++2002-09-14 18:14  rockyb
++
++	* bashdb-help.inc: Change info args to match closer gdb. Is now $1,
++	$2 and so on rather than initial program arguments.
++
++2002-09-14 17:54  rockyb
++
++	* bashdb-fns.inc, bashdb-main.inc: Now support $1 $2 as ${ARG[1}},
++	${ARG[2]}.
++
++2002-09-14 14:51  rockyb
++
++	* bashdb-cmds.inc: Missed place in renaming _hi to _bashdb_hi
++
++2002-09-14 12:19  rockyb
++
++	* NEWS, TODO, bashdb, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-init.inc, bashdb-sig.inc: Variable name cleanup: more now
++	start with _bashdb
++
++2002-09-14 12:09  rockyb
++
++	* bashdb-cmds.inc: Some variable name cleanup and removal.
++
++2002-09-14 11:40  rockyb
++
++	* bashdb-cmds.inc: Correct "restart" command when running via "bash
++	-c ..."
++
++2002-09-14 07:36  rockyb
++
++	* NEWS, bashdb-init.inc, bashdb-io.inc: Small cleanups. BOGUS file
++	renamed to *BOGUS*.
++
++2002-09-14 07:21  rockyb
++
++	* bashdb, bashdb-cmds.inc, bashdb-help.inc, bashdb-init.inc,
++	bashdb-main.inc: Clean up code for debugger source command. Add
++	"info source"
++
++2002-09-14 01:09  rockyb
++
++	* bashdb-cmds.inc, bashdb-init.inc: Slightly cleaner code.
++
++2002-09-14 00:51  rockyb
++
++	* NEWS, bashdb-cmds.inc, bashdb-init.inc: Command files now nest
++	and pick up where they left off in between script execution. There
++	are still some minor cleanups and a small bug here or there.
++
++2002-09-13 23:04  rockyb
++
++	* bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc, bashdb-io.inc:
++	bash --debugger -c "..." now works. (Bug in restarting currently
++	though.  restart now picks up full bash name from BASH environment
++	variable.
++	
++	To accomplish the above, environment variable BASH_EXECUTION_STRING
++	was added which contains the contents what was passed after -c.
++
++2002-09-13 21:24  rockyb
++
++	* NEWS, bashdb-brk.inc: Fix bug where "watche x > 24" was creating
++	output to file 24
++
++2002-09-13 15:09  rockyb
++
++	* NEWS: Add: Function names now supported by changing the semantics
++	of declare -F.
++
++2002-09-13 15:06  rockyb
++
++	* NEWS: Function names now supported. As a result, can now set
++	breakpoints on them. However in non-interactive mode the line
++	number is wrong. It is the caller line.
++
++2002-09-13 15:03  rockyb
++
++	* TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc: Function
++	names now supported. As a result, can now set breakpoints on them. 
++	However in non-interactive mode the line number is wrong. It is the
++	caller line.
++	
++	As a result of the above, now extended these commands to include
++	linespecs: continue, break, list.
++
++2002-09-12 18:18  rockyb
++
++	* NEWS, bashdb-cmds.inc, bashdb-io.inc: Add list file:line. Rename
++	internal routines from print to list since that's what the command
++	is called.
++
++2002-09-12 16:17  rockyb
++
++	* bashdb-cmds.inc, bashdb-fns.inc: Change names of variables so as
++	not to conflict with user variables.  Thus more of them are
++	prefaced with "_bashdb_." May have introduced a bug in the renaming
++	though...
++
++2002-09-12 06:44  rockyb
++
++	* NEWS, TODO: Now list/stop line of "for" or "select".
++
++2002-09-11 22:36  rockyb
++
++	* TODO: Note more line number problems.
++
++2002-09-11 22:36  rockyb
++
++	* bashdb-sig.inc: Add cmd-loop loop in exit handler so we in fact
++	don't exit!
++
++2002-09-11 22:13  rockyb
++
++	* bashdb-fns.inc: Don't go into debugger command loop when called
++	from the debugger: (the caller is _bashdb_).
++
++2002-09-11 07:39  rockyb
++
++	* bashdb-brk.inc, bashdb-fns.inc, bashdb-init.inc: Add break
++	file:line syntax. Add counts on watchpoints and display of this on
++	listing. Display breakpoint number when adding.  i
++
++2002-09-11 07:38  rockyb
++
++	* NEWS: Version 0.23 changes (so far)
++
++2002-09-11 00:36  rockyb
++
++	* bashdb-cmds.inc: Make safe for tampering with IFS.
++
++2002-09-10 13:25  rockyb
++
++	* bashdb-cmds.inc: Fix bug in comment without space after #, e.g.
++	#foo.
++
++2002-09-10 13:13  rockyb
++
++	* bashdb-cmds.inc: Improve comment pattern so "#foo" works as does
++	"# foo."
++
++2002-09-10 12:49  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc: Bugs fixed in getting watch
++	command regression tests hammered out;	 eval now checks for tty,
++	listing watchpoints quotes expressions.
++
++2002-09-10 11:47  rockyb
++
++	* TODO: Cross a couple of things off the list.
++
++2002-09-10 11:02  rockyb
++
++	* bashdb-brk.inc: Test to see that line breaks are inside lines
++	Remove bug in not setting break condition correctly.  Message if no
++	breakpoints have been set.
++
++2002-09-10 11:00  rockyb
++
++	* bashdb-cmds.inc: More crud in comments.
++
++2002-09-10 10:59  rockyb
++
++	* bashdb-cmds.inc: Removed some crud.
++
++2002-09-10 10:58  rockyb
++
++	* bashdb-cmds.inc: Rename to _bashdb_cmd_break to be consistent in
++	naming.
++
++2002-09-10 09:08  rockyb
++
++	* Makefile.am, configure.in: Add support to create/run regression
++	tests in tests directory.
++
++2002-09-09 22:50  rockyb
++
++	* bashdb-brk.inc, bashdb-cmds.inc: Enable/disable of watchpoints
++	done. delete, enable and disable will allow suffix "w" for
++	watchpoint.
++
++2002-09-09 20:55  rockyb
++
++	* bashdb-help.inc: Add help for set command. Minor text changes.
++
++2002-09-09 19:45  rockyb
++
++	* NEWS: Add case statement work.
++
++2002-09-09 19:09  rockyb
++
++	* TODO: Update as appropriate.
++
++2002-09-09 19:02  rockyb
++
++	* TODO: Update as appropriate.
++
++2002-09-09 12:39  rockyb
++
++	* Makefile.am, TODO, configure.in: Use Automake AM_LISPDIR rather
++	than trying to roll this code on my own (and failing). Thanks to
++	Masatake YAMATO!
++
++2002-09-09 12:37  rockyb
++
++	* NEWS: Add 0.22 features.
++
++2002-09-08 18:57  rockyb
++
++	* bashdb-set.inc: Set/show commands
++
++2002-09-07 14:41  rockyb
++
++	* bashdb-cmds.inc: Add frame command. Version command is now a
++	separate command.
++
++2002-09-07 14:35  rockyb
++
++	* bashdb-stack.inc: Get frame with args command hammered out
++	properly.
++
++2002-09-07 09:36  rockyb
++
++	* bashdb-io.inc: Some error correction and error message on list
++	command.
++
++2002-09-07 09:35  rockyb
++
++	* bashdb-cmds.inc: Ooops - forgot to allow set/show as valid
++	commands here. Move CVS Id to end.
++
++2002-09-07 09:09  rockyb
++
++	* Makefile.am, bashdb-cmds.inc, bashdb-fns.inc, bashdb-help.inc,
++	bashdb-init.inc, bashdb-io.inc, bashdb-main.inc: Start set/show
++	commands.  List now takes up where it left off.  Move some CVS id
++	lines to the end to facilitate debugging Some minor improvements.
++
++2002-09-06 03:06  rockyb
++
++	* bashdb-brk.inc, bashdb-help.inc, bashdb-main.inc: Minor formating
++	changes or typos.
++
++2002-09-06 01:56  rockyb
++
++	* Makefile.am: Include new guy bashdb-sig.inc.
++
++2002-09-05 22:39  rockyb
++
++	* bashdb-cmds.inc, bashdb-main.inc, bashdb-sig.inc: Add signal
++	handlers for interrupt and exit. Now we catch when the program
++	stopped and report that.
++
++2002-09-05 22:37  rockyb
++
++	* TODO: Update as appropriate.
++
++2002-09-05 10:54  rockyb
++
++	* bashdb-main.inc: Slightly better?
++
++2002-09-05 10:53  rockyb
++
++	* bashdb-main.inc: Test to see if we are using a debugger-enabled
++	bash, and give up if not.
++
++2002-09-05 08:56  rockyb
++
++	* bashdb-brk.inc: Add null line + if in break command.
++
++2002-09-04 22:24  rockyb
++
++	* TODO: Update.
++
++2002-09-04 22:08  rockyb
++
++	* bashdb, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-help.inc, bashdb-init.inc, bashdb-io.inc: Redo the way
++	breakpoints are handled. Is more like gdb than perltdb.
++	
++	Now have enable/disable and breakpoint conditions.
++	
++	Some other minor changes. Like testing to see if we have an
++	attached tty.
++
++2002-09-03 13:22  rockyb
++
++	* bashdb: Change option -s to -q as it is in gdb.
++
++2002-09-03 12:47  rockyb
++
++	* bashdb, bashdb-init.inc: Add more options - x: command file run,
++	n: no init file run, -V show version, and -s silient. All
++	compatible with GDB.
++
++2002-09-03 12:36  rockyb
++
++	* bashdb-help.inc: Minor change to refer to doc.
++
++2002-09-03 12:30  rockyb
++
++	* Makefile.am: Add newly-created file bashdb-io.inc
++
++2002-09-02 22:37  rocky
++
++	* TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-help.inc, bashdb-init.inc, bashdb-io.inc, bashdb-main.inc,
++	bashdb-stack.inc: Major cleanup/expansion and a
++	bug/misunderstanding removed. Now reads in files once. Unset
++	breakpoint code no longer inlined. "info files" now works Stack
++	trace bug when via "info stack" fixed. bashdb-io.inc created.
++
++2002-09-02 15:29  rocky
++
++	* bashdb, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
++	bashdb-help.inc, bashdb-init.inc: Add info command. In the process,
++	we now	allow getting tty and args.
++
++2002-09-02 00:35  rocky
++
++	* TODO: Revise as appropriate.
++
++2002-09-02 00:28  rocky
++
++	* bashdb-help.inc: Update to reflect current situation.
++
++2002-09-02 00:16  rocky
++
++	* bashdb-cmds.inc, bashdb-help.inc, bashdb-stack.inc: Add bt
++	backtrace as an alias for where, or T. Add parameter to specify how
++	many frames to list on bt.
++
++2002-09-01 19:57  rocky
++
++	* bashdb-brk.inc, bashdb-cmds.inc, bashdb-stack.inc: Mostly
++	formatting. Change basic indent from 4 to 2. Stack commands were
++	duplicated in bashdb-cmds.inc, and a file identifier incorrect in
++	bashdb-brk.inc
++
++2002-09-01 11:05  rocky
++
++	* bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc, bashdb-help.inc,
++	bashdb-main.inc: Minor: correct function comments at top of file.
++
++2002-09-01 11:05  rocky
++
++	* Makefile.am: Break into more smaller files.
++
++2002-09-01 11:04  rocky
++
++	* bashdb-stack.inc: Break away from bashdb-cmds.inc
++
++2002-09-01 10:41  rocky
++
++	* bashdb-brk.inc: Things with breakpoints are now in a separate
++	file.
++
++2002-09-01 10:40  rocky
++
++	* bashdb-help.inc: Things with breakpoints and watchpoints (and
++	later actions) are now their own separate file
++
++2002-09-01 10:39  rocky
++
++	* bashdb-help.inc: Help is now it's own separate file.
++
++2002-09-01 05:32  rocky
++
++	* bashdb-cmds.inc, bashdb-fns.inc: Change pe to x. On watch, set
++	initial value (and display it).  Allow dump of variable. Add
++	internal function _is_var.
++
++2002-09-01 04:08  rocky
++
++	* bashdb-fns.inc: Separate watch variables from watch expressions
++
++2002-09-01 04:07  rocky
++
++	* bashdb-init.inc: Add array to note if watchpoint is arithmetic or
++	not.
++
++2002-09-01 04:06  rocky
++
++	* bashdb-cmds.inc: Separate out watch variable and watch
++	expressions.
++
++2002-09-01 02:47  rocky
++
++	* bashdb-init.inc: Set default next/step default value.
++
++2002-08-31 23:34  rocky
++
++	* bashdb-cmds.inc, bashdb-init.inc: Make more like gdb. Implement
++	aliases: run, shell. Add Init file startup ~.bashdbinit. Save args
++	on print and pe.
++
++2002-08-30 20:44  rocky
++
++	* CHANGES: Note watchpoints, and line number changes.
++
++2002-08-30 16:17  rocky
++
++	* bashdb-cmds.inc, bashdb-fns.inc: Small cleanups. Remove function
++	break code which doesn't work anyway.
++
++2002-08-30 12:46  rocky
++
++	* bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: Add
++	watchpoints. Help and commands now allow unique prefix, e.g. del
++	for delete.
++
++2002-08-30 12:20  rocky
++
++	* AUTHORS: Again.
++
++2002-08-30 12:18  rocky
++
++	* AUTHORS: More precies.
++
++2002-08-30 00:55  rocky
++
++	* TODO: Add watchpoints as requested by Bert Caridad.
++
++2002-08-27 20:56  rocky
++
++	* bashdb-cmds.inc: Fixed bug Inadvertently added by change \? to ?.
++	(Is now '?') to help emacs script editing.
++
++2002-08-27 20:52  rocky
++
++	* bashdb-cmds.inc: Doc continue enhancement.
++
++2002-08-27 20:51  rocky
++
++	* bashdb-cmds.inc, bashdb-fns.inc: clearing breakpoints now works
++	via a workaround.
++
++2002-08-27 20:48  rocky
++
++	* TODO: Update to reflect current situation.
++
++2002-08-26 23:53  rocky
++
++	* TODO: Did "up" and "down" - remove from list.
++
++2002-08-26 23:52  rocky
++
++	* bashdb.el: Add back in "up" and "down" which we have (but perldb
++	doesn't).
++
++2002-08-26 23:51  rocky
++
++	* bashdb, bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: "Up
++	[count} and down {count] working. Stack trace is now more like gdb
++	than perl. Probably will move more in that direction, too.
++	
++	Note: There may be some funniness in FUNCNAME BASH_SOURCE and
++	BASH_LINENO.
++
++2002-08-26 09:22  rocky
++
++	* bashdb, bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: S !pat
++	now works. Some alphabetization of commands and more subroutings in
++	bashdb-cmds start _bashdb_cmd_. init Has where we are in stack for
++	getting ready to put in up and down.
++
++2002-08-26 09:20  rocky
++
++	* TODO: Update.
++
++2002-08-26 09:20  rocky
++
++	* NEWS: More features - note that we're useful even if you don't
++	use the debugger.
++
++2002-08-26 08:06  rocky
++
++	* bashdb-cmds.inc: This time, for sure!
++
++2002-08-26 08:05  rocky
++
++	* bashdb-cmds.inc: - now lists up to _curline Bug in restart for
++	bash --debugger
++
++2002-08-26 06:55  rocky
++
++	* bashdb: Minor changes.
++
++2002-08-26 05:45  rocky
++
++	* CHANGES, TODO: Fix off-by-one line number error in command
++	subtitutions $(), `` and {}.
++
++2002-08-25 23:10  rocky
++
++	* bashdb-cmds.inc: Help for individual commands.
++
++2002-08-25 23:09  rocky
++
++	* TODO: Added emacs lisp install. help on commands and fixed
++	substutution line numbers.
++
++2002-08-25 23:08  rocky
++
++	* .cvsignore, Makefile.am, configure.in: batch-compile and install
++	emacs lisp files. (First cut: no doubt there's room for
++	improvement.)
++
++2002-08-25 20:27  rocky
++
++	* bashdb-cmds.inc: A couple more.
++
++2002-08-25 20:17  rocky
++
++	* bashdb-cmds.inc: Add long-form of commands.
++
++2002-08-25 20:17  rocky
++
++	* bashdb: Replace a [ with [[
++
++2002-08-25 17:50  rocky
++
++	* CHANGES: Note line number change in command substitution.
++
++2002-08-25 12:13  rocky
++
++	* TODO: Another bug with subshells found.
++
++2002-08-25 09:58  rocky
++
++	* TODO, bashdb-cmds.inc: Fix restart in bash --debugger
++
++2002-08-25 02:18  rocky
++
++	* bashdb, bashdb-cmds.inc, bashdb-init.inc, bashdb-main.inc: Minor
++	variable name corrections and changes. Mostly to do with version
++	command. Typo in bashdb.
++
++2002-08-25 02:05  rocky
++
++	* AUTHORS, Makefile.am, PERMISSION, TODO, bashdb, bashdb-cmds.inc,
++	bashdb-fns.inc, bashdb-init.inc, bashdb-main.inc: Last minute
++	cleanups before initial Savannah CVS import.
++
++2002-08-24 18:13  rocky
++
++	* bashdb, bashdb-cmds.inc, bashdb-fns.inc: Mostly small extensions
++	to make this match perl5db:  - Add Subroutine list (S)	- Add list
++	functions (l func)  - Add variable dump (V)  - Note where we
++	haven't finished implementing parameters  - Fix help
++	
++	bashdb: rename functions to more system-like names (so won't appear
++	in function list)
++
++2002-08-24 18:08  rocky
++
++	* TODO, NEWS: Update as appropriate.
++
++2002-08-24 00:58  rocky
++
++	* TODO: Fixed "continue"
++
++2002-08-24 00:55  rocky
++
++	* bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: Breakpoints now
++	work! setting, deleting, clearing all, listing.
++
++2002-08-23 14:15  rocky
++
++	* bashdb, bashdb-cmds.inc, bashdb-fns.inc: CVS cleanup: add CVS
++	lines
++
++2002-08-23 14:13  rocky
++
++	* bashdb-fns.inc: Command "Continue" ('c") now runs silently.
++
++2002-08-23 07:57  rocky
++
++	* TODO, bashdb, bashdb-fns.inc, bashdb-init.inc: Get dual execution
++	of "bashdb" and "bash --debugger" with respect to command-line
++	arguments. In bashdb however, $0 is bashdb not the program.
++
++2002-08-23 07:56  rocky
++
++	* bashdb.el: Remove looking for "--emacs" option in calling bashdb.
++	This is used in perldb but I don't know if we need it here. It
++	might get added later when we know what this is about and decide
++	it's necessary.
++
++2002-08-23 00:08  rocky
++
++	* bashdb, bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc,
++	bashdb-main.inc, bashdb.el: Changes so that we can support "bash
++	--debugger"
++
++2002-08-22 23:29  rocky
++
++	* CHANGES, TODO: Update to reflect current state of things.
++
++2002-08-22 08:13  rocky
++
++	* bashdb: _cleanup -> _bashdb_cleanup
++
++2002-08-22 08:03  rocky
++
++	* bashdb: Bug: not handling -T correctly. Also add emacs mode.
++
++2002-08-22 07:58  rocky
++
++	* Makefile.am, bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc,
++	bashdb-main.inc: Split bashdb-fns into multiple *.inc files
++
++2002-08-22 07:56  rocky
++
++	* .cvsignore: Yet more of the usual ignored files...
++
++2002-08-22 07:54  rocky
++
++	* .cvsignore: CVS: Useful file.
++
++2002-08-21 19:53  rocky
++
++	* CHANGES, bashdb, bashdb-main.inc: Now source the file to be
++	debugged rather than use that hacky temp file.	x
++
++2002-08-20 12:10  rocky
++
++	* bashdb, bashdb-main.inc: Bogosity in assuming single-file script
++	removed.  Now tracks source file correctly (in conjunction with
++	changes in bash)
++
++2002-08-20 12:08  rocky
++
++	* bashdb.el: [no log message]
++
++2002-08-20 12:07  rocky
++
++	* bashdb.el: Add GPL
++
++2002-08-20 12:05  rocky
++
++	* README: Add CVS id line
++
++2002-08-20 12:05  rocky
++
++	* README: No longer a modification but a rewrite. Note that bashdb
++	now requires my patches.
++
++2002-08-20 12:04  rocky
++
++	* AUTHORS, CHANGES, COPYING, ChangeLog, INSTALL, Makefile.am, NEWS,
++	TODO, configure.in: Automake'd and autoconf'd
++
++2002-08-20 11:34  rocky
++
++	* bashdb-main.inc: Add stack trace.  Some typos corrected.
++
++2002-08-20 11:31  rocky
++
++	* bashdb-main.inc: Add GPL
++
++2000-04-03 08:54  rocky
++
++	* bashdb-main.inc: Typo. Cut over to version control id.
++
++2000-04-02 23:26  rocky
++
++	* MANIFEST, PERMISSION, README, bashdb, bashdb-main.inc, bashdb.el:
++	Initial revision
++
++2000-04-02 23:26  rocky
++
++	* MANIFEST, PERMISSION, README, bashdb, bashdb-main.inc, bashdb.el:
++	Imported sources
++
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/INSTALL cvs/debugger/INSTALL
+--- bash-2.05b/debugger/INSTALL	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/INSTALL	2002-09-17 13:56:07.000000000 +0200
+@@ -0,0 +1,43 @@
++See also INSTALL in the top-level directory, that is the parent of
++this directory for general instructions on installing the
++debug-enabled version of bash. The instructions here cover only the
++debugger portion.
++
++First of all, the debugger needs a debugger-enabled version of Bash
++which contains things like the ability to step into functions
++automatically, give tracebacks, and list source-file information.  The
++source code to the debugger-enabled version of bash is found in the
++parent directory of the directory that this file is located. (And if
++you have configured and compiled, the binary will be there too.)
++
++It is possible to try out the debugger without installing it by using
++the bashdb script that is in this directory. To do so you would invoke
++your script as follows assuming you are currently in the directory
++(debugger) that you originally found this file in.
++
++ ../bash -L . ./bashdb *script-to-be-debugged* *options-to-debugged-program*
++
++The only downside to this approach is that $0 in will be ``bashdb''
++(or more likely ``./bashdb'') rather than the name of the script to be
++debugged. If this is a problem, then you will have to install the
++debugger, or modify the script to be debugged to point to the
++debugger-enabled version of bash.  For example if your script were in
++this directory (debugger) as well is your current working directory
++(as shown by ``pwd''), then having this at the beginning of your
++script:
++
++#!../bash --debugger 
++
++might also work.
++
++For information on the differences between "bash --debugger" and
++bashdb, see Chapter 2 (Getting In and Out) of the bashdb documentation
++(bashdb.info, bashdb.html, or bashdb.texi)
++
++Before installing please do run "make check" to ensure that all of the
++debugger regression tests work.
++
++After compiling bash (``make'' in the parent directory of this one) and
++running the regression tests, as root run ``make install.'' That's it!
++
++$Id: INSTALL,v 1.2 2002/09/17 11:56:07 rockyb Exp $
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/Makefile.am cvs/debugger/Makefile.am
+--- bash-2.05b/debugger/Makefile.am	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/Makefile.am	2003-09-01 22:00:46.000000000 +0200
+@@ -0,0 +1,48 @@
++#   Copyright (C) 2002 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++#$Id: Makefile.am,v 1.35 2003/08/29 15:29:41 snikkt Exp $
++
++SUBDIRS = test doc emacs
++
++dist-hook: bash
++
++bash: $(top_builddir)/../bash$(EXTEXT)
++	cp $(top_builddir)../bash$(EXTEXT) bash$(EXTEXT)
++
++check-recursive: bash
++
++man:
++	@( cd $(top_builddir)/doc ; $(MAKE) $(MFLAGS) man )
++html:
++	@( cd $(top_builddir)/doc ; $(MAKE) $(MFLAGS) html )
++	
++# Set up the install target 
++bin_SCRIPTS = bashdb
++
++data_DATA =
++pkgdata_DATA = dbg-brk.inc   dbg-help.inc  dbg-cmds.inc \
++		 dbg-fns.inc   dbg-init.inc  dbg-io.inc \
++		 dbg-list.inc  dbg-main.inc  dbg-set.inc  \
++	         dbg-sig.inc   dbg-stack.inc dbg-set-d-vars.inc \
++	         dbg-hist.inc  dbg-pre.inc   \
++	         dbg-file.inc
++
++EXTRA_DIST = dbg-pre.inc.in bashdb.in dbg-main.inc.in \
++	     $(pkgdata_DATA) acinclude.m4 bash THANKS
++
++#;;; Local Variables: ***
++#;;; mode:makefile ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/NEWS cvs/debugger/NEWS
+--- bash-2.05b/debugger/NEWS	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/NEWS	2003-09-08 08:40:24.000000000 +0200
+@@ -0,0 +1,411 @@
++Version 0.43
++- Autostuff improvements
++- configurable package and executable names
++- Allow modification the philosophical parts the bashdb reference
++  manual to placate Matthias Klose and presumably Debian folks
++- Bug: a comment line in the history was taken as a timestamp and we 
++  dumped core. Non-timestamp comment lines should appear in the history now.
++
++
++Version 0.42
++- Add bashdb manual page.
++- Changes to allow building outside of source tree.
++- Add Debian bash 2.05b patches provided by Matthias Klose.
++
++Version 0.41
++
++- The line number in multi-line assignments had been the line number where
++  the assignment ends, not the beginning. Thus assignments with
++  back-ticked subshells gave the wrong line number.
++- V (info variables) command working thanks to Mikael Andersson
++- Add "help show <command>" and "help info <command>"
++- More global variables start out _Dbg_ now (e.g. source_ -> _Dbg_source_)
++- Add long overdue THANKS
++
++Version 0.40
++
++- "make distcheck" from debugger directory works
++- bashdb doc moved under debugger directory
++- Make portability changes for cygwin and OS's that don't have wcwidth
++- Install public bash 2.05b patches 005-007
++- use diff -u if that's available on regression tests
++
++Version 0.39
++
++- history now is timestamped. Use environment variable HISTTIMEFORMAT
++  to customize using strftime specifiers. 
++- tty detection made less more generic
+++ The timestamp patch is was posted to bug-readline@gnu.org; there is no 
++  response.
++
++
++Version 0.38 
++- Was not finding source file if we did a cd in the debugged script 
++  and the source file name was relative. Expand source file names.
++
++Version 0.37 (since 0.36):
++-  As a result of the below ddd's break/clear icon/buttons should work:
++  *  Add "set annotate". 
++  *  Make breakpoint output more like gdb's. make show output more like gdb's
++  *  Canonicalize filenames on breakpoints, actions, lists.
++  *  add gdb "show dir" and do lookup based on source name and $cdir:$cwd
++-  _bashdb_ -> _Dbg_
++-  Add ~ to filename translation characters
++
++Version 0.36 (since 0.35):
++-  Bug: if IFS set character in filename: the filename would be truncated.
++   Handle IFS save/restore more pervasively by saving on DEBUG handler
++   entry.
++
++-  Bug/Feature fix: Restart now quits all subshells before issuing its
++   restart (exec) command.
++
++-  Mechanism for having variables set in a subshell persist in a parent
++   shell worked out. Some of the global debugger settings (like
++   listsize, history) use this. 
++
++-  debugger "print" command now uses double quote expansion rules. 
++   (So print *** will expand filenames). We were having evaluation problems
++   in printing strings like "This won't work" (the single quote). 
++
++-  Bug: setting shell variables with double/single quotes other
++   meta characters now works. 
++
++-  Bug: caller() returned mismatched functions for line numbers/filenames.
++   Also now returns null string if no caller.
++
++-  Add + to list of filename translation characters.
++
+++  Patches for this version is posted to bash maintainer; word March 31st
++   2003, that bash debugger patches have been integrated in a modified
++   form into "mainline bash code".
++
++Version 0.35 (since 0.34):
++-  Bug: if IFS was not blank setting  _bashdb_old_set_opts might fail.
++   Save and restore IFS before using "set"
++
++-  Bug: (parse.y) line number was not updated properly when in a here
++   documented with an unquoted delimiter and containing backslash newline.
++
++-  Bug, sort of: now set BASH_COMMAND to for head (for i in x y z ...) 
++   in case head (case x in ), and in select head (select s in).
++
++-  Feature: "restart" now saves debugger environment. Environment variable
++   BASHDB_RESTART give the state file to read.
++
++-  Add environment variable BASHDB_INPUT to have a debugger command
++   file get read. This can be a space-separated list of files. Allow
++   -x many times in bashdb.
++
++-  Patches: Install public bash 2.05b patches 001-004.
++
++-  When reading large fileswhich takes a long time (e.g. "configure"
++   scripts), print out status every 1000 lines.
++
++Version 0.34 (since 0.33):
++-  Bug: if no script we were running "set" to dump environment.
++
++-  Bug: "H count" was broken due to typo.
++
++-  We now keep track of the subshell level: dynamic variable
++   BASH_SUBSHELL and the debugger prints these as ()'s inside of the
++   prompt.
++ 
++-  "quit" leaves nested subshells more properly. Now takes an optional
++   argument to specify how many subshells to leave.
++
++-  Update gud.el (Masatake YAMATO), remove examples/bashdb/bashdb.el which may
++   cause confusion and set expectations for examples/bashdb (via README)
++
++Version 0.33 (since 0.32):
++-  Regression tests work on FreeBSD, OSX (as well as Linux and Solaris)
++
++-  Fix following bugs:
++
++   * exit handler was getting called each time we exited a subshell.
++
++   * "bash --debugger script args" was not setting args properly.
++
++   * (configure) remove --with-debugger-start which are for
++     packages. Is variable DEBUGGER_START_FILE now. Versions are more
++     automatically picked up from a central setting. (More could be done
++     though). Thanks to c_thomps@ecolinux.no-ip.com. 
++
++   * not setting fntrace correctly on debugger exit.
++
++   * wrong line number on case selector statement. Was esac rather than case.
++
++   * was getting max line number for some files properly
++  
++   * (makefile) man2html.o not removed on clean
++
++-  Be able to handle EXIT like other signals (stop/nostop stack/nostack).
++
++-  Add provision for finding out which command is going to be executed.
++   Useful on multi-statement lines, conditional tests, for-loop headers a
++   eval (since the statement might be first "eval $foo" and then 
++   "echo this is my life."
++  
++-  Display command in debugger session we are on the same line/file and this
++   command changed.
++
++-  Canonicalize filevars via a file-expand routine. Allows many ways to 
++   refer to the same file.
++
++-  Add option to have files show only short (basename) names, useful in testing
++
++-  Add set/show of these (basename, debugging debugger).
++
++-  Add -c option on bashdb. Analogous to "bash -c string"
++
++-  correct releases automatically put in "bash -v" and debugger M commands.
++
++-  Clean up signal handling code some. No longer need to pass LINENO. 
++   Add routine to do some of the common entry/exit things.
++
++Version 0.32 (since 0.31):
++
++-  Line number reporting improved.
++
++-  Fix bug in using trap line numbers inside traps. BASH_LINENO had
++   been wrong for the parts inside of a trap.
++
++-  Fix bug in case line numbers reporting line number of "esac" rather than case clause
++
++-  Fix bug in "down" command
++
++-  Bug in regression test run-all not picking up right shell sometimes.
++
++-  Make command "x" (display variable) much more useful and smarter
++   and more like perl5db's "x" command: show variable attributes (via
++   declare -p) or function body (via declare -f) evaluates an expression if 
++   those fail and if *that* fails do what good ol' "print" would do.
++
++-  Add gdb's:
++	"condition" command. 
++	"info break <n>".
++	"handle" command
++	"info signal"
++
++-  Signal handling more like gdb.
++
++-  bashdb patches for ddd
++
++-  Change help be more like gdb to facilitate ddd support.
++
++-  Improve bashdb.el and patches for gud.el
++
++-  Missing "finish" help info. 
++
++
++Version 0.31 (since 0.30):
++-  Fix bug where stack trace current line entry was sometimes wrong.
++   No longer mangle line number in stack changing commands.
++
++-  Implement gdb "finish" (some line number weirdnesses though.)
++
++-  Don't clobber debugged script's INT or ERR trap signal if set, but
++   do change them inside the debugger.
++
++-  All debugger functions now start _bashdb
++
++-  Expand history commands: "H -n" and "! n" work like perl5db. 
++
++-  short command v (versions) changed to M to match perl5db.
++
++Version 0.30 (since 0.29):
++-  Fix bugs in debugger output when debugged program redirects I/O
++
++-  Fix bug in setting $# via the way we set $1, $2 and so on. We now
++   also handle an arbitrary number of parameters.
++
++-  Fix/change history. Numbers now match prompt numbers. Can use !n, !-n as 
++   well as hi [-]n. Also ![-]n:p instead of H n. Can limit the number
++   of history items listed on the H command.
++
++-  Add GDB's "set args" command. 
++
++-  Add GDB's "set editing" command. 
++
++-  Add GDB's set/show prompt and allow for more flexible prompt customization.
++
++-  Add GDB-like tty command and bashdb option -t for this. 
++   Unlike GDB though, you can redirect debugger output to a file.
++
++-  Minor tweaks to "help" and "show". "show subtopic" works.
++
++Version 0.29 (since 0.28):
++
++-  Fix bug in "make uninstall"
++
++-  $? is saved and preserved for use inside "eval", "print", "watch", 
++   "display", "break" and "action" expressions.
++
++-  Can also refer to $1, $2, ... in commands mentioned above.
++
++-  debug-level nesting (the number of times we are nested in debugger)
++   is now shown in prompt via new exported variable BASHDB_LEVEL.
++
++-  Implement "skip" command. (Don't run next command.) Integrate this into
++   "debug" command.
++
++-  First cut at gdb-type "return" (premature return from function or 
++   sourced program).
++
++-  Document caller() builtin function and "debug" debugger command. 
++
++- "Search" now works like gdb and perl5db. Fix a small bug in search
++   forward: was not resetting line to search location.
++ 
++Version 0.28 (since 0.27):
++
++-  Can refer to parameters $1 $2, ... in "print", "eval" and breakpoint
++   conditions.
++
++-  Parameters appear in call stack. To do this: 
++
++-  BASH_ARGC and BASH_ARGV arrays added. One is a stack of the count of
++   the parameters and the other a stack of the parameters. 
++
++Version 0.27 (since 0.26):
++-  Add forward and backward search.
++
++-  Add Perl "a" and "A" (action) commands.
++
++-  Add builtin caller().
++
++Version 0.26 (since 0.25):
++-  Document "break" command. 
++
++-  Change "line" to "linespec" in online help where 
++   appropriate.
++
++-  Add commands "tbreak" (one-time break) and "display" (automatic display).
++
++-  Add provision to debug into a script ("debug" command), and leave
++   script without going back into debugger command loop
++   (BASHDB_QUIT_ON_QUIT environment variable). 
++
++-  Document command "tbreak", "enable" and "disable" in manual.
++
++Version 0.25 (since 0.24):
++
++-  Fix core dump on error (when no source file).
++
++-  Fix bug where "watche x > 24" was creating output to file 24.
++
++-  "restart" now picks up full bash name from BASH environment variable.
++
++-  bash --debugger -c "..." now works.
++
++   To accomplish the above, environment variable BASH_EXECUTION_STRING
++   was added which contains the contents what was passed after -c.
++
++-  Command files now nest and pick up where they left off in between
++   script execution. 
++
++-  save "set" parameters on debugger entry and restore them. Inside the 
++   debugger: set +xv. 
++
++-  add ARG array for $1, $2 and so on. "info args" now shows these.
++ 
++-  Revise and update doc for above and (hopefully) better overall
++   organization. 
++
++-  Better installation instructions. 
++   Revise bash's top-level README and INSTALL's (debugger and top
++   level) to note debugger changes.
++
++Version 0.24 (since 0.23):
++
++-  Line numbers of initial "for var  in..." and "select" listed or stopped. 
++   Error messages on those lines should print correctly.
++
++-  Rename debugger variables so as not to conflict with possible user 
++   variables (such as "i").
++
++-  Don't allow stepping into debugger on program exit. 
++   loop on command loop in "exit" handler. 
++
++-  Function names now supported.  breakpoints can be set on them. "list" now
++   allows a function name. 
++
++   To add function name support, the semantics of "declare -F" have
++   changed: the source file and line number is now added in the output. 
++
++   However in non-interactive mode, the line number is wrong. It is the 
++   caller line.
++
++-  These commands have been extended to include linespecs 
++   "continue", "break" (tbreak), "list".
++
++
++Version 0.23 (since 0.22):
++
++-  More work on breakpoints and watchpoints, error checking
++   * Allow breaking on file:line.
++   * Give counts on number of times hit
++   * Allow enabling/disabling/clearing watchpoints via "w" suffix
++-  fix bugs 
++      handling break/watch conditions
++      eval without a tty
++      "-" command size wrong
++      #comment handling
++      make cmd_loop read safe from tampering with IFS
++-  More texinfo manual revisions
++-  Separate debugger tests from bash tests
++  
++Version 0.22 (since initial release):
++
++-  More complete texinfo manual
++-  Automake improvements to install Emacs lisp (Masatake YAMATO)
++-  Set/show started
++-  List with no arguments works like gdb and Perl's debugger
++    list regression test added
++-  Add frame command 
++-  Add signal handler for exit so we don't exit debugger when exiting program
++-  case statements now indicate line number of "case WORD".
++  
++Initial release -
++
++Initial release of something that's worthy of being called a debugger!
++
++In contrast to earlier ksh/bash debuggers, this release has: 
++
++Line numbers and source text are reported correctly
++  - through loops
++  - through conditionals
++  - inside functions
++  - inside sourced files
++
++A change in source file is now tracked - we don't assume one script
++file nor do we create a fake script file with a funny name and run
++that.
++
++Emacs support via GUD (grand-unified debugger)
++
++Step/next (to step inside a function or ignore it) now work
++  - even works on "source"
++
++Call stack display. 
++ - Since "source" is a builtin function that shows up in the call stack
++ - function names, filenames and line numbers appear in call stack
++
++Command arguments to debugged routine are left intact (if using bash
++--debugger). In particular $0 is the program name.
++
++Debugging interface similar (and largely a subset of) Perl's debugger
++interface with gdb long mnemonics. (Well, okay: where - but perhaps
++more in the future like "up" and "down").
++
++Even without using *our* debugging script, there are changes to bash
++that make other debugging (or writing other debuggers) more
++amenable. In particular, line numbers of command substitution ``,
++$(), and {}, now gives the absolute line number in the file rather
++than relative to the beginning of the substitution. (So error
++reporting you generally see that an unhelpful message that error
++occurred on line 1.) Also support for call stacks with source files
++and line numbers can be helpful for stand-alone debugging and error
++reporting
++
++$Id: NEWS,v 1.86 2003/09/03 07:54:02 rockyb Exp $
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/README cvs/debugger/README
+--- bash-2.05b/debugger/README	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/README	2002-08-20 18:05:49.000000000 +0200
+@@ -0,0 +1,16 @@
++This is a rewrite of the Korn Shell debugger from Bill Rosenblatt's
++`Learning the Korn Shell', published by O'Reilly and Associates (ISBN
++1-56592-054-6). Michael Loukides and Cigy Cyriac made some additional
++changes.
++
++The original `kshdb' is available for anonymous FTP with the URL
++
++ftp://ftp.uu.net/published/oreilly/nutshell/ksh/ksh.tar.Z
++
++However this code now depends on a number of debugging support
++features that are neither part of the POSIX standard and are probably
++not in many POSIX-like shells.
++
++R. Bernstein (rocky@panix.com)
++
++$Id: README,v 1.3 2002/08/20 16:05:49 rocky Exp $
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/THANKS cvs/debugger/THANKS
+--- bash-2.05b/debugger/THANKS	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/THANKS	2003-08-11 10:06:34.000000000 +0200
+@@ -0,0 +1,6 @@
++The following kind people have contributed to this debugger. 
++
++Masatake YAMATO <jet@gyve.org> - Emacs support, screenshots
++Mikael Andersson <snikkt@telia.com> - "V" command
++Matthias Klose <doko@cs.tu-berlin.de> - making build system and package 
++	       			      	more industrial strength.                                  
+\ No newline at end of file
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/TODO cvs/debugger/TODO
+--- bash-2.05b/debugger/TODO	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/TODO	2003-08-11 10:06:34.000000000 +0200
+@@ -0,0 +1,63 @@
++For Debian release:
++- bashdb manual page
++- GFDL or GPL for documentation? 
++- install lib in /usr/share. Have bashdb fallback to 
++ "@DEBUGGER_START_FILE@"? if no -L and no ../lib? 
++
++BUGS
++
++- source can have parameters but that doesn't appear in ARGC, ARGV.
++  RETURN trap should signal when leaving source'd file.
++
++- Stack trace on rare occasions can get the wrong line number. 
++
++- Interrupts to program sometimes are delayed. Seems like a bash thing. Why? 
++
++- Darwin compilation problem in siglist
++
++- Check that all global variables are changed via "journal"
++
++-------------------------------------
++
++NECESSARY TO DO:
++
++  - Documentation:
++      update sample session ?
++      Info for calling from inside script. Developer's handbook?
++
++FEATURES TO ADD:
++
++  0. bash should maintain a list of line numbers that one can
++     set breaks on.
++
++  1. perl5db actions
++
++ *2. debugger to catch error handling. (Does this need bash?)
++     Might be able to somehow cascade onto existing Error routine.
++     Same might be done with SIGDEBUG.
++
++  3. gdb signal mechanism - it's partly there
++
++  4. "finish" or "return" where frame has been changed from top. 
++
++  Gdb commands that could be added: 
++    backtrace -n
++    set history filename
++    set history name
++    set history size
++    ignore
++
++
++FUTURE:
++
++ *More support in bash: list of valid line numbers
++ *Rewrite so debugger lives outside of process
++   - will not be subject to subshell environment discards. 
++   - will have its own global state, but it needs to have access to debugger
++     environment 
++   - will support remote debugging
++
++
++*=Things that bash might help out with.
++-------------------------------------
++$Id: TODO,v 1.49 2003/08/10 23:58:40 rockyb Exp $
+\ No newline at end of file
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/acinclude.m4 cvs/debugger/acinclude.m4
+--- bash-2.05b/debugger/acinclude.m4	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/acinclude.m4	2003-08-28 04:47:10.000000000 +0200
+@@ -0,0 +1,30 @@
++AC_DEFUN([AC_BASHDB_PACKAGE], [
++dnl Allow choosing the package name to avoid clashes with
++dnl bash if beeing installed side-by-side
++AC_ARG_VAR(
++       ALT_PACKAGE_NAME,
++       AC_HELP_STRING([],[alternate packagename to use (default is "$1")])
++)
++if test -z "${ALT_PACKAGE_NAME}"; then
++       ALT_PACKAGE_NAME="$PACKAGE_NAME"
++fi
++
++dnl define PACKAGE and VERSION.
++PACKAGE=$ALT_PACKAGE_NAME
++VERSION=$PACKAGE_VERSION
++AC_DEFINE_UNQUOTED(PACKAGE,$PACKAGE)
++AC_DEFINE_UNQUOTED(VERSION,$VERSION)
++AC_SUBST(PACKAGE)
++AC_SUBST(VERSION)
++])
++
++
++AC_DEFUN([AC_SUBST_DIR], [
++        ifelse($2,,,$1="$2")
++        $1=`(
++            test "x$prefix" = xNONE && prefix="$ac_default_prefix"
++            test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
++            eval echo \""[$]$1"\"
++        )`
++        AC_SUBST($1)
++])
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/bashdb.in cvs/debugger/bashdb.in
+--- bash-2.05b/debugger/bashdb.in	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/bashdb.in	2003-08-30 07:31:04.000000000 +0200
+@@ -0,0 +1,165 @@
++#!@INTERPRETER_NAME@
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++#
++# Alternate way to invoke debugger. bash --debugger however is preferred.
++
++typeset _Dbg_ver=\
++'$Id: bashdb.in,v 1.4 2003/08/25 16:34:35 snikkt Exp $'
++
++declare -a _Dbg_script_args="$@"
++
++# Equivalent to basename $0; the short program name
++typeset _Dbg_pname=${0##*/}  
++
++# Show basename only in location listing. This is needed in regression tests
++typeset -i _Dbg_basename_only=${BASHDB_BASENAME_ONLY:-0}
++
++typeset _Dbg_main=dbg-main.inc
++typeset _Dbg_libdir=@PKGDATADIR@
++typeset _Dbg_bindir=$(dirname $0)
++typeset _Dbg_tmpdir=/tmp
++
++typeset _Dbg_cmd='' # If command string given on command line, this is it.
++
++
++_Dbg_usage() {
++  printf "_Dbg_usage:
++    ${_Dbg_pname} [OPTIONS] <script_file>
++
++Runs script_file under a (primitive) debugger.
++
++options: 
++    -B           basename only on source listings. (Needed in regression tests)
++    -h           print this help
++    -n           Don't run initialization files
++    -c command   Run this passed command of a script
++    -q           Quiet. Do not print introductory and quiet messages.
++    -x cmdfile   execute commands from cmdfile
++    -L libdir    set directory location of library helper file: $_Dbg_main
++                 the default directory is: $_Dbg_libdir
++    -T tmpdir    set directory location for temporary files: $_Dbg_tmpdir
++    -t tty       set debuger terminal
++    -V           show version number and no-warranty and exit.
++" 1>&2
++}
++
++# What to set for location of helper routines? 
++if [[ ! -e $_Dbg_libdir/$_Dbg_main ]] ; then
++  # Use bindir/../share as fallback
++    _Dbg_libdir=
++    if [[ -d $_Dbg_bindir/../share/bashdb ]] ; then
++      _Dbg_libdir=$_Dbg_bindir/../share/bashdb
++    fi
++fi
++
++while getopts BhnqVc:t:x:L:T: opt; do
++  case $opt in
++    B) _Dbg_basename_only=1 ;;
++    c) _Dbg_cmd="$OPTARG" ;;
++    h) _Dbg_usage; exit 100 ;;
++    n) _Dbg_no_init=1 ;;
++    q) _Dbg_quiet=1 ;;
++    x) BASHDB_INPUT="$BASHDB_INPUT $OPTARG" ;;  
++    L) _Dbg_libdir=$OPTARG ;;
++    T) _Dbg_tmpdir=$OPTARG ;;
++    t) 
++      if ! $(touch $OPTARG >/dev/null 2>/dev/null); then 
++	echo "${_Dbg_pname}: Can't access $OPTARG for writing."
++      elif [[ ! -w $OPTARG ]] ; then
++	echo "${_Dbg_pname}: terminal $OPTARG needs to be writable."
++      else
++	_Dbg_tty=$OPTARG
++      fi
++      ;;
++    V) show_version=1 ;;
++    *) _Dbg_usage; exit 2 ;;
++  esac
++done
++shift $(($OPTIND - 1))
++
++[[ $# == 0 && -z $show_version && -z $_Dbg_cmd ]] && {
++  echo "${_Dbg_pname}: Need to give a script name to debug."
++  exit 1
++}
++
++if [[ ! -d $_Dbg_libdir ]] && [[ ! -d $_Dbg_libdir ]] ; then 
++  echo "${_Dbg_pname}: cannot read $_Dbg_libdir. " \
++  "Perhaps bashdb is installed wrong." >&2
++  echo "${_Dbg_pname}: or try using -L (with a different directory)." >&2
++  exit 1
++fi
++
++_source_file=$1
++shift
++
++if [[ ! -d $_Dbg_tmpdir ]] && [[ ! -w $_Dbg_tmpdir ]] ; then
++  echo "${_Dbg_pname}: cannot write to temp directory $_Dbg_tmpdir." >&2
++  echo "${_Dbg_pname}: Use -T try directory location." >&2
++  exit 1
++fi
++
++[[ -r $_Dbg_libdir/$_Dbg_main ]] || {
++  echo "${_Dbg_pname}: cannot read debugger file $_Dbg_libdir/$_Dbg_main." >&2
++  echo "${_Dbg_pname}: Perhaps bashdb is installed incorrectly." >&2
++  exit 1
++}
++
++# Note that this is called via bashdb rather than "bash --debugger"
++_Dbg_script=1
++
++. ${_Dbg_libdir}/dbg-pre.inc
++
++if [[ -z $_Dbg_quiet ]] ; then 
++  echo "Bourne-Again Shell Debugger, release $_Dbg_release"
++  cat <<EOF
++Copyright 2002,2003 Rocky Bernstein
++This is free software, covered by the GNU General Public License, and you are
++welcome to change it and/or distribute copies of it under certain conditions.
++
++EOF
++fi
++
++if (( show_version == 1 )) ; then 
++cat <<EOF
++There is absolutely no warranty for BASHDB.  Type "show warranty" for details.
++EOF
++  exit 1
++fi
++
++if [[ ! -r "$_source_file" ]] && [[ -z $_Dbg_cmd ]] ; then
++  echo "${_Dbg_pname}: cannot read program to debug: $_source_file." >&2
++  exit 1
++else
++  typeset -r _Dbg_source_file=$(_Dbg_expand_filename $_source_file)
++fi
++
++. $_Dbg_libdir/dbg-main.inc
++set -o fntrace
++if [[ -z $_Dbg_cmd ]] ; then 
++  . $_source_file
++else 
++  eval $_Dbg_cmd
++fi
++
++
++# end of bashdb
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
++
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/configure.ac cvs/debugger/configure.ac
+--- bash-2.05b/debugger/configure.ac	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/configure.ac	2003-09-01 22:00:47.000000000 +0200
+@@ -0,0 +1,130 @@
++dnl
++dnl Configure script for bash-2.05 debugger
++dnl
++dnl report bugs to rocky@panix.com
++dnl
++dnl Process this file with autoconf to produce a configure script.
++
++# Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
++# 02111-1307, USA.
++
++dnl TENTATIVE:
++dnl Use same version as in main bash configure.in
++define(bashvers, 2.05b)
++define(relstatus, 0.43)
++
++AC_INIT([bash],[bashvers-debugger-relstatus],[rocky@panix.com])
++
++AM_PATH_LISPDIR
++
++dnl make sure we are using a recent autoconf version
++AC_PREREQ(2.53)
++
++AC_ARG_PROGRAM
++AM_INIT_AUTOMAKE([no-define])
++
++AC_BASHDB_PACKAGE([bashdb])
++
++# Brought over from bash/configure.in to substitute BASHVERS
++# and RELSTATUS in dbg-pre.inc.in and version.texi
++BASHVERS=bashvers
++RELSTATUS=relstatus
++AC_SUBST(BASHVERS)
++AC_SUBST(RELSTATUS)
++
++
++AC_CONFIG_SRCDIR(bashdb.in)
++if test x$ac_srcdir = x ; then
++  ac_srcdir=.
++fi
++
++AC_PATH_PROG(EMACS, emacs, no)
++if test x$EMACS = xno ; then
++  emacs_lisp=no
++fi
++
++# Create a suitable transform ( without the $ -> $$ escaping added
++# because of $program_transform_name being used in a Makefile
++# This transform is needed because bashbd must be executed by the
++# bashdb-bash regardless if a program transform has taken place
++ac_transform=`echo "$program_transform_name" | sed 's/\\$\\$/\\$/g'`
++
++# Fully expanded name of bash executable to be substituted into
++# bashdb.This allow us to move this package into any suitable location
++# by using --prefix as an option to configure.
++AC_SUBST_DIR(INTERPRETER_NAME,"${bindir}/"`echo bash | sed "$ac_transform"`)
++
++# Fully expanded namn of pkgdatadir. This is where arch independent files
++# should be placed according to FHS. Used in bashdb.in and dbg-main.inc.in
++AC_SUBST_DIR(PKGDATADIR,"${datadir}/${PACKAGE}")
++
++
++
++dnl We use a diff in regression testing
++AC_PATH_PROG(DIFF, diff, no)
++DIFF_OPTS=
++
++if test "$DIFF" = no ; then
++   AC_PATH_PROG(DIFF, cmp, no)
++else 
++   dnl Try for GNU diff options.
++  # MSDOG output uses \r\n rather than \n in tests
++  for diff_opt in -w --unified ; do 
++    if $DIFF $diff_opt ./configure ./configure > /dev/null 2>&1; then
++      AC_MSG_RESULT([adding $diff_opt to diff in regression tests])
++      DIFF_OPTS="$DIFF_OPTS $diff_opt"
++    fi
++  done
++fi
++AC_SUBST(DIFF)
++AC_SUBST(DIFF_OPTS)
++
++AM_CONDITIONAL(INSTALL_EMACS_LISP, test "x$lispdir" != "x")
++
++#Makefiles
++AC_CONFIG_FILES([Makefile \
++	doc/Makefile \
++	emacs/Makefile \
++	test/Makefile])
++
++# Additional files needing substitution of values (not Makefiles).
++AC_CONFIG_FILES([bashdb \
++	dbg-pre.inc \
++	dbg-main.inc \
++	test/check_common ],[chmod +x bashdb])
++
++
++# We don't want TeX do be a requirement for compilation.
++if ! test -e $ac_srcdir/doc/version.texi ;then
++	AC_CONFIG_FILES([ doc/version.texi ])
++fi
++
++AC_CONFIG_COMMANDS([default],[[
++# Keep old dates on these files to prevent rebuilding.
++touch -cr $ac_srcdir/configure.ac doc/bashdb.1
++touch -cr $ac_srcdir/configure.ac doc/bashdb-man.html
++if test -e $ac_srcdir/doc/version.texi ;then
++	echo timestamp > $ac_srcdir/doc/stamp-vti
++	touch -cr $ac_srcdir/configure.ac $ac_srcdir/doc/version.texi \
++	$ac_srcdir/doc/stamp-vti \
++	$ac_srcdir/doc/bashdb.info*
++	
++fi
++]],[[]])
++
++AC_OUTPUT
++
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-brk.inc cvs/debugger/dbg-brk.inc
+--- bash-2.05b/debugger/dbg-brk.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-brk.inc	2003-03-31 17:09:19.000000000 +0200
+@@ -0,0 +1,1018 @@
++# dbg-brk.inc - Bourne Again Shell Debugger Break/Watch/Action routines
++
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++#================ VARIABLE INITIALIZATIONS ====================#
++
++declare -r _Dbg_brk_ver=\
++'$Id: dbg-brk.inc,v 1.11 2003/03/31 15:09:19 rockyb Exp $'
++
++typeset -ar _Dbg_yn=("n" "y")         
++typeset -ar _Dbg_keep=('keep' 'del')  
++
++# action data structures
++typeset -ai _Dbg_action_line=()     # Line number of breakpoint
++typeset -a  _Dbg_action_file=()     # filename of breakpoint
++typeset -ai _Dbg_action_enable=()   # 1/0 if enabled or not
++typeset -a  _Dbg_action_stmt=()     # Statement to eval when line is hit.
++typeset -i  _Dbg_action_max=0       # Needed because we can't figure 
++                                       # out what the max index is and arrays 
++                                       # can be sparse
++
++# Note: we loop over possibly sparse arrays with _brkpt_max by adding one
++# and testing for an entry. Could add yet another array to list only 
++# used indices. Bash is kind of primitive.
++
++# Breakpoint data structures
++typeset -ai _brkpt_line=()     # Line number of breakpoint
++typeset -a  _brkpt_file=()     # filename of breakpoint
++typeset -a  _brkpt_enable=()   # 1/0 if enabled or not
++typeset -ai _brkpt_count=()    # Number of times hit
++typeset -ai _brkpt_onetime=()  # Is this a onetime break?
++typeset -a  _brkpt_cond=()     # Condition to eval true in order to stop.
++typeset -i  _brkpt_max=0       # Needed because we can't figure out what
++                               # the max index is and arrays can be sparse
++# Note: we loop over possibly sparse arrays with _brkpt_max by adding one
++# and testing for an entry. Could add yet another array to list only 
++# used indices. Bash is kind of primitive.
++
++# Watchpoint data structures
++typeset -a  _Dbg_watch_exp=() # Watchpoint expressions
++typeset -a  _Dbg_watch_val=() # values of watchpoint expressions
++typeset -ai _Dbg_watch_arith=()  # 1 if arithmetic expression or not.
++typeset -ai _Dbg_watch_count=()  # Number of times hit
++typeset -ai _Dbg_watch_enable=() # 1/0 if enabled or not
++typeset -i  _Dbg_watch_max=0     # Needed because we can't figure out what
++                                    # the max index is and arrays can be sparse
++
++typeset -r  _watch_pat="${int_pat}[wW]"
++
++# Display data structures
++typeset -a  _Dbg_disp_exp=() # Watchpoint expressions
++typeset -ai _Dbg_disp_enable=() # 1/0 if enabled or not
++typeset -i  _Dbg_disp_max=0     # Needed because we can't figure out what
++                                    # the max index is and arrays can be sparse
++
++
++#========================= FUNCTIONS   ============================#
++
++_Dbg_save_breakpoints() {
++  local file
++  for file in ${_Dbg_filenames[@]} ; do  
++    local filevar="`_Dbg_file2var $file`"
++    declare -p _brkpt_$filevar >> $_Dbg_statefile 2>/dev/null
++  done        
++  declare -p _brkpt_line >> $_Dbg_statefile
++  declare -p _brkpt_file >> $_Dbg_statefile 
++  declare -p _brkpt_cond >> $_Dbg_statefile 
++  declare -p _brkpt_count >> $_Dbg_statefile 
++  declare -p _brkpt_enable >> $_Dbg_statefile
++  declare -p _brkpt_onetime >> $_Dbg_statefile
++  declare -p _brkpt_max >> $_Dbg_statefile
++
++}
++
++_Dbg_save_actions() {
++  for file in ${_Dbg_filenames[@]} ; do  
++    local filevar="`_Dbg_file2var $file`"
++    declare -p _Dbg_action_$filevar >> $_Dbg_statefile 2>/dev/null
++  done        
++  declare -p _Dbg_action_line >> $_Dbg_statefile
++  declare -p _Dbg_action_file >> $_Dbg_statefile
++  declare -p _Dbg_action_enable >> $_Dbg_statefile
++  declare -p _Dbg_action_stmt >> $_Dbg_statefile
++  declare -p _Dbg_action_max >> $_Dbg_statefile
++}
++
++_Dbg_save_watchpoints() {
++  declare -p _Dbg_watch_exp >> $_Dbg_statefile
++  declare -p _Dbg_watch_val >> $_Dbg_statefile
++  declare -p _Dbg_watch_arith >> $_Dbg_statefile
++  declare -p _Dbg_watch_count >> $_Dbg_statefile
++  declare -p _Dbg_watch_enable >> $_Dbg_statefile
++  declare -p _Dbg_watch_max >> $_Dbg_statefile
++}
++
++_Dbg_save_display() {
++  declare -p _Dbg_disp_exp >> $_Dbg_statefile
++  declare -p _Dbg_disp_enable >> $_Dbg_statefile
++  declare -p _Dbg_disp_max >> $_Dbg_statefile
++}
++
++# Start out with general break/watchpoint functions first...
++
++# Routine to a delete breakpoint/watchpoint by entry numbers.
++_Dbg_cmd_delete() {
++  local -r  to_go=$@
++  local -i  i
++  local -i  found=0
++  
++  # set -xv
++  eval "$_seteglob"
++  for del in $to_go ; do 
++    case $del in
++      $_watch_pat )
++        _Dbg_delete_watch_entry ${del:0:${#del}-1}
++        ;;
++      $int_pat )
++	_Dbg_delete_brkpt_entry $del
++        ((found += $?))
++	;;
++      * )
++	_Dbg_msg "Invalid entry number skipped: $del"
++    esac
++  done
++  eval "$_resteglob"
++  [[ $found != 0 ]] && _Dbg_msg "Removed $found breakpoint(s)."
++  return $found
++  # set +xv
++}
++
++# Enable/disable breakpoint or watchpoint by entry numbers.
++_Dbg_enable_disable() {
++  if [ -z "$1" ] ; then 
++    _Dbg_msg "Expecting a list of breakpoint/watchpoint numbers. Got none."
++    return 1
++  fi
++  local -i on=$1
++  local en_dis=$2
++  shift; shift
++
++  if [[ $1 = 'display' ]] ; then
++    shift
++    local to_go="$@"
++    local i
++    eval "$_seteglob"
++    for i in $to_go ; do 
++      case $i in
++	$int_pat )
++	  _Dbg_enable_disable_display $on $en_dis $i
++	;;
++	* )
++	  _Dbg_msg "Invalid entry number skipped: $i"
++      esac
++    done
++    eval "$_resteglob"
++    return 0
++  elif [[ $1 = 'action' ]] ; then
++    shift
++    local to_go="$@"
++    local i
++    eval "$_seteglob"
++    for i in $to_go ; do 
++      case $i in
++	$int_pat )
++	  _Dbg_enable_disable_action $on $en_dis $i
++	;;
++	* )
++	  _Dbg_msg "Invalid entry number skipped: $i"
++      esac
++    done
++    eval "$_resteglob"
++    return 0
++  fi
++
++  local to_go="$@"
++  local i
++  eval "$_seteglob"
++  for i in $to_go ; do 
++    case $i in
++      $_watch_pat )
++        _Dbg_enable_disable_watch $on $en_dis ${del:0:${#del}-1}
++        ;;
++      $int_pat )
++        _Dbg_enable_disable_brkpt $on $en_dis $i
++	;;
++      * )
++      _Dbg_msg "Invalid entry number skipped: $i"
++    esac
++  done
++  eval "$_resteglob"
++  return 0
++}
++
++_Dbg_cmd_continue() {
++  # set -xv
++  local -r first_arg=$1
++
++  [[ -z "$1" ]] && return 0
++  local -ar word=($(_Dbg_parse_linespec "$first_arg"))
++  if [[ ${#word[@]} == 0 ]] ; then
++    _Dbg_msg "Invalid linespec: $first_arg"
++    return 1
++  fi
++  local filename=${word[1]}
++  local line_number=${word[0]}
++  local full_filename=`_Dbg_is_file $filename`
++  if [[ -n $full_filename ]] ; then 
++    if (( $line_number ==  0 )) ; then 
++      _Dbg_msg "There is no line 0 to continue at."
++    else 
++      _Dbg_check_line $line_number "$full_filename"
++      (( $? == 0 )) && \
++	_Dbg_set_brkpt "$full_filename" "$line_number" 1 1
++      return 0
++    fi
++  else
++    _Dbg_msg "File $filename not found in read-in files."
++    _Dbg_msg "See 'info files' for a list of known files."
++  fi
++  return 1
++}
++
++# Enable breakpoint(s)/watchpoint(s) by entry number(s).
++_Dbg_cmd_enable() {
++  _Dbg_enable_disable 1 "enabled" $@
++}
++
++# Disable breakpoint(s)/watchpoint(s) by entry number(s).
++_Dbg_cmd_disable() {
++  _Dbg_enable_disable 0 "disabled" $@
++}
++
++_Dbg_print_brkpt_count() {
++  local -ir i=$1
++  if (( _brkpt_count[$i] != 0 )) ; then
++    if (( _brkpt_count[$i] == 1 )) ; then 
++      _Dbg_printf "\tbreakpoint already hit 1 time" 
++    else
++      _Dbg_printf "\tbreakpoint already hit %d times" ${_brkpt_count[$i]}
++    fi
++  fi
++}
++
++#======================== BREAKPOINTS  ============================#
++
++# Add breakpoint(s) at given line number of the current file.  $1 is
++# the line number or _curline if omitted.  $2 is a condition to test
++# for whether to stop.
++
++_Dbg_cmd_break() {
++  
++  local -i is_temp=$1;
++  shift
++
++  local n=${1:-$_curline}
++  shift
++
++  if [[ "$n" == 'if' ]]; then
++    n=$_curline
++  else
++    [[ "$1" == 'if' ]] && shift
++  fi
++  local condition;
++  if [ -z "$1" ] ; then
++    condition=1
++  else 
++    condition="$*"
++  fi
++
++  local -ar word=($(_Dbg_parse_linespec "$n"))
++  if [[ ${#word[@]} == 0 ]] ; then
++    _Dbg_msg "Invalid linespec $n"
++    return
++  fi
++
++  local filename=${word[1]}
++  local line_number=${word[0]}
++  local full_filename=`_Dbg_is_file $filename`
++  if [[ -n $full_filename ]] ; then 
++    if (( $line_number ==  0 )) ; then 
++      _Dbg_msg "There is no line 0 to break at."
++    else 
++      _Dbg_check_line $line_number "$full_filename"
++      (( $? == 0 )) && \
++	_Dbg_set_brkpt "$full_filename" "$line_number" $is_temp "$condition" 
++    fi
++  else
++    filename=$(_Dbg_adjust_filename "$filename")
++    _Dbg_msg "File $filename not found in read-in files." 
++    _Dbg_msg "See 'info files' for a list of known files."
++  fi
++}
++
++# Set a condition for a given breakpoint $1 is a breakpoint number
++# $2 is a condition. If not given, set "unconditional" or 1.
++# returns 0 if success or 1 if fail.
++_Dbg_cmd_condition() {
++  # set -x
++  local -r n=$1
++  shift 
++  local condition="$@"
++  # set -xv
++
++  if [[ -z $n ]]; then
++    _Dbg_msg "Argument required (breakpoint number)."
++    return 1
++  fi
++
++  eval "$_seteglob"
++  if [[ $n != $int_pat ]]; then
++    eval "$_resteglob"
++    _Dbg_msg "Bad breakpoint number: $n"
++    return 1
++  fi
++  eval "$_resteglob"
++
++  if [[ -z ${_brkpt_file[$n]} ]] ; then
++    _Dbg_msg "Breakpoint entry $n is not set. Condition not changed."
++    return 1
++  fi
++  
++  if [[ -z $condition ]] ; then
++    condition=1
++    _Dbg_msg "Breakpoint $n now unconditional."
++  fi
++  _brkpt_cond[$n]="$condition"
++  return 0
++}
++
++# delete brkpt(s) at given file:line numbers. If no file is given
++# use the current file.
++_Dbg_cmd_clear_brkpt() {
++  # set -x
++  local -r n=${1:-$_curline}
++
++  local -ar word=($(_Dbg_parse_linespec "$n"))
++  if [[ ${#word[@]} == 0 ]] ; then
++    _Dbg_msg "Invalid linespec $n"
++    return
++  fi
++  
++  local filename=${word[1]}
++  local line_number=${word[0]}
++  local full_filename=`_Dbg_is_file $filename`
++  if [[ -n $full_filename ]] ; then 
++    if (( $line_number ==  0 )) ; then 
++      _Dbg_msg "There is no line 0 to clear."
++    else 
++      _Dbg_check_line $line_number "$full_filename"
++      if (( $? == 0 )) ; then
++	_Dbg_unset_brkpt "$full_filename" "$line_number"
++	local -r found=$?
++	if [[ $found != 0 ]] ; then 
++	  _Dbg_msg "Removed $found breakpoint(s)."
++	else 
++	  _Dbg_msg "Didn't find any breakpoints to remove at $n."
++	fi
++      fi
++    fi
++  else
++    filename=$(_Dbg_adjust_filename "$filename")
++    _Dbg_msg "File $filename not found in read-in files." 
++    _Dbg_msg "See 'info files' for a list of known files."
++  fi
++}
++
++# list breakpoints and break condition.
++# If $1 is given just list those associated for that line.
++_Dbg_cmd_list_brkpt() {
++
++  eval "$_seteglob"
++  if [[ -n $1 ]] ; then 
++    if [[ $1 != $int_pat ]]; then
++      _Dbg_msg "Bad breakpoint number $1."
++    elif [[ -z ${_brkpt_file[$1]} ]] ; then
++      _Dbg_msg "Breakpoint entry $1 is not set."
++    else
++      local -r -i i=$1
++      local source_file=${_brkpt_file[$i]}
++      source_file=$(_Dbg_adjust_filename "$source_file")
++      _Dbg_msg "Num Type       Disp Enb What"
++      _Dbg_printf "%-3d breakpoint %-4s %-3s %s:%s" $i \
++	${_Dbg_keep[${_brkpt_onetime[$i]}]} \
++	${_Dbg_yn[${_brkpt_enable[$i]}]} \
++	$source_file ${_brkpt_line[$i]}
++      if [[ ${_brkpt_cond[$i]} != '1' ]] ; then
++	_Dbg_printf "\tstop only if %s" "${_brkpt_cond[$i]}"
++      fi
++      _Dbg_print_brkpt_count ${_brkpt_count[$i]}
++    fi
++    eval "$_resteglob"
++    return
++  fi
++
++  if [ ${#_brkpt_line[@]} != 0 ]; then
++    local -i i
++
++    _Dbg_msg "Num Type       Disp Enb What"
++    for (( i=1; (( i <= _brkpt_max )) ; i++ )) ; do
++      local source_file=${_brkpt_file[$i]}
++      if [[ -n ${_brkpt_line[$i]} ]] ; then
++	source_file=$(_Dbg_adjust_filename "$source_file")
++	_Dbg_printf "%-3d breakpoint %-4s %-3s %s:%s" $i \
++	  ${_Dbg_keep[${_brkpt_onetime[$i]}]} \
++	  ${_Dbg_yn[${_brkpt_enable[$i]}]} \
++	  $source_file ${_brkpt_line[$i]}
++	if [[ ${_brkpt_cond[$i]} != '1' ]] ; then
++	  _Dbg_printf "\tstop only if %s" "${_brkpt_cond[$i]}"
++	fi
++	if (( _brkpt_count[$i] != 0 )) ; then
++	  _Dbg_print_brkpt_count ${_brkpt_count[$i]}
++	fi
++      fi
++    done
++  else
++    _Dbg_msg "No breakpoints have been set."
++  fi
++}
++
++# clear all brkpts
++_Dbg_clear_all_brkpt() {
++
++  local -i k
++  for (( k=0; (( k < ${#_Dbg_filenames[@]} )) ; k++ )) ; do
++    local filename=${_filename[$k]}
++    local filevar="`_Dbg_file2var $filename`"
++    local brkpt_a="_brkpt_${filevar}"
++    _Dbg_write_journal_eval "unset ${brkpt_a}[$k]"
++  done
++  _Dbg_write_journal_eval "_brkpt_line=()"
++  _Dbg_write_journal_eval "_brkpt_cond=()"
++  _Dbg_write_journal_eval "_brkpt_file=()"
++  _Dbg_write_journal_eval "_brkpt_enable=()"
++  _Dbg_write_journal_eval "_brkpt_count=()"
++  _Dbg_write_journal_eval "_brkpt_onetime=()"
++}
++
++# Internal routine to a set breakpoint unconditonally. 
++
++_Dbg_set_brkpt() {
++  local source_file=$1
++  local -ir line=$2
++  local -ir is_temp=$3
++  local -r condition=${4:-1}
++  local -r filevar="`_Dbg_file2var $source_file`"
++
++  local val_str=`_Dbg_get_assoc_array_entry "_brkpt_$filevar" $line`
++
++  # Increment brkpt_max here because we are 1-origin
++  ((_brkpt_max++))
++
++  if [ -z "$val_str" ] ; then 
++    val_str=$_brkpt_max
++  else
++    val_str="$val_str $_brkpt_max"
++  fi
++
++  _brkpt_line[$_brkpt_max]=$line
++  _brkpt_file[$_brkpt_max]="$source_file"
++  _brkpt_cond[$_brkpt_max]="$condition"
++  _brkpt_onetime[$_brkpt_max]=$is_temp
++  _brkpt_count[$_brkpt_max]=0
++  _brkpt_enable[$_brkpt_max]=1
++
++  local dq_source_file=$(_Dbg_esc_dq "$source_file")
++  local dq_condition=$(_Dbg_esc_dq "$condition")
++  _Dbg_write_journal "_brkpt_line[$_brkpt_max]=$line"
++  _Dbg_write_journal "_brkpt_file[$_brkpt_max]=\"$dq_source_file\""
++  _Dbg_write_journal "_brkpt_cond[$_brkpt_max]=\"$dq_condition\""
++  _Dbg_write_journal "_brkpt_onetime[$_brkpt_max]=$is_temp"
++  _Dbg_write_journal "_brkpt_count[$_brkpt_max]=\"0\""
++  _Dbg_write_journal "_brkpt_enable[$_brkpt_max]=1"
++
++  _Dbg_set_assoc_array_entry "_brkpt_$filevar" $line $val_str
++  source_file=$(_Dbg_adjust_filename "$source_file")
++  if (( $is_temp == 0 )) ; then 
++    _Dbg_msg "Breakpoint $_brkpt_max set in file ${source_file}, line $line."
++  else 
++    _Dbg_msg "One-time breakpoint $_brkpt_max set in file ${source_file}, line $line."
++  fi
++  _Dbg_write_journal "_brkpt_max=$_brkpt_max"
++}
++
++# Internal routine to unset the actual breakpoint arrays
++_Dbg_unset_brkpt_arrays() {
++  local -i del=$1
++  _Dbg_write_journal_eval "unset _brkpt_line[$del]"
++  _Dbg_write_journal_eval "unset _brkpt_count[$del]"
++  _Dbg_write_journal_eval "unset _brkpt_file[$del]"
++  _Dbg_write_journal_eval "unset _brkpt_enable[$del]"
++  _Dbg_write_journal_eval "unset _brkpt_cond[$del]"
++  _Dbg_write_journal_eval "unset _brkpt_onetime[$del]"
++}
++
++# Internal routine to delete a breakpoint by file/line.
++_Dbg_unset_brkpt() {
++  local -r  filename=$1
++  local -ir line=$2
++  local -r filevar="`_Dbg_file2var $filename`"
++  local -r fullname="`_Dbg_expand_filename $filename`"
++  local -i found=0
++  
++  # set -xv
++  local -r entries=`_Dbg_get_assoc_array_entry "_brkpt_$filevar" $line`
++  local -i del
++  for del in $entries ; do 
++    if [[ -z ${_brkpt_file[$del]} ]] ; then
++      _Dbg_msg "No breakpoint found at $filename:$line"
++      continue
++    fi
++    local brkpt_fullname=$(_Dbg_expand_filename ${_brkpt_file[$del]})
++    if [[ $brkpt_fullname != $fullname ]] ; then 
++      _Dbg_msg "Brkpt inconsistency:" \
++	"$filename[$line] lists ${_brkpt_file[$del]} at entry $del"
++    else
++      _Dbg_unset_brkpt_arrays $del
++      ((found++))
++    fi
++  done
++  _Dbg_write_journal_eval "unset _brkpt_$filevar[$line]"
++  return $found
++  # set +xv
++}
++
++# Routine to a delete breakpoint by entry number: $1.
++# Returns whether or not anything was deleted.
++_Dbg_delete_brkpt_entry() {
++  local -r  del=$1
++  local -i  i
++  local -i  found=0
++  
++  # set -xv
++  if [[ -z ${_brkpt_file[$del]} ]] ; then
++    _Dbg_msg "Breakpoint entry $del is not set."
++    return 0
++  fi
++  local filevar="`_Dbg_file2var ${_brkpt_file[$del]}`"
++  local line=${_brkpt_line[$del]}
++  local -r  entries=`_Dbg_get_assoc_array_entry "_brkpt_$filevar" $line`
++  local     try 
++  local -a  new_val=()
++  for try in $entries ; do 
++    if (( $try == $del )) ; then
++      _Dbg_unset_brkpt_arrays $del
++      found=1
++    else
++      if [[ -n ${_brkpt_file[$try]} ]] ; then
++	new_val[${#new_val[@]}]=$try
++      fi
++    fi
++  done
++  if [[ ${#new_val[@]} == 0 ]] ; then 
++   _Dbg_write_journal_eval "unset _brkpt_$filevar[$line]"
++  else
++    _Dbg_set_assoc_array_entry "_brkpt_$filevar" $line "${new_val[@]}"
++  fi
++
++  return $found
++  # set +xv
++}
++
++# Enable/disable breakpoint(s) by entry numbers.
++_Dbg_enable_disable_brkpt() {
++  local -i on=$1
++  local en_dis=$2
++  local -i i=$3
++  if [[ -n "${_brkpt_file[$i]}" ]] ; then
++    if [[ ${_brkpt_enable[$i]} == $on ]] ; then
++      _Dbg_msg "Breakpoint entry $i already $en_dis so nothing done."
++    else
++      _Dbg_write_journal_eval "_brkpt_enable[$i]=$on"
++      _Dbg_msg "Breakpoint entry $i $en_dis."
++    fi
++  else
++    _Dbg_msg "Breakpoint entry $i doesn't exist so nothing done."
++  fi
++}
++
++#======================== WATCHPOINTS  ============================#
++
++_Dbg_get_watch_exp_eval() {
++  local -i i=$1
++  local new_val
++
++  if [[ `eval echo \"${_Dbg_watch_exp[$i]}\"` == "" ]]; then
++    new_val=''
++  elif (( ${_Dbg_watch_arith[$i]} == 1 )) ; then
++    . ${_Dbg_libdir}/dbg-set-d-vars.inc 
++    eval let new_val=\"${_Dbg_watch_exp[$i]}\"
++  else
++    . ${_Dbg_libdir}/dbg-set-d-vars.inc 
++    eval new_val="${_Dbg_watch_exp[$i]}"
++  fi
++  echo $new_val
++}
++
++# Enable/disable watchpoint(s) by entry numbers.
++_Dbg_enable_disable_watch() {
++  local -i on=$1
++  local en_dis=$2
++  local -i i=$3
++  if [ -n "${_Dbg_watch_exp[$i]}" ] ; then
++    if [[ ${_Dbg_watch_enable[$i]} == $on ]] ; then
++      _Dbg_msg "Watchpoint entry $i already $en_dis so nothing done."
++    else
++      _Dbg_write_journal_eval "_Dbg_watch_enable[$i]=$on"
++      _Dbg_msg "Watchpoint entry $i $en_dis."
++    fi
++  else
++    _Dbg_msg "Watchpoint entry $i doesn't exist so nothing done."
++  fi
++}
++
++_Dbg_list_watch() {
++  if [ ${#_Dbg_watch_exp[@]} != 0 ]; then
++    local i=0 j
++    _Dbg_msg "Watch expressions:"
++    for (( i=0; (( i < _Dbg_watch_max )); i++ )) ; do
++      if [ -n "${_Dbg_watch_exp[$i]}" ] ;then
++	_Dbg_printf '%-3d watchpoint %-4s %s' $i \
++	  ${_Dbg_yn[${_Dbg_watch_enable[$i]}]} \
++          "${_Dbg_watch_exp[$i]}"
++	_Dbg_print_brkpt_count ${_Dbg_watch_count[$i]}
++      fi
++    done
++  else
++    _Dbg_msg "No watch expressions have been set."
++  fi
++}
++
++_Dbg_delete_watch_entry() {
++  local -i del=$1
++
++  if [ -n "${_Dbg_watch_exp[$del]}" ] ; then
++    _Dbg_write_journal_eval "unset _Dbg_watch_exp[$del]"
++    _Dbg_write_journal_eval "unset _Dbg_watch_val[$del]"
++    _Dbg_write_journal_eval "unset _Dbg_watch_enable[$del]"
++    _Dbg_write_journal_eval "unset _Dbg_watch_count[$del]"
++  else
++    _Dbg_msg "Watchpoint entry $del doesn't exist so nothing done."
++  fi
++}
++
++_Dbg_clear_watch() {
++  if (( $# < 1 )) ; then
++    local _Dbg_prompt_output=${_Dbg_tty:-/dev/null}
++    read $_Dbg_edit -p "Delete all watchpoints? (y/n): " \
++      <&$_Dbg_input_desc 2>>$_Dbg_prompt_output
++
++    if [[ $REPLY = [Yy]* ]] ; then 
++      _Dbg_write_journal_eval unset _Dbg_watch_exp[@]
++      _Dbg_write_journal_eval unset _Dbg_watch_val[@]
++      _Dbg_write_journal_eval unset _Dbg_watch_enable[@]
++      _Dbg_write_journal_eval unset _Dbg_watch_count[@]
++      _Dbg_msg "All Watchpoints have been cleared"
++    fi
++    return 0
++  fi
++  
++  eval "$_seteglob"
++  if [[ $1 == $int_pat ]]; then
++    _Dbg_write_journal_eval "unset _Dbg_watch_exp[$1]"
++    _msg "Watchpoint $i has been cleared"
++  else
++    _Dbg_list_watch
++    _basdhb_msg "Please specify a numeric watchpoint number"
++  fi
++  
++  eval "$_resteglob"
++}   
++
++# Set or list watch command
++_Dbg_cmd_watch() {
++  if [ -z "$2" ]; then
++    _Dbg_clear_watch 
++  else 
++    local -i n=_Dbg_watch_max++
++    _Dbg_watch_arith[$n]="$1"
++    shift
++    _Dbg_watch_exp[$n]="$1"
++    _Dbg_watch_val[$n]=`_Dbg_get_watch_exp_eval $n`
++    _Dbg_watch_enable[$n]=1
++    _Dbg_watch_count[$n]=0
++    _Dbg_printf '%2d: %s==%s arith: %d' $n \
++      "(${_Dbg_watch_exp[$n]})" ${_Dbg_watch_val[$n]} \
++    ${_Dbg_watch_arith[$n]}
++  fi
++}
++
++#======================== ACTIONs  ============================#
++
++# Add actions(s) at given line number of the current file.  $1 is
++# the line number or _curline if omitted.  $2 is a condition to test
++# for whether to stop.
++
++_Dbg_cmd_action() {
++  
++  local n=${1:-$_curline}
++  shift
++
++  local stmt;
++  if [ -z "$1" ] ; then
++    condition=1
++  else 
++    condition="$*"
++  fi
++
++  local -ar word=($(_Dbg_parse_linespec "$n"))
++  if [[ ${#word[@]} == 0 ]] ; then
++    _Dbg_msg "Invalid linespec $n"
++    return
++  fi
++
++  local filename=${word[1]}
++  local line_number=${word[0]}
++  local full_filename=`_Dbg_is_file $filename`
++  if [[ -n $full_filename ]] ; then 
++    if (( $line_number ==  0 )) ; then 
++      _Dbg_msg "There is no line 0 to set action at."
++    else 
++      _Dbg_check_line $line_number "$full_filename"
++      (( $? == 0 )) && \
++	_Dbg_set_action "$full_filename" "$line_number" $is_temp "$condition" 
++    fi
++  else
++    filename=$(_Dbg_adjust_filename "$filename")
++    _Dbg_msg "File $filename not found in read-in files." 
++    _Dbg_msg "See 'info files' for a list of known files."
++  fi
++}
++
++# clear all actions
++_Dbg_cmd_clear_all_actions() {
++
++  local _Dbg_prompt_output=${_Dbg_tty:-/dev/null}
++  read $_Dbg_edit -p "Delete all actions? (y/n): " \
++    <&$_Dbg_input_desc 2>>$_Dbg_prompt_output
++
++  if [[ $REPLY != [Yy]* ]] ; then 
++    return 1
++  fi
++  local -i k
++  for (( k=0; (( k < ${#_Dbg_filenames[@]} )) ; k++ )) ; do
++    local filename=${_filename[$k]}
++    local filevar="`_Dbg_file2var $filename`"
++    local action_a="_Dbg_action_${filevar}"
++    unset ${action_a}[$k]
++  done
++  _Dbg_write_journal_eval "_Dbg_action_line=()"
++  _Dbg_write_journal_eval "_Dbg_action_stmt=()"
++  _Dbg_write_journal_eval "_Dbg_action_file=()"
++  _Dbg_write_journal_eval "_Dbg_action_enable=()"
++  return 0
++}
++
++# delete actions(s) at given file:line numbers. If no file is given
++# use the current file.
++_Dbg_cmd_clear_action() {
++  # set -x
++  local -r n=${1:-$_curline}
++
++  local -ar word=($(_Dbg_parse_linespec "$n"))
++  if [[ ${#word[@]} == 0 ]] ; then
++    _Dbg_msg "Invalid linespec $n"
++    return
++  fi
++  
++  local filename=${word[1]}
++  local line_number=${word[0]}
++  local full_filename=`_Dbg_is_file $filename`
++  if [[ -n $full_filename ]] ; then 
++    if (( $line_number ==  0 )) ; then 
++      _Dbg_msg "There is no line 0 to clear action at."
++    else 
++      _Dbg_check_line $line_number "$full_filename"
++      (( $? == 0 )) && \
++	_Dbg_unset_action "$full_filename" "$line_number"
++      local -r found=$?
++      if [[ $found != 0 ]] ; then 
++	_Dbg_msg "Removed $found action(s)."
++      else 
++	_Dbg_msg "Didn't find any actions to remove at $n."
++      fi
++    fi
++  else
++    filename=$(_Dbg_adjust_filename "$filename")
++    _Dbg_msg "File $filename not found in read-in files." 
++    _Dbg_msg "See 'info files' for a list of known files."
++  fi
++}
++
++# list actions
++_Dbg_list_action() {
++
++  if [ ${#_Dbg_action_line[@]} != 0 ]; then
++    _Dbg_msg "Actions at following places:"
++    local -i i
++
++    _Dbg_msg "Num Enb Stmt               file:line"
++    for (( i=0; (( i < _Dbg_action_max )) ; i++ )) ; do
++      if [[ -n ${_Dbg_action_line[$i]} ]] ; then
++	local source_file=${_Dbg_action_file[$i]}
++	source_file=$(_Dbg_adjust_filename "$source_file")
++	_Dbg_printf "%-3d %3d %-18s %s:%s" $i ${_Dbg_action_enable[$i]} \
++	  "${_Dbg_action_stmt[$i]}" \
++	  $source_file ${_Dbg_action_line[$i]}
++      fi
++    done
++  else
++    _Dbg_msg "No actions have been set."
++  fi
++}
++
++# Internal routine to a set breakpoint unconditonally. 
++
++_Dbg_set_action() {
++  local source_file=$1
++  local -ir line=$2
++  local -r stmt=${3:-1}
++  local -r filevar="`_Dbg_file2var $source_file`"
++
++  local val_str=`_Dbg_get_assoc_array_entry "_Dbg_action_$filevar" $line`
++  if [ -z "$val_str" ] ; then 
++    val_str=$_Dbg_action_max
++  else
++    val_str="$val_str $_Dbg_action_max"
++  fi
++
++  _Dbg_action_line[$_Dbg_action_max]=$line
++  _Dbg_action_file[$_Dbg_action_max]="$source_file"
++  _Dbg_action_stmt[$_Dbg_action_max]="$stmt"
++  _Dbg_action_enable[$_Dbg_action_max]=1
++
++  local dq_source_file=$(_Dbg_esc_dq "$source_file")
++  local dq_stmt=$(_Dbg_esc_dq "stmt")
++
++  _Dbg_write_journal "_Dbg_action_line[$_Dbg_action_max]=$line"
++  _Dbg_write_journal "_Dbg_action_file[$_Dbg_action_max]=\"$dq_source_file\""
++  _Dbg_write_journal "_Dbg_action_stmt[$_Dbg_action_max]=\"$dq_stmt\""
++  _Dbg_write_journal "_Dbg_action_enable[$_Dbg_action_max]=1"
++
++  _Dbg_set_assoc_array_entry "_Dbg_action_$filevar" $line $val_str
++  source_file=$(_Dbg_adjust_filename "$source_file")
++  _Dbg_msg "Breakpoint $_Dbg_action_max set at ${source_file}:$line."
++  ((_Dbg_action_max++))
++  _Dbg_write_journal "_Dbg_action_max=$_Dbg_action_max"
++}
++
++# Internal routine to delete a breakpoint by file/line.
++_Dbg_unset_action() {
++  local -r  filename=$1
++  local -ir line=$2
++  local -r filevar="`_Dbg_file2var $filename`"
++  local -i found=0
++  
++  # set -xv
++  local -r entries=`_Dbg_get_assoc_array_entry "_Dbg_action_$filevar" $line`
++  local -i del
++  for del in $entries ; do 
++    if [[ -z ${_Dbg_action_file[$del]} ]] ; then
++      _Dbg_msg "No action found at $filename:$line"
++      continue
++    fi
++    if [[ ${_Dbg_action_file[$del]} != $filename ]] ; then 
++      _Dbg_msg "action inconsistency:" \
++	"$filename[$line] lists ${_Dbg_action_file[$del]} at entry $del"
++    else
++      _Dbg_write_journal_eval "unset _Dbg_action_line[$del]"
++      _Dbg_write_journal_eval "unset _Dbg_action_stmt[$del]"
++      _Dbg_write_journal_eval "unset _Dbg_action_file[$del]"
++      _Dbg_write_journal_eval "unset _Dbg_action_enable[$del]"
++      ((found++))
++    fi
++  done
++  _Dbg_write_journal_eval unset _Dbg_action_$filevar[$line]
++  return $found
++  # set +xv
++}
++
++# Routine to a delete breakpoint/watchpoint by entry numbers.
++_Dbg_cmd_action_delete() {
++  local -r  to_go=$@
++  local -i  i
++  local -i  found=0
++  
++  # set -xv
++  eval "$_seteglob"
++  for del in $to_go ; do 
++    case $del in
++      $int_pat )
++	_Dbg_delete_action_entry $del
++        ((found += $?))
++	;;
++      * )
++	_Dbg_msg "Invalid entry number skipped: $del"
++    esac
++  done
++  eval "$_resteglob"
++  [[ $found != 0 ]] && _Dbg_msg "Removed $found action(s)."
++  return $found
++  # set +xv
++}
++
++#======================== DISPLAYs  ============================#
++
++# Enable/disable display by entry numbers.
++_Dbg_disp_enable_disable() {
++  if [ -z "$1" ] ; then 
++    _Dbg_msg "Expecting a list of display numbers. Got none."
++    return 1
++  fi
++  local -i on=$1
++  local en_dis=$2
++  shift; shift
++
++  local to_go="$@"
++  local i
++  eval "$_seteglob"
++  for i in $to_go ; do 
++    case $i in
++      $int_pat )
++        _Dbg_enable_disable_display $on $en_dis $i
++	;;
++      * )
++      _Dbg_msg "Invalid entry number skipped: $i"
++    esac
++  done
++  eval "$_resteglob"
++  return 0
++}
++
++_Dbg_eval_all_display() {
++  local -i i
++  for (( i=0; i < _Dbg_disp_max ; i++ )) ; do
++    if [ -n "${_Dbg_disp_exp[$i]}" ] \
++      && [[ ${_Dbg_disp_enable[i]} != 0 ]] ; then
++      _Dbg_printf_nocr "%2d (%s): " $i "${_Dbg_disp_exp[i]}"
++      _Dbg_cmd_eval "${_Dbg_disp_exp[i]}"
++    fi
++  done
++}  
++
++# Set display command or list all current display expressions
++_Dbg_cmd_display() {
++  if [[ -z "$@" ]]; then
++    _Dbg_eval_all_display
++  else 
++    local -i n=_Dbg_disp_max++
++    _Dbg_disp_exp[$n]="$@"
++    _Dbg_disp_enable[$n]=1
++    _Dbg_printf '%2d: %s' $n "${_Dbg_disp_exp[$n]}"
++  fi
++}
++
++# List display command(s)
++_Dbg_cmd_list_display() {
++  if [ ${#_Dbg_disp_exp[@]} != 0 ]; then
++    local i=0 j
++    _Dbg_msg "Display expressions:"
++    _Dbg_msg "Num Enb Expression          "
++    for (( i=0; (( i < _Dbg_disp_max )); i++ )) ; do
++      if [ -n "${_Dbg_disp_exp[$i]}" ] ;then
++	_Dbg_printf '%-3d %3d %s' \
++	  $i ${_Dbg_disp_enable[$i]} "${_Dbg_disp_exp[$i]}"
++      fi
++    done
++  else
++    _Dbg_msg "No display expressions have been set."
++  fi
++}
++
++# Enable/disable display(s) by entry numbers.
++_Dbg_enable_disable_display() {
++  local -i on=$1
++  local en_dis=$2
++  local -i i=$3
++  if [ -n "${_Dbg_disp_exp[$i]}" ] ; then
++    if [[ ${_Dbg_disp_enable[$i]} == $on ]] ; then
++      _Dbg_msg "Display entry $i already $en_dis so nothing done."
++    else
++      _Dbg_write_journal_eval "_Dbg_disp_enable[$i]=$on"
++      _Dbg_msg "Display entry $i $en_dis."
++    fi
++  else
++    _Dbg_msg "Display entry $i doesn't exist so nothing done."
++  fi
++}
++
++_Dbg_cmd_undisplay() {
++  local -i del=$1
++
++  if [ -n "${_Dbg_disp_exp[$del]}" ] ; then
++    _Dbg_write_journal_eval "unset _Dbg_disp_exp[$del]"
++    _Dbg_write_journal_eval "unset _Dbg_disp_enable[$del]"
++  else
++    _Dbg_msg "Display entry $del doesn't exist so nothing done."
++  fi
++}
++
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-cmds.inc cvs/debugger/dbg-cmds.inc
+--- bash-2.05b/debugger/dbg-cmds.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-cmds.inc	2003-08-06 16:21:55.000000000 +0200
+@@ -0,0 +1,848 @@
++# dbg-cmds.inc - Bourne Again Shell Debugger Top-level debugger commands
++#
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# Debugger command loop: Come here at to read debugger commands to
++# run.
++
++# Main-line debugger read/execute command loop
++
++# ==================== VARIABLES =======================================
++# input_start_descriptor is the lowest descriptor we use for reading.
++# input_desc is the current descriptor in use. "sourc"ing other
++# command files will increase this descriptor
++
++typeset -ir _Dbg_input_start_desc=9
++typeset -i  _Dbg_input_desc=_Dbg_input_start_desc-1 # will ++ before use
++
++# Are we inside the middle of a "skip" command?
++typeset -i  _Dbg_inside_skip=0
++
++# A variable holding a space is set so it can be used in a "set prompt" command
++# ("read" in the main command loop will remove a trailing space so we need
++# another way to allow a user to enter spaces in the prompt.)
++
++typeset _Dbg_space=' '
++
++# Should we allow editing of debugger commands? 
++# The value should either be '-e' or ''
++typeset _Dbg_edit='-e'
++
++# What do we use for a debugger prompt? Technically we don't need to
++# use the above $bashdb_space in the assignment below, but we put it
++# in to suggest to a user that this is how one gets a spaces into the
++# prompt.
++
++typeset _Dbg_prompt_str='bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space'
++
++# The arguments in the last "print" command.
++typeset _Dbg_last_print_args=''
++
++# The arguments in the last "x" command.
++typeset _Dbg_last_x_args=''
++
++# ===================== FUNCTIONS =======================================
++
++# Note: We have to be careful here in naming "local" variables. In contrast
++# to other places in the debugger, because of the read/eval loop, they are
++# in fact seen by those using the debugger. So in contrast to other "local"s
++# in the debugger, we prefer to preface these with _Dbg_.
++_Dbg_cmdloop() {
++
++  # THIS SHOULD BE DONE IN dbg-sig.inc, but there's a bug in BASH in 
++  # trying to change "trap RETURN" inside a "trap RETURN" handler....
++  # Turn off return trapping. Not strictly necessary, since it *should* be 
++  # covered by the _Dbg_ test below if we've named functions correctly.
++  # However turning off the RETURN trap should reduce unnecessary calls.
++  # trap RETURN  
++
++  _Dbg_inside_skip=0
++
++  # Evaluate all the display expressions
++  _Dbg_eval_all_display
++
++  # Loop over all pending open input file descriptors
++  while (( $_Dbg_input_desc >= $_Dbg_input_start_desc )) ; do
++    local _Dbg_cmd;
++    local _Dbg_args;
++
++    # Set up prompt to show shell level.
++    local _Dbg_greater=''
++    local _Dbg_less=''
++    local -i _Dbg_i=0
++    for (( _Dbg_i=0 ; _Dbg_i < BASHDB_LEVEL ; _Dbg_i++ )) ; do
++      _Dbg_greater=">$_Dbg_greater"
++      _Dbg_less="<$_Dbg_less"
++    done
++
++    for (( _Dbg_i=0 ; _Dbg_i < BASH_SUBSHELL ; _Dbg_i++ )) ; do
++      _Dbg_greater=")$_Dbg_greater"
++      _Dbg_less="$_Dbg_less("
++    done
++
++    # Loop over debugger commands. But before reading a debugger
++    # command, we need to make sure IFS is set to spaces to ensure our
++    # two variables (command name and rest of the arguments) are set
++    # correctly.  Saving the IFS and setting it to the "normal" value
++    # of space should be done in the DEBUG signal handler entry.
++
++    # Also, we need to make sure the prompt output is
++    # redirected to the debugger terminal.  Both of these things may
++    # have been changed by the debugged program for its own
++    # purposes. Furthermore, were we *not* to redirect our stderr
++    # below, we may mess up what the debugged program expects to see
++    # in in stderr by adding our debugger prompt.
++
++    # if no tty, no prompt
++    local _Dbg_prompt_output=${_Dbg_tty:-/dev/null}
++
++    eval "local _Dbg_prompt=$_Dbg_prompt_str"
++    while read $_Dbg_edit -p "$_Dbg_prompt" \
++      _Dbg_cmd _Dbg_args \
++      <&$_Dbg_input_desc 2>>$_Dbg_prompt_output; do
++
++     # Set default next, step or skip command
++     if [[ -z $_Dbg_cmd ]]; then
++	_Dbg_cmd=$_Dbg_last_next_step_cmd
++	_Dbg_args=$_Dbg_last_next_step_args
++      fi
++
++     local dq_cmd=$(_Dbg_esc_dq "$_Dbg_cmd")
++     local dq_args=$(_Dbg_esc_dq "$_Dbg_args")
++     # _Dbg_write_journal_eval doesn't work here. Don't really understand
++     # how to get it to work. So we do this in two steps.
++     _Dbg_write_journal \
++        "_Dbg_history[${#_Dbg_history[@]}]=\"$dq_cmd $dq_args\""
++     _Dbg_history[${#_Dbg_history[@]}]="$_Dbg_cmd $_Dbg_args"
++
++     _Dbg_hi=${#_Dbg_history[@]}
++
++      local -i _Dbg_redo=1
++      while (( $_Dbg_redo )) ; do
++
++	_Dbg_redo=0
++
++      case $_Dbg_cmd in
++
++	# Comment line
++	[#]* ) 
++	  _Dbg_remove_history_item
++	  ;;
++
++	# List window up to _curline
++	- )
++	  local -i start_line=(_curline+1-$_Dbg_listsize)
++	  local -i count=($_Dbg_listsize)
++	  if (( start_line <= 0 )) ; then
++	    ((count=count+start_line-1))
++	    start_line=1;
++	  fi
++	  _Dbg_list $_cur_source_file $start_line $count
++	  ;;
++
++	# list current line
++	. )
++	  _Dbg_list $_cur_source_file $_curline 1
++	  ;;
++
++	# Search forwards for pattern
++	/* )
++	  _Dbg_cmd_search $_Dbg_cmd
++	  ;;
++
++	# Search backwards for pattern
++	[?]* )
++	  _Dbg_cmd_search_back $_Dbg_cmd
++	  ;;
++
++	# Set action to be silently run when a line is hit
++	a )
++	  _Dbg_cmd_action $_Dbg_args ;;
++
++	# Set breakpoint on a line
++	b | br | bre | brea | break )
++	  _Dbg_cmd_break 0 $_Dbg_args ;;
++
++	# Continue
++	c | cont | conti |contin |continu | continue )
++	  _Dbg_cmd_continue $_Dbg_args
++	  if [[ $? == 0 ]] ; then
++	    IFS="$_Dbg_old_IFS";
++	    _Dbg_write_journal_eval \
++	      "_Dbg_old_set_opts=\"$_Dbg_old_set_opts -o fntrace\""
++	    return 0
++	  fi
++	  ;;
++
++	# Breakpoint/Watchpoint Conditions
++	cond | condi |condit |conditi | conditio | condition )
++	  _Dbg_cmd_condition $_Dbg_args
++	  ;;
++
++	# Delete all breakpoints by line number.
++	# Note we use "d" as an alias for "clear" to be compatible
++	# with the Perl5 debugger.
++	d | cl | cle | clea | clea | clear )
++	  _Dbg_cmd_clear_brkpt $_Dbg_args
++	  ;;
++
++	# Delete breakpoints by entry numbers. Note "d" is an alias for
++	# clear.
++	de | del | dele | delet | delete )
++	  _Dbg_cmd_delete $_Dbg_args
++	  ;;
++
++	# Set up a script for debugging into.
++	deb | debu | debug )
++	  _Dbg_cmd_debug $_Dbg_args
++	  # Skip over the execute statement which presumably we ran above.
++	  _Dbg_cmd_next_step_skip "skip" 1
++	  IFS="$_Dbg_old_IFS";
++	  return 1
++	  ;;
++
++	# Disable breakpoints
++	di | dis | disa | disab | disabl | disable )
++	  _Dbg_cmd_disable $_Dbg_args
++	  ;;
++
++	# Display expression
++	disp | displ | displa| display )
++	  _Dbg_cmd_display $_Dbg_args
++	  ;;
++
++	# Delete all breakpoints.
++	D | deletea | deleteal | deleteall )
++	  _Dbg_clear_all_brkpt
++	  ;;
++
++	# List stack 1 up
++	do | dow | down )
++	  _Dbg_cmd_down $_Dbg_args
++	  ;;
++
++	# evaluate as bash command
++	e | ev | eva | eval )
++	  _Dbg_cmd_eval $_Dbg_args
++	  ;;
++
++	# evaluate as bash command
++	en | ena | enab | enabl | enable )
++	  _Dbg_cmd_enable $_Dbg_args
++	  ;;
++
++	# 
++	fi | fin | fini | finis | finish | r )
++
++	  trap '_Dbg_debug_trap_handler 1 $LINENO "$@"' RETURN
++	  return 0
++	  ;;
++
++	#  View source in file
++	fr | fra | fra | frame )
++	  _Dbg_cmd_frame $_Dbg_args
++	  ;;
++
++	#  Set signal handle parameters
++	ha | han | hand | handl | handle )
++	  _Dbg_cmd_handle $_Dbg_args
++	  ;;
++
++	#  Info subcommands
++	i | in | inf | info )
++	  _Dbg_cmd_info $_Dbg_args
++	  ;;
++
++	# List line.
++	# print lines in file
++	l | li | lis | list )
++	  _Dbg_cmd_list $_Dbg_args
++	  ;;
++
++	# next/single-step N times (default 1)
++	n | ne | nex | next | s | st | ste | step | sk | ski | skip )
++	  _Dbg_last_next_step_cmd="$_Dbg_cmd"
++	  _Dbg_last_next_step_args=$_Dbg_args
++	  _Dbg_cmd_next_step_skip $_Dbg_cmd $_Dbg_args
++	  if [[ $_Dbg_cmd == sk* ]] ; then
++	    _Dbg_inside_skip=1
++	    return 1
++	  else
++	    return 0
++	  fi
++	  ;;
++
++	# print globbed or substituted variables
++	p | pr | pri | prin | print )
++	  _Dbg_cmd_print "$_Dbg_args"
++	  ;;
++
++	# quit
++	q | qu | qui | quit )
++	  _Dbg_cmd_quit $_Dbg_args
++	  ;;
++
++	# Search backwards for pattern
++	rev | reve | rever | revers | reverse )
++	  _Dbg_cmd_search_back $_Dbg_args
++	  ;;
++
++	# return from function/source without finishing executions
++	ret | retu | retur | return )
++	  _Dbg_steps=1
++	  _Dbg_write_journal "_Dbg_steps=$_Dbg_steps"
++	  IFS="$_Dbg_old_IFS";
++	  return 2
++	  ;;
++
++	# Run a debugger set command
++	se | set )
++	  _Dbg_cmd_set $_Dbg_args
++	  ;;
++
++	# Search forwards for pattern
++	sea | sear | searc | search | \
++        for | forw | forwa | forwar | forward )
++	  _Dbg_cmd_search $_Dbg_args
++	  ;;
++
++	# Run a debugger show command
++	sh | sho | show )
++	  _Dbg_cmd_show $_Dbg_args
++	  ;;
++
++	# Run a debugger comamnd file
++	so | sou | sour | sourc | source )
++	  _Dbg_cmd_source $_Dbg_args
++	  ;;
++
++	# toggle execution trace
++	t | to | tog | togg | toggl | toggle )
++	  _Dbg_cmd_trace
++	  ;;
++
++	# Set breakpoint on a line
++	tb | tbr | tbre | tbrea | tbreak )
++	  _Dbg_cmd_break 1 $_Dbg_args ;;
++
++	# Set the output tty
++	tt | tty )
++	  _Dbg_cmd_tty $_Dbg_args 
++	  _Dbg_prompt_output=${_Dbg_tty:-/dev/null}
++	  ;;
++
++	# List call stack up
++	u | up )
++	  _Dbg_cmd_up $_Dbg_args
++	  ;;
++
++	# List call stack up
++	un | undi | undis | undisp | undispl | undispla | undisplay )
++	  _Dbg_cmd_undisplay $_Dbg_args
++	  ;;
++
++	# List window around line.
++	w | wi | win | wind | windo | window )
++	  ((_startline=_curline - _Dbg_listsize/2))
++	  (( $_startline <= 0 )) && _startline=1
++	  _Dbg_list $_cur_source_file $_startline
++	  ;;
++
++	# intelligent print of variable, function or expression
++	x | examine )
++	  _Dbg_cmd_x "$_Dbg_args"
++	  ;;
++
++	# List all breakpoints and actions.
++	L )
++	  _Dbg_cmd_list_brkpt
++	  _Dbg_list_watch
++	  _Dbg_list_action
++	  ;;
++
++	# print help command menu
++	'?' | h | he | hel | help )
++	  _Dbg_cmd_help $_Dbg_args ;;
++
++	# run shell command. Has to come before ! below.
++	'!!' | sh | she | shell )
++	  eval $_Dbg_args ;;
++
++	\!* | hi | his | hist | histo | histor | history )
++	  _Dbg_remove_history_item
++	  _Dbg_cmd_history_parse $_Dbg_args
++	  if (( $history_num >= 0 )) ; then 
++	    if (( $history_num < ${#_Dbg_history[@]} )) ; then 
++	      set ${_Dbg_history[$history_num]}
++	      _Dbg_cmd=$1
++	      shift
++	      _Dbg_args="$@"
++	      _Dbg_redo=1;
++	    else
++	      _Dbg_msg \
++	      "Number $history_num should be less than ${#_Dbg_history[@]}"
++	    fi
++	  fi
++	  ;;
++
++	# Remove all actions
++	A )
++	  _Dbg_cmd_clear_all_actions $_Dbg_args
++	  ;;
++
++	# Run debugger command history
++	H )
++	  _Dbg_remove_history_item
++	  _Dbg_cmd_history_list $_Dbg_args
++	  ;;
++
++	# restart debug session.
++	R | re | res | rest | resta | restar | restart | ru | run )
++	  _Dbg_cmd_restart $_Dbg_args
++	  ;;
++
++	#  S List subroutine names
++	S )
++	  _Dbg_cmd_list_subroutines $_Dbg_args
++	  ;;
++
++	# Stack trace
++	T | wh | whe | wher | where | bt| back | backtrace )
++	  _Dbg_cmd_stack_trace 1 $_Dbg_args;
++	  ;;
++
++	# Dump variables
++	V )
++	  _Dbg_cmd_list_variables "$_Dbg_args"
++	  ;;
++
++	# Watch expression
++	We | watche )
++	  _Dbg_cmd_watch 1 "$_Dbg_args"
++	  ;;
++
++	# watch variable
++	W | wa | wat | watch )
++	  local -a a=($_Dbg_args)
++	  local first=${a[0]}
++	  if [[ $first == '' ]] ; then
++	    _Dbg_cmd_watch 0
++	  else
++	    if [[ 0 == `_Dbg_is_var $first` ]] ; then
++	      _Dbg_msg "Can't set watch: no such variable $first."
++	    else
++	      unset a first
++	      _Dbg_cmd_watch 0 "\$$_Dbg_args"
++	    fi
++	  fi
++	  ;;
++
++	# Show version information
++	M | ve | ver | vers | versi | versio | version )
++	  _Dbg_cmd_show_versions
++	  ;;
++
++	* ) 
++          _Dbg_msg "Undefined command: \"$_Dbg_cmd\". Try \"help\"." 
++	  _Dbg_remove_history_item
++	  ;;
++      esac
++      done
++
++      IFS=$_Dbg_space_IFS;
++      eval "_Dbg_prompt=$_Dbg_prompt_str"
++    done
++
++    ((_Dbg_input_desc--))
++  done
++
++  # EOF hit. Same as quit without arguments
++  _Dbg_msg "" # Cause <cr> since EOF may not have put in.
++  _Dbg_cmd_quit
++}
++
++# Set up to Debug into another script...
++# TODO: would work better if instead of using $source_line below
++# which might have several statements, we could just pick up the next
++# single statement.
++_Dbg_cmd_debug() {
++
++  # set -xv
++  local script_cmd=${@:-$_Dbg_bash_command}
++
++  # We need to expand variables that might be in $script_cmd.
++  # set_Dbg_nested_debug_cmd is set up to to be eval'd below.
++  local set_Dbg_debug_cmd="local _Dbg_debug_cmd=\"$script_cmd\"";
++
++  [ -z "$BASH" ] && BASH='bash'
++
++  eval "$_seteglob"
++  # Add appropriate bash debugging options
++  if [[ $_Dbg_script != 1 ]] ; then
++    # Running "bash --debugger", so prepend "bash --debugger"
++    set_Dbg_debug_cmd="local _Dbg_debug_cmd=\"$BASH --debugger $script_cmd\"";
++  elif [[ $0/// == *bashdb/// ]] ; then
++    # Running "bashdb", so prepend "bash bashdb .."
++    set_Dbg_debug_cmd="local _Dbg_debug_cmd=\"$BASH $0 -q -L $_Dbg_libdir $script_cmd\"";
++  fi
++  eval "$_resteglob"
++  eval $set_Dbg_debug_cmd
++
++  if (( _Dbg_basename_only )) ; then 
++    _Dbg_msg "Debugging new script with $script_cmd"
++  else
++    _Dbg_msg "Debugging new script with $_Dbg_debug_cmd"
++  fi
++  local -r old_quit_on_quit=$BASHDB_QUIT_ON_QUIT
++  export BASHDB_QUIT_ON_QUIT=1
++  export BASHDB_BASENAME_ONLY="$_Dbg_basename_only"
++  ((BASHDB_LEVEL++))
++  $_Dbg_debug_cmd
++  ((BASHDB_LEVEL--))
++  export BASHDB_QUIT_ON_QUIT=$old_quit_on_quit
++}
++
++# V [![pat]] List variables and values for whose variables names which 
++# match pat $1. If ! is used, list variables that *don't* match. 
++# If pat ($1) is omitted, use * (everything) for the pattern.
++_Dbg_cmd_list_variables() {
++  local _Dbg_old_glob="$GLOBIGNORE"
++  GLOBIGNORE="*"
++  
++  local _Dbg_match="$1"
++  _Dbg_match_inverted=no
++  case ${_Dbg_match} in
++    \!*)
++      _Dbg_match_inverted=yes
++      _Dbg_match=${_Dbg_match#\!}
++    ;;
++    "")
++      _Dbg_match='*'
++    ;;
++  esac
++  local _Dbg_list=`declare -p`
++  local _Dbg_old_ifs=${IFS}
++  IFS="
++"
++  local _Dbg_temp=${_Dbg_list}
++  _Dbg_list=""
++  local -i i=0
++  local -a _Dbg_list
++
++  # GLOBIGNORE protects us against using the result of
++  # a glob expansion, but it doesn't protect us from
++  # actually performing it, and this can bring bash down
++  # with a huge _Dbg_source_ variable being globbed.
++  # So here we disable globbing momentarily
++  set -o noglob
++  for _Dbg_item in ${_Dbg_temp}; do
++    _Dbg_list[${i}]="${_Dbg_item}"
++    i=${i}+1
++  done
++  set +o noglob
++  IFS=${_Dbg_old_ifs}
++  local _Dbg_item=""
++  local _Dbg_skip=0
++  local _Dbg_show_cmd=""
++   _Dbg_show_cmd=`echo -e "case \\${_Dbg_item} in \n${_Dbg_match})\n echo yes;;\n*)\necho no;; esac"`
++  
++  for (( i=0; (( i < ${#_Dbg_list[@]} )) ; i++ )) ; do
++    _Dbg_item=${_Dbg_list[$i]}
++    case ${_Dbg_item} in
++      *\ \(\)\ )
++        _Dbg_skip=1
++      ;;
++      \})
++        _Dbg_skip=0
++        continue
++    esac
++    if [[ _Dbg_skip -eq 1 ]]; then
++      continue
++    fi
++
++    # Ignore all _Dbg_ variables here because the following
++    # substitutions takes a long while when it encounters
++    # a big _Dbg_source_
++    case ${_Dbg_item} in
++      _Dbg_*)  # Hide/ignore debugger variables.
++        continue;	
++      ;;
++    esac
++    
++    _Dbg_item=${_Dbg_item/=/==/}
++    _Dbg_item=${_Dbg_item%%=[^=]*}
++    case ${_Dbg_item} in
++      _=);;
++      *=)
++        _Dbg_item=${_Dbg_item%=}
++        local _Dbg_show=`eval $_Dbg_show_cmd`
++        if [[ "$_Dbg_show" != "$_Dbg_match_inverted" ]]; then
++            if [[ -n ${_Dbg_item} ]]; then
++              local _Dbg_var=`declare -p ${_Dbg_item} 2>/dev/null`
++	      if [[ -n "$_Dbg_var" ]]; then
++		# Uncomment the following 3 lines to use literal
++		# linefeeds
++#		_Dbg_var=${_Dbg_var//\\\\n/\\n}
++#                _Dbg_var=${_Dbg_var//
++#/\n}
++		# Comment the following 3 lines to use literal linefeeds
++                _Dbg_var=${_Dbg_var//\\\\n/\\\\\\n}
++                _Dbg_var=${_Dbg_var//
++/\\n}
++                _Dbg_var=${_Dbg_var#* * }
++                _Dbg_msg ${_Dbg_var}
++	      fi
++            fi
++        fi
++      ;;
++      *)
++      ;;
++    esac
++
++  done
++  GLOBIGNORE=$_Dbg_old_glob
++}
++
++_Dbg_cmd_eval() {
++
++  echo ". ${_Dbg_libdir}/dbg-set-d-vars.inc" > $_Dbg_evalfile
++  echo "$@" >> $_Dbg_evalfile
++  if [[ -n $_basdhb_tty  ]] ; then
++    . $_Dbg_evalfile >>$_Dbg_tty
++  else
++    . $_Dbg_evalfile
++  fi
++}
++
++_Dbg_cmd_next_step_skip() {
++
++  local cmd=$1
++  local count=${2:-1}
++  # Do we step debug into functions called or not?
++  if [[ $cmd == n* ]] ; then
++    _Dbg_old_set_opts="$_Dbg_old_set_opts +o fntrace"
++  else
++    _Dbg_old_set_opts="$_Dbg_old_set_opts -o fntrace"
++  fi
++  _Dbg_write_journal "_Dbg_old_set_opts=\"$_Dbg_old_set_opts\""
++
++  if [[ $count == [0-9]* ]] ; then
++    let _Dbg_steps=${count:-1}
++  else
++    _Dbg_msg "Argument ($count) should be a number or nothing."
++    _Dbg_steps=1
++  fi
++  _Dbg_write_journal "_Dbg_steps=$_Dbg_steps"
++}
++
++_Dbg_cmd_print() {
++  local -r _Dbg_expr=${@:-"$_Dbg_last_print_args"}
++  local -r dq_expr=$(_Dbg_esc_dq "$_Dbg_expr")
++  . ${_Dbg_libdir}/dbg-set-d-vars.inc
++  eval "_Dbg_msg $_Dbg_expr"
++  _Dbg_last_print_args="$dq_expr"
++}
++
++# Restart script in same way with saved arguments (probably the same
++# ones as we were given before).
++_Dbg_cmd_restart() {
++
++  _Dbg_cleanup;
++
++  local script_args
++  if (( $# != 0 )) ; then 
++    script_args="$@"
++  else
++    script_args="${_Dbg_script_args[@]}"
++  fi
++
++  local exec_cmd="$0 $script_args";
++  if [[ $_Dbg_script != 1 ]] ; then
++    [ -z "$BASH" ] && BASH='bash'
++    if [ $_cur_source_file == $_Dbg_bogus_file ] ; then
++      script_args="--debugger -c \"$BASH_EXECUTION_STRING\""
++      exec_cmd="$BASH --debugger -c \"$BASH_EXECUTION_STRING\"";
++    else
++      exec_cmd="$BASH --debugger $0 $script_args";
++    fi
++  fi
++
++  if (( _Dbg_basename_only )) ; then 
++    _Dbg_msg "Restarting with: $script_args"
++  else
++    _Dbg_msg "Restarting with: $exec_cmd"
++  fi
++
++  # If we are in a subshell we need to get out of those levels
++  # first before we restart. The strategy is to write into persistent
++  # storage the restart command, and issue a "quit." The quit should
++  # discover the restart at the last minute and issue the restart.
++  if (( BASH_SUBSHELL > 0 )) ; then 
++    _Dbg_msg "Note you are in a subshell. We will need to leave that first."
++    _Dbg_write_journal "BASHDB_RESTART_COMMAND=\"$exec_cmd\""
++    _Dbg_cmd_quit 0
++  fi
++  _Dbg_save_state
++  exec $exec_cmd
++}
++
++# Handle command-file source. If the filename's okay we just increase the
++# input-file descriptor by one and redirect input which will
++# be picked up in next debugger command loop.
++_Dbg_cmd_source() {
++  local filename
++  if [[ -z "$1" ]] ; then
++    _Dbg_msg "Need to give a filename for the source command"
++    return
++  fi
++  _Dbg_glob_filename $1
++  if [ "$filename" != '/dev/stdin' ] && [[ ! -f $filename ]] ; then
++    _Dbg_msg "Source file $filename does not exist as a regular file."
++    return
++  fi
++  if [[ -r $filename ]] ; then
++    ((_Dbg_input_desc++))
++    _Dbg_input[$_Dbg_input_desc]=$filename
++    local _Dbg_redirect_cmd="exec $_Dbg_input_desc<$filename"
++    eval $_Dbg_redirect_cmd
++  else
++    _Dbg_msg "Source file $filename is not readable."
++  fi
++}
++
++# toggle execution trace feature
++_Dbg_cmd_trace() {
++  ((_trace=!$_trace))
++
++  _Dbg_msg "Trace = \c"
++  let " $_trace" && _Dbg_msg "on" || _Dbg_msg "off"
++}
++
++# Set output tty
++_Dbg_cmd_tty() {
++  if [[ -z "$1" ]] ; then
++    _Dbg_msg "Argument required (terminal name for running target process)."
++    return 1
++  fi
++  if ! $(touch $1 >/dev/null 2>/dev/null); then 
++    _Dbg_msg "Can't access $1 for writing."
++    return 1
++  fi
++  if [[ ! -w $1 ]] ; then
++    _Dbg_msg "tty $1 needs to be writable"
++    return 1
++  fi
++  _Dbg_tty=$1
++  return 0
++}
++
++_Dbg_cmd_x() {
++  local -r _Dbg_expr=${@:-"$_Dbg_last_x_args"}
++  local _Dbg_result
++  if (( `_Dbg_is_var $_Dbg_expr` )) ; then
++    _Dbg_result=`declare -p $_Dbg_expr`
++    _Dbg_msg "$_Dbg_result"
++  elif (( `_Dbg_is_function $_Dbg_expr` )) ; then 
++    _Dbg_result=`declare -f $_Dbg_expr`
++    _Dbg_msg "$_Dbg_result"
++  else 
++    local -i _Dbg_rc
++    eval let _Dbg_result=$_Dbg_expr 2>/dev/null; _Dbg_rc=$?
++    if (( $_Dbg_rc != 0 )) ; then
++      _Dbg_cmd_print "$_Dbg_expr"
++    else
++      _Dbg_msg "$_Dbg_result"
++    fi
++  fi
++  _Dbg_last_x_args="$_Dbg_x_args"
++}
++
++_Dbg_save_state() {
++  _Dbg_statefile=`_Dbg_tempname statefile`
++  echo "" > $_Dbg_statefile
++  _Dbg_save_breakpoints
++  _Dbg_save_actions
++  _Dbg_save_watchpoints
++  _Dbg_save_display
++  _Dbg_save_Dbg_set
++  echo "unset BASHDB_RESTART_FILE" >> $_Dbg_statefile
++  echo "rm $_Dbg_statefile" >> $_Dbg_statefile
++  export BASHDB_RESTART_FILE="$_Dbg_statefile"
++  _Dbg_write_journal "export BASHDB_RESTART_FILE=\"$_Dbg_statefile\""
++
++}
++
++
++_Dbg_save_Dbg_set() {
++  declare -p _Dbg_basename_only  >> $_Dbg_statefile
++  declare -p _Dbg_debug_debugger >> $_Dbg_statefile
++  declare -p _Dbg_edit           >> $_Dbg_statefile
++  declare -p _Dbg_listsize       >> $_Dbg_statefile
++  declare -p _Dbg_prompt_str     >> $_Dbg_statefile
++  declare -p _Dbg_show_command   >> $_Dbg_statefile
++}
++
++_Dbg_restore_state() {
++  local statefile=$1
++  . $1
++}
++
++# ================== INITIALIZATION =====================================
++
++_Dbg_cmd_source '/dev/stdin'
++
++# List of command files to process
++typeset -a _Dbg_input
++
++# Have we already specified  where to read debugger input from?
++# Note: index 0 is only set by bashdb. It is not used otherwise for I/O
++# like those indices >= _Dbg_input_start_desc are.
++if [ -n "$BASHDB_INPUT" ] ; then 
++  _Dbg_input=($BASHDB_INPUT)
++  _Dbg_cmd_source ${_Dbg_input[0]}
++  _Dbg_no_init=1
++fi
++
++if [[ -z $_Dbg_no_init && -r ~/.bashdbinit ]] ; then
++  _Dbg_cmd_source ~/.bashdbinit
++fi
++
++# BASHDB_LEVEL is the number of times we are nested inside a debugger
++# by virtue of running "debug" for example.
++if [[ -z "${BASHDB_LEVEL}" ]] ; then
++  export BASHDB_LEVEL=1
++fi
++
++# temp file for internal eval'd commands
++typeset _Dbg_evalfile=`_Dbg_tempname eval`
++
++# File to save information that needs to be passed from a subshell
++# to a parent shell
++typeset _Dbg_journal=`_Dbg_tempname journal`
++if [ ! -f _Dbg_journal ] ; then 
++  _Dbg_write_journal "BASHDB_QUIT_LEVELS=0"
++fi
++
++# This is put at the so we have something at the end to stop at 
++# when we debug this. By stopping at the end all of the above functions
++# and variables can be tested.
++_Dbg_cmd_ver='$Id: dbg-cmds.inc,v 1.9 2003/08/06 14:21:55 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-file.inc cvs/debugger/dbg-file.inc
+--- bash-2.05b/debugger/dbg-file.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-file.inc	2003-08-02 21:54:47.000000000 +0200
+@@ -0,0 +1,227 @@
++# Things related to file handling.
++#
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# Directory search patch for unqualified file names
++typeset -a _Dbg_dir=('\$cdir' '\$cwd' )
++
++# Directory in which the script is located
++typeset -r _Dbg_cdir=${_Dbg_source_file%/*}
++
++_Dbg_resolve_expand_filename() {
++  local find_file=$1
++
++  if [[ -z "$find_file" ]] ; then
++    _Dbg_msg "Internal debug error: null file to find"
++    echo ''
++    return 1
++  fi
++
++  if [[ ${find_file:0:1} == '/' ]] ; then 
++    echo "$find_file"
++    return 0
++  elif [[ ${find_file:0:1} == '.' ]] ; then
++    # Relative file name
++    find_file=$(_Dbg_expand_filename $find_file)
++    echo "$find_file"
++    return 0
++  else
++    # Resolve file using _Dbg_dir
++    local -i n=${#_Dbg_dir[@]}
++    local -i i
++    for (( i=0 ; i < n; i++ )) ; do
++      local basename="${_Dbg_dir[i]}"
++      if [[  $basename == '$cdir' ]] ; then
++	basename=$_Dbg_cdir
++      elif [[ $basename == '$cwd' ]] ; then
++	basename=$(pwd)
++      fi
++      if [[ -f "$basename/$find_file" ]] ; then
++	echo "$basename/$find_file"
++	return 0
++      fi
++    done
++  fi
++  echo ""
++  return 1
++}
++
++# _Dbg_is_file echoes the full filename if $1 is a filename found in files
++# '' is echo'd if no file found.
++_Dbg_is_file() {
++  local find_file=$1
++
++  if [[ -z "$find_file" ]] ; then
++    _Dbg_msg "Internal debug error: null file to find"
++    echo ''
++    return
++  fi
++
++  if [[ ${find_file:0:1} == '/' ]] ; then 
++    # Absolute file name
++    for try_file in ${_Dbg_filenames[@]} ; do 
++      if [[ $try_file == $find_file ]] ; then
++	echo "$try_file"
++	return
++      fi
++    done
++  elif [[ ${find_file:0:1} == '.' ]] ; then
++    # Relative file name
++    find_file=$(_Dbg_expand_filename $find_file)
++    for try_file in ${_Dbg_filenames[@]} ; do 
++      if [[ $try_file == $find_file ]] ; then
++	echo "$try_file"
++	return
++      fi
++    done
++  else
++    # Resolve file using _Dbg_dir
++    for try_file in ${_Dbg_filenames[@]} ; do 
++      local pathname
++      local -i n=${#_Dbg_dir[@]}
++      local -i i
++      for (( i=0 ; i < n; i++ )) ; do
++	local basename="${_Dbg_dir[i]}"
++	if [[  $basename == '$cdir' ]] ; then
++	  basename=$_Dbg_cdir
++	elif [[ $basename == '$cwd' ]] ; then
++	  basename=$(pwd)
++	fi
++	if [[ "$basename/$find_file" == $try_file ]] ; then
++	  echo "$try_file"
++	  return
++	fi
++      done
++    done
++  fi
++  echo ""
++}
++
++# Turn filename $1 into something that is safe to use as a variable name
++_Dbg_file2var() {
++  local filename=$(_Dbg_expand_filename $1)
++  local varname=`builtin echo $filename | tr '=~+%* .?/"[]<>-' 'ETPpABDQSqLRlGM'`
++  builtin echo $varname
++}
++
++# $1 contains the name you want to glob. return 1 if exists and is
++# readible or 0 if not. 
++# The result will be in variable $filename which is assumed to be 
++# local'd by the caller
++_Dbg_glob_filename() {
++  local cmd="filename=`expr $1`"
++  eval $cmd
++}
++
++# Either fill out or strip filename as determined by "basename_only"
++# and annotate settings
++_Dbg_adjust_filename() {
++  local -r filename="$1"
++  if (( _Dbg_annotate == 1 )) ; then
++    echo `_Dbg_resolve_expand_filename $filename`
++  elif ((_Dbg_basename_only)) ; then
++    echo ${filename##*/}
++  else
++    echo $filename
++  fi
++}
++
++# Return the maximum line in $1
++_Dbg_get_maxline() {
++  # set -x
++  local -r filename=$1
++  local -r filevar=`_Dbg_file2var $filename`
++  local is_read=`_Dbg_get_assoc_scalar_entry "_Dbg_read_" $filevar`
++  [ $is_read ] || _Dbg_readin $filename 
++  echo `_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $filevar`
++  # set +x
++}
++
++# Check that line $2 is not greater than the number of lines in 
++# file $1
++_Dbg_check_line() {
++  local -ir line_number=$1
++  local filename=$2
++  local -i max_line=`_Dbg_get_maxline $filename`
++  if (( $line_number >  max_line )) ; then 
++    (( _Dbg_basename_only )) && filename=${filename##*/}
++    _Dbg_msg "Line $line_number is too large." \
++      "File $filename has only $max_line lines."
++    return 1
++  fi
++  return 0
++}
++
++# Create temporary file based on $1
++# file $1
++_Dbg_tempname() {
++  echo "$_Dbg_tmpdir/bashdb$1$$"
++}
++
++# append a command into journal file and then run the command.
++_Dbg_write_journal_eval() {
++  _Dbg_write_journal "$*" 
++  eval "$*"
++}
++
++# append a command into journal file and then run the command.
++_Dbg_write_journal_var() {
++  local var_name=$1
++  local val
++  local val_cmd="$val=\${$var_name}"
++  eval $val_cmd
++  _Dbg_write_journal "${var_name}=${val}" 
++}
++
++_Dbg_write_journal_avar() {
++  local decl_str=$(declare -p $1)
++  local -a decl_a=($decl_str)
++  local -a decl_a2=${decl_a[@]:2}
++  _Dbg_write_journal ${decl_a2[@]}
++}
++
++# Append a command into journal file. But we only need to do
++# if we are in a subshell.
++_Dbg_write_journal() {
++  if (( $BASH_SUBSHELL != 0 )) ; then
++    echo "$@" >> ${_Dbg_journal} 2>/dev/null
++  fi
++  # return $?
++}
++
++# Remove all journal files.
++_Dbg_erase_journals() {
++  rm ${_Dbg_journal} 2>/dev/null
++}
++
++# read in or "source" in journal file which will set variables.
++_Dbg_source_journal() {
++
++  if [ -r $_Dbg_journal ] ; then 
++    . $_Dbg_journal
++    (( BASH_SUBSHELL == 0 )) && _Dbg_erase_journals
++  fi
++}
++
++# This is put at the so we have something at the end when we debug this.
++typeset -r _Dbg_file_ver=\
++'$Id: dbg-file.inc,v 1.11 2003/08/02 19:54:47 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-fns.inc cvs/debugger/dbg-fns.inc
+--- bash-2.05b/debugger/dbg-fns.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-fns.inc	2003-04-30 02:22:55.000000000 +0200
+@@ -0,0 +1,301 @@
++# dbg-fns.inc - Bourne Again Shell Debugger Utility Functions
++#
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# Come here via DEBUG trap after each statement in script.
++# This determines if we need to stop and go into the debugger 
++# command loop or not.
++
++# Add escapes to a string $1 so that when it is read back via "$1"
++# it is the same as $1.
++_Dbg_esc_dq() {
++  builtin echo $1 | sed -e 's/[`$\"]/\\\0/g' 
++}
++
++# Set $? to $1 if supplied or the saved entry value of $?. 
++_Dbg_set_dol_q () {
++  return ${1:-$_Dbg_debugged_exit_code}
++}
++
++# Split $2 using $1 as the split character.  We accomplish this by
++# temporarily resetting the variable IFS (input field separator).
++#
++# Example:
++# local -a a=($(_Dbg_split ":" "file:line"))
++# a[0] will have file and a{1] will have line.
++
++_Dbg_split (){
++  local old_IFS=$IFS
++  local new_ifs=${1:-' '}
++  shift
++  local -r text=$*
++  local -a array
++  IFS="$new_ifs"
++  array=( $text )
++  echo ${array[@]}
++  IFS=$old_IFS
++}
++
++# Return value of eval($1$2). Until bash has associative arrays,
++# this is how we simulate such a datatype. In Perl this would be returning
++# the value of  $1{$2}.
++
++_Dbg_get_assoc_scalar_entry() {
++#   set -xv
++    local prefix=$1
++#   echo "${BASH_SOURCE[1]}:${BASH_LINENO[1]} ${FUNCNAME[1]}"
++    local entry=$2
++    local cmd="echo \$${prefix}${entry}"
++    eval $cmd
++#   set +xv
++}
++
++# Set eval($1$2)=$2. Until bash has associative arrays,
++# this is how we simulate such a datatype. In Perl this would be
++# $1{$2}=$3.
++
++_Dbg_set_assoc_scalar_entry() {
++#  set -xv
++  local prefix=$1
++  local entry=$2
++  local value=$3
++  local cmd="${prefix}${entry}=$value"
++  eval $cmd
++
++  local dq_value=$(_Dbg_esc_dq "$value")
++  _Dbg_write_journal "${prefix}${entry}=\"$dq_value\""
++
++#  set +xv
++}
++
++# Return value of eval($1[$2]). If $2 is omitted, use _curline.  Until
++# bash has associative arrays which can contain array elements this is
++# how we simulate such a datatype.
++
++_Dbg_get_assoc_array_entry() {
++  local prefix=$1
++  local lineno=${2:-$_curline}
++
++  [[ -z $prefix ]] && _Dbg_msg "Internal debug error (gae) bad prefix"
++  local entry="$prefix[$lineno]"
++  local cmd="echo \"\${$entry}\""
++  eval $cmd
++}
++
++# Evaluate eval($1[$2]=$3). If $2 is omitted, use _curline.  Until
++# bash has associative arrays cich can contain array elements this is
++# how we simulate such a datatype.
++
++_Dbg_set_assoc_array_entry() {
++#  set -xv
++  local prefix=$1
++  local lineno=$2
++  shift; shift
++  local value=$*
++  
++  [[ -z "$prefix" ]] && _Dbg_msg "Internal debug error (sae1) bad prefix"
++  [[ -z "$lineno" ]] && _Dbg_msg "Internal debug error (sae2) bad lineno"
++  [[ -z "$value" ]] && _Dbg_msg "Internal debug error (sae3) bad value"
++
++  local entry="$prefix[$lineno]"
++  local cmd="$entry=\"$value\""
++  eval $cmd
++
++  local dq_value=$(_Dbg_esc_dq "$value")
++  _Dbg_write_journal "$entry=\"$dq_value\""
++
++#  set +xv
++}
++
++# _Dbg_is_var echoes 1 if $1 is a defined variable or 0 otherwise. 
++_Dbg_is_var() {
++  declare -p $1 >/dev/null 2>&1
++  if [[ $? != 0 ]] ; then 
++    echo 0
++  else
++    echo 1
++  fi
++}
++
++# _Dbg_is_function echoes 1 if $1 is a defined function or 0 otherwise. 
++# if $2 is nonzero, system functions, i.e. those whose name starts with
++# an underscore (_), are included in the search.
++_Dbg_is_function() {
++    local needed_fn=$1
++    if [[ -z $needed_fn ]] ; then 
++	echo 0
++	return;
++    fi
++    local -i include_system=$2
++    local -a fns_a=(`declare -F`)
++    local -i i
++
++    # Iterate skipping over consecutive single tokens "declare" and "-F"
++    for (( i=2; (( i < ${#fns_a[@]} )) ; i += 3 )) ; do
++	local fn="${fns_a[$i]}"
++	[[ $fn == _* ]] && (( ! $include_system )) && continue
++	if [[ $needed_fn ==  $fn ]] ; then
++	    echo 1
++	    return
++	fi
++    done
++    echo 0
++}
++
++# _get_function echoes a list of all of the functions.
++# if $1 is nonzero, system functions, i.e. those whose name starts with
++# an underscore (_), are included in the search.
++# FIXME add parameter search pattern.
++_Dbg_get_functions() {
++    local -i include_system=${1:-0}
++    local    pat=${2:-*}
++    local -a fns_a=(`declare -F`)
++    local -a ret_fns=()
++    local -i i
++    local -i invert=0;
++
++    if [[ $pat == !* ]] ; then 
++	# Remove leading !
++	pat=$(echo $pat | cut -c2-)
++	invert=1
++    fi	
++
++    # Iterate skipping over consecutive single tokens "declare" and "-F"
++    for (( i=2; (( i < ${#fns_a[@]} )) ; i += 3 )) ; do
++	local fn="${fns_a[$i]}"
++	[[ $fn == _* ]] && (( ! $include_system )) && continue
++	if [[ $fn == $pat ]] ; then 
++	     [[ $invert == 0 ]] && ret_fns[${#ret_fns[@]}]=$fn
++	else
++	     [[ $invert != 0 ]] && ret_fns[${#ret_fns[@]}]=$fn
++	fi
++
++    done
++    echo ${ret_fns[@]}
++}
++
++# Parse linespec in $1 which should be one of
++#   int
++#   file:line
++#   function-num
++# Return tuple (line, filename)
++# We return the line number first since that can't have embedded blanks.
++_Dbg_parse_linespec() {
++  local linespec=$1
++  eval "$_seteglob"
++  case "$linespec" in
++
++    # line number only - use _cur_source_file for filename
++    $int_pat )	
++      echo "$linespec $_cur_source_file"
++      ;;
++    
++    # file:line
++    [^:][^:]*[:]$int_pat )
++      local -a word=($(_Dbg_split ":" $linespec))
++      echo "${word[1]} ${word[0]}"
++      ;;
++
++    # Function name or error
++    * )
++      if [[ 1 == `_Dbg_is_function $linespec $_Dbg_debug_debugger` ]]; then 
++	local -a word=(`declare -F $linespec`)
++	echo "${word[1]} ${word[2]}"
++      else
++	echo ""
++      fi
++      ;;
++   esac
++}
++
++# usage _Dbg_set_ftrace [-u] funcname [funcname...]
++# Sets or unsets a function for stopping by setting 
++# the -t or +t property to the function declaration.
++#
++_Dbg_set_ftrace() {
++  local opt=-t tmsg="enabled" func 
++  if [[ $1 == -u ]]; then
++	opt=+t
++	tmsg="disabled"
++	shift
++  fi
++  for func; do
++	  declare -f $opt $func
++	  # _Dbg_msg "Tracing $tmsg for function $func"
++  done
++}
++
++# Do things for debugger entry. Set some global debugger variables
++# Remove trapping ourselves. 
++# We assume that we are nested two calls deep from the point of debug
++# or signal fault. If this isn't the constant 2, then consider adding
++# a parameter to this routine.
++
++_Dbg_set_debugger_entry() {
++
++  # Nuke DEBUG trap
++  trap '' DEBUG
++
++  _cur_fn=${FUNCNAME[2]}
++  let _curline=${BASH_LINENO[1]}
++  ((_curline < 1)) && let _curline=1
++
++  _Dbg_old_IFS="$IFS"
++  IFS="$_Dbg_space_IFS";
++  _cur_source_file=${BASH_SOURCE[2]:-$_Dbg_bogus_file}
++  _cur_source_file="`_Dbg_expand_filename $_cur_source_file`"
++  _cur_filevar="`_Dbg_file2var $_cur_source_file`"
++  _Dbg_stack_pos=$_Dbg_stack_top
++  _Dbg_listline=_curline
++
++  # echo "-- ${_cur_source_file}:$_curline"
++
++  PS4=$_cur_source_file
++}
++
++# Does things to do just before leaving debugger command loop and
++# returning to the debugged program.
++# $1 is 1 if we have called bashdb_set_debugger_entry and saved various 
++# variables.
++_Dbg_set_to_return_from_debugger() {
++  _Dbg_rc=$?
++
++  if (( $1 != 0 )) ; then
++    _Dbg_last_bash_command="$_Dbg_bash_command"
++    _Dbg_last_curline="$_curline"
++    _Dbg_last_source_file="$_cur_source_file"
++  else
++    _Dbg_last_curline==${BASH_LINENO[1]}
++    _Dbg_last_source_file=${BASH_SOURCE[2]:-$_Dbg_bogus_file}
++    _Dbg_last_bash_command="**unsaved _bashdb command**"
++  fi
++
++  trap '_Dbg_debug_trap_handler 0 "$BASH_COMMAND" "$@"' DEBUG
++
++  IFS="$_Dbg_space_IFS";
++  set -$_Dbg_old_set_opts
++  IFS="$_Dbg_old_IFS";
++}
++
++# This is put at the so we have something at the end when we debug this.
++typeset -r _Dbg_fns_ver=\
++'$Id: dbg-fns.inc,v 1.5 2003/04/30 00:22:55 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-help.inc cvs/debugger/dbg-help.inc
+--- bash-2.05b/debugger/dbg-help.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-help.inc	2003-08-02 22:20:40.000000000 +0200
+@@ -0,0 +1,713 @@
++# dbg-help.inc - Bourne Again Shell Debugger Help Routines
++
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# print help command 
++_Dbg_cmd_help() {
++
++  local -r db_cmd=$1
++  
++  if [[ -n "$db_cmd" ]] ; then
++    case $db_cmd in 
++            !! | sh | she | shell ) 
++	_Dbg_msg \
++"!! cmd [args]   Execute shell \"cmd\" \"args\". Alias: shell."
++		return ;;
++            '#' ) 
++		_Dbg_msg \
++"#               Comment - ignore line. Maybe useful in command scripts."
++		return ;;
++            . ) 
++		_Dbg_msg \
++".               List current window of lines."
++		return ;;
++            / ) 
++		_Dbg_msg \
++"/pat/           Search forward for pat. Trailing / is optional.
++                 Long command name: search or forward."
++		return ;;
++            '?'/ ) 
++		_Dbg_msg \
++"?pat?           Search backward for pat. Trailing ? is optional.
++                 Long command name: rev or reverse"
++		return ;;
++	    - ) 
++		_Dbg_msg \
++"-               List previous window of lines."
++		return ;;
++	    A  )
++		_Dbg_msg \
++"A               Delete all actions"
++		return ;;
++	    D | deleteall )
++		_Dbg_msg \
++"D               Delete all breakpoints"
++		return ;;
++	    H )
++		_Dbg_msg \
++"H [from [to]]   List debugger history. If no arguments given list all history.
++H -count        If a single postive integer is given, then list starting from 
++![-]num:p       that number. If a single negative integer is given list that
++                many history items. If second argument is given then list down 
++                to that history number. 
++                An alternate form is !n:p or !-n:p where n is an 
++                integer. If a minus sign is used, you go back num from the end
++                rather than specify an absolute history number"
++                return ;;
++	    L  )
++		_Dbg_msg \
++"L               List all breakpoints."
++		return ;;
++	    R | re | res | rest | resta | restar | restart ) 
++		_Dbg_msg \
++"R [args]        Attempt to restart the program. 
++                The source code is reread and breakpoint information is lost. 
++                The command arguments used on the last invocation are used if 
++                args is empty. If arguments were given, they are passed to the
++                program. If running via the bashdb script and you want to
++                change arguments you also need to include those arguments 
++                to the bashdb script. Long command name: restart. Alias: run."
++		return ;;
++	    S )
++		_Dbg_msg \
++"S [[!]pattern]  List subroutine names [not] matching bash pattern. If no
++                pattern is given, all subroutines are listed. (The pattern 
++                is *)."
++		return ;;
++	    T | wh | whe | wher | where | bt| back | backtrace ) 
++		_Dbg_msg \
++"T [n]           Stack trace of calling functions or sourced files,
++                line numbers, and files. If n is given, list only n lines.
++                Long command name: where or backtrace."
++		return ;;
++            a )
++		_Dbg_msg \
++"a [linespec] stmt  Perform stmt on reaching linespec."
++                return ;;
++            b | br | bre | brea | break )
++		_Dbg_msg \
++"b [linespec]    Break on linespec. If no argument is given, us the current
++                line. Long command name: break."
++                return ;;
++	    c | cont | conti |contin |continu | continue )
++		_Dbg_msg \
++"c [linespec]    Continue execution until the next breakpoint or end of 
++                program or linespec. Long command name: continue."
++                return ;;
++            cond | condi |condit |conditi | conditio | condition )
++		_Dbg_msg \
++"cond N COND     Specify breakpoint number N to break only if COND is true.
++N is an integer and COND is an expression to be evaluated whenever 
++breakpoint N is reached. Long command name: condition."
++                return ;;
++            d | cl | cle | clea | clea | clear )
++		_Dbg_msg \
++"cl [linespec]   Clear breakpoint at specified line-spec. If no line given, use
++                the current line. All breakpoints in that line are cleared. 
++                Long command name: clear."
++                return ;;
++	    de | del | dele | delet | delete ) 
++		_Dbg_msg \
++"d {num}..       Delete the breakpoint entry or entries.
++                Long command name: delete."
++                return ;;
++	    deb | debu | debug ) 
++		_Dbg_msg \
++"deb [script]    Set up [script] for debugging. If no script is given, take
++                the script name from the command to be executed.
++                Long command name: debug."
++                return ;;
++            di | dis | disa | disab | disabl | disable ) 
++		_Dbg_msg \
++"di {n}...       Disable breakpoint entry/entries. Long command name: disable."
++                return ;;
++            disp | displ | displa | display ) 
++		_Dbg_msg \
++"disp {n}        Set display expression or list all display expressions. 
++                Long command name: display."
++                return ;;
++	    do | dow | down ) 
++		_Dbg_msg \
++"down [count]    Set file location for printing down the call stack by 
++                count. If count is omitted use 1."
++                return ;;
++	    e | ev | eva ) 
++		_Dbg_msg \
++"e bash-cmd      Evaluate a bash command by sourcing it in a subshell. Long
++                command name: eval."
++                return ;;
++            en | ena | enab | enabl | enable ) 
++		_Dbg_msg \
++"en {n}...       Enable breakpoint entry/entries. Long command name: enable."
++                return ;;
++            r  | fi | fin| fini | finis | finish ) 
++		_Dbg_msg \
++"r               Execute until the current function or source file returns.
++                Long command name: finish."
++                return ;;
++	    ha | han | hand | handl | handle )
++		_Dbg_msg \
++"ha sig {stop|nostop|stack|nostack|print|noprint}
++               Specify how to handle a signal. Args are signals and
++               actions to apply to those signals. Symbolic signals
++               (e.g. SIGSEGV) are recommended but numeric signals are
++               allowed too. Recognized actions include \"stop\",
++               \"nostop\", \"print\", and \"noprint\". Stop means
++               reenter debugger if this signal happens. Print means
++               print a message if this signal happens.  Long command
++               name: handle."  
++	       return ;;
++
++	    hi | his | hist | histo | histor | history ) 
++		_Dbg_msg \
++"hi n            Rerun a debugger command from the debugger history. See also
++![-]n           H to list the history. An alternname form is !n or !-n. If 
++                the minus sign is used you going back n from the end rather 
++                than specifying an absolute history number. 
++                Long command name: history."
++                return ;;
++	    i | in | inf | info ) 
++	        _Dbg_help_info $2
++                return ;;
++	    l | li | lis | list )
++		_Dbg_msg \
++"l linespec      List window lines starting at linespec.
++l min incr      List incr lines starting at 'min' linespec.
++l               List next window of lines.
++l .             Same as above.
++                Long command name: list."
++                return ;;
++	    n | ne | nex | next )
++		_Dbg_msg \
++"n [count]       Single steps possibly skipping execution into subroutine calls
++                and sourced files. Performed [count] times default is 1 time.
++                Long command name: next."
++                return ;;
++	    p | pr | pri | prin | print )
++		_Dbg_msg \
++"p string        Print value of a substituted string via \`echo'. A variable
++                should have leading $ if its value is to be substituted.
++                Long command name: print."
++                return ;;
++	    q | qu | qui | quit )
++		_Dbg_msg \
++"q [expr] [n]    Terminate execution of the program with return code expr. If
++                expr is missing, use 0. If n is given then we terminate only 
++                that many subshells or nested shells. Long name: quit."
++                return ;;
++	    ret | retu | retur | return )
++		_Dbg_msg \
++"ret             Skip completion of this function or sourced file. 
++                Long name: return."
++                return ;;
++	    se | set  )
++	        _Dbg_help_set $2
++                return ;;
++	    s | st | ste | step )
++		_Dbg_msg \
++"s [count]       Single steps possibly executing into subroutine calls 
++                and sourced files. Performed [count] times default is 1 time."
++                return ;;
++	    sh | sho | show )
++		_Dbg_help_show $2
++                return ;;
++  	    sk | ski | skip ) 
++		_Dbg_msg \
++"sk [count]      Skip (don't run) the next [count] command(s) to be executed.
++                Long command name: skip."
++                return ;;
++	    so | sou | sour | sourc | source )
++		_Dbg_msg \
++"source file     Read in debugger command file."
++                return ;;
++	    t | to | tog | togg | toggl | toggle ) 
++		_Dbg_msg \
++"t | trace       Toggle line-execution tracing. Long command name: toggle."
++                return ;;
++            tb | tbr | tbre | tbrea | tbreak )
++		_Dbg_msg \
++"tb [linespec]    Set a one-time break on linespec. If no argument is given, 
++                 us the current line. Long command name: tbreak."
++                return ;;
++            tt | tty )
++		_Dbg_msg \
++"tt  tty-name     Set the output device for debugger output
++                 Long command name: tty."
++                return ;;
++	    u | up ) 
++		_Dbg_msg \
++"u | up [count]  Set file location for printing up the call stack by 
++                count. If count is omitted use 1."
++                return ;;
++	    v | ve | ver | vers | versi | versio | version )
++		_Dbg_msg \
++"M | version     Show release version-control IDs of debugger scripts."
++                return ;;
++	    w | window ) 
++		_Dbg_msg \
++"w [linespec]    List window around line or current linespec. Long command 
++                name: window."
++                return ;;
++	    x | examine ) 
++		_Dbg_msg \
++"x expr          Print value of an expression via \'declare', \`let' and then
++                failing these eval. Single variables and arithmetic expression 
++                do not need leading $ for their value is to be substituted. 
++                However if neither these, variables need $ to have their value 
++                substituted. Long command name: examine"
++                return ;;
++	    V )
++		_Dbg_msg \
++"V [!][pat]      List variables and values for whose variables names which 
++                match pat. If ! is used, list variables that *don't* match. 
++                If pat is omitted, use * (everything) for the pattern."
++                return ;;
++	    We | watche ) 
++		_Dbg_msg \
++"We [arith]      Add watchpoint for expression expr. If no expression is given
++                all watchpoints are deleted. Long command name: watche."
++                return ;;
++	    W | wa | wat | watch ) 
++		_Dbg_msg \
++"W [var]         Add watchpoint for variable var.  If no expression is given
++                all watchpoints are deleted. Long command name: watch."
++                return ;;
++	    * )
++	   _Dbg_msg "Undefined command: \"$db_cmd\".  Try \"help\"."
++  	   return ;;
++	esac
++    fi
++
++    _Dbg_msg 'bashdb commands:
++List/search source lines:                 Control script execution:
++-------------------------                 -------------------------
++ l [start|.] [cnt] List cnt lines         T [n]        Stack trace
++                   from line start        s [n]        Single step [n times]
++ l sub       List source code fn          n [n]        Next, steps over subs
++ - or .      List previous/current line   <CR>/<Enter> Repeat last n or s 
++ w [line]    List around line             c [linespec] Continue [to linespec]
++ f filename  View source in file          L            List all breakpoints
++ /pat/       Search forward for pat       b linespec   Set breakpoint
++ ?pat?       Search backward for pat      del [n].. or D Delete a/all breaks
++                                                         by entry number
++Debugger controls:                        skip         skip execution of cmd
++-------------------------                 cl linespec  Delete breakpoints by
++ H [num]         Show last num commands                line spec
++ q [exp] or ^D   Quit returning exp       R [args]     Attempt a restart
++ info [cmd]      Get info on cmd.         u [n]        Go up stack by n or 1.
++ !n or hi n      Run debugger history n   do [n]       Go down stack by n or 1.
++ h or ? [cmd]    Get help on command      W [var]      Add watchpoint. If no
++ info [cmd]      Get info on cmd                       no expr, delete all
++ show [cmd]      Show settings            We [expr]    Add Watchpoint arith 
++                                                       expr
++ so file         read in dbg commands     t            Toggle trace
++                                          en/di n      enable/disable brkpt,
++ set x y         set a debugger variable               watchpoint, or display
++ e bash-cmd      evaluate a bash command  tb linespec  Add one-time break
++ disp expr       add a display expr       a linespec cmd eval "cmd" at linespec
++ M               Show module versions     A            delete all actions
++ x expr          evaluate expression      ret          jump out of fn or source
++                 (via declare, let, eval) finish       execute until return
++ deb             debug into another       cond n exp   set breakpoint condition
++                 shell script
++ !! cmd [args]   execute shell command "cmd" with "args"
++
++Data Examination: also see e, t, x
++-------------------------                 
++ p variable      Print variable 
++ V [[!]pat]      List variable(s) matching or not (!) matching pattern pat
++ S [[!]pat]      List subroutine names [not] matching pattern pat
++
++Readline command line editing (emacs/vi mode) is available
++For more help, type h <cmd> or consult online-documentation.'
++
++}
++
++_Dbg_help_set() {
++  local -r set_cmd=$1
++  local label=$2
++  local -r subcmds="args annotate basename debugger editing listsize prompt showcommand"
++
++  if [[ -z $set_cmd ]] ; then 
++      local thing
++      for thing in $subcmds ; do 
++	_Dbg_help_set $thing 1
++      done
++      return
++  fi
++
++  case $set_cmd in 
++    ar | arg | args )
++      [[ -n $label ]] && label='set args -- '
++      _Dbg_msg \
++"${label}Set argument list to give program being debugged when it is started.
++Follow this command with any number of args, to be passed to the program."
++      return 0
++      ;;
++    an | ann | anno | annot | annota | annotat | annotate )
++      if [[ -n $label ]] ; then 
++	label='set annotate -- '
++      else
++	local post_label='
++0 == normal;     1 == fullname (for use when running under emacs)'
++      fi
++      _Dbg_msg \
++"${label}Set annotation level.$post_label"
++      return 0
++      ;;
++    b | ba | bas | base | basen | basena | basenam | basename )
++      [[ -n $label ]] && label='set basename -- '
++      local onoff="off."
++      (( $_Dbg_basename_only != 0 )) && onoff='on.'
++      _Dbg_msg \
++"${label}Set short filenames (the basename) in debug output is" $onoff
++      return 0
++      ;;
++    d|de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging )
++      local onoff=${1:-'on'}
++      [[ -n $label ]] && label='set debugger -- '
++      local onoff="off."
++      (( $_Dbg_debug_debugger )) && onoff='on.'
++     _Dbg_msg \
++"${label}Set debugging the debugger is" $onoff
++      return 0
++      ;;
++    e | ed | edi | edit | editi | editin | editing )
++      [[ -n $label ]] && label='set editing -- '
++      local onoff="off."
++      (( $_Dbg_edit )) && onoff='on.'
++      _Dbg_msg \
++"${label}Set editing of command lines as they are typed is" $onoff
++      ;;
++    l | li | lis | list | lists | listsi | listsiz | listsize )
++      [[ -n $label ]] && label='set listsize -- '
++      _Dbg_msg \
++"${label}Set number of source lines bashdb will list by default."
++      ;;
++    p | pr | pro | prom | promp | prompt )
++      [[ -n $label ]] && label='set prompt -- '
++      _Dbg_msg \
++"${label}bashdb's prompt is:\n" \
++"      \"$_Dbg_prompt_str\"."
++      return 0
++      ;;
++    sho|show|showc|showco|showcom|showcomm|showcomma|showcomman|showcommand )
++      [[ -n $label ]] && label='set showcommand -- '
++      _Dbg_msg \
++"${label}Set showing the command to execute is $_Dbg_show_command."
++      return 0
++      ;;
++    * )
++      _Dbg_msg \
++"There is no \"set $set_cmd\" command."
++  esac
++}
++
++_Dbg_help_show() {
++  local -r show_cmd=$1
++  local -r subcmds="args annotate basename debugger commands copying debugger directories listsize prompt warranty"
++
++  if [[ -z $show_cmd ]] ; then 
++      local thing
++      for thing in $subcmds ; do 
++	_Dbg_help_show $thing 1
++      done
++      return
++  fi
++
++  case $show_cmd in 
++    ar | arg | args )
++      _Dbg_msg \
++"show args       -- Show argument list to give program being debugged when it 
++                    is started"
++      return 0
++      ;;
++    an | ann | anno | annot | annota | annotat | annotate )
++      _Dbg_msg \
++"show annotate    -- Show annotation_level"
++      return 0
++      ;;
++    b | ba | bas | base | basen | basena | basenam | basename )
++      _Dbg_msg \
++"show basename    -- Show if we are are to short or long filenames"
++      return 0
++      ;;
++    com | comm | comma | comman | command | commands )
++      _Dbg_msg \
++"show commands    -- Show the history of commands you typed"
++      ;;
++    cop | copy| copyi | copyin | copying )
++      _Dbg_msg \
++"show copying     -- Conditions for redistributing copies of debugger"
++     ;;
++    d|de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging )
++     _Dbg_msg \
++"show debugger    -- Show if we are set to debug the debugger"
++      return 0
++      ;;
++    di|dir|dire|direc|direct|directo|director|directori|directorie|directories)
++      _Dbg_msg \
++"show directories -- Show if we are set to debug the debugger"
++      ;;
++    l | li | lis | list | lists | listsi | listsiz | listsize )
++      _Dbg_msg \
++"show listsize    -- Show number of source lines debugger will list by default"
++      ;;
++    p | pr | pro | prom | promp | prompt )
++      _Dbg_msg \
++"show prompt      -- Show debugger's prompt"
++      return 0
++      ;;
++    w | wa | war | warr | warra | warran | warrant | warranty )
++      _Dbg_msg \
++"show warranty -- Various kinds of warranty you do not have"
++      return 0
++      ;;
++    * )
++      _Dbg_msg \
++    "Undefined show command: \"$show_cmd\".  Try \"help show\"."
++  esac
++}
++
++_Dbg_help_info() {
++  local -r info_cmd=$1
++  local label=$2
++  local -r subcmds="args breakpoints display files functions signals source stack terminal variables warranty"
++
++  if [[ -z $info_cmd ]] ; then 
++      local thing
++		_Dbg_msg \
++"List of info subcommands:
++"
++      for thing in $subcmds ; do 
++	_Dbg_help_info $thing 1
++      done
++      return
++  fi
++
++  case $info_cmd in 
++    ar | arg | args )
++      _Dbg_msg \
++"info args -- \$1, \$2, and so on"
++      return 0
++      ;;
++    b | br | bre | brea | 'break' | breakp | breakpo | breakpoints | \
++    w | wa | wat | watc | 'watch' | watchp | watchpo | watchpoints )
++      _Dbg_msg \
++"info breakpoints -- Status of user-settable breakpoints"
++      return 0
++      ;;
++    disp | displ | displa | display ) 
++      _Dbg_msg \
++"info display -- Show all display expressions"
++      return 0
++      ;;
++    fi | file| files | sources )
++      _Dbg_msg \
++"info files -- Source files in the program"
++      return 0
++      ;;
++    fu | fun| func | funct | functi | functio | function | functions )
++      _Dbg_msg \
++"info functions -- All function names"
++      return 0
++      ;;
++    h | ha | han | hand | handl | handle | \
++    si | sig | sign | signa | signal | signals )
++      _Dbg_msg \
++"info signals -- What debugger does when program gets various signals"
++      return 0
++      ;;
++    so | sou | sourc | source )
++      _Dbg_msg \
++"info source -- Information about the current source file"
++      return 0
++      ;;
++    st | sta | stac | stack )
++      _Dbg_msg \
++"info stack -- Backtrace of the stack"
++      return 0
++      ;;
++    te | ter | term | termi | termin | termina | terminal | tt | tty )
++      _Dbg_msg \
++"info terminal -- Print terminal device"
++      return 0
++      ;;
++    tr|tra|trac|trace|tracep | tracepo | tracepoi | tracepoint | tracepoints )
++      _Dbg_msg \
++"info tracepoints -- Status of tracepoints"
++      return 0
++      ;;
++    v | va | var | vari | varia | variab | variabl | variable | variables )
++      _Dbg_msg \
++"info variables -- All global and static variable names"
++      return 0
++      ;;
++    w | wa | war | warr | warra | warran | warrant | warranty )
++      _Dbg_msg \
++"info warranty -- Various kinds of warranty you do not have"
++      return 0
++      ;;
++    * )
++      _Dbg_msg \
++    "Undefined info command: \"$info_cmd\".  Try \"help info\"."
++  esac
++}
++_Dbg_cmd_info() {
++  local -r info_cmd=$1
++  local -ar subcmds=( args breakpoints display files functions source sources \
++                      stack terminal variables watchpoints )
++  
++  if [[ $info_cmd != '' ]] ; then
++    shift
++    case $info_cmd in 
++      a | ar | arg | args )
++	local -i i
++	for (( i=1 ; i<=${#ARG[@]} ; i++ )) ; do 
++	  _Dbg_printf "$%d = %s" $i ${ARG[$i]}
++	done
++	return
++	;;
++      b | br | bre | brea | 'break' | breakp | breakpo | breakpoints | \
++      w | wa | wat | watc | 'watch' | watchp | watchpo | watchpoints )
++	_Dbg_cmd_list_brkpt $*
++	_Dbg_list_watch $*
++	return
++	;;
++
++      d | di | dis| disp | displ | displa | display )
++	_Dbg_cmd_list_display $*
++	return
++	;;
++
++      fi | file| files | sources )
++        for file in ${_Dbg_filenames[@]} ; do  
++	  (( _Dbg_basename_only )) && file=${file##*/}
++	  _Dbg_msg "$file" ; 
++	done        
++        return
++	;;
++
++      fu | fun| func | funct | functi | functio | function | functions )
++        _Dbg_cmd_list_subroutines $*
++        return
++	;;
++
++      h | ha | han | hand | handl | handle | \
++          si | sig | sign | signa | signal | signals )
++        _Dbg_info_signals
++        return
++	;;
++
++      so | sou | sourc | source )
++        _Dbg_msg "Current script file is $_cur_source_file" 
++	local -i max_line=`_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $_cur_filevar`
++	_Dbg_msg "Contains $max_line lines." ; 
++        return
++	;;
++
++      st | sta | stac | stack )
++	_Dbg_cmd_stack_trace 1 $*
++	return
++	;;
++      te | ter | term | termi | termin | termina | terminal | tt | tty )
++	_Dbg_msg "tty: $_Dbg_tty"
++	return;
++	;;
++      v | va | var | vari | varia | variab | variabl | variable | variables )
++	_Dbg_cmd_list_variables "$1"
++	return
++        ;;
++      w | wa | war | warr | warra | warran | warrant | warranty )
++        _Dbg_msg "
++			    NO WARRANTY
++
++  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
++PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
++REPAIR OR CORRECTION.
++
++  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGES.
++"
++	return
++	;;
++      *)
++	_Dbg_msg "Unknown subcommand: $info_cmd"
++    esac
++  fi
++  _Dbg_msg "Info subcommands are: ${subcmds[@]}"
++}
++
++# List signal handlers in effect.
++_Dbg_info_signals() {
++  local -i i=0
++  local signal_name
++  local handler
++  local stop_flag
++  local print_flag
++
++  _Dbg_msg "Signal       Stop   Print   Stack     Value"
++  _Dbg_printf_nocr "%-12s %-6s %-7s %-9s " EXIT \
++    ${_Dbg_sig_stop[0]:-nostop} ${_Dbg_sig_print[0]:-noprint} \
++    ${_Dbg_sig_show_stack[0]:-nostack}
++
++  # This is a horrible hack, but I can't figure out how to get
++  # trap -p 0 into a variable; handler=`trap -p 0` doesn't work.
++  if [[ -n $_Dbg_tty  ]] ; then
++    builtin trap -p 0 >>$_Dbg_tty
++  else
++    builtin trap -p 0
++  fi
++
++  while [ 1 ] ; do
++    signal_name=`builtin kill -l $i 2>/dev/null`
++    if (( $? != 0 )) ; then
++      break
++    fi
++    handler=`builtin trap -p $i`
++    if [[ -n $handler ]] ; then
++      _Dbg_printf "%-12s %-6s %-7s %-9s %-6s" $signal_name \
++	${_Dbg_sig_stop[$i]:-nostop} ${_Dbg_sig_print[$i]:-noprint} \
++        ${_Dbg_sig_show_stack[$i]:-nostack} "$handler"
++    fi
++    ((i++))
++  done
++}
++
++# This is put at the so we have something at the end to stop at 
++# when we debug this. By stopping at the end all of the above functions
++# and variables can be tested.
++typeset -r _Dbg_help_ver=\
++'$Id: dbg-help.inc,v 1.9 2003/08/02 20:20:40 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-hist.inc cvs/debugger/dbg-hist.inc
+--- bash-2.05b/debugger/dbg-hist.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-hist.inc	2003-02-27 08:27:46.000000000 +0100
+@@ -0,0 +1,127 @@
++# dbg-hist.inc - Bourne Again Shell Debugger history routines
++#
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# Remove the last command from the history list.
++_Dbg_remove_history_item() {
++ _Dbg_hi=${#_Dbg_history[@]}-1
++  unset _Dbg_history[$_Dbg_hi]
++}
++
++# Set to rerun history item, or print history if command is of the form
++#  !n:p. If command is "history" then $1 is number of history item. 
++# the history command index to run is returned or $_Dbg_hi if 
++# there's nothing to run.
++# Return value in $history_num
++_Dbg_cmd_history_parse() {
++
++  history_num=$1
++  
++  _Dbg_hi=${#_Dbg_history[@]}
++  [[ -z $history_num ]] && let history_num=$_Dbg_hi-1
++
++  eval "$_seteglob"
++  if [[ $_Dbg_cmd == h* ]] ; then
++    if [[ $history_num != $int_pat ]] ; then 
++      if [[ $history_num == -$int_pat ]] ; then 
++	history_num=$_Dbg_hi+$history_num
++      else
++	_Dbg_msg "Invalid history number skipped: $history_num"
++	history_num=-1
++      fi
++    fi
++  else
++    # Handle ! form. May need to parse number out number and modifier
++    case $_Dbg_cmd in 
++      \!\-${int_pat}:p )
++	local -a word1=($(_Dbg_split "!" $_Dbg_cmd))
++	local -a word2=($(_Dbg_split ":" ${word1[0]}))
++	local -i num=_Dbg_hi+${word2[0]}
++	_Dbg_cmd_history_list $num $num
++	history_num=-1
++	;;
++      [!]${int_pat}:p )
++	local -a word1=($(_Dbg_split "!" $_Dbg_cmd))
++	local -a word2=($(_Dbg_split ":" ${word1[0]}))
++	_Dbg_cmd_history_list ${word2[0]} ${word2[0]}
++	history_num=-1
++	;;
++      \!\-$int_pat ) 
++	local -a word=($(_Dbg_split "!" $_Dbg_cmd))
++	history_num=$_Dbg_hi+${word[0]}
++	;;
++      \!$int_pat ) 
++	local -a word=($(_Dbg_split "!" $_Dbg_cmd))
++	history_num=${word[0]}
++	;;
++      '!' ) 
++        if [[ $history_num != $int_pat ]] ; then 
++	  if [[ $history_num == -$int_pat ]] ; then 
++  	    history_num=$_Dbg_hi+$history_num
++	  else
++	    _Dbg_msg "Invalid history number skipped: $history_num"
++	    history_num=-1
++	  fi
++	fi
++        ;;
++      * )
++      _Dbg_msg "Invalid history number skipped: $_Dbg_cmd"
++      history_num=-1
++    esac
++  fi
++  eval "$_resteglob"
++}
++
++# Print debugger history $1 is where to start or highest number if not given.
++# If $1 is negative, it is how many history items.
++# $2 is where to stop or 0 if not given.
++_Dbg_cmd_history_list() {
++
++  eval "$_seteglob"
++  if [[ $1 != $int_pat ]] && [[ $1 != -$int_pat ]] && [[ -n $1 ]] ; then 
++    _Dbg_msg "Invalid history number: $1"
++    eval "$_resteglob"
++    return 1
++  fi
++  eval "$_resteglob"
++
++  _Dbg_hi=${#_Dbg_history[@]}
++  local -i n=${1:-$_Dbg_hi-1}
++  local -i stop=${2:0}
++  local -i i
++
++  # Were we given a count rather than a starting history number? 
++  if (( n<0 )) ; then
++    ((stop=_Dbg_hi+n))
++    ((n=_Dbg_hi-1))
++  elif (( n > _Dbg_hi-1 )) ; then
++    ((n=_Dbg_hi-1))
++  fi
++
++  for (( i=n ; (( i >= stop && i >= 0 )) ; i-- )) ; do
++    _Dbg_msg "${i}: ${_Dbg_history[$i]}"
++  done
++}
++
++# This is put at the so we have something at the end when we debug this.
++typeset -r _Dbg_hist_ver=\
++'$Id: dbg-hist.inc,v 1.2 2003/02/27 07:27:46 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: **
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-init.inc cvs/debugger/dbg-init.inc
+--- bash-2.05b/debugger/dbg-init.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-init.inc	2003-05-20 20:02:42.000000000 +0200
+@@ -0,0 +1,107 @@
++# dbg-init.inc - Bourne Again Shell Debugger Global Variablesa
++
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# Note: the trend now is to move initializations which are generally
++# used in only one sub-part (e.g. variables for break/watch/actions) to 
++# the corresponding file.
++
++typeset _cur_fn            # current function of debugged program
++typeset -i _cur_line       # current line number of debugged program
++typeset -i _trace=0	   # init execution trace flag to on
++typeset -i _Dbg_steps=1 # No. of statements to run after setting trap
++
++if [[ -n $_Dbg_script ]] ; then 
++  _Dbg_steps=4
++else 
++  . ${_Dbg_libdir}/dbg-pre.inc
++  typeset -r _Dbg_source_file=$(_Dbg_expand_filename $0)
++  typeset -i _Dbg_n=$#
++  typeset -i _Dbg_i
++  typeset -i _Dbg_basename_only=${BASHDB_BASENAME_ONLY:-0}
++  declare -a _Dbg_script_args
++  for (( _Dbg_i=0; _Dbg_i<_Dbg_n ; _Dbg_i++ )) ; do
++    _Dbg_script_args[$_Dbg_i]=$1
++    shift
++  done
++  # Now that we've trashed the script parameters above, restore them.
++  _Dbg_set_str="set --"
++  for (( _Dbg_i=0; _Dbg_i<_Dbg_n ; _Dbg_i++ )) ; do
++    _Dbg_set_str="$_Dbg_set_str \"${_Dbg_script_args[$_Dbg_i]}\""
++  done
++  eval $_Dbg_set_str
++fi
++
++# Current next history entry to store into.
++typeset -i _Dbg_hi=0         
++
++# How many lines in a listing? 
++typeset -i _Dbg_listsize=10  
++
++# Annotation level.
++typeset -i _Dbg_annotate=0
++
++typeset -i _Dbg_need_input=1  # True if we need to reassign input.
++
++typeset last_next_step_cmd='s' # Default is step.
++typeset _Dbg_last_print='' # expression on last print command
++typeset _Dbg_last_printe='' # expression on last print expression command
++
++
++# strings to save and restore the setting of `extglob' in debugger functions
++# that need it
++typeset -r _seteglob='local __eopt=-u ; shopt -q extglob && __eopt=-s ; shopt -s extglob'
++typeset -r _resteglob='shopt $__eopt extglob'
++
++typeset -r int_pat="[0-9]*([0-9])"
++
++# If called from bashdb script rather than via "bash --debugger", skip
++# over some initial setup commands, like the initial "source" function
++# of debugged shell script.
++
++# Set tty to use for output. 
++if [[ -z $_Dbg_tty ]] ; then 
++  typeset _Dbg_tty;
++  _Dbg_tty=$(tty)
++  [[ $? != 0 ]] && _Dbg_tty=''
++fi
++
++# Equivalent to basename $0 -- the short program name
++typeset _Dbg_pname=${0##*/} 
++
++# $_Dbg_tmpdir could have been set by bashdb script rather than
++# bash --debugger
++[[ -z $_Dbg_tmpdir ]] && declare _Dbg_tmpdir=/tmp
++
++# Known normal IFS consisting of a space, tab and newline
++typeset -r _Dbg_space_IFS=" 	
++"
++
++# If BASHDB_QUIT_LEVELS is set to a positive number, this is the number
++# of levels (subshell or shell nestings) or we should exit out of.
++[ "X$BASHDB_QUIT_LEVELS" = "X" ] && BASHDB_QUIT_LEVELS=0
++
++# This is put at the so we have something at the end to stop at 
++# when we debug this. By stopping at the end all of the above functions
++# and variables can be tested.
++typeset -r _Dbg_init_ver=\
++'$Id: dbg-init.inc,v 1.6 2003/05/20 18:02:42 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-io.inc cvs/debugger/dbg-io.inc
+--- bash-2.05b/debugger/dbg-io.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-io.inc	2003-08-02 21:54:47.000000000 +0200
+@@ -0,0 +1,143 @@
++# dbg-io.inc - Bourne Again Shell Debugger Input/Output routines
++#
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# ==================== VARIABLES =======================================
++
++# _source_mungedfilename is array which contains source_lines.
++# _read_mungedfilename is array which is 1 filename has been read in.
++
++# Filename that's used when no source file is around. In particular
++# if bash --debugger -c 'string' was used to invoke us.
++typeset -r _Dbg_bogus_file='*BOGUS*'
++
++typeset -a _Dbg_filenames # names of all source files read
++typeset _cur_source_file  # current source file of debugged program
++typeset _cur_filevar      # source file mangled so it can be used in a variable
++typeset -i _curline       # current line number of debugged program
++
++# ===================== FUNCTIONS =======================================
++
++# print message to output device
++_Dbg_msg() {
++  if [[ -n $_Dbg_tty  ]] ; then
++    builtin echo -e "$@" >>$_Dbg_tty
++  else
++    builtin echo -e "$@"
++  fi
++}
++
++# print message to output device without a carriage return at the end
++_Dbg_msg_nocr() {
++  if [[ -n $_Dbg_tty  ]] ; then
++    builtin echo -n -e "$@" >>$_Dbg_tty
++  else
++    builtin echo -n -e "$@"
++  fi
++}
++
++# print message to output device
++_Dbg_printf() {
++  local format=$1
++  shift
++  if [[ -n $_Dbg_tty ]] ; then
++    builtin printf "$format" "$@" >>$_Dbg_tty
++  else
++    builtin printf "$format" "$@"
++  fi
++  _Dbg_msg ""
++}
++
++# print message to output device without a carriage return at the end
++_Dbg_printf_nocr() {
++  local format=$1
++  shift 
++  if [[ -n $_Dbg_tty ]] ; then 
++    builtin printf "$format" "$@" >>$_Dbg_tty
++  else
++    builtin printf "$format" "$@"
++  fi
++}
++
++# Return text for source line for line $1 of filename $2 in variable
++# $source_line. The hope is that this has been declared "local" in the 
++# caller.
++
++# If $2 is omitted, # use _cur_source_file, if $1 is omitted use _curline.
++_Dbg_get_source_line() {
++  local lineno=${1:-$_curline}
++  local filename=${2:-$_cur_source_file}
++  local filevar=`_Dbg_file2var $filename`
++  local is_read=`_Dbg_get_assoc_scalar_entry "_Dbg_read_" $filevar`
++  [ $is_read ] || _Dbg_readin $filename 
++  
++  source_line=`_Dbg_get_assoc_array_entry _Dbg_source_${filevar} $lineno`
++}
++
++# Read $1 into _source_$1 array.
++# Variable _read_$1 will be set to 1 to note that the file has been read.
++
++_Dbg_readin() {
++  # set -xv
++  local filename=${1:-$_cur_source_file}
++
++  local -i i=0
++  local filevar
++
++  if [ $filename == $_Dbg_bogus_file ] ; then 
++    filevar='ABOGUSA'
++    local cmd="_Dbg_source_${filevar}[1]=\"$BASH_EXECUTION_STRING\""
++    eval $cmd
++    i=1
++  else 
++    local fullname=$(_Dbg_resolve_expand_filename $filename)
++    filevar=`_Dbg_file2var $filename`
++    if [[ -r $fullname ]] ; then
++      for (( i=1; 1 ; i++ )) ; do 
++	local source_entry="_Dbg_source_${filevar}[$i]"
++	local readline_cmd="read -r $source_entry; rc=\$?";
++	local -i rc=1
++	if (( i % 1000 == 0 )) ; then
++	  (( i==1000 )) && _Dbg_msg_nocr "Reading $filename "
++	  _Dbg_msg_nocr "${i}... "
++	fi
++	eval $readline_cmd
++	if [[ $rc != 0 ]]  ; then 
++	  break;
++	fi
++      done  < $fullname
++    fi
++  fi
++  
++  (( i >= 1000 )) && _Dbg_msg "done."
++
++  _Dbg_set_assoc_scalar_entry "_Dbg_read_" $filevar 1
++  _Dbg_set_assoc_scalar_entry "_Dbg_maxline_" $filevar $i
++  
++  # Add $filename to list of all filenames
++  _Dbg_filenames[${#_Dbg_filenames[@]}]=$fullname;
++  # set +xv
++}
++
++# This is put at the so we have something at the end when we debug this.
++typeset -r _Dbg_io_ver=\
++'$Id: dbg-io.inc,v 1.6 2003/08/02 19:54:47 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-list.inc cvs/debugger/dbg-list.inc
+--- bash-2.05b/debugger/dbg-list.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-list.inc	2003-08-02 21:54:47.000000000 +0200
+@@ -0,0 +1,230 @@
++# bashdb-list.inc - Bourne Again Shell Debugger list/search commands
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# List search commands/routines
++
++# Last search pattern used.
++typeset _Dbg_last_search_pat
++
++# current line to be listed
++typeset -i _Dbg_listline
++
++# Print source line in standard format for line $1 of filename $2.  If
++# $2 is omitted, use _cur_source_file, if $1 is omitted use _curline.
++
++_Dbg_print_source_line() {
++  local line_number=${1:-$_curline}
++  local filename=${2:-$_cur_source_file}
++  local source_line
++  _Dbg_get_source_line $line_number $filename
++  filename=$(_Dbg_adjust_filename "$filename")
++  _Dbg_msg "(${filename}:${line_number}):
++${line_number}:\t${source_line}"
++
++  # If we are at the same place in the file but the command has changed,
++  # then we have multiple commands on the line. So print which one we are
++  # currently at.
++  if [[ $_Dbg_show_command == "on" ]] ; then
++      _Dbg_msg "$_Dbg_bash_command"
++  elif [[ $_Dbg_last_curline == $_curline ]] \
++    && [[ $_Dbg_last_source_file == $_cur_source_file ]] \
++    && [[ $_Dbg_last_bash_command != $_Dbg_bash_command \
++    && $_Dbg_show_command == "auto" ]] ; then
++      _Dbg_msg "$_Dbg_bash_command"
++  fi
++}
++
++
++# l [start|.] [cnt] List cnt lines from line start.
++# l sub       List source code fn
++_Dbg_cmd_list() {
++  if [[ -n $1 ]] ; then
++    first_arg=$1
++    shift
++  else
++    first_arg=.
++  fi
++
++  if [ $first_arg == '.' ] ; then
++    _Dbg_list $_cur_source_file $*
++    return
++  fi
++
++  local -a word=($(_Dbg_parse_linespec "$first_arg"))
++  if [[ ${#word[@]} == 0 ]] ; then
++    _Dbg_msg "Invalid linespec $n"
++    return
++  fi
++
++  local -i line_number=${word[0]}
++  local filename=${word[1]}
++  local full_filename=`_Dbg_is_file $filename`
++  if [[ -n $full_filename ]] ; then 
++    (( $line_number ==  0 )) && line_number=1
++    _Dbg_check_line $line_number "$full_filename"
++    (( $? == 0 )) && \
++      _Dbg_list "$full_filename" "$line_number" $*
++  else
++    _Dbg_msg "File $filename not found in read-in files."
++    _Dbg_msg "See 'info files' for a list of known files."
++  fi
++}
++
++# /search/
++_Dbg_cmd_search_back() {
++  local delim_search_pat=$1
++  if [[ -z "$1" ]] ; then
++    _Dbg_msg "Need a search pattern"
++    return 1
++  fi
++  shift
++
++  case "$delim_search_pat" in
++    [?] )
++      ;;
++    [?]* )
++      local -a word=($(_Dbg_split '?' $delim_search_pat))
++      _Dbg_last_search_pat=${word[0]}
++      ;;
++    # Error
++    * )
++      _Dbg_last_search_pat=$delim_search_pat
++  esac
++  local -i i
++  local -i max_line=`_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $_cur_filevar`
++  for (( i=_Dbg_listline-1; i > 0 ; i-- )) ; do
++    local source_line
++    _Dbg_get_source_line $i
++    eval "$_seteglob"
++    if [[ $source_line == *$_Dbg_last_search_pat* ]] ; then
++      eval "$_resteglob"
++      _Dbg_cmd_list $i 1
++      _Dbg_listline=$i
++      return 0
++    fi
++    eval "$_resteglob"
++  done
++  _Dbg_msg "search pattern: $_Dbg_last_search_pat not found."
++  return 1
++
++}
++
++# /search/
++_Dbg_cmd_search() {
++  local delim_search_pat=${1}
++  if [[ -z "$1" ]] ; then
++    _Dbg_msg "Need a search pattern"
++    return 1
++  fi
++  shift
++  local search_pat
++  case "$delim_search_pat" in
++    / )
++      ;;
++    /* )
++      local -a word=($(_Dbg_split "/" $delim_search_pat))
++      _Dbg_last_search_pat=${word[0]}
++      ;;
++    * )
++      _Dbg_last_search_pat=$delim_search_pat
++  esac
++  local -i i
++  local -i max_line=`_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $_cur_filevar`
++  for (( i=_Dbg_listline+1; i < max_line ; i++ )) ; do
++    local source_line
++    _Dbg_get_source_line $i
++    eval "$_seteglob"
++    if [[ $source_line == *$_Dbg_last_search_pat* ]] ; then
++      eval "$_resteglob"
++      _Dbg_cmd_list $i 1
++      _Dbg_listline=$i
++      return 0
++    fi
++    eval "$_resteglob"
++  done
++  _Dbg_msg "search pattern: $_Dbg_last_search_pat not found."
++  return 1
++
++}
++
++# S [[!]pat] List Subroutine names [not] matching a pattern
++# Pass along whether or not to print "system" functions?
++_Dbg_cmd_list_subroutines() {
++
++  local pat=$1
++
++  local -a fns_a=(`_Dbg_get_functions 0 "$pat"`)
++  local -i i
++  for (( i=0; (( i < ${#fns_a[@]} )) ; i++ )) ; do
++    _Dbg_msg ${fns_a[$i]}
++  done
++}
++
++# list $3 lines starting at line $2 of file $1. If $1 is '', use
++# $_cur_source_file value.  If $3 is ommited, print $_Dbg_listsize
++# lines. if $2 is omitted, use global variable $_curline.
++
++_Dbg_list() {
++    local filename=${1:-$_cur_source_file}
++
++    if [[ $2 = . ]]; then
++      _Dbg_listline=$_curline
++    elif [[ -n $2 ]] ; then
++      _Dbg_listline=$2
++    fi
++    (( _Dbg_listline==0 && _Dbg_listline++))
++
++    local -ir cnt=${3:-$_Dbg_listsize}
++    local -ir n=$((_Dbg_listline+cnt-1))
++
++    local source_line
++
++    local filevar=`_Dbg_file2var $filename`
++    local is_read
++    is_read=`_Dbg_get_assoc_scalar_entry "_Dbg_read_" $filevar`
++    [ $is_read ] || _Dbg_readin $filename
++    local -i max_line=`_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $filevar`
++    #   echo "debug: -- max_line: $max_line --"
++
++    if (( _Dbg_listline > max_line )) ; then
++      _Dbg_msg \
++	"Line number $_Dbg_listline out of range;" \
++      "$filename has $max_line lines."
++      return 1
++    fi
++
++    for ((  ; (( _Dbg_listline <= n && _Dbg_listline <= max_line )) \
++            ; _Dbg_listline++ )) ; do
++     local prefix="   "
++     local source_line
++     _Dbg_get_source_line $_Dbg_listline $filename
++
++     (( _Dbg_listline == _curline )) \
++       && [[ $filename == $_cur_source_file ]] &&  prefix="==>"
++     _Dbg_printf "%3d:%s%s" $_Dbg_listline "$prefix" "$source_line"
++    done
++    (( _Dbg_listline > max_line && _Dbg_listline-- ))
++    return 0
++}
++
++# This is put at the so we have something at the end when we debug this.
++_Dbg_list_ver='$Id: dbg-list.inc,v 1.5 2003/08/02 19:54:47 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-main.inc.in cvs/debugger/dbg-main.inc.in
+--- bash-2.05b/debugger/dbg-main.inc.in	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-main.inc.in	2003-08-25 18:34:35.000000000 +0200
+@@ -0,0 +1,55 @@
++# dbg-main.inc - Bourne Again Shell Debugger Main Include
++
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++typeset -r _Dbg_main_ver=\
++'$Id: dbg-main.inc.in,v 1.1 2003/08/25 16:34:35 snikkt Exp $'
++
++# Are we using a debugger-enabled bash? If not let's stop right here.
++if [[ -z "${BASH_SOURCE[0]}" ]] ; then 
++  echo "Sorry, you need to use a debugger-enabled version of bash." 2>&1
++  exit 2
++fi
++
++# $_Dbg_libdir could have been set by bashdb script.
++# If not, set if "bash --debugger"
++[ -z $_Dbg_libdir ] && typeset _Dbg_libdir=@PKGDATADIR@
++
++. ${_Dbg_libdir}/dbg-init.inc  # Initializations - put sooner
++. ${_Dbg_libdir}/dbg-brk.inc   # Breakpoints, watchpoints, actions
++. ${_Dbg_libdir}/dbg-file.inc  # File functions
++. ${_Dbg_libdir}/dbg-fns.inc   # Miscellaneous helper functions
++. ${_Dbg_libdir}/dbg-help.inc  # Help routines
++. ${_Dbg_libdir}/dbg-hist.inc  # History routines
++. ${_Dbg_libdir}/dbg-io.inc    # I/O routines - has to come before 
++                                          # cmds
++. ${_Dbg_libdir}/dbg-cmds.inc  # Debugger commands
++. ${_Dbg_libdir}/dbg-list.inc  # List/search commands
++. ${_Dbg_libdir}/dbg-stack.inc # Call-stack routines
++. ${_Dbg_libdir}/dbg-set.inc   # set/show routines
++. ${_Dbg_libdir}/dbg-sig.inc   # signal-handling routines
++
++[ -n "$BASHDB_RESTART_FILE" ] \
++   && [ -r "$BASHDB_RESTART_FILE" ] &&  source $BASHDB_RESTART_FILE
++
++trap '_Dbg_debug_trap_handler 0 "$BASH_COMMAND" "$@"' DEBUG
++# echo '*** we were here***'  # uncomment to test that we were run.
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-pre.inc.in cvs/debugger/dbg-pre.inc.in
+--- bash-2.05b/debugger/dbg-pre.inc.in	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-pre.inc.in	2003-03-27 06:34:12.000000000 +0100
+@@ -0,0 +1,79 @@
++# dbg-pre.inc - Bourne Again Shell Debugger Global Variables
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# We put definiitions common to both the script debugger and bash
++# --debugger. In contrast to other routines this is sourced early --
++# before most of the bashdb script is run. The other routines are
++# done near the end of the bashdb script. In this way the script can
++# has access to definitions that --debugger has without duplicating code.
++
++# Note: the trend now is to move initializations which are generally
++# used in only one sub-part (e.g. variables for break/watch/actions) to 
++# the corresponding file.
++
++typeset -r _Dbg_release='bash-@BASHVERS@-@RELSTATUS@'
++
++# This is put at the so we have something at the end to stop at 
++# when we debug this. By stopping at the end all of the above functions
++# and variables can be tested.
++typeset -r _Dbg_pre_ver=\
++'$Id: dbg-pre.inc.in,v 1.3 2003/03/27 05:34:12 rockyb Exp $'
++
++# Expand filename given as $1.
++# we echo the expanded name or return $1 unchanged if a bad filename.
++# Return is 0 if good or 1 if bad.
++# File globbing is handled. 
++# Note we don't check that the file exists, just that the format is 
++# valid; we do check that we can "search" the directory implied in the 
++# filename.
++
++_Dbg_expand_filename() {
++  local -r filename="$1"
++
++  # Break out basename and dirname
++  local -r basename=${filename##*/}
++  local dirname=${filename%/*}
++
++  # No slash given in filename? Then use . for dirname
++  [[ $dirname == $basename ]] && dirname="."
++
++  # Dirname is ''? Then use / for dirname
++  dirname=${dirname:-/}
++
++  # Handle tilde expansion in dirname
++  local glob_cmd="dirname=`expr $dirname`"
++  eval $glob_cmd 2>/dev/null
++
++  local long_path;
++  long_path=`(cd $dirname && pwd) 2>/dev/null`
++  if (( $? == 0 )) ; then
++    if [[ $long_path == '/' ]] ; then
++      echo "/$basename"
++    else
++      echo "$long_path/$basename"
++    fi
++    return 0
++  else
++    echo $filename
++    return 1
++  fi
++}
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-set-d-vars.inc cvs/debugger/dbg-set-d-vars.inc
+--- bash-2.05b/debugger/dbg-set-d-vars.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-set-d-vars.inc	2003-02-27 08:27:46.000000000 +0100
+@@ -0,0 +1,34 @@
++#$Id: dbg-set-d-vars.inc,v 1.2 2003/02/27 07:27:46 rockyb Exp $
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# set dollar variables ($1, $2, ... $?) 
++# to their values in the debugged environment before we entered the debugger.
++
++local _Dbg_set_str="set --"
++local -i _Dbg__i
++for (( _Dbg__i=1 ; _Dbg__i<=${#_Dbg_arg[@]}; _Dbg__i++ )) ; do
++  local dq_argi=$(_Dbg_esc_dq "${_Dbg_arg[$_Dbg__i]}")
++  _Dbg_set_str="$_Dbg_set_str \"$dq_argi\""
++done
++eval $_Dbg_set_str
++
++_Dbg_set_dol_q
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-set.inc cvs/debugger/dbg-set.inc
+--- bash-2.05b/debugger/dbg-set.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-set.inc	2003-03-22 01:16:31.000000000 +0100
+@@ -0,0 +1,525 @@
++# dbg-set.inc - Bourne Again Shell Debugger Set Routines
++#
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# Sets whether or not to display command to be executed in debugger prompt.
++# If yes, always show. If auto, show only if the same line is to be run
++# but the command is different.
++typeset _Dbg_show_command="auto"
++
++_Dbg_cmd_set() {
++  local set_cmd=$1
++  if [[ $set_cmd == '' ]] ; then
++    _Dbg_msg "Argument required (expression to compute)."
++    return;
++  fi
++  shift
++  case $set_cmd in 
++    ar | arg | args )
++      # We use the loop below rather than _Dbg_set_args="(@)" because
++      # we want to preserve embedded blanks in the arguments.
++      _Dbg_script_args=()
++      local -i i
++      local -i n=$#
++      for (( i=0; i<n ; i++ )) ; do
++	_Dbg_write_journal_eval "_Dbg_script_args[$i]=$1"
++	shift
++      done
++      ;;
++    an | ann | anno | annot | annota | annotat | annotate )
++      eval "$_seteglob"
++      if [[ $1 == $int_pat ]] ; then 
++	if (( $1 > 1 )) ; then
++	  _Dbg_msg "annotation level must be 0 or 1"
++	else
++	_Dbg_write_journal_eval "_Dbg_annotate=$1"
++	fi
++      else
++	eval "$_resteglob"
++	_Dbg_msg "Integer argument expected; got: $1"
++	return 1
++      fi
++      eval "$_resteglob"
++      return 0
++      ;;
++    b | ba | bas | base | basen | basena | basenam | basename )
++      local onoff=${1:-'off'}
++      case $onoff in 
++	on ) 
++	  _Dbg_write_journal_eval "_Dbg_basename_only=1"
++	  ;;
++	off )
++	  _Dbg_write_journal_eval "_Dbg_basename_only=0"
++	  ;;
++	* )
++	  _Dbg_msg "\"on\" or \"off\" expected."
++      esac
++      ;;
++    e | ed | edi | edit | editi | editin | editing )
++      local onoff=${1:-'on'}
++      case $onoff in 
++	on ) 
++	  _Dbg_edit='-e'
++	  ;;
++	off )
++	  _Dbg_edit=''
++	  ;;
++	* )
++	  _Dbg_msg "\"on\" or \"off\" expected."
++      esac
++      ;;
++    d|de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging )
++      local onoff=${1:-'on'}
++      case $onoff in 
++	on ) 
++	  _Dbg_write_journal_eval "_Dbg_debug_debugger=1"
++	  ;;
++	off )
++	  _Dbg_write_journal_eval "_Dbg_debug_debugger=0"
++	  ;;
++	* )
++	  _Dbg_msg "\"on\" or \"off\" expected."
++      esac
++      ;;
++    li | lis | list | lists | listsi | listsiz | listsize )
++      eval "$_seteglob"
++      if [[ $1 == $int_pat ]] ; then 
++	_Dbg_write_journal_eval "_Dbg_listsize=$1"
++      else
++	eval "$_resteglob"
++	_Dbg_msg "Integer argument expected; got: $1"
++	return 1
++      fi
++      eval "$_resteglob"
++      return 0
++      ;;
++    p | pr | pro | prom | promp | prompt )
++      _Dbg_prompt_str="$1"
++      ;;
++    sho|show|showc|showco|showcom|showcomm|showcomma|showcomman|showcommand )
++      case $1 in 
++	on | off | auto )
++	  _Dbg_write_journal_eval "_Dbg_show_command=$1"
++	  ;;
++	* )
++	  _Dbg_msg "\"on\", \"off\" or \"auto\" expected."
++      esac
++      return 0
++      ;;
++    *)
++      _Dbg_msg "Unknown subcommand: $set_cmd"
++      return 1
++  esac
++}
++
++_Dbg_cmd_show() {
++  local show_cmd=$1
++  local label=$2
++
++  # Warranty, copying and directories are omitted below.
++  local -r subcmds="args basename debugger editing listsize prompt"
++
++  if [[ -z $show_cmd ]] ; then 
++      local thing
++      for thing in $subcmds ; do 
++	_Dbg_cmd_show $thing 1
++      done
++      return
++  fi
++
++  case $show_cmd in 
++    ar | arg | args )
++      [[ -n $label ]] && label='args:     '
++      _Dbg_msg \
++"${label}Argument list to give script when debugged program starts is:\n" \
++"      \"${_Dbg_script_args[@]}\"."
++      return 0
++      ;;
++    an | ann | anno | annot | annota | annotat | annotate )
++      [[ -n $label ]] && label='annotate: '
++     _Dbg_msg \
++"${label}Annotation_level is" \
++      "$_Dbg_annotate."
++      return 0
++      ;;
++    b | ba | bas | base | basen | basena | basenam | basename )
++      [[ -n $label ]] && label='basename: '
++      local onoff="off."
++      (( $_Dbg_basename_only != 0 )) && onoff='on.'
++      _Dbg_msg \
++"${label}Show short filenames (the basename) in debug output is" $onoff
++      return 0
++      ;;
++    com | comm | comma | comman | command | commands )
++      local -i hi_start=_Dbg_hi-1
++      local -i hi_stop=hi_start-10
++      _Dbg_cmd_history_list $hi_start $hi_stop
++      return 0
++      ;;
++    cop | copy| copyi | copyin | copying )
++      _Dbg_msg \
++"
++		    GNU GENERAL PUBLIC LICENSE
++		       Version 2, June 1991
++
++ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
++                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ Everyone is permitted to copy and distribute verbatim copies
++ of this license document, but changing it is not allowed.
++
++			    Preamble
++
++  The licenses for most software are designed to take away your
++freedom to share and change it.  By contrast, the GNU General Public
++License is intended to guarantee your freedom to share and change free
++software--to make sure the software is free for all its users.  This
++General Public License applies to most of the Free Software
++Foundation's software and to any other program whose authors commit to
++using it.  (Some other Free Software Foundation software is covered by
++the GNU Library General Public License instead.)  You can apply it to
++your programs, too.
++
++  When we speak of free software, we are referring to freedom, not
++price.  Our General Public Licenses are designed to make sure that you
++have the freedom to distribute copies of free software (and charge for
++this service if you wish), that you receive source code or can get it
++if you want it, that you can change the software or use pieces of it
++in new free programs; and that you know you can do these things.
++
++  To protect your rights, we need to make restrictions that forbid
++anyone to deny you these rights or to ask you to surrender the rights.
++These restrictions translate to certain responsibilities for you if you
++distribute copies of the software, or if you modify it.
++
++  For example, if you distribute copies of such a program, whether
++gratis or for a fee, you must give the recipients all the rights that
++you have.  You must make sure that they, too, receive or can get the
++source code.  And you must show them these terms so they know their
++rights.
++
++  We protect your rights with two steps: (1) copyright the software, and
++(2) offer you this license which gives you legal permission to copy,
++distribute and/or modify the software.
++
++  Also, for each author's protection and ours, we want to make certain
++that everyone understands that there is no warranty for this free
++software.  If the software is modified by someone else and passed on, we
++want its recipients to know that what they have is not the original, so
++that any problems introduced by others will not reflect on the original
++authors' reputations.
++
++  Finally, any free program is threatened constantly by software
++patents.  We wish to avoid the danger that redistributors of a free
++program will individually obtain patent licenses, in effect making the
++program proprietary.  To prevent this, we have made it clear that any
++patent must be licensed for everyone's free use or not licensed at all.
++
++  The precise terms and conditions for copying, distribution and
++modification follow.
++
++		    GNU GENERAL PUBLIC LICENSE
++   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
++
++  0. This License applies to any program or other work which contains
++a notice placed by the copyright holder saying it may be distributed
++under the terms of this General Public License.  The \"Program\", below,
++refers to any such program or work, and a \"work based on the Program\"
++means either the Program or any derivative work under copyright law:
++that is to say, a work containing the Program or a portion of it,
++either verbatim or with modifications and/or translated into another
++language.  (Hereinafter, translation is included without limitation in
++the term \"modification\".)  Each licensee is addressed as \"you\".
++
++Activities other than copying, distribution and modification are not
++covered by this License; they are outside its scope.  The act of
++running the Program is not restricted, and the output from the Program
++is covered only if its contents constitute a work based on the
++Program (independent of having been made by running the Program).
++Whether that is true depends on what the Program does.
++
++  1. You may copy and distribute verbatim copies of the Program's
++source code as you receive it, in any medium, provided that you
++conspicuously and appropriately publish on each copy an appropriate
++copyright notice and disclaimer of warranty; keep intact all the
++notices that refer to this License and to the absence of any warranty;
++and give any other recipients of the Program a copy of this License
++along with the Program.
++
++You may charge a fee for the physical act of transferring a copy, and
++you may at your option offer warranty protection in exchange for a fee.
++
++  2. You may modify your copy or copies of the Program or any portion
++of it, thus forming a work based on the Program, and copy and
++distribute such modifications or work under the terms of Section 1
++above, provided that you also meet all of these conditions:
++
++    a) You must cause the modified files to carry prominent notices
++    stating that you changed the files and the date of any change.
++
++    b) You must cause any work that you distribute or publish, that in
++    whole or in part contains or is derived from the Program or any
++    part thereof, to be licensed as a whole at no charge to all third
++    parties under the terms of this License.
++
++    c) If the modified program normally reads commands interactively
++    when run, you must cause it, when started running for such
++    interactive use in the most ordinary way, to print or display an
++    announcement including an appropriate copyright notice and a
++    notice that there is no warranty (or else, saying that you provide
++    a warranty) and that users may redistribute the program under
++    these conditions, and telling the user how to view a copy of this
++    License.  (Exception: if the Program itself is interactive but
++    does not normally print such an announcement, your work based on
++    the Program is not required to print an announcement.)
++
++These requirements apply to the modified work as a whole.  If
++identifiable sections of that work are not derived from the Program,
++and can be reasonably considered independent and separate works in
++themselves, then this License, and its terms, do not apply to those
++sections when you distribute them as separate works.  But when you
++distribute the same sections as part of a whole which is a work based
++on the Program, the distribution of the whole must be on the terms of
++this License, whose permissions for other licensees extend to the
++entire whole, and thus to each and every part regardless of who wrote it.
++
++Thus, it is not the intent of this section to claim rights or contest
++your rights to work written entirely by you; rather, the intent is to
++exercise the right to control the distribution of derivative or
++collective works based on the Program.
++
++In addition, mere aggregation of another work not based on the Program
++with the Program (or with a work based on the Program) on a volume of
++a storage or distribution medium does not bring the other work under
++the scope of this License.
++
++  3. You may copy and distribute the Program (or a work based on it,
++under Section 2) in object code or executable form under the terms of
++Sections 1 and 2 above provided that you also do one of the following:
++
++    a) Accompany it with the complete corresponding machine-readable
++    source code, which must be distributed under the terms of Sections
++    1 and 2 above on a medium customarily used for software interchange; or,
++
++    b) Accompany it with a written offer, valid for at least three
++    years, to give any third party, for a charge no more than your
++    cost of physically performing source distribution, a complete
++    machine-readable copy of the corresponding source code, to be
++    distributed under the terms of Sections 1 and 2 above on a medium
++    customarily used for software interchange; or,
++
++    c) Accompany it with the information you received as to the offer
++    to distribute corresponding source code.  (This alternative is
++    allowed only for noncommercial distribution and only if you
++    received the program in object code or executable form with such
++    an offer, in accord with Subsection b above.)
++
++The source code for a work means the preferred form of the work for
++making modifications to it.  For an executable work, complete source
++code means all the source code for all modules it contains, plus any
++associated interface definition files, plus the scripts used to
++control compilation and installation of the executable.  However, as a
++special exception, the source code distributed need not include
++anything that is normally distributed (in either source or binary
++form) with the major components (compiler, kernel, and so on) of the
++operating system on which the executable runs, unless that component
++itself accompanies the executable.
++
++If distribution of executable or object code is made by offering
++access to copy from a designated place, then offering equivalent
++access to copy the source code from the same place counts as
++distribution of the source code, even though third parties are not
++compelled to copy the source along with the object code.
++
++  4. You may not copy, modify, sublicense, or distribute the Program
++except as expressly provided under this License.  Any attempt
++otherwise to copy, modify, sublicense or distribute the Program is
++void, and will automatically terminate your rights under this License.
++However, parties who have received copies, or rights, from you under
++this License will not have their licenses terminated so long as such
++parties remain in full compliance.
++
++  5. You are not required to accept this License, since you have not
++signed it.  However, nothing else grants you permission to modify or
++distribute the Program or its derivative works.  These actions are
++prohibited by law if you do not accept this License.  Therefore, by
++modifying or distributing the Program (or any work based on the
++Program), you indicate your acceptance of this License to do so, and
++all its terms and conditions for copying, distributing or modifying
++the Program or works based on it.
++
++  6. Each time you redistribute the Program (or any work based on the
++Program), the recipient automatically receives a license from the
++original licensor to copy, distribute or modify the Program subject to
++these terms and conditions.  You may not impose any further
++restrictions on the recipients' exercise of the rights granted herein.
++You are not responsible for enforcing compliance by third parties to
++this License.
++
++  7. If, as a consequence of a court judgment or allegation of patent
++infringement or for any other reason (not limited to patent issues),
++conditions are imposed on you (whether by court order, agreement or
++otherwise) that contradict the conditions of this License, they do not
++excuse you from the conditions of this License.  If you cannot
++distribute so as to satisfy simultaneously your obligations under this
++License and any other pertinent obligations, then as a consequence you
++may not distribute the Program at all.  For example, if a patent
++license would not permit royalty-free redistribution of the Program by
++all those who receive copies directly or indirectly through you, then
++the only way you could satisfy both it and this License would be to
++refrain entirely from distribution of the Program.
++
++If any portion of this section is held invalid or unenforceable under
++any particular circumstance, the balance of the section is intended to
++apply and the section as a whole is intended to apply in other
++circumstances.
++
++It is not the purpose of this section to induce you to infringe any
++patents or other property right claims or to contest validity of any
++such claims; this section has the sole purpose of protecting the
++integrity of the free software distribution system, which is
++implemented by public license practices.  Many people have made
++generous contributions to the wide range of software distributed
++through that system in reliance on consistent application of that
++system; it is up to the author/donor to decide if he or she is willing
++to distribute software through any other system and a licensee cannot
++impose that choice.
++
++This section is intended to make thoroughly clear what is believed to
++be a consequence of the rest of this License.
++
++  8. If the distribution and/or use of the Program is restricted in
++certain countries either by patents or by copyrighted interfaces, the
++original copyright holder who places the Program under this License
++may add an explicit geographical distribution limitation excluding
++those countries, so that distribution is permitted only in or among
++countries not thus excluded.  In such case, this License incorporates
++the limitation as if written in the body of this License.
++
++  9. The Free Software Foundation may publish revised and/or new versions
++of the General Public License from time to time.  Such new versions will
++be similar in spirit to the present version, but may differ in detail to
++address new problems or concerns.
++
++Each version is given a distinguishing version number.  If the Program
++specifies a version number of this License which applies to it and \"any
++later version\", you have the option of following the terms and conditions
++either of that version or of any later version published by the Free
++Software Foundation.  If the Program does not specify a version number of
++this License, you may choose any version ever published by the Free Software
++Foundation.
++
++  10. If you wish to incorporate parts of the Program into other free
++programs whose distribution conditions are different, write to the author
++to ask for permission.  For software which is copyrighted by the Free
++Software Foundation, write to the Free Software Foundation; we sometimes
++make exceptions for this.  Our decision will be guided by the two goals
++of preserving the free status of all derivatives of our free software and
++of promoting the sharing and reuse of software generally.
++"
++      return 0
++      ;;
++    e | ed | edi | edit | editi | editin | editing )
++      [[ -n $label ]] && label='editing:  '
++      local onoff="on."
++      [[ -z $_Dbg_edit ]] && onoff='off.'
++     _Dbg_msg \
++"${label}Editing of command lines as they are typed is" $onoff
++      return 0
++      ;;
++    de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging )
++      local onoff=${1:-'on'}
++      [[ -n $label ]] && label='debugger: '
++      local onoff="off."
++      (( $_Dbg_debug_debugger )) && onoff='on.'
++     _Dbg_msg \
++"${label}Allow debugging the debugger is" $onoff
++      return 0
++      ;;
++    di|dir|dire|direc|direct|directo|director|directori|directorie|directories)
++      local list=${_Dbg_dir[0]}
++      local -i n=${#_Dbg_dir[@]}
++      local -i i
++      for (( i=1 ; i < n; i++ )) ; do
++	list="${list}:${_Dbg_dir[i]}"
++      done
++
++     _Dbg_msg "Source directories searched: $list"
++      return 0
++      ;;
++    li | lis | list | lists | listsi | listsiz | listsize )
++      [[ -n $label ]] && label='listsize: '
++     _Dbg_msg \
++"${label}Number of source lines bashdb will list by default is" \
++      "$_Dbg_listsize."
++      return 0
++      ;;
++    p | pr | pro | prom | promp | prompt )
++      [[ -n $label ]] && label='prompt:   '
++      _Dbg_msg \
++"${label}bashdb's prompt is:\n" \
++"      \"$_Dbg_prompt_str\"."
++      return 0
++      ;;
++    sho|show|showc|showco|showcom|showcomm|showcomma|showcomman|showcommand )
++      [[ -n $label ]] && label='showcommand: '
++     _Dbg_msg \
++"${label}Show commands in debugger prompt is" \
++      "$_Dbg_show_command."
++      return 0
++      ;;
++    v | ve | ver | vers | versi | versio | version )
++      _Dbg_cmd_show_versions
++      return 0
++      ;;
++    w | wa | war | warr | warra | warran | warrant | warranty )
++      _Dbg_cmd_info warranty
++      return 0
++      ;;
++    *)
++      _Dbg_msg "Don't know how to show $show_cmd."
++      return 1
++  esac
++}
++
++_Dbg_cmd_show_versions()
++{
++  _Dbg_msg "Release => $_Dbg_release"
++  [[ -n $_Dbg_script ]] && 
++  _Dbg_msg "'bashdb' => $_Dbg_ver"
++  _Dbg_msg "'brk'    => $_Dbg_brk_ver"
++  _Dbg_msg "'cmds'   => $_Dbg_cmd_ver"
++  _Dbg_msg "'file'   => $_Dbg_file_ver"
++  _Dbg_msg "'fns'    => $_Dbg_fns_ver"
++  _Dbg_msg "'help'   => $_Dbg_help_ver"
++  _Dbg_msg "'hist'   => $_Dbg_hist_ver"
++  _Dbg_msg "'init'   => $_Dbg_init_ver"
++  _Dbg_msg "'io'     => $_Dbg_io_ver"
++  _Dbg_msg "'list'   => $_Dbg_list_ver"
++  _Dbg_msg "'main'   => $_Dbg_main_ver"
++  _Dbg_msg "'sig'    => $_Dbg_sig_ver"
++  _Dbg_msg "'set'    => $_Dbg_set_ver"
++  _Dbg_msg "'stack'  => $_Dbg_stack_ver"
++}
++
++# This is put at the so we have something at the end when we debug this.
++typeset -r _Dbg_set_ver=\
++'$Id: dbg-set.inc,v 1.5 2003/03/22 00:16:31 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-sig-ret.inc cvs/debugger/dbg-sig-ret.inc
+--- bash-2.05b/debugger/dbg-sig-ret.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-sig-ret.inc	2003-02-27 08:27:46.000000000 +0100
+@@ -0,0 +1,52 @@
++# dbg-sig-ret.inc - Bourne Again Shell Debugger Signal handling routines
++#
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++if [[ $_Dbg_old_ERR_handler != '' ]] ; then
++  eval $_Dbg_old_ERR_handler
++else 
++ trap '' ERR
++fi
++
++## Should make sure we are not using our own return handler...
++#if [[ $_Dbg_old_RETURN_handler != '' ]] ; then
++#  eval $_Dbg_old_RETURN_handler
++#else 
++#  trap '' RETURN
++#fi
++
++if [[ $_Dbg_old_INT_handler != '' ]] ; then
++  eval $_Dbg_old_INT_handler
++else 
++  trap '' INT
++fi
++
++# if [[ $_Dbg_old_EXIT_handler != '' ]] ; then
++#   eval $_Dbg_old_EXIT_handler
++# else 
++#   trap '' EXIT
++# fi
++
++local _Dbg_old_IFS="$IFS"
++IFS="$_Dbg_space_IFS";
++set -$_Dbg_old_set_opts
++IFS="$_Dbg_old_IFS";
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-sig.inc cvs/debugger/dbg-sig.inc
+--- bash-2.05b/debugger/dbg-sig.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-sig.inc	2003-03-21 18:59:57.000000000 +0100
+@@ -0,0 +1,573 @@
++# dbg-sig.inc - Bourne Again Shell Debugger Signal handling routines
++#
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++# ==================== VARIABLES =======================================
++
++# The "set" options in effect ($-) before debugger was invoked.
++typeset _Dbg_old_setopts
++
++# Return code that debugged program reports
++typeset -i _Dbg_program_exit_code=0
++
++# This is set to 1 if you want to debug debugger routines, i.e. routines
++# which start _Dbg_. But you better should know what you are doing
++# if you do this or else you may get into a recursive loop.
++typeset -i _Dbg_debug_debugger=0
++
++############################################################
++## Signal arrays: These are indexed by the signal number. ##
++############################################################
++
++# Should we print that a signal was intercepted? 
++# Each entry is "print" or "noprint" or null.
++typeset -a _Dbg_sig_print=()
++
++# Should we reentry the debugger command loop on receiving the signal? 
++# Each entry is "stop" or "nostop" or null.
++typeset -a _Dbg_sig_stop=()
++
++# Should we show a traceback on receiving the signal? 
++# Each entry is "stack" or "nostack" or null.
++typeset -a _Dbg_sig_show_stack=()
++# Should pass the signal to the user program?? 
++# Each entry is the trap handler with some variables substituted.
++typeset -a _Dbg_sig_passthrough=()
++
++# ===================== FUNCTIONS =======================================
++
++# We come here after before statement is run. This is the function named
++# in trap SIGDEBUG.
++
++# Note: We have to be careful here in naming "local" variables. In contrast
++# to other places in the debugger, because of the read/eval loop, they are
++# in fact seen by those using the debugger. So in contrast to other "local"s
++# in the debugger, we prefer to preface these with _Dbg_.
++
++_Dbg_debug_trap_handler() {
++
++  ### The below is also copied below in _Dbg_sig_handler...
++  ### Should put common stuff into a function.
++
++  # Consider putting the following line(s) in a routine.
++  # Ditto for the restore environment
++  local -i _Dbg_debugged_exit_code=$?
++  _Dbg_old_set_opts=$-
++
++  # Turn off line and variable trace listing if were not in our own debug
++  # mode
++  (( !_Dbg_debug_debugger )) && set +x +v
++
++  # If we are in our own routines -- these start with _bashdb -- then
++  # return.
++  if [[ ${FUNCNAME[1]} == _Dbg_* ]] && ((  !_Dbg_debug_debugger )); then
++    _Dbg_set_to_return_from_debugger 0
++    return 0
++  fi
++
++  _Dbg_set_debugger_entry
++
++  local -i _Dbg_rc=0
++
++  # Were we called because of  "trap fn ... RETURN"? 
++  local -i _Dbg_is_return=$1  
++  shift 
++
++  _Dbg_bash_command=$1
++  shift
++
++  # Save values of $1 $2 $3 when debugged program was stopped
++  # We use the loop below rather than _Dbg_set_args="(@)" because
++  # we want to preserve embedded blanks in the arguments.
++  local -i _Dbg_n=${#@}
++  local -i _Dbg_i=1
++  for (( ; _Dbg_n > 0; _Dbg_n-- )) ; do
++    _Dbg_arg[$_Dbg_i]=$1
++    ((_Dbg_i++))
++    shift
++  done
++  unset _Dbg_arg[0]       # Get rid of line number; makes array count
++                             # correct; also listing all _Dbg_arg works
++                             # like $*.
++
++  # Read in the journal to pick up variable settings that might have
++  # been left from a subshell.
++  _Dbg_source_journal
++
++  if (( $BASHDB_QUIT_LEVELS > 0 )) ; then
++    _Dbg_cmd_quit $_Dbg_debugged_exit_code
++  fi
++
++  # if in step mode, decrement counter
++  if ((_Dbg_steps >= 0)) ; then 
++    ((_Dbg_steps--))
++    _Dbg_write_journal "_Dbg_steps=$_Dbg_steps"
++  fi
++
++  # look for watchpoints.
++  local -i _Dbg_i
++  for (( _Dbg_i=0; _Dbg_i < _Dbg_watch_max ; _Dbg_i++ )) ; do
++    if [ -n "${_Dbg_watch_exp[$_Dbg_i]}" ] \
++      && [[ ${_Dbg_watch_enable[_Dbg_i]} != 0 ]] ; then
++      local new_val=`_Dbg_get_watch_exp_eval $_Dbg_i`
++      local old_val=${_Dbg_watch_val[$_Dbg_i]}
++      if [ $old_val != $new_val ] ; then
++	((_Dbg_watch_count[_Dbg_i]++))
++	_Dbg_msg "Watchpoint $i: ${_Dbg_watch_exp[$_Dbg_i]} changed:"
++	_Dbg_msg "  old value: '$old_val'"
++	_Dbg_msg "  new value: '$new_val'"
++	_Dbg_print_source_line
++	_Dbg_watch_val[$_Dbg_i]=$new_val
++	_Dbg_cmdloop
++	_Dbg_set_to_return_from_debugger 1
++	return $_Dbg_rc
++      fi
++    fi
++  done
++
++  # Run applicable action statement
++  local entries=`_Dbg_get_assoc_array_entry "_Dbg_action_$_cur_filevar" $_curline`
++  if [[ $entries != "" ]]  ; then
++    local -i _Dbg_i
++    for _Dbg_i in $entries ; do
++      if [[ ${_Dbg_action_enable[_Dbg_i]} != 0 ]] ; then
++	. ${_Dbg_libdir}/dbg-set-d-vars.inc
++	eval "${_Dbg_action_stmt[$_Dbg_i]}"
++      fi
++    done
++  fi
++
++  # check if breakpoint reached
++  local -r entries=`_Dbg_get_assoc_array_entry "_brkpt_$_cur_filevar" $_curline`
++  if [[ $entries != "" ]]  ; then
++    local -i _Dbg_i
++    for _Dbg_i in $entries ; do
++      if [[ ${_brkpt_enable[_Dbg_i]:0} != 0 ]] ; then
++	local -i cond
++	. ${_Dbg_libdir}/dbg-set-d-vars.inc
++	eval let cond=${_brkpt_cond[$_Dbg_i]:0}
++	if [[ $cond != 0 ]] ; then
++	  ((_brkpt_count[_Dbg_i]++))
++	  if [[ ${_brkpt_onetime[_Dbg_i]:0} == 1 ]] ; then
++	    _Dbg_delete_brkpt_entry $_Dbg_i
++	  else
++	    _Dbg_msg \
++              "Breakpoint $_Dbg_i hit (${_brkpt_count[$_Dbg_i]} times)."
++	  fi
++	  _Dbg_print_source_line
++	  _Dbg_cmdloop		# enter debugger
++	  _Dbg_set_to_return_from_debugger 1
++	  return $_Dbg_rc
++	fi
++      fi
++
++    done
++  fi
++
++  # next, check if step mode and no. of steps is up
++  if ((_Dbg_steps == 0)); then
++    _Dbg_print_source_line
++    # _Dbg_msg "Stopped at line $_curline"
++    _Dbg_cmdloop		# enter debugger
++    _Dbg_set_to_return_from_debugger 1
++    return $_Dbg_rc
++  elif (( _Dbg_is_return == 1 )) ; then
++    # here because a trap RETURN
++    _Dbg_print_source_line
++    _Dbg_cmdloop		# enter debugger
++    _Dbg_set_to_return_from_debugger 1
++    return $_Dbg_rc
++  elif (( _Dbg_is_return == 2 )) ; then
++    # here because we are fielding a signal.
++    _Dbg_print_source_line
++    _Dbg_cmdloop		# enter debugger
++    _Dbg_set_to_return_from_debugger 1
++    return $_Dbg_rc
++  else
++    ((_trace==1)) && _Dbg_print_source_line
++  fi
++  _Dbg_set_to_return_from_debugger 1
++  return $_Dbg_inside_skip
++}
++
++# Cleanup routine: erase temp files before exiting.
++_Dbg_cleanup() {
++  rm $_Dbg_evalfile 2>/dev/null
++  _Dbg_erase_journals
++  # This is needed sometimes, and sometimes _Dbg_cleanup2 works.
++  # figure out why...
++  if (( BASHDB_QUIT_LEVELS < 1 )) ; then
++    rm $_Dbg_persistent 2>/dev/null
++  fi
++}
++
++# Somehow we can't put this in _Dbg_cleanup and have it work.
++# I am not sure why.
++_Dbg_cleanup2() {
++  _Dbg_erase_journals
++  trap - EXIT
++}
++
++# The real way to leave this program.
++_Dbg_cmd_quit() {
++  local -i return_code=${1:-$_Dbg_program_exit_code}
++
++  local -i desired_quit_levels=${2:-0}
++
++  if (( desired_quit_levels == 0 \
++    || desired_quit_levels > BASH_SUBSHELL+1)) ; then
++    ((desired_quit_levels=BASH_SUBSHELL+1))
++  fi
++
++  ((BASHDB_QUIT_LEVELS+=desired_quit_levels))
++
++  # Reduce the number of recorded levels that we need to leave by
++  # if BASHDB_QUIT_LEVELS is numeric and greater than 0.
++  ((BASHDB_QUIT_LEVELS--))
++
++  ## write this to the next level up can read it.
++  _Dbg_write_journal "BASHDB_QUIT_LEVELS=$BASHDB_QUIT_LEVELS"
++
++  # Reset signal handlers to their default but only if 
++  # we are not in a subshell.
++  if (( BASH_SUBSHELL == 0 )) ; then
++
++    # If we were told to restart from deep down, restart instead of quit.
++    if [ -n "$BASHDB_RESTART_COMMAND" ] ; then 
++      _Dbg_erase_journals
++      _Dbg_save_state
++      exec $BASHDB_RESTART_COMMAND
++    fi
++
++    _Dbg_cleanup
++    trap - DEBUG
++    # This is a hack we need. I am not sure why.
++    trap "_Dbg_cleanup2" EXIT
++  fi
++
++  # And just when you thought we'd never get around to it...
++  exit $return_code
++}
++
++# Save value of handler variable _Dbg_old_$sig
++_Dbg_save_handler() {
++  local -r sig=$1
++  local old_handler='#unset#';
++  if [[ `trap -p $sig` ]] ; then 
++    old_handler=`trap -p $sig`
++  fi
++  if [[ $old_handler != '#unset#' ]] ; then
++    local -a old_hand_a=($old_handler)
++    old_handler=`_Dbg_subst_handler_var ${old_hand_a[2]}`
++    local -r decl_cmd="typeset -r _Dbg_old_${sig}_handler='$old_handler'"
++    eval $decl_cmd
++  fi
++  
++}
++
++# Adjust handler variables to take into account the fact that when we
++# call the handler we will have added another call before the user's
++# handler.
++_Dbg_subst_handler_var() {
++  local -i i
++  local result=''
++  for arg in $* ; do 
++    case $arg in 
++    '$LINENO' )
++	arg='${BASH_LINENO[0]}'
++	;;
++    '${BASH_SOURCE[0]}' )
++	arg='${BASH_SOURCE[1]}'
++	;;
++    '${FUNCNAME[0]}' )
++	arg='${FUNCNAME[1]}'
++	;;
++    '${BASH_LINENO[0]}' )
++	arg='${BASH_LINENO[1]}'
++	;;
++    esac
++    if [[ $result == '' ]] ; then
++      result=$arg 
++    else
++      result="$result $arg"
++    fi
++  done
++  echo $result
++}
++
++# Debugger exit handler. Don't really exit - but go back the debugger 
++# command loop
++_Dbg_exit_handler() {
++
++  # Consider putting the following line(s) in a routine.
++  # Ditto for the restore environment
++  local -i _Dbg_debugged_exit_code=$?
++
++  # Turn off line and variable trace listing.
++  set +x  +v
++
++  if [[ ${_Dbg_sig_print[0]} == "print" ]] ; then 
++    # Note: use the same message that gdb does for this.
++    _Dbg_msg "Program received signal EXIT (0)..."
++    if [[ ${_Dbg_sig_show_stack[0]} == "showstack" ]] ; then 
++    _Dbg_cmd_stack_trace 0
++    fi
++  fi
++
++  if [[ $_Dbg_old_EXIT_handler != '' ]] ; then
++    eval $_Dbg_old_EXIT_handler
++  fi
++
++  # If we've set the QUIT signal handler not to stop, or we've in the
++  # middle of leaving so many (subshell) levels or we have set to
++  # leave quietly on termination, then do it!
++
++  if [[ ${_Dbg_sig_stop[0]} != "stop" ]] \
++    || [[ $BASHDB_QUIT_LEVELS != 0 ]] \
++    || [ -n "$BASHDB_QUIT_ON_QUIT" ] ; then 
++    _Dbg_cmd_quit
++    # We don't return from here.
++  fi
++
++  # We've tested for all the quitting conditions above.
++  # Even though this is an exit handler, don't exit!
++
++  local term_msg="normally"
++  if [[ $_Dbg_debugged_exit_code != 0 ]] ; then 
++    term_msg="with code $_Dbg_debugged_exit_code"
++  fi
++
++  # If we tried to exit from inside a subshell, we only want to enter
++  # the command loop if don't have any pending subshells. 
++  if (( BASH_SUBSHELL == 0 )) ; then 
++    _Dbg_msg \
++      "Debugged program terminated $term_msg. Use q to quit or R to restart."
++
++    while [[ 1 ]] ; do
++      _Dbg_cmdloop
++    done
++  fi
++}
++
++# Generic signal handler for bashdb. We consult global array
++# _Dbg_sig_* for how to handle this signal.
++
++# Since the command loop may be called we need to be careful about
++# using variable names that would be exposed to the user. 
++_Dbg_sig_handler() {
++
++  # Consider putting the following line(s) in a routine.
++  # Ditto for the restore environment
++  local -i _Dbg_debugged_exit_code=$?
++  _Dbg_old_set_opts=$-
++  
++  # Turn off line and variable trace listing.
++  set +x +v
++
++  local -i _Dbg_rc=0
++
++  # This is the signal number. E.g. 15 is SIGTERM
++  local -r -i _Dbg_signum=$1   
++
++  if [[ ${_Dbg_sig_print[$_Dbg_signum]} == "print" ]] || \
++     [[ ${_Dbg_sig_stop[$_Dbg_signum]} == "stop" ]] ; then
++    local -r name=`_Dbg_signum2name $_Dbg_signum`
++    # Note: use the same message that gdb does for this.
++    _Dbg_msg "Program received signal $name ($_Dbg_signum)..."
++    if [[ ${_Dbg_sig_show_stack[$_Dbg_signum]} == "showstack" ]] ; then 
++      _Dbg_cmd_stack_trace 0
++    fi
++  fi
++  if [[ ${_Dbg_sig_stop[$_Dbg_signum]} == "stop" ]] ; then
++
++    ### The below duplicates what is above in _Dbg_debug_trap handler
++    ### Should put common stuff into a function.
++    
++    shift  # signum
++
++    _Dbg_bash_command=$1
++    shift
++
++    # Save values of $1 $2 $3 when debugged program was stopped
++    # We use the loop below rather than _Dbg_set_args="(@)" because
++    # we want to preserve embedded blanks in the arguments.
++    local -i _Dbg_n=${#@}
++    local -i _Dbg_i=1
++    for (( ; _Dbg_n > 0; _Dbg_n-- )) ; do
++      _Dbg_arg[$_Dbg_i]=$1
++      ((_Dbg_i++))
++      shift
++    done
++    unset _Dbg_arg[0]       # Get rid of line number; makes array count
++    # correct; also listing all _Dbg_arg works
++    # like $*.
++
++    _Dbg_set_debugger_entry
++    _Dbg_cmdloop		# enter debugger
++    _Dbg_set_to_return_from_debugger 1
++    return $_Dbg_rc
++
++  elif (( _Dbg_sig_old_handler[_Dbg_signum] )) ; then
++    eval ${_Dbg_sig_old_handler[$_Dbg_signum]}
++  fi
++  _Dbg_set_to_return_from_debugger 1
++  return $_Dbg_debugged_exit_code
++}
++
++_Dbg_err_handler() {
++  if [[ $_Dbg_old_ERR_handler != '' ]] ; then
++    eval $_Dbg_old_ERR_handler
++  fi
++  _Dbg_msg "Error occured at ${BASH_SOURCE[1]}:${BASH_LINENO[1]}"
++  _Dbg_cmdloop
++}
++
++# Echo the name for a given signal number $1. The resulting name
++# is in _Dbg_return
++_Dbg_signum2name() {
++  local -i -r signum=$1;
++  builtin kill -l $signum 2>/dev/null
++  return $?
++}
++
++# Return the signal number for a given signal name $1. The resulting number
++# is in _Dbg_return
++_Dbg_name2signum() {
++  local -r signame=$1;
++  builtin kill -l $signame 2>/dev/null
++  return $?
++}
++
++# Process debugger "handle" command. 
++_Dbg_cmd_handle() {
++  local sig=$1
++  local cmd=$2
++  local -i signum
++  if [[ -z $sig ]] ; then
++    _Dbg_msg "Missing signal name or signal number."
++    return 1
++  fi
++
++  eval "$_seteglob"
++  if [[ $sig == $int_pat ]]; then
++    eval "$_resteglob"
++    signame=`_Dbg_signum2name $sig`
++    if (( $? != 0 )) ; then
++      _Dbg_msg "Bad signal number: $sig"
++      return 1
++    fi
++    signum=sig
++  else
++    eval "$_resteglob"
++    local signum;
++    signum=`_Dbg_name2signum $sig`
++    if (( $? != 0 )) ; then
++      _Dbg_msg "Bad signal name: $sig"
++      return 1
++    fi
++  fi
++
++  case $cmd in
++    nop | nopr | nopri | noprin | noprint )
++      _Dbg_sig_print[signum]='noprint'
++      ;;
++
++    nosta | nostac | nostack )
++      _Dbg_sig_show_stack[signum]='nostack'
++      ;;
++
++    nosto | nostop  )
++      _Dbg_sig_stop[signum]='nostop'
++      ;;
++
++    p | pr | pri | prin | print )
++      _Dbg_sig_print[signum]='print'
++      ;;
++
++    sta | stac | stack )
++      _Dbg_sig_show_stack[signum]='showstack'
++      ;;
++
++    sto | stop )
++      _Dbg_sig_stop[signum]='stop'
++      ;;
++    * )
++      if (( !cmd )) ; then 
++	_Dbg_msg \
++         "Need to give a command: stop, nostop, stack, nostack, print, noprint"
++      else
++	_Dbg_msg "Invalid handler command $cmd"
++      fi
++      ;;
++  esac
++  
++}
++
++_Dbg_subexit_handler() {
++  # Read in the journal to pick up variable settings that might have
++  # been left from a subshell.
++  if [[ ${FUNCNAME[1]} == _Dbg_* ]] && ((  !_Dbg_debug_debugger )); then
++    return 0
++  fi
++  _Dbg_source_journal
++  if (( $BASHDB_QUIT_LEVELS > 0 )) ; then
++    _Dbg_cmd_quit $_Dbg_debugged_exit_code
++  fi
++}
++
++# Set up generic trap handler. Arguments are: 
++# NAME print showstack stop passthrough
++_Dbg_init_trap() {
++  local -r name=$1
++  local -i -r signum=`_Dbg_name2signum $name`
++
++  _Dbg_sig_print[$signum]=$2;
++  _Dbg_sig_show_stack[$signum]=$3;
++  _Dbg_sig_stop[$signum]=$4;
++
++  # Work out passthrough later...
++  # if [[ $5 == "pass*" ]] ; then
++  #  get existing trap from env.
++  #  _Dbg_sig_show_passthrough[$signum]=....;
++  #
++
++  if (( signum == 0 )) ; then
++    trap '_Dbg_exit_handler "$BASH_COMMAND"' EXIT
++  else
++    local trap_cmd="trap '_Dbg_sig_handler $signum \"\$BASH_COMMAND\" \"\$@\"' $name"
++    eval $trap_cmd
++  fi
++}
++
++_Dbg_init_trap EXIT   "noprint" "nostack" "stop" 
++_Dbg_init_trap INT    "print" "showstack" "stop" 
++_Dbg_init_trap TRAP   "print" "showstack" "stop" 
++_Dbg_init_trap TERM   "print" "showstack" "stop" 
++_Dbg_init_trap QUIT   "print" "showstack" "stop" 
++_Dbg_init_trap TRAP   "print" "showstack" "stop" 
++_Dbg_init_trap ILL    "print" "showstack" "stop" 
++
++# This is put at the so we have something at the end to stop at 
++# when we debug this. By stopping at the end all of the above functions
++# and variables can be tested.
++typeset -r _Dbg_sig_ver=\
++'$Id: dbg-sig.inc,v 1.4 2003/03/21 17:59:57 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-stack.inc cvs/debugger/dbg-stack.inc
+--- bash-2.05b/debugger/dbg-stack.inc	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/dbg-stack.inc	2003-02-27 08:27:46.000000000 +0100
+@@ -0,0 +1,178 @@
++# dbg-stack.inc - Bourne Again Shell Debugger Call Stack routines
++#
++#   Copyright (C) 2002,2003 Rocky Bernstein
++#
++#   Bash is free software; you can redistribute it and/or modify it under
++#   the terms of the GNU General Public License as published by the Free
++#   Software Foundation; either version 2, or (at your option) any later
++#   version.
++#
++#   Bash is distributed in the hope that it will be useful, but WITHOUT ANY
++#   WARRANTY; without even the implied warranty of MERCHANTABILITY or
++#   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++#   for more details.
++#   
++#   You should have received a copy of the GNU General Public License along
++#   with Bash; see the file COPYING.  If not, write to the Free Software
++#   Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
++
++#================ VARIABLE INITIALIZATIONS ====================#
++
++# The top number items on the FUNCNAME stack are debugging routines
++# Set the index in FUNCNAME that should be reported as index 0 (or top).
++typeset -ir _Dbg_stack_top=2
++typeset -i  _Dbg_stack_pos   # Where are we in stack?
++
++#======================== FUNCTIONS  ============================#
++
++# Move default values down $1 or one in the stack. 
++
++_Dbg_cmd_down() {
++  local -i count=${1:-1}
++  
++  if (( _Dbg_stack_pos-count < _Dbg_stack_top )) ; then 
++    _Dbg_msg "Would be beyond bottom-most entry."
++    return
++  fi
++  ((_Dbg_stack_pos -= $count))
++  local -i j=_Dbg_stack_pos+1
++  _Dbg_listline=${BASH_LINENO[$_Dbg_stack_pos]}
++  _cur_source_file=${BASH_SOURCE[$j]}
++  _Dbg_print_source_line $_Dbg_listline
++}
++
++_Dbg_cmd_frame() {
++  eval "$_seteglob"
++  if [[ $1 != '' && $1 != $int_pat ]] ; then 
++    _Dbg_msg "Bad integer parameter: $1"
++    eval "$_resteglob"
++    return
++  fi
++  eval "$_resteglob"
++  local -i pos=${1:-0}
++  if (( _Dbg_stack_top+pos+1 >= ${#FUNCNAME[@]} )) ; then 
++    _Dbg_msg "Would be beyond top-most entry."
++    return
++  fi
++  _Dbg_stack_pos=$_Dbg_stack_top+$pos
++  _Dbg_cmd_stack_trace 2 1 $pos
++  local -i k=_Dbg_stack_pos+1
++  _Dbg_listline=${BASH_LINENO[$_Dbg_stack_pos]}
++  _cur_source_file=${BASH_SOURCE[$k]}
++  _Dbg_print_source_line
++}
++
++# Print a stack trace.  
++# $1 is an additional offset correction - this routine is called from two
++# different places and one routine has one more additional call on top.
++# $2 is the maximum number of entries to include.
++# This code assumes the's debugger version of
++# bash where FUNCNAME is an array, not a variable.
++
++_Dbg_cmd_stack_trace() {
++
++  local -i n=${#FUNCNAME[@]}-1
++
++  eval "$_seteglob"
++  if [[ $1 != $int_pat ]] ; then 
++    _Dbg_msg "Bad integer parameter: $1"
++    eval "$_resteglob"
++    return 1
++  fi
++  if [[ $2 != '' && $2 != $int_pat ]] ; then 
++    _Dbg_msg "Bad integer parameter: $2"
++    eval "$_resteglob"
++    return 1
++  fi
++  eval "$_resteglob"
++
++  local prefix='##'
++  local -i count=${2:-$n}
++  local -i k=${3:-0}
++  local -i i=_Dbg_stack_top+k+$1
++  local -i j=i
++
++  (( j > n )) && return 1
++  (( i == _Dbg_stack_pos+$1 )) && prefix='->'
++  if (( k == 0 )) ; then
++    local filename=${BASH_SOURCE[$i]}
++    (( _Dbg_basename_only )) && filename=${filename##*/}
++    _Dbg_msg "$prefix$k in file \`$filename' at line $_curline"
++    
++    ((count--)) ; ((k++))
++  fi
++
++  # Figure out the index in BASH_ARGV is position "i" (the place where
++  # we start our stack trace from). variable "r" will be that place.
++
++  local -i q
++  local -i r=0
++  for (( q=0 ; q<i ; q++ )) ; do 
++    (( r = r + ${BASH_ARGC[$q]} ))
++  done
++
++  # Loop which dumps out stack trace.
++  for ((  ; (( i <= n && count > 0 )) ; i++ )) ; do 
++    local -i arg_count=${BASH_ARGC[$i]}
++    ((j++)) ; ((count--))
++    prefix='##'
++    (( i == _Dbg_stack_pos )) && prefix='->'
++    if (( i == n )) ; then 
++      # main()'s file is the same as the first caller
++      j=i  
++    fi
++
++    _Dbg_msg_nocr "$prefix$k ${FUNCNAME[$i]}("
++
++    local parms=''
++
++    # Print out parameter list.
++    if (( 0 != ${#BASH_ARGC[@]} )) ; then
++      local -i s
++      for (( s=0; s < arg_count; s++ )) ; do 
++	if (( s != 0 )) ; then 
++	  parms="\"${BASH_ARGV[$r]}\", $parms"
++	elif [[ ${FUNCNAME[$i]} == "source" ]] \
++	  && (( _Dbg_basename_only )); then
++	  local filename=${BASH_ARGV[$r]}
++	  filename=${filename##*/}
++	  parms="\"$filename\""
++	else
++	  parms="\"${BASH_ARGV[$r]}\""
++	fi
++	((r++))
++      done
++    fi
++
++    local filename=${BASH_SOURCE[$j]}
++    (( _Dbg_basename_only )) && filename=${filename##*/}
++    _Dbg_msg "$parms) called from file \`$filename'" \
++      "at line ${BASH_LINENO[$i]}"
++    ((k++))
++  done
++  return 0
++}
++
++# Move default values up $1 or one in the stack. 
++
++_Dbg_cmd_up() {
++  local -i count=${1:-1}
++  
++  if (( _Dbg_stack_pos+count+1 >= ${#FUNCNAME[@]} )) ; then 
++    _Dbg_msg "Would be beyond top-most entry."
++    return
++  fi
++  ((_Dbg_stack_pos += $count))
++  local -i k=_Dbg_stack_pos+1
++  _Dbg_listline=${BASH_LINENO[$_Dbg_stack_pos]}
++  _cur_source_file=${BASH_SOURCE[$k]}
++  _Dbg_print_source_line $_Dbg_listline
++}
++
++# This is put at the so we have something at the end when we debug this.
++_Dbg_stack_ver='$Id: dbg-stack.inc,v 1.2 2003/02/27 07:27:46 rockyb Exp $'
++
++#;;; Local Variables: ***
++#;;; mode:shell-script ***
++#;;; eval: (sh-set-shell "bash") ***
++#;;; End: ***
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/.#bashdb.texi.1.5 cvs/debugger/doc/.#bashdb.texi.1.5
+--- bash-2.05b/debugger/doc/.#bashdb.texi.1.5	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/doc/.#bashdb.texi.1.5	2003-08-30 08:09:04.000000000 +0200
+@@ -0,0 +1,3754 @@
++\input texinfo      @c -*-texinfo-*-
++@c Copyright 2002, 2003
++@c Rocky Bernstein for the Free Software Foundation
++@c
++@c TODO:
++@c   - add examples for commands
++@c   - clean up/improve sample session
++@c   - help text is inaccurate and formatted too much to right.
++@c
++
++@c Sets version and release names and dates. Frees us from changing
++@c this file when a new release comes along.
++
++@c %**start of header
++@c makeinfo ignores cmds prev to setfilename, so its arg cannot make use
++@c of @set vars.  However, you can override filename with makeinfo -o.
++@setfilename bashdb.info
++@c
++@c Name of Bash program.  Used in running text.
++@set BASH @acronym{BASH}
++
++@c
++@c Name of debugger program.  Used also for prompt string.
++@set DBG the @value{BASH} debugger
++@set dBGP The @value{BASH} debugger
++@set DDD @acronym{DDD}
++
++@settitle @value{BASH} Debugger
++@setchapternewpage odd
++@setcontentsaftertitlepage
++
++@c %**end of header
++
++@include version.texi
++
++@c A simple macro for optional variables.
++@macro ovar{varname}
++@r{[}@var{\varname\}@r{]}
++@end macro
++
++@macro DDD {}
++@acronym{DDD}
++@end macro
++
++@macro BASH {}
++@acronym{@value{BASH}}
++@end macro
++
++@macro DBG {}
++@value{DBG}
++@end macro
++
++@iftex
++@c @smallbook
++@c @cropmarks
++@end iftex
++
++@finalout
++
++@c readline appendices use @vindex, @findex and @ftable,
++@c annotate.texi and gdbmi use @findex.
++@c @syncodeindex vr cp
++@c @syncodeindex fn cp
++
++@c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER.
++
++@c This is a dir.info fragment to support semi-automated addition of
++@c manuals to an info tree.
++@dircategory Programming & development tools.
++@direntry
++* @value{DBG}: (@value{DBG}).                     The @sc{bash} debugger.
++@end direntry
++
++@ifinfo
++This file documents the @sc{bash} debugger @value{BASH}.
++
++
++This is the @value{EDITION} Edition, @value{UPDATED-MONTH},
++of @cite{Debugging with BASHDB: the @sc{gnu} Source-Level Debugger}
++for REBASH
++
++Copyright (C) 2002,2003 Rocky Bernstein for the Free Software Foundation.
++
++Permission is granted to copy, distribute and/or modify this document
++under the terms of the GNU Free Documentation License, Version 1.1 or
++@ifset DEBIANHASBECOMEREASONABLE
++@c From Matthias Klose <doko@cs.tu-berlin.de> a Debian maintainer on
++@c Sat, 23 Aug 2003 14:24:44 +0200
++@c
++@c I personally see the invariant sections as the thing in the
++@c GFDL, which hinders me in uploading the package to the archives.
++@c I don't have any problem, if some other Debian developer makes a
++@c bashdb package built from separate sources.
++@c
++@c I am aware that Debian ships other packages containing documentation
++@c covered by the GFDL (and one of them for which I do the packaging as
++@c well), but I won't add a new package, which I maintain. So before an
++@c upload of a bashdb package built from the bash sources either
++@c
++@c
++@c - Debian has a position on the GFDL, which allows inclusion
++@c
++@c - the bashdb manual does not have invariant sections, or is
++@c  relicensed, or dual licensed.
++any later version published by the Free Software Foundation; with the
++Invariant Sections being ``Free Software'' and ``Free Software Needs
++Free Documentation'', with the Front-Cover Texts being ``A GNU
++Manual,'' and with the Back-Cover Texts as in (a) below.
++
++(a) The Free Software Foundation's Back-Cover Text is: ``You have
++freedom to copy and modify this GNU Manual, like GNU software.  Copies
++published by the Free Software Foundation raise funds for GNU
++development.''
++@else
++any later version published by the Free Software Foundation; with no
++Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
++@end ifset
++@end ifinfo
++
++@titlepage
++@title Debugging with BASHDB
++@sp 1
++@subtitle @value{EDITION} Edition, for BASH
++@subtitle @value{UPDATED-MONTH}
++@author Rocky Bernstein
++@page
++@tex
++{\parskip=0pt
++\hfill (Send bugs and comments on bashdb to bug-bashdb\@sourceforge.net.)\par
++\hfill {\it Debugging with BASH}\par
++\hfill \TeX{}info \texinfoversion\par
++}
++@end tex
++
++@vskip 0pt plus 1filll
++Copyright @copyright{} 2002,2003 Rocky Bernstein for the Free Software
++Foundation.
++
++Permission is granted to copy, distribute and/or modify this document
++under the terms of the GNU Free Documentation License, Version 1.1 or
++@ifset DEBIANHASBECOMEREASONABLE
++@c From Matthias Klose <doko@cs.tu-berlin.de> a Debian maintainer on
++@c Sat, 23 Aug 2003 14:24:44 +0200
++@c
++@c I personally see the invariant sections as the thing in the
++@c GFDL, which hinders me in uploading the package to the archives.
++@c I don't have any problem, if some other Debian developer makes a
++@c bashdb package built from separate sources.
++@c
++@c I am aware that Debian ships other packages containing documentation
++@c covered by the GFDL (and one of them for which I do the packaging as
++@c well), but I won't add a new package, which I maintain. So before an
++@c upload of a bashdb package built from the bash sources either
++@c
++@c
++@c - Debian has a position on the GFDL, which allows inclusion
++@c
++@c - the bashdb manual does not have invariant sections, or is
++@c  relicensed, or dual licensed.
++any later version published by the Free Software Foundation; with the
++Invariant Sections being ``Free Software'' and ``Free Software Needs
++Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
++and with the Back-Cover Texts as in (a) below.
++
++(a) The Free Software Foundation's Back-Cover Text is: ``You have
++freedom to copy and modify this GNU Manual, like GNU software.  Copies
++published by the Free Software Foundation raise funds for GNU
++development.''
++@else
++any later version published by the Free Software Foundation; with no
++Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
++@end ifset
++@end titlepage
++@page
++
++@ifnottex
++@node Top, Summary, (dir), (dir)
++
++@top Debugging with @DBG
++
++This file describes @value{DBG}, the @sc{bash} symbolic debugger.
++
++This is the @value{EDITION} Edition, @value{UPDATED-MONTH}, for REBASH.
++
++Copyright (C) 2002,2003 Rocky Bernstein
++
++@menu
++* Summary::                     Overview of Debugger with a sample session
++
++* Invocation::                  Getting in and out
++* Running::                     Script setup inside the BASH debugger
++* Debugger Command Reference::  BASH debugger command reference
++
++* Front Ends::                  Using @DBG from a front-end user interface
++
++* BASH Debugger Bugs::          Reporting bugs
++* History and Acknowledgments:: History and Acknowledgments
++
++Appendices
++* Formatting Documentation::    How to format and print @DBG documentation
++
++* Installing bashdb::           Installing bashdb
++* Copying::			GNU General Public License says
++                                how you can copy and share bashdb
++* GNU Free Documentation License::  The license for this documentation
++
++Indexes (nodes containing large menus)
++* Function Index::            An item for each function name.
++* Command Index::             An item for each command name.
++* Variable Index::            An item for each documented variable.
++* General Index::             An item for each concept.
++@end menu
++
++@end ifnottex
++
++@contents
++
++@node Summary
++@chapter Summary of the BASH Debugger
++
++The purpose of a debugger such as @DBG is to allow you to see what is
++going on ``inside'' a bash script while it executes.
++
++@DBG can do four main kinds of things (plus other things in support of
++these) to help you catch bugs in the act:
++
++@itemize @bullet
++@item
++Start your script, specifying anything that might affect its behavior.
++
++@item
++Make your script stop on specified conditions.
++
++@item
++Examine what has happened, when your script has stopped.
++
++@item
++Change things in your script, so you can experiment with correcting the
++effects of one bug and go on to learn about another.
++@end itemize
++
++Although you can use the BASH debugger to debug scripts written in
++BASH, it can also be used just as a front-end for learning more
++about programming in BASH. As an additional aid, the debugger can
++be used within the context of an existing script with its functions
++and variables that have already been initialized; fragments of the
++existing can be experimented with by entering them inside the debugger.
++
++@menu
++* Sample Session::              A Sample BASH Debugger session
++* Free Software::               Freely redistributable software
++@end menu
++
++@node Sample Session
++@section A Sample BASH Debugger Session
++
++You can use this manual at your leisure to read all about @value{DBG}.
++However, a handful of commands are enough to get started using the
++debugger.  This chapter illustrates those commands.
++
++@iftex
++In this sample session, we emphasize user input like this: @b{input},
++to make it easier to pick out from the surrounding output.
++@end iftex
++
++Below we will debug a script that contains a function to compute the
++factorial of a number: fact(0) is 1 and fact(n) is n*fact(n-1).
++
++@smallexample
++$ @b{bashdb -L .  fact.sh}
++Bourne-Again Shell Debugger, release bash-@value{BASHRELEASE}
++Copyright 2002,2003 Rocky Bernstein
++This is free software, covered by the GNU General Public License, and you are
++welcome to change it and/or distribute copies of it under certain conditions.
++
++(fact.sh:9):
++9:	echo fact 0 is: `fact 0`
++bashdb<0> @b{-}
++  1:    #!/usr/local/bin/bash
++  2:    fact() @{
++  3:    ((n==0)) && echo 1 && return
++  4:    ((nm1=n-1))
++  5:    ((result=n*`fact $nm1`))
++  6:    return $result
++  7:    @}
++  8:
++  9:==> echo fact 0 is: `fact 0`
++bashdb<1> @b{l}
++ 10:   echo fact 3 is: $(fact 3)
++@end smallexample
++
++@noindent
++
++The command invocation uses the option ``-L .'' Here we assume that
++the @command{bashdb} script and the debugger files are in the same
++location. If you are running from the source code, this will be the
++case. However if bashdb has been installed this probably won't be true
++and here you probably don't need to use ``-L .'' Instead you would
++type simply @code{bashdb fact.sh}.
++
++The first debugger command we gave @kbd{-}, we listed a window of
++lines @emph{before} where we were executing. Because the window, 10
++lines, is larger than the number of lines to the top of the file we
++printed only 9 lines here. The next command list starting from the
++current line and again wants to print 10 lines but because there are
++only one remaining line, that is what is printed.
++
++@smallexample
++bashdb<2> @b{step}
++(fact.sh:9):
++9:	echo fact 0 is: `fact 0`
++bashdb<3> @b{@key{RET}}
++2:	fact() @{
++bashdb<4> @b{@key{RET}}
++3:	((n==0)) && echo 1 && return
++bashdb<5> @b{print $n}
++
++@end smallexample
++
++Ooops... The variable @kbd{n} isn't initialized.
++
++The first @kbd{step} command steps the script one instruction. It may
++seem odd that the line printed is exactly the same one as before. What
++has happened though is that we've ``stepped'' into the subshell needed
++to run @kbd{`fact 0`}; we haven't however started running anything
++inside that subshell yet though---the function call.
++
++The first @kbd{step} command steps the script one instruction; it
++didn't advance the line number at all. That is because we were
++stopping before the command substitution or backtick is to take
++place. The second command we entered was just hitting the return key;
++bashdb remembers that you entered @code{step} previously, so it runs
++the step rather than @kbd{next}, the other alternative when you hit
++@key{RET}. Step one more instruction and we are just before running
++the first statement of the function.
++
++Next, we print the value of the variable @kbd{n}. Notice we need to add
++a preceding dollar simple to get the substitution or value of n. As we
++will see later, if the @kbd{pe} command were used this would not be
++necessary.
++
++We now modify the file to add an assignment to local variable @kbd{n} and
++restart.
++
++@smallexample
++bashdb<6> @b{restart}
++Restarting with: /usr/local/bin/bashdb -L . fact.sh
++(fact.sh:10):
++10:	echo fact 0 is: `fact 0`
++bashdb<0> @b{list 1}
++  1:    #!/usr/local/bin/bash
++  2:    fact() @{
++  3:    local -i n=$@{1:0@}
++  4:    ((n==0)) && echo 1 && return
++  5:    ((nm1=n-1))
++  6:    ((result=n*`fact $nm1`))
++  7:    return $result
++  8:    @}
++  9:
++ 10:==> echo fact 0 is: `fact 0`
++bashdb<1> @b{s 3}
++(fact.sh:3):
++3:	local -i n=$@{1:0@}
++bashdb<2> @b{step}
++(fact.sh:4):
++4:	((n==0)) && echo 1 && return
++bashdb<3> @b{print $n}
++print $n
++0
++@end smallexample
++
++@noindent
++This time we use the @code{list} debugger command to list the lines in
++the file. From before we know it takes three @code{steps} commands
++before we get into the fact() function, so we add a count onto the
++@code{step} command. Notice we abbreviate @code{step} with @code{s};
++we could have done likewise and abbreviated @code{list} with @code{l}.
++
++@smallexample
++bashdb<4> @b{@key{RET}}
++(fact.sh:4):
++4:	((n==0)) && echo 1 && return
++echo 1
++bashdb<5> @b{@key{RET}}
++(fact.sh:4):
++4:	((n==0)) && echo 1 && return
++return
++@end smallexample
++
++@noindent
++Again we just use @key{RET} to repeat the last @code{step}
++commands. And again the fact that we are staying on the same line 4
++means that the next condition in the line is about to be
++executed. Notice that we see the command (@code{echo 1} or
++@code{return}) listed when we stay on the same line which has multiple
++stopping points in it. Given the information above, we know that the
++value echo'ed on return will be 1.
++
++@smallexample
++bashdb<6> @b{@key{RET}}
++fact 0 is: 1
++(fact.sh:12):
++12:	echo fact 3 is: $(fact 3)
++bashdb<7> @b{break 5}
++Breakpoint 1 set in file fact.sh, line 5.
++bashdb<8> @b{continue}
++@end smallexample
++
++@noindent
++We saw that we could step with a count into the function
++fact(). However above took another approach: we set a stopping point or
++``breakpoint'' at line 5 to get us a little ways into the fact()
++subroutine. Just before line 5 is to executed, we will get back into
++the debugger. The @code{continue} command just resumes execution until
++the next stopping point which has been set up in some way.
++
++@smallexample
++(fact.sh:5):
++5:      ((nm1=n-1))
++Breakpoint 1 hit(1 times).
++bashdb<8> @b{x n-1}
++2
++bashdb<9> @b{s}
++(fact.sh:5):
++6:     ((result=n*`fact $nm1`))
++bashdb<10> @b{c}
++fact.sh: line 6: ((: result=n*: syntax error: operand expected (error token is "*")
++bashdb<7> @b{R}
++Restarting with: bash --debugger fact.sh
++11:	echo fact 0 is: `fact 0`
++bashdb<0> @b{l fact}
++ 2:    fact ()
++ 3:    @{
++ 4:       local -i n=$@{1:0@};
++ 5:       (( "n==0" )) && echo 1 && return;
++ 6:       (( nm1=n-1 ));
++ 7:       ((fact_nm1=`fact $nm1`))
++ 8:       (( "result=n*fact_nm1" ));
++ 9:       echo $result
++10:    @}
++@end smallexample
++
++@noindent
++In addition to listing by line numbers, we can also list giving a
++function name. Below, instead of setting a breakpoint at line 5 and
++running ``continue'' as we did above, we try something slightly shorter
++and slightly different. We give the line number on the ``continue''
++statement. This is a little different in that a one-time break is made
++on line 5. Once that statement is reached the breakpoint is removed.
++
++@smallexample
++bashdb<1> @b{continue 5}
++One-time breakpoint 1 set in file fact.sh, line 5.
++fact 0 is: 1
++(fact.sh:5):
++5:	((nm1=n-1))
++bashdb<2> @b{s}
++6:	((fact_nm1=`fact $nm1`))
++bashdb<2> @b{s}
++2:	fact() @{
++bashdb<3> @b{T}
++->0 in file `fact.sh' at line 2
++##1 fact("3") called from file `fact.sh' at line 12
++##2 source("fact.sh") called from file `/usr/local/bin/bashdb' at line 154
++##3 main("fact.sh") called from file `/usr/local/bin/bashdb' at line 0
++bashdb<4> @b{c}
++fact 3 is: 6
++Debugged program terminated normally. Use q to quit or R to restart.
++@end smallexample
++
++@noindent
++When we stop at line 5 above, we have already run fact(0) and output
++the correct results. The output from the program ``fact 0 is: 1'' is
++intermixed with the debugger output. The @code{T} command above
++requests call stack output and this confirms that we are not in the
++fact(0) call but in the fact(3) call. There are 4 lines listed in the
++stack trace even though there is just one call from the main
++program. The top line of the trace doesn't really represent a call,
++it's just where we currently are in the program. That last line is an
++artifact of invoking bash from the bashdb script rather than running
++@code{bash --debugger}.
++
++The last message in the output above @samp{Debugged program exited
++normally.} is from @value{DBG}; it indicates script has finished
++executing.  We can end our @value{DDGP} session with the @value{GDBP}
++@code{quit} command.
++
++Above we did our debugging session on the command line. If you are a
++GNU Emacs user, you can do your debugging inside that. Also there is
++a(nother) GUI interface called DDD that supports @value{DBG}.
++
++@node Free Software
++@unnumberedsec Free software
++
++@DBG is @dfn{free software}, protected by the @sc{gnu}
++General Public License
++(GPL).  The GPL gives you the freedom to copy or adapt a licensed
++program---but every person getting a copy also gets with it the
++freedom to modify that copy (which means that they must get access to
++the source code), and the freedom to distribute further copies.
++Typical software companies use copyrights to limit your freedoms; the
++Free Software Foundation uses the GPL to preserve these freedoms.
++
++Fundamentally, the General Public License is a license which says that
++you have these freedoms and that you cannot take these freedoms away
++from anyone else.
++
++@unnumberedsec Free Software Needs Free Documentation
++
++The biggest deficiency in the free software community today is not in
++the software---it is the lack of good free documentation that we can
++include with the free software.  Many of our most important
++programs do not come with free reference manuals and free introductory
++texts.  Documentation is an essential part of any software package;
++when an important free software package does not come with a free
++manual and a free tutorial, that is a major gap.  We have many such
++gaps today.
++
++Consider Perl, for instance.  The tutorial manuals that people
++normally use are non-free.  How did this come about?  Because the
++authors of those manuals published them with restrictive terms---no
++copying, no modification, source files not available---which exclude
++them from the free software world.
++
++That wasn't the first time this sort of thing happened, and it was far
++from the last.  Many times we have heard a GNU user eagerly describe a
++manual that he is writing, his intended contribution to the community,
++only to learn that he had ruined everything by signing a publication
++contract to make it non-free.
++
++Free documentation, like free software, is a matter of freedom, not
++price.  The problem with the non-free manual is not that publishers
++charge a price for printed copies---that in itself is fine.  (The Free
++Software Foundation sells printed copies of manuals, too.)  The
++problem is the restrictions on the use of the manual.  Free manuals
++are available in source code form, and give you permission to copy and
++modify.  Non-free manuals do not allow this.
++
++The criteria of freedom for a free manual are roughly the same as for
++free software.  Redistribution (including the normal kinds of
++commercial redistribution) must be permitted, so that the manual can
++accompany every copy of the program, both on-line and on paper.
++
++Permission for modification of the technical content is crucial too.
++When people modify the software, adding or changing features, if they
++are conscientious they will change the manual too---so they can
++provide accurate and clear documentation for the modified program.  A
++manual that leaves you no choice but to write a new manual to document
++a changed version of the program is not really available to our
++community.
++
++Some kinds of limits on the way modification is handled are
++acceptable.  For example, requirements to preserve the original
++author's copyright notice, the distribution terms, or the list of
++authors, are ok.  It is also no problem to require modified versions
++to include notice that they were modified.  Even entire sections that
++may not be deleted or changed are acceptable, as long as they deal
++with nontechnical topics (like this one).  These kinds of restrictions
++are acceptable because they don't obstruct the community's normal use
++of the manual.
++
++However, it must be possible to modify all the @emph{technical}
++content of the manual, and then distribute the result in all the usual
++media, through all the usual channels.  Otherwise, the restrictions
++obstruct the use of the manual, it is not free, and we need another
++manual to replace it.
++
++Please spread the word about this issue.  Our community continues to
++lose manuals to proprietary publishing.  If we spread the word that
++free software needs free reference manuals and free tutorials, perhaps
++the next person who wants to contribute by writing documentation will
++realize, before it is too late, that only free manuals contribute to
++the free software community.
++
++If you are writing documentation, please insist on publishing it under
++the GNU Free Documentation License or another free documentation
++license.  Remember that this decision requires your approval---you
++don't have to let the publisher decide.  Some commercial publishers
++will use a free license if you insist, but they will not propose the
++option; it is up to you to raise the issue and say firmly that this is
++what you want.  If the publisher you are dealing with refuses, please
++try other publishers.  If you're not sure whether a proposed license
++is free, write to @email{licensing@@gnu.org}.
++
++You can encourage commercial publishers to sell more free, copylefted
++manuals and tutorials by buying them, and particularly by buying
++copies from the publishers that paid for their writing or for major
++improvements.  Meanwhile, try to avoid buying non-free documentation
++at all.  Check the distribution terms of a manual before you buy it,
++and insist that whoever seeks your business must respect your freedom.
++Check the history of the book, and try to reward the publishers that
++have paid or pay the authors to work on it.
++
++The Free Software Foundation maintains a list of free documentation
++published by other publishers, at
++@url{http://www.fsf.org/doc/other-free-books.html}.
++
++@node Invocation
++@chapter Getting in and out
++
++This chapter discusses how to start @value{DBG}, and how to get out of it.
++The essentials are:
++@itemize @bullet
++@item
++type @samp{bash --debugger @emph{script-name}} or @samp{bashdb
++@emph{script-name}} to start @value{DBG}.
++@item
++type @kbd{quit} or @kbd{C-d} inside the debugger to exit.
++@end itemize
++
++But also note there are two front-ends available as well. One can also
++enter the debugger inside emacs via the command @code{M-x bashdb}
++after loading Emacs' Grand Unified Debugger, @code{gud}. See
++@ref{Emacs,,Using the BASH debugger from @sc{gnu} Emacs}. And there is
++support in a @value{DDD} for bash.
++
++@menu
++* Starting the BASH debugger::    How to enter the BASH debugger
++* Quitting the BASH debugger::    How to leave the BASH debugger
++@end menu
++
++@node Starting the BASH debugger
++@section Starting the BASH debugger
++
++@emph{Note: it is important to use a debugger-enabled bash. You wil
++get an error message if the debugger is run under a version of BASH
++that does not have debugging support.}
++
++As mentioned above, one can enter @DBG via Emacs or
++DDD. However you don't have to use either of these. And these still
++need a way on their own to get things started.
++
++There are in fact two @emph{other} ways to start @value{DBG}.  The
++first way is to pass the @samp{--debugger} option to bash with the
++name of your script the scripts arguments following that, or with a
++command string (@code{-c}).
++
++@example
++bash --debugger @var{script} @var{script-arguments...}
++bash --debugger -c @var{command-string}...
++@end example
++
++This calls a debugger initialization script. It works much like a
++@BASH login profile which may set variables and define
++functions. But this shell profile is customized for debugging and as
++such arranges for itself to get called before each statement is
++executed. Although there are some problems at present in I/O
++redirection that the method described next doesn't have, it is
++expected that over time more features will be enabled in bash when the
++@samp{--debugger} option is in effect. By default, both debugging in
++Emacs via GUD (@ref{Emacs,,Using the BASH debugger under Emacs}) and
++debugging via @value{DDD} work via this method.
++
++The form @samp{bash --debugger -c ...} can be used to get into the
++debugger without having to give a script name to debug. Sometimes you
++may want to do this just to see how the debugger works: try some
++debugger commands or maybe get online help. If you run @code{ddd
++--bash} without giving a script name, it in fact uses this form.
++
++In order for the @samp{--debugger} option to work however, you must
++have the debugger scripts installed in a place where @DBG can
++find them. For this reason, in developing @value{DBG}, I use a second
++method more often; it doesn't require the bash debugger to be
++installed. This method uses another script called @code{bashdb} which
++after taking its own options takes the name of the script to debugged
++and the arguments to pass to that script.  Using this method, one
++would start the debugger like this:
++
++@example
++bash @var{path-to-bashdb}/bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
++@end example
++
++As with the first method, @code{bash} should be a debugger-enabled
++bash. If @code{bashdb} has the path to bash in it at the top (e.g. via
++@code{#!}), and @code{bashdb} can be found in your program-search
++path, then this might be equivalent to the above:
++
++@example
++bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
++@end example
++
++There are two or three disadvantages however of running a debugger
++this way. First @code{$0} will have the value @code{bashdb} rather
++than the script you are trying to run. For some scripts this may
++change the behavior of the debugged script. Second a traceback will
++contain additional lines showing the ``source''-ing of the debugged
++script from @code{bashdb}. And third, although this way works better
++than the first method, over time this way may come into disuse.
++
++An option that you'll probably need to use if bashdb isn't installed
++but run out of the source code directory is @samp{-L} which specifies
++the directory that contains the debugger script files.
++
++You can further control how bashdb starts up by using command-line
++options. bashdb itself can remind you of the options available.
++
++@noindent
++Type
++
++@example
++bashdb -h
++@end example
++
++@noindent
++to display all available options and briefly describe their use.
++
++When the bash debugger is invoked either by the @code{bashdb}
++front-end script or @code{bash --debugging}, the first argument that
++does not have an associated option flag for @code{bashdb} or
++@code{bash} (as the case may be) is used as the name a the script file
++to be debugged, and any following options get passed the debugged
++script.
++
++Options for the @code{bashdb} front-end are shown in the
++following list.
++
++@menu
++* Options for the bashdb script::   Options you can pass in starting bashdb
++@end menu
++
++@node Options for the bashdb script
++@subsection Command-line options for @code{bashdb} script
++
++You can run @DBG in various alternative modes---for example, in
++batch mode or quiet mode.
++
++@table @code
++@item -h
++@cindex @code{-h}
++This option causes @value{DBG} to print some basic help and exit.
++
++@item -V
++@cindex @code{-V}
++This option causes @DBG to print its version number and
++no-warranty blurb, and exit.
++
++@item -n
++@cindex @code{-n}
++Do not execute commands found in any initialization files.  Normally,
++@BASH executes the commands in these files after all the command
++options and arguments have been processed.  @xref{Command Files,,Command
++files}.
++
++@item -q
++@cindex @code{-q}
++``Quiet''.  Do not print the introductory and copyright messages.  These
++messages are also suppressed in batch mode.
++
++@item -t
++@cindex @code{-t}
++``Terminal output''.  Set the file or terminal that you want debugger command
++output to go to. Note that the debugger output is independent of the
++debugged script output.
++
++@item -L @var{directory}
++@cindex @code{-L}
++Set directory where debugger files reside to @var{directory}. The
++default location is @code{../lib/bashdb} relative to the place that
++the bashdb script is located. For example if bashdb is located in
++@code{/usr/local/bin/bashdb}, the default library location will be
++@code{/usr/local/lib/bashdb} which may or may not exist. If it doesn't
++you'll get an error when you run bashdb. Only if the default location
++is incorrect, should you need to use the @code{-L} option.
++
++@item -T @var{directory}
++@cindex @code{-T}
++Set directory to use for writing temporary files.
++
++@end table
++
++@node Quitting the BASH debugger
++@section Quitting the BASH debugger
++
++@cindex interrupt
++An interrupt (often @kbd{C-c}) does not exit from @value{DBG}, but
++rather terminates the action of any @DBG command that is in
++progress and returns to @value{DBG} command level.  Inside a debugger
++command interpreter, use @code{quit} command (@pxref{Quit, ,Quitting
++the BASH debugger}).
++
++@node Running
++@chapter Script Setup inside the BASH Debugger
++
++@menu
++* Starting::                    Starting your script
++* Command Files::               Command files
++* Arguments::                   Your script's arguments
++* Input/Output::                Your script's input and output
++* Script/Debugger Interaction::   Keeping out of each other's harm
++@end menu
++
++@need 2000
++@node Starting
++@section Starting your script
++@cindex starting
++@cindex running
++
++@table @code
++@kindex restart
++@kindex run @r{(@code{restart})}
++@kindex R @r{(@code{restart})}
++@item restart @ovar{options to debugged script}
++@itemx run
++@itemx R
++Use the @code{restart} command to restart your script under
++@value{DBG}. Without any arguments, the script name and parameters
++from the last invocation are used. @value{dBGP} tries to maintain the
++settings, watchpoints, breakpoints, actions and so on. Internally it
++uses line numbers and filenames to record he position of interesting
++places in your porgram; so if your program changes some or all of
++these numbers may be off. Environment variable
++@code{BASHDB_RESTART_FILE} is and a temporary file are used to signal
++a restart, so you shouldn't uset @code{BASHDB_RESTART_FILE} (or any
++environment variable starting with @code{BASHDB_}.
++
++@end table
++
++@node Command Files
++@section Command files
++
++@cindex command files
++A command file for @DBG is a file of lines that are @DBG
++commands.  Comments (lines starting with @kbd{#}) may also be included.
++An empty line in a command file does nothing; it does not mean to repeat
++the last command, as it would from the terminal.
++
++@cindex init file
++@cindex @file{.bashdbinit}
++@cindex @file{bashdb.ini}
++When you start @value{DBG}, it automatically executes commands from its
++@dfn{init files}, normally called @file{.bashdbinit}@footnote{The DJGPP
++port of @DBG uses the name @file{bashdb.ini} instead, due to the
++limitations of file names imposed by DOS filesystems.}.
++During startup, @DBG does the following:
++
++@enumerate
++@item
++Reads the init file (if any) in your home directory@footnote{On
++DOS/Windows systems, the home directory is the one pointed to by the
++@code{HOME} environment variable.}.
++
++@item
++Processes command line options and operands.
++
++@item
++Reads the init file (if any) in the current working directory.
++
++@item
++Reads command files specified by the @samp{-x} option.
++@end enumerate
++
++The init file in your home directory can set options (such as @samp{set
++complaints}) that affect subsequent processing of command line options
++and operands.  Init files are not executed if you use the @samp{-x}
++option (@pxref{Options for the bashdb script, ,bashdb script options}).
++
++@cindex init file name
++On some configurations of @value{DBG}, the init file is known by a
++different name (these are typically environments where a specialized
++form of @DBG may need to coexist with other forms, hence a
++different name for the specialized version's init file).  These are the
++environments with special init file names:
++
++You can also request the execution of a command file with the
++@code{source} command:
++
++@table @code
++@kindex source
++@item source @var{filename}
++Execute the command file @var{filename}.
++@end table
++
++The lines in a command file are executed sequentially.  They are not
++printed as they are executed.  If there is an error, execution
++proceeds to the next command in the file.
++
++@node Arguments
++@section Your script's arguments
++
++@cindex arguments (to your script)
++The arguments to your script can be specified by the arguments of the
++@code{restart} command.
++They are passed to a shell, which expands wildcard characters and
++performs redirection of I/O, and thence to your script.
++
++@code{restart} with no arguments uses the same arguments used by the previous
++@code{restart}, or those set by the @code{set args} command..
++
++@table @code
++@kindex set args
++@item set args
++Specify the arguments to be used the next time your program is run.  If
++@code{set args} has no arguments, @code{restart} executes your program
++with no arguments.  Once you have run your program with arguments,
++using @code{set args} before the next @code{restart} is the only way to run
++it again without arguments.
++
++@kindex show args
++@item show args
++Show the arguments to give your program when it is started.
++@end table
++
++@node Input/Output
++@section Your script's input and output
++
++@cindex redirection
++@cindex I/O
++@cindex terminal
++By default, the script you run under the BASH debugger does input and
++output to the same terminal that BASH uses.  Before running the script
++to be debugged, the debugger records the tty that was in effect. All
++of its output is then written to that.  However you can change this
++when using the @samp{bashdb} script using the @samp{-t} option.
++
++
++@table @code
++@kindex info terminal
++@item info terminal
++Displays information recorded by @DBG about the terminal modes your
++program is using.
++@end table
++
++@kindex tty
++@cindex controlling terminal
++Another way to specify where your script should do input and output is
++with the @code{tty} command.  This command accepts a file name as
++argument, and causes this file to be the default for future @code{restart}
++commands.  It also resets the controlling terminal for the child
++process, for future @code{restart} commands.  For example,
++
++@example
++tty /dev/ttyb
++@end example
++
++@noindent
++directs that processes started with subsequent @code{restart} commands
++default to do input and output on the terminal @file{/dev/ttyb} and have
++that as their controlling terminal.
++
++An explicit redirection in @code{restart} overrides the @code{tty} command's
++effect on the input/output device, but not its effect on the controlling
++terminal.
++
++When you use the @code{tty} command or redirect input in the @code{restart}
++command, only the input @emph{for your script} is affected.  The input
++for @DBG still comes from your terminal.
++
++@node Script/Debugger Interaction
++@section Script/Debugger Interaction
++
++@value{dBGP} and your program live in the same variable space so
++to speak. @BASH does not have a notion of module scoping or lexical
++hiding (yet) and this then imposes some additional care and awareness.
++
++Most of the variables and functions used inside @DBG start
++@code{_Dbg_}, so please don't use variables or functions with these
++names in your program.
++
++@emph{Note: there are some other variables that begin with just an
++underscore (@code{_}); over time these will be phased out. But until
++then, avoid those or consult what is used by the debugger. Run
++@samp{bashdb --debugger -c 'declare -p'} to list all the variables in
++use including those used by the debugger.}
++
++A number of @DBG environment variables are also reserved for
++use; these start with @code{BASHDB_}. For example:
++@env{BASHDB_INPUT}, @env{BASHDB_LEVEL} and,
++@env{BASHDB_QUIT_ON_QUIT} (@pxref{Debug, ,Debug}),
++@env{BASHDB_RESTART_FILE} (@pxref{Starting, ,Starting}), to name a
++few.  Finally, there are some @BASH environment dynamic
++variables and these start with @env{BASH_}. For example
++@env{BASH_SUBSHELL} (@pxref{Debug, ,Debug}), @env{BASH_COMMAND}
++(@pxref{Command Display, ,Command Display}), @env{BASH_LINENO}, and
++@env{BASH_SOURCE} to name a few.
++
++In order to do its work @value{dBGP} sets up a @code{DEBUG}
++trap. Consequently a script shouldn't reset this or the debugger will
++lose control. @value{dBGP} also sets up an @code{EXIT} handler so that
++it can gain control after the script finishes. Another signal
++intercepted is the an interrupt or @code{INT} signal. For more
++information about signal handling, @pxref{Signals, ,Signals}
++
++@node Debugger Command Reference
++@chapter BASH Debugger Command Reference
++
++You can abbreviate the long name of @DBG command to the first
++few letters of the command name, if that abbreviation is unambiguous;
++and you can repeat the @code{next} o r@code{step} commands by typing
++just @key{RET}. Some commands which require a parameter, such as
++@code{print} remember the argument that was given to them.
++
++@menu
++* Command Syntax::       How to give commands to the BASH debugger
++* Help::                 How to ask for help (help)
++* Quit::                 Leaving the debugger (quit)
++* Information::          Status and Debugger settings (info, show)
++* Stopping::             Stopping and continuing (break, watch, step, cont...)
++* Stack::                Examining the stack (where, up, down, frame)
++* List::                 Printing source files (list)
++* Search::               Searching source files (/pat/ ?pat?)
++* Data::                 Examining data (print, examine, info variables)
++* Evaluation/Execution:: Arbitrary execution (eval, shell)
++* Auto Display::         Executing expressions on stop (display, undisplay)
++* Controlling bashdb::   Controlling bashdb (set, history)
++@end menu
++
++@node Command Syntax
++@section Command syntax
++
++A BASH debugger command is a single line of input.  There is no limit on
++how long it can be.  It starts with a command name, which is followed by
++arguments whose meaning depends on the command name.  For example, the
++command @code{step} accepts an argument which is the number of times to
++step, as in @samp{step 5}.  You can also use the @code{step} command
++with no arguments.  Some commands do not allow any arguments.
++
++@cindex repeating next/step commands
++@kindex RET @r{(repeat last command)}
++A blank line as input to @DBG (typing just @key{RET}) means to
++repeat the previous next or step command.
++
++@kindex # @r{(a comment)}
++@cindex comment
++Any text from a @kbd{#} to the end of the line is a comment; it does
++nothing.  This is useful mainly in command files (@pxref{Command
++Files,,Command files}).
++
++@node Help
++@section Getting help (@samp{help})
++@cindex online documentation
++
++Once inside the BASH debugger, you can always ask it for information on its
++commands, using the command @code{help}.
++
++@table @code
++@kindex h @r{(@code{help})}
++@item help
++@itemx h
++You can use @code{help} (abbreviated @code{h}) with no arguments to
++display a short list of named classes of commands:
++@end table
++
++@flushleft
++@smallexample
++bashdb<0> @b{help}
++bashdb commands:
++List/search source lines:                 Control script execution:
++-------------------------                 -------------------------
++ l [start|.] [cnt] List cnt lines         T [n]        Stack trace
++                   from line start        s [n]        Single step [n times]
++ l sub       List source code fn          n [n]        Next, steps over subs
++ - or .      List previous/current line   <CR>/<Enter> Repeat last n or s
++ w [line]    List around line             c [linespec] Continue [to linespec]
++ f filename  View source in file          L            List all breakpoints
++ /pat/       Search forward for pat       b linespec   Set breakpoint
++ ?pat?       Search backward for pat      del [n].. or D Delete a/all breaks
++                                                         by entry number
++Debugger controls:                        skip         skip execution of cmd
++-------------------------                 cl linespec  Delete breakpoints by
++ H [num]         Show last num commands                line spec
++ q [exp] or ^D   Quit returning exp       R [args]     Attempt a restart
++ info [cmd]      Get info on cmd.         u [n]        Go up stack by n or 1.
++ !n or hi n      Run debugger history n   do [n]       Go down stack by n or 1.
++ h or ? [cmd]    Get help on command      W [var]      Add watchpoint. If no
++ info [cmd]      Get info on cmd                       no expr, delete all
++ show [cmd]      Show settings            We [expr]    Add Watchpoint arith
++                                                       expr
++ so file         read in dbg commands     t            Toggle trace
++                                          en/di n      enable/disable brkpt,
++ set x y         set a debugger variable               watchpoint, or display
++ e bash-cmd      evaluate a bash command  tb linespec  Add one-time break
++ disp expr       add a display expr       a linespec cmd eval "cmd" at linespec
++ M               Show module versions     A            delete all actions
++ x expr          evaluate expression      ret          jump out of fn or source
++                 (via declare, let, eval) finish       execute until return
++ deb             debug into another       cond n exp   set breakpoint condition
++                 shell script
++ !! cmd [args]   execute shell command "cmd" with "args"
++
++Data Examination: also see e, t, x
++-------------------------
++ p variable      Print variable
++ V [[!]pat]      List variable(s) matching or not (!) matching pattern pat
++ S [[!]pat]      List subroutine names [not] matching pattern pat
++
++Readline command line editing (emacs/vi mode) is available
++For more help, type h <cmd> or consult online-documentation.
++@end smallexample
++@end flushleft
++@c the above line break eliminates huge line overfull...
++
++@table @code
++@item help @var{command}
++With a command name as @code{help} argument, the BASH debugger displays
++short information on how to use that command.
++
++@example
++bashdb<0> @b{help list}
++l linespec      List window lines starting at linespec.
++l min incr      List incr lines starting at 'min' linespec.
++l               List next window of lines.
++l .             Same as above.
++                Long command name: list.
++@end example
++
++In addition to @code{help}, you can use the debugger command
++@code{info} to inquire about the state of your script, or the state of
++@DBG itself.  The listings under @code{info} in the Index
++point to all the sub-commands.  @xref{Command Index}.
++@end table
++
++@c @group
++@table @code
++@kindex info
++@kindex i @r{(@code{info})}
++@item info
++This command (abbreviated @code{i}) is for describing the state of
++your program.  For example, you can list the arguments given to your
++script with @code{info args}, or list the breakpoints you have set
++with @code{info breakpoints}.  You can get a complete list of the
++@code{info} sub-commands with @w{@code{help info}}.
++
++@example
++bashdb<0> @b{info}
++Info subcommands are: args breakpoints display files source sources stack terminal variables watchpoints
++bashdb<1> @b{info source}
++Current script file is parm.sh
++Contains 34 lines.
++@end example
++@end table
++
++
++@node Quit
++@section Quitting the BASH debugger (@samp{quit})
++
++@table @code
++@kindex quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
++@kindex q @r{(@code{quit})}
++@item quit @ovar{expression}
++@item quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
++@itemx q
++
++To exit @value{DBG}, use the @code{quit} command (abbreviated
++@code{q}), or type an end-of-file character (usually @kbd{C-d}).  If
++you do not supply @var{expression}, @DBG will try to terminate
++normally or with exit code 0. Otherwise it will terminate using the
++result of @var{expression} as the exit code.
++
++A simple @code{quit} tries to terminate all nested subshells that may
++be in effect.  If you are nested a subshell, this is normally
++indicated in a debugger prompt by the number of parentheses that the
++history number is inside --- no parenthesis means there is no subshell
++in effect. The dynamic variable @env{BASH_SUBSHELL} also contains the
++number of subshells in effect.
++
++If you want only to terminate some number of subshells but not all of
++them, you can give a count of the number of subshells to leave after
++the return-code expression. To leave just one level of subshell
++@code{return} does almost the same thing. (See @pxref{Returning,
++,Returning}) There is a subtle difference between the two though:
++@code{return} will leave you at the beginning of the next statement
++while @code{quit} may leave you at the place the subshell was invoked
++which may be in the middle of another command such as an assingment
++statement or condition test.
++
++If the environment variable @code{BASHDB_QUIT_ON_QUIT} is set, when the
++program terminates, the debugger will also terminate too. This may be
++useful if you are debugging a script which calls another script and
++you want this inner script just to return to the outer script.
++@end table
++
++@node Stopping
++@section Stopping and Resuming Execution (@samp{break}, @samp{watch}, @samp{step}, @samp{cont})
++
++One important use of a debugger is to stop your program before it
++terminates so that, if your script might run into trouble, you can
++investigate and find out why. However should your script accidently
++continue to termination, @DBG has arranged for it not to leave the
++debugger without your explicit instruction. That way, you can restart
++the program using the same command arguments.
++
++Inside @value{DBG}, your script may stop for any of several reasons,
++such as a signal, a breakpoint, or reaching a new line after a
++debugger command such as @code{step}.  You may then examine and
++change variables, set new breakpoints or remove old ones, and then
++continue execution.
++
++@menu
++* Breakpoints::          Breakpoints, watchpoints (break, watch, clear)
++* Resuming Execution::   Resuming execution (continue, step, next, skip, debug)
++* Signals::              Signals
++@end menu
++
++@node Breakpoints
++@subsection Breakpoints, watchpoints
++
++@cindex breakpoints
++A @dfn{breakpoint} makes your script stop whenever a certain point in
++the program is reached.  For each breakpoint, you can add conditions to
++control in finer detail whether your script stops.
++
++You can set breakpoints with the @code{break} command and its variants
++(@pxref{Set Breaks, ,Setting breakpoints}), to specify the place where
++your script should stop by line number.  or function name in the
++debugged script.
++
++@cindex watchpoints
++@cindex breakpoint on variable modification
++A @dfn{watchpoint} is a special breakpoint that stops your script when
++the value of an expression changes.  There is a different command to
++set watchpoints (@pxref{Set Watchpoints, ,Setting watchpoints}).
++
++But aside from that, you can manage a watchpoint like any other
++breakpoint: you delete enable, and disable both breakpoints and
++watchpoints using the same commands.
++
++You can arrange to have values from your program displayed automatically
++whenever @value{BASH} stops at a breakpoint.  @xref{Auto Display,,
++Automatic display}.
++
++@cindex breakpoint numbers
++@cindex numbers for breakpoints
++@DBG assigns a number to each breakpoint and watchpoint when
++you create it; these numbers are successive integers starting with
++one.  In many of the commands for controlling various features of
++breakpoints you use the breakpoint number to say which breakpoint you
++want to change.  Each breakpoint may be @dfn{enabled} or
++@dfn{disabled}; if disabled, it has no effect on your script until you
++enable it again.
++
++@cindex watchpoints numbers
++@cindex numbers for watchpoints
++Watchpoint numbers however are distiguished from breakpoint numbers by
++virtue of their being suffixed with the either an upper- or lower-case
++`W'.  For example, to enable breakpoint entry 0 along with watchpoint
++entry 1 you would write @samp{enable 1 2w}, the ``2w'' refers to the
++watchpoint; ``2W'' would work just as well.
++
++@ifset FINISHED
++@cindex breakpoint ranges
++@cindex ranges of breakpoints
++Some @DBG commands accept a range of breakpoints on which to
++operate.  A breakpoint range is either a single breakpoint number, like
++@samp{5}, or two such numbers, in increasing order, separated by a
++hyphen, like @samp{5-7}.  When a breakpoint range is given to a command,
++all breakpoint in that range are operated on.
++@end ifset
++
++@menu
++* Set Breaks::                      Setting breakpoints (break, tbreak)
++* Set Watchpoints::                 Setting watchpoints (watch, watche)
++* Delete Breaks::                   Deleting breakpoints (delete, clear)
++* Disabling::                       Disabling breakpoints (disable, enable)
++* Conditions::                      Break conditions (condition)
++@end menu
++
++@node Set Breaks
++@subsubsection Setting breakpoints (@samp{break} @samp{tbreak})
++
++@kindex break
++@kindex b @r{(@code{break})}
++@cindex latest breakpoint
++Breakpoints are set with the @code{break} command (abbreviated
++@code{b}).
++
++@table @code
++@item break @var{function}
++Set a breakpoint at entry to function @var{function}.
++
++@item break @var{linenum}
++Set a breakpoint at line @var{linenum} in the current source file.
++The current source file is the last file whose source text was printed.
++The breakpoint will stop your script just before it executes any of the
++code on that line.
++
++@item break @var{filename}:@var{linenum}
++Set a breakpoint at line @var{linenum} in source file @var{filename};
++@var{filename} has to be one of the files previously read in and has
++to be specified exactly as the name used when read in. For a list of
++read-in files, use the @samp{info files} command.
++
++@ifset FINISHED
++@item break
++When called without any arguments, @code{break} sets a breakpoint at
++the next instruction to be executed in the selected stack frame
++(@pxref{Stack, ,Examining the Stack}).  In any selected frame but the
++innermost, this makes your script stop as soon as control returns to
++that frame.  If you use @code{break} without an argument in the
++innermost frame, @DBG stops the next time it reaches the
++current location; this may be useful inside loops.
++@end ifset
++
++@item break @dots{} if @var{cond}
++Set a breakpoint with condition @var{cond}; evaluate the expression
++@var{cond} each time the breakpoint is reached, and stop only if the
++value is nonzero---that is, if @var{cond} evaluates as true. The
++expression is evaluated via the @code{let} builtin funtion.
++@samp{@dots{}} stands for one of the possible arguments described
++above (or no argument) specifying where to break. The word ``if'' is
++often optional and is necessary only @samp{@dots{}} is
++omitted. @xref{Conditions, ,Break conditions}, for more information on
++breakpoint conditions.
++
++Examples:
++@example
++bashdb<0> @b{break fn1}
++Breakpoint 1 set in file parm.sh, line 3.
++bashdb<1> @b{break 28}
++Breakpoint 2 set in file parm.sh, line 28.
++bashdb<2> @b{break parm.sh:29}
++Breakpoint 3 set in file parm.sh, line 29.
++bashdb<3> @b{break 28 if x==5}
++Breakpoint 4 set in file parm.sh, line 28.
++@end example
++
++@kindex tbreak
++@item tbreak @var{args}
++Set a breakpoint enabled only for one stop.  @var{args} are the
++same as for the @code{break} command, and the breakpoint is set in the same
++way, but the breakpoint is automatically deleted after the first time your
++program stops there.  @xref{Disabling, ,Disabling breakpoints}.
++
++@kindex info breakpoints
++@cindex @code{$_} and @code{info breakpoints}
++@item info breakpoints @ovar{n}
++@itemx info break @ovar{n}
++@itemx info watchpoints @ovar{n}
++Print a table of all breakpoints, watchpoints set and not deleted,
++with the following columns for each breakpoint:
++
++@table @emph
++@item Breakpoint Numbers (@samp{Num})
++@item Enabled or Disabled (@samp{Enb})
++Enabled breakpoints are marked with @samp{1}.  @samp{0} marks breakpoints
++that are disabled (not enabled).
++@item Count
++The number of times that breakpoint or watchpoint has been hit.
++@item Condition
++The arithmetic expression
++@item File and Line (@samp{file:line})
++The filename and line number inside that file where of breakpoint in
++the script. The file and line are separated with a colon.
++@end table
++
++@noindent
++If a breakpoint is conditional, @code{info break} shows the condition on
++the line following the affected breakpoint; breakpoint commands, if any,
++are listed after that.
++
++@noindent
++@code{info break} displays a count of the number of times the breakpoint
++has been hit.
++
++@code{info break} with a breakpoint number @var{n} as argument lists
++only that breakpoint.
++
++Examples:
++@example
++bashdb<4> @b{info break}
++Breakpoints at following places:
++Num Type       Disp Enb What
++1   breakpoint keep y   parm.sh:3
++2   breakpoint keep y   parm.sh:28
++3   breakpoint keep y   parm.sh:29
++4   breakpoint keep y   parm.sh:28
++No watch expressions have been set.
++bashdb<5> @b{info break 4}
++Num Type       Disp Enb What
++4   breakpoint keep y   parm.sh:28
++No watch expressions have been set.
++@end example
++@end table
++
++
++@ifset FINISHED
++This is especially useful in conjunction with the
++@code{ignore} command.  You can ignore a large number of breakpoint
++hits, look at the breakpoint info to see how many times the breakpoint
++was hit, and then run again, ignoring one less than that number.  This
++will get you quickly to the last hit of that breakpoint.
++@end ifset
++
++@DBG allows you to set any number of breakpoints at the same place in
++your script.  There is nothing silly or meaningless about this.  When
++the breakpoints are conditional, this is even useful
++(@pxref{Conditions, ,Break conditions}).
++
++@node Set Watchpoints
++@subsubsection Setting watchpoints (@samp{watch}, @samp{watche})
++
++@cindex setting watchpoints
++You can use a watchpoint to stop execution whenever the value of an
++expression changes, without having to predict a particular place where
++this may happen. As with the @code{print} (@pxref{Data,,Examining
++Data}), the idiosyncracies of a BASH or any POSIX shell derivative
++suggest using two commands. The @code{watch} command is just for a
++single variables; the @code{watche} command uses the builtin ``let''
++command to evaluate an expression. If the variable you are tracking
++can take a string value, issuing something like @samp{watch foo} will
++not have the desired effect---any string assignment to @code{foo} will
++have a value 0 when it is assigned via ``let.''
++
++@table @code
++@kindex watch
++@item watch @var{var}
++Set a watchpoint for a variable.  @DBG will break when the
++value of @var{var} changes. In this command do not add a leading
++dollar symbol to @var{var}.
++
++@item watche @var{expr}
++Set a watchpoint for an expression via the builtin ``let'' command.
++@DBG will break when @var{expr} is written into by the program
++and its value changes. Not that this may not work for tracking
++arbitrary string value changes. For that use @code{watch} described
++earlier.
++@end table
++
++@node Delete Breaks
++@subsubsection Deleting breakpoints (@samp{clear}, @samp{delete})
++
++@cindex clearing breakpoints, watchpoints
++@cindex deleting breakpoints, watchpoints
++It is often necessary to eliminate a breakpoint or watchpoint once it
++has done its job and you no longer want your script to stop there.
++This is called @dfn{deleting} the breakpoint.  A breakpoint that has
++been deleted no longer exists; it is forgotten.
++
++With the @code{clear} command you can delete breakpoints according to
++where they are in your script.  With the @code{delete} command you can
++delete individual breakpoints, or watchpoints by specifying their
++breakpoint numbers. @emph{Note: as described below under the ``clear''
++command, ``d'' is an alias for ``clear'', not ``delete''. }
++
++It is not necessary to delete a breakpoint to proceed past it.  @DBG
++automatically ignores breakpoints on the first instruction to be executed
++when you continue execution.
++
++@table @code
++@kindex clear
++@kindex d @r{(@code{clear})}
++@item clear
++Delete any breakpoints at the next instruction to be executed in the
++selected stack frame (@pxref{Selection, ,Selecting a frame}).  When
++the innermost frame is selected, this is a good way to delete a
++breakpoint where your script just stopped.
++
++It may seem odd that we have an alias ``d'' for ``clear.'' It so
++happens that Perl's debugger use ``d'' for its delete command and the
++delete concept in Perl's debugger corresponds to ``clear'' in
++GDB. (Perl doesn't have a notion of breakpoint entry numbers). So in
++order to be compatible with both debugger interfaces, ``d'' is used as
++an alias for ``clear.'' Clear?
++
++@item clear @var{function}
++@itemx clear @var{filename}:@var{function}
++Delete any breakpoints set at entry to the function @var{function}.
++
++@item clear @var{linenum}
++@itemx d @var{linenum}
++@ifset FINISHED
++@itemx clear @var{filename}:@var{linenum}
++@end ifset
++Delete any breakpoints set at or within the code of the specified line.
++
++@cindex delete breakpoints
++@kindex delete
++@kindex de @r{(@code{delete})}
++@item delete @ovar{breakpoints}
++Delete the breakpoints, watchpoints specified as arguments.
++
++If no argument is specified, delete all breakpoints (@DBG asks
++confirmation, unless you have @code{set confirm off}).  You can
++abbreviate this command as @code{de}.
++
++
++Note that for compatibility with Perl's debugger, @code{d} means
++something else: @code{clear}.
++
++@end table
++
++@node Disabling
++@subsubsection Disabling breakpoints (@samp{disable}, @samp{enable})
++
++Rather than deleting a breakpoint or watchpoint, you might
++prefer to @dfn{disable} it.  This makes the breakpoint inoperative as if
++it had been deleted, but remembers the information on the breakpoint so
++that you can @dfn{enable} it again later.
++
++You disable and enable breakpoints, watchpoints, and catchpoints with
++the @code{enable} and @code{disable} commands, optionally specifying one
++or more breakpoint numbers as arguments.  Use @code{info break} or
++@code{info watch} to print a list of breakpoints, watchpoints, and
++catchpoints if you do not know which numbers to use.
++
++A breakpoint, watchpoint, or catchpoint can have any of four different
++states of enablement:
++
++@itemize @bullet
++@item
++Enabled.  The breakpoint stops your program.  A breakpoint set
++with the @code{break} command starts out in this state.
++@item
++Disabled.  The breakpoint has no effect on your program.
++@item
++Enabled once.  The breakpoint stops your program, but then becomes
++disabled.
++@item
++Enabled for deletion.  The breakpoint stops your program, but
++immediately after it does so it is deleted permanently.  A breakpoint
++set with the @code{tbreak} command starts out in this state.
++@end itemize
++
++You can use the following commands to enable or disable breakpoints,
++watchpoints, and catchpoints:
++
++@table @code
++@kindex disable breakpoints
++@kindex disable
++@kindex dis @r{(@code{disable})}
++@item disable @ovar{breakpoints}
++Disable the specified breakpoints---or all breakpoints, if none are
++listed.  A disabled breakpoint has no effect but is not forgotten.  All
++options such as ignore-counts, conditions and commands are remembered in
++case the breakpoint is enabled again later.  You may abbreviate
++@code{disable} as @code{dis}.
++
++@kindex enable breakpoints
++@kindex enable
++@item enable @ovar{breakpoints}
++Enable the specified breakpoints (or all defined breakpoints).  They
++become effective once again in stopping your program.
++@end table
++
++@c FIXME: I think the following ``Except for [...] @code{tbreak}'' is
++@c confusing: tbreak is also initially enabled.
++Except for a breakpoint set with @code{tbreak} (@pxref{Set Breaks,
++,Setting breakpoints}), breakpoints that you set are initially enabled;
++subsequently, they become disabled or enabled only when you use one of
++the commands above.  (The command @code{until} can set and delete a
++breakpoint of its own, but it does not change the state of your other
++breakpoints; see @ref{Resuming Execution, ,Resuming Execution}.)
++
++@node Conditions
++@subsubsection Break conditions (@samp{condition})
++@cindex conditional breakpoints
++@cindex breakpoint conditions
++
++The simplest sort of breakpoint breaks every time your script reaches
++a specified place.  You can also specify a @dfn{condition} for a
++breakpoint.  A condition is just a BASH expression.
++
++Break conditions can be specified when a breakpoint is set, by using
++@samp{if} in the arguments to the @code{break} command.  @xref{Set
++Breaks, ,Setting breakpoints}.  A breakpoint with a condition
++evaluates the expression each time your script reaches it, and your
++script stops only if the condition is @emph{true}.
++
++@cindex one-time breakpoints
++There is also a notion of a ``one-time'' breakpoint which gets deleted
++as soon as it is hit, so that that breakpoint is executed once only.
++
++Conditions are also accepted for watchpoints; you may not need them,
++since a watchpoint is inspecting the value of an expression anyhow---but
++it might be simpler, say, to just set a watchpoint on a variable name,
++and specify a condition that tests whether the new value is an interesting
++one.
++
++Break conditions can be specified when a breakpoint is set, by using
++@samp{if} in the arguments to the @code{break} command.  @xref{Set
++Breaks, ,Setting breakpoints}.  They can also be changed at any time
++with the @code{condition} command.
++
++@ifset FINISHED
++You can also use the @code{if} keyword with the @code{watch} command.
++The @code{catch} command does not recognize the @code{if} keyword;
++@code{condition} is the only way to impose a further condition on a
++catchpoint.
++@end ifset
++
++@table @code
++@kindex condition
++@item condition @var{bnum} @var{expression}
++Specify @var{expression} as the break condition for breakpoint
++@var{bnum}.  After you set a condition, breakpoint @var{bnum} stops
++your program only if the value of @var{expression} is true (nonzero).
++
++@item condition @var{bnum}
++Remove the condition from breakpoint number @var{bnum}.  It becomes
++an ordinary unconditional breakpoint.
++@end table
++
++@ifset FINISHED
++When you use @code{condition}, @DBG checks @var{expression}
++immediately for syntactic correctness, and to determine whether
++symbols in it have referents in the context of your breakpoint.  If
++@var{expression} uses symbols not referenced in the context of the
++breakpoint, @DBG prints an error message:
++
++@example
++No symbol "foo" in current context.
++@end example
++@end ifset
++
++@noindent
++@BASH does
++not actually evaluate @var{expression} at the time the @code{condition}
++command (or a command that sets a breakpoint with a condition, like
++@code{break if @dots{}}) is given, however.
++
++Examples;
++@example
++condition 1 x>5   # Stop on breakpoint 0 only if x>5 is true.
++condition 1       # Change that! Unconditinally stop on breakpoint 1.
++@end example
++
++@node Resuming Execution
++@subsection Resuming Execution
++
++@cindex stepping
++@cindex continuing
++@cindex resuming execution
++@dfn{Continuing} means resuming program execution until your script
++completes normally.  In contrast, @dfn{stepping} means executing just
++one more ``step'' of your script, where ``step'' may mean either one
++line of source code.  Either when continuing or when stepping,
++your script may stop even sooner, due to a breakpoint or a signal.
++
++@menu
++* Step::          running the next statement (step)
++* Next::          running the next statement skipping over functions (skip)
++* Finish::        running until the return of a function or ``source'' (finish)
++* Skip::          skipping the next statement (skip)
++* Continue::      continuing execution (continue)
++* Debug::         debugging into another program (debug)
++* Returning::     returning
++@end menu
++
++@node Step
++@subsubsection Step (@samp{step})
++@table @code
++@kindex step
++@kindex s @r{(@code{step})}
++@item step
++Continue running your script until control reaches a different source
++line, then stop it and return control to @value{DBG}.  This command is
++abbreviated @code{s}.
++
++The @code{step} command only stops at the first instruction of a source
++line.  This prevents the multiple stops that could otherwise occur in
++@code{switch} statements, @code{for} loops, etc.  @code{step} continues
++to stop if a function that has debugging information is called within
++the line.  In other words, @code{step} @emph{steps inside} any functions
++called within the line.
++
++@item step @ovar{count}
++Continue running as in @code{step}, but do so @var{count} times.  If a
++breakpoint is reached, or a signal not related to stepping occurs before
++@var{count} steps, stepping stops right away.
++@end table
++
++@node Next
++@subsubsection Next (@samp{next})
++@table @code
++@kindex next
++@kindex n @r{(@code{next})}
++@item next @ovar{count}
++Continue to the next source line in the current (innermost) stack frame.
++This is similar to @code{step}, but function calls that appear within
++the line of code are executed without stopping.  Execution stops when
++control reaches a different line of code at the original stack level
++that was executing when you gave the @code{next} command.  This command
++is abbreviated @code{n}.
++
++An argument @var{count} is a repeat count, as for @code{step}.
++@end table
++
++@node Finish
++@subsubsection Finish (@samp{finish})
++@table @code
++@kindex finish
++@item finish
++Continue running until just after function returns.  @emph{Currently,
++the line shown on a return is the function header, unless the
++@code{return} builtin function is executed in which case it is the
++line number of the @code{return} function.}
++
++Contrast this with the @code{return} command (@pxref{Returning,
++,Returning from a function}) and the @code{quit} (@pxref{Quitting the
++BASH debugger, ,Quitting the BASH debugger}).
++
++@end table
++
++@node Skip
++@subsubsection Skip (@samp{skip})
++@table @code
++@kindex skip
++@item skip @ovar{count}
++Skip exection of the next source line.
++This may be useful if you have an action that ``fixes'' existing code in
++the script. The @code{debug} command internally uses the @code{skip} command
++to skip over existing non-debugged invocation that was presumably just
++run.
++@end table
++
++@node Continue
++@subsubsection Continue (@samp{continue})
++@table @code
++@kindex continue
++@kindex c @r{(@code{continue})}
++@item continue @ovar{linespec}
++@itemx c @ovar{line-number}
++Resume program execution, at the address where your script last
++stopped; any breakpoints set at that address are bypassed.  The
++optional argument @var{linespec} allows you to specify a linespec (a
++line number, function, or filename linenumber combination) to set. A
++one-time breakpoint is deleted when that breakpoint is reached. Should
++the program stop before that breakpoint is reached, for example,
++perhaps another breakpoint or watchpoint is reached first, in a
++listing of the breakpoints you will see this entry with the condition
++9999 which indicates a one-time breakpoint.
++@end table
++
++To resume execution at a different place, you can use @code{return}
++(@pxref{Returning, ,Returning from a function}) to go back to the
++calling function or sourced script. If you are nested inside a
++subshell, @code{quit} with a value for the number of subshells to
++exit also functions like a return.
++
++A typical technique for using stepping is to set a breakpoint
++(@pxref{Breakpoints, ,Breakpoints; watchpoints}) at the
++beginning of the function or the section of your script where a problem
++is believed to lie, run your script until it stops at that breakpoint,
++and then step through the suspect area, examining the variables that are
++interesting, until you see the problem happen.
++
++@node Debug
++@subsubsection Debug (@samp{debug})
++@table @code
++@kindex debug
++@item debug @ovar{script-name}
++Debug into @var{script-name}. If no name is given the current source line
++is used. In either case the options are prepended to cause the
++debugger to run.
++
++The nesting level of the debugger is saved inside environment variable
++@code{BASHDB_LEVEL}. The debugger prompt indicates the level of nesting
++by enclosing the history in that many nestings of @code{<>} symbols.
++
++@end table
++
++@node Returning
++@subsubsection Returning from a function, sourced file, or subshell (@samp{return})
++
++@table @code
++@cindex returning from a function, sourced file or subshell
++@kindex return
++@item return
++@itemx return
++You can cancel execution of a function call or a subshell with the
++@code{return} command.
++@end table
++
++The @code{return} command does not resume execution; it leaves the
++program stopped in the state that would exist if the function had just
++returned.  See also the @code{quit} command (@ref{Quit, ,Quitting the
++BASH debugger}). In some situations @code{return} is similar to
++@code{quit}: in particular when the script is @emph{not} currenlty
++inside in a function and the number of subshells in effect is 0, or
++when a subshell count of 1 is given on the @code{quit} command.
++
++@ifset FINISHED
++In contrast, the @code{finish} command (@pxref{Continuing
++and Stepping, ,Continuing and stepping}) resumes execution until the
++selected stack frame returns naturally.
++@end ifset
++
++@node Signals
++@subsection Signals
++@cindex signals
++
++A signal is an asynchronous event that can happen in a program.  The
++operating system defines the possible kinds of signals, and gives each
++kind a name and a number.  For example, in Unix @code{SIGINT} is the
++signal a program gets when you type an interrupt character (often
++@kbd{C-c}); @code{SIGALRM} occurs when the alarm clock timer goes off
++(which happens only if your program has requested an alarm).
++
++Some signal handlers are installed and changed for @value{DBG}'s
++normal use: @code{SIGDEBUG} and @code{SIGEXIT}. @code{SIGDEBUG} is
++used by the debugger to potentially stop your program before execution
++of each statement occurs, and @code{SIGEXIT} is used to catch your
++program just before it is set to leave so you have the option of
++restarting the program with the same options (and not leave the
++debugger) or let the program quit.
++
++Signal handlers that the debugged script might have installed are
++saved and called before the corresponding debugger handler. Thus, the
++debugged program should work roughly in the same fashion as when it is
++not debugged. However there are some call-stack variables which
++inevitably will differ. To try to hedge this a little so the behaviour
++is the same, @value{DBG} will modify arguments to the traps if it
++finds one of the call-stack that change as a result of the debugger
++being in place. In particluar @env{$LINENO} will get replaced with
++@env{$@{BASH_LINENO[0]@}}; also @env{$@{BASH_LINENO[0]@}} and
++@env{$@{BASH_SOURCE[0]@}} get replaced with
++@env{$@{BASH_LINENO[1]@}} and @env{$@{BASH_SOURCE[1]@}}
++respectively.
++
++The debugger also installs an interrupt handler @code{SIGINT} so that
++errant programs can be interrupted and you can find out where the
++program was when you interrupted it.
++
++@cindex fatal signals
++Some signals, including @code{SIGALRM}, are a normal part of the
++functioning of your program.  Others, such as @code{SIGSEGV}, indicate
++errors; these signals are @dfn{fatal} (they kill your program immediately) if the
++program has not specified in advance some other way to handle the signal.
++@code{SIGINT} does not indicate an error in your program, but it is normally
++fatal so it can carry out the purpose of the interrupt: to kill the program.
++
++@BASH has the ability to detect any occurrence of a signal in your
++program.  You can tell @BASH in advance what to do for each kind of
++signal.
++
++@cindex handling signals
++Normally, @BASH is set up to let the non-erroneous signals like
++@code{SIGALRM} be silently passed to your program
++(so as not to interfere with their role in the program's functioning)
++but to stop your program immediately whenever an error signal happens.
++You can change these settings with the @code{handle} command.
++
++@table @code
++@kindex info signals
++@item info signals
++@itemx info handle
++Print a table of all the kinds of signals and how @BASH has been told to
++handle each one.  You can use this to see the signal numbers of all
++the defined types of signals.
++
++@code{info handle} is an alias for @code{info signals}.
++
++@kindex handle
++@item handle @var{signal} @var{keywords}@dots{}
++Change the way @BASH handles signal @var{signal}.  @var{signal}
++can be the number of a signal or its name (with or without the
++@samp{SIG} at the beginning); a list of signal numbers of the form
++@samp{@var{low}-@var{high}}; or the word @samp{all}, meaning all the
++known signals.  The @var{keywords} say what change to make.
++@end table
++
++@c @group
++The keywords allowed by the @code{handle} command can be abbreviated.
++Their full names are:
++
++@table @code
++@item stop
++@BASH should stop your program when this signal happens.  This implies
++the @code{print} keyword as well.
++
++@item nostop
++@BASH should not stop your program when this signal happens.  It may
++still print a message telling you that the signal has come in.
++
++@item print
++@BASH should print a message when this signal happens.
++
++@item noprint
++@BASH should not mention the occurrence of the signal at all.
++
++@item stack
++@BASH should print a stack trace when this signal happens.
++
++@item nostack
++@BASH should not print a stack trace when this signal occurs.
++
++@ifset FINISHED
++@item pass
++@itemx noignore
++@BASH should allow your program to see this signal; your program
++can handle the signal, or else it may terminate if the signal is fatal
++and not handled.  @code{pass} and @code{noignore} are synonyms.
++
++@item nopass
++@itemx ignore
++@BASH should not allow your program to see this signal.
++@code{nopass} and @code{ignore} are synonyms.
++@end ifset
++@end table
++@c @end group
++
++@ifset FINISHED
++When a signal stops your program, the signal is not visible to the
++program until you
++continue.  Your program sees the signal then, if @code{pass} is in
++effect for the signal in question @emph{at that time}.  In other words,
++after @BASH reports a signal, you can use the @code{handle}
++command with @code{pass} or @code{nopass} to control whether your
++program sees that signal when you continue.
++
++The default is set to @code{nostop}, @code{noprint}, @code{pass} for
++non-erroneous signals such as @code{SIGALRM}, @code{SIGWINCH} and
++@code{SIGCHLD}, and to @code{stop}, @code{print}, @code{pass} for the
++erroneous signals.
++
++You can also use the @code{signal} command to prevent your program from
++seeing a signal, or cause it to see a signal it normally would not see,
++or to give it any signal at any time.  For example, if your program stopped
++due to some sort of memory reference error, you might store correct
++values into the erroneous variables and continue, hoping to see more
++execution; but your program would probably terminate immediately as
++a result of the fatal signal once it saw the signal.  To prevent this,
++you can continue with @samp{signal 0}.  @xref{Signaling, ,Giving your
++program a signal}.
++@end ifset
++
++@node Information
++@section Status and Debugger Settings (@samp{info}, @samp{show})
++
++In addition to @code{help}, you can use the @BASH commands @code{info}
++and @code{show} to inquire about the state of your program, or the state
++of @BASH itself.  Each command supports many topics of inquiry; this
++manual introduces each of them in the appropriate context.  The listings
++under @code{info} and under @code{show} in the Index point to
++all the sub-commands.  @xref{Command Index}.
++
++@c @group
++@table @code
++@kindex info
++@kindex i @r{(@code{info})}
++@item info
++This command (abbreviated @code{i}) is for describing the state of
++your program.  For example, you canlist the current @code{$1}, @code{$2}
++parameters with @code{info args}, or list the breakpoints you have set
++with @code{info breakpoints} or @code{info watchpoints}.  You can get
++a complete list of the @code{info} sub-commands with @w{@code{help
++info}}.
++
++@kindex set
++@item set
++You can assign the result of an expression to an environment variable
++with @code{set}.  For example, you can set the number of lines
++@BASH will list by default to 20 with @code{set listsize 20}.
++
++@kindex show
++@item show
++In contrast to @code{info}, @code{show} is for describing the state of
++@BASH itself.
++You can change most of the things you can @code{show}, by using the
++related command @code{set};
++
++The distinction between @code{info} and @code{show} however is a bit
++fuzzy. For example, to list the arguments given to your script use
++@code{show args}; @code{info args} does something different.
++
++@kindex info set
++To display all the settable parameters and their current
++values, you can use @code{show} with no arguments; you may also use
++@code{info set}.  Both commands produce the same display.
++@c FIXME: "info set" violates the rule that "info" is for state of
++@c FIXME...program.  Ck w/ GNU: "info set" to be called something else,
++@c FIXME...or change desc of rule---eg "state of prog and debugging session"?
++@end table
++@c @end group
++
++Here are three miscellaneous @code{show} subcommands, all of which are
++exceptional in lacking corresponding @code{set} commands:
++
++@table @code
++@kindex show version
++@cindex version number
++@item show version
++Show what version of @BASH is running.  You should include this
++information in @BASH bug-reports.  If multiple versions of
++@BASH are in use at your site, you may need to determine which
++version of @BASH you are running; as @BASH evolves, new
++commands are introduced, and old ones may wither away.  Also, many
++system vendors ship variant versions of @value{BASH}, and there are
++variant versions of @BASH in @sc{gnu}/Linux distributions as well.
++The version number is the same as the one announced when you start
++@value{BASH}.
++
++@kindex show copying
++@item show copying
++Display information about permission for copying @value{BASH}.
++
++@kindex show warranty
++@item show warranty
++Display the @sc{gnu} ``NO WARRANTY'' statement, or a warranty,
++if your version of @DBG comes with one.
++
++@end table
++
++@node Stack
++@section Examining the Stack (@samp{where}, @samp{frame}, @samp{up}, @samp{down})
++
++When your script has stopped, one thing you'll probably want to know
++is where it stopped and some idea of how it got there.
++
++@cindex call stack
++Each time your script performs a function call (either as part of a
++command substitution or not), or `source's a file, information about
++this action is saved.  The call stack then is this a history of the
++calls that got you to the point that you are currently stopped at.
++
++@cindex selected frame
++One of the stack frames is @dfn{selected} by @DBG and many
++@DBG commands refer implicitly to the selected frame.  In
++particular, whenever you ask @DBG to list lines without giving
++a line number or location the value is found in the selected frame.
++There are special @DBG commands to select whichever frame you
++are interested in. @xref{Selection, ,Selecting a frame}.
++
++When your program stops, @BASH automatically selects the
++currently executing frame and describes it briefly, similar to the
++@code{frame} command.
++
++
++@menu
++* Frames::                      Stack frames
++* Backtrace::                   Backtraces (where)
++* Selection::                   Selecting a frame (up, down, frame)
++
++@end menu
++
++@node Frames
++@subsection Stack frames
++
++@cindex frame, definition
++@cindex stack frame
++The call stack is divided up into contiguous pieces called @dfn{stack
++frames}, or @dfn{frames} for short; each frame is the data associated
++with one call to one function.  The frame contains the line number of
++the caller of the function, the source-file name that the line refers
++to and function name (which could be the built-in name ``source'')..
++
++@cindex initial frame
++@cindex outermost frame
++@cindex innermost frame
++When your script is started, the stack has only one frame, that of the
++function @code{main}.  This is called the @dfn{initial} frame or the
++@dfn{outermost} frame.  Each time a function is called, a new frame is
++made.  Each time a function returns, the frame for that function invocation
++is eliminated.  If a function is recursive, there can be many frames for
++the same function.  The frame for the function in which execution is
++actually occurring is called the @dfn{innermost} frame.  This is the most
++recently created of all the stack frames that still exist.
++
++@cindex frame number
++@value{DBG} assigns numbers to all existing stack frames, starting with
++zero for the innermost frame, one for the frame that called it,
++and so on upward.  These numbers do not really exist in your script;
++they are assigned by @value{DBG} to give you a way of designating stack
++frames in @value{DBG} commands.
++
++@node Backtrace
++@subsection Backtraces (@samp{where})
++
++@cindex backtraces
++@cindex tracebacks
++@cindex stack traces
++A backtrace is essentially the same as the call stack: a summary of
++how your script got where it is.  It shows one line per frame, for
++many frames, starting with the place that you sare stopped at (frame
++zero), followed by its caller (frame one), and on up the stack.
++
++@table @code
++@kindex backtrace
++@kindex bt @r{(@code{backtrace})}
++@item backtrace
++@itemx bt
++@itemx where
++@itemx T
++Print a backtrace of the entire stack: one line per frame for all
++frames in the stack.
++
++@item backtrace @var{n}
++@itemx bt @var{n}
++@itemx where @var{n}
++@itemx T @var{n}
++Similar, but print only the innermost @var{n} frames.
++
++@ifset FINISHED
++@item backtrace -@var{n}
++@itemx bt -@var{n}
++@itemx where -@var{n}
++@itemx T -@var{n}
++Similar, but print only the outermost @var{n} frames.
++@end ifset
++@end table
++
++@kindex where
++The names @code{where} and @code{T} are additional aliases for
++@code{backtrace}.
++
++Each line in the backtrace shows the frame number and the function
++name, the source file name and line number, as well as the function name.
++
++Here is an example of a backtrace taken a program in the
++regression-tests @file{parm.sh}.
++
++@smallexample
++@group
++% ../bashdb -n -L .. parm.sh
++Bourne-Again Shell Debugger, release @value{BASHRELEASE}
++Copyright 2002,2003 Rocky Bernstein
++This is free software, covered by the GNU General Public License, and you are
++welcome to change it and/or distribute copies of it under certain conditions.
++
++(./parm.sh:21):
++21:	fn1 5
++bashdb<0> @b{continue fn3}
++One-time breakpoint 1 set in file ./parm.sh, line 17.
++fn2: testing 1 2 3
++(./parm.sh:17):
++17:	fn3() @{
++bashdb<1> @b{where}
++->0 in file `./parm.sh' at line 14
++##1 fn3() called from file `./parm.sh' at line 14
++##2 fn2("testing 1", "2 3") called from file `parm.sh' at line 5
++##3 fn1("0") called from file `parm.sh' at line 9
++##4 fn1("1") called from file `parm.sh' at line 9
++##5 fn1("2") called from file `parm.sh' at line 9
++##6 fn1("3") called from file `parm.sh' at line 9
++##7 fn1("4") called from file `parm.sh' at line 9
++##8 fn1("5") called from file `parm.sh' at line 21
++##9 source("parm.sh") called from file `bashdb' at line 143
++##10 main("-n", "-L", "..", "parm.sh") called from file `bashdb' at line 0
++@end group
++@end smallexample
++
++@noindent
++The display for ``frame'' zero isn't a frame at all, although it has
++the same information minus a function name; it just indicates that
++your script has stopped at the code for line @code{14}
++of @code{./parm.sh}.
++
++@node Selection
++@subsection Selecting a frame (@samp{up}, @samp{down}, @samp{frame})
++
++Commands for listing source code in your script work on whichever
++stack frame is selected at the moment.  Here are the commands for
++selecting a stack frame; all of them finish by printing a brief
++description of the stack frame just selected.
++
++@table @code
++@kindex up
++@item up @var{n}
++Move @var{n} frames up the stack.  For positive numbers @var{n}, this
++advances toward the outermost frame, to higher frame numbers, to frames
++that have existed longer.  @var{n} defaults to one.
++
++@kindex down
++@kindex do @r{(@code{down})}
++@item down @var{n}
++Move @var{n} frames down the stack.  For positive numbers @var{n}, this
++advances toward the innermost frame, to lower frame numbers, to frames
++that were created more recently.  @var{n} defaults to one.  You may
++abbreviate @code{down} as @code{do}.
++@end table
++
++All of these commands end by printing two lines of output describing the
++frame.  The first line shows the frame number, the function name, the
++arguments, and the source file and line number of execution in that
++frame.  The second line shows the text of that source line.
++
++@need 100
++For example:
++
++@smallexample
++@group
++bashdb<8> @b{up}
++19:	sourced_fn
++bashdb<8> @b{T}
++##0 in file `./bashtest-sourced' at line 8
++->1 sourced_fn() called from file `bashtest-sourced' at line 19
++##2 source() called from file `bashdb-test1' at line 23
++##3 fn2() called from file `bashdb-test1' at line 33
++##4 fn1() called from file `bashdb-test1' at line 42
++##5 main() called from file `bashdb-test1' at line 0
++@end group
++@end smallexample
++
++After such a printout, the @code{list} command with no arguments
++prints ten lines centered on the point of execution in the frame.
++@xref{List, ,Printing source lines}.
++
++@table @code
++@kindex frame
++@cindex current stack frame
++@item frame @var{args}
++The @code{frame} command allows you to move from one stack frame to
++another, and to print the stack frame you select.  @var{args} is the
++the stack frame number.  Without an argument, @code{frame} prints the
++current stack frame.
++@end table
++
++@node List
++@section Examining Source Files (@samp{list})
++
++@value{DBG} can print parts of your script's source.  When your
++script stops, @value{DBG} spontaneously prints the line where it
++stopped.  Likewise, when you select a stack frame (@pxref{Selection,
++,Selecting a frame}), @value{DBG} prints the line where execution in
++that frame has stopped.  You can print other portions of source files
++by explicit command.
++
++If you use @value{DBG} through its @sc{gnu} Emacs interface, you may
++prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using
++@value{DBG} under @sc{gnu} Emacs}.
++
++@kindex list
++@kindex l @r{(@code{list})}
++To print lines from a source file, use the @code{list} command
++(abbreviated @code{l}).  By default, ten lines are printed.
++There are several ways to specify what part of the file you want to print.
++
++Here are the forms of the @code{list} command most commonly used:
++
++@table @code
++@item list @var{linenum}
++@itemx l @var{linenum}
++Print lines centered around line number @var{linenum} in the
++current source file.
++
++@item list @var{function}
++@itemx l @var{function}
++Print the text of @var{function}.
++
++@item list
++@itemx l
++Print more lines.  If the last lines printed were printed with a
++@code{list} command, this prints lines following the last lines
++printed; however, if the last line printed was a solitary line printed
++as part of displaying a stack frame (@pxref{Stack, ,Examining the
++Stack}), this prints lines centered around that line.
++
++@item list -
++@itemx l -
++Print lines just before the lines last printed.
++@end table
++
++By default, @value{DBG} prints ten source lines with any of these forms of
++the @code{list} command.
++You can change this using @code{set listsize}:
++
++@table @code
++@kindex set listsize
++@item set listsize @var{count}
++Make the @code{list} command display @var{count} source lines (unless
++the @code{list} argument explicitly specifies some other number).
++
++@kindex show listsize
++@item show listsize
++Display the number of lines that @code{list} prints.
++@end table
++
++Repeating a @code{list} command with @key{RET} discards the argument,
++so it is equivalent to typing just @code{list}.  This is more useful
++than listing the same lines again.  An exception is made for an
++argument of @samp{-}; that argument is preserved in repetition so that
++each repetition moves up in the source file.
++
++@cindex linespec
++In general, the @code{list} command expects you to supply a
++@dfn{linespecs}.  Linespecs specify source lines; there are several ways
++of writing them, but the effect is always to specify some source line.
++
++Here is a complete description of the possible arguments for @code{list}:
++
++@table @code
++@item list @var{linespec}
++Print lines centered around the line specified by @var{linespec}.
++
++@item list @var{first} @var{increment}
++Print @var{increment} lines starting from @var{first}
++
++@item list @var{first}
++Print lines starting with @var{first}.
++
++@item list -
++Print lines just before the lines last printed.
++
++@item list .
++Print lines after where the script is stopped.
++
++@item list
++As described in the preceding table.
++@end table
++
++Here are the ways of specifying a single source line---all the
++kinds of linespec.
++
++@table @code
++@item @var{number}
++Specifies line @var{number} of the current source file.
++When a @code{list} command has two linespecs, this refers to
++the same source file as the first linespec.
++
++@item @var{filename}:@var{number}
++Specifies line @var{number} in the source file @var{filename}.
++
++@item @var{function}
++Specifies the line that function @var{function} is listed on.
++
++@ifset FINISHED
++@item @var{filename}:@var{function}
++Specifies the line of function @var{function} in the file
++@var{filename}.  You only need the file name with a function name to
++avoid ambiguity when there are identically named functions in
++different source files.
++@end ifset
++@end table
++
++@node Search
++@section Searching source files (@samp{search}, @samp{reverse}, @samp{/.../}, @samp{?..?})
++@cindex searching
++@kindex reverse-search
++
++There are two commands for searching through the current source file for a
++BASH extended pattern-matching expression.
++
++@table @code
++@kindex search
++@kindex forward
++@item forward @var{bash-pattern}
++@itemx search @var{bash-pattern}
++The command @samp{forward @var{bash-pattern}} checks each line,
++starting with the one following the current line, for a match for
++@var{bash-pattern} which is an extended bash pattern-matching
++expression.  It lists the line that is found.  You can use the synonym
++@samp{search @var{bash-pattern}} or abbreviate the command name as
++@code{fo} or @code{/@var{pat}/}.
++
++@item reverse @var{bash-pattern}
++The command @samp{reverse @var{bash-pattern}} checks each line, starting
++with the one before the last line listed and going backward, for a match
++for @var{bash-pattern}.  It lists the line that is found.  You can abbreviate
++this command as @code{rev} or @code{?@var{bash-pattern}?}.
++@end table
++
++@node Data
++@section Examining Data (@samp{print}, @samp{examine}, @samp{info variables})
++
++@cindex printing data
++@cindex examining data
++@kindex print
++
++One way to examine string data in your script is with the @code{print}
++command (abbreviated @code{p}). However a more versatile print command
++is @code{x}; it can print variable and function definitions and can do
++arithmetic computations. Finally, the most general method would be
++via @code{eval echo}.
++
++@table @code
++@kindex print
++@kindex p @r{(@code{print})}
++@item print @var{expr}
++
++Use @code{print} to dispay strings as you would from @code{echo}. And
++as such, variable names to be substituted have to be preceded with a
++dollar sign. As with echo, filename expansion, e.g. tilde expansion,
++is performed on unquoted strings. So for example if you want to print
++a *, you would write @samp{print "*"}, not @samp{print *}. If you want
++to have the special characters dollars sign appear, use a backslash.
++
++@item print
++@itemx p
++If you omit @var{expr}, @value{DBG} displays the last expression again.
++
++@item x @ovar{expr}
++@kindex x
++
++This is a smarter, more versatile ``print'' command, and although sometimes
++it might not be what you want, and you may want to resort to either
++@code{print} or @code{eval echo...}.
++
++As with @code{print}, if you omit @var{expr}, @value{DBG} displays
++the last expression again.
++
++The @code{x} command first checks if @var{expr} is single variable. If
++it is, the definition and value are printed via @value{BASH}'s
++@code{declare -p} command. This will show the variable's attributes
++such as if it is read only or if it is an integer. If the variable is
++an array, that is show and the array values are printed.
++
++If instead @var{expr} is a function, the function definition is
++printed via @value{BASH}'s @code{declare -f} command. If @var{expr}
++was neither a variable nor an expression, then we try to get a value
++via @code{let}. And if this returns an error, as a last resort we call
++@code{print} and give what it outputs.
++
++Since @code{let} may be used internally and since (to my thinking)
++@code{let} does funny things, the results may seem odd unless you
++understand the sequence tried above and how @code{let} works. For
++example if the variable @code{foo} has value 5, then @samp{x foo} show
++the definition of foo with value 5, and @samp{x foo+5} prints 10 as
++expected. So far so good. However if @code{foo} is has value
++``string'', @samp{x foo+5} prints 5 because @code{let} has turned the
++string into 0; @samp{p foo+5} will simply print ``foo+5''; if you want
++the value of ``foo'' substituted inside a string, for example you
++expect ``the value of foo is $foo'' to come out ``the value of foo is
++5'', then the right command to use is @code{print} rather than
++@code{x}, making sure you add the dollar onto the beginning of the
++variable.
++
++@item V @ovar{!}@ovar{pattern}
++@kindex V
++
++If you want to @emph{all} list variables and there values or a set of
++variables by pattern, use this command.
++
++@smallexample
++@group
++bashdb<0> @b{V dq*}
++dq_args="dq_*"
++dq_cmd="V"
++@end group
++@end smallexample
++
++@end table
++
++@node Evaluation/Execution
++@section Running Arbitrary BASH and Shell commands (@samp{eval}, @samp{shell})
++
++The two most general commands and most ``low-level'' are @code{eval}
++and @code{shell}.
++
++@table @code
++@item eval
++@itemx e
++@kindex e
++
++In contrast to the commands of the last section the most general way
++to examine data is through @code{eval}. But you do much more with
++this; you can change the values of variables, since, you are just
++evaluating BASH code.
++
++If you expect output, you should arrange that in the command, such as
++via @code{echo} or @code{printf}. For example, to print the value of
++@var{foo}, you would type @samp{e echo $foo}. This is bit longer than
++@samp{p $foo} or (when possible) @samp{x foo}. However suppose you
++wanted to find out how the builtin test operator @samp{[} works with
++the @samp{-z} test condition. You could use @code{eval} to do this
++such as @samp{e [ -z "$foo"] && echo "yes"}.
++
++@kindex shell
++@kindex !! @r{(@code{shell})}
++@cindex shell escape
++@item shell @var{command string}
++@itemx !!
++
++If you need to execute occasional shell commands during your
++debugging session, there is no need to leave or suspend @value{DBG}; you can
++just use the @code{shell} command or its alias @code{!!}.
++
++Invoke a shell to execute @var{command string}.
++
++@end table
++
++@node Auto Display
++@section Automatic display (@samp{display}, @samp{undisplay})
++@cindex automatic display
++@cindex display of expressions
++
++If you find that you want to print the value of an expression
++frequently (to see how it changes), you might want to add it to the
++@dfn{automatic display list} so that @value{DBG} evaluates a
++statement each time your program stops.  Each expression added to the
++list is given a number to identify it; to remove an expression from
++the list, you specify that number.  The automatic display looks like
++this:
++
++@example
++2 (echo $x): 38
++@end example
++
++@noindent
++This display shows item numbers, expressions and their current values.
++
++@table @code
++@kindex display
++@item display @var{expr}
++Add the expression @var{expr} to the list of expressions to display
++each time your program stops.
++@end table
++
++@table @code
++@kindex delete display
++@kindex undisplay
++@item undisplay @var{dnums}@dots{}
++@itemx delete display @var{dnums}@dots{}
++Remove item numbers @var{dnums} from the list of expressions to display.
++
++@code{undisplay} does not repeat if you press @key{RET} after using it.
++(Otherwise you would just get the error @samp{No display number @dots{}}.)
++
++@kindex disable display
++@item disable display @var{dnums}@dots{}
++Disable the display of item numbers @var{dnums}.  A disabled display
++item is not printed automatically, but is not forgotten.  It may be
++enabled again later.
++
++@kindex enable display
++@item enable display @var{dnums}@dots{}
++Enable display of item numbers @var{dnums}.  It becomes effective once
++again in auto display of its expression, until you specify otherwise.
++
++@item display
++Display the current values of the expressions on the list, just as is
++done when your program stops.
++
++@kindex info display
++@item info display
++Print the list of expressions previously set up to display
++automatically, each one with its item number, but without showing the
++values.  This includes disabled expressions, which are marked as such.
++It also includes expressions which would not be displayed right now
++because they refer to automatic variables not currently available.
++@end table
++
++@node Controlling bashdb
++@section Controlling @DBG (@samp{set}, @samp{history})
++
++You can alter the way @BASH interacts with you by using the
++@code{set} command.
++
++@menu
++* Annotate::                    Annotation Level (set annotate)
++* Prompt::                      Prompt (set prompt, show prompt)
++* Editing::                     Command editing (set editing, show editing)
++* Command Display::             Command display (set showcommand)
++* History::                     Command history (history, !, H)
++@end menu
++
++@node Annotate
++@subsection Annotation Level (@samp{set annoatate})
++
++The annotation level controls how much information does @value{DBG}
++print together with its prompt, values of expressions, source lines,
++and other types of output.  Level 0 is the normal, level 1 is for use
++when @value{DBG} is run as a subprocess of @sc{gnu} Emacs of @value{DDD},
++level 2 is the maximum annotation suitable for programs that control
++@value{DBGN}.
++
++@node Prompt
++@subsection Prompt (@samp{set prompt}, @samp{show prompt})
++
++@cindex prompt
++
++@value{dBGP} indicates its readiness to read a command by printing a
++string called the @dfn{prompt}.  This string is normally:
++@example
++bashdb$@{_Dbg_less@}$@{#_Dbg_history[@@]@}$@{_Dbg_greater@}$_Dbg_space
++@end example
++
++When variables inside the the prompt string are evaluated, the above
++becomes something like @samp{bashdb<5>} if this is the fifth command
++executed or perhaps @samp{bashdb<<2>>} if you have called the debugger
++from inside a debugger session and this is the second command inside
++the debugger session or perhaps @samp{bashdb<(6)>} if you
++entered a subshell after the fifth command.
++
++You can change the prompt string with the @code{set prompt} command,
++although it is not normally advisable to do so without understanding
++the implications. If you are using the @value{DDD} GUI, it changes the
++changes the prompt and should not do so.  In certain other
++circumstances (such as writing a GUI like @value{DDD}), it may be is useful
++to change the prompt.
++
++@emph{Note:} @code{set prompt} does not add a space for you after the
++prompt you set.  This allows you to set a prompt which ends in a space
++or a prompt that does not. Furthermore due to a implementation
++limitation (resulting from a limitation of the bash built-in function
++``read''), to put a space at the end of the prompt use the
++@samp{$_Dbg_space} variable.
++
++@table @code
++@kindex set prompt
++@item set prompt @var{newprompt}
++Directs @value{DBG} to use @var{newprompt} as its prompt string
++henceforth.
++
++@emph{Warning: changing the prompt can @value{DDD}'s ability to
++understand when the debugger is waiting for input.}
++
++@kindex show prompt
++@item show prompt
++Prints a line of the form: @samp{bashdb's prompt is: @var{your-prompt}}
++@end table
++
++@node Editing
++@subsection Command editing (@samp{set editing}, @samp{show editing})
++@cindex readline
++@cindex command line editing
++
++@value{DBG} reads its input commands through bash which uses via the
++@dfn{readline} interface.  This @sc{gnu} library provides consistent
++behavior for programs which provide a command line interface to the
++user.  Advantages are @sc{gnu} Emacs-style or @dfn{vi}-style inline
++editing of commands, @code{csh}-like history substitution, and a
++storage and recall of command history across debugging sessions.
++
++You may control the behavior of command line editing in @BASH with the
++command @code{set}.
++
++@table @code
++@kindex set editing
++@cindex editing
++@item set editing
++@itemx set editing on
++Enable command line editing (enabled by default).
++
++@item set editing off
++Disable command line editing.
++
++@kindex show editing
++@item show editing
++Show whether command line editing is enabled.
++@end table
++
++
++@node Command Display
++@subsection Command Display (@samp{set showcommand})
++
++The debugger normally lists the line number and source line of the for
++the statement to be next executed. Often this line contains one
++expression or one statement and it is clear from this line what's
++going to happen. However @BASH allows many expressions or
++statements to be put on a single source line; some lines
++contain several units of execution. Some examples of this
++behavior are listed below:
++
++@smallexample
++x=1; y=2; x=3
++(( x > 5 )) && x=5
++y=`echo *`
++@end smallexample
++
++In the first line of the example above, we have three assignment
++statements on a single line. In the second line of the example above
++we have a statement which gets run only if a condition tests true. And
++in the third line of the example above, we have a command that gets
++run and then the output of that is substituted in an assignemnt
++statement.  If you were single stepping inside the debugger, each line
++might get listed more than once before each of the actions that might
++get performed. (In the case of the conditional statement, the
++line gets listed only once when the condition is false.)
++
++In order to assist understanding where you are, the enhanced version
++of @BASH maintains a dynamic variable @env{BASH_COMMAND} that
++contains piece of code next to be run (or is currently being run). The
++debugger has arranged to save this and can display this information
++or not. This is controlled by @code{set showcommand}.
++
++@table @code
++@kindex set showcommand
++@item set showcommand @r{[}auto | on | off @r{]}
++controls whether or not to show the saved @env{BASH_COMMAND} for the
++command next to be executed.
++@end table
++
++When the value is @code{auto} the following heuristic is used to
++determine whether or not to display the saved @env{BASH_COMMAND}. If
++the last time you stopped you were at the same place and the command
++string has changed, then show the command. When the value @code{on} is
++used, the debugger always shows @env{BASH_COMMAND} and when
++@code{off} is used, the debugger nevers shows
++@env{BASH_COMMAND}. Note that listing the text of the source line is
++independent of whether or not the command is also listed.
++
++Some examples:
++@smallexample
++set showcommand auto      @b{This is the default}
++set showcommand on        @b{Always show the next command to be executed}
++set showcommand off       @b{Never show the next command to be executed}
++@end smallexample
++
++@node History
++@subsection Command history (@samp{H}, @samp{history}, @samp{!})
++
++@value{dBGP} can keep track of the commands you type during your
++debugging sessions, so that you can be certain of precisely what
++happened.  If the prompt has not been changed (see @ref{Prompt,
++,Prompt}), the history number that will be in use next is by default
++listed in the debugger prompt. Invalid commands and history commands
++are not saved on the history stack.
++
++@table @code
++@kindex H @r{[}@var{start-number} @ovar{end-number}@r{]}
++@item H @r{[}@var{start-number} @ovar{end-number}@r{]}
++@item H @ovar{-count}
++@itemx !@r{[}-@r{]}@var{n}:p
++
++You can list what is in the history stack with @code{H}. Debugger
++commands in ths history stack are listed from most recent to least recent.
++If no @var{start-number} is given we start with the most recently
++executed command and end with the first entry in the history stack.
++If @var{start-number} is given, that history number is listed first. If
++@var{end-number} is given, that history number is listed last. If a
++single negative number is given list that many history commands.
++
++An alternate form is @code{!@emph{n}:p} or @code{!-@emph{n}:p} where
++@emph{n} is an integer. If a minus sign is used, @emph{n} is taken as
++the count to go back from the end rather than as a absolute history
++number. In contrast @code{H}, this form only prints a @emph{single}
++history item.
++
++Some examples:
++@smallexample
++H      @b{List entire history}
++H -2   @b{List the last two history items}
++!-2:p  @b{List a single history item starting at the same place as above}
++H 5    @b{List history from history number 5 to the begining (number 0)}
++H 5 0  @b{Same as above}
++H 5 3  @b{List history from history number 5 down to history number 3}
++!5:p   @b{List a single history item 5}
++@end smallexample
++
++@kindex history @r{[}-@r{]}@r{[}@var{n}@r{]}
++@kindex !@r{[}-@r{]}@var{n} @r{(@code{history})}
++@item history @r{[}@r{[}-@r{]}@var{n}@r{]}
++@itemx !@r{[}-@r{]}@var{n}
++
++Use this command to reexecute a given history number. If no number is
++given, the last debugger command in the history is executed.
++
++An alternate form is @code{!@emph{n}} or @code{!-@emph{n}} where
++@emph{n} is an integer.
++
++If a minus sign is used in in either form, @emph{n} is taken as the
++count to go back from the end rather than as a absolute history
++number.
++
++@end table
++
++@ifset FINISHED
++Use these commands to manage the @value{DBGN} command
++history facility.
++
++@table @code
++@cindex history substitution
++@cindex history file
++@kindex set history filename
++@kindex GDBHISTFILE
++@item set history filename @var{fname}
++Set the name of the @BASH command history file to @var{fname}.
++This is the file where @BASH reads an initial command history
++list, and where it writes the command history from this session when it
++exits.  You can access this list through history expansion or through
++the history command editing characters listed below.  This file defaults
++to the value of the environment variable @code{GDBHISTFILE}, or to
++@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable
++is not set.
++
++@cindex history save
++@kindex set history save
++@item set history save
++@itemx set history save on
++Record command history in a file, whose name may be specified with the
++@code{set history filename} command.  By default, this option is disabled.
++
++@item set history save off
++Stop recording command history in a file.
++
++@cindex history size
++@kindex set history size
++@item set history size @var{size}
++Set the number of commands which @BASH keeps in its history list.
++This defaults to the value of the environment variable
++@code{HISTSIZE}, or to 256 if this variable is not set.
++@end table
++
++@cindex history expansion
++History expansion assigns special meaning to the character @kbd{!}.
++
++Since @kbd{!} is also the logical not operator in C, history expansion
++is off by default. If you decide to enable history expansion with the
++@code{set history expansion on} command, you may sometimes need to
++follow @kbd{!} (when it is used as logical not, in an expression) with
++a space or a tab to prevent it from being expanded.  The readline
++history facilities do not attempt substitution on the strings
++@kbd{!=} and @kbd{!(}, even when history expansion is enabled.
++
++The commands to control history expansion are:
++
++@table @code
++@kindex set history expansion
++@item set history expansion on
++@itemx set history expansion
++Enable history expansion.  History expansion is off by default.
++
++@item set history expansion off
++Disable history expansion.
++
++The readline code comes with more complete documentation of
++editing and history expansion features.  Users unfamiliar with @sc{gnu} Emacs
++or @code{vi} may wish to read it.
++
++@c @group
++@kindex show history
++@item show history
++@itemx show history filename
++@itemx show history save
++@itemx show history size
++@itemx show history expansion
++These commands display the state of the @BASH history parameters.
++@code{show history} by itself displays all four states.
++@c @end group
++@end table
++
++@table @code
++@kindex shows
++@item show commands
++Display the last ten commands in the command history.
++
++@item show commands @var{n}
++Print ten commands centered on command number @var{n}.
++
++@item show commands +
++Print ten commands just after the commands last printed.
++@end table
++@end ifset
++
++@node Front Ends
++@chapter Using @value{DBG} from a front-end user interface
++
++There are two front-ends available that can use @value{DBG} as a back-end
++debugger are @sc{gnu} Emacs and @value{DDD}.
++
++@menu
++* Emacs::      Using @value{DBG} from @sc{gnu} Emacs
++* DDD::        Using @value{DBG} from @value{DDD}
++@end menu
++
++
++@node Emacs
++@section Using @value{DBG} from @sc{gnu} Emacs
++
++@cindex Emacs
++@cindex @sc{gnu} Emacs
++A special interface allows you to use @sc{gnu} Emacs to view (and
++edit) the source files for the program you are debugging with
++@value{DBG}.
++
++To use this interface, use the command @kbd{M-x bashdb} in Emacs.
++Give the executable file you want to debug as an argument.  This
++command starts @value{DBG} as a subprocess of Emacs, with input and
++output through a newly created Emacs buffer.
++
++Using @value{DBG} under Emacs is just like using @value{DBG}
++normally except for two things:
++
++@itemize @bullet
++@item
++All ``terminal'' input and output goes through the Emacs buffer.
++@end itemize
++
++This applies both to @value{DBG} commands and their output, and to the input
++and output done by the program you are debugging.
++
++This is useful because it means that you can copy the text of previous
++commands and input them again; you can even use parts of the output
++in this way.
++
++All the facilities of Emacs' Shell mode are available for interacting
++with your script.  In particular, you can send signals the usual
++way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a
++stop.
++
++@itemize @bullet
++@item
++@value{DBG} displays source code through Emacs.
++@end itemize
++
++Each time @value{DBG} displays a stack frame, Emacs automatically finds the
++source file for that frame and puts an arrow (@samp{=>}) at the
++left margin of the current line.  Emacs uses a separate buffer for
++source display, and splits the screen to show both your @value{DBG} session
++and the source.
++
++Explicit @value{DBG} @code{list} or search commands still produce output as
++usual, but you probably have no reason to use them from Emacs.
++
++@quotation
++@emph{Warning:} If the directory where your script resides is not your
++current directory, it can be easy to confuse Emacs about the location of
++the source files, in which case the auxiliary display buffer does not
++appear to show your source.  @value{DBG} can find programs by searching your
++environment's @code{PATH} variable, so the @value{DBG} input and output
++session proceeds normally; but Emacs does not get enough information
++back from @value{DBG} to locate the source files in this situation.  To
++avoid this problem, either start @value{DBG} mode from the directory where
++your script resides, or specify an absolute file name when prompted for the
++@kbd{M-x gdb} argument.
++
++A similar confusion can result if you use the @value{DBG} @code{file} command to
++switch to debugging a program in some other location, from an existing
++@value{DBG} buffer in Emacs.
++@end quotation
++
++By default, @kbd{M-x bashdb} calls the @code{bash --debugger}.  If you
++need to call @value{DBG} by a different name (for example, if you
++keep several configurations around, with different names) you can set
++the Emacs variable @code{gud-bashdb-command-name}; for example,
++
++@example
++(setq gud-bashdb-command-name "bash-debugger")
++@end example
++
++@noindent
++(preceded by @kbd{M-:} or @kbd{ESC :}, or typed in the @code{*scratch*} buffer, or
++in your @file{.emacs} file) makes Emacs call the program named
++``@code{bash-debugger}'' instead.
++
++In the @value{DBG} I/O buffer, you can use these special Emacs commands in
++addition to the standard Shell mode commands:
++
++@table @kbd
++@item C-h m
++Describe the features of Emacs' @value{DBG} Mode.
++
++@item M-s
++Execute to another source line, like the @value{DBG} @code{step} command; also
++update the display window to show the current file and location.
++
++@item M-n
++Execute to next source line in this function, skipping all function
++calls, like the @value{DBG} @code{next} command.  Then update the display window
++to show the current file and location.
++
++@item C-c C-f
++Execute until exit from the selected stack frame, like the @value{DBG}
++@code{finish} command.
++
++@item M-c
++Continue execution of your script, like the @value{DBG} @code{continue}
++command.
++
++@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-p}.
++
++@item M-u
++Go up the number of frames indicated by the numeric argument
++(@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}),
++like the @value{DBG} @code{up} command.
++
++@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-u}.
++
++@item M-d
++Go down the number of frames indicated by the numeric argument, like the
++@value{DBG} @code{down} command.
++
++@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-d}.
++
++@item C-x &
++Read the number where the cursor is positioned, and insert it at the end
++of the @value{DBG} I/O buffer.  For example, if you wish to disassemble code
++around an address that was displayed earlier, type @kbd{disassemble};
++then move the cursor to the address display, and pick up the
++argument for @code{disassemble} by typing @kbd{C-x &}.
++
++You can customize this further by defining elements of the list
++@code{gdb-print-command}; once it is defined, you can format or
++otherwise process numbers picked up by @kbd{C-x &} before they are
++inserted.  A numeric argument to @kbd{C-x &} indicates that you
++wish special formatting, and also acts as an index to pick an element of the
++list.  If the list element is a string, the number to be inserted is
++formatted using the Emacs function @code{format}; otherwise the number
++is passed as an argument to the corresponding list element.
++@end table
++
++In any source file, the Emacs command @kbd{C-x SPC} (@code{gud-break})
++tells @value{DBG} to set a breakpoint on the source line point is on.
++
++If you accidentally delete the source-display buffer, an easy way to get
++it back is to type the command @code{frame} in the @value{DBG} buffer, to
++request a frame display; when you run under Emacs, this recreates
++the source buffer if necessary to show you the context of the current
++frame.
++
++The source files displayed in Emacs are in ordinary Emacs buffers
++which are visiting the source files in the usual way.  You can edit
++the files with these buffers if you wish; but keep in mind that @value{DBG}
++communicates with Emacs in terms of line numbers.  If you add or
++delete lines from the text, the line numbers that @value{DBG} knows cease
++to correspond properly with the code.
++
++@node DDD
++@section Using @value{DBG} from @value{DDD}
++@cindex DDD
++
++@value{DBG} support is rather new in @value{DDD}. As a programming
++language, @value{DBG} is not feature rich: there are no record
++structures or hash tables (yet), no pointers, package variable scoping
++or methods. So much of the data display and visualization features of
++@value{DDD} are disabled.
++
++As with any scripting or interpreted language (e.g. Perl), one can't
++step by a single machine-language instruction. So the ddd Stepi/Nexti
++commands are disabled.
++
++Some @value{BASH} settings are essential for @value{DDD} to work
++correctly.  These settings with their correct values are:
++
++@example
++set annotate 1
++set prompt set prompt bashdb$_Dbg_less$_Dbg_greater$_Dbg_space
++@end example
++
++@value{DDD} sets these values automatically when invoking
++@value{BASH}; if these values are changed, there may be some
++malfunctions.
++
++Pay special attention when the prompt has extra angle brackets (a
++nested shell) or has any parenthesis (is in a subshell). Quitting may
++merely exit out of one of these nested (sub)shells rather than leave
++the program.
++
++@node BASH Debugger Bugs
++@chapter Reporting Bugs
++@cindex bugs
++@cindex reporting bugs
++
++Your bug reports play an essential role in making the BASH debugger reliable.
++
++Reporting a bug may help you by bringing a solution to your problem, or it
++may not.  But in any case the principal function of a bug report is to help
++the entire community by making the next version of @value{DBG} work better.  Bug
++reports are your contribution to the maintenance of @value{DBG}.
++
++In order for a bug report to serve its purpose, you must include the
++information that enables us to fix the bug.
++
++@menu
++* Bug Criteria::                Have you found a bug?
++* Bug Reporting::               How to report bugs
++@end menu
++
++@node Bug Criteria
++@section Have you found a bug?
++@cindex bug criteria
++
++If you are not sure whether you have found a bug, here are some guidelines:
++
++@itemize @bullet
++@cindex fatal signal
++@cindex debugger crash
++@cindex crash of debugger
++@item
++If the debugger gets a fatal signal, for any input whatever, that is a
++@value{DBG} bug.  Reliable debuggers never crash.
++
++@cindex error on valid input
++@item
++If @value{DBG} produces an error message for valid input, that is a
++bug.  (Note that if you're cross debugging, the problem may also be
++somewhere in the connection to the target.)
++
++@cindex invalid input
++@item
++If @value{DBG} does not produce an error message for invalid input,
++that is a bug.  However, you should note that your idea of
++``invalid input'' might be our idea of ``an extension'' or ``support
++for traditional practice''.
++
++@item
++If you are an experienced user of debugging tools, your suggestions
++for improvement of @value{DBG} are welcome in any case.
++@end itemize
++
++@node Bug Reporting
++@section How to report bugs
++@cindex bug reports
++@cindex BASH debugger bugs, reporting
++
++Submit bug reports for @value{DBG}.  Until better mechanism is set up
++the prefered method is to submit them directly using
++@email{mailto:rocky@@panix.com}. There are also a bug tracking system
++and, help, developer and open discussion forums which can be found via
++@uref{http://http://sourceforge.net/forum/?group_id=37260}.
++
++Although this code shares a lot with BASH, the debugger is of course
++not yet supported by the BASH team, so if there is a debugger problem
++reporting it via bashbug or to @email{bug-bash@@gnu.org} or posted to
++the newsgroup @code{gnu.bash.bug} probably won't help, unless you are
++sure the bug resides in the vanilla bash code and and show that.
++
++The fundamental principle of reporting bugs usefully is this:
++@strong{report all the facts}.  If you are not sure whether to state a
++fact or leave it out, state it!
++
++Often people omit facts because they think they know what causes the
++problem and assume that some details do not matter.  Thus, you might
++assume that the name of the variable you use in an example does not matter.
++Well, probably it does not, but one cannot be sure.  Perhaps the bug is a
++stray memory reference which happens to fetch from the location where that
++name is stored in memory; perhaps, if the name were different, the contents
++of that location would fool the debugger into doing the right thing despite
++the bug.  Play it safe and give a specific, complete example.  That is the
++easiest thing for you to do, and the most helpful.
++
++Keep in mind that the purpose of a bug report is to enable us to fix the
++bug.  It may be that the bug has been reported previously, but neither
++you nor we can know that unless your bug report is complete and
++self-contained.
++
++Sometimes people give a few sketchy facts and ask, ``Does this ring a
++bell?''  Those bug reports are useless, and we urge everyone to
++@emph{refuse to respond to them} except to chide the sender to report
++bugs properly.
++
++To enable us to fix the bug, you should include all these things:
++
++@itemize @bullet
++@item
++The version of @value{DBG}.  @value{DBG} announces it if you start
++with no arguments; you can also print it at any time using @code{version}
++command.
++
++Without this, we will not know whether there is any point in looking for
++the bug in the current version of @value{DBG}.
++
++@item
++The type of machine you are using, and the operating system name and
++version number.
++
++@item
++What compiler (and its version) was used to compile BASH---e.g.
++``@value{GCC}--3.1''.
++
++@item
++The command arguments you gave the compiler to compile your example and
++observe the bug.  For example, did you use @samp{-O}?  To guarantee
++you will not omit something important, list them all.  A copy of the
++Makefile (or the output from make) is sufficient.
++
++If we were to try to guess the arguments, we would probably guess wrong
++and then we might not encounter the bug.
++
++@item
++A complete input script, and all necessary source files, that will
++reproduce the bug.
++
++@item
++A description of what behavior you observe that you believe is
++incorrect.  For example, ``It gets a fatal signal.''
++
++Of course, if the bug is that @value{DBG} gets a fatal signal, then we
++will certainly notice it.  But if the bug is incorrect output, we might
++not notice unless it is glaringly wrong.  You might as well not give us
++a chance to make a mistake.
++
++Even if the problem you experience is a fatal signal, you should still
++say so explicitly.  Suppose something strange is going on, such as, your
++copy of @value{DBG} is out of synch, or you have encountered a bug in
++the C library on your system.  (This has happened!)  Your copy might
++crash and ours would not.  If you told us to expect a crash, then when
++ours fails to crash, we would know that the bug was not happening for
++us.  If you had not told us to expect a crash, then we would not be able
++to draw any conclusion from our observations.
++
++@item
++If you wish to suggest changes to the @value{DBG} source, send us context
++diffs.  If you even discuss something in the @value{DBG} source, refer to
++it by context, not by line number.
++
++The line numbers in our development sources will not match those in your
++sources.  Your line numbers would convey no useful information to us.
++
++@end itemize
++
++Here are some things that are not necessary:
++
++@itemize @bullet
++@item
++A description of the envelope of the bug.
++
++Often people who encounter a bug spend a lot of time investigating
++which changes to the input file will make the bug go away and which
++changes will not affect it.
++
++This is often time consuming and not very useful, because the way we
++will find the bug is by running a single example under the debugger
++with breakpoints, not by pure deduction from a series of examples.
++We recommend that you save your time for something else.
++
++Of course, if you can find a simpler example to report @emph{instead}
++of the original one, that is a convenience for us.  Errors in the
++output will be easier to spot, running under the debugger will take
++less time, and so on.
++
++However, simplification is not vital; if you do not want to do this,
++report the bug anyway and send us the entire test case you used.
++
++@item
++A patch for the bug.
++
++A patch for the bug does help us if it is a good one.  But do not omit
++the necessary information, such as the test case, on the assumption that
++a patch is all we need.  We might see problems with your patch and decide
++to fix the problem another way, or we might not understand it at all.
++
++Sometimes with a program as complicated as @value{DBG} it is very hard to
++construct an example that will make the program follow a certain path
++through the code.  If you do not send us the example, we will not be able
++to construct one, so we will not be able to verify that the bug is fixed.
++
++And if we cannot understand what bug you are trying to fix, or why your
++patch should be an improvement, we will not install it.  A test case will
++help us to understand.
++
++@item
++A guess about what the bug is or what it depends on.
++
++Such guesses are usually wrong.  Even we cannot guess right about such
++things without first using the debugger to find the facts.
++@end itemize
++
++@node History and Acknowledgments
++@chapter History and Acknowledgments
++
++The suggestion for a debugger for a Bourne-like shell came from the book
++``Learning the Korn Shell'', by Bill Rosenblatt Copyright (C) 1993 by
++O'Reilly and Associates, Inc. Others such as Cigy Cyriac, Chet Ramey,
++Rocky Bernstein, and Gary V. Vaughan expanded and improved on that.
++
++However Bourne-Shell debuggers rely on a signal mechanism
++(@code{SIGDEBUG}) to call a debugger routine. In the Korn shell as
++well as @sc{bash} in versions prior to 2.05, there was a fundamental
++flaw: the routine that you registered in the trap, got called
++@emph{after} the statement was executed. It takes little imagination
++to realize that this is a bit too late to find and correct errors,
++especially if the offending command happens to do serious damage like
++remove filesystems or reboot a server. As a horrible hack, these
++debuggers added one to the line number that was just executed on the
++wishful thinking that this would then be the line of next statement to
++execute. Sometimes this was correct, but it was too often wrong, such
++as in loops and conditionals, comments, or commands that are continued
++on the next line.
++
++Another failing of these debuggers was the inability to debug into
++functions or into sourced files, provide a stack trace, dynamically
++skip a statement to be run, unconditionally trace into a function, or
++stop when a subroutine or a sourced file completed. In truth, the crux
++of the problem lay in debugging support in BASH. Given that there was
++limited bash debugging support, it is not surprising that these
++debuggers could not do any of the things listed above and could debug
++only a single source file: lines could be listed only from a single
++text, breakpoints were set into the text which was in fact a copy of
++the script name prepended with debugger routines.
++
++In version 2.04 of BASH, Rocky Bernstein started hacking on BASH to
++add call-stack information, source file information, allow for
++debugging into functions and for reporting line numbers in functions
++as relative to the file rather than the beginning of a function whose
++origin line number was not accessible from BASH. He started changing
++the user commands in bashdb to be like other more-advanced debuggers,
++in particular @code{perl5db} and @code{gdb}. However he gave up on
++this project when realizing that stopping before a line was crucial. A
++patch for this was nontrivial and wildly changed
++semantics. Furthermore the chance of getting his other patches into
++BASH was was not going to happen in version 2.04.
++
++In version 2.05, the fundamental necessary change to the semantics of
++@code{SIGDEBUG} trap handling (suggested at least two years earlier)
++was made. Also, version 2.05 changed the line-number reporting in a
++function to be relative to the beginning of the file rather than the
++beginning of a function---sometimes. Rocky then picked up where he
++left off and this then became this debugger. A complete rewrite of the
++debugger, some of which started in 2.04 was undertaken. Debugger
++internals were changed to support multiple file names, save and
++restore the calling environment (such as variables @code{$1} and
++@code{$?}) and install debugger signal handlers. Work was also done on
++the BASH in conjunction with the debugger to save stack trace
++information, provide a means for stopping after a routine finished and
++so on. And a number of changes were made to BASH just to improve the
++accuracy of the line number reporting which is crucial in a debugger.
++
++This documentation was modified from the GNU Debugger (GDB) Reference
++manual.
++
++@quotation
++Additions to this section are particularly welcome.  If you or your
++friends (or enemies, to be evenhanded) have been unfairly omitted from
++this list, we would like to add your names!
++@end quotation
++
++The following have contributed directly or indrectly to bashdb:
++
++Rocky Bernstein (initial full-featured bashdb with stack tracing and
++multi-file support)
++
++Masatake YAMATO (help to merge Rocky's hack to the official bash source tree)
++
++Bill Rosenblatt (kshdb),
++Michael Loukides (kshdb),
++Cigy Cyriac (proto bashdb),
++Chet Ramey (proto bashdb),
++and
++Gary V. Vaughan (proto bashdb).
++
++Authors of per5ldb:
++
++Ray Lischner,
++Johan Vromans,
++and
++Ilya Zakharevich.
++
++Authors of GDB:
++
++Richard Stallman,
++Andrew Cagney,
++Jim Blandy,
++Jason Molenda,
++Stan Shebs,
++Fred Fish,
++Stu Grossman,
++John Gilmore,
++Jim Kingdon,
++and
++Randy Smith (to name just a few).
++
++Authors of GUD:
++
++Eric S. Raymond.
++
++@c The readline documentation is distributed with the readline code
++@c and consists of the two following files:
++@c     rluser.texinfo
++@c     inc-hist.texinfo
++@c Use -I with makeinfo to point to the appropriate directory,
++@c environment var TEXINPUTS with TeX.
++@c @include rluser.texinfo
++@c @include hsuser.texinfo
++
++
++@node Formatting Documentation
++@appendix Formatting Documentation
++
++@ifset FINISHED
++@cindex @value{DBG} reference card
++@cindex reference card
++The @value{DBG} 4 release includes an already-formatted reference card, ready
++for printing with PostScript or Ghostscript, in the @file{gdb}
++subdirectory of the main source directory@footnote{In
++@file{gdb-@value{BASHRELEASE}/gdb/refcard.ps} of the version @value{BASHRELEASE}
++release.}.  If you can use PostScript or Ghostscript with your printer,
++you can print the reference card immediately with @file{refcard.ps}.
++
++The release also includes the source for the reference card.  You
++can format it, using @TeX{}, by typing:
++
++@example
++make refcard.dvi
++@end example
++
++The @value{DBG} reference card is designed to print in @dfn{landscape}
++mode on US ``letter'' size paper;
++that is, on a sheet 11 inches wide by 8.5 inches
++high.  You will need to specify this form of printing as an option to
++your @sc{dvi} output program.
++
++@cindex documentation
++
++All the documentation for @value{DBG} comes as part of the machine-readable
++distribution.  The documentation is written in Texinfo format, which is
++a documentation system that uses a single source file to produce both
++on-line information and a printed manual.  You can use one of the Info
++formatting commands to create the on-line version of the documentation
++and @TeX{} (or @code{texi2roff}) to typeset the printed version.
++
++@value{DBG} includes an already formatted copy of the on-line Info
++version of this manual in the @file{gdb} subdirectory.  The main Info
++file is @file{gdb-@value{BASHRELEASE}/gdb/gdb.info}, and it refers to
++subordinate files matching @samp{gdb.info*} in the same directory.  If
++necessary, you can print out these files, or read them with any editor;
++but they are easier to read using the @code{info} subsystem in @sc{gnu}
++Emacs or the standalone @code{info} program, available as part of the
++@sc{gnu} Texinfo distribution.
++
++If you want to format these Info files yourself, you need one of the
++Info formatting programs, such as @code{texinfo-format-buffer} or
++@code{makeinfo}.
++
++If you have @code{makeinfo} installed, and are in the top level
++@value{DBG} source directory (@file{gdb-@value{BASHRELEASE}}, in the case of
++version @value{BASHRELEASE}), you can make the Info file by typing:
++
++@example
++cd gdb
++make gdb.info
++@end example
++
++If you want to typeset and print copies of this manual, you need @TeX{},
++a program to print its @sc{dvi} output files, and @file{texinfo.tex}, the
++Texinfo definitions file.
++
++@TeX{} is a typesetting program; it does not print files directly, but
++produces output files called @sc{dvi} files.  To print a typeset
++document, you need a program to print @sc{dvi} files.  If your system
++has @TeX{} installed, chances are it has such a program.  The precise
++command to use depends on your system; @kbd{lpr -d} is common; another
++(for PostScript devices) is @kbd{dvips}.  The @sc{dvi} print command may
++require a file name without any extension or a @samp{.dvi} extension.
++
++@TeX{} also requires a macro definitions file called
++@file{texinfo.tex}.  This file tells @TeX{} how to typeset a document
++written in Texinfo format.  On its own, @TeX{} cannot either read or
++typeset a Texinfo file.  @file{texinfo.tex} is distributed with GDB
++and is located in the @file{gdb-@var{version-number}/texinfo}
++directory.
++
++If you have @TeX{} and a @sc{dvi} printer program installed, you can
++typeset and print this manual.  First switch to the the @file{gdb}
++subdirectory of the main source directory (for example, to
++@file{gdb-@value{BASHRELEASE}/gdb}) and type:
++
++@example
++make gdb.dvi
++@end example
++
++Then give @file{gdb.dvi} to your @sc{dvi} printing program.
++@end ifset
++
++@node Installing bashdb
++@appendix Installing @value{DBG}
++@cindex configuring @value{DBG}
++@cindex installation
++
++@ifset FINISHED
++@value{DBG} comes with a @code{configure} script that automates the process
++of preparing @value{DBG} for installation; you can then use @code{make} to
++build the @code{gdb} program.
++@iftex
++@c irrelevant in info file; it's as current as the code it lives with.
++@footnote{If you have a more recent version of @value{DBG} than @value{BASHRELEASE},
++look at the @file{README} file in the sources; we may have improved the
++installation procedures since publishing this manual.}
++@end iftex
++
++The @value{DBG} distribution includes all the source code you need for
++@value{DBG} in a single directory, whose name is usually composed by
++appending the version number to @samp{gdb}.
++
++For example, the @value{DBG} version @value{BASHRELEASE} distribution is in the
++@file{gdb-@value{BASHRELEASE}} directory.  That directory contains:
++
++@table @code
++@item gdb-@value{BASHRELEASE}/configure @r{(and supporting files)}
++script for configuring @value{DBG} and all its supporting libraries
++
++@item gdb-@value{BASHRELEASE}/gdb
++the source specific to @value{DBG} itself
++
++@item gdb-@value{BASHRELEASE}/bfd
++source for the Binary File Descriptor library
++
++@item gdb-@value{BASHRELEASE}/include
++@sc{gnu} include files
++
++@item gdb-@value{BASHRELEASE}/libiberty
++source for the @samp{-liberty} free software library
++
++@item gdb-@value{BASHRELEASE}/opcodes
++source for the library of opcode tables and disassemblers
++
++@item gdb-@value{BASHRELEASE}/readline
++source for the @sc{gnu} command-line interface
++
++@item gdb-@value{BASHRELEASE}/glob
++source for the @sc{gnu} filename pattern-matching subroutine
++
++@item gdb-@value{BASHRELEASE}/mmalloc
++source for the @sc{gnu} memory-mapped malloc package
++@end table
++
++The simplest way to configure and build @value{DBG} is to run @code{configure}
++from the @file{gdb-@var{version-number}} source directory, which in
++this example is the @file{gdb-@value{BASHRELEASE}} directory.
++
++First switch to the @file{gdb-@var{version-number}} source directory
++if you are not already in it; then run @code{configure}.  Pass the
++identifier for the platform on which @value{DBG} will run as an
++argument.
++
++For example:
++
++@example
++cd gdb-@value{BASHRELEASE}
++./configure @var{host}
++make
++@end example
++
++@noindent
++where @var{host} is an identifier such as @samp{sun4} or
++@samp{decstation}, that identifies the platform where @value{DBG} will run.
++(You can often leave off @var{host}; @code{configure} tries to guess the
++correct value by examining your system.)
++
++Running @samp{configure @var{host}} and then running @code{make} builds the
++@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
++libraries, then @code{gdb} itself.  The configured source files, and the
++binaries, are left in the corresponding source directories.
++
++@need 750
++@code{configure} is a Bourne-shell (@code{/bin/sh}) script; if your
++system does not recognize this automatically when you run a different
++shell, you may need to run @code{sh} on it explicitly:
++
++@example
++sh configure @var{host}
++@end example
++
++If you run @code{configure} from a directory that contains source
++directories for multiple libraries or programs, such as the
++@file{gdb-@value{BASHRELEASE}} source directory for version @value{BASHRELEASE}, @code{configure}
++creates configuration files for every directory level underneath (unless
++you tell it not to, with the @samp{--norecursion} option).
++
++You can run the @code{configure} script from any of the
++subordinate directories in the @value{DBG} distribution if you only want to
++configure that subdirectory, but be sure to specify a path to it.
++
++For example, with version @value{BASHRELEASE}, type the following to configure only
++the @code{bfd} subdirectory:
++
++@example
++@group
++cd gdb-@value{BASHRELEASE}/bfd
++../configure @var{host}
++@end group
++@end example
++
++You can install @code{@value{DBG}} anywhere; it has no hardwired paths.
++However, you should make sure that the shell on your path (named by
++the @samp{SHELL} environment variable) is publicly readable.  Remember
++that @value{DBG} uses the shell to start your script---some systems refuse to
++let @value{DBG} debug child processes whose programs are not readable.
++
++@menu
++* Separate Objdir::             Compiling @value{DBG} in another directory
++* Config Names::                Specifying names for hosts and targets
++* Configure Options::           Summary of options for configure
++@end menu
++
++@node Separate Objdir
++@section Compiling @value{DBG} in another directory
++
++If you want to run @value{DBG} versions for several host or target machines,
++you need a different @code{gdb} compiled for each combination of
++host and target.  @code{configure} is designed to make this easy by
++allowing you to generate each configuration in a separate subdirectory,
++rather than in the source directory.  If your @code{make} program
++handles the @samp{VPATH} feature (@sc{gnu} @code{make} does), running
++@code{make} in each of these directories builds the @code{gdb}
++program specified there.
++
++To build @code{gdb} in a separate directory, run @code{configure}
++with the @samp{--srcdir} option to specify where to find the source.
++(You also need to specify a path to find @code{configure}
++itself from your working directory.  If the path to @code{configure}
++would be the same as the argument to @samp{--srcdir}, you can leave out
++the @samp{--srcdir} option; it is assumed.)
++
++For example, with version @value{BASHRELEASE}, you can build @value{DBG} in a
++separate directory for a Sun 4 like this:
++
++@example
++@group
++cd gdb-@value{BASHRELEASE}
++mkdir ../gdb-sun4
++cd ../gdb-sun4
++../gdb-@value{BASHRELEASE}/configure sun4
++make
++@end group
++@end example
++
++When @code{configure} builds a configuration using a remote source
++directory, it creates a tree for the binaries with the same structure
++(and using the same names) as the tree under the source directory.  In
++the example, you'd find the Sun 4 library @file{libiberty.a} in the
++directory @file{gdb-sun4/libiberty}, and @value{DBG} itself in
++@file{gdb-sun4/gdb}.
++
++One popular reason to build several @value{DBG} configurations in separate
++directories is to configure @value{DBG} for cross-compiling (where
++@value{DBG} runs on one machine---the @dfn{host}---while debugging
++programs that run on another machine---the @dfn{target}).
++You specify a cross-debugging target by
++giving the @samp{--target=@var{target}} option to @code{configure}.
++
++When you run @code{make} to build a program or library, you must run
++it in a configured directory---whatever directory you were in when you
++called @code{configure} (or one of its subdirectories).
++
++The @code{Makefile} that @code{configure} generates in each source
++directory also runs recursively.  If you type @code{make} in a source
++directory such as @file{gdb-@value{BASHRELEASE}} (or in a separate configured
++directory configured with @samp{--srcdir=@var{dirname}/gdb-@value{BASHRELEASE}}), you
++will build all the required libraries, and then build GDB.
++
++When you have multiple hosts or targets configured in separate
++directories, you can run @code{make} on them in parallel (for example,
++if they are NFS-mounted on each of the hosts); they will not interfere
++with each other.
++
++@node Config Names
++@section Specifying names for hosts and targets
++
++The specifications used for hosts and targets in the @code{configure}
++script are based on a three-part naming scheme, but some short predefined
++aliases are also supported.  The full naming scheme encodes three pieces
++of information in the following pattern:
++
++@example
++@var{architecture}-@var{vendor}-@var{os}
++@end example
++
++For example, you can use the alias @code{sun4} as a @var{host} argument,
++or as the value for @var{target} in a @code{--target=@var{target}}
++option.  The equivalent full name is @samp{sparc-sun-sunos4}.
++
++The @code{configure} script accompanying @value{DBG} does not provide
++any query facility to list all supported host and target names or
++aliases.  @code{configure} calls the Bourne shell script
++@code{config.sub} to map abbreviations to full names; you can read the
++script, if you wish, or you can use it to test your guesses on
++abbreviations---for example:
++
++@smallexample
++% sh config.sub i386-linux
++i386-pc-linux-gnu
++% sh config.sub alpha-linux
++alpha-unknown-linux-gnu
++% sh config.sub hp9k700
++hppa1.1-hp-hpux
++% sh config.sub sun4
++sparc-sun-sunos4.1.1
++% sh config.sub sun3
++m68k-sun-sunos4.1.1
++% sh config.sub i986v
++Invalid configuration `i986v': machine `i986v' not recognized
++@end smallexample
++
++@noindent
++@code{config.sub} is also distributed in the @value{DBG} source
++directory (@file{gdb-@value{BASHRELEASE}}, for version @value{BASHRELEASE}).
++
++@node Configure Options
++@section @code{configure} options
++
++Here is a summary of the @code{configure} options and arguments that
++are most often useful for building @value{DBG}.  @code{configure} also has
++several other options not listed here.  @inforef{What Configure
++Does,,configure.info}, for a full explanation of @code{configure}.
++
++@example
++configure @r{[}--help@r{]}
++          @r{[}--prefix=@var{dir}@r{]}
++          @r{[}--exec-prefix=@var{dir}@r{]}
++          @r{[}--srcdir=@var{dirname}@r{]}
++          @r{[}--norecursion@r{]} @r{[}--rm@r{]}
++          @r{[}--target=@var{target}@r{]}
++          @var{host}
++@end example
++
++@noindent
++You may introduce options with a single @samp{-} rather than
++@samp{--} if you prefer; but you may abbreviate option names if you use
++@samp{--}.
++
++@table @code
++@item --help
++Display a quick summary of how to invoke @code{configure}.
++
++@item --prefix=@var{dir}
++Configure the source to install programs and files under directory
++@file{@var{dir}}.
++
++@item --exec-prefix=@var{dir}
++Configure the source to install programs under directory
++@file{@var{dir}}.
++
++@c avoid splitting the warning from the explanation:
++@need 2000
++@item --srcdir=@var{dirname}
++@strong{Warning: using this option requires @sc{gnu} @code{make}, or another
++@code{make} that implements the @code{VPATH} feature.}@*
++Use this option to make configurations in directories separate from the
++@value{DBG} source directories.  Among other things, you can use this to
++build (or maintain) several configurations simultaneously, in separate
++directories.  @code{configure} writes configuration specific files in
++the current directory, but arranges for them to use the source in the
++directory @var{dirname}.  @code{configure} creates directories under
++the working directory in parallel to the source directories below
++@var{dirname}.
++
++@item --norecursion
++Configure only the directory level where @code{configure} is executed; do not
++propagate configuration to subdirectories.
++
++@item --target=@var{target}
++Configure @value{DBG} for cross-debugging programs running on the specified
++@var{target}.  Without this option, @value{DBG} is configured to debug
++programs that run on the same machine (@var{host}) as @value{DBG} itself.
++
++There is no convenient way to generate a list of all available targets.
++
++@item @var{host} @dots{}
++Configure @value{DBG} to run on the specified @var{host}.
++
++There is no convenient way to generate a list of all available hosts.
++@end table
++
++There are many other options available as well, but they are generally
++needed for special purposes only.
++@end ifset
++
++@include gpl.texi
++
++@include fdl.texi
++
++@node Function Index
++@unnumbered Function Index
++@printindex fn
++
++@node Command Index
++@unnumbered Command Index
++@printindex ky
++
++@node Variable Index
++@unnumbered Variable Index
++@printindex vr
++
++@node General Index
++@unnumbered General Index
++@printindex cp
++
++@tex
++% I think something like @colophon should be in texinfo.  In the
++% meantime:
++\long\def\colophon{\hbox to0pt{}\vfill
++\centerline{The body of this manual is set in}
++\centerline{\fontname\tenrm,}
++\centerline{with headings in {\bf\fontname\tenbf}}
++\centerline{and examples in {\tt\fontname\tentt}.}
++\centerline{{\it\fontname\tenit\/},}
++\centerline{{\bf\fontname\tenbf}, and}
++\centerline{{\sl\fontname\tensl\/}}
++\centerline{are used for emphasis.}\vfill}
++\page\colophon
++% Blame: doc@cygnus.com, 1991.
++@end tex
++
++@bye
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/Makefile.am cvs/debugger/doc/Makefile.am
+--- bash-2.05b/debugger/doc/Makefile.am	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/doc/Makefile.am	2003-09-08 08:40:26.000000000 +0200
+@@ -0,0 +1,62 @@
++##############################################################################
++# $Id: Makefile.am,v 1.5 2003/09/02 00:26:24 rockyb Exp $
++#  Copyright (C) 2003 Rocky Bernstein
++#  This program is free software; you can redistribute it and/or modify
++#  it under the terms of the GNU General Public License as published by
++#  the Free Software Foundation; either version 2 of the License, or
++#  (at your option) any later version.
++#
++#  This program is distributed in the hope that it will be useful,
++#  but WITHOUT ANY WARRANTY; without even the implied warranty of
++#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++#  GNU General Public License for more details.
++#
++#  You should have received a copy of the GNU General Public License
++#  along with this program; if not, write to the Free Software
++#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++##############################################################################
++
++EXT=1
++man1_MANS = bashdb.$(EXT)
++
++EXTRA_DIST = $(man1_MANS) bashdb-man.pod bashdb-man.html
++
++info_TEXINFOS = bashdb.texi 
++bashdb_TEXINFOS = fdl.texi gpl.texi
++
++all: $(INFO_DEPS) $(man1_MANS) html 
++
++pdf: bashdb.pdf 
++
++txt: bashdb.txt 
++
++ps: bashdb.ps 
++
++man: $(man1_MANS)
++
++html: bashdb.html bashdb-man.html
++
++bashdb.html: bashdb.texi
++	texi2html $(srcdir)/bashdb.texi
++
++bashdb-man.html: bashdb-man.pod
++	pod2html --infile=$(srcdir)/bashdb-man.pod --outfile=$@
++
++$(man1_MANS): bashdb-man.pod
++	pod2man --section=$(EXT) $(srcdir)/bashdb-man.pod >$@
++
++%.ps.gz: %.ps
++	gzip -9c $< > $@
++
++.texi.pdf:
++	texi2pdf $<
++
++.texi.html:
++	texi2html $<
++
++.texi.txt:
++	makeinfo --no-headers $< > $@
++
++all-formats: pdf dvi txt ps html
++
++MOSTLYCLEANFILES = bashdb.tgs bashdb.ps.gz bashdb.pdf bashdb.html bashdb_toc.html bashdb_foot.html $(man1_MANS) bashdb-man.html
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/bashdb-man.pod cvs/debugger/doc/bashdb-man.pod
+--- bash-2.05b/debugger/doc/bashdb-man.pod	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/doc/bashdb-man.pod	2003-08-12 15:56:11.000000000 +0200
+@@ -0,0 +1,192 @@
++=pod
++
++=head1 NAME
++
++bashdb - bash debugger script
++
++=head1 SYNOPSIS
++
++B<bashdb> [I<options>] I<script-name>
++
++B<bashdb> [I<options>] -c I<execution-string>
++
++B<bash --debugger> [I<bash-options>...] I<script-name>
++
++=head1 DESCRIPTION
++
++C<bashdb> is a bash script to which arranges for another bash script
++to be debugged. The debugger has a similar command interface as L<gdb>
++or Perl's L<perl5db> debugger. The way this script arranges debugging
++to occur is by including (or actually "source"-ing) some debug-support
++code and then sourcing the given script or command string.
++
++One problem with sourcing a debugged script is that the program name
++stored in $0 will be C<bashdb> rather than the name of the script to
++be debugged. The debugged script will appear in a call stack not as
++the top item but as the item below C<bashdb>. If this is of concern,
++use the last form given above, C<bash ---debugger> I<script-name>.  
++
++A downside of invoking bash with the C<--debugger> option is any of
++the options below that are not bash options don't work, and those that
++I<are> bash options have the bash meaning rather than the bash
++debugger meaning. For example, C<-n> in bash means don't run a bash
++script but just syntax check it which is different from what is listed
++below.
++
++=head1 OPTIONS
++
++=over 4
++
++=item -h
++
++Print a usage message on standard error and exit with a return code
++of 100.
++
++Z<>
++
++=item -B
++
++In places where a filename appears in debugger output give just the
++basename only. This is needed in for regression testing. Using this
++option is equivalent to issuing:
++
++  set basename on 
++
++inside the debugger.
++
++Z<>
++
++=item -n
++
++Normally the debugger will read debugger commands in C<~/.bashdbinit>
++if that file exists before accepting user interaction.
++C<.bashdbinit> is analogus to Perl's C<.perldb> or GNU gdb's
++C<.gdbinit>: a user might want to create such a debugger profile to
++add various user-specific customizations.
++
++Using the C<-n> option this initialization file will not be read. This
++is useful in regression testing or in tracking down a problem with
++one's C<.bashdbinit> profile. 
++
++Z<>
++
++=item -c I<command-string>
++
++Instead of specifying the name of a bash script file, one can give an
++execution string that is to be debugged. Use this option to do that.
++
++If you invoke the debugger via C<bash --debugger>, the filename that will
++appear in source listing or in a call stack trace will be the artifical name
++*BOGUS*.
++
++Z<>
++
++=item -q
++
++Do not print introductory version and copyright information. This is
++again useful in regression testing where we don't want to include a
++changeable copyright date in the regression-test matching.
++
++Z<>
++
++=item -x I<debugger-cmdfile>
++
++Run the debugger commands I<debugger-cmdfile> before accepting user
++input.  These commands are read however after any C<.bashdbinit>
++commands. Again this is useful running regression-testing debug
++scripts.
++
++Z<>
++
++=item -L I<debugger-library>
++
++The debugger needs to source or include a number of functions and
++these reside in a library. If this option is not given the default location
++of library is relative to the installed bashdb script: C<../lib/bashdb>.
++
++Z<>
++
++=item -T I<temporary-file-directory>
++
++The debugger needs to make use of some temporary filesystem storage to
++save persistent information across a subshell return or in order to
++evaluate an expression. The default directory is C</tmp> but you can
++use this option to set the directory where debugger temporary files
++will be created.
++
++Z<>
++
++=item -t I<tty-name>
++
++Debugger output usually goes to a terminal rather than stdout or stdin
++which the debugged program may use. Determination of the tty or
++pseudo-tty is normally done automatically. However if you want to
++control where the debugger output goes, use this option.
++
++Z<>
++
++=item -V
++
++Show version number and no-warranty and exit with return code 1.
++
++=back
++
++=head1 BUGS
++
++The C<bashdb> script and C<--debugger> option assume a patched version
++of bash. That is you can't debug bash scripts using the standard-issue
++version 2.05 bash or earlier versions. If you try to run the bashdb
++script on such as shell, may get the message:
++
++  Sorry, you need to use a debugger-enabled version of bash.
++
++This is not a bug in the debugger so much as a bug in bash itself or
++the lack of debugging support thereof.
++
++Debugging can be slow especially on large bash scripts. Scripts
++created by GNU autoconf are at a minimum hundreds of lines and it is
++not uncommon for them to be tens of thousands of lines.
++
++Part of the reason of the debugger slowness is that the debugger has
++to intercept every line and check to see if some action is to be taken
++for this and this is all in bash code. A better and faster
++architecture would be for the debugger to register a list of
++conditions or stopping places inside the bash code itself and have it
++arrange to call the debugger only when a condition requiring the
++debugger arises. Checks would be faster as this would be done in C
++code and access to internal structures would make this moe
++efficient. Did I mention the lack of debug support in bash (and other
++POSIX shells)?
++
++Another place you may find slowness is in initial startup of such
++large debugger scripts. The source code has to be read into internal
++arrays and this apparently takes time.
++
++=head1 SEE ALSO
++
++L<bash>. There also an extensive debugger reference manual. 
++
++=head1 AUTHOR
++
++The current version is maintained (or not) by C<rocky@panix.com>.
++
++=head1 COPYRIGHT
++
++  Copyright (C) 2003 Rocky Bernstein, email: rocky@panix.com.
++  This program is free software; you can redistribute it and/or modify
++  it under the terms of the GNU General Public License as published by
++  the Free Software Foundation; either version 2 of the License, or
++  (at your option) any later version.
++
++  This program is distributed in the hope that it will be useful,
++  but WITHOUT ANY WARRANTY; without even the implied warranty of
++  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++  GNU General Public License for more details.
++
++  You should have received a copy of the GNU General Public License
++  along with this program; if not, write to the Free Software
++  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++I<$Id: bashdb-man.pod,v 1.2 2003/08/12 13:56:11 rockyb Exp $>
++
++=cut
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/bashdb.texi cvs/debugger/doc/bashdb.texi
+--- bash-2.05b/debugger/doc/bashdb.texi	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/doc/bashdb.texi	2003-09-08 08:40:27.000000000 +0200
+@@ -0,0 +1,3759 @@
++\input texinfo      @c -*-texinfo-*-
++@c Copyright 2002, 2003
++@c Rocky Bernstein for the Free Software Foundation
++@c
++@c TODO: 
++@c   - add examples for commands
++@c   - clean up/improve sample session
++@c   - help text is inaccurate and formatted too much to right.
++@c 
++
++@c Sets version and release names and dates. Frees us from changing
++@c this file when a new release comes along.
++
++@c %**start of header
++@c makeinfo ignores cmds prev to setfilename, so its arg cannot make use
++@c of @set vars.  However, you can override filename with makeinfo -o.
++@setfilename bashdb.info
++@c 
++@c Name of Bash program.  Used in running text.
++@set BASH @acronym{BASH}
++
++@c
++@c Name of debugger program.  Used also for prompt string.
++@set DBG the @value{BASH} debugger
++@set dBGP The @value{BASH} debugger
++@set DDD @acronym{DDD}
++
++@settitle @value{BASH} Debugger
++@setchapternewpage odd
++@setcontentsaftertitlepage
++
++@c %**end of header
++
++@include version.texi
++
++@c A simple macro for optional variables.
++@macro ovar{varname}
++@r{[}@var{\varname\}@r{]}
++@end macro
++
++@macro DDD {}
++@acronym{DDD}
++@end macro
++
++@macro BASH {}
++@acronym{@value{BASH}}
++@end macro
++
++@macro DBG {}
++@value{DBG}
++@end macro
++
++@iftex
++@c @smallbook
++@c @cropmarks
++@end iftex
++
++@finalout
++
++@c readline appendices use @vindex, @findex and @ftable,
++@c annotate.texi and gdbmi use @findex.
++@c @syncodeindex vr cp
++@c @syncodeindex fn cp
++
++@c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER.
++
++@c This is a dir.info fragment to support semi-automated addition of
++@c manuals to an info tree.
++@dircategory Programming & development tools.
++@direntry
++* @value{DBG}: (@value{DBG}).                     The @sc{bash} debugger.
++@end direntry
++
++@ifinfo
++This file documents the @sc{bash} debugger @value{BASH}.
++
++
++This is the @value{EDITION} Edition, @value{UPDATED-MONTH},
++of @cite{Debugging with BASHDB: the @sc{gnu} Source-Level Debugger}
++for REBASH
++
++Copyright (C) 2002,2003 Rocky Bernstein for the Free Software Foundation.
++
++Permission is granted to copy, distribute and/or modify this document
++under the terms of the GNU Free Documentation License, Version 1.1 or
++@ifset DEBIANHASBECOMEREASONABLE
++@c From Matthias Klose <doko@debian.org> a Debian maintainer on
++@c Sat, 23 Aug 2003 14:24:44 +0200
++@c
++@c  I personally see the invariant sections as the thing in the
++@c  GFDL, which hinders me in uploading the package to the archives.
++@c  I don't have any problem, if some other Debian developer makes a
++@c  bashdb package built from separate sources.
++@c
++@c  I am aware that Debian ships other packages containing documentation
++@c  covered by the GFDL (and one of them for which I do the packaging as
++@c  well), but I won't add a new package, which I maintain. So before an
++@c  upload of a bashdb package built from the bash sources either
++@c
++@c
++@c  - Debian has a position on the GFDL, which allows inclusion
++@c
++@c  - the bashdb manual does not have invariant sections, or is
++@c    relicensed, or dual licensed.
++@c
++any later version published by the Free Software Foundation; with the
++Invariant Sections being ``Free Software'' and ``Free Software Needs
++Free Documentation'', with the Front-Cover Texts being ``A GNU
++Manual,'' and with the Back-Cover Texts as in (a) below.
++
++(a) The Free Software Foundation's Back-Cover Text is: ``You have
++freedom to copy and modify this GNU Manual, like GNU software.  Copies
++published by the Free Software Foundation raise funds for GNU
++development.''
++@end ifset
++@ifclear DEBIANHASBECOMEREASONABLE
++any later version published by the Free Software Foundation; with no
++Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
++@end ifclear
++@end ifinfo
++
++@titlepage
++@title Debugging with BASHDB
++@sp 1
++@subtitle @value{EDITION} Edition, for BASH
++@subtitle @value{UPDATED-MONTH}
++@author Rocky Bernstein
++@page
++@tex
++{\parskip=0pt
++\hfill (Send bugs and comments on bashdb to bug-bashdb\@sourceforge.net.)\par
++\hfill {\it Debugging with BASH}\par
++\hfill \TeX{}info \texinfoversion\par
++}
++@end tex
++
++@vskip 0pt plus 1filll
++Copyright @copyright{} 2002,2003 Rocky Bernstein for the Free Software
++Foundation.
++
++Permission is granted to copy, distribute and/or modify this document
++under the terms of the GNU Free Documentation License, Version 1.1 or
++@ifset DEBIANHASBECOMEREASONABLE
++@c From Matthias Klose <doko@debian.org> a Debian maintainer on
++@c Sat, 23 Aug 2003 14:24:44 +0200
++@c
++@c  I personally see the invariant sections as the thing in the
++@c  GFDL, which hinders me in uploading the package to the archives.
++@c  I don't have any problem, if some other Debian developer makes a
++@c  bashdb package built from separate sources.
++@c
++@c  I am aware that Debian ships other packages containing documentation
++@c  covered by the GFDL (and one of them for which I do the packaging as
++@c  well), but I won't add a new package, which I maintain. So before an
++@c  upload of a bashdb package built from the bash sources either
++@c
++@c
++@c  - Debian has a position on the GFDL, which allows inclusion
++@c
++@c  - the bashdb manual does not have invariant sections, or is
++@c    relicensed, or dual licensed.
++@c
++@c
++any later version published by the Free Software Foundation; with the
++Invariant Sections being ``Free Software'' and ``Free Software Needs
++Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
++and with the Back-Cover Texts as in (a) below.
++
++(a) The Free Software Foundation's Back-Cover Text is: ``You have
++freedom to copy and modify this GNU Manual, like GNU software.  Copies
++published by the Free Software Foundation raise funds for GNU
++development.''
++@end ifset
++@ifclear DEBIANHASBECOMEREASONABLE
++any later version published by the Free Software Foundation; with no
++Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
++@end ifclear
++@end titlepage
++@page
++
++@ifnottex
++@node Top, Summary, (dir), (dir)
++
++@top Debugging with @DBG
++
++This file describes @value{DBG}, the @sc{bash} symbolic debugger.
++
++This is the @value{EDITION} Edition, @value{UPDATED-MONTH}, for REBASH.
++
++Copyright (C) 2002,2003 Rocky Bernstein
++
++@menu
++* Summary::                     Overview of Debugger with a sample session
++
++* Invocation::                  Getting in and out
++* Running::                     Script setup inside the BASH debugger
++* Debugger Command Reference::  BASH debugger command reference
++
++* Front Ends::                  Using @DBG from a front-end user interface
++
++* BASH Debugger Bugs::          Reporting bugs
++* History and Acknowledgments:: History and Acknowledgments
++
++Appendices
++* Formatting Documentation::    How to format and print @DBG documentation
++
++* Installing bashdb::           Installing bashdb
++* Copying::			GNU General Public License says
++                                how you can copy and share bashdb
++* GNU Free Documentation License::  The license for this documentation
++
++Indexes (nodes containing large menus)
++* Function Index::            An item for each function name.
++* Command Index::             An item for each command name.
++* Variable Index::            An item for each documented variable.
++* General Index::             An item for each concept.
++@end menu
++
++@end ifnottex
++
++@contents
++
++@node Summary
++@chapter Summary of the BASH Debugger
++
++The purpose of a debugger such as @DBG is to allow you to see what is
++going on ``inside'' a bash script while it executes.
++
++@DBG can do four main kinds of things (plus other things in support of
++these) to help you catch bugs in the act:
++
++@itemize @bullet
++@item
++Start your script, specifying anything that might affect its behavior.
++
++@item
++Make your script stop on specified conditions.
++
++@item
++Examine what has happened, when your script has stopped.
++
++@item
++Change things in your script, so you can experiment with correcting the
++effects of one bug and go on to learn about another.
++@end itemize
++
++Although you can use the BASH debugger to debug scripts written in
++BASH, it can also be used just as a front-end for learning more
++about programming in BASH. As an additional aid, the debugger can
++be used within the context of an existing script with its functions
++and variables that have already been initialized; fragments of the
++existing can be experimented with by entering them inside the debugger.
++
++@menu
++* Sample Session::              A Sample BASH Debugger session
++* Free Software::               Freely redistributable software
++@end menu
++
++@node Sample Session
++@section A Sample BASH Debugger Session
++
++You can use this manual at your leisure to read all about @value{DBG}.
++However, a handful of commands are enough to get started using the
++debugger.  This chapter illustrates those commands.
++
++@iftex
++In this sample session, we emphasize user input like this: @b{input},
++to make it easier to pick out from the surrounding output.
++@end iftex
++
++Below we will debug a script that contains a function to compute the
++factorial of a number: fact(0) is 1 and fact(n) is n*fact(n-1).
++
++@smallexample
++$ @b{bashdb -L .  fact.sh}
++Bourne-Again Shell Debugger, release bash-@value{BASHRELEASE}
++Copyright 2002,2003 Rocky Bernstein
++This is free software, covered by the GNU General Public License, and you are
++welcome to change it and/or distribute copies of it under certain conditions.
++
++(fact.sh:9):
++9:	echo fact 0 is: `fact 0`
++bashdb<0> @b{-}
++  1:    #!/usr/local/bin/bash
++  2:    fact() @{
++  3:    ((n==0)) && echo 1 && return
++  4:    ((nm1=n-1))
++  5:    ((result=n*`fact $nm1`))
++  6:    return $result
++  7:    @}
++  8:    
++  9:==> echo fact 0 is: `fact 0`
++bashdb<1> @b{l}
++ 10:   echo fact 3 is: $(fact 3)
++@end smallexample 
++
++@noindent
++
++The command invocation uses the option ``-L .'' Here we assume that
++the @command{bashdb} script and the debugger files are in the same
++location. If you are running from the source code, this will be the
++case. However if bashdb has been installed this probably won't be true
++and here you probably don't need to use ``-L .'' Instead you would
++type simply @code{bashdb fact.sh}.
++
++The first debugger command we gave @kbd{-}, we listed a window of
++lines @emph{before} where we were executing. Because the window, 10
++lines, is larger than the number of lines to the top of the file we
++printed only 9 lines here. The next command list starting from the
++current line and again wants to print 10 lines but because there are
++only one remaining line, that is what is printed.
++
++@smallexample
++bashdb<2> @b{step}
++(fact.sh:9):
++9:	echo fact 0 is: `fact 0`
++bashdb<3> @b{@key{RET}}
++2:	fact() @{
++bashdb<4> @b{@key{RET}}
++3:	((n==0)) && echo 1 && return
++bashdb<5> @b{print $n}
++
++@end smallexample
++
++Ooops... The variable @kbd{n} isn't initialized. 
++
++The first @kbd{step} command steps the script one instruction. It may
++seem odd that the line printed is exactly the same one as before. What
++has happened though is that we've ``stepped'' into the subshell needed
++to run @kbd{`fact 0`}; we haven't however started running anything
++inside that subshell yet though---the function call.
++
++The first @kbd{step} command steps the script one instruction; it
++didn't advance the line number at all. That is because we were
++stopping before the command substitution or backtick is to take
++place. The second command we entered was just hitting the return key;
++bashdb remembers that you entered @code{step} previously, so it runs
++the step rather than @kbd{next}, the other alternative when you hit
++@key{RET}. Step one more instruction and we are just before running
++the first statement of the function.
++
++Next, we print the value of the variable @kbd{n}. Notice we need to add
++a preceding dollar simple to get the substitution or value of n. As we
++will see later, if the @kbd{pe} command were used this would not be
++necessary. 
++
++We now modify the file to add an assignment to local variable @kbd{n} and
++restart.
++
++@smallexample
++bashdb<6> @b{restart}
++Restarting with: /usr/local/bin/bashdb -L . fact.sh
++(fact.sh:10):
++10:	echo fact 0 is: `fact 0`
++bashdb<0> @b{list 1}
++  1:    #!/usr/local/bin/bash
++  2:    fact() @{
++  3:    local -i n=$@{1:0@}
++  4:    ((n==0)) && echo 1 && return
++  5:    ((nm1=n-1))
++  6:    ((result=n*`fact $nm1`))
++  7:    return $result
++  8:    @}
++  9:    
++ 10:==> echo fact 0 is: `fact 0`
++bashdb<1> @b{s 3}
++(fact.sh:3):
++3:	local -i n=$@{1:0@}
++bashdb<2> @b{step}
++(fact.sh:4):
++4:	((n==0)) && echo 1 && return
++bashdb<3> @b{print $n}
++print $n
++0
++@end smallexample 
++
++@noindent
++This time we use the @code{list} debugger command to list the lines in
++the file. From before we know it takes three @code{steps} commands
++before we get into the fact() function, so we add a count onto the
++@code{step} command. Notice we abbreviate @code{step} with @code{s};
++we could have done likewise and abbreviated @code{list} with @code{l}.
++
++@smallexample
++bashdb<4> @b{@key{RET}}
++(fact.sh:4):
++4:	((n==0)) && echo 1 && return
++echo 1
++bashdb<5> @b{@key{RET}}
++(fact.sh:4): 
++4:	((n==0)) && echo 1 && return
++return
++@end smallexample 
++
++@noindent
++Again we just use @key{RET} to repeat the last @code{step}
++commands. And again the fact that we are staying on the same line 4
++means that the next condition in the line is about to be
++executed. Notice that we see the command (@code{echo 1} or
++@code{return}) listed when we stay on the same line which has multiple
++stopping points in it. Given the information above, we know that the
++value echo'ed on return will be 1.
++
++@smallexample
++bashdb<6> @b{@key{RET}}
++fact 0 is: 1
++(fact.sh:12): 
++12:	echo fact 3 is: $(fact 3)
++bashdb<7> @b{break 5}
++Breakpoint 1 set in file fact.sh, line 5.
++bashdb<8> @b{continue}
++@end smallexample 
++
++@noindent
++We saw that we could step with a count into the function
++fact(). However above took another approach: we set a stopping point or
++``breakpoint'' at line 5 to get us a little ways into the fact()
++subroutine. Just before line 5 is to executed, we will get back into
++the debugger. The @code{continue} command just resumes execution until
++the next stopping point which has been set up in some way.
++
++@smallexample
++(fact.sh:5):
++5:      ((nm1=n-1))
++Breakpoint 1 hit(1 times).
++bashdb<8> @b{x n-1}
++2
++bashdb<9> @b{s}
++(fact.sh:5):
++6:     ((result=n*`fact $nm1`))
++bashdb<10> @b{c}
++fact.sh: line 6: ((: result=n*: syntax error: operand expected (error token is "*")
++bashdb<7> @b{R}
++Restarting with: bash --debugger fact.sh 
++11:	echo fact 0 is: `fact 0`
++bashdb<0> @b{l fact}
++ 2:    fact () 
++ 3:    @{ 
++ 4:       local -i n=$@{1:0@};
++ 5:       (( "n==0" )) && echo 1 && return;
++ 6:       (( nm1=n-1 ));
++ 7:       ((fact_nm1=`fact $nm1`))
++ 8:       (( "result=n*fact_nm1" ));
++ 9:       echo $result
++10:    @}
++@end smallexample
++
++@noindent
++In addition to listing by line numbers, we can also list giving a
++function name. Below, instead of setting a breakpoint at line 5 and
++running ``continue'' as we did above, we try something slightly shorter
++and slightly different. We give the line number on the ``continue''
++statement. This is a little different in that a one-time break is made
++on line 5. Once that statement is reached the breakpoint is removed. 
++
++@smallexample
++bashdb<1> @b{continue 5}
++One-time breakpoint 1 set in file fact.sh, line 5.
++fact 0 is: 1
++(fact.sh:5):
++5:	((nm1=n-1))
++bashdb<2> @b{s}
++6:	((fact_nm1=`fact $nm1`))
++bashdb<2> @b{s}
++2:	fact() @{
++bashdb<3> @b{T}
++->0 in file `fact.sh' at line 2
++##1 fact("3") called from file `fact.sh' at line 12
++##2 source("fact.sh") called from file `/usr/local/bin/bashdb' at line 154
++##3 main("fact.sh") called from file `/usr/local/bin/bashdb' at line 0
++bashdb<4> @b{c}
++fact 3 is: 6
++Debugged program terminated normally. Use q to quit or R to restart.
++@end smallexample
++
++@noindent
++When we stop at line 5 above, we have already run fact(0) and output
++the correct results. The output from the program ``fact 0 is: 1'' is
++intermixed with the debugger output. The @code{T} command above
++requests call stack output and this confirms that we are not in the
++fact(0) call but in the fact(3) call. There are 4 lines listed in the
++stack trace even though there is just one call from the main
++program. The top line of the trace doesn't really represent a call,
++it's just where we currently are in the program. That last line is an
++artifact of invoking bash from the bashdb script rather than running
++@code{bash --debugger}.
++
++The last message in the output above @samp{Debugged program exited
++normally.} is from @value{DBG}; it indicates script has finished
++executing.  We can end our @value{DDGP} session with the @value{GDBP}
++@code{quit} command.
++
++Above we did our debugging session on the command line. If you are a
++GNU Emacs user, you can do your debugging inside that. Also there is
++a(nother) GUI interface called DDD that supports @value{DBG}.
++
++@node Free Software
++@unnumberedsec Free software
++
++@DBG is @dfn{free software}, protected by the @sc{gnu}
++General Public License
++(GPL).  The GPL gives you the freedom to copy or adapt a licensed
++program---but every person getting a copy also gets with it the
++freedom to modify that copy (which means that they must get access to
++the source code), and the freedom to distribute further copies.
++Typical software companies use copyrights to limit your freedoms; the
++Free Software Foundation uses the GPL to preserve these freedoms.
++
++Fundamentally, the General Public License is a license which says that
++you have these freedoms and that you cannot take these freedoms away
++from anyone else.
++
++@unnumberedsec Free Software Needs Free Documentation
++
++The biggest deficiency in the free software community today is not in
++the software---it is the lack of good free documentation that we can
++include with the free software.  Many of our most important
++programs do not come with free reference manuals and free introductory
++texts.  Documentation is an essential part of any software package;
++when an important free software package does not come with a free
++manual and a free tutorial, that is a major gap.  We have many such
++gaps today.
++
++Consider Perl, for instance.  The tutorial manuals that people
++normally use are non-free.  How did this come about?  Because the
++authors of those manuals published them with restrictive terms---no
++copying, no modification, source files not available---which exclude
++them from the free software world.
++
++That wasn't the first time this sort of thing happened, and it was far
++from the last.  Many times we have heard a GNU user eagerly describe a
++manual that he is writing, his intended contribution to the community,
++only to learn that he had ruined everything by signing a publication
++contract to make it non-free.
++
++Free documentation, like free software, is a matter of freedom, not
++price.  The problem with the non-free manual is not that publishers
++charge a price for printed copies---that in itself is fine.  (The Free
++Software Foundation sells printed copies of manuals, too.)  The
++problem is the restrictions on the use of the manual.  Free manuals
++are available in source code form, and give you permission to copy and
++modify.  Non-free manuals do not allow this.
++
++The criteria of freedom for a free manual are roughly the same as for
++free software.  Redistribution (including the normal kinds of
++commercial redistribution) must be permitted, so that the manual can
++accompany every copy of the program, both on-line and on paper.
++
++Permission for modification of the technical content is crucial too.
++When people modify the software, adding or changing features, if they
++are conscientious they will change the manual too---so they can
++provide accurate and clear documentation for the modified program.  A
++manual that leaves you no choice but to write a new manual to document
++a changed version of the program is not really available to our
++community.
++
++Some kinds of limits on the way modification is handled are
++acceptable.  For example, requirements to preserve the original
++author's copyright notice, the distribution terms, or the list of
++authors, are ok.  It is also no problem to require modified versions
++to include notice that they were modified.  Even entire sections that
++may not be deleted or changed are acceptable, as long as they deal
++with nontechnical topics (like this one).  These kinds of restrictions
++are acceptable because they don't obstruct the community's normal use
++of the manual.
++
++However, it must be possible to modify all the @emph{technical}
++content of the manual, and then distribute the result in all the usual
++media, through all the usual channels.  Otherwise, the restrictions
++obstruct the use of the manual, it is not free, and we need another
++manual to replace it.
++
++Please spread the word about this issue.  Our community continues to
++lose manuals to proprietary publishing.  If we spread the word that
++free software needs free reference manuals and free tutorials, perhaps
++the next person who wants to contribute by writing documentation will
++realize, before it is too late, that only free manuals contribute to
++the free software community.
++
++If you are writing documentation, please insist on publishing it under
++the GNU Free Documentation License or another free documentation
++license.  Remember that this decision requires your approval---you
++don't have to let the publisher decide.  Some commercial publishers
++will use a free license if you insist, but they will not propose the
++option; it is up to you to raise the issue and say firmly that this is
++what you want.  If the publisher you are dealing with refuses, please
++try other publishers.  If you're not sure whether a proposed license
++is free, write to @email{licensing@@gnu.org}.
++
++You can encourage commercial publishers to sell more free, copylefted
++manuals and tutorials by buying them, and particularly by buying
++copies from the publishers that paid for their writing or for major
++improvements.  Meanwhile, try to avoid buying non-free documentation
++at all.  Check the distribution terms of a manual before you buy it,
++and insist that whoever seeks your business must respect your freedom.
++Check the history of the book, and try to reward the publishers that
++have paid or pay the authors to work on it.
++
++The Free Software Foundation maintains a list of free documentation
++published by other publishers, at
++@url{http://www.fsf.org/doc/other-free-books.html}.
++
++@node Invocation
++@chapter Getting in and out
++
++This chapter discusses how to start @value{DBG}, and how to get out of it.
++The essentials are:
++@itemize @bullet
++@item
++type @samp{bash --debugger @emph{script-name}} or @samp{bashdb
++@emph{script-name}} to start @value{DBG}.
++@item
++type @kbd{quit} or @kbd{C-d} inside the debugger to exit.
++@end itemize
++
++But also note there are two front-ends available as well. One can also
++enter the debugger inside emacs via the command @code{M-x bashdb}
++after loading Emacs' Grand Unified Debugger, @code{gud}. See
++@ref{Emacs,,Using the BASH debugger from @sc{gnu} Emacs}. And there is
++support in a @value{DDD} for bash.
++
++@menu
++* Starting the BASH debugger::    How to enter the BASH debugger
++* Quitting the BASH debugger::    How to leave the BASH debugger
++@end menu
++
++@node Starting the BASH debugger
++@section Starting the BASH debugger
++
++@emph{Note: it is important to use a debugger-enabled bash. You wil
++get an error message if the debugger is run under a version of BASH
++that does not have debugging support.}
++
++As mentioned above, one can enter @DBG via Emacs or
++DDD. However you don't have to use either of these. And these still
++need a way on their own to get things started.
++
++There are in fact two @emph{other} ways to start @value{DBG}.  The
++first way is to pass the @samp{--debugger} option to bash with the
++name of your script the scripts arguments following that, or with a
++command string (@code{-c}).
++
++@example
++bash --debugger @var{script} @var{script-arguments...}
++bash --debugger -c @var{command-string}...
++@end example
++
++This calls a debugger initialization script. It works much like a
++@BASH login profile which may set variables and define
++functions. But this shell profile is customized for debugging and as
++such arranges for itself to get called before each statement is
++executed. Although there are some problems at present in I/O
++redirection that the method described next doesn't have, it is
++expected that over time more features will be enabled in bash when the
++@samp{--debugger} option is in effect. By default, both debugging in
++Emacs via GUD (@ref{Emacs,,Using the BASH debugger under Emacs}) and
++debugging via @value{DDD} work via this method.
++
++The form @samp{bash --debugger -c ...} can be used to get into the
++debugger without having to give a script name to debug. Sometimes you
++may want to do this just to see how the debugger works: try some
++debugger commands or maybe get online help. If you run @code{ddd
++--bash} without giving a script name, it in fact uses this form.
++
++In order for the @samp{--debugger} option to work however, you must
++have the debugger scripts installed in a place where @DBG can
++find them. For this reason, in developing @value{DBG}, I use a second
++method more often; it doesn't require the bash debugger to be
++installed. This method uses another script called @code{bashdb} which
++after taking its own options takes the name of the script to debugged
++and the arguments to pass to that script.  Using this method, one
++would start the debugger like this:
++
++@example
++bash @var{path-to-bashdb}/bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
++@end example
++
++As with the first method, @code{bash} should be a debugger-enabled
++bash. If @code{bashdb} has the path to bash in it at the top (e.g. via
++@code{#!}), and @code{bashdb} can be found in your program-search
++path, then this might be equivalent to the above:
++
++@example
++bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
++@end example
++
++There are two or three disadvantages however of running a debugger
++this way. First @code{$0} will have the value @code{bashdb} rather
++than the script you are trying to run. For some scripts this may
++change the behavior of the debugged script. Second a traceback will
++contain additional lines showing the ``source''-ing of the debugged
++script from @code{bashdb}. And third, although this way works better
++than the first method, over time this way may come into disuse. 
++
++An option that you'll probably need to use if bashdb isn't installed
++but run out of the source code directory is @samp{-L} which specifies
++the directory that contains the debugger script files.
++
++You can further control how bashdb starts up by using command-line
++options. bashdb itself can remind you of the options available.
++
++@noindent
++Type
++
++@example
++bashdb -h
++@end example
++
++@noindent
++to display all available options and briefly describe their use.
++
++When the bash debugger is invoked either by the @code{bashdb}
++front-end script or @code{bash --debugging}, the first argument that
++does not have an associated option flag for @code{bashdb} or
++@code{bash} (as the case may be) is used as the name a the script file
++to be debugged, and any following options get passed the debugged
++script.
++
++Options for the @code{bashdb} front-end are shown in the
++following list.  
++
++@menu
++* Options for the bashdb script::   Options you can pass in starting bashdb
++@end menu
++
++@node Options for the bashdb script
++@subsection Command-line options for @code{bashdb} script
++
++You can run @DBG in various alternative modes---for example, in
++batch mode or quiet mode.
++
++@table @code
++@item -h 
++@cindex @code{-h}
++This option causes @value{DBG} to print some basic help and exit.
++
++@item -V
++@cindex @code{-V}
++This option causes @DBG to print its version number and
++no-warranty blurb, and exit.
++
++@item -n
++@cindex @code{-n}
++Do not execute commands found in any initialization files.  Normally,
++@BASH executes the commands in these files after all the command
++options and arguments have been processed.  @xref{Command Files,,Command
++files}.
++
++@item -q
++@cindex @code{-q}
++``Quiet''.  Do not print the introductory and copyright messages.  These
++messages are also suppressed in batch mode.
++
++@item -t
++@cindex @code{-t}
++``Terminal output''.  Set the file or terminal that you want debugger command
++output to go to. Note that the debugger output is independent of the
++debugged script output.
++
++@item -L @var{directory}
++@cindex @code{-L}
++Set directory where debugger files reside to @var{directory}. The
++default location is @code{../lib/bashdb} relative to the place that
++the bashdb script is located. For example if bashdb is located in
++@code{/usr/local/bin/bashdb}, the default library location will be
++@code{/usr/local/lib/bashdb} which may or may not exist. If it doesn't
++you'll get an error when you run bashdb. Only if the default location
++is incorrect, should you need to use the @code{-L} option.
++
++@item -T @var{directory}
++@cindex @code{-T}
++Set directory to use for writing temporary files.
++
++@end table
++
++@node Quitting the BASH debugger
++@section Quitting the BASH debugger
++
++@cindex interrupt
++An interrupt (often @kbd{C-c}) does not exit from @value{DBG}, but
++rather terminates the action of any @DBG command that is in
++progress and returns to @value{DBG} command level.  Inside a debugger
++command interpreter, use @code{quit} command (@pxref{Quit, ,Quitting
++the BASH debugger}).
++
++@node Running
++@chapter Script Setup inside the BASH Debugger
++
++@menu
++* Starting::                    Starting your script
++* Command Files::               Command files
++* Arguments::                   Your script's arguments
++* Input/Output::                Your script's input and output
++* Script/Debugger Interaction::   Keeping out of each other's harm
++@end menu
++
++@need 2000
++@node Starting
++@section Starting your script
++@cindex starting
++@cindex running
++
++@table @code
++@kindex restart
++@kindex run @r{(@code{restart})}
++@kindex R @r{(@code{restart})}
++@item restart @ovar{options to debugged script}
++@itemx run
++@itemx R
++Use the @code{restart} command to restart your script under
++@value{DBG}. Without any arguments, the script name and parameters
++from the last invocation are used. @value{dBGP} tries to maintain the
++settings, watchpoints, breakpoints, actions and so on. Internally it
++uses line numbers and filenames to record he position of interesting
++places in your porgram; so if your program changes some or all of
++these numbers may be off. Environment variable
++@code{BASHDB_RESTART_FILE} is and a temporary file are used to signal
++a restart, so you shouldn't uset @code{BASHDB_RESTART_FILE} (or any
++environment variable starting with @code{BASHDB_}.
++
++@end table
++
++@node Command Files
++@section Command files
++
++@cindex command files
++A command file for @DBG is a file of lines that are @DBG
++commands.  Comments (lines starting with @kbd{#}) may also be included.
++An empty line in a command file does nothing; it does not mean to repeat
++the last command, as it would from the terminal.
++
++@cindex init file
++@cindex @file{.bashdbinit}
++@cindex @file{bashdb.ini}
++When you start @value{DBG}, it automatically executes commands from its
++@dfn{init files}, normally called @file{.bashdbinit}@footnote{The DJGPP
++port of @DBG uses the name @file{bashdb.ini} instead, due to the
++limitations of file names imposed by DOS filesystems.}.
++During startup, @DBG does the following:
++
++@enumerate
++@item
++Reads the init file (if any) in your home directory@footnote{On
++DOS/Windows systems, the home directory is the one pointed to by the
++@code{HOME} environment variable.}.
++
++@item
++Processes command line options and operands.
++
++@item
++Reads the init file (if any) in the current working directory.
++
++@item
++Reads command files specified by the @samp{-x} option.
++@end enumerate
++
++The init file in your home directory can set options (such as @samp{set
++complaints}) that affect subsequent processing of command line options
++and operands.  Init files are not executed if you use the @samp{-x}
++option (@pxref{Options for the bashdb script, ,bashdb script options}).
++
++@cindex init file name
++On some configurations of @value{DBG}, the init file is known by a
++different name (these are typically environments where a specialized
++form of @DBG may need to coexist with other forms, hence a
++different name for the specialized version's init file).  These are the
++environments with special init file names:
++
++You can also request the execution of a command file with the
++@code{source} command:
++
++@table @code
++@kindex source
++@item source @var{filename}
++Execute the command file @var{filename}.
++@end table
++
++The lines in a command file are executed sequentially.  They are not
++printed as they are executed.  If there is an error, execution
++proceeds to the next command in the file.
++
++@node Arguments
++@section Your script's arguments
++
++@cindex arguments (to your script)
++The arguments to your script can be specified by the arguments of the
++@code{restart} command.
++They are passed to a shell, which expands wildcard characters and
++performs redirection of I/O, and thence to your script.  
++
++@code{restart} with no arguments uses the same arguments used by the previous
++@code{restart}, or those set by the @code{set args} command.. 
++
++@table @code
++@kindex set args
++@item set args
++Specify the arguments to be used the next time your program is run.  If
++@code{set args} has no arguments, @code{restart} executes your program
++with no arguments.  Once you have run your program with arguments,
++using @code{set args} before the next @code{restart} is the only way to run
++it again without arguments.
++
++@kindex show args
++@item show args
++Show the arguments to give your program when it is started.
++@end table
++
++@node Input/Output
++@section Your script's input and output
++
++@cindex redirection
++@cindex I/O
++@cindex terminal
++By default, the script you run under the BASH debugger does input and
++output to the same terminal that BASH uses.  Before running the script
++to be debugged, the debugger records the tty that was in effect. All
++of its output is then written to that.  However you can change this
++when using the @samp{bashdb} script using the @samp{-t} option.
++
++
++@table @code
++@kindex info terminal
++@item info terminal
++Displays information recorded by @DBG about the terminal modes your
++program is using.
++@end table
++
++@kindex tty
++@cindex controlling terminal
++Another way to specify where your script should do input and output is
++with the @code{tty} command.  This command accepts a file name as
++argument, and causes this file to be the default for future @code{restart}
++commands.  It also resets the controlling terminal for the child
++process, for future @code{restart} commands.  For example,
++
++@example
++tty /dev/ttyb
++@end example
++
++@noindent
++directs that processes started with subsequent @code{restart} commands
++default to do input and output on the terminal @file{/dev/ttyb} and have
++that as their controlling terminal.
++
++An explicit redirection in @code{restart} overrides the @code{tty} command's
++effect on the input/output device, but not its effect on the controlling
++terminal.
++
++When you use the @code{tty} command or redirect input in the @code{restart}
++command, only the input @emph{for your script} is affected.  The input
++for @DBG still comes from your terminal.
++
++@node Script/Debugger Interaction
++@section Script/Debugger Interaction
++
++@value{dBGP} and your program live in the same variable space so
++to speak. @BASH does not have a notion of module scoping or lexical
++hiding (yet) and this then imposes some additional care and awareness.
++
++Most of the variables and functions used inside @DBG start
++@code{_Dbg_}, so please don't use variables or functions with these
++names in your program. 
++
++@emph{Note: there are some other variables that begin with just an
++underscore (@code{_}); over time these will be phased out. But until
++then, avoid those or consult what is used by the debugger. Run
++@samp{bashdb --debugger -c 'declare -p'} to list all the variables in
++use including those used by the debugger.}
++
++A number of @DBG environment variables are also reserved for
++use; these start with @code{BASHDB_}. For example:
++@env{BASHDB_INPUT}, @env{BASHDB_LEVEL} and,
++@env{BASHDB_QUIT_ON_QUIT} (@pxref{Debug, ,Debug}),
++@env{BASHDB_RESTART_FILE} (@pxref{Starting, ,Starting}), to name a
++few.  Finally, there are some @BASH environment dynamic
++variables and these start with @env{BASH_}. For example
++@env{BASH_SUBSHELL} (@pxref{Debug, ,Debug}), @env{BASH_COMMAND}
++(@pxref{Command Display, ,Command Display}), @env{BASH_LINENO}, and
++@env{BASH_SOURCE} to name a few.
++
++In order to do its work @value{dBGP} sets up a @code{DEBUG}
++trap. Consequently a script shouldn't reset this or the debugger will
++lose control. @value{dBGP} also sets up an @code{EXIT} handler so that
++it can gain control after the script finishes. Another signal
++intercepted is the an interrupt or @code{INT} signal. For more
++information about signal handling, @pxref{Signals, ,Signals} 
++
++@node Debugger Command Reference
++@chapter BASH Debugger Command Reference
++
++You can abbreviate the long name of @DBG command to the first
++few letters of the command name, if that abbreviation is unambiguous;
++and you can repeat the @code{next} o r@code{step} commands by typing
++just @key{RET}. Some commands which require a parameter, such as 
++@code{print} remember the argument that was given to them. 
++
++@menu
++* Command Syntax::       How to give commands to the BASH debugger
++* Help::                 How to ask for help (help)
++* Quit::                 Leaving the debugger (quit)
++* Information::          Status and Debugger settings (info, show)
++* Stopping::             Stopping and continuing (break, watch, step, cont...)
++* Stack::                Examining the stack (where, up, down, frame)
++* List::                 Printing source files (list)
++* Search::               Searching source files (/pat/ ?pat?)
++* Data::                 Examining data (print, examine, info variables)
++* Evaluation/Execution:: Arbitrary execution (eval, shell)
++* Auto Display::         Executing expressions on stop (display, undisplay)
++* Controlling bashdb::   Controlling bashdb (set, history)
++@end menu
++
++@node Command Syntax
++@section Command syntax
++
++A BASH debugger command is a single line of input.  There is no limit on
++how long it can be.  It starts with a command name, which is followed by
++arguments whose meaning depends on the command name.  For example, the
++command @code{step} accepts an argument which is the number of times to
++step, as in @samp{step 5}.  You can also use the @code{step} command
++with no arguments.  Some commands do not allow any arguments.
++
++@cindex repeating next/step commands
++@kindex RET @r{(repeat last command)}
++A blank line as input to @DBG (typing just @key{RET}) means to
++repeat the previous next or step command.  
++
++@kindex # @r{(a comment)}
++@cindex comment
++Any text from a @kbd{#} to the end of the line is a comment; it does
++nothing.  This is useful mainly in command files (@pxref{Command
++Files,,Command files}).
++
++@node Help
++@section Getting help (@samp{help})
++@cindex online documentation
++
++Once inside the BASH debugger, you can always ask it for information on its
++commands, using the command @code{help}.
++
++@table @code
++@kindex h @r{(@code{help})}
++@item help
++@itemx h
++You can use @code{help} (abbreviated @code{h}) with no arguments to
++display a short list of named classes of commands:
++@end table 
++
++@flushleft
++@smallexample
++bashdb<0> @b{help}
++bashdb commands:
++List/search source lines:                 Control script execution:
++-------------------------                 -------------------------
++ l [start|.] [cnt] List cnt lines         T [n]        Stack trace
++                   from line start        s [n]        Single step [n times]
++ l sub       List source code fn          n [n]        Next, steps over subs
++ - or .      List previous/current line   <CR>/<Enter> Repeat last n or s 
++ w [line]    List around line             c [linespec] Continue [to linespec]
++ f filename  View source in file          L            List all breakpoints
++ /pat/       Search forward for pat       b linespec   Set breakpoint
++ ?pat?       Search backward for pat      del [n].. or D Delete a/all breaks
++                                                         by entry number
++Debugger controls:                        skip         skip execution of cmd
++-------------------------                 cl linespec  Delete breakpoints by
++ H [num]         Show last num commands                line spec
++ q [exp] or ^D   Quit returning exp       R [args]     Attempt a restart
++ info [cmd]      Get info on cmd.         u [n]        Go up stack by n or 1.
++ !n or hi n      Run debugger history n   do [n]       Go down stack by n or 1.
++ h or ? [cmd]    Get help on command      W [var]      Add watchpoint. If no
++ info [cmd]      Get info on cmd                       no expr, delete all
++ show [cmd]      Show settings            We [expr]    Add Watchpoint arith 
++                                                       expr
++ so file         read in dbg commands     t            Toggle trace
++                                          en/di n      enable/disable brkpt,
++ set x y         set a debugger variable               watchpoint, or display
++ e bash-cmd      evaluate a bash command  tb linespec  Add one-time break
++ disp expr       add a display expr       a linespec cmd eval "cmd" at linespec
++ M               Show module versions     A            delete all actions
++ x expr          evaluate expression      ret          jump out of fn or source
++                 (via declare, let, eval) finish       execute until return
++ deb             debug into another       cond n exp   set breakpoint condition
++                 shell script
++ !! cmd [args]   execute shell command "cmd" with "args"
++
++Data Examination: also see e, t, x
++-------------------------                 
++ p variable      Print variable 
++ V [[!]pat]      List variable(s) matching or not (!) matching pattern pat
++ S [[!]pat]      List subroutine names [not] matching pattern pat
++
++Readline command line editing (emacs/vi mode) is available
++For more help, type h <cmd> or consult online-documentation.
++@end smallexample
++@end flushleft
++@c the above line break eliminates huge line overfull...
++
++@table @code
++@item help @var{command}
++With a command name as @code{help} argument, the BASH debugger displays 
++short information on how to use that command.
++
++@example
++bashdb<0> @b{help list}
++l linespec      List window lines starting at linespec.
++l min incr      List incr lines starting at 'min' linespec.
++l               List next window of lines.
++l .             Same as above.
++                Long command name: list.
++@end example
++
++In addition to @code{help}, you can use the debugger command
++@code{info} to inquire about the state of your script, or the state of
++@DBG itself.  The listings under @code{info} in the Index
++point to all the sub-commands.  @xref{Command Index}.
++@end table
++
++@c @group
++@table @code
++@kindex info
++@kindex i @r{(@code{info})}
++@item info
++This command (abbreviated @code{i}) is for describing the state of
++your program.  For example, you can list the arguments given to your
++script with @code{info args}, or list the breakpoints you have set
++with @code{info breakpoints}.  You can get a complete list of the
++@code{info} sub-commands with @w{@code{help info}}.
++
++@example
++bashdb<0> @b{info}
++Info subcommands are: args breakpoints display files source sources stack terminal variables watchpoints
++bashdb<1> @b{info source}
++Current script file is parm.sh
++Contains 34 lines.
++@end example
++@end table
++
++
++@node Quit
++@section Quitting the BASH debugger (@samp{quit})
++
++@table @code
++@kindex quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
++@kindex q @r{(@code{quit})}
++@item quit @ovar{expression}
++@item quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
++@itemx q
++
++To exit @value{DBG}, use the @code{quit} command (abbreviated
++@code{q}), or type an end-of-file character (usually @kbd{C-d}).  If
++you do not supply @var{expression}, @DBG will try to terminate
++normally or with exit code 0. Otherwise it will terminate using the
++result of @var{expression} as the exit code. 
++
++A simple @code{quit} tries to terminate all nested subshells that may
++be in effect.  If you are nested a subshell, this is normally
++indicated in a debugger prompt by the number of parentheses that the
++history number is inside --- no parenthesis means there is no subshell
++in effect. The dynamic variable @env{BASH_SUBSHELL} also contains the
++number of subshells in effect. 
++
++If you want only to terminate some number of subshells but not all of
++them, you can give a count of the number of subshells to leave after
++the return-code expression. To leave just one level of subshell
++@code{return} does almost the same thing. (See @pxref{Returning,
++,Returning}) There is a subtle difference between the two though:
++@code{return} will leave you at the beginning of the next statement
++while @code{quit} may leave you at the place the subshell was invoked
++which may be in the middle of another command such as an assingment
++statement or condition test.
++
++If the environment variable @code{BASHDB_QUIT_ON_QUIT} is set, when the
++program terminates, the debugger will also terminate too. This may be
++useful if you are debugging a script which calls another script and
++you want this inner script just to return to the outer script.
++@end table
++
++@node Stopping
++@section Stopping and Resuming Execution (@samp{break}, @samp{watch}, @samp{step}, @samp{cont})
++
++One important use of a debugger is to stop your program before it
++terminates so that, if your script might run into trouble, you can
++investigate and find out why. However should your script accidently
++continue to termination, @DBG has arranged for it not to leave the
++debugger without your explicit instruction. That way, you can restart
++the program using the same command arguments.
++
++Inside @value{DBG}, your script may stop for any of several reasons,
++such as a signal, a breakpoint, or reaching a new line after a
++debugger command such as @code{step}.  You may then examine and
++change variables, set new breakpoints or remove old ones, and then
++continue execution.  
++
++@menu
++* Breakpoints::          Breakpoints, watchpoints (break, watch, clear)
++* Resuming Execution::   Resuming execution (continue, step, next, skip, debug)
++* Signals::              Signals
++@end menu
++
++@node Breakpoints
++@subsection Breakpoints, watchpoints
++
++@cindex breakpoints
++A @dfn{breakpoint} makes your script stop whenever a certain point in
++the program is reached.  For each breakpoint, you can add conditions to
++control in finer detail whether your script stops.  
++
++You can set breakpoints with the @code{break} command and its variants
++(@pxref{Set Breaks, ,Setting breakpoints}), to specify the place where
++your script should stop by line number.  or function name in the
++debugged script.
++
++@cindex watchpoints
++@cindex breakpoint on variable modification
++A @dfn{watchpoint} is a special breakpoint that stops your script when
++the value of an expression changes.  There is a different command to
++set watchpoints (@pxref{Set Watchpoints, ,Setting watchpoints}). 
++
++But aside from that, you can manage a watchpoint like any other
++breakpoint: you delete enable, and disable both breakpoints and
++watchpoints using the same commands.
++
++You can arrange to have values from your program displayed automatically
++whenever @value{BASH} stops at a breakpoint.  @xref{Auto Display,,
++Automatic display}.
++
++@cindex breakpoint numbers
++@cindex numbers for breakpoints
++@DBG assigns a number to each breakpoint and watchpoint when
++you create it; these numbers are successive integers starting with
++one.  In many of the commands for controlling various features of
++breakpoints you use the breakpoint number to say which breakpoint you
++want to change.  Each breakpoint may be @dfn{enabled} or
++@dfn{disabled}; if disabled, it has no effect on your script until you
++enable it again.
++
++@cindex watchpoints numbers
++@cindex numbers for watchpoints
++Watchpoint numbers however are distiguished from breakpoint numbers by
++virtue of their being suffixed with the either an upper- or lower-case
++`W'.  For example, to enable breakpoint entry 0 along with watchpoint
++entry 1 you would write @samp{enable 1 2w}, the ``2w'' refers to the
++watchpoint; ``2W'' would work just as well.
++
++@ifset FINISHED
++@cindex breakpoint ranges
++@cindex ranges of breakpoints
++Some @DBG commands accept a range of breakpoints on which to
++operate.  A breakpoint range is either a single breakpoint number, like
++@samp{5}, or two such numbers, in increasing order, separated by a
++hyphen, like @samp{5-7}.  When a breakpoint range is given to a command,
++all breakpoint in that range are operated on.
++@end ifset
++
++@menu
++* Set Breaks::                      Setting breakpoints (break, tbreak)
++* Set Watchpoints::                 Setting watchpoints (watch, watche)
++* Delete Breaks::                   Deleting breakpoints (delete, clear)
++* Disabling::                       Disabling breakpoints (disable, enable)
++* Conditions::                      Break conditions (condition)
++@end menu
++
++@node Set Breaks
++@subsubsection Setting breakpoints (@samp{break} @samp{tbreak})
++
++@kindex break
++@kindex b @r{(@code{break})}
++@cindex latest breakpoint
++Breakpoints are set with the @code{break} command (abbreviated
++@code{b}).  
++
++@table @code
++@item break @var{function}
++Set a breakpoint at entry to function @var{function}.
++
++@item break @var{linenum}
++Set a breakpoint at line @var{linenum} in the current source file.
++The current source file is the last file whose source text was printed.
++The breakpoint will stop your script just before it executes any of the
++code on that line.
++
++@item break @var{filename}:@var{linenum}
++Set a breakpoint at line @var{linenum} in source file @var{filename};
++@var{filename} has to be one of the files previously read in and has
++to be specified exactly as the name used when read in. For a list of
++read-in files, use the @samp{info files} command.
++
++@ifset FINISHED
++@item break
++When called without any arguments, @code{break} sets a breakpoint at
++the next instruction to be executed in the selected stack frame
++(@pxref{Stack, ,Examining the Stack}).  In any selected frame but the
++innermost, this makes your script stop as soon as control returns to
++that frame.  If you use @code{break} without an argument in the
++innermost frame, @DBG stops the next time it reaches the
++current location; this may be useful inside loops.
++@end ifset
++
++@item break @dots{} if @var{cond}
++Set a breakpoint with condition @var{cond}; evaluate the expression
++@var{cond} each time the breakpoint is reached, and stop only if the
++value is nonzero---that is, if @var{cond} evaluates as true. The
++expression is evaluated via the @code{let} builtin funtion.
++@samp{@dots{}} stands for one of the possible arguments described
++above (or no argument) specifying where to break. The word ``if'' is
++often optional and is necessary only @samp{@dots{}} is
++omitted. @xref{Conditions, ,Break conditions}, for more information on
++breakpoint conditions.
++
++Examples:
++@example
++bashdb<0> @b{break fn1}
++Breakpoint 1 set in file parm.sh, line 3.
++bashdb<1> @b{break 28}
++Breakpoint 2 set in file parm.sh, line 28.
++bashdb<2> @b{break parm.sh:29}
++Breakpoint 3 set in file parm.sh, line 29.
++bashdb<3> @b{break 28 if x==5}
++Breakpoint 4 set in file parm.sh, line 28.
++@end example
++
++@kindex tbreak
++@item tbreak @var{args}
++Set a breakpoint enabled only for one stop.  @var{args} are the
++same as for the @code{break} command, and the breakpoint is set in the same
++way, but the breakpoint is automatically deleted after the first time your
++program stops there.  @xref{Disabling, ,Disabling breakpoints}.
++
++@kindex info breakpoints
++@cindex @code{$_} and @code{info breakpoints}
++@item info breakpoints @ovar{n}
++@itemx info break @ovar{n}
++@itemx info watchpoints @ovar{n}
++Print a table of all breakpoints, watchpoints set and not deleted,
++with the following columns for each breakpoint:
++
++@table @emph
++@item Breakpoint Numbers (@samp{Num})
++@item Enabled or Disabled (@samp{Enb})
++Enabled breakpoints are marked with @samp{1}.  @samp{0} marks breakpoints
++that are disabled (not enabled).
++@item Count
++The number of times that breakpoint or watchpoint has been hit.
++@item Condition
++The arithmetic expression
++@item File and Line (@samp{file:line})
++The filename and line number inside that file where of breakpoint in
++the script. The file and line are separated with a colon.
++@end table
++
++@noindent
++If a breakpoint is conditional, @code{info break} shows the condition on
++the line following the affected breakpoint; breakpoint commands, if any,
++are listed after that.
++
++@noindent
++@code{info break} displays a count of the number of times the breakpoint
++has been hit.  
++
++@code{info break} with a breakpoint number @var{n} as argument lists
++only that breakpoint.
++
++Examples:
++@example
++bashdb<4> @b{info break}
++Breakpoints at following places:
++Num Type       Disp Enb What
++1   breakpoint keep y   parm.sh:3
++2   breakpoint keep y   parm.sh:28
++3   breakpoint keep y   parm.sh:29
++4   breakpoint keep y   parm.sh:28
++No watch expressions have been set.
++bashdb<5> @b{info break 4}
++Num Type       Disp Enb What
++4   breakpoint keep y   parm.sh:28
++No watch expressions have been set.
++@end example
++@end table
++
++
++@ifset FINISHED
++This is especially useful in conjunction with the
++@code{ignore} command.  You can ignore a large number of breakpoint
++hits, look at the breakpoint info to see how many times the breakpoint
++was hit, and then run again, ignoring one less than that number.  This
++will get you quickly to the last hit of that breakpoint.
++@end ifset
++
++@DBG allows you to set any number of breakpoints at the same place in
++your script.  There is nothing silly or meaningless about this.  When
++the breakpoints are conditional, this is even useful
++(@pxref{Conditions, ,Break conditions}).
++
++@node Set Watchpoints
++@subsubsection Setting watchpoints (@samp{watch}, @samp{watche})
++
++@cindex setting watchpoints
++You can use a watchpoint to stop execution whenever the value of an
++expression changes, without having to predict a particular place where
++this may happen. As with the @code{print} (@pxref{Data,,Examining
++Data}), the idiosyncracies of a BASH or any POSIX shell derivative
++suggest using two commands. The @code{watch} command is just for a
++single variables; the @code{watche} command uses the builtin ``let''
++command to evaluate an expression. If the variable you are tracking
++can take a string value, issuing something like @samp{watch foo} will
++not have the desired effect---any string assignment to @code{foo} will
++have a value 0 when it is assigned via ``let.''
++
++@table @code
++@kindex watch
++@item watch @var{var}
++Set a watchpoint for a variable.  @DBG will break when the
++value of @var{var} changes. In this command do not add a leading
++dollar symbol to @var{var}.
++
++@item watche @var{expr}
++Set a watchpoint for an expression via the builtin ``let'' command.
++@DBG will break when @var{expr} is written into by the program
++and its value changes. Not that this may not work for tracking
++arbitrary string value changes. For that use @code{watch} described
++earlier.
++@end table
++
++@node Delete Breaks
++@subsubsection Deleting breakpoints (@samp{clear}, @samp{delete})
++
++@cindex clearing breakpoints, watchpoints
++@cindex deleting breakpoints, watchpoints
++It is often necessary to eliminate a breakpoint or watchpoint once it
++has done its job and you no longer want your script to stop there.
++This is called @dfn{deleting} the breakpoint.  A breakpoint that has
++been deleted no longer exists; it is forgotten.
++
++With the @code{clear} command you can delete breakpoints according to
++where they are in your script.  With the @code{delete} command you can
++delete individual breakpoints, or watchpoints by specifying their
++breakpoint numbers. @emph{Note: as described below under the ``clear''
++command, ``d'' is an alias for ``clear'', not ``delete''. }
++
++It is not necessary to delete a breakpoint to proceed past it.  @DBG
++automatically ignores breakpoints on the first instruction to be executed
++when you continue execution.
++
++@table @code
++@kindex clear
++@kindex d @r{(@code{clear})}
++@item clear
++Delete any breakpoints at the next instruction to be executed in the
++selected stack frame (@pxref{Selection, ,Selecting a frame}).  When
++the innermost frame is selected, this is a good way to delete a
++breakpoint where your script just stopped.
++
++It may seem odd that we have an alias ``d'' for ``clear.'' It so
++happens that Perl's debugger use ``d'' for its delete command and the
++delete concept in Perl's debugger corresponds to ``clear'' in
++GDB. (Perl doesn't have a notion of breakpoint entry numbers). So in
++order to be compatible with both debugger interfaces, ``d'' is used as
++an alias for ``clear.'' Clear? 
++
++@item clear @var{function}
++@itemx clear @var{filename}:@var{function}
++Delete any breakpoints set at entry to the function @var{function}.
++
++@item clear @var{linenum}
++@itemx d @var{linenum}
++@ifset FINISHED
++@itemx clear @var{filename}:@var{linenum}
++@end ifset
++Delete any breakpoints set at or within the code of the specified line.
++
++@cindex delete breakpoints
++@kindex delete
++@kindex de @r{(@code{delete})}
++@item delete @ovar{breakpoints}
++Delete the breakpoints, watchpoints specified as arguments. 
++
++If no argument is specified, delete all breakpoints (@DBG asks
++confirmation, unless you have @code{set confirm off}).  You can
++abbreviate this command as @code{de}.
++
++
++Note that for compatibility with Perl's debugger, @code{d} means
++something else: @code{clear}.
++
++@end table
++
++@node Disabling
++@subsubsection Disabling breakpoints (@samp{disable}, @samp{enable})
++
++Rather than deleting a breakpoint or watchpoint, you might
++prefer to @dfn{disable} it.  This makes the breakpoint inoperative as if
++it had been deleted, but remembers the information on the breakpoint so
++that you can @dfn{enable} it again later.
++
++You disable and enable breakpoints, watchpoints, and catchpoints with
++the @code{enable} and @code{disable} commands, optionally specifying one
++or more breakpoint numbers as arguments.  Use @code{info break} or
++@code{info watch} to print a list of breakpoints, watchpoints, and
++catchpoints if you do not know which numbers to use.
++
++A breakpoint, watchpoint, or catchpoint can have any of four different
++states of enablement:
++
++@itemize @bullet
++@item
++Enabled.  The breakpoint stops your program.  A breakpoint set
++with the @code{break} command starts out in this state.
++@item
++Disabled.  The breakpoint has no effect on your program.
++@item
++Enabled once.  The breakpoint stops your program, but then becomes
++disabled.
++@item
++Enabled for deletion.  The breakpoint stops your program, but
++immediately after it does so it is deleted permanently.  A breakpoint
++set with the @code{tbreak} command starts out in this state.
++@end itemize
++
++You can use the following commands to enable or disable breakpoints,
++watchpoints, and catchpoints:
++
++@table @code
++@kindex disable breakpoints
++@kindex disable
++@kindex dis @r{(@code{disable})}
++@item disable @ovar{breakpoints}
++Disable the specified breakpoints---or all breakpoints, if none are
++listed.  A disabled breakpoint has no effect but is not forgotten.  All
++options such as ignore-counts, conditions and commands are remembered in
++case the breakpoint is enabled again later.  You may abbreviate
++@code{disable} as @code{dis}.
++
++@kindex enable breakpoints
++@kindex enable
++@item enable @ovar{breakpoints}
++Enable the specified breakpoints (or all defined breakpoints).  They
++become effective once again in stopping your program.
++@end table
++
++@c FIXME: I think the following ``Except for [...] @code{tbreak}'' is
++@c confusing: tbreak is also initially enabled.
++Except for a breakpoint set with @code{tbreak} (@pxref{Set Breaks,
++,Setting breakpoints}), breakpoints that you set are initially enabled;
++subsequently, they become disabled or enabled only when you use one of
++the commands above.  (The command @code{until} can set and delete a
++breakpoint of its own, but it does not change the state of your other
++breakpoints; see @ref{Resuming Execution, ,Resuming Execution}.)
++
++@node Conditions
++@subsubsection Break conditions (@samp{condition})
++@cindex conditional breakpoints
++@cindex breakpoint conditions
++
++The simplest sort of breakpoint breaks every time your script reaches
++a specified place.  You can also specify a @dfn{condition} for a
++breakpoint.  A condition is just a BASH expression.  
++
++Break conditions can be specified when a breakpoint is set, by using
++@samp{if} in the arguments to the @code{break} command.  @xref{Set
++Breaks, ,Setting breakpoints}.  A breakpoint with a condition
++evaluates the expression each time your script reaches it, and your
++script stops only if the condition is @emph{true}.
++
++@cindex one-time breakpoints
++There is also a notion of a ``one-time'' breakpoint which gets deleted
++as soon as it is hit, so that that breakpoint is executed once only. 
++
++Conditions are also accepted for watchpoints; you may not need them,
++since a watchpoint is inspecting the value of an expression anyhow---but
++it might be simpler, say, to just set a watchpoint on a variable name,
++and specify a condition that tests whether the new value is an interesting
++one.
++
++Break conditions can be specified when a breakpoint is set, by using
++@samp{if} in the arguments to the @code{break} command.  @xref{Set
++Breaks, ,Setting breakpoints}.  They can also be changed at any time
++with the @code{condition} command.
++
++@ifset FINISHED
++You can also use the @code{if} keyword with the @code{watch} command.
++The @code{catch} command does not recognize the @code{if} keyword;
++@code{condition} is the only way to impose a further condition on a
++catchpoint.
++@end ifset
++
++@table @code
++@kindex condition
++@item condition @var{bnum} @var{expression}
++Specify @var{expression} as the break condition for breakpoint
++@var{bnum}.  After you set a condition, breakpoint @var{bnum} stops
++your program only if the value of @var{expression} is true (nonzero).
++
++@item condition @var{bnum}
++Remove the condition from breakpoint number @var{bnum}.  It becomes
++an ordinary unconditional breakpoint.
++@end table
++
++@ifset FINISHED
++When you use @code{condition}, @DBG checks @var{expression}
++immediately for syntactic correctness, and to determine whether
++symbols in it have referents in the context of your breakpoint.  If
++@var{expression} uses symbols not referenced in the context of the
++breakpoint, @DBG prints an error message:
++
++@example
++No symbol "foo" in current context.
++@end example
++@end ifset
++
++@noindent
++@BASH does
++not actually evaluate @var{expression} at the time the @code{condition}
++command (or a command that sets a breakpoint with a condition, like
++@code{break if @dots{}}) is given, however.
++
++Examples;
++@example
++condition 1 x>5   # Stop on breakpoint 0 only if x>5 is true.
++condition 1       # Change that! Unconditinally stop on breakpoint 1.
++@end example
++
++@node Resuming Execution
++@subsection Resuming Execution
++
++@cindex stepping
++@cindex continuing
++@cindex resuming execution
++@dfn{Continuing} means resuming program execution until your script
++completes normally.  In contrast, @dfn{stepping} means executing just
++one more ``step'' of your script, where ``step'' may mean either one
++line of source code.  Either when continuing or when stepping,
++your script may stop even sooner, due to a breakpoint or a signal.
++
++@menu
++* Step::          running the next statement (step)
++* Next::          running the next statement skipping over functions (skip)
++* Finish::        running until the return of a function or ``source'' (finish)
++* Skip::          skipping the next statement (skip)
++* Continue::      continuing execution (continue)
++* Debug::         debugging into another program (debug)
++* Returning::     returning
++@end menu
++
++@node Step
++@subsubsection Step (@samp{step})
++@table @code
++@kindex step
++@kindex s @r{(@code{step})}
++@item step
++Continue running your script until control reaches a different source
++line, then stop it and return control to @value{DBG}.  This command is
++abbreviated @code{s}.
++
++The @code{step} command only stops at the first instruction of a source
++line.  This prevents the multiple stops that could otherwise occur in
++@code{switch} statements, @code{for} loops, etc.  @code{step} continues
++to stop if a function that has debugging information is called within
++the line.  In other words, @code{step} @emph{steps inside} any functions
++called within the line.
++
++@item step @ovar{count}
++Continue running as in @code{step}, but do so @var{count} times.  If a
++breakpoint is reached, or a signal not related to stepping occurs before
++@var{count} steps, stepping stops right away.
++@end table
++
++@node Next
++@subsubsection Next (@samp{next})
++@table @code
++@kindex next
++@kindex n @r{(@code{next})}
++@item next @ovar{count}
++Continue to the next source line in the current (innermost) stack frame.
++This is similar to @code{step}, but function calls that appear within
++the line of code are executed without stopping.  Execution stops when
++control reaches a different line of code at the original stack level
++that was executing when you gave the @code{next} command.  This command
++is abbreviated @code{n}.
++
++An argument @var{count} is a repeat count, as for @code{step}.
++@end table
++
++@node Finish
++@subsubsection Finish (@samp{finish})
++@table @code
++@kindex finish
++@item finish
++Continue running until just after function returns.  @emph{Currently,
++the line shown on a return is the function header, unless the
++@code{return} builtin function is executed in which case it is the
++line number of the @code{return} function.}
++
++Contrast this with the @code{return} command (@pxref{Returning,
++,Returning from a function}) and the @code{quit} (@pxref{Quitting the
++BASH debugger, ,Quitting the BASH debugger}).
++
++@end table
++
++@node Skip
++@subsubsection Skip (@samp{skip})
++@table @code
++@kindex skip
++@item skip @ovar{count}
++Skip exection of the next source line. 
++This may be useful if you have an action that ``fixes'' existing code in
++the script. The @code{debug} command internally uses the @code{skip} command
++to skip over existing non-debugged invocation that was presumably just
++run.
++@end table
++
++@node Continue
++@subsubsection Continue (@samp{continue})
++@table @code
++@kindex continue
++@kindex c @r{(@code{continue})}
++@item continue @ovar{linespec}
++@itemx c @ovar{line-number}
++Resume program execution, at the address where your script last
++stopped; any breakpoints set at that address are bypassed.  The
++optional argument @var{linespec} allows you to specify a linespec (a
++line number, function, or filename linenumber combination) to set. A
++one-time breakpoint is deleted when that breakpoint is reached. Should
++the program stop before that breakpoint is reached, for example,
++perhaps another breakpoint or watchpoint is reached first, in a
++listing of the breakpoints you will see this entry with the condition
++9999 which indicates a one-time breakpoint.
++@end table
++
++To resume execution at a different place, you can use @code{return}
++(@pxref{Returning, ,Returning from a function}) to go back to the
++calling function or sourced script. If you are nested inside a
++subshell, @code{quit} with a value for the number of subshells to
++exit also functions like a return.
++
++A typical technique for using stepping is to set a breakpoint
++(@pxref{Breakpoints, ,Breakpoints; watchpoints}) at the
++beginning of the function or the section of your script where a problem
++is believed to lie, run your script until it stops at that breakpoint,
++and then step through the suspect area, examining the variables that are
++interesting, until you see the problem happen.
++
++@node Debug
++@subsubsection Debug (@samp{debug})
++@table @code
++@kindex debug
++@item debug @ovar{script-name}
++Debug into @var{script-name}. If no name is given the current source line
++is used. In either case the options are prepended to cause the
++debugger to run.
++
++The nesting level of the debugger is saved inside environment variable
++@code{BASHDB_LEVEL}. The debugger prompt indicates the level of nesting
++by enclosing the history in that many nestings of @code{<>} symbols.
++
++@end table
++
++@node Returning
++@subsubsection Returning from a function, sourced file, or subshell (@samp{return})
++
++@table @code
++@cindex returning from a function, sourced file or subshell
++@kindex return
++@item return
++@itemx return
++You can cancel execution of a function call or a subshell with the
++@code{return} command.
++@end table
++
++The @code{return} command does not resume execution; it leaves the
++program stopped in the state that would exist if the function had just
++returned.  See also the @code{quit} command (@ref{Quit, ,Quitting the
++BASH debugger}). In some situations @code{return} is similar to
++@code{quit}: in particular when the script is @emph{not} currenlty
++inside in a function and the number of subshells in effect is 0, or
++when a subshell count of 1 is given on the @code{quit} command.
++
++@ifset FINISHED
++In contrast, the @code{finish} command (@pxref{Continuing
++and Stepping, ,Continuing and stepping}) resumes execution until the
++selected stack frame returns naturally.
++@end ifset
++
++@node Signals
++@subsection Signals
++@cindex signals
++
++A signal is an asynchronous event that can happen in a program.  The
++operating system defines the possible kinds of signals, and gives each
++kind a name and a number.  For example, in Unix @code{SIGINT} is the
++signal a program gets when you type an interrupt character (often
++@kbd{C-c}); @code{SIGALRM} occurs when the alarm clock timer goes off
++(which happens only if your program has requested an alarm).
++
++Some signal handlers are installed and changed for @value{DBG}'s
++normal use: @code{SIGDEBUG} and @code{SIGEXIT}. @code{SIGDEBUG} is
++used by the debugger to potentially stop your program before execution
++of each statement occurs, and @code{SIGEXIT} is used to catch your
++program just before it is set to leave so you have the option of
++restarting the program with the same options (and not leave the
++debugger) or let the program quit.
++
++Signal handlers that the debugged script might have installed are
++saved and called before the corresponding debugger handler. Thus, the
++debugged program should work roughly in the same fashion as when it is
++not debugged. However there are some call-stack variables which
++inevitably will differ. To try to hedge this a little so the behaviour
++is the same, @value{DBG} will modify arguments to the traps if it
++finds one of the call-stack that change as a result of the debugger
++being in place. In particluar @env{$LINENO} will get replaced with
++@env{$@{BASH_LINENO[0]@}}; also @env{$@{BASH_LINENO[0]@}} and
++@env{$@{BASH_SOURCE[0]@}} get replaced with
++@env{$@{BASH_LINENO[1]@}} and @env{$@{BASH_SOURCE[1]@}}
++respectively.
++
++The debugger also installs an interrupt handler @code{SIGINT} so that
++errant programs can be interrupted and you can find out where the
++program was when you interrupted it.
++
++@cindex fatal signals
++Some signals, including @code{SIGALRM}, are a normal part of the
++functioning of your program.  Others, such as @code{SIGSEGV}, indicate
++errors; these signals are @dfn{fatal} (they kill your program immediately) if the
++program has not specified in advance some other way to handle the signal.
++@code{SIGINT} does not indicate an error in your program, but it is normally
++fatal so it can carry out the purpose of the interrupt: to kill the program.
++
++@BASH has the ability to detect any occurrence of a signal in your
++program.  You can tell @BASH in advance what to do for each kind of
++signal.
++
++@cindex handling signals
++Normally, @BASH is set up to let the non-erroneous signals like
++@code{SIGALRM} be silently passed to your program
++(so as not to interfere with their role in the program's functioning)
++but to stop your program immediately whenever an error signal happens.
++You can change these settings with the @code{handle} command.
++
++@table @code
++@kindex info signals
++@item info signals
++@itemx info handle
++Print a table of all the kinds of signals and how @BASH has been told to
++handle each one.  You can use this to see the signal numbers of all
++the defined types of signals.
++
++@code{info handle} is an alias for @code{info signals}.
++
++@kindex handle
++@item handle @var{signal} @var{keywords}@dots{}
++Change the way @BASH handles signal @var{signal}.  @var{signal}
++can be the number of a signal or its name (with or without the
++@samp{SIG} at the beginning); a list of signal numbers of the form
++@samp{@var{low}-@var{high}}; or the word @samp{all}, meaning all the
++known signals.  The @var{keywords} say what change to make.
++@end table
++
++@c @group
++The keywords allowed by the @code{handle} command can be abbreviated.
++Their full names are:
++
++@table @code
++@item stop
++@BASH should stop your program when this signal happens.  This implies
++the @code{print} keyword as well.
++
++@item nostop
++@BASH should not stop your program when this signal happens.  It may
++still print a message telling you that the signal has come in.
++
++@item print
++@BASH should print a message when this signal happens.
++
++@item noprint
++@BASH should not mention the occurrence of the signal at all.  
++
++@item stack
++@BASH should print a stack trace when this signal happens.
++
++@item nostack
++@BASH should not print a stack trace when this signal occurs.  
++
++@ifset FINISHED
++@item pass
++@itemx noignore
++@BASH should allow your program to see this signal; your program
++can handle the signal, or else it may terminate if the signal is fatal
++and not handled.  @code{pass} and @code{noignore} are synonyms.
++
++@item nopass
++@itemx ignore
++@BASH should not allow your program to see this signal.
++@code{nopass} and @code{ignore} are synonyms.
++@end ifset
++@end table
++@c @end group
++
++@ifset FINISHED
++When a signal stops your program, the signal is not visible to the
++program until you
++continue.  Your program sees the signal then, if @code{pass} is in
++effect for the signal in question @emph{at that time}.  In other words,
++after @BASH reports a signal, you can use the @code{handle}
++command with @code{pass} or @code{nopass} to control whether your
++program sees that signal when you continue.
++
++The default is set to @code{nostop}, @code{noprint}, @code{pass} for
++non-erroneous signals such as @code{SIGALRM}, @code{SIGWINCH} and
++@code{SIGCHLD}, and to @code{stop}, @code{print}, @code{pass} for the
++erroneous signals.
++
++You can also use the @code{signal} command to prevent your program from
++seeing a signal, or cause it to see a signal it normally would not see,
++or to give it any signal at any time.  For example, if your program stopped
++due to some sort of memory reference error, you might store correct
++values into the erroneous variables and continue, hoping to see more
++execution; but your program would probably terminate immediately as
++a result of the fatal signal once it saw the signal.  To prevent this,
++you can continue with @samp{signal 0}.  @xref{Signaling, ,Giving your
++program a signal}.
++@end ifset
++
++@node Information
++@section Status and Debugger Settings (@samp{info}, @samp{show})
++
++In addition to @code{help}, you can use the @BASH commands @code{info}
++and @code{show} to inquire about the state of your program, or the state
++of @BASH itself.  Each command supports many topics of inquiry; this
++manual introduces each of them in the appropriate context.  The listings
++under @code{info} and under @code{show} in the Index point to
++all the sub-commands.  @xref{Command Index}.
++
++@c @group
++@table @code
++@kindex info
++@kindex i @r{(@code{info})}
++@item info
++This command (abbreviated @code{i}) is for describing the state of
++your program.  For example, you canlist the current @code{$1}, @code{$2}
++parameters with @code{info args}, or list the breakpoints you have set
++with @code{info breakpoints} or @code{info watchpoints}.  You can get
++a complete list of the @code{info} sub-commands with @w{@code{help
++info}}.
++
++@kindex set
++@item set
++You can assign the result of an expression to an environment variable
++with @code{set}.  For example, you can set the number of lines
++@BASH will list by default to 20 with @code{set listsize 20}.
++
++@kindex show
++@item show
++In contrast to @code{info}, @code{show} is for describing the state of
++@BASH itself.
++You can change most of the things you can @code{show}, by using the
++related command @code{set}; 
++
++The distinction between @code{info} and @code{show} however is a bit
++fuzzy. For example, to list the arguments given to your script use
++@code{show args}; @code{info args} does something different.
++
++@kindex info set
++To display all the settable parameters and their current
++values, you can use @code{show} with no arguments; you may also use
++@code{info set}.  Both commands produce the same display.
++@c FIXME: "info set" violates the rule that "info" is for state of
++@c FIXME...program.  Ck w/ GNU: "info set" to be called something else,
++@c FIXME...or change desc of rule---eg "state of prog and debugging session"?
++@end table
++@c @end group
++
++Here are three miscellaneous @code{show} subcommands, all of which are
++exceptional in lacking corresponding @code{set} commands:
++
++@table @code
++@kindex show version
++@cindex version number
++@item show version
++Show what version of @BASH is running.  You should include this
++information in @BASH bug-reports.  If multiple versions of
++@BASH are in use at your site, you may need to determine which
++version of @BASH you are running; as @BASH evolves, new
++commands are introduced, and old ones may wither away.  Also, many
++system vendors ship variant versions of @value{BASH}, and there are
++variant versions of @BASH in @sc{gnu}/Linux distributions as well.
++The version number is the same as the one announced when you start
++@value{BASH}.
++
++@kindex show copying
++@item show copying
++Display information about permission for copying @value{BASH}.
++
++@kindex show warranty
++@item show warranty
++Display the @sc{gnu} ``NO WARRANTY'' statement, or a warranty,
++if your version of @DBG comes with one.
++
++@end table
++
++@node Stack
++@section Examining the Stack (@samp{where}, @samp{frame}, @samp{up}, @samp{down})
++
++When your script has stopped, one thing you'll probably want to know
++is where it stopped and some idea of how it got there.
++
++@cindex call stack
++Each time your script performs a function call (either as part of a
++command substitution or not), or `source's a file, information about
++this action is saved.  The call stack then is this a history of the
++calls that got you to the point that you are currently stopped at.
++
++@cindex selected frame
++One of the stack frames is @dfn{selected} by @DBG and many
++@DBG commands refer implicitly to the selected frame.  In
++particular, whenever you ask @DBG to list lines without giving
++a line number or location the value is found in the selected frame.
++There are special @DBG commands to select whichever frame you
++are interested in. @xref{Selection, ,Selecting a frame}.
++
++When your program stops, @BASH automatically selects the
++currently executing frame and describes it briefly, similar to the
++@code{frame} command.
++
++
++@menu
++* Frames::                      Stack frames
++* Backtrace::                   Backtraces (where)
++* Selection::                   Selecting a frame (up, down, frame)
++
++@end menu
++
++@node Frames
++@subsection Stack frames
++
++@cindex frame, definition
++@cindex stack frame
++The call stack is divided up into contiguous pieces called @dfn{stack
++frames}, or @dfn{frames} for short; each frame is the data associated
++with one call to one function.  The frame contains the line number of
++the caller of the function, the source-file name that the line refers
++to and function name (which could be the built-in name ``source'')..
++
++@cindex initial frame
++@cindex outermost frame
++@cindex innermost frame
++When your script is started, the stack has only one frame, that of the
++function @code{main}.  This is called the @dfn{initial} frame or the
++@dfn{outermost} frame.  Each time a function is called, a new frame is
++made.  Each time a function returns, the frame for that function invocation
++is eliminated.  If a function is recursive, there can be many frames for
++the same function.  The frame for the function in which execution is
++actually occurring is called the @dfn{innermost} frame.  This is the most
++recently created of all the stack frames that still exist.
++
++@cindex frame number
++@value{DBG} assigns numbers to all existing stack frames, starting with
++zero for the innermost frame, one for the frame that called it,
++and so on upward.  These numbers do not really exist in your script;
++they are assigned by @value{DBG} to give you a way of designating stack
++frames in @value{DBG} commands.
++
++@node Backtrace
++@subsection Backtraces (@samp{where})
++
++@cindex backtraces
++@cindex tracebacks
++@cindex stack traces
++A backtrace is essentially the same as the call stack: a summary of
++how your script got where it is.  It shows one line per frame, for
++many frames, starting with the place that you sare stopped at (frame
++zero), followed by its caller (frame one), and on up the stack.
++
++@table @code
++@kindex backtrace
++@kindex bt @r{(@code{backtrace})}
++@item backtrace
++@itemx bt
++@itemx where
++@itemx T
++Print a backtrace of the entire stack: one line per frame for all
++frames in the stack.
++
++@item backtrace @var{n}
++@itemx bt @var{n}
++@itemx where @var{n}
++@itemx T @var{n}
++Similar, but print only the innermost @var{n} frames.
++
++@ifset FINISHED
++@item backtrace -@var{n}
++@itemx bt -@var{n}
++@itemx where -@var{n}
++@itemx T -@var{n}
++Similar, but print only the outermost @var{n} frames.
++@end ifset
++@end table
++
++@kindex where
++The names @code{where} and @code{T} are additional aliases for
++@code{backtrace}.
++
++Each line in the backtrace shows the frame number and the function
++name, the source file name and line number, as well as the function name.
++
++Here is an example of a backtrace taken a program in the
++regression-tests @file{parm.sh}.
++
++@smallexample
++@group
++% ../bashdb -n -L .. parm.sh
++Bourne-Again Shell Debugger, release @value{BASHRELEASE}
++Copyright 2002,2003 Rocky Bernstein
++This is free software, covered by the GNU General Public License, and you are
++welcome to change it and/or distribute copies of it under certain conditions.
++
++(./parm.sh:21):
++21:	fn1 5
++bashdb<0> @b{continue fn3}
++One-time breakpoint 1 set in file ./parm.sh, line 17.
++fn2: testing 1 2 3
++(./parm.sh:17):
++17:	fn3() @{
++bashdb<1> @b{where}
++->0 in file `./parm.sh' at line 14
++##1 fn3() called from file `./parm.sh' at line 14
++##2 fn2("testing 1", "2 3") called from file `parm.sh' at line 5
++##3 fn1("0") called from file `parm.sh' at line 9
++##4 fn1("1") called from file `parm.sh' at line 9
++##5 fn1("2") called from file `parm.sh' at line 9
++##6 fn1("3") called from file `parm.sh' at line 9
++##7 fn1("4") called from file `parm.sh' at line 9
++##8 fn1("5") called from file `parm.sh' at line 21
++##9 source("parm.sh") called from file `bashdb' at line 143
++##10 main("-n", "-L", "..", "parm.sh") called from file `bashdb' at line 0
++@end group
++@end smallexample
++
++@noindent
++The display for ``frame'' zero isn't a frame at all, although it has
++the same information minus a function name; it just indicates that
++your script has stopped at the code for line @code{14}
++of @code{./parm.sh}.
++
++@node Selection
++@subsection Selecting a frame (@samp{up}, @samp{down}, @samp{frame})
++
++Commands for listing source code in your script work on whichever
++stack frame is selected at the moment.  Here are the commands for
++selecting a stack frame; all of them finish by printing a brief
++description of the stack frame just selected.
++
++@table @code
++@kindex up
++@item up @var{n}
++Move @var{n} frames up the stack.  For positive numbers @var{n}, this
++advances toward the outermost frame, to higher frame numbers, to frames
++that have existed longer.  @var{n} defaults to one.
++
++@kindex down
++@kindex do @r{(@code{down})}
++@item down @var{n}
++Move @var{n} frames down the stack.  For positive numbers @var{n}, this
++advances toward the innermost frame, to lower frame numbers, to frames
++that were created more recently.  @var{n} defaults to one.  You may
++abbreviate @code{down} as @code{do}.
++@end table
++
++All of these commands end by printing two lines of output describing the
++frame.  The first line shows the frame number, the function name, the
++arguments, and the source file and line number of execution in that
++frame.  The second line shows the text of that source line.
++
++@need 100
++For example:
++
++@smallexample
++@group
++bashdb<8> @b{up}
++19:	sourced_fn
++bashdb<8> @b{T}
++##0 in file `./bashtest-sourced' at line 8
++->1 sourced_fn() called from file `bashtest-sourced' at line 19
++##2 source() called from file `bashdb-test1' at line 23
++##3 fn2() called from file `bashdb-test1' at line 33
++##4 fn1() called from file `bashdb-test1' at line 42
++##5 main() called from file `bashdb-test1' at line 0
++@end group
++@end smallexample
++
++After such a printout, the @code{list} command with no arguments
++prints ten lines centered on the point of execution in the frame.
++@xref{List, ,Printing source lines}.
++
++@table @code
++@kindex frame
++@cindex current stack frame
++@item frame @var{args}
++The @code{frame} command allows you to move from one stack frame to
++another, and to print the stack frame you select.  @var{args} is the
++the stack frame number.  Without an argument, @code{frame} prints the
++current stack frame.
++@end table
++
++@node List
++@section Examining Source Files (@samp{list})
++
++@value{DBG} can print parts of your script's source.  When your
++script stops, @value{DBG} spontaneously prints the line where it
++stopped.  Likewise, when you select a stack frame (@pxref{Selection,
++,Selecting a frame}), @value{DBG} prints the line where execution in
++that frame has stopped.  You can print other portions of source files
++by explicit command.
++
++If you use @value{DBG} through its @sc{gnu} Emacs interface, you may
++prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using
++@value{DBG} under @sc{gnu} Emacs}.
++
++@kindex list
++@kindex l @r{(@code{list})}
++To print lines from a source file, use the @code{list} command
++(abbreviated @code{l}).  By default, ten lines are printed.
++There are several ways to specify what part of the file you want to print.
++
++Here are the forms of the @code{list} command most commonly used:
++
++@table @code
++@item list @var{linenum}
++@itemx l @var{linenum}
++Print lines centered around line number @var{linenum} in the
++current source file.
++
++@item list @var{function}
++@itemx l @var{function}
++Print the text of @var{function}.
++
++@item list
++@itemx l
++Print more lines.  If the last lines printed were printed with a
++@code{list} command, this prints lines following the last lines
++printed; however, if the last line printed was a solitary line printed
++as part of displaying a stack frame (@pxref{Stack, ,Examining the
++Stack}), this prints lines centered around that line.
++
++@item list -
++@itemx l -
++Print lines just before the lines last printed.
++@end table
++
++By default, @value{DBG} prints ten source lines with any of these forms of
++the @code{list} command.  
++You can change this using @code{set listsize}:
++
++@table @code
++@kindex set listsize
++@item set listsize @var{count}
++Make the @code{list} command display @var{count} source lines (unless
++the @code{list} argument explicitly specifies some other number).
++
++@kindex show listsize
++@item show listsize
++Display the number of lines that @code{list} prints.
++@end table
++
++Repeating a @code{list} command with @key{RET} discards the argument,
++so it is equivalent to typing just @code{list}.  This is more useful
++than listing the same lines again.  An exception is made for an
++argument of @samp{-}; that argument is preserved in repetition so that
++each repetition moves up in the source file.
++
++@cindex linespec
++In general, the @code{list} command expects you to supply a
++@dfn{linespecs}.  Linespecs specify source lines; there are several ways
++of writing them, but the effect is always to specify some source line.
++
++Here is a complete description of the possible arguments for @code{list}:
++
++@table @code
++@item list @var{linespec}
++Print lines centered around the line specified by @var{linespec}.
++
++@item list @var{first} @var{increment}
++Print @var{increment} lines starting from @var{first}
++
++@item list @var{first}
++Print lines starting with @var{first}.
++
++@item list -
++Print lines just before the lines last printed.
++
++@item list .
++Print lines after where the script is stopped.
++
++@item list
++As described in the preceding table.
++@end table
++
++Here are the ways of specifying a single source line---all the
++kinds of linespec.
++
++@table @code
++@item @var{number}
++Specifies line @var{number} of the current source file.
++When a @code{list} command has two linespecs, this refers to
++the same source file as the first linespec.
++
++@item @var{filename}:@var{number}
++Specifies line @var{number} in the source file @var{filename}.
++
++@item @var{function}
++Specifies the line that function @var{function} is listed on.
++
++@ifset FINISHED
++@item @var{filename}:@var{function}
++Specifies the line of function @var{function} in the file
++@var{filename}.  You only need the file name with a function name to
++avoid ambiguity when there are identically named functions in
++different source files.
++@end ifset
++@end table
++
++@node Search
++@section Searching source files (@samp{search}, @samp{reverse}, @samp{/.../}, @samp{?..?})
++@cindex searching
++@kindex reverse-search
++
++There are two commands for searching through the current source file for a
++BASH extended pattern-matching expression.
++
++@table @code
++@kindex search
++@kindex forward
++@item forward @var{bash-pattern}
++@itemx search @var{bash-pattern}
++The command @samp{forward @var{bash-pattern}} checks each line,
++starting with the one following the current line, for a match for
++@var{bash-pattern} which is an extended bash pattern-matching
++expression.  It lists the line that is found.  You can use the synonym
++@samp{search @var{bash-pattern}} or abbreviate the command name as
++@code{fo} or @code{/@var{pat}/}.
++
++@item reverse @var{bash-pattern}
++The command @samp{reverse @var{bash-pattern}} checks each line, starting
++with the one before the last line listed and going backward, for a match
++for @var{bash-pattern}.  It lists the line that is found.  You can abbreviate
++this command as @code{rev} or @code{?@var{bash-pattern}?}.
++@end table
++
++@node Data
++@section Examining Data (@samp{print}, @samp{examine}, @samp{info variables})
++
++@cindex printing data
++@cindex examining data
++@kindex print
++
++One way to examine string data in your script is with the @code{print}
++command (abbreviated @code{p}). However a more versatile print command
++is @code{x}; it can print variable and function definitions and can do
++arithmetic computations. Finally, the most general method would be
++via @code{eval echo}.
++
++@table @code
++@kindex print
++@kindex p @r{(@code{print})}
++@item print @var{expr}
++
++Use @code{print} to dispay strings as you would from @code{echo}. And
++as such, variable names to be substituted have to be preceded with a
++dollar sign. As with echo, filename expansion, e.g. tilde expansion,
++is performed on unquoted strings. So for example if you want to print
++a *, you would write @samp{print "*"}, not @samp{print *}. If you want
++to have the special characters dollars sign appear, use a backslash.
++
++@item print
++@itemx p
++If you omit @var{expr}, @value{DBG} displays the last expression again.
++
++@item x @ovar{expr}
++@kindex x
++
++This is a smarter, more versatile ``print'' command, and although sometimes
++it might not be what you want, and you may want to resort to either
++@code{print} or @code{eval echo...}. 
++
++As with @code{print}, if you omit @var{expr}, @value{DBG} displays
++the last expression again.
++
++The @code{x} command first checks if @var{expr} is single variable. If
++it is, the definition and value are printed via @value{BASH}'s
++@code{declare -p} command. This will show the variable's attributes
++such as if it is read only or if it is an integer. If the variable is
++an array, that is show and the array values are printed.
++
++If instead @var{expr} is a function, the function definition is
++printed via @value{BASH}'s @code{declare -f} command. If @var{expr}
++was neither a variable nor an expression, then we try to get a value
++via @code{let}. And if this returns an error, as a last resort we call
++@code{print} and give what it outputs.
++
++Since @code{let} may be used internally and since (to my thinking)
++@code{let} does funny things, the results may seem odd unless you
++understand the sequence tried above and how @code{let} works. For
++example if the variable @code{foo} has value 5, then @samp{x foo} show
++the definition of foo with value 5, and @samp{x foo+5} prints 10 as
++expected. So far so good. However if @code{foo} is has value
++``string'', @samp{x foo+5} prints 5 because @code{let} has turned the
++string into 0; @samp{p foo+5} will simply print ``foo+5''; if you want
++the value of ``foo'' substituted inside a string, for example you
++expect ``the value of foo is $foo'' to come out ``the value of foo is
++5'', then the right command to use is @code{print} rather than
++@code{x}, making sure you add the dollar onto the beginning of the
++variable.
++
++@item V @ovar{!}@ovar{pattern}
++@kindex V
++
++If you want to @emph{all} list variables and there values or a set of
++variables by pattern, use this command.
++
++@smallexample
++@group
++bashdb<0> @b{V dq*}
++dq_args="dq_*"
++dq_cmd="V"
++@end group
++@end smallexample
++
++@end table
++
++@node Evaluation/Execution
++@section Running Arbitrary BASH and Shell commands (@samp{eval}, @samp{shell})
++
++The two most general commands and most ``low-level'' are @code{eval}
++and @code{shell}.
++
++@table @code
++@item eval
++@itemx e
++@kindex e
++
++In contrast to the commands of the last section the most general way
++to examine data is through @code{eval}. But you do much more with
++this; you can change the values of variables, since, you are just
++evaluating BASH code. 
++
++If you expect output, you should arrange that in the command, such as
++via @code{echo} or @code{printf}. For example, to print the value of
++@var{foo}, you would type @samp{e echo $foo}. This is bit longer than
++@samp{p $foo} or (when possible) @samp{x foo}. However suppose you
++wanted to find out how the builtin test operator @samp{[} works with
++the @samp{-z} test condition. You could use @code{eval} to do this
++such as @samp{e [ -z "$foo"] && echo "yes"}.
++
++@kindex shell
++@kindex !! @r{(@code{shell})}
++@cindex shell escape
++@item shell @var{command string}
++@itemx !!
++
++If you need to execute occasional shell commands during your
++debugging session, there is no need to leave or suspend @value{DBG}; you can
++just use the @code{shell} command or its alias @code{!!}.
++
++Invoke a shell to execute @var{command string}.
++
++@end table
++
++@node Auto Display
++@section Automatic display (@samp{display}, @samp{undisplay})
++@cindex automatic display
++@cindex display of expressions
++
++If you find that you want to print the value of an expression
++frequently (to see how it changes), you might want to add it to the
++@dfn{automatic display list} so that @value{DBG} evaluates a
++statement each time your program stops.  Each expression added to the
++list is given a number to identify it; to remove an expression from
++the list, you specify that number.  The automatic display looks like
++this:
++
++@example
++2 (echo $x): 38
++@end example
++
++@noindent
++This display shows item numbers, expressions and their current values.  
++
++@table @code
++@kindex display
++@item display @var{expr}
++Add the expression @var{expr} to the list of expressions to display
++each time your program stops.
++@end table
++
++@table @code
++@kindex delete display
++@kindex undisplay
++@item undisplay @var{dnums}@dots{}
++@itemx delete display @var{dnums}@dots{}
++Remove item numbers @var{dnums} from the list of expressions to display.
++
++@code{undisplay} does not repeat if you press @key{RET} after using it.
++(Otherwise you would just get the error @samp{No display number @dots{}}.)
++
++@kindex disable display
++@item disable display @var{dnums}@dots{}
++Disable the display of item numbers @var{dnums}.  A disabled display
++item is not printed automatically, but is not forgotten.  It may be
++enabled again later.
++
++@kindex enable display
++@item enable display @var{dnums}@dots{}
++Enable display of item numbers @var{dnums}.  It becomes effective once
++again in auto display of its expression, until you specify otherwise.
++
++@item display
++Display the current values of the expressions on the list, just as is
++done when your program stops.
++
++@kindex info display
++@item info display
++Print the list of expressions previously set up to display
++automatically, each one with its item number, but without showing the
++values.  This includes disabled expressions, which are marked as such.
++It also includes expressions which would not be displayed right now
++because they refer to automatic variables not currently available.
++@end table
++
++@node Controlling bashdb
++@section Controlling @DBG (@samp{set}, @samp{history})
++
++You can alter the way @BASH interacts with you by using the
++@code{set} command. 
++
++@menu
++* Annotate::                    Annotation Level (set annotate)
++* Prompt::                      Prompt (set prompt, show prompt)
++* Editing::                     Command editing (set editing, show editing)
++* Command Display::             Command display (set showcommand)
++* History::                     Command history (history, !, H)
++@end menu
++
++@node Annotate
++@subsection Annotation Level (@samp{set annoatate})
++
++The annotation level controls how much information does @value{DBG}
++print together with its prompt, values of expressions, source lines,
++and other types of output.  Level 0 is the normal, level 1 is for use
++when @value{DBG} is run as a subprocess of @sc{gnu} Emacs of @value{DDD},
++level 2 is the maximum annotation suitable for programs that control
++@value{DBGN}.
++
++@node Prompt
++@subsection Prompt (@samp{set prompt}, @samp{show prompt})
++
++@cindex prompt
++
++@value{dBGP} indicates its readiness to read a command by printing a
++string called the @dfn{prompt}.  This string is normally:
++@example
++bashdb$@{_Dbg_less@}$@{#_Dbg_history[@@]@}$@{_Dbg_greater@}$_Dbg_space
++@end example
++
++When variables inside the the prompt string are evaluated, the above
++becomes something like @samp{bashdb<5>} if this is the fifth command
++executed or perhaps @samp{bashdb<<2>>} if you have called the debugger
++from inside a debugger session and this is the second command inside
++the debugger session or perhaps @samp{bashdb<(6)>} if you 
++entered a subshell after the fifth command.
++
++You can change the prompt string with the @code{set prompt} command,
++although it is not normally advisable to do so without understanding
++the implications. If you are using the @value{DDD} GUI, it changes the
++changes the prompt and should not do so.  In certain other
++circumstances (such as writing a GUI like @value{DDD}), it may be is useful
++to change the prompt.
++
++@emph{Note:} @code{set prompt} does not add a space for you after the
++prompt you set.  This allows you to set a prompt which ends in a space
++or a prompt that does not. Furthermore due to a implementation
++limitation (resulting from a limitation of the bash built-in function
++``read''), to put a space at the end of the prompt use the
++@samp{$_Dbg_space} variable. 
++
++@table @code
++@kindex set prompt
++@item set prompt @var{newprompt}
++Directs @value{DBG} to use @var{newprompt} as its prompt string
++henceforth.
++
++@emph{Warning: changing the prompt can @value{DDD}'s ability to
++understand when the debugger is waiting for input.}
++
++@kindex show prompt
++@item show prompt
++Prints a line of the form: @samp{bashdb's prompt is: @var{your-prompt}}
++@end table
++
++@node Editing
++@subsection Command editing (@samp{set editing}, @samp{show editing})
++@cindex readline
++@cindex command line editing
++
++@value{DBG} reads its input commands through bash which uses via the
++@dfn{readline} interface.  This @sc{gnu} library provides consistent
++behavior for programs which provide a command line interface to the
++user.  Advantages are @sc{gnu} Emacs-style or @dfn{vi}-style inline
++editing of commands, @code{csh}-like history substitution, and a
++storage and recall of command history across debugging sessions.
++
++You may control the behavior of command line editing in @BASH with the
++command @code{set}.
++
++@table @code
++@kindex set editing
++@cindex editing
++@item set editing
++@itemx set editing on
++Enable command line editing (enabled by default).
++
++@item set editing off
++Disable command line editing.
++
++@kindex show editing
++@item show editing
++Show whether command line editing is enabled.
++@end table
++
++
++@node Command Display
++@subsection Command Display (@samp{set showcommand})
++
++The debugger normally lists the line number and source line of the for
++the statement to be next executed. Often this line contains one
++expression or one statement and it is clear from this line what's
++going to happen. However @BASH allows many expressions or
++statements to be put on a single source line; some lines
++contain several units of execution. Some examples of this
++behavior are listed below:
++
++@smallexample
++x=1; y=2; x=3
++(( x > 5 )) && x=5
++y=`echo *`
++@end smallexample
++
++In the first line of the example above, we have three assignment
++statements on a single line. In the second line of the example above
++we have a statement which gets run only if a condition tests true. And
++in the third line of the example above, we have a command that gets
++run and then the output of that is substituted in an assignemnt
++statement.  If you were single stepping inside the debugger, each line
++might get listed more than once before each of the actions that might
++get performed. (In the case of the conditional statement, the 
++line gets listed only once when the condition is false.)
++
++In order to assist understanding where you are, the enhanced version
++of @BASH maintains a dynamic variable @env{BASH_COMMAND} that
++contains piece of code next to be run (or is currently being run). The
++debugger has arranged to save this and can display this information
++or not. This is controlled by @code{set showcommand}. 
++
++@table @code
++@kindex set showcommand
++@item set showcommand @r{[}auto | on | off @r{]}
++controls whether or not to show the saved @env{BASH_COMMAND} for the
++command next to be executed.
++@end table
++
++When the value is @code{auto} the following heuristic is used to
++determine whether or not to display the saved @env{BASH_COMMAND}. If
++the last time you stopped you were at the same place and the command
++string has changed, then show the command. When the value @code{on} is
++used, the debugger always shows @env{BASH_COMMAND} and when
++@code{off} is used, the debugger nevers shows
++@env{BASH_COMMAND}. Note that listing the text of the source line is
++independent of whether or not the command is also listed.
++
++Some examples:
++@smallexample
++set showcommand auto      @b{This is the default}
++set showcommand on        @b{Always show the next command to be executed}
++set showcommand off       @b{Never show the next command to be executed}
++@end smallexample
++
++@node History
++@subsection Command history (@samp{H}, @samp{history}, @samp{!})
++
++@value{dBGP} can keep track of the commands you type during your
++debugging sessions, so that you can be certain of precisely what
++happened.  If the prompt has not been changed (see @ref{Prompt,
++,Prompt}), the history number that will be in use next is by default
++listed in the debugger prompt. Invalid commands and history commands
++are not saved on the history stack.
++
++@table @code
++@kindex H @r{[}@var{start-number} @ovar{end-number}@r{]}
++@item H @r{[}@var{start-number} @ovar{end-number}@r{]}
++@item H @ovar{-count}
++@itemx !@r{[}-@r{]}@var{n}:p
++
++You can list what is in the history stack with @code{H}. Debugger
++commands in ths history stack are listed from most recent to least recent.
++If no @var{start-number} is given we start with the most recently
++executed command and end with the first entry in the history stack.
++If @var{start-number} is given, that history number is listed first. If
++@var{end-number} is given, that history number is listed last. If a
++single negative number is given list that many history commands.
++
++An alternate form is @code{!@emph{n}:p} or @code{!-@emph{n}:p} where
++@emph{n} is an integer. If a minus sign is used, @emph{n} is taken as
++the count to go back from the end rather than as a absolute history
++number. In contrast @code{H}, this form only prints a @emph{single}
++history item.
++
++Some examples:
++@smallexample
++H      @b{List entire history}
++H -2   @b{List the last two history items}
++!-2:p  @b{List a single history item starting at the same place as above}
++H 5    @b{List history from history number 5 to the begining (number 0)}
++H 5 0  @b{Same as above}
++H 5 3  @b{List history from history number 5 down to history number 3}
++!5:p   @b{List a single history item 5}
++@end smallexample
++
++@kindex history @r{[}-@r{]}@r{[}@var{n}@r{]}
++@kindex !@r{[}-@r{]}@var{n} @r{(@code{history})}
++@item history @r{[}@r{[}-@r{]}@var{n}@r{]}
++@itemx !@r{[}-@r{]}@var{n}
++
++Use this command to reexecute a given history number. If no number is
++given, the last debugger command in the history is executed.
++
++An alternate form is @code{!@emph{n}} or @code{!-@emph{n}} where
++@emph{n} is an integer. 
++
++If a minus sign is used in in either form, @emph{n} is taken as the
++count to go back from the end rather than as a absolute history
++number.
++
++@end table
++
++@ifset FINISHED
++Use these commands to manage the @value{DBGN} command
++history facility.
++
++@table @code
++@cindex history substitution
++@cindex history file
++@kindex set history filename
++@kindex GDBHISTFILE
++@item set history filename @var{fname}
++Set the name of the @BASH command history file to @var{fname}.
++This is the file where @BASH reads an initial command history
++list, and where it writes the command history from this session when it
++exits.  You can access this list through history expansion or through
++the history command editing characters listed below.  This file defaults
++to the value of the environment variable @code{GDBHISTFILE}, or to
++@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable
++is not set.
++
++@cindex history save
++@kindex set history save
++@item set history save
++@itemx set history save on
++Record command history in a file, whose name may be specified with the
++@code{set history filename} command.  By default, this option is disabled.
++
++@item set history save off
++Stop recording command history in a file.
++
++@cindex history size
++@kindex set history size
++@item set history size @var{size}
++Set the number of commands which @BASH keeps in its history list.
++This defaults to the value of the environment variable
++@code{HISTSIZE}, or to 256 if this variable is not set.
++@end table
++
++@cindex history expansion
++History expansion assigns special meaning to the character @kbd{!}.
++
++Since @kbd{!} is also the logical not operator in C, history expansion
++is off by default. If you decide to enable history expansion with the
++@code{set history expansion on} command, you may sometimes need to
++follow @kbd{!} (when it is used as logical not, in an expression) with
++a space or a tab to prevent it from being expanded.  The readline
++history facilities do not attempt substitution on the strings
++@kbd{!=} and @kbd{!(}, even when history expansion is enabled.
++
++The commands to control history expansion are:
++
++@table @code
++@kindex set history expansion
++@item set history expansion on
++@itemx set history expansion
++Enable history expansion.  History expansion is off by default.
++
++@item set history expansion off
++Disable history expansion.
++
++The readline code comes with more complete documentation of
++editing and history expansion features.  Users unfamiliar with @sc{gnu} Emacs
++or @code{vi} may wish to read it.
++
++@c @group
++@kindex show history
++@item show history
++@itemx show history filename
++@itemx show history save
++@itemx show history size
++@itemx show history expansion
++These commands display the state of the @BASH history parameters.
++@code{show history} by itself displays all four states.
++@c @end group
++@end table
++
++@table @code
++@kindex shows
++@item show commands
++Display the last ten commands in the command history.
++
++@item show commands @var{n}
++Print ten commands centered on command number @var{n}.
++
++@item show commands +
++Print ten commands just after the commands last printed.
++@end table
++@end ifset
++
++@node Front Ends
++@chapter Using @value{DBG} from a front-end user interface
++
++There are two front-ends available that can use @value{DBG} as a back-end
++debugger are @sc{gnu} Emacs and @value{DDD}.
++
++@menu
++* Emacs::      Using @value{DBG} from @sc{gnu} Emacs
++* DDD::        Using @value{DBG} from @value{DDD}
++@end menu
++
++
++@node Emacs
++@section Using @value{DBG} from @sc{gnu} Emacs
++
++@cindex Emacs
++@cindex @sc{gnu} Emacs
++A special interface allows you to use @sc{gnu} Emacs to view (and
++edit) the source files for the program you are debugging with
++@value{DBG}.
++
++To use this interface, use the command @kbd{M-x bashdb} in Emacs.
++Give the executable file you want to debug as an argument.  This
++command starts @value{DBG} as a subprocess of Emacs, with input and
++output through a newly created Emacs buffer.
++
++Using @value{DBG} under Emacs is just like using @value{DBG}
++normally except for two things:
++
++@itemize @bullet
++@item
++All ``terminal'' input and output goes through the Emacs buffer.
++@end itemize
++
++This applies both to @value{DBG} commands and their output, and to the input
++and output done by the program you are debugging.
++
++This is useful because it means that you can copy the text of previous
++commands and input them again; you can even use parts of the output
++in this way.
++
++All the facilities of Emacs' Shell mode are available for interacting
++with your script.  In particular, you can send signals the usual
++way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a
++stop.
++
++@itemize @bullet
++@item
++@value{DBG} displays source code through Emacs.
++@end itemize
++
++Each time @value{DBG} displays a stack frame, Emacs automatically finds the
++source file for that frame and puts an arrow (@samp{=>}) at the
++left margin of the current line.  Emacs uses a separate buffer for
++source display, and splits the screen to show both your @value{DBG} session
++and the source.
++
++Explicit @value{DBG} @code{list} or search commands still produce output as
++usual, but you probably have no reason to use them from Emacs.
++
++@quotation
++@emph{Warning:} If the directory where your script resides is not your
++current directory, it can be easy to confuse Emacs about the location of
++the source files, in which case the auxiliary display buffer does not
++appear to show your source.  @value{DBG} can find programs by searching your
++environment's @code{PATH} variable, so the @value{DBG} input and output
++session proceeds normally; but Emacs does not get enough information
++back from @value{DBG} to locate the source files in this situation.  To
++avoid this problem, either start @value{DBG} mode from the directory where
++your script resides, or specify an absolute file name when prompted for the
++@kbd{M-x gdb} argument.
++
++A similar confusion can result if you use the @value{DBG} @code{file} command to
++switch to debugging a program in some other location, from an existing
++@value{DBG} buffer in Emacs.
++@end quotation
++
++By default, @kbd{M-x bashdb} calls the @code{bash --debugger}.  If you
++need to call @value{DBG} by a different name (for example, if you
++keep several configurations around, with different names) you can set
++the Emacs variable @code{gud-bashdb-command-name}; for example,
++
++@example
++(setq gud-bashdb-command-name "bash-debugger")
++@end example
++
++@noindent
++(preceded by @kbd{M-:} or @kbd{ESC :}, or typed in the @code{*scratch*} buffer, or
++in your @file{.emacs} file) makes Emacs call the program named
++``@code{bash-debugger}'' instead.
++
++In the @value{DBG} I/O buffer, you can use these special Emacs commands in
++addition to the standard Shell mode commands:
++
++@table @kbd
++@item C-h m
++Describe the features of Emacs' @value{DBG} Mode.
++
++@item M-s
++Execute to another source line, like the @value{DBG} @code{step} command; also
++update the display window to show the current file and location.
++
++@item M-n
++Execute to next source line in this function, skipping all function
++calls, like the @value{DBG} @code{next} command.  Then update the display window
++to show the current file and location.
++
++@item C-c C-f
++Execute until exit from the selected stack frame, like the @value{DBG}
++@code{finish} command.
++
++@item M-c
++Continue execution of your script, like the @value{DBG} @code{continue}
++command.
++
++@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-p}.
++
++@item M-u
++Go up the number of frames indicated by the numeric argument
++(@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}),
++like the @value{DBG} @code{up} command.
++
++@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-u}.
++
++@item M-d
++Go down the number of frames indicated by the numeric argument, like the
++@value{DBG} @code{down} command.
++
++@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-d}.
++
++@item C-x &
++Read the number where the cursor is positioned, and insert it at the end
++of the @value{DBG} I/O buffer.  For example, if you wish to disassemble code
++around an address that was displayed earlier, type @kbd{disassemble};
++then move the cursor to the address display, and pick up the
++argument for @code{disassemble} by typing @kbd{C-x &}.
++
++You can customize this further by defining elements of the list
++@code{gdb-print-command}; once it is defined, you can format or
++otherwise process numbers picked up by @kbd{C-x &} before they are
++inserted.  A numeric argument to @kbd{C-x &} indicates that you
++wish special formatting, and also acts as an index to pick an element of the
++list.  If the list element is a string, the number to be inserted is
++formatted using the Emacs function @code{format}; otherwise the number
++is passed as an argument to the corresponding list element.
++@end table
++
++In any source file, the Emacs command @kbd{C-x SPC} (@code{gud-break})
++tells @value{DBG} to set a breakpoint on the source line point is on.
++
++If you accidentally delete the source-display buffer, an easy way to get
++it back is to type the command @code{frame} in the @value{DBG} buffer, to
++request a frame display; when you run under Emacs, this recreates
++the source buffer if necessary to show you the context of the current
++frame.
++
++The source files displayed in Emacs are in ordinary Emacs buffers
++which are visiting the source files in the usual way.  You can edit
++the files with these buffers if you wish; but keep in mind that @value{DBG}
++communicates with Emacs in terms of line numbers.  If you add or
++delete lines from the text, the line numbers that @value{DBG} knows cease
++to correspond properly with the code.
++
++@node DDD
++@section Using @value{DBG} from @value{DDD}
++@cindex DDD
++
++@value{DBG} support is rather new in @value{DDD}. As a programming
++language, @value{DBG} is not feature rich: there are no record
++structures or hash tables (yet), no pointers, package variable scoping
++or methods. So much of the data display and visualization features of
++@value{DDD} are disabled.
++
++As with any scripting or interpreted language (e.g. Perl), one can't
++step by a single machine-language instruction. So the ddd Stepi/Nexti
++commands are disabled.
++
++Some @value{BASH} settings are essential for @value{DDD} to work
++correctly.  These settings with their correct values are:
++
++@example
++set annotate 1
++set prompt set prompt bashdb$_Dbg_less$_Dbg_greater$_Dbg_space
++@end example
++
++@value{DDD} sets these values automatically when invoking
++@value{BASH}; if these values are changed, there may be some
++malfunctions.
++
++Pay special attention when the prompt has extra angle brackets (a
++nested shell) or has any parenthesis (is in a subshell). Quitting may
++merely exit out of one of these nested (sub)shells rather than leave
++the program.
++
++@node BASH Debugger Bugs
++@chapter Reporting Bugs
++@cindex bugs
++@cindex reporting bugs
++
++Your bug reports play an essential role in making the BASH debugger reliable.
++
++Reporting a bug may help you by bringing a solution to your problem, or it
++may not.  But in any case the principal function of a bug report is to help
++the entire community by making the next version of @value{DBG} work better.  Bug
++reports are your contribution to the maintenance of @value{DBG}.
++
++In order for a bug report to serve its purpose, you must include the
++information that enables us to fix the bug.
++
++@menu
++* Bug Criteria::                Have you found a bug?
++* Bug Reporting::               How to report bugs
++@end menu
++
++@node Bug Criteria
++@section Have you found a bug?
++@cindex bug criteria
++
++If you are not sure whether you have found a bug, here are some guidelines:
++
++@itemize @bullet
++@cindex fatal signal
++@cindex debugger crash
++@cindex crash of debugger
++@item
++If the debugger gets a fatal signal, for any input whatever, that is a
++@value{DBG} bug.  Reliable debuggers never crash.
++
++@cindex error on valid input
++@item
++If @value{DBG} produces an error message for valid input, that is a
++bug.  (Note that if you're cross debugging, the problem may also be
++somewhere in the connection to the target.)
++
++@cindex invalid input
++@item
++If @value{DBG} does not produce an error message for invalid input,
++that is a bug.  However, you should note that your idea of
++``invalid input'' might be our idea of ``an extension'' or ``support
++for traditional practice''.
++
++@item
++If you are an experienced user of debugging tools, your suggestions
++for improvement of @value{DBG} are welcome in any case.
++@end itemize
++
++@node Bug Reporting
++@section How to report bugs
++@cindex bug reports
++@cindex BASH debugger bugs, reporting
++
++Submit bug reports for @value{DBG}.  Until better mechanism is set up
++the prefered method is to submit them directly using
++@email{mailto:rocky@@panix.com}. There are also a bug tracking system
++and, help, developer and open discussion forums which can be found via
++@uref{http://http://sourceforge.net/forum/?group_id=37260}.
++
++Although this code shares a lot with BASH, the debugger is of course
++not yet supported by the BASH team, so if there is a debugger problem 
++reporting it via bashbug or to @email{bug-bash@@gnu.org} or posted to
++the newsgroup @code{gnu.bash.bug} probably won't help, unless you are
++sure the bug resides in the vanilla bash code and and show that. 
++
++The fundamental principle of reporting bugs usefully is this:
++@strong{report all the facts}.  If you are not sure whether to state a
++fact or leave it out, state it!
++
++Often people omit facts because they think they know what causes the
++problem and assume that some details do not matter.  Thus, you might
++assume that the name of the variable you use in an example does not matter.
++Well, probably it does not, but one cannot be sure.  Perhaps the bug is a
++stray memory reference which happens to fetch from the location where that
++name is stored in memory; perhaps, if the name were different, the contents
++of that location would fool the debugger into doing the right thing despite
++the bug.  Play it safe and give a specific, complete example.  That is the
++easiest thing for you to do, and the most helpful.
++
++Keep in mind that the purpose of a bug report is to enable us to fix the
++bug.  It may be that the bug has been reported previously, but neither
++you nor we can know that unless your bug report is complete and
++self-contained.
++
++Sometimes people give a few sketchy facts and ask, ``Does this ring a
++bell?''  Those bug reports are useless, and we urge everyone to
++@emph{refuse to respond to them} except to chide the sender to report
++bugs properly.
++
++To enable us to fix the bug, you should include all these things:
++
++@itemize @bullet
++@item
++The version of @value{DBG}.  @value{DBG} announces it if you start
++with no arguments; you can also print it at any time using @code{version}
++command.
++
++Without this, we will not know whether there is any point in looking for
++the bug in the current version of @value{DBG}.
++
++@item
++The type of machine you are using, and the operating system name and
++version number.
++
++@item
++What compiler (and its version) was used to compile BASH---e.g.
++``@value{GCC}--3.1''.
++
++@item
++The command arguments you gave the compiler to compile your example and
++observe the bug.  For example, did you use @samp{-O}?  To guarantee
++you will not omit something important, list them all.  A copy of the
++Makefile (or the output from make) is sufficient.
++
++If we were to try to guess the arguments, we would probably guess wrong
++and then we might not encounter the bug.
++
++@item
++A complete input script, and all necessary source files, that will
++reproduce the bug.
++
++@item
++A description of what behavior you observe that you believe is
++incorrect.  For example, ``It gets a fatal signal.''
++
++Of course, if the bug is that @value{DBG} gets a fatal signal, then we
++will certainly notice it.  But if the bug is incorrect output, we might
++not notice unless it is glaringly wrong.  You might as well not give us
++a chance to make a mistake.
++
++Even if the problem you experience is a fatal signal, you should still
++say so explicitly.  Suppose something strange is going on, such as, your
++copy of @value{DBG} is out of synch, or you have encountered a bug in
++the C library on your system.  (This has happened!)  Your copy might
++crash and ours would not.  If you told us to expect a crash, then when
++ours fails to crash, we would know that the bug was not happening for
++us.  If you had not told us to expect a crash, then we would not be able
++to draw any conclusion from our observations.
++
++@item
++If you wish to suggest changes to the @value{DBG} source, send us context
++diffs.  If you even discuss something in the @value{DBG} source, refer to
++it by context, not by line number.
++
++The line numbers in our development sources will not match those in your
++sources.  Your line numbers would convey no useful information to us.
++
++@end itemize
++
++Here are some things that are not necessary:
++
++@itemize @bullet
++@item
++A description of the envelope of the bug.
++
++Often people who encounter a bug spend a lot of time investigating
++which changes to the input file will make the bug go away and which
++changes will not affect it.
++
++This is often time consuming and not very useful, because the way we
++will find the bug is by running a single example under the debugger
++with breakpoints, not by pure deduction from a series of examples.
++We recommend that you save your time for something else.
++
++Of course, if you can find a simpler example to report @emph{instead}
++of the original one, that is a convenience for us.  Errors in the
++output will be easier to spot, running under the debugger will take
++less time, and so on.
++
++However, simplification is not vital; if you do not want to do this,
++report the bug anyway and send us the entire test case you used.
++
++@item
++A patch for the bug.
++
++A patch for the bug does help us if it is a good one.  But do not omit
++the necessary information, such as the test case, on the assumption that
++a patch is all we need.  We might see problems with your patch and decide
++to fix the problem another way, or we might not understand it at all.
++
++Sometimes with a program as complicated as @value{DBG} it is very hard to
++construct an example that will make the program follow a certain path
++through the code.  If you do not send us the example, we will not be able
++to construct one, so we will not be able to verify that the bug is fixed.
++
++And if we cannot understand what bug you are trying to fix, or why your
++patch should be an improvement, we will not install it.  A test case will
++help us to understand.
++
++@item
++A guess about what the bug is or what it depends on.
++
++Such guesses are usually wrong.  Even we cannot guess right about such
++things without first using the debugger to find the facts.
++@end itemize
++
++@node History and Acknowledgments
++@chapter History and Acknowledgments
++
++The suggestion for a debugger for a Bourne-like shell came from the book
++``Learning the Korn Shell'', by Bill Rosenblatt Copyright (C) 1993 by
++O'Reilly and Associates, Inc. Others such as Cigy Cyriac, Chet Ramey,
++Rocky Bernstein, and Gary V. Vaughan expanded and improved on that.
++
++However Bourne-Shell debuggers rely on a signal mechanism
++(@code{SIGDEBUG}) to call a debugger routine. In the Korn shell as
++well as @sc{bash} in versions prior to 2.05, there was a fundamental
++flaw: the routine that you registered in the trap, got called
++@emph{after} the statement was executed. It takes little imagination
++to realize that this is a bit too late to find and correct errors,
++especially if the offending command happens to do serious damage like
++remove filesystems or reboot a server. As a horrible hack, these
++debuggers added one to the line number that was just executed on the
++wishful thinking that this would then be the line of next statement to
++execute. Sometimes this was correct, but it was too often wrong, such
++as in loops and conditionals, comments, or commands that are continued
++on the next line.
++
++Another failing of these debuggers was the inability to debug into
++functions or into sourced files, provide a stack trace, dynamically
++skip a statement to be run, unconditionally trace into a function, or
++stop when a subroutine or a sourced file completed. In truth, the crux
++of the problem lay in debugging support in BASH. Given that there was
++limited bash debugging support, it is not surprising that these
++debuggers could not do any of the things listed above and could debug
++only a single source file: lines could be listed only from a single
++text, breakpoints were set into the text which was in fact a copy of
++the script name prepended with debugger routines.
++
++In version 2.04 of BASH, Rocky Bernstein started hacking on BASH to
++add call-stack information, source file information, allow for
++debugging into functions and for reporting line numbers in functions
++as relative to the file rather than the beginning of a function whose
++origin line number was not accessible from BASH. He started changing
++the user commands in bashdb to be like other more-advanced debuggers,
++in particular @code{perl5db} and @code{gdb}. However he gave up on
++this project when realizing that stopping before a line was crucial. A
++patch for this was nontrivial and wildly changed
++semantics. Furthermore the chance of getting his other patches into
++BASH was was not going to happen in version 2.04.
++
++In version 2.05, the fundamental necessary change to the semantics of
++@code{SIGDEBUG} trap handling (suggested at least two years earlier)
++was made. Also, version 2.05 changed the line-number reporting in a
++function to be relative to the beginning of the file rather than the
++beginning of a function---sometimes. Rocky then picked up where he
++left off and this then became this debugger. A complete rewrite of the
++debugger, some of which started in 2.04 was undertaken. Debugger
++internals were changed to support multiple file names, save and
++restore the calling environment (such as variables @code{$1} and
++@code{$?}) and install debugger signal handlers. Work was also done on
++the BASH in conjunction with the debugger to save stack trace
++information, provide a means for stopping after a routine finished and
++so on. And a number of changes were made to BASH just to improve the
++accuracy of the line number reporting which is crucial in a debugger.
++
++This documentation was modified from the GNU Debugger (GDB) Reference
++manual.
++
++@quotation
++Additions to this section are particularly welcome.  If you or your
++friends (or enemies, to be evenhanded) have been unfairly omitted from
++this list, we would like to add your names!
++@end quotation
++
++The following have contributed directly or indrectly to bashdb:
++
++Rocky Bernstein (initial full-featured bashdb with stack tracing and
++multi-file support)
++
++Masatake YAMATO (help to merge Rocky's hack to the official bash source tree)
++
++Bill Rosenblatt (kshdb),
++Michael Loukides (kshdb),
++Cigy Cyriac (proto bashdb), 
++Chet Ramey (proto bashdb), 
++and
++Gary V. Vaughan (proto bashdb).
++
++Authors of per5ldb:
++
++Ray Lischner, 
++Johan Vromans, 
++and
++Ilya Zakharevich.
++
++Authors of GDB:
++
++Richard Stallman, 
++Andrew Cagney, 
++Jim Blandy,
++Jason Molenda,
++Stan Shebs,
++Fred Fish,
++Stu Grossman,
++John Gilmore,
++Jim Kingdon,
++and
++Randy Smith (to name just a few).
++
++Authors of GUD:
++
++Eric S. Raymond.
++
++@c The readline documentation is distributed with the readline code
++@c and consists of the two following files:
++@c     rluser.texinfo
++@c     inc-hist.texinfo
++@c Use -I with makeinfo to point to the appropriate directory,
++@c environment var TEXINPUTS with TeX.
++@c @include rluser.texinfo
++@c @include hsuser.texinfo
++
++
++@node Formatting Documentation
++@appendix Formatting Documentation
++
++@ifset FINISHED
++@cindex @value{DBG} reference card
++@cindex reference card
++The @value{DBG} 4 release includes an already-formatted reference card, ready
++for printing with PostScript or Ghostscript, in the @file{gdb}
++subdirectory of the main source directory@footnote{In
++@file{gdb-@value{BASHRELEASE}/gdb/refcard.ps} of the version @value{BASHRELEASE}
++release.}.  If you can use PostScript or Ghostscript with your printer,
++you can print the reference card immediately with @file{refcard.ps}.
++
++The release also includes the source for the reference card.  You
++can format it, using @TeX{}, by typing:
++
++@example
++make refcard.dvi
++@end example
++
++The @value{DBG} reference card is designed to print in @dfn{landscape}
++mode on US ``letter'' size paper;
++that is, on a sheet 11 inches wide by 8.5 inches
++high.  You will need to specify this form of printing as an option to
++your @sc{dvi} output program.
++
++@cindex documentation
++
++All the documentation for @value{DBG} comes as part of the machine-readable
++distribution.  The documentation is written in Texinfo format, which is
++a documentation system that uses a single source file to produce both
++on-line information and a printed manual.  You can use one of the Info
++formatting commands to create the on-line version of the documentation
++and @TeX{} (or @code{texi2roff}) to typeset the printed version.
++
++@value{DBG} includes an already formatted copy of the on-line Info
++version of this manual in the @file{gdb} subdirectory.  The main Info
++file is @file{gdb-@value{BASHRELEASE}/gdb/gdb.info}, and it refers to
++subordinate files matching @samp{gdb.info*} in the same directory.  If
++necessary, you can print out these files, or read them with any editor;
++but they are easier to read using the @code{info} subsystem in @sc{gnu}
++Emacs or the standalone @code{info} program, available as part of the
++@sc{gnu} Texinfo distribution.
++
++If you want to format these Info files yourself, you need one of the
++Info formatting programs, such as @code{texinfo-format-buffer} or
++@code{makeinfo}.
++
++If you have @code{makeinfo} installed, and are in the top level
++@value{DBG} source directory (@file{gdb-@value{BASHRELEASE}}, in the case of
++version @value{BASHRELEASE}), you can make the Info file by typing:
++
++@example
++cd gdb
++make gdb.info
++@end example
++
++If you want to typeset and print copies of this manual, you need @TeX{},
++a program to print its @sc{dvi} output files, and @file{texinfo.tex}, the
++Texinfo definitions file.
++
++@TeX{} is a typesetting program; it does not print files directly, but
++produces output files called @sc{dvi} files.  To print a typeset
++document, you need a program to print @sc{dvi} files.  If your system
++has @TeX{} installed, chances are it has such a program.  The precise
++command to use depends on your system; @kbd{lpr -d} is common; another
++(for PostScript devices) is @kbd{dvips}.  The @sc{dvi} print command may
++require a file name without any extension or a @samp{.dvi} extension.
++
++@TeX{} also requires a macro definitions file called
++@file{texinfo.tex}.  This file tells @TeX{} how to typeset a document
++written in Texinfo format.  On its own, @TeX{} cannot either read or
++typeset a Texinfo file.  @file{texinfo.tex} is distributed with GDB
++and is located in the @file{gdb-@var{version-number}/texinfo}
++directory.
++
++If you have @TeX{} and a @sc{dvi} printer program installed, you can
++typeset and print this manual.  First switch to the the @file{gdb}
++subdirectory of the main source directory (for example, to
++@file{gdb-@value{BASHRELEASE}/gdb}) and type:
++
++@example
++make gdb.dvi
++@end example
++
++Then give @file{gdb.dvi} to your @sc{dvi} printing program.
++@end ifset 
++
++@node Installing bashdb
++@appendix Installing @value{DBG}
++@cindex configuring @value{DBG}
++@cindex installation
++
++@ifset FINISHED
++@value{DBG} comes with a @code{configure} script that automates the process
++of preparing @value{DBG} for installation; you can then use @code{make} to
++build the @code{gdb} program.
++@iftex
++@c irrelevant in info file; it's as current as the code it lives with.
++@footnote{If you have a more recent version of @value{DBG} than @value{BASHRELEASE},
++look at the @file{README} file in the sources; we may have improved the
++installation procedures since publishing this manual.}
++@end iftex
++
++The @value{DBG} distribution includes all the source code you need for
++@value{DBG} in a single directory, whose name is usually composed by
++appending the version number to @samp{gdb}.
++
++For example, the @value{DBG} version @value{BASHRELEASE} distribution is in the
++@file{gdb-@value{BASHRELEASE}} directory.  That directory contains:
++
++@table @code
++@item gdb-@value{BASHRELEASE}/configure @r{(and supporting files)}
++script for configuring @value{DBG} and all its supporting libraries
++
++@item gdb-@value{BASHRELEASE}/gdb
++the source specific to @value{DBG} itself
++
++@item gdb-@value{BASHRELEASE}/bfd
++source for the Binary File Descriptor library
++
++@item gdb-@value{BASHRELEASE}/include
++@sc{gnu} include files
++
++@item gdb-@value{BASHRELEASE}/libiberty
++source for the @samp{-liberty} free software library
++
++@item gdb-@value{BASHRELEASE}/opcodes
++source for the library of opcode tables and disassemblers
++
++@item gdb-@value{BASHRELEASE}/readline
++source for the @sc{gnu} command-line interface
++
++@item gdb-@value{BASHRELEASE}/glob
++source for the @sc{gnu} filename pattern-matching subroutine
++
++@item gdb-@value{BASHRELEASE}/mmalloc
++source for the @sc{gnu} memory-mapped malloc package
++@end table
++
++The simplest way to configure and build @value{DBG} is to run @code{configure}
++from the @file{gdb-@var{version-number}} source directory, which in
++this example is the @file{gdb-@value{BASHRELEASE}} directory.
++
++First switch to the @file{gdb-@var{version-number}} source directory
++if you are not already in it; then run @code{configure}.  Pass the
++identifier for the platform on which @value{DBG} will run as an
++argument.
++
++For example:
++
++@example
++cd gdb-@value{BASHRELEASE}
++./configure @var{host}
++make
++@end example
++
++@noindent
++where @var{host} is an identifier such as @samp{sun4} or
++@samp{decstation}, that identifies the platform where @value{DBG} will run.
++(You can often leave off @var{host}; @code{configure} tries to guess the
++correct value by examining your system.)
++
++Running @samp{configure @var{host}} and then running @code{make} builds the
++@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
++libraries, then @code{gdb} itself.  The configured source files, and the
++binaries, are left in the corresponding source directories.
++
++@need 750
++@code{configure} is a Bourne-shell (@code{/bin/sh}) script; if your
++system does not recognize this automatically when you run a different
++shell, you may need to run @code{sh} on it explicitly:
++
++@example
++sh configure @var{host}
++@end example
++
++If you run @code{configure} from a directory that contains source
++directories for multiple libraries or programs, such as the
++@file{gdb-@value{BASHRELEASE}} source directory for version @value{BASHRELEASE}, @code{configure}
++creates configuration files for every directory level underneath (unless
++you tell it not to, with the @samp{--norecursion} option).
++
++You can run the @code{configure} script from any of the
++subordinate directories in the @value{DBG} distribution if you only want to
++configure that subdirectory, but be sure to specify a path to it.
++
++For example, with version @value{BASHRELEASE}, type the following to configure only
++the @code{bfd} subdirectory:
++
++@example
++@group
++cd gdb-@value{BASHRELEASE}/bfd
++../configure @var{host}
++@end group
++@end example
++
++You can install @code{@value{DBG}} anywhere; it has no hardwired paths.
++However, you should make sure that the shell on your path (named by
++the @samp{SHELL} environment variable) is publicly readable.  Remember
++that @value{DBG} uses the shell to start your script---some systems refuse to
++let @value{DBG} debug child processes whose programs are not readable.
++
++@menu
++* Separate Objdir::             Compiling @value{DBG} in another directory
++* Config Names::                Specifying names for hosts and targets
++* Configure Options::           Summary of options for configure
++@end menu
++
++@node Separate Objdir
++@section Compiling @value{DBG} in another directory
++
++If you want to run @value{DBG} versions for several host or target machines,
++you need a different @code{gdb} compiled for each combination of
++host and target.  @code{configure} is designed to make this easy by
++allowing you to generate each configuration in a separate subdirectory,
++rather than in the source directory.  If your @code{make} program
++handles the @samp{VPATH} feature (@sc{gnu} @code{make} does), running
++@code{make} in each of these directories builds the @code{gdb}
++program specified there.
++
++To build @code{gdb} in a separate directory, run @code{configure}
++with the @samp{--srcdir} option to specify where to find the source.
++(You also need to specify a path to find @code{configure}
++itself from your working directory.  If the path to @code{configure}
++would be the same as the argument to @samp{--srcdir}, you can leave out
++the @samp{--srcdir} option; it is assumed.)
++
++For example, with version @value{BASHRELEASE}, you can build @value{DBG} in a
++separate directory for a Sun 4 like this:
++
++@example
++@group
++cd gdb-@value{BASHRELEASE}
++mkdir ../gdb-sun4
++cd ../gdb-sun4
++../gdb-@value{BASHRELEASE}/configure sun4
++make
++@end group
++@end example
++
++When @code{configure} builds a configuration using a remote source
++directory, it creates a tree for the binaries with the same structure
++(and using the same names) as the tree under the source directory.  In
++the example, you'd find the Sun 4 library @file{libiberty.a} in the
++directory @file{gdb-sun4/libiberty}, and @value{DBG} itself in
++@file{gdb-sun4/gdb}.
++
++One popular reason to build several @value{DBG} configurations in separate
++directories is to configure @value{DBG} for cross-compiling (where
++@value{DBG} runs on one machine---the @dfn{host}---while debugging
++programs that run on another machine---the @dfn{target}).
++You specify a cross-debugging target by
++giving the @samp{--target=@var{target}} option to @code{configure}.
++
++When you run @code{make} to build a program or library, you must run
++it in a configured directory---whatever directory you were in when you
++called @code{configure} (or one of its subdirectories).
++
++The @code{Makefile} that @code{configure} generates in each source
++directory also runs recursively.  If you type @code{make} in a source
++directory such as @file{gdb-@value{BASHRELEASE}} (or in a separate configured
++directory configured with @samp{--srcdir=@var{dirname}/gdb-@value{BASHRELEASE}}), you
++will build all the required libraries, and then build GDB.
++
++When you have multiple hosts or targets configured in separate
++directories, you can run @code{make} on them in parallel (for example,
++if they are NFS-mounted on each of the hosts); they will not interfere
++with each other.
++
++@node Config Names
++@section Specifying names for hosts and targets
++
++The specifications used for hosts and targets in the @code{configure}
++script are based on a three-part naming scheme, but some short predefined
++aliases are also supported.  The full naming scheme encodes three pieces
++of information in the following pattern:
++
++@example
++@var{architecture}-@var{vendor}-@var{os}
++@end example
++
++For example, you can use the alias @code{sun4} as a @var{host} argument,
++or as the value for @var{target} in a @code{--target=@var{target}}
++option.  The equivalent full name is @samp{sparc-sun-sunos4}.
++
++The @code{configure} script accompanying @value{DBG} does not provide
++any query facility to list all supported host and target names or
++aliases.  @code{configure} calls the Bourne shell script
++@code{config.sub} to map abbreviations to full names; you can read the
++script, if you wish, or you can use it to test your guesses on
++abbreviations---for example:
++
++@smallexample
++% sh config.sub i386-linux
++i386-pc-linux-gnu
++% sh config.sub alpha-linux
++alpha-unknown-linux-gnu
++% sh config.sub hp9k700
++hppa1.1-hp-hpux
++% sh config.sub sun4
++sparc-sun-sunos4.1.1
++% sh config.sub sun3
++m68k-sun-sunos4.1.1
++% sh config.sub i986v
++Invalid configuration `i986v': machine `i986v' not recognized
++@end smallexample
++
++@noindent
++@code{config.sub} is also distributed in the @value{DBG} source
++directory (@file{gdb-@value{BASHRELEASE}}, for version @value{BASHRELEASE}).
++
++@node Configure Options
++@section @code{configure} options
++
++Here is a summary of the @code{configure} options and arguments that
++are most often useful for building @value{DBG}.  @code{configure} also has
++several other options not listed here.  @inforef{What Configure
++Does,,configure.info}, for a full explanation of @code{configure}.
++
++@example
++configure @r{[}--help@r{]}
++          @r{[}--prefix=@var{dir}@r{]}
++          @r{[}--exec-prefix=@var{dir}@r{]}
++          @r{[}--srcdir=@var{dirname}@r{]}
++          @r{[}--norecursion@r{]} @r{[}--rm@r{]}
++          @r{[}--target=@var{target}@r{]}
++          @var{host}
++@end example
++
++@noindent
++You may introduce options with a single @samp{-} rather than
++@samp{--} if you prefer; but you may abbreviate option names if you use
++@samp{--}.
++
++@table @code
++@item --help
++Display a quick summary of how to invoke @code{configure}.
++
++@item --prefix=@var{dir}
++Configure the source to install programs and files under directory
++@file{@var{dir}}.
++
++@item --exec-prefix=@var{dir}
++Configure the source to install programs under directory
++@file{@var{dir}}.
++
++@c avoid splitting the warning from the explanation:
++@need 2000
++@item --srcdir=@var{dirname}
++@strong{Warning: using this option requires @sc{gnu} @code{make}, or another
++@code{make} that implements the @code{VPATH} feature.}@*
++Use this option to make configurations in directories separate from the
++@value{DBG} source directories.  Among other things, you can use this to
++build (or maintain) several configurations simultaneously, in separate
++directories.  @code{configure} writes configuration specific files in
++the current directory, but arranges for them to use the source in the
++directory @var{dirname}.  @code{configure} creates directories under
++the working directory in parallel to the source directories below
++@var{dirname}.
++
++@item --norecursion
++Configure only the directory level where @code{configure} is executed; do not
++propagate configuration to subdirectories.
++
++@item --target=@var{target}
++Configure @value{DBG} for cross-debugging programs running on the specified
++@var{target}.  Without this option, @value{DBG} is configured to debug
++programs that run on the same machine (@var{host}) as @value{DBG} itself.
++
++There is no convenient way to generate a list of all available targets.
++
++@item @var{host} @dots{}
++Configure @value{DBG} to run on the specified @var{host}.
++
++There is no convenient way to generate a list of all available hosts.
++@end table
++
++There are many other options available as well, but they are generally
++needed for special purposes only.
++@end ifset
++
++@include gpl.texi
++
++@include fdl.texi
++
++@node Function Index
++@unnumbered Function Index
++@printindex fn
++
++@node Command Index
++@unnumbered Command Index
++@printindex ky
++
++@node Variable Index
++@unnumbered Variable Index
++@printindex vr
++
++@node General Index
++@unnumbered General Index
++@printindex cp
++
++@tex
++% I think something like @colophon should be in texinfo.  In the
++% meantime:
++\long\def\colophon{\hbox to0pt{}\vfill
++\centerline{The body of this manual is set in}
++\centerline{\fontname\tenrm,}
++\centerline{with headings in {\bf\fontname\tenbf}}
++\centerline{and examples in {\tt\fontname\tentt}.}
++\centerline{{\it\fontname\tenit\/},}
++\centerline{{\bf\fontname\tenbf}, and}
++\centerline{{\sl\fontname\tensl\/}}
++\centerline{are used for emphasis.}\vfill}
++\page\colophon
++% Blame: doc@cygnus.com, 1991.
++@end tex
++
++@bye
+diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/bashdb.texi~ cvs/debugger/doc/bashdb.texi~
+--- bash-2.05b/debugger/doc/bashdb.texi~	1970-01-01 01:00:00.000000000 +0100
++++ cvs/debugger/doc/bashdb.texi~	2003-08-30 07:31:23.000000000 +0200
+@@ -0,0 +1,3752 @@
++\input texinfo      @c -*-texinfo-*-
++@c Copyright 2002, 2003
++@c Rocky Bernstein for the Free Software Foundation
++@c
++@c TODO: 
++@c   - add examples for commands
++@c   - clean up/improve sample session
++@c   - help text is inaccurate and formatted too much to right.
++@c 
++
++@c Sets version and release names and dates. Frees us from changing
++@c this file when a new release comes along.
++
++@c %**start of header
++@c makeinfo ignores cmds prev to setfilename, so its arg cannot make use
++@c of @set vars.  However, you can override filename with makeinfo -o.
++@setfilename bashdb.info
++@c 
++@c Name of Bash program.  Used in running text.
++@set BASH @acronym{BASH}
++
++@c
++@c Name of debugger program.  Used also for prompt string.
++@set DBG the @value{BASH} debugger
++@set dBGP The @value{BASH} debugger
++@set DDD @acronym{DDD}
++
++@settitle @value{BASH} Debugger
++@setchapternewpage odd
++@setcontentsaftertitlepage
++
++@c %**end of header
++
++@include version.texi
++
++@c A simple macro for optional variables.
++@macro ovar{varname}
++@r{[}@var{\varname\}@r{]}
++@end macro
++
++@macro DDD {}
++@acronym{DDD}
++@end macro
++
++@macro BASH {}
++@acronym{@value{BASH}}
++@end macro
++
++@macro DBG {}
++@value{DBG}
++@end macro
++
++@iftex
++@c @smallbook
++@c @cropmarks
++@end iftex
++
++@finalout
++
++@c readline appendices use @vindex, @findex and @ftable,
++@c annotate.texi and gdbmi use @findex.
++@c @syncodeindex vr cp
++@c @syncodeindex fn cp
++
++@c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER.
++
++@c This is a dir.info fragment to support semi-automated addition of
++@c manuals to an info tree.
++@dircategory Programming & development tools.
++@direntry
++* @value{DBG}: (@value{DBG}).                     The @sc{bash} debugger.
++@end direntry
++
++@ifinfo
++This file documents the @sc{bash} debugger @value{BASH}.
++
++
++This is the @value{EDITION} Edition, @value{UPDATED-MONTH},
++of @cite{Debugging with BASHDB: the @sc{gnu} Source-Level Debugger}
++for REBASH
++
++Copyright (C) 2002,2003 Rocky Bernstein for the Free Software Foundation.
++
++Permission is granted to copy, distribute and/or modify this document
++under the terms of the GNU Free Documentation License, Version 1.1 or
++@ifset DEBIANHASBECOMEREASONABLE
++@c From Matthias Klose <doko@cs.tu-berlin.de> a Debian maintainer on 
++@c Sat, 23 Aug 2003 14:24:44 +0200
++@c
++@c I personally see the invariant sections as the thing in the
++@c GFDL, which hinders me in uploading the package to the archives.
++@c I don't have any problem, if some other Debian developer makes a
++@c bashdb package built from separate sources.
++@c
++@c I am aware that Debian ships other packages containing documentation
++@c covered by the GFDL (and one of them for which I do the packaging as
++@c well), but I won't add a new package, which I maintain. So before an
++@c upload of a bashdb package built from the bash sources either
++@c
++@c
++@c - Debian has a position on the GFDL, which allows inclusion
++@c
++@c - the bashdb manual does not have invariant sections, or is
++@c  relicensed, or dual licensed.
++any later version published by the Free Software Foundation; with the
++Invariant Sections being ``Free Software'' and ``Free Software Needs
++Free Documentation'', with the Front-Cover Texts being ``A GNU
++Manual,'' and with the Back-Cover Texts as in (a) below.
++
++(a) The Free Software Foundation's Back-Cover Text is: ``You have
++freedom to copy and modify this GNU Manual, like GNU software.  Copies
++published by the Free Software Foundation raise funds for GNU
++development.''
++@else
++any later version published by the Free Software Foundation.
++@end ifset
++@end ifinfo
++
++@titlepage
++@title Debugging with BASHDB
++@sp 1
++@subtitle @value{EDITION} Edition, for BASH
++@subtitle @value{UPDATED-MONTH}
++@author Rocky Bernstein
++@page
++@tex
++{\parskip=0pt
++\hfill (Send bugs and comments on bashdb to bug-bashdb\@sourceforge.net.)\par
++\hfill {\it Debugging with BASH}\par
++\hfill \TeX{}info \texinfoversion\par
++}
++@end tex
++
++@vskip 0pt plus 1filll
++Copyright @copyright{} 2002,2003 Rocky Bernstein for the Free Software
++Foundation.
++
++Permission is granted to copy, distribute and/or modify this document
++under the terms of the GNU Free Documentation License, Version 1.1 or
++@ifset DEBIANHASBECOMEREASONABLE
++@c From Matthias Klose <doko@cs.tu-berlin.de> a Debian maintainer on 
++@c Sat, 23 Aug 2003 14:24:44 +0200
++@c
++@c I personally see the invariant sections as the thing in the
++@c GFDL, which hinders me in uploading the package to the archives.
++@c I don't have any problem, if some other Debian developer makes a
++@c bashdb package built from separate sources.
++@c
++@c I am aware that Debian ships other packages containing documentation
++@c covered by the GFDL (and one of them for which I do the packaging as
++@c well), but I won't add a new package, which I maintain. So before an
++@c upload of a bashdb package built from the bash sources either
++@c
++@c
++@c - Debian has a position on the GFDL, which allows inclusion
++@c
++@c - the bashdb manual does not have invariant sections, or is
++@c  relicensed, or dual licensed.
++any later version published by the Free Software Foundation; with the
++Invariant Sections being ``Free Software'' and ``Free Software Needs
++Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
++and with the Back-Cover Texts as in (a) below.
++
++(a) The Free Software Foundation's Back-Cover Text is: ``You have
++freedom to copy and modify this GNU Manual, like GNU software.  Copies
++published by the Free Software Foundation raise funds for GNU
++development.''
++else
++any later version published by the Free Software Foundation.
++@end ifset
++@end titlepage
++@page
++
++@ifnottex
++@node Top, Summary, (dir), (dir)
++
++@top Debugging with @DBG
++
++This file describes @value{DBG}, the @sc{bash} symbolic debugger.
++
++This is the @value{EDITION} Edition, @value{UPDATED-MONTH}, for REBASH.
++
++Copyright (C) 2002,2003 Rocky Bernstein
++
++@menu
++* Summary::                     Overview of Debugger with a sample session
++
++* Invocation::                  Getting in and out
++* Running::                     Script setup inside the BASH debugger
++* Debugger Command Reference::  BASH debugger command reference
++
++* Front Ends::                  Using @DBG from a front-end user interface
++
++* BASH Debugger Bugs::          Reporting bugs
++* History and Acknowledgments:: History and Acknowledgments
++
++Appendices
++* Formatting Documentation::    How to format and print @DBG documentation
++
++* Installing bashdb::           Installing bashdb
++* Copying::			GNU General Public License says
++                                how you can copy and share bashdb
++* GNU Free Documentation License::  The license for this documentation
++
++Indexes (nodes containing large menus)
++* Function Index::            An item for each function name.
++* Command Index::             An item for each command name.
++* Variable Index::            An item for each documented variable.
++* General Index::             An item for each concept.
++@end menu
++
++@end ifnottex
++
++@contents
++
++@node Summary
++@chapter Summary of the BASH Debugger
++
++The purpose of a debugger such as @DBG is to allow you to see what is
++going on ``inside'' a bash script while it executes.
++
++@DBG can do four main kinds of things (plus other things in support of
++these) to help you catch bugs in the act:
++
++@itemize @bullet
++@item
++Start your script, specifying anything that might affect its behavior.
++
++@item
++Make your script stop on specified conditions.
++
++@item
++Examine what has happened, when your script has stopped.
++
++@item
++Change things in your script, so you can experiment with correcting the
++effects of one bug and go on to learn about another.
++@end itemize
++
++Although you can use the BASH debugger to debug scripts written in
++BASH, it can also be used just as a front-end for learning more
++about programming in BASH. As an additional aid, the debugger can
++be used within the context of an existing script with its functions
++and variables that have already been initialized; fragments of the
++existing can be experimented with by entering them inside the debugger.
++
++@menu
++* Sample Session::              A Sample BASH Debugger session
++* Free Software::               Freely redistributable software
++@end menu
++
++@node Sample Session
++@section A Sample BASH Debugger Session
++
++You can use this manual at your leisure to read all about @value{DBG}.
++However, a handful of commands are enough to get started using the
++debugger.  This chapter illustrates those commands.
++
++@iftex
++In this sample session, we emphasize user input like this: @b{input},
++to make it easier to pick out from the surrounding output.
++@end iftex
++
++Below we will debug a script that contains a function to compute the
++factorial of a number: fact(0) is 1 and fact(n) is n*fact(n-1).
++
++@smallexample
++$ @b{bashdb -L .  fact.sh}
++Bourne-Again Shell Debugger, release bash-@value{BASHRELEASE}
++Copyright 2002,2003 Rocky Bernstein
++This is free software, covered by the GNU General Public License, and you are
++welcome to change it and/or distribute copies of it under certain conditions.
++
++(fact.sh:9):
++9:	echo fact 0 is: `fact 0`
++bashdb<0> @b{-}
++  1:    #!/usr/local/bin/bash
++  2:    fact() @{
++  3:    ((n==0)) && echo 1 && return
++  4:    ((nm1=n-1))
++  5:    ((result=n*`fact $nm1`))
++  6:    return $result
++  7:    @}
++  8:    
++  9:==> echo fact 0 is: `fact 0`
++bashdb<1> @b{l}
++ 10:   echo fact 3 is: $(fact 3)
++@end smallexample 
++
++@noindent
++
++The command invocation uses the option ``-L .'' Here we assume that
++the @command{bashdb} script and the debugger files are in the same
++location. If you are running from the source code, this will be the
++case. However if bashdb has been installed this probably won't be true
++and here you probably don't need to use ``-L .'' Instead you would
++type simply @code{bashdb fact.sh}.
++
++The first debugger command we gave @kbd{-}, we listed a window of
++lines @emph{before} where we were executing. Because the window, 10
++lines, is larger than the number of lines to the top of the file we
++printed only 9 lines here. The next command list starting from the
++current line and again wants to print 10 lines but because there are
++only one remaining line, that is what is printed.
++
++@smallexample
++bashdb<2> @b{step}
++(fact.sh:9):
++9:	echo fact 0 is: `fact 0`
++bashdb<3> @b{@key{RET}}
++2:	fact() @{
++bashdb<4> @b{@key{RET}}
++3:	((n==0)) && echo 1 && return
++bashdb<5> @b{print $n}
++
++@end smallexample
++
++Ooops... The variable @kbd{n} isn't initialized. 
++
++The first @kbd{step} command steps the script one instruction. It may
++seem odd that the line printed is exactly the same one as before. What
++has happened though is that we've ``stepped'' into the subshell needed
++to run @kbd{`fact 0`}; we haven't however started running anything
++inside that subshell yet though---the function call.
++
++The first @kbd{step} command steps the script one instruction; it
++didn't advance the line number at all. That is because we were
++stopping before the command substitution or backtick is to take
++place. The second command we entered was just hitting the return key;
++bashdb remembers that you entered @code{step} previously, so it runs
++the step rather than @kbd{next}, the other alternative when you hit
++@key{RET}. Step one more instruction and we are just before running
++the first statement of the function.
++
++Next, we print the value of the variable @kbd{n}. Notice we need to add
++a preceding dollar simple to get the substitution or value of n. As we
++will see later, if the @kbd{pe} command were used this would not be
++necessary. 
++
++We now modify the file to add an assignment to local variable @kbd{n} and
++restart.
++
++@smallexample
++bashdb<6> @b{restart}
++Restarting with: /usr/local/bin/bashdb -L . fact.sh
++(fact.sh:10):
++10:	echo fact 0 is: `fact 0`
++bashdb<0> @b{list 1}
++  1:    #!/usr/local/bin/bash
++  2:    fact() @{
++  3:    local -i n=$@{1:0@}
++  4:    ((n==0)) && echo 1 && return
++  5:    ((nm1=n-1))
++  6:    ((result=n*`fact $nm1`))
++  7:    return $result
++  8:    @}
++  9:    
++ 10:==> echo fact 0 is: `fact 0`
++bashdb<1> @b{s 3}
++(fact.sh:3):
++3:	local -i n=$@{1:0@}
++bashdb<2> @b{step}
++(fact.sh:4):
++4:	((n==0)) && echo 1 && return
++bashdb<3> @b{print $n}
++print $n
++0
++@end smallexample 
++
++@noindent
++This time we use the @code{list} debugger command to list the lines in
++the file. From before we know it takes three @code{steps} commands
++before we get into the fact() function, so we add a count onto the
++@code{step} command. Notice we abbreviate @code{step} with @code{s};
++we could have done likewise and abbreviated @code{list} with @code{l}.
++
++@smallexample
++bashdb<4> @b{@key{RET}}
++(fact.sh:4):
++4:	((n==0)) && echo 1 && return
++echo 1
++bashdb<5> @b{@key{RET}}
++(fact.sh:4): 
++4:	((n==0)) && echo 1 && return
++return
++@end smallexample 
++
++@noindent
++Again we just use @key{RET} to repeat the last @code{step}
++commands. And again the fact that we are staying on the same line 4
++means that the next condition in the line is about to be
++executed. Notice that we see the command (@code{echo 1} or
++@code{return}) listed when we stay on the same line which has multiple
++stopping points in it. Given the information above, we know that the
++value echo'ed on return will be 1.
++
++@smallexample
++bashdb<6> @b{@key{RET}}
++fact 0 is: 1
++(fact.sh:12): 
++12:	echo fact 3 is: $(fact 3)
++bashdb<7> @b{break 5}
++Breakpoint 1 set in file fact.sh, line 5.
++bashdb<8> @b{continue}
++@end smallexample 
++
++@noindent
++We saw that we could step with a count into the function
++fact(). However above took another approach: we set a stopping point or
++``breakpoint'' at line 5 to get us a little ways into the fact()
++subroutine. Just before line 5 is to executed, we will get back into
++the debugger. The @code{continue} command just resumes execution until
++the next stopping point which has been set up in some way.
++
++@smallexample
++(fact.sh:5):
++5:      ((nm1=n-1))
++Breakpoint 1 hit(1 times).
++bashdb<8> @b{x n-1}
++2
++bashdb<9> @b{s}
++(fact.sh:5):
++6:     ((result=n*`fact $nm1`))
++bashdb<10> @b{c}
++fact.sh: line 6: ((: result=n*: syntax error: operand expected (error token is "*")
++bashdb<7> @b{R}
++Restarting with: bash --debugger fact.sh 
++11:	echo fact 0 is: `fact 0`
++bashdb<0> @b{l fact}
++ 2:    fact () 
++ 3:    @{ 
++ 4:       local -i n=$@{1:0@};
++ 5:       (( "n==0" )) && echo 1 && return;
++ 6:       (( nm1=n-1 ));
++ 7:       ((fact_nm1=`fact $nm1`))
++ 8:       (( "result=n*fact_nm1" ));
++ 9:       echo $result
++10:    @}
++@end smallexample
++
++@noindent
++In addition to listing by line numbers, we can also list giving a
++function name. Below, instead of setting a breakpoint at line 5 and
++running ``continue'' as we did above, we try something slightly shorter
++and slightly different. We give the line number on the ``continue''
++statement. This is a little different in that a one-time break is made
++on line 5. Once that statement is reached the breakpoint is removed. 
++
++@smallexample
++bashdb<1> @b{continue 5}
++One-time breakpoint 1 set in file fact.sh, line 5.
++fact 0 is: 1
++(fact.sh:5):
++5:	((nm1=n-1))
++bashdb<2> @b{s}
++6:	((fact_nm1=`fact $nm1`))
++bashdb<2> @b{s}
++2:	fact() @{
++bashdb<3> @b{T}
++->0 in file `fact.sh' at line 2
++##1 fact("3") called from file `fact.sh' at line 12
++##2 source("fact.sh") called from file `/usr/local/bin/bashdb' at line 154
++##3 main("fact.sh") called from file `/usr/local/bin/bashdb' at line 0
++bashdb<4> @b{c}
++fact 3 is: 6
++Debugged program terminated normally. Use q to quit or R to restart.
++@end smallexample
++
++@noindent
++When we stop at line 5 above, we have already run fact(0) and output
++the correct results. The output from the program ``fact 0 is: 1'' is
++intermixed with the debugger output. The @code{T} command above
++requests call stack output and this confirms that we are not in the
++fact(0) call but in the fact(3) call. There are 4 lines listed in the
++stack trace even though there is just one call from the main
++program. The top line of the trace doesn't really represent a call,
++it's just where we currently are in the program. That last line is an
++artifact of invoking bash from the bashdb script rather than running
++@code{bash --debugger}.
++
++The last message in the output above @samp{Debugged program exited
++normally.} is from @value{DBG}; it indicates script has finished
++executing.  We can end our @value{DDGP} session with the @value{GDBP}
++@code{quit} command.
++
++Above we did our debugging session on the command line. If you are a
++GNU Emacs user, you can do your debugging inside that. Also there is
++a(nother) GUI interface called DDD that supports @value{DBG}.
++
++@node Free Software
++@unnumberedsec Free software
++
++@DBG is @dfn{free software}, protected by the @sc{gnu}
++General Public License
++(GPL).  The GPL gives you the freedom to copy or adapt a licensed
++program---but every person getting a copy also gets with it the
++freedom to modify that copy (which means that they must get access to
++the source code), and the freedom to distribute further copies.
++Typical software companies use copyrights to limit your freedoms; the
++Free Software Foundation uses the GPL to preserve these freedoms.
++
++Fundamentally, the General Public License is a license which says that
++you have these freedoms and that you cannot take these freedoms away
++from anyone else.
++
++@unnumberedsec Free Software Needs Free Documentation
++
++The biggest deficiency in the free software community today is not in
++the software---it is the lack of good free documentation that we can
++include with the free software.  Many of our most important
++programs do not come with free reference manuals and free introductory
++texts.  Documentation is an essential part of any software package;
++when an important free software package does not come with a free
++manual and a free tutorial, that is a major gap.  We have many such
++gaps today.
++
++Consider Perl, for instance.  The tutorial manuals that people
++normally use are non-free.  How did this come about?  Because the
++authors of those manuals published them with restrictive terms---no
++copying, no modification, source files not available---which exclude
++them from the free software world.
++
++That wasn't the first time this sort of thing happened, and it was far
++from the last.  Many times we have heard a GNU user eagerly describe a
++manual that he is writing, his intended contribution to the community,
++only to learn that he had ruined everything by signing a publication
++contract to make it non-free.
++
++Free documentation, like free software, is a matter of freedom, not
++price.  The problem with the non-free manual is not that publishers
++charge a price for printed copies---that in itself is fine.  (The Free
++Software Foundation sells printed copies of manuals, too.)  The
++problem is the restrictions on the use of the manual.  Free manuals
++are available in source code form, and give you permission to copy and
++modify.  Non-free manuals do not allow this.
++
++The criteria of freedom for a free manual are roughly the same as for
++free software.  Redistribution (including the normal kinds of
++commercial redistribution) must be permitted, so that the manual can
++accompany every copy of the program, both on-line and on paper.
++
++Permission for modification of the technical content is crucial too.
++When people modify the software, adding or changing features, if they
++are conscientious they will change the manual too---so they can
++provide accurate and clear documentation for the modified program.  A
++manual that leaves you no choice but to write a new manual to document
++a changed version of the program is not really available to our
++community.
++
++Some kinds of limits on the way modification is handled are
++acceptable.  For example, requirements to preserve the original
++author's copyright notice, the distribution terms, or the list of
++authors, are ok.  It is also no problem to require modified versions
++to include notice that they were modified.  Even entire sections that
++may not be deleted or changed are acceptable, as long as they deal
++with nontechnical topics (like this one).  These kinds of restrictions
++are acceptable because they don't obstruct the community's normal use
++of the manual.
++
++However, it must be possible to modify all the @emph{technical}
++content of the manual, and then distribute the result in all the usual
++media, through all the usual channels.  Otherwise, the restrictions
++obstruct the use of the manual, it is not free, and we need another
++manual to replace it.
++
++Please spread the word about this issue.  Our community continues to
++lose manuals to proprietary publishing.  If we spread the word that
++free software needs free reference manuals and free tutorials, perhaps
++the next person who wants to contribute by writing documentation will
++realize, before it is too late, that only free manuals contribute to
++the free software community.
++
++If you are writing documentation, please insist on publishing it under
++the GNU Free Documentation License or another free documentation
++license.  Remember that this decision requires your approval---you
++don't have to let the publisher decide.  Some commercial publishers
++will use a free license if you insist, but they will not propose the
++option; it is up to you to raise the issue and say firmly that this is
++what you want.  If the publisher you are dealing with refuses, please
++try other publishers.  If you're not sure whether a proposed license
++is free, write to @email{licensing@@gnu.org}.
++
++You can encourage commercial publishers to sell more free, copylefted
++manuals and tutorials by buying them, and particularly by buying
++copies from the publishers that paid for their writing or for major
++improvements.  Meanwhile, try to avoid buying non-free documentation
++at all.  Check the distribution terms of a manual before you buy it,
++and insist that whoever seeks your business must respect your freedom.
++Check the history of the book, and try to reward the publishers that
++have paid or pay the authors to work on it.
++
++The Free Software Foundation maintains a list of free documentation
++published by other publishers, at
++@url{http://www.fsf.org/doc/other-free-books.html}.
++
++@node Invocation
++@chapter Getting in and out
++
++This chapter discusses how to start @value{DBG}, and how to get out of it.
++The essentials are:
++@itemize @bullet
++@item
++type @samp{bash --debugger @emph{script-name}} or @samp{bashdb
++@emph{script-name}} to start @value{DBG}.
++@item
++type @kbd{quit} or @kbd{C-d} inside the debugger to exit.
++@end itemize
++
++But also note there are two front-ends available as well. One can also
++enter the debugger inside emacs via the command @code{M-x bashdb}
++after loading Emacs' Grand Unified Debugger, @code{gud}. See
++@ref{Emacs,,Using the BASH debugger from @sc{gnu} Emacs}. And there is
++support in a @value{DDD} for bash.
++
++@menu
++* Starting the BASH debugger::    How to enter the BASH debugger
++* Quitting the BASH debugger::    How to leave the BASH debugger
++@end menu
++
++@node Starting the BASH debugger
++@section Starting the BASH debugger
++
++@emph{Note: it is important to use a debugger-enabled bash. You wil
++get an error message if the debugger is run under a version of BASH
++that does not have debugging support.}
++
++As mentioned above, one can enter @DBG via Emacs or
++DDD. However you don't have to use either of these. And these still
++need a way on their own to get things started.
++
++There are in fact two @emph{other} ways to start @value{DBG}.  The
++first way is to pass the @samp{--debugger} option to bash with the
++name of your script the scripts arguments following that, or with a
++command string (@code{-c}).
++
++@example
++bash --debugger @var{script} @var{script-arguments...}
++bash --debugger -c @var{command-string}...
++@end example
++
++This calls a debugger initialization script. It works much like a
++@BASH login profile which may set variables and define
++functions. But this shell profile is customized for debugging and as
++such arranges for itself to get called before each statement is
++executed. Although there are some problems at present in I/O
++redirection that the method described next doesn't have, it is
++expected that over time more features will be enabled in bash when the
++@samp{--debugger} option is in effect. By default, both debugging in
++Emacs via GUD (@ref{Emacs,,Using the BASH debugger under Emacs}) and
++debugging via @value{DDD} work via this method.
++
++The form @samp{bash --debugger -c ...} can be used to get into the
++debugger without having to give a script name to debug. Sometimes you
++may want to do this just to see how the debugger works: try some
++debugger commands or maybe get online help. If you run @code{ddd
++--bash} without giving a script name, it in fact uses this form.
++
++In order for the @samp{--debugger} option to work however, you must
++have the debugger scripts installed in a place where @DBG can
++find them. For this reason, in developing @value{DBG}, I use a second
++method more often; it doesn't require the bash debugger to be
++installed. This method uses another script called @code{bashdb} which
++after taking its own options takes the name of the script to debugged
++and the arguments to pass to that script.  Using this method, one
++would start the debugger like this:
++
++@example
++bash @var{path-to-bashdb}/bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
++@end example
++
++As with the first method, @code{bash} should be a debugger-enabled
++bash. If @code{bashdb} has the path to bash in it at the top (e.g. via
++@code{#!}), and @code{bashdb} can be found in your program-search
++path, then this might be equivalent to the above:
++
++@example
++bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
++@end example
++
++There are two or three disadvantages however of running a debugger
++this way. First @code{$0} will have the value @code{bashdb} rather
++than the script you are trying to run. For some scripts this may
++change the behavior of the debugged script. Second a traceback will
++contain additional lines showing the ``source''-ing of the debugged
++script from @code{bashdb}. And third, although this way works better
++than the first method, over time this way may come into disuse. 
++
++An option that you'll probably need to use if bashdb isn't installed
++but run out of the source code directory is @samp{-L} which specifies
++the directory that contains the debugger script files.
++
++You can further control how bashdb starts up by using command-line
++options. bashdb itself can remind you of the options available.
++
++@noindent
++Type
++
++@example
++bashdb -h
++@end example
++
++@noindent
++to display all available options and briefly describe their use.
++
++When the bash debugger is invoked either by the @code{bashdb}
++front-end script or @code{bash --debugging}, the first argument that
++does not have an associated option flag for @code{bashdb} or
++@code{bash} (as the case may be) is used as the name a the script file
++to be debugged, and any following options get passed the debugged
++script.
++
++Options for the @code{bashdb} front-end are shown in the
++following list.  
++
++@menu
++* Options for the bashdb script::   Options you can pass in starting bashdb
++@end menu
++
++@node Options for the bashdb script
++@subsection Command-line options for @code{bashdb} script
++
++You can run @DBG in various alternative modes---for example, in
++batch mode or quiet mode.
++
++@table @code
++@item -h 
++@cindex @code{-h}
++This option causes @value{DBG} to print some basic help and exit.
++
++@item -V
++@cindex @code{-V}
++This option causes @DBG to print its version number and
++no-warranty blurb, and exit.
++
++@item -n
++@cindex @code{-n}
++Do not execute commands found in any initialization files.  Normally,
++@BASH executes the commands in these files after all the command
++options and arguments have been processed.  @xref{Command Files,,Command
++files}.
++
++@item -q
++@cindex @code{-q}
++``Quiet''.  Do not print the introductory and copyright messages.  These
++messages are also suppressed in batch mode.
++
++@item -t
++@cindex @code{-t}
++``Terminal output''.  Set the file or terminal that you want debugger command
++output to go to. Note that the debugger output is independent of the
++debugged script output.
++
++@item -L @var{directory}
++@cindex @code{-L}
++Set directory where debugger files reside to @var{directory}. The
++default location is @code{../lib/bashdb} relative to the place that
++the bashdb script is located. For example if bashdb is located in
++@code{/usr/local/bin/bashdb}, the default library location will be
++@code{/usr/local/lib/bashdb} which may or may not exist. If it doesn't
++you'll get an error when you run bashdb. Only if the default location
++is incorrect, should you need to use the @code{-L} option.
++
++@item -T @var{directory}
++@cindex @code{-T}
++Set directory to use for writing temporary files.
++
++@end table
++
++@node Quitting the BASH debugger
++@section Quitting the BASH debugger
++
++@cindex interrupt
++An interrupt (often @kbd{C-c}) does not exit from @value{DBG}, but
++rather terminates the action of any @DBG command that is in
++progress and returns to @value{DBG} command level.  Inside a debugger
++command interpreter, use @code{quit} command (@pxref{Quit, ,Quitting
++the BASH debugger}).
++
++@node Running
++@chapter Script Setup inside the BASH Debugger
++
++@menu
++* Starting::                    Starting your script
++* Command Files::               Command files
++* Arguments::                   Your script's arguments
++* Input/Output::                Your script's input and output
++* Script/Debugger Interaction::   Keeping out of each other's harm
++@end menu
++
++@need 2000
++@node Starting
++@section Starting your script
++@cindex starting
++@cindex running
++
++@table @code
++@kindex restart
++@kindex run @r{(@code{restart})}
++@kindex R @r{(@code{restart})}
++@item restart @ovar{options to debugged script}
++@itemx run
++@itemx R
++Use the @code{restart} command to restart your script under
++@value{DBG}. Without any arguments, the script name and parameters
++from the last invocation are used. @value{dBGP} tries to maintain the
++settings, watchpoints, breakpoints, actions and so on. Internally it
++uses line numbers and filenames to record he position of interesting
++places in your porgram; so if your program changes some or all of
++these numbers may be off. Environment variable
++@code{BASHDB_RESTART_FILE} is and a temporary file are used to signal
++a restart, so you shouldn't uset @code{BASHDB_RESTART_FILE} (or any
++environment variable starting with @code{BASHDB_}.
++
++@end table
++
++@node Command Files
++@section Command files
++
++@cindex command files
++A command file for @DBG is a file of lines that are @DBG
++commands.  Comments (lines starting with @kbd{#}) may also be included.
++An empty line in a command file does nothing; it does not mean to repeat
++the last command, as it would from the terminal.
++
++@cindex init file
++@cindex @file{.bashdbinit}
++@cindex @file{bashdb.ini}
++When you start @value{DBG}, it automatically executes commands from its
++@dfn{init files}, normally called @file{.bashdbinit}@footnote{The DJGPP
++port of @DBG uses the name @file{bashdb.ini} instead, due to the
++limitations of file names imposed by DOS filesystems.}.
++During startup, @DBG does the following:
++
++@enumerate
++@item
++Reads the init file (if any) in your home directory@footnote{On
++DOS/Windows systems, the home directory is the one pointed to by the
++@code{HOME} environment variable.}.
++
++@item
++Processes command line options and operands.
++
++@item
++Reads the init file (if any) in the current working directory.
++
++@item
++Reads command files specified by the @samp{-x} option.
++@end enumerate
++
++The init file in your home directory can set options (such as @samp{set
++complaints}) that affect subsequent processing of command line options
++and operands.  Init files are not executed if you use the @samp{-x}
++option (@pxref{Options for the bashdb script, ,bashdb script options}).
++
++@cindex init file name
++On some configurations of @value{DBG}, the init file is known by a
++different name (these are typically environments where a specialized
++form of @DBG may need to coexist with other forms, hence a
++different name for the specialized version's init file).  These are the
++environments with special init file names:
++
++You can also request the execution of a command file with the
++@code{source} command:
++
++@table @code
++@kindex source
++@item source @var{filename}
++Execute the command file @var{filename}.
++@end table
++
++The lines in a command file are executed sequentially.  They are not
++printed as they are executed.  If there is an error, execution
++proceeds to the next command in the file.
++
++@node Arguments
++@section Your script's arguments
++
++@cindex arguments (to your script)
++The arguments to your script can be specified by the arguments of the
++@code{restart} command.
++They are passed to a shell, which expands wildcard characters and
++performs redirection of I/O, and thence to your script.  
++
++@code{restart} with no arguments uses the same arguments used by the previous
++@code{restart}, or those set by the @code{set args} command.. 
++
++@table @code
++@kindex set args
++@item set args
++Specify the arguments to be used the next time your program is run.  If
++@code{set args} has no arguments, @code{restart} executes your program
++with no arguments.  Once you have run your program with arguments,
++using @code{set args} before the next @code{restart} is the only way to run
++it again without arguments.
++
++@kindex show args
++@item show args
++Show the arguments to give your program when it is started.
++@end table
++
++@node Input/Output
++@section Your script's input and output
++
++@cindex redirection
++@cindex I/O
++@cindex terminal
++By default, the script you run under the BASH debugger does input and
++output to the same terminal that BASH uses.  Before running the script
++to be debugged, the debugger records the tty that was in effect. All
++of its output is then written to that.  However you can change this
++when using the @samp{bashdb} script using the @samp{-t} option.
++
++
++@table @code
++@kindex info terminal
++@item info terminal
++Displays information recorded by @DBG about the terminal modes your
++program is using.
++@end table
++
++@kindex tty
++@cindex controlling terminal
++Another way to specify where your script should do input and output is
++with the @code{tty} command.  This command accepts a file name as
++argument, and causes this file to be the default for future @code{restart}
++commands.  It also resets the controlling terminal for the child
++process, for future @code{restart} commands.  For example,
++
++@example
++tty /dev/ttyb
++@end example
++
++@noindent
++directs that processes started with subsequent @code{restart} commands
++default to do input and output on the terminal @file{/dev/ttyb} and have
++that as their controlling terminal.
++
++An explicit redirection in @code{restart} overrides the @code{tty} command's
++effect on the input/output device, but not its effect on the controlling
++terminal.
++
++When you use the @code{tty} command or redirect input in the @code{restart}
++command, only the input @emph{for your script} is affected.  The input
++for @DBG still comes from your terminal.
++
++@node Script/Debugger Interaction
++@section Script/Debugger Interaction
++
++@value{dBGP} and your program live in the same variable space so
++to speak. @BASH does not have a notion of module scoping or lexical
++hiding (yet) and this then imposes some additional care and awareness.
++
++Most of the variables and functions used inside @DBG start
++@code{_Dbg_}, so please don't use variables or functions with these
++names in your program. 
++
++@emph{Note: there are some other variables that begin with just an
++underscore (@code{_}); over time these will be phased out. But until
++then, avoid those or consult what is used by the debugger. Run
++@samp{bashdb --debugger -c 'declare -p'} to list all the variables in
++use including those used by the debugger.}
++
++A number of @DBG environment variables are also reserved for
++use; these start with @code{BASHDB_}. For example:
++@env{BASHDB_INPUT}, @env{BASHDB_LEVEL} and,
++@env{BASHDB_QUIT_ON_QUIT} (@pxref{Debug, ,Debug}),
++@env{BASHDB_RESTART_FILE} (@pxref{Starting, ,Starting}), to name a
++few.  Finally, there are some @BASH environment dynamic
++variables and these start with @env{BASH_}. For example
++@env{BASH_SUBSHELL} (@pxref{Debug, ,Debug}), @env{BASH_COMMAND}
++(@pxref{Command Display, ,Command Display}), @env{BASH_LINENO}, and
++@env{BASH_SOURCE} to name a few.
++
++In order to do its work @value{dBGP} sets up a @code{DEBUG}
++trap. Consequently a script shouldn't reset this or the debugger will
++lose control. @value{dBGP} also sets up an @code{EXIT} handler so that
++it can gain control after the script finishes. Another signal
++intercepted is the an interrupt or @code{INT} signal. For more
++information about signal handling, @pxref{Signals, ,Signals} 
++
++@node Debugger Command Reference
++@chapter BASH Debugger Command Reference
++
++You can abbreviate the long name of @DBG command to the first
++few letters of the command name, if that abbreviation is unambiguous;
++and you can repeat the @code{next} o r@code{step} commands by typing
++just @key{RET}. Some commands which require a parameter, such as 
++@code{print} remember the argument that was given to them. 
++
++@menu
++* Command Syntax::       How to give commands to the BASH debugger
++* Help::                 How to ask for help (help)
++* Quit::                 Leaving the debugger (quit)
++* Information::          Status and Debugger settings (info, show)
++* Stopping::             Stopping and continuing (break, watch, step, cont...)
++* Stack::                Examining the stack (where, up, down, frame)
++* List::                 Printing source files (list)
++* Search::               Searching source files (/pat/ ?pat?)
++* Data::                 Examining data (print, examine, info variables)
++* Evaluation/Execution:: Arbitrary execution (eval, shell)
++* Auto Display::         Executing expressions on stop (display, undisplay)
++* Controlling bashdb::   Controlling bashdb (set, history)
++@end menu
++
++@node Command Syntax
++@section Command syntax
++
++A BASH debugger command is a single line of input.  There is no limit on
++how long it can be.  It starts with a command name, which is followed by
++arguments whose meaning depends on the command name.  For example, the
++command @code{step} accepts an argument which is the number of times to
++step, as in @samp{step 5}.  You can also use the @code{step} command
++with no arguments.  Some commands do not allow any arguments.
++
++@cindex repeating next/step commands
++@kindex RET @r{(repeat last command)}
++A blank line as input to @DBG (typing just @key{RET}) means to
++repeat the previous next or step command.  
++
++@kindex # @r{(a comment)}
++@cindex comment
++Any text from a @kbd{#} to the end of the line is a comment; it does
++nothing.  This is useful mainly in command files (@pxref{Command
++Files,,Command files}).
++
++@node Help
++@section Getting help (@samp{help})
++@cindex online documentation
++
++Once inside the BASH debugger, you can always ask it for information on its
++commands, using the command @code{help}.
++
++@table @code
++@kindex h @r{(@code{help})}
++@item help
++@itemx h
++You can use @code{help} (abbreviated @code{h}) with no arguments to
++display a short list of named classes of commands:
++@end table 
++
++@flushleft
++@smallexample
++bashdb<0> @b{help}
++bashdb commands:
++List/search source lines:                 Control script execution:
++-------------------------                 -------------------------
++ l [start|.] [cnt] List cnt lines         T [n]        Stack trace
++                   from line start        s [n]        Single step [n times]
++ l sub       List source code fn          n [n]        Next, steps over subs
++ - or .      List previous/current line   <CR>/<Enter> Repeat last n or s 
++ w [line]    List around line             c [linespec] Continue [to linespec]
++ f filename  View source in file          L            List all breakpoints
++ /pat/       Search forward for pat       b linespec   Set breakpoint
++ ?pat?       Search backward for pat      del [n].. or D Delete a/all breaks
++                                                         by entry number
++Debugger controls:                        skip         skip execution of cmd
++-------------------------                 cl linespec  Delete breakpoints by
++ H [num]         Show last num commands                line spec
++ q [exp] or ^D   Quit returning exp       R [args]     Attempt a restart
++ info [cmd]      Get info on cmd.         u [n]        Go up stack by n or 1.
++ !n or hi n      Run debugger history n   do [n]       Go down stack by n or 1.
++ h or ? [cmd]    Get help on command      W [var]      Add watchpoint. If no
++ info [cmd]      Get info on cmd                       no expr, delete all
++ show [cmd]      Show settings            We [expr]    Add Watchpoint arith 
++                                                       expr
++ so file         read in dbg commands     t            Toggle trace
++                                          en/di n      enable/disable brkpt,
++ set x y         set a debugger variable               watchpoint, or display
++ e bash-cmd      evaluate a bash command  tb linespec  Add one-time break
++ disp expr       add a display expr       a linespec cmd eval "cmd" at linespec
++ M               Show module versions     A            delete all actions
++ x expr          evaluate expression      ret          jump out of fn or source
++                 (via declare, let, eval) finish       execute until return
++ deb             debug into another       cond n exp   set breakpoint condition
++                 shell script
++ !! cmd [args]   execute shell command "cmd" with "args"
++
++Data Examination: also see e, t, x
++-------------------------                 
++ p variable      Print variable 
++ V [[!]pat]      List variable(s) matching or not (!) matching pattern pat
++ S [[!]pat]      List subroutine names [not] matching pattern pat
++
++Readline command line editing (emacs/vi mode) is available
++For more help, type h <cmd> or consult online-documentation.
++@end smallexample
++@end flushleft
++@c the above line break eliminates huge line overfull...
++
++@table @code
++@item help @var{command}
++With a command name as @code{help} argument, the BASH debugger displays 
++short information on how to use that command.
++
++@example
++bashdb<0> @b{help list}
++l linespec      List window lines starting at linespec.
++l min incr      List incr lines starting at 'min' linespec.
++l               List next window of lines.
++l .             Same as above.
++                Long command name: list.
++@end example
++
++In addition to @code{help}, you can use the debugger command
++@code{info} to inquire about the state of your script, or the state of
++@DBG itself.  The listings under @code{info} in the Index
++point to all the sub-commands.  @xref{Command Index}.
++@end table
++
++@c @group
++@table @code
++@kindex info
++@kindex i @r{(@code{info})}
++@item info
++This command (abbreviated @code{i}) is for describing the state of
++your program.  For example, you can list the arguments given to your
++script with @code{info args}, or list the breakpoints you have set
++with @code{info breakpoints}.  You can get a complete list of the
++@code{info} sub-commands with @w{@code{help info}}.
++
++@example
++bashdb<0> @b{info}
++Info subcommands are: args breakpoints display files source sources stack terminal variables watchpoints
++bashdb<1> @b{info source}
++Current script file is parm.sh
++Contains 34 lines.
++@end example
++@end table
++
++
++@node Quit
++@section Quitting the BASH debugger (@samp{quit})
++
++@table @code
++@kindex quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
++@kindex q @r{(@code{quit})}
++@item quit @ovar{expression}
++@item quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
++@itemx q
++
++To exit @value{DBG}, use the @code{quit} command (abbreviated
++@code{q}), or type an end-of-file character (usually @kbd{C-d}).  If
++you do not supply @var{expression}, @DBG will try to terminate
++normally or with exit code 0. Otherwise it will terminate using the
++result of @var{expression} as the exit code. 
++
++A simple @code{quit} tries to terminate all nested subshells that may
++be in effect.  If you are nested a subshell, this is normally
++indicated in a debugger prompt by the number of parentheses that the
++history number is inside --- no parenthesis means there is no subshell
++in effect. The dynamic variable @env{BASH_SUBSHELL} also contains the
++number of subshells in effect. 
++
++If you want only to terminate some number of subshells but not all of
++them, you can give a count of the number of subshells to leave after
++the return-code expression. To leave just one level of subshell
++@code{return} does almost the same thing. (See @pxref{Returning,
++,Returning}) There is a subtle difference between the two though:
++@code{return} will leave you at the beginning of the next statement
++while @code{quit} may leave you at the place the subshell was invoked
++which may be in the middle of another command such as an assingment
++statement or condition test.
++
++If the environment variable @code{BASHDB_QUIT_ON_QUIT} is set, when the
++program terminates, the debugger will also terminate too. This may be
++useful if you are debugging a script which calls another script and
++you want this inner script just to return to the outer script.
++@end table
++
++@node Stopping
++@section Stopping and Resuming Execution (@samp{break}, @samp{watch}, @samp{step}, @samp{cont})
++
++One important use of a debugger is to stop your program before it
++terminates so that, if your script might run into trouble, you can
++investigate and find out why. However should your script accidently
++continue to termination, @DBG has arranged for it not to leave the
++debugger without your explicit instruction. That way, you can restart
++the program using the same command arguments.
++
++Inside @value{DBG}, your script may stop for any of several reasons,
++such as a signal, a breakpoint, or reaching a new line after a
++debugger command such as @code{step}.  You may then examine and
++change variables, set new breakpoints or remove old ones, and then
++continue execution.  
++
++@menu
++* Breakpoints::          Breakpoints, watchpoints (break, watch, clear)
++* Resuming Execution::   Resuming execution (continue, step, next, skip, debug)
++* Signals::              Signals
++@end menu
++
++@node Breakpoints
++@subsection Breakpoints, watchpoints
++
++@cindex breakpoints
++A @dfn{breakpoint} makes your script stop whenever a certain point in
++the program is reached.  For each breakpoint, you can add conditions to
++control in finer detail whether your script stops.  
++
++You can set breakpoints with the @code{break} command and its variants
++(@pxref{Set Breaks, ,Setting breakpoints}), to specify the place where
++your script should stop by line number.  or function name in the
++debugged script.
++
++@cindex watchpoints
++@cindex breakpoint on variable modification
++A @dfn{watchpoint} is a special breakpoint that stops your script when
++the value of an expression changes.  There is a different command to
++set watchpoints (@pxref{Set Watchpoints, ,Setting watchpoints}). 
++
++But aside from that, you can manage a watchpoint like any other
++breakpoint: you delete enable, and disable both breakpoints and
++watchpoints using the same commands.
++
++You can arrange to have values from your program displayed automatically
++whenever @value{BASH} stops at a breakpoint.  @xref{Auto Display,,
++Automatic display}.
++
++@cindex breakpoint numbers
++@cindex numbers for breakpoints
++@DBG assigns a number to each breakpoint and watchpoint when
++you create it; these numbers are successive integers starting with
++one.  In many of the commands for controlling various features of
++breakpoints you use the breakpoint number to say which breakpoint you
++want to change.  Each breakpoint may be @dfn{enabled} or
++@dfn{disabled}; if disabled, it has no effect on your script until you
++enable it again.
++
++@cindex watchpoints numbers
++@cindex numbers for watchpoints
++Watchpoint numbers however are distiguished from breakpoint numbers by
++virtue of their being suffixed with the either an upper- or lower-case
++`W'.  For example, to enable breakpoint entry 0 along with watchpoint
++entry 1 you would write @samp{enable 1 2w}, the ``2w'' refers to the
++watchpoint; ``2W'' would work just as well.
++
++@ifset FINISHED
++@cindex breakpoint ranges
++@cindex ranges of breakpoints
++Some @DBG commands accept a range of breakpoints on which to
++operate.  A breakpoint range is either a single breakpoint number, like
++@samp{5}, or two such numbers, in increasing order, separated by a
++hyphen, like @samp{5-7}.  When a breakpoint range is given to a command,
++all breakpoint in that range are operated on.
++@end ifset
++
++@menu
++* Set Breaks::                      Setting breakpoints (break, tbreak)
++* Set Watchpoints::                 Setting watchpoints (watch, watche)
++* Delete Breaks::                   Deleting breakpoints (delete, clear)
++* Disabling::                       Disabling breakpoints (disable, enable)
++* Conditions::                      Break conditions (condition)
++@end menu
++
++@node Set Breaks
++@subsubsection Setting breakpoints (@samp{break} @samp{tbreak})
++
++@kindex break
++@kindex b @r{(@code{break})}
++@cindex latest breakpoint
++Breakpoints are set with the @code{break} command (abbreviated
++@code{b}).  
++
++@table @code
++@item break @var{function}
++Set a breakpoint at entry to function @var{function}.
++
++@item break @var{linenum}
++Set a breakpoint at line @var{linenum} in the current source file.
++The current source file is the last file whose source text was printed.
++The breakpoint will stop your script just before it executes any of the
++code on that line.
++
++@item break @var{filename}:@var{linenum}
++Set a breakpoint at line @var{linenum} in source file @var{filename};
++@var{filename} has to be one of the files previously read in and has
++to be specified exactly as the name used when read in. For a list of
++read-in files, use the @samp{info files} command.
++
++@ifset FINISHED
++@item break
++When called without any arguments, @code{break} sets a breakpoint at
++the next instruction to be executed in the selected stack frame
++(@pxref{Stack, ,Examining the Stack}).  In any selected frame but the
++innermost, this makes your script stop as soon as control returns to
++that frame.  If you use @code{break} without an argument in the
++innermost frame, @DBG stops the next time it reaches the
++current location; this may be useful inside loops.
++@end ifset
++
++@item break @dots{} if @var{cond}
++Set a breakpoint with condition @var{cond}; evaluate the expression
++@var{cond} each time the breakpoint is reached, and stop only if the
++value is nonzero---that is, if @var{cond} evaluates as true. The
++expression is evaluated via the @code{let} builtin funtion.
++@samp{@dots{}} stands for one of the possible arguments described
++above (or no argument) specifying where to break. The word ``if'' is
++often optional and is necessary only @samp{@dots{}} is
++omitted. @xref{Conditions, ,Break conditions}, for more information on
++breakpoint conditions.
++
++Examples:
++@example
++bashdb<0> @b{break fn1}
++Breakpoint 1 set in file parm.sh, line 3.
++bashdb<1> @b{break 28}
++Breakpoint 2 set in file parm.sh, line 28.
++bashdb<2> @b{break parm.sh:29}
++Breakpoint 3 set in file parm.sh, line 29.
++bashdb<3> @b{break 28 if x==5}
++Breakpoint 4 set in file parm.sh, line 28.
++@end example
++
++@kindex tbreak
++@item tbreak @var{args}
++Set a breakpoint enabled only for one stop.  @var{args} are the
++same as for the @code{break} command, and the breakpoint is set in the same
++way, but the breakpoint is automatically deleted after the first time your
++program stops there.  @xref{Disabling, ,Disabling breakpoints}.
++
++@kindex info breakpoints
++@cindex @code{$_} and @code{info breakpoints}
++@item info breakpoints @ovar{n}
++@itemx info break @ovar{n}
++@itemx info watchpoints @ovar{n}
++Print a table of all breakpoints, watchpoints set and not deleted,
++with the following columns for each breakpoint:
++
++@table @emph
++@item Breakpoint Numbers (@samp{Num})
++@item Enabled or Disabled (@samp{Enb})
++Enabled breakpoints are marked with @samp{1}.  @samp{0} marks breakpoints
++that are disabled (not enabled).
++@item Count
++The number of times that breakpoint or watchpoint has been hit.
++@item Condition
++The arithmetic expression
++@item File and Line (@samp{file:line})
++The filename and line number inside that file where of breakpoint in
++the script. The file and line are separated with a colon.
++@end table
++
++@noindent
++If a breakpoint is conditional, @code{info break} shows the condition on
++the line following the affected breakpoint; breakpoint commands, if any,
++are listed after that.
++
++@noindent
++@code{info break} displays a count of the number of times the breakpoint
++has been hit.  
++
++@code{info break} with a breakpoint number @var{n} as argument lists
++only that breakpoint.
++
++Examples:
++@example
++bashdb<4> @b{info break}
++Breakpoints at following places:
++Num Type       Disp Enb What
++1   breakpoint keep y   parm.sh:3
++2   breakpoint keep y   parm.sh:28
++3   breakpoint keep y   parm.sh:29
++4   breakpoint keep y   parm.sh:28
++No watch expressions have been set.
++bashdb<5> @b{info break 4}
++Num Type       Disp Enb What
++4   breakpoint keep y   parm.sh:28
++No watch expressions have been set.
++@end example
++@end table
++
++
++@ifset FINISHED
++This is especially useful in conjunction with the
++@code{ignore} command.  You can ignore a large number of breakpoint
++hits, look at the breakpoint info to see how many times the breakpoint
++was hit, and then run again, ignoring one less than that number.  This
++will get you quickly to the last hit of that breakpoint.
++@end ifset
++
++@DBG allows you to set any number of breakpoints at the same place in
++your script.  There is nothing silly or meaningless about this.  When
++the breakpoints are conditional, this is even useful
++(@pxref{Conditions, ,Break conditions}).
++
++@node Set Watchpoints
++@subsubsection Setting watchpoints (@samp{watch}, @samp{watche})
++
++@cindex setting watchpoints
++You can use a watchpoint to stop execution whenever the value of an
++expression changes, without having to predict a particular place where
++this may happen. As with the @code{print} (@pxref{Data,,Examining
++Data}), the idiosyncracies of a BASH or any POSIX shell derivative
++suggest using two commands. The @code{watch} command is just for a
++single variables; the @code{watche} command uses the builtin ``let''
++command to evaluate an expression. If the variable you are tracking
++can take a string value, issuing something like @samp{watch foo} will
++not have the desired effect---any string assignment to @code{foo} will
++have a value 0 when it is assigned via ``let.''
++
++@table @code
++@kindex watch
++@item watch @var{var}
++Set a watchpoint for a variable.  @DBG will break when the
++value of @var{var} changes. In this command do not add a leading
++dollar symbol to @var{var}.
++
++@item watche @var{expr}
++Set a watchpoint for an expression via the builtin ``let'' command.
++@DBG will break when @var{expr} is written into by the program
++and its value changes. Not that this may not work for tracking
++arbitrary string value changes. For that use @code{watch} described
++earlier.
++@end table
++
++@node Delete Breaks
++@subsubsection Deleting breakpoints (@samp{clear}, @samp{delete})
++
++@cindex clearing breakpoints, watchpoints
++@cindex deleting breakpoints, watchpoints
++It is often necessary to eliminate a breakpoint or watchpoint once it
++has done its job and you no longer want your script to stop there.
++This is called @dfn{deleting} the breakpoint.  A breakpoint that has
++been deleted no longer exists; it is forgotten.
++
++With the @code{clear} command you can delete breakpoints according to
++where they are in your script.  With the @code{delete} command you can
++delete individual breakpoints, or watchpoints by specifying their
++breakpoint numbers. @emph{Note: as described below under the ``clear''
++command, ``d'' is an alias for ``clear'', not ``delete''. }
++
++It is not necessary to delete a breakpoint to proceed past it.  @DBG
++automatically ignores breakpoints on the first instruction to be executed
++when you continue execution.
++
++@table @code
++@kindex clear
++@kindex d @r{(@code{clear})}
++@item clear
++Delete any breakpoints at the next instruction to be executed in the
++selected stack frame (@pxref{Selection, ,Selecting a frame}).  When
++the innermost frame is selected, this is a good way to delete a
++breakpoint where your script just stopped.
++
++It may seem odd that we have an alias ``d'' for ``clear.'' It so
++happens that Perl's debugger use ``d'' for its delete command and the
++delete concept in Perl's debugger corresponds to ``clear'' in
++GDB. (Perl doesn't have a notion of breakpoint entry numbers). So in
++order to be compatible with both debugger interfaces, ``d'' is used as
++an alias for ``clear.'' Clear? 
++
++@item clear @var{function}
++@itemx clear @var{filename}:@var{function}
++Delete any breakpoints set at entry to the function @var{function}.
++
++@item clear @var{linenum}
++@itemx d @var{linenum}
++@ifset FINISHED
++@itemx clear @var{filename}:@var{linenum}
++@end ifset
++Delete any breakpoints set at or within the code of the specified line.
++
++@cindex delete breakpoints
++@kindex delete
++@kindex de @r{(@code{delete})}
++@item delete @ovar{breakpoints}
++Delete the breakpoints, watchpoints specified as arguments. 
++
++If no argument is specified, delete all breakpoints (@DBG asks
++confirmation, unless you have @code{set confirm off}).  You can
++abbreviate this command as @code{de}.
++
++
++Note that for compatibility with Perl's debugger, @code{d} means
++something else: @code{clear}.
++
++@end table
++
++@node Disabling
++@subsubsection Disabling breakpoints (@samp{disable}, @samp{enable})
++
++Rather than deleting a breakpoint or watchpoint, you might
++prefer to @dfn{disable} it.  This makes the breakpoint inoperative as if
++it had been deleted, but remembers the information on the breakpoint so
++that you can @dfn{enable} it again later.
++
++You disable and enable breakpoints, watchpoints, and catchpoints with
++the @code{enable} and @code{disable} commands, optionally specifying one
++or more breakpoint numbers as arguments.  Use @code{info break} or
++@code{info watch} to print a list of breakpoints, watchpoints, and
++catchpoints if you do not know which numbers to use.
++
++A breakpoint, watchpoint, or catchpoint can have any of four different
++states of enablement:
++
++@itemize @bullet
++@item
++Enabled.  The breakpoint stops your program.  A breakpoint set
++with the @code{break} command starts out in this state.
++@item
++Disabled.  The breakpoint has no effect on your program.
++@item
++Enabled once.  The breakpoint stops your program, but then becomes
++disabled.
++@item
++Enabled for deletion.  The breakpoint stops your program, but
++immediately after it does so it is deleted permanently.  A breakpoint
++set with the @code{tbreak} command starts out in this state.
++@end itemize
++
++You can use the following commands to enable or disable breakpoints,
++watchpoints, and catchpoints:
++
++@table @code
++@kindex disable breakpoints
++@kindex disable
++@kindex dis @r{(@code{disable})}
++@item disable @ovar{breakpoints}
++Disable the specified breakpoints---or all breakpoints, if none are
++listed.  A disabled breakpoint has no effect but is not forgotten.  All
++options such as ignore-counts, conditions and commands are remembered in
++case the breakpoint is enabled again later.  You may abbreviate
++@code{disable} as @code{dis}.
++
++@kindex enable breakpoints
++@kindex enable
++@item enable @ovar{breakpoints}
++Enable the specified breakpoints (or all defined breakpoints).  They
++become effective once again in stopping your program.
++@end table
++
++@c FIXME: I think the following ``Except for [...] @code{tbreak}'' is
++@c confusing: tbreak is also initially enabled.
++Except for a breakpoint set with @code{tbreak} (@pxref{Set Breaks,
++,Setting breakpoints}), breakpoints that you set are initially enabled;
++subsequently, they become disabled or enabled only when you use one of
++the commands above.  (The command @code{until} can set and delete a
++breakpoint of its own, but it does not change the state of your other
++breakpoints; see @ref{Resuming Execution, ,Resuming Execution}.)
++
++@node Conditions
++@subsubsection Break conditions (@samp{condition})
++@cindex conditional breakpoints
++@cindex breakpoint conditions
++
++The simplest sort of breakpoint breaks every time your script reaches
++a specified place.  You can also specify a @dfn{condition} for a
++breakpoint.  A condition is just a BASH expression.  
++
++Break conditions can be specified when a breakpoint is set, by using
++@samp{if} in the arguments to the @code{break} command.  @xref{Set
++Breaks, ,Setting breakpoints}.  A breakpoint with a condition
++evaluates the expression each time your script reaches it, and your
++script stops only if the condition is @emph{true}.
++
++@cindex one-time breakpoints
++There is also a notion of a ``one-time'' breakpoint which gets deleted
++as soon as it is hit, so that that breakpoint is executed once only. 
++
++Conditions are also accepted for watchpoints; you may not need them,
++since a watchpoint is inspecting the value of an expression anyhow---but
++it might be simpler, say, to just set a watchpoint on a variable name,
++and specify a condition that tests whether the new value is an interesting
++one.
++
++Break conditions can be specified when a breakpoint is set, by using
++@samp{if} in the arguments to the @code{break} command.  @xref{Set
++Breaks, ,Setting breakpoints}.  They can also be changed at any time
++with the @code{condition} command.
++
++@ifset FINISHED
++You can also use the @code{if} keyword with the @code{watch} command.
++The @code{catch} command does not recognize the @code{if} keyword;
++@code{condition} is the only way to impose a further condition on a
++catchpoint.
++@end ifset
++
++@table @code
++@kindex condition
++@item condition @var{bnum} @var{expression}
++Specify @var{expression} as the break condition for breakpoint
++@var{bnum}.  After you set a condition, breakpoint @var{bnum} stops
++your program only if the value of @var{expression} is true (nonzero).
++
++@item condition @var{bnum}
++Remove the condition from breakpoint number @var{bnum}.  It becomes
++an ordinary unconditional breakpoint.
++@end table
++
++@ifset FINISHED
++When you use @code{condition}, @DBG checks @var{expression}
++immediately for syntactic correctness, and to determine whether
++symbols in it have referents in the context of your breakpoint.  If
++@var{expression} uses symbols not referenced in the context of the
++breakpoint, @DBG prints an error message:
++
++@example
++No symbol "foo" in current context.
++@end example
++@end ifset
++
++@noindent
++@BASH does
++not actually evaluate @var{expression} at the time the @code{condition}
++command (or a command that sets a breakpoint with a condition, like
++@code{break if @dots{}}) is given, however.
++
++Examples;
++@example
++condition 1 x>5   # Stop on breakpoint 0 only if x>5 is true.
++condition 1       # Change that! Unconditinally stop on breakpoint 1.
++@end example
++
++@node Resuming Execution
++@subsection Resuming Execution
++
++@cindex stepping
++@cindex continuing
++@cindex resuming execution
++@dfn{Continuing} means resuming program execution until your script
++completes normally.  In contrast, @dfn{stepping} means executing just
++one more ``step'' of your script, where ``step'' may mean either one
++line of source code.  Either when continuing or when stepping,
++your script may stop even sooner, due to a breakpoint or a signal.
++
++@menu
++* Step::          running the next statement (step)
++* Next::          running the next statement skipping over functions (skip)
++* Finish::        running until the return of a function or ``source'' (finish)
++* Skip::          skipping the next statement (skip)
++* Continue::      continuing execution (continue)
++* Debug::         debugging into another program (debug)
++* Returning::     returning
++@end menu
++
++@node Step
++@subsubsection Step (@samp{step})
++@table @code
++@kindex step
++@kindex s @r{(@code{step})}
++@item step
++Continue running your script until control reaches a different source
++line, then stop it and return control to @value{DBG}.  This command is
++abbreviated @code{s}.
++
++The @code{step} command only stops at the first instruction of a source
++line.  This prevents the multiple stops that could otherwise occur in
++@code{switch} statements, @code{for} loops, etc.  @code{step} continues
++to stop if a function that has debugging information is called within
++the line.  In other words, @code{step} @emph{steps inside} any functions
++called within the line.
++
++@item step @ovar{count}
++Continue running as in @code{step}, but do so @var{count} times.  If a
++breakpoint is reached, or a signal not related to stepping occurs before
++@var{count} steps, stepping stops right away.
++@end table
++
++@node Next
++@subsubsection Next (@samp{next})
++@table @code
++@kindex next
++@kindex n @r{(@code{next})}
++@item next @ovar{count}
++Continue to the next source line in the current (innermost) stack frame.
++This is similar to @code{step}, but function calls that appear within
++the line of code are executed without stopping.  Execution stops when
++control reaches a different line of code at the original stack level
++that was executing when you gave the @code{next} command.  This command
++is abbreviated @code{n}.
++
++An argument @var{count} is a repeat count, as for @code{step}.
++@end table
++
++@node Finish
++@subsubsection Finish (@samp{finish})
++@table @code
++@kindex finish
++@item finish
++Continue running until just after function returns.  @emph{Currently,
++the line shown on a return is the function header, unless the
++@code{return} builtin function is executed in which case it is the
++line number of the @code{return} function.}
++
++Contrast this with the @code{return} command (@pxref{Returning,
++,Returning from a function}) and the @code{quit} (@pxref{Quitting the
++BASH debugger, ,Quitting the BASH debugger}).
++
++@end table
++
++@node Skip
++@subsubsection Skip (@samp{skip})
++@table @code
++@kindex skip
++@item skip @ovar{count}
++Skip exection of the next source line. 
++This may be useful if you have an action that ``fixes'' existing code in
++the script. The @code{debug} command internally uses the @code{skip} command
++to skip over existing non-debugged invocation that was presumably just
++run.
++@end table
++
++@node Continue
++@subsubsection Continue (@samp{continue})
++@table @code
++@kindex continue
++@kindex c @r{(@code{continue})}
++@item continue @ovar{linespec}
++@itemx c @ovar{line-number}
++Resume program execution, at the address where your script last
++stopped; any breakpoints set at that address are bypassed.  The
++optional argument @var{linespec} allows you to specify a linespec (a
++line number, function, or filename linenumber combination) to set. A
++one-time breakpoint is deleted when that breakpoint is reached. Should
++the program stop before that breakpoint is reached, for example,
++perhaps another breakpoint or watchpoint is reached first, in a
++listing of the breakpoints you will see this entry with the condition
++9999 which indicates a one-time breakpoint.
++@end table
++
++To resume execution at a different place, you can use @code{return}
++(@pxref{Returning, ,Returning from a function}) to go back to the
++calling function or sourced script. If you are nested inside a
++subshell, @code{quit} with a value for the number of subshells to
++exit also functions like a return.
++
++A typical technique for using stepping is to set a breakpoint
++(@pxref{Breakpoints, ,Breakpoints; watchpoints}) at the
++beginning of the function or the section of your script where a problem
++is believed to lie, run your script until it stops at that breakpoint,
++and then step through the suspect area, examining the variables that are
++interesting, until you see the problem happen.
++
++@node Debug
++@subsubsection Debug (@samp{debug})
++@table @code
++@kindex debug
++@item debug @ovar{script-name}
++Debug into @var{script-name}. If no name is given the current source line
++is used. In either case the options are prepended to cause the
++debugger to run.
++
++The nesting level of the debugger is saved inside environment variable
++@code{BASHDB_LEVEL}. The debugger prompt indicates the level of nesting
++by enclosing the history in that many nestings of @code{<>} symbols.
++
++@end table
++
++@node Returning
++@subsubsection Returning from a function, sourced file, or subshell (@samp{return})
++
++@table @code
++@cindex returning from a function, sourced file or subshell
++@kindex return
++@item return
++@itemx return
++You can cancel execution of a function call or a subshell with the
++@code{return} command.
++@end table
++
++The @code{return} command does not resume execution; it leaves the
++program stopped in the state that would exist if the function had just
++returned.  See also the @code{quit} command (@ref{Quit, ,Quitting the
++BASH debugger}). In some situations @code{return} is similar to
++@code{quit}: in particular when the script is @emph{not} currenlty
++inside in a function and the number of subshells in effect is 0, or
++when a subshell count of 1 is given on the @code{quit} command.
++
++@ifset FINISHED
++In contrast, the @code{finish} command (@pxref{Continuing
++and Stepping, ,Continuing and stepping}) resumes execution until the
++selected stack frame returns naturally.
++@end ifset
++
++@node Signals
++@subsection Signals
++@cindex signals
++
++A signal is an asynchronous event that can happen in a program.  The
++operating system defines the possible kinds of signals, and gives each
++kind a name and a number.  For example, in Unix @code{SIGINT} is the
++signal a program gets when you type an interrupt character (often
++@kbd{C-c}); @code{SIGALRM} occurs when the alarm clock timer goes off
++(which happens only if your program has requested an alarm).
++
++Some signal handlers are installed and changed for @value{DBG}'s
++normal use: @code{SIGDEBUG} and @code{SIGEXIT}. @code{SIGDEBUG} is
++used by the debugger to potentially stop your program before execution
++of each statement occurs, and @code{SIGEXIT} is used to catch your
++program just before it is set to leave so you have the option of
++restarting the program with the same options (and not leave the
++debugger) or let the program quit.
++
++Signal handlers that the debugged script might have installed are
++saved and called before the corresponding debugger handler. Thus, the
++debugged program should work roughly in the same fashion as when it is
++not debugged. However there are some call-stack variables which
++inevitably will differ. To try to hedge this a little so the behaviour
++is the same, @value{DBG} will modify arguments to the traps if it
++finds one of the call-stack that change as a result of the debugger
++being in place. In particluar @env{$LINENO} will get replaced with
++@env{$@{BASH_LINENO[0]@}}; also @env{$@{BASH_LINENO[0]@}} and
++@env{$@{BASH_SOURCE[0]@}} get replaced with
++@env{$@{BASH_LINENO[1]@}} and @env{$@{BASH_SOURCE[1]@}}
++respectively.
++
++The debugger also installs an interrupt handler @code{SIGINT} so that
++errant programs can be interrupted and you can find out where the
++program was when you interrupted it.
++
++@cindex fatal signals
++Some signals, including @code{SIGALRM}, are a normal part of the
++functioning of your program.  Others, such as @code{SIGSEGV}, indicate
++errors; these signals are @dfn{fatal} (they kill your program immediately) if the
++program has not specified in advance some other way to handle the signal.
++@code{SIGINT} does not indicate an error in your program, but it is normally
++fatal so it can carry out the purpose of the interrupt: to kill the program.
++
++@BASH has the ability to detect any occurrence of a signal in your
++program.  You can tell @BASH in advance what to do for each kind of
++signal.
++
++@cindex handling signals
++Normally, @BASH is set up to let the non-erroneous signals like
++@code{SIGALRM} be silently passed to your program
++(so as not to interfere with their role in the program's functioning)
++but to stop your program immediately whenever an error signal happens.
++You can change these settings with the @code{handle} command.
++
++@table @code
++@kindex info signals
++@item info signals
++@itemx info handle
++Print a table of all the kinds of signals and how @BASH has been told to
++handle each one.  You can use this to see the signal numbers of all
++the defined types of signals.
++
++@code{info handle} is an alias for @code{info signals}.
++
++@kindex handle
++@item handle @var{signal} @var{keywords}@dots{}
++Change the way @BASH handles signal @var{signal}.  @var{signal}
++can be the number of a signal or its name (with or without the
++@samp{SIG} at the beginning); a list of signal numbers of the form
++@samp{@var{low}-@var{high}}; or the word @samp{all}, meaning all the
++known signals.  The @var{keywords} say what change to make.
++@end table
++
++@c @group
++The keywords allowed by the @code{handle} command can be abbreviated.
++Their full names are:
++
++@table @code
++@item stop
++@BASH should stop your program when this signal happens.  This implies
++the @code{print} keyword as well.
++
++@item nostop
++@BASH should not stop your program when this signal happens.  It may
++still print a message telling you that the signal has come in.
++
++@item print
++@BASH should print a message when this signal happens.
++
++@item noprint
++@BASH should not mention the occurrence of the signal at all.  
++
++@item stack
++@BASH should print a stack trace when this signal happens.
++
++@item nostack
++@BASH should not print a stack trace when this signal occurs.  
++
++@ifset FINISHED
++@item pass
++@itemx noignore
++@BASH should allow your program to see this signal; your program
++can handle the signal, or else it may terminate if the signal is fatal
++and not handled.  @code{pass} and @code{noignore} are synonyms.
++
++@item nopass
++@itemx ignore
++@BASH should not allow your program to see this signal.
++@code{nopass} and @code{ignore} are synonyms.
++@end ifset
++@end table
++@c @end group
++
++@ifset FINISHED
++When a signal stops your program, the signal is not visible to the
++program until you
++continue.  Your program sees the signal then, if @code{pass} is in
++effect for the signal in question @emph{at that time}.  In other words,
++after @BASH reports a signal, you can use the @code{handle}
++command with @code{pass} or @code{nopass} to control whether your
++program sees that signal when you continue.
++
++The default is set to @code{nostop}, @code{noprint}, @code{pass} for
++non-erroneous signals such as @code{SIGALRM}, @code{SIGWINCH} and
++@code{SIGCHLD}, and to @code{stop}, @code{print}, @code{pass} for the
++erroneous signals.
++
++You can also use the @code{signal} command to prevent your program from
++seeing a signal, or cause it to see a signal it normally would not see,
++or to give it any signal at any time.  For example, if your program stopped
++due to some sort of memory reference error, you might store correct
++values into the erroneous variables and continue, hoping to see more
++execution; but your program would probably terminate immediately as
++a result of the fatal signal once it saw the signal.  To prevent this,
++you can continue with @samp{signal 0}.  @xref{Signaling, ,Giving your
++program a signal}.
++@end ifset
++
++@node Information
++@section Status and Debugger Settings (@samp{info}, @samp{show})
++
++In addition to @code{help}, you can use the @BASH commands @code{info}
++and @code{show} to inquire about the state of your program, or the state
++of @BASH itself.  Each command supports many topics of inquiry; this
++manual introduces each of them in the appropriate context.  The listings
++under @code{info} and under @code{show} in the Index point to
++all the sub-commands.  @xref{Command Index}.
++
++@c @group
++@table @code
++@kindex info
++@kindex i @r{(@code{info})}
++@item info
++This command (abbreviated @code{i}) is for describing the state of
++your program.  For example, you canlist the current @code{$1}, @code{$2}
++parameters with @code{info args}, or list the breakpoints you have set
++with @code{info breakpoints} or @code{info watchpoints}.  You can get
++a complete list of the @code{info} sub-commands with @w{@code{help
++info}}.
++
++@kindex set
++@item set
++You can assign the result of an expression to an environment variable
++with @code{set}.  For example, you can set the number of lines
++@BASH will list by default to 20 with @code{set listsize 20}.
++
++@kindex show
++@item show
++In contrast to @code{info}, @code{show} is for describing the state of
++@BASH itself.
++You can change most of the things you can @code{show}, by using the
++related command @code{set}; 
++
++The distinction between @code{info} and @code{show} however is a bit
++fuzzy. For example, to list the arguments given to your script use
++@code{show args}; @code{info args} does something different.
++
++@kindex info set
++To display all the settable parameters and their current
++values, you can use @code{show} with no arguments; you may also use
++@code{info set}.  Both commands produce the same display.
++@c FIXME: "info set" violates the rule that "info" is for state of
++@c FIXME...program.  Ck w/ GNU: "info set" to be called something else,
++@c FIXME...or change desc of rule---eg "state of prog and debugging session"?
++@end table
++@c @end group
++
++Here are three miscellaneous @code{show} subcommands, all of which are
++exceptional in lacking corresponding @code{set} commands:
++
++@table @code
++@kindex show version
++@cindex version number
++@item show version
++Show what version of @BASH is running.  You should include this
++information in @BASH bug-reports.  If multiple versions of
++@BASH are in use at your site, you may need to determine which
++version of @BASH you are running; as @BASH evolves, new
++commands are introduced, and old ones may wither away.  Also, many
++system vendors ship variant versions of @value{BASH}, and there are
++variant versions of @BASH in @sc{gnu}/Linux distributions as well.
++The version number is the same as the one announced when you start
++@value{BASH}.
++
++@kindex show copying
++@item show copying
++Display information about permission for copying @value{BASH}.
++
++@kindex show warranty
++@item show warranty
++Display the @sc{gnu} ``NO WARRANTY'' statement, or a warranty,
++if your version of @DBG comes with one.
++
++@end table
++
++@node Stack
++@section Examining the Stack (@samp{where}, @samp{frame}, @samp{up}, @samp{down})
++
++When your script has stopped, one thing you'll probably want to know
++is where it stopped and some idea of how it got there.
++
++@cindex call stack
++Each time your script performs a function call (either as part of a
++command substitution or not), or `source's a file, information about
++this action is saved.  The call stack then is this a history of the
++calls that got you to the point that you are currently stopped at.
++
++@cindex selected frame
++One of the stack frames is @dfn{selected} by @DBG and many
++@DBG commands refer implicitly to the selected frame.  In
++particular, whenever you ask @DBG to list lines without giving
++a line number or location the value is found in the selected frame.
++There are special @DBG commands to select whichever frame you
++are interested in. @xref{Selection, ,Selecting a frame}.
++
++When your program stops, @BASH automatically selects the
++currently executing frame and describes it briefly, similar to the
++@code{frame} command.
++
++
++@menu
++* Frames::                      Stack frames
++* Backtrace::                   Backtraces (where)
++* Selection::                   Selecting a frame (up, down, frame)
++
++@end menu
++
++@node Frames
++@subsection Stack frames
++
++@cindex frame, definition
++@cindex stack frame
++The call stack is divided up into contiguous pieces called @dfn{stack
++frames}, or @dfn{frames} for short; each frame is the data associated
++with one call to one function.  The frame contains the line number of
++the caller of the function, the source-file name that the line refers
++to and function name (which could be the built-in name ``source'')..
++
++@cindex initial frame
++@cindex outermost frame
++@cindex innermost frame
++When your script is started, the stack has only one frame, that of the
++function @code{main}.  This is called the @dfn{initial} frame or the
++@dfn{outermost} frame.  Each time a function is called, a new frame is
++made.  Each time a function returns, the frame for that function invocation
++is eliminated.  If a function is recursive, there can be many frames for
++the same function.  The frame for the function in which execution is
++actually occurring is called the @dfn{innermost} frame.  This is the most
++recently created of all the stack frames that still exist.
++
++@cindex frame number
++@value{DBG} assigns numbers to all existing stack frames, starting with
++zero for the innermost frame, one for the frame that called it,
++and so on upward.  These numbers do not really exist in your script;
++they are assigned by @value{DBG} to give you a way of designating stack
++frames in @value{DBG} commands.
++
++@node Backtrace
++@subsection Backtraces (@samp{where})
++
++@cindex backtraces
++@cindex tracebacks
++@cindex stack traces
++A backtrace is essentially the same as the call stack: a summary of
++how your script got where it is.  It shows one line per frame, for
++many frames, starting with the place that you sare stopped at (frame
++zero), followed by its caller (frame one), and on up the stack.
++
++@table @code
++@kindex backtrace
++@kindex bt @r{(@code{backtrace})}
++@item backtrace
++@itemx bt
++@itemx where
++@itemx T
++Print a backtrace of the entire stack: one line per frame for all
++frames in the stack.
++
++@item backtrace @var{n}
++@itemx bt @var{n}
++@itemx where @var{n}
++@itemx T @var{n}
++Similar, but print only the innermost @var{n} frames.
++
++@ifset FINISHED
++@item backtrace -@var{n}
++@itemx bt -@var{n}
++@itemx where -@var{n}
++@itemx T -@var{n}
++Similar, but print only the outermost @var{n} frames.
++@end ifset
++@end table
++
++@kindex where
++The names @code{where} and @code{T} are additional aliases for
++@code{backtrace}.
++
++Each line in the backtrace shows the frame number and the function
++name, the source file name and line number, as well as the function name.
++
++Here is an example of a backtrace taken a program in the
++regression-tests @file{parm.sh}.
++
++@smallexample
++@group
++% ../bashdb -n -L .. parm.sh
++Bourne-Again Shell Debugger, release @value{BASHRELEASE}
++Copyright 2002,2003 Rocky Bernstein
++This is free software, covered by the GNU General Public License, and you are
++welcome to change it and/or distribute copies of it under certain conditions.
++
++(./parm.sh:21):
++21:	fn1 5
++bashdb<0> @b{continue fn3}
++One-time breakpoint 1 set in file ./parm.sh, line 17.
++fn2: testing 1 2 3
++(./parm.sh:17):
++17:	fn3() @{
++bashdb<1> @b{where}
++->0 in file `./parm.sh' at line 14
++##1 fn3() called from file `./parm.sh' at line 14
++##2 fn2("testing 1", "2 3") called from file `parm.sh' at line 5
++##3 fn1("0") called from file `parm.sh' at line 9
++##4 fn1("1") called from file `parm.sh' at line 9
++##5 fn1("2") called from file `parm.sh' at line 9
++##6 fn1("3") called from file `parm.sh' at line 9
++##7 fn1("4") called from file `parm.sh' at line 9
++##8 fn1("5") called from file `parm.sh' at line 21
++##9 source("parm.sh") called from file `bashdb' at line 143
++##10 main("-n", "-L", "..", "parm.sh") called from file `bashdb' at line 0
++@end group
++@end smallexample
++
++@noindent
++The display for ``frame'' zero isn't a frame at all, although it has
++the same information minus a function name; it just indicates that
++your script has stopped at the code for line @code{14}
++of @code{./parm.sh}.
++
++@node Selection
++@subsection Selecting a frame (@samp{up}, @samp{down}, @samp{frame})
++
++Commands for listing source code in your script work on whichever
++stack frame is selected at the moment.  Here are the commands for
++selecting a stack frame; all of them finish by printing a brief
++description of the stack frame just selected.
++
++@table @code
++@kindex up
++@item up @var{n}
++Move @var{n} frames up the stack.  For positive numbers @var{n}, this
++advances toward the outermost frame, to higher frame numbers, to frames
++that have existed longer.  @var{n} defaults to one.
++
++@kindex down
++@kindex do @r{(@code{down})}
++@item down @var{n}
++Move @var{n} frames down the stack.  For positive numbers @var{n}, this
++advances toward the innermost frame, to lower frame numbers, to frames
++that were created more recently.  @var{n} defaults to one.  You may
++abbreviate @code{down} as @code{do}.
++@end table
++
++All of these commands end by printing two lines of output describing the
++frame.  The first line shows the frame number, the function name, the
++arguments, and the source file and line number of execution in that
++frame.  The second line shows the text of that source line.
++
++@need 100
++For example:
++
++@smallexample
++@group
++bashdb<8> @b{up}
++19:	sourced_fn
++bashdb<8> @b{T}
++##0 in file `./bashtest-sourced' at line 8
++->1 sourced_fn() called from file `bashtest-sourced' at line 19
++##2 source() called from file `bashdb-test1' at line 23
++##3 fn2() called from file `bashdb-test1' at line 33
++##4 fn1() called from file `bashdb-test1' at line 42
++##5 main() called from file `bashdb-test1' at line 0
++@end group
++@end smallexample
++
++After such a printout, the @code{list} command with no arguments
++prints ten lines centered on the point of execution in the frame.
++@xref{List, ,Printing source lines}.
++
++@table @code
++@kindex frame
++@cindex current stack frame
++@item frame @var{args}
++The @code{frame} command allows you to move from one stack frame to
++another, and to print the stack frame you select.  @var{args} is the
++the stack frame number.  Without an argument, @code{frame} prints the
++current stack frame.
++@end table
++
++@node List
++@section Examining Source Files (@samp{list})
++
++@value{DBG} can print parts of your script's source.  When your
++script stops, @value{DBG} spontaneously prints the line where it
++stopped.  Likewise, when you select a stack frame (@pxref{Selection,
++,Selecting a frame}), @value{DBG} prints the line where execution in
++that frame has stopped.  You can print other portions of source files
++by explicit command.
++
++If you use @value{DBG} through its @sc{gnu} Emacs interface, you may
++prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using
++@value{DBG} under @sc{gnu} Emacs}.
++
++@kindex list
++@kindex l @r{(@code{list})}
++To print lines from a source file, use the @code{list} command
++(abbreviated @code{l}).  By default, ten lines are printed.
++There are several ways to specify what part of the file you want to print.
++
++Here are the forms of the @code{list} command most commonly used:
++
++@table @code
++@item list @var{linenum}
++@itemx l @var{linenum}
++Print lines centered around line number @var{linenum} in the
++current source file.
++
++@item list @var{function}
++@itemx l @var{function}
++Print the text of @var{function}.
++
++@item list
++@itemx l
++Print more lines.  If the last lines printed were printed with a
++@code{list} command, this prints lines following the last lines
++printed; however, if the last line printed was a solitary line printed
++as part of displaying a stack frame (@pxref{Stack, ,Examining the
++Stack}), this prints lines centered around that line.
++
++@item list -
++@itemx l -
++Print lines just before the lines last printed.
++@end table
++
++By default, @value{DBG} prints ten source lines with any of these forms of
++the @code{list} command.  
++You can change this using @code{set listsize}:
++
++@table @code
++@kindex set listsize
++@item set listsize @var{count}
++Make the @code{list} command display @var{count} source lines (unless
++the @code{list} argument explicitly specifies some other number).
++
++@kindex show listsize
++@item show listsize
++Display the number of lines that @code{list} prints.
++@end table
++
++Repeating a @code{list} command with @key{RET} discards the argument,
++so it is equivalent to typing just @code{list}.  This is more useful
++than listing the same lines again.  An exception is made for an
++argument of @samp{-}; that argument is preserved in repetition so that
++each repetition moves up in the source file.
++
++@cindex linespec
++In general, the @code{list} command expects you to supply a
++@dfn{linespecs}.  Linespecs specify source lines; there are several ways
++of writing them, but the effect is always to specify some source line.
++
++Here is a complete description of the possible arguments for @code{list}:
++
++@table @code
++@item list @var{linespec}
++Print lines centered around the line specified by @var{linespec}.
++
++@item list @var{first} @var{increment}
++Print @var{increment} lines starting from @var{first}
++
++@item list @var{first}
++Print lines starting with @var{first}.
++
++@item list -
++Print lines just before the lines last printed.
++
++@item list .
++Print lines after where the script is stopped.
++
++@item list
++As described in the preceding table.
++@end table
++
++Here are the ways of specifying a single source line---all the
++kinds of linespec.
++
++@table @code
++@item @var{number}
++Specifies line @var{number} of the current source file.
++When a @code{list} command has two linespecs, this refers to
++the same source file as the first linespec.
++
++@item @var{filename}:@var{number}
++Specifies line @var{number} in the source file @var{filename}.
++
++@item @var{function}
++Specifies the line that function @var{function} is listed on.
++
++@ifset FINISHED
++@item @var{filename}:@var{function}
++Specifies the line of function @var{function} in the file
++@var{filename}.  You only need the file name with a function name to
++avoid ambiguity when there are identically named functions in
++different source files.
++@end ifset
++@end table
++
++@node Search
++@section Searching source files (@samp{search}, @samp{reverse}, @samp{/.../}, @samp{?..?})
++@cindex searching
++@kindex reverse-search
++
++There are two commands for searching through the current source file for a
++BASH extended pattern-matching expression.
++
++@table @code
++@kindex search
++@kindex forward
++@item forward @var{bash-pattern}
++@itemx search @var{bash-pattern}
++The command @samp{forward @var{bash-pattern}} checks each line,
++starting with the one following the current line, for a match for
++@var{bash-pattern} which is an extended bash pattern-matching
++expression.  It lists the line that is found.  You can use the synonym
++@samp{search @var{bash-pattern}} or abbreviate the command name as
++@code{fo} or @code{/@var{pat}/}.
++
++@item reverse @var{bash-pattern}
++The command @samp{reverse @var{bash-pattern}} checks each line, starting
++with the one before the last line listed and going backward, for a match
++for @var{bash-pattern}.  It lists the line that is found.  You can abbreviate
++this command as @code{rev} or @code{?@var{bash-pattern}?}.
++@end table
++
++@node Data
++@section Examining Data (@samp{print}, @samp{examine}, @samp{info variables})
++
++@cindex printing data
++@cindex examining data
++@kindex print
++
++One way to examine string data in your script is with the @code{print}
++command (abbreviated @code{p}). However a more versatile print command
++is @code{x}; it can print variable and function definitions and can do
++arithmetic computations. Finally, the most general method would be
++via @code{eval echo}.
++
++@table @code
++@kindex print
++@kindex p @r{(@code{print})}
++@item print @var{expr}
++
++Use @code{print} to dispay strings as you would from @code{echo}. And
++as such, variable names to be substituted have to be preceded with a
++dollar sign. As with echo, filename expansion, e.g. tilde expansion,
++is performed on unquoted strings. So for example if you want to print
++a *, you would write @samp{print "*"}, not @samp{print *}. If you want
++to have the special characters dollars sign appear, use a backslash.
++
++@item print
++@itemx p
++If you omit @var{expr}, @value{DBG} displays the last expression again.
++
++@item x @ovar{expr}
++@kindex x
++
++This is a smarter, more versatile ``print'' command, and although sometimes
++it might not be what you want, and you may want to resort to either
++@code{print} or @code{eval echo...}. 
++
++As with @code{print}, if you omit @var{expr}, @value{DBG} displays
++the last expression again.
++
++The @code{x} command first checks if @var{expr} is single variable. If
++it is, the definition and value are printed via @value{BASH}'s
++@code{declare -p} command. This will show the variable's attributes
++such as if it is read only or if it is an integer. If the variable is
++an array, that is show and the array values are printed.
++
++If instead @var{expr} is a function, the function definition is
++printed via @value{BASH}'s @code{declare -f} command. If @var{expr}
++was neither a variable nor an expression, then we try to get a value
++via @code{let}. And if this returns an error, as a last resort we call
++@code{print} and give what it outputs.
++
++Since @code{let} may be used internally and since (to my thinking)
++@code{let} does funny things, the results may seem odd unless you
++understand the sequence tried above and how @code{let} works. For
++example if the variable @code{foo} has value 5, then @samp{x foo} show
++the definition of foo with value 5, and @samp{x foo+5} prints 10 as
++expected. So far so good. However if @code{foo} is has value
++``string'', @samp{x foo+5} prints 5 because @code{let} has turned the
++string into 0; @samp{p foo+5} will simply print ``foo+5''; if you want
++the value of ``foo'' substituted inside a string, for example you
++expect ``the value of foo is $foo'' to come out ``the value of foo is
++5'', then the right command to use is @code{print} rather than
++@code{x}, making sure you add the dollar onto the beginning of the
++variable.
++
++@item V @ovar{!}@ovar{pattern}
++@kindex V
++
++If you want to @emph{all} list variables and there values or a set of
++variables by pattern, use this command.
++
++@smallexample
++@group
++bashdb<0> @b{V dq*}
++dq_args="dq_*"
++dq_cmd="V"
++@end group
++@end smallexample
++
++@end table
++
++@node Evaluation/Execution
++@section Running Arbitrary BASH and Shell commands (@samp{eval}, @samp{shell})
++
++The two most general commands and most ``low-level'' are @code{eval}
++and @code{shell}.
++
++@table @code
++@item eval
++@itemx e
++@kindex e
++
++In contrast to the commands of the last section the most general way
++to examine data is through @code{eval}. But you do much more with
++this; you can change the values of variables, since, you are just
++evaluating BASH code. 
++
++If you expect output, you should arrange that in the command, such as
++via @code{echo} or @code{printf}. For example, to print the value of
++@var{foo}, you would type @samp{e echo $foo}. This is bit longer than
++@samp{p $foo} or (when possible) @samp{x foo}. However suppose you
++wanted to find out how the builtin test operator @samp{[} works with
++the @samp{-z} test condition. You could use @code{eval} to do this
++such as @samp{e [ -z "$foo"] && echo "yes"}.
++
++@kindex shell
++@kindex !! @r{(@code{shell})}
++@cindex shell escape
++@item shell @var{command string}
++@itemx !!
++
++If you need to execute occasional shell commands during your
++debugging session, there is no need to leave or suspend @value{DBG}; you can
++just use the @code{shell} command or its alias @code{!!}.
++
++Invoke a shell to execute @var{command string}.
++
++@end table
++
++@node Auto Display
++@section Automatic display (@samp{display}, @samp{undisplay})
++@cindex automatic display
++@cindex display of expressions
++
++If you find that you want to print the value of an expression
++frequently (to see how it changes), you might want to add it to the
++@dfn{automatic display list} so that @value{DBG} evaluates a
++statement each time your program stops.  Each expression added to the
++list is given a number to identify it; to remove an expression from
++the list, you specify that number.  The automatic display looks like
++this:
++
++@example
++2 (echo $x): 38
++@end example
++
++@noindent
++This display shows item numbers, expressions and their current values.  
++
++@table @code
++@kindex display
++@item display @var{expr}
++Add the expression @var{expr} to the list of expressions to display
++each time your program stops.
++@end table
++
++@table @code
++@kindex delete display
++@kindex undisplay
++@item undisplay @var{dnums}@dots{}
++@itemx delete display @var{dnums}@dots{}
++Remove item numbers @var{dnums} from the list of expressions to display.
++
++@code{undisplay} does not repeat if you press @key{RET} after using it.
++(Otherwise you would just get the error @samp{No display number @dots{}}.)
++
++@kindex disable display
++@item disable display @var{dnums}@dots{}
++Disable the display of item numbers @var{dnums}.  A disabled display
++item is not printed automatically, but is not forgotten.  It may be
++enabled again later.
++
++@kindex enable display
++@item enable display @var{dnums}@dots{}
++Enable display of item numbers @var{dnums}.  It becomes effective once
++again in auto display of its expression, until you specify otherwise.
++
++@item display
++Display the current values of the expressions on the list, just as is
++done when your program stops.
++
++@kindex info display
++@item info display
++Print the list of expressions previously set up to display
++automatically, each one with its item number, but without showing the
++values.  This includes disabled expressions, which are marked as such.
++It also includes expressions which would not be displayed right now
++because they refer to automatic variables not currently available.
++@end table
++
++@node Controlling bashdb
++@section Controlling @DBG (@samp{set}, @samp{history})
++
++You can alter the way @BASH interacts with you by using the
++@code{set} command. 
++
++@menu
++* Annotate::                    Annotation Level (set annotate)
++* Prompt::                      Prompt (set prompt, show prompt)
++* Editing::                     Command editing (set editing, show editing)
++* Command Display::             Command display (set showcommand)
++* History::                     Command history (history, !, H)
++@end menu
++
++@node Annotate
++@subsection Annotation Level (@samp{set annoatate})
++
++The annotation level controls how much information does @value{DBG}
++print together with its prompt, values of expressions, source lines,
++and other types of output.  Level 0 is the normal, level 1 is for use
++when @value{DBG} is run as a subprocess of @sc{gnu} Emacs of @value{DDD},
++level 2 is the maximum annotation suitable for programs that control
++@value{DBGN}.
++
++@node Prompt
++@subsection Prompt (@samp{set prompt}, @samp{show prompt})
++
++@cindex prompt
++
++@value{dBGP} indicates its readiness to read a command by printing a
++string called the @dfn{prompt}.  This string is normally:
++@example
++bashdb$@{_Dbg_less@}$@{#_Dbg_history[@@]@}$@{_Dbg_greater@}$_Dbg_space
++@end example
++
++When variables inside the the prompt string are evaluated, the above
++becomes something like @samp{bashdb<5>} if this is the fifth command
++executed or perhaps @samp{bashdb<<2>>} if you have called the debugger
++from inside a debugger session and this is the second command inside
++the debugger session or perhaps @samp{bashdb<(6)>} if you 
++entered a subshell after the fifth command.
++
++You can change the prompt string with the @code{set prompt} command,
++although it is not normally advisable to do so without understanding
++the implications. If you are using the @value{DDD} GUI, it changes the
++changes the prompt and should not do so.  In certain other
++circumstances (such as writing a GUI like @value{DDD}), it may be is useful
++to change the prompt.
++
++@emph{Note:} @code{set prompt} does not add a space for you after the
++prompt you set.  This allows you to set a prompt which ends in a space
++or a prompt that does not. Furthermore due to a implementation
++limitation (resulting from a limitation of the bash built-in function
++``read''), to put a space at the end of the prompt use the
++@samp{$_Dbg_space} variable. 
++
++@table @code
++@kindex set prompt
++@item set prompt @var{newprompt}
++Directs @value{DBG} to use @var{newprompt} as its prompt string
++henceforth.
++
++@emph{Warning: changing the prompt can @value{DDD}'s ability to
++understand when the debugger is waiting for input.}
++
++@kindex show prompt
++@item show prompt
++Prints a line of the form: @samp{bashdb's prompt is: @var{your-prompt}}
++@end table
++
++@node Editing
++@subsection Command editing (@samp{set editing}, @samp{show editing})
++@cindex readline
++@cindex command line editing
++
++@value{DBG} reads its input commands through bash which uses via the
++@dfn{readline} interface.  This @sc{gnu} library provides consistent
++behavior for programs which provide a command line interface to the
++user.  Advantages are @sc{gnu} Emacs-style or @dfn{vi}-style inline
++editing of commands, @code{csh}-like history substitution, and a
++storage and recall of command history across debugging sessions.
++
++You may control the behavior of command line editing in @BASH with the
++command @code{set}.
++
++@table @code
++@kindex set editing
++@cindex editing
++@item set editing
++@itemx set editing on
++Enable command line editing (enabled by default).
++
++@item set editing off
++Disable command line editing.
++
++@kindex show editing
++@item show editing
++Show whether command line editing is enabled.
++@end table
++
++
++@node Command Display
++@subsection Command Display (@samp{set showcommand})
++
++The debugger normally lists the line number and source line of the for
++the statement to be next executed. Often this line contains one
++expression or one statement and it is clear from this line what's
++going to happen. However @BASH allows many expressions or
++statements to be put on a single source line; some lines
++contain several units of execution. Some examples of this
++behavior are listed below:
++
++@smallexample
++x=1; y=2; x=3
++(( x > 5 )) && x=5
++y=`echo *`
++@end smallexample
++
++In the first line of the example above, we have three assignment
++statements on a single line. In the second line of the example above
++we have a statement which gets run only if a condition tests true. And
++in the third line of the example above, we have a command that gets
++run and then the output of that is substituted in an assignemnt
++statement.  If you were single stepping inside the debugger, each line
++might get listed more than once before each of the actions that might
++get performed. (In the case of the conditional statement, the 
++line gets listed only once when the condition is false.)
++
++In order to assist understanding where you are, the enhanced version
++of @BASH maintains a dynamic variable @env{BASH_COMMAND} that
++contains piece of code next to be run (or is currently being run). The
++debugger has arranged to save this and can display this information
++or not. This is controlled by @code{set showcommand}. 
++
++@table @code
++@kindex set showcommand
++@item set showcommand @r{[}auto | on | off @r{]}
++controls whether or not to show the saved @env{BASH_COMMAND} for the
++command next to be executed.
++@end table
++
++When the value is @code{auto} the following heuristic is used to
++determine whether or not to display the saved @env{BASH_COMMAND}. If
++the last time you stopped you were at the same place and the command
++string has changed, then show the command. When the value @code{on} is
++used, the debugger always shows @env{BASH_COMMAND} and when
++@code{off} is used, the debugger nevers shows
++@env{BASH_COMMAND}. Note that listing the text of the source line is
++independent of whether or not the command is also listed.
++
++Some examples:
++@smallexample
++set showcommand auto      @b{This is the default}
++set showcommand on        @b{Always show the next command to be executed}
++set showcommand off       @b{Never show the next command to be executed}
++@end smallexample
++
++@node History
++@subsection Command history (@samp{H}, @samp{history}, @samp{!})
++
++@value{dBGP} can keep track of the commands you type during your
++debugging sessions, so that you can be certain of precisely what
++happened.  If the prompt has not been changed (see @ref{Prompt,
++,Prompt}), the history number that will be in use next is by default
++listed in the debugger prompt. Invalid commands and history commands
++are not saved on the history stack.
++
++@table @code
++@kindex H @r{[}@var{start-number} @ovar{end-number}@r{]}
++@item H @r{[}@var{start-number} @ovar{end-number}@r{]}
++@item H @ovar{-count}
++@itemx !@r{[}-@r{]}@var{n}:p
++
++You can list what is in the history stack with @code{H}. Debugger
++commands in ths history stack are listed from most recent to least recent.
++If no @var{start-number} is given we start with the most recently
++executed command and end with the first entry in the history stack.
++If @var{start-number} is given, that history number is listed first. If
++@var{end-number} is given, that history number is listed last. If a
++single negative number is given list that many history commands.
++
++An alternate form is @code{!@emph{n}:p} or @code{!-@emph{n}:p} where
++@emph{n} is an integer. If a minus sign is used, @emph{n} is taken as
++the count to go back from the end rather than as a absolute history
++number. In contrast @code{H}, this form only prints a @emph{single}
++history item.
++
++Some examples:
++@smallexample
++H      @b{List entire history}
++H -2   @b{List the last two history items}
++!-2:p  @b{List a single history item starting at the same place as above}
++H 5    @b{List history from history number 5 to the begining (number 0)}
++H 5 0  @b{Same as above}
++H 5 3  @b{List history from history number 5 down to history number 3}
++!5:p   @b{List a single history item 5}
++@end smallexample
++
++@kindex history @r{[}-@r{]}@r{[}@var{n}@r{]}
++@kindex !@r{[}-@r{]}@var{n} @r{(@code{history})}
++@item history @r{[}@r{[}-@r{]}@var{n}@r{]}
++@itemx !@r{[}-@r{]}@var{n}
++
++Use this command to reexecute a given history number. If no number is
++given, the last debugger command in the history is executed.
++
++An alternate form is @code{!@emph{n}} or @code{!-@emph{n}} where
++@emph{n} is an integer. 
++
++If a minus sign is used in in either form, @emph{n} is taken as the
++count to go back from the end rather than as a absolute history
++number.
++
++@end table
++
++@ifset FINISHED
++Use these commands to manage the @value{DBGN} command
++history facility.
++
++@table @code
++@cindex history substitution
++@cindex history file
++@kindex set history filename
++@kindex GDBHISTFILE
++@item set history filename @var{fname}
++Set the name of the @BASH command history file to @var{fname}.
++This is the file where @BASH reads an initial command history
++list, and where it writes the command history from this session when it
++exits.  You can access this list through history expansion or through
++the history command editing characters listed below.  This file defaults
++to the value of the environment variable @code{GDBHISTFILE}, or to
++@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable
++is not set.
++
++@cindex history save
++@kindex set history save
++@item set history save
++@itemx set history save on
++Record command history in a file, whose name may be specified with the
++@code{set history filename} command.  By default, this option is disabled.
++
++@item set history save off
++Stop recording command history in a file.
++
++@cindex history size
++@kindex set history size
++@item set history size @var{size}
++Set the number of commands which @BASH keeps in its history list.
++This defaults to the value of the environment variable
++@code{HISTSIZE}, or to 256 if this variable is not set.
++@end table
++
++@cindex history expansion
++History expansion assigns special meaning to the character @kbd{!}.
++
++Since @kbd{!} is also the logical not operator in C, history expansion
++is off by default. If you decide to enable history expansion with the
++@code{set history expansion on} command, you may sometimes need to
++follow @kbd{!} (when it is used as logical not, in an expression) with
++a space or a tab to prevent it from being expanded.  The readline
++history facilities do not attempt substitution on the strings
++@kbd{!=} and @kbd{!(}, even when history expansion is enabled.
++
++The commands to control history expansion are:
++
++@table @code
++@kindex set history expansion
++@item set history expansion on
++@itemx set history expansion
++Enable history expansion.  History expansion is off by default.
++
++@item set history expansion off
++Disable history expansion.
++
++The readline code comes with more complete documentation of
++editing and history expansion features.  Users unfamiliar with @sc{gnu} Emacs
++or @code{vi} may wish to read it.
++
++@c @group
++@kindex show history
++@item show history
++@itemx show history filename
++@itemx show history save
++@itemx show history size
++@itemx show history expansion
++These commands display the state of the @BASH history parameters.
++@code{show history} by itself displays all four states.
++@c @end group
++@end table
++
++@table @code
++@kindex shows
++@item sh