bug-bash
[Top][All Lists]
Advanced

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

Re: bash --debugger on a script with no arguments


From: Rocky Bernstein
Subject: Re: bash --debugger on a script with no arguments
Date: Wed, 29 Apr 2015 21:07:14 -0400

Ok. I see my mistake. That long _expression_ is deceptively similar to the other long _expression_; neither has a comment as to what's going on. 

As you suggest, I've tested from the git devel branch and yes, this works.  

Chet writes: 
> Since dollar_vars[0] is always set, testing it would not have any effect.

Ok. If  you had written this, it might have saved a bit of back-and-forth by mentioning this right at the beginning. 

And to the end of being more informative, In the thread you cited, there was a suggestion about being more informative about skipping debugger_start() :
> > Maybe something like this:
> > 
> > bash: foo: debugger /usr/local/share/bashdb/bashdb-main.inc: No such file or 
> > directory
> > bash: foo: disabling debugging mode
...
> > bash: foo: debugger /usr/bin/x: Permission denied
> > bash: foo: disabling debugging mode

It wouldn't be that hard to add this in an "else" branch.

Thanks. and Thanks for addressing this issue.



On Wed, Apr 29, 2015 at 8:22 PM, Chet Ramey <address@hidden> wrote:
On 4/29/15 8:05 PM, Rocky Bernstein wrote:
> I am sure you have changed this as you said. But I just don't see it in the
> current source on savannah in the devel branch. For example I looked at:
>
> http://git.savannah.gnu.org/cgit/bash.git/tree/shell.c?h=devel
>
> Is there a URL like the one above folks can look at and see the change?

I am not sure what you're talking about. The code change is in there:

  if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0
&& (dollar_vars[1] || interactive_shell == 0))
    start_debugger ();

If it doesn't work like you think it should, let me know, but at least
test it first.

Don't assume it wasn't changed just because it doesn't test dollar_vars[0].
Since dollar_vars[0] is always set, testing it would not have any effect.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/


reply via email to

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