Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11644

Debian: bash --debugger doesn't start the debugger

From Nicholas Bamber <nicholas@periapt.co.uk>
Newsgroups gnu.bash.bug
Subject Debian: bash --debugger doesn't start the debugger
Date 2015-10-12 21:16 +0100
Organization Periapt Technologies
Message-ID <mailman.210.1444724588.7904.bug-bash@gnu.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Debian: bash --debugger doesn't start the debugger Nicholas Bamber <nicholas@periapt.co.uk> - 2015-10-12 21:16 +0100

csiph-web