bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash --debugger does nothing if debug script not installed


From: Eric Blake
Subject: bash --debugger does nothing if debug script not installed
Date: Fri, 21 Nov 2014 19:31:07 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

-----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-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]