-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 I wanted to play with debugging a bash script:
$ echo 'echo hello' > foo $ bash --debugger foo hello $ sudo yum install bashdb -y ... $ bash --debugger foo bash debugger, bashdb, release 4.2-0.8 Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 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. (/home/eblake/foo:1): 1: echo hello bashdb<0> run Restarting with: '' hello $ I can understand why the --debugger option forwards to the bashdb script when that is installed (that's obviously a choice that my distro packager has made, to configure bash so that the --debugger option tries to use /usr/bin/bashdb as its DEBUGGER_START_FILE; see shell.c:start_debugger()). But it was surprising to me that until I installed bashdb, the --debugger option was silently ignored. I was expecting something like: $ bash --debugger foo bash: debug script /usr/bin/bashdb: file not found to give me a heads up that I need to install bashdb. Would it make sense to make the explicit use of --debugger be fatal if a debugger start file is configured but not present? - -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUb/VrAAoJEKeha0olJ0NqyqQIAKFcVsgNs74wWGu2Q291BVti r/+JtPJVA5B4rBSPaog3+lJNor8IVWeTsR8MluPORGSStqPcbw8e+MKl9tUtFfZ0 NrDKOgJJN0t1zJdM/pPkZlxjW7GWmm4Lknp6LOLon51npBNcq42lNEE+giO/j8zY aqjCdmHbAcFaJONC9uwn+YY8yAbor5XBwC4jHv4XXlYQjB/jlGopbkJ6LO4xXmI3 9Z7Irhtz4QGvaNLTzKD3JoFFc3biklGDNO3L7ACmd79ebSERBDP/XPeDUy6eDrp0 /WjBVjpaGB+uRj2APSXo2Q6U6dH/kb7p9pFwKo3NFONBcvskaFKYagOXUSD76bw= =25Ju -----END PGP SIGNATURE-----