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

2015-05-05 Thread Rocky Bernstein
On Tue, May 5, 2015 at 2:54 PM, Chet Ramey wrote: > On 4/30/15 9:27 AM, Chet Ramey wrote: > > On 4/29/15 10:31 PM, Rocky Bernstein wrote: > > > >> $ ./bash --debugger -i /tmp/foo.sh > >> hi > >> > >> $ ./bash --debugger /tmp/foo.sh > >> bash debugger, bashdb, release 4.3-0.91 > >> > >> Copyrig

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

2015-05-05 Thread Chet Ramey
On 4/30/15 9:27 AM, Chet Ramey wrote: > On 4/29/15 10:31 PM, Rocky Bernstein wrote: > >> $ ./bash --debugger -i /tmp/foo.sh >> hi >> >> $ ./bash --debugger /tmp/foo.sh >> bash debugger, bashdb, release 4.3-0.91 >> >> Copyright 2002, 2003, 2004, 2006-2012, 2014 Rocky Bernstein >> This is free so

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

2015-04-30 Thread Rocky Bernstein
Thanks. On Thu, Apr 30, 2015 at 9:27 AM, Chet Ramey wrote: > On 4/29/15 10:31 PM, Rocky Bernstein wrote: > > > $ ./bash --debugger -i /tmp/foo.sh > > hi > > > > $ ./bash --debugger /tmp/foo.sh > > bash debugger, bashdb, release 4.3-0.91 > > > > Copyright 2002, 2003, 2004, 2006-2012, 2014 Rock

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

2015-04-30 Thread Chet Ramey
On 4/29/15 10:31 PM, Rocky Bernstein wrote: > $ ./bash --debugger -i /tmp/foo.sh > hi > > $ ./bash --debugger /tmp/foo.sh > bash debugger, bashdb, release 4.3-0.91 > > Copyright 2002, 2003, 2004, 2006-2012, 2014 Rocky Bernstein > This is free software, covered by the GNU General Public Licens

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

2015-04-29 Thread Rocky Bernstein
/bash --debugger -i /tmp/foo.sh hi On Wed, Apr 29, 2015 at 9:39 PM, Chet Ramey wrote: > On 4/29/15 9:07 PM, Rocky Bernstein wrote: > > > 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() :

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

2015-04-29 Thread Chet Ramey
On 4/29/15 9:07 PM, Rocky Bernstein wrote: > 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/

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

2015-04-29 Thread Rocky Bernstein
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

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

2015-04-29 Thread Chet Ramey
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 a

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

2015-04-29 Thread Rocky Bernstein
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? Thanks. On

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

2015-04-29 Thread Chet Ramey
On 4/29/15 1:51 PM, Rocky Bernstein wrote: > Now I am really confused and I am not sure we are talking about the same > thing We really are. > In bash-4.3.30 on ftp://ftp.gnu.org/gnu/bash at line 723 of shell.c > there is: > > if (debugging_mode && locally_skip_execution == 0 && running_setui

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

2015-04-29 Thread Rocky Bernstein
Now I am really confused and I am not sure we are talking about the same thing. In bash-4.3.30 on ftp://ftp.gnu.org/gnu/bash at line 723 of shell.c there is: if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0 && dollar_vars[1]) start_debugger (); Shouldn't dollar_vars[

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

2015-04-29 Thread Chet Ramey
On 4/28/15 10:11 PM, Rocky Bernstein wrote: > It's come to my attention that running bash --debugger doesn't source > DEBUGGER_START_FILE when the script to be debugged isn't followed by any > arguments. This was changed last November in the devel branch as part of a set of changes to make the ab