Debian Bug report logs -
#403304
bashdb: bash --debugger doesn't start the debugger
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Oleksandr Moskalenko <malex@debian.org>:
Bug#403304; Package bashdb.
(full text, mbox, link).
Acknowledgement sent to Lionel Elie Mamane <lionel@mamane.lu>:
New Bug report received and forwarded. Copy sent to Oleksandr Moskalenko <malex@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: bashdb
Version: 3.1.0.7-1
Severity: normal
The documentation says:
There are in fact two other ways to start the BASH debugger. The first
way is to pass the `--debugger' option to bash with the name of your
script the scripts arguments following that, (...)
bash --debugger script script-arguments...
But this doesn't work; it just runs the script, not entering the debugger.
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-amd64
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8)
Versions of packages bashdb depends on:
ii bash 3.1dfsg-8 The GNU Bourne Again SHell
ii emacsen-common 1.4.17 Common facilities for all emacsen
bashdb recommends no packages.
-- no debconf information
Tags added: confirmed
Request was from Oleksandr Moskalenko <malex@tagancha.org>
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#403304; Package bashdb.
(full text, mbox, link).
Acknowledgement sent to Oleksandr Moskalenko <malex@debian.org>:
Extra info received and forwarded to list.
(full text, mbox, link).
Message #14 received at 403304@bugs.debian.org (full text, mbox, reply):
* Lionel Elie Mamane <lionel@mamane.lu> [2006-12-16 06:04:59 +0100]:
> Package: bashdb
> Version: 3.1.0.7-1
> Severity: normal
>
> The documentation says:
>
> There are in fact two other ways to start the BASH debugger. The first
> way is to pass the `--debugger' option to bash with the name of your
> script the scripts arguments following that, (...)
>
> bash --debugger script script-arguments...
>
> But this doesn't work; it just runs the script, not entering the debugger.
>
> -- System Information:
> Debian Release: 4.0
> APT prefers unstable
> APT policy: (500, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> Shell: /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.18-3-amd64
> Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8)
>
> Versions of packages bashdb depends on:
> ii bash 3.1dfsg-8 The GNU Bourne Again SHell
> ii emacsen-common 1.4.17 Common facilities for all emacsen
>
> bashdb recommends no packages.
>
> -- no debconf information
Lionel,
This bug is on the bash side. It should be fixed soon I hope. Right now you
can fix it temporarily by making a symlink from
/usr/local/lib/bashdb/bashdb-main.inc to /usr/share/bashdb/dbg-main.inc (ln -s
/usr/share/bashdb/dbg-main.inc /usr/local/lib/bashdb/bashdb-main.inc).
Regards,
Alex.
Bug reassigned from package `bashdb' to `bash'.
Request was from Oleksandr Moskalenko <malex@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Tags added: fixed-upstream
Request was from bts-link-upstream@lists.alioth.debian.org
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#403304; Package bash.
(full text, mbox, link).
Acknowledgement sent to Evgeny Stambulchik <fnevgeny@weizmann.ac.il>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(full text, mbox, link).
Message #23 received at 403304@bugs.debian.org (full text, mbox, reply):
Package: bash
Version: 3.1dfsg-8
Followup-For: Bug #403304
$ strings /bin/bash |grep bashdb
/usr/local/lib/bashdb/bashdb-main.inc
$ ls -ld /usr/share/bashdb
ls: /usr/share/bashdb: No such file or directory
$ ls -ld /usr/lib/bashdb
ls: /usr/lib/bashdb: No such file or directory
Also, mind you, this is a (weak) security issue: files under /usr/local
are typically under a looser security control, so invoking bash debugger
may result in unpredictable things.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17.2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages bash depends on:
ii base-files 4 Debian base system miscellaneous f
ii debianutils 2.17 Miscellaneous utilities specific t
ii libc6 2.3.6.ds1-13etch2 GNU C Library: Shared libraries
ii libncurses5 5.5-5 Shared libraries for terminal hand
bash recommends no packages.
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#403304; Package bash.
(Thu, 24 Apr 2014 22:09:10 GMT) (full text, mbox, link).
Acknowledgement sent
to Stéphane Aulery <lkppo@free.fr>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Thu, 24 Apr 2014 22:09:10 GMT) (full text, mbox, link).
Message #28 received at 403304@bugs.debian.org (full text, mbox, reply):
Upstream comments:
This is a common installation problem where the bash executable points
to a place different than bashdb is installed. Basically you want to run
strings `which bash` | grep bashdb
and make sure that file points to the installed dbg-main.inc
http://sourceforge.net/p/bashdb/bugs/8/#2906
--
Stéphane Aulery
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#403304; Package bash.
(Mon, 12 Oct 2015 20:24:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Nicholas Bamber <nicholas@periapt.co.uk>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Mon, 12 Oct 2015 20:24:03 GMT) (full text, mbox, link).
Message #33 received at 403304@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
My investigations indicate that it is still true that as per Debian bug
report (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403304)
--debugger does NOT start the debugger UNLESS the debugged script has a
$1. For example
/bin/bash --debugger -- ~/scripts/ex1.sh
will just run the script but
/bin/bash --debugger -- ~/scripts/ex1.sh XXX
will enter the debugger. To comment on the other prior information on
the Debian bug report:
1. The upstream bashdb developer is correct that checking "strings
`which bash` | grep bashdb" is a good test for whether bash will find
bashdb-main.inc, but this is not relevant to Debian becase this is set
correctly in Debian's case.
2. If you take an upstream tarball of bash and compile it then even the
extra $1 will not make the debugger run under that bash, unless you link
the upsteram location of '/usr/local/share/bashdb' to the Debian value
of /usr/share/bashdb.
In other words the other commenters were correct but had not got to the
root issue. The root issue is appears to be this line in shell.c in the
bash code:
if (debugging_mode && locally_skip_execution == 0 && running_setuid
== 0 && dollar_vars[1])
start_debugger ();
I enclose a patch that I believe would address this, and suggest it is
an upstream bash issue.
[bashdb_fix.patch (text/x-diff, attachment)]
Added indication that 403304 affects bashdb
Request was from Nicholas Bamber <nicholas@periapt.co.uk>
to control@bugs.debian.org.
(Mon, 12 Oct 2015 21:00:03 GMT) (full text, mbox, link).
Removed tag(s) fixed-upstream.
Request was from Nicholas Bamber <nicholas@periapt.co.uk>
to control@bugs.debian.org.
(Mon, 12 Oct 2015 21:00:04 GMT) (full text, mbox, link).
Added tag(s) patch and upstream.
Request was from Nicholas Bamber <nicholas@periapt.co.uk>
to control@bugs.debian.org.
(Mon, 12 Oct 2015 21:00:04 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#403304; Package bash.
(Tue, 13 Oct 2015 13:21:08 GMT) (full text, mbox, link).
Acknowledgement sent
to chet.ramey@case.edu:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>.
(Tue, 13 Oct 2015 13:21:08 GMT) (full text, mbox, link).
Message #46 received at 403304@bugs.debian.org (full text, mbox, reply):
On 10/12/15 4:16 PM, Nicholas Bamber wrote:
> My investigations indicate that it is still true that as per Debian bug
> report (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403304)
> --debugger does NOT start the debugger UNLESS the debugged script has a $1.
We discussed this in a thread on bug-bash back in April:
http://lists.gnu.org/archive/html/bug-bash/2015-04/msg00183.html
This discussion references an earlier bug report concerning whether the
--debugger option should produce an error if the bashdb script is not
installed. There is also an issue with bashdb misbehaving when run in
an interactive shell; that was the reason for the check of $1 in the
first place.
Part of that thread explains why a check of $0 is not correct: since $0
is always set, a check for it has no effect.
The final change that solves both problems went into the bash development
branch in early May, and will be in bash-4.4.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Dec 6 06:22:19 2023;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.