Feature request: save/restore BASH_REMATCH across debug hook calls

2019-10-16 Thread Rocky Bernstein
Current in bash 5.0 and earlier, the value of BASH_REMATCH might chanted inside a debug hook. Since BASH_REMATCH is read-only, resetting the value on hook return to the debugged program is a bit tricky and fragile... There are way to change a bash readonly variable but that involve using either

Re: while loop with extdebug + debug trap always returning 1

2017-04-08 Thread Rocky Bernstein
Bashdb skip help is now https://sourceforge.net/p/bashdb/code/ci/master/tree/command/skip.sh#l30 If this is incorrect, deficient, or you have improvements, let me know. Thanks. On Sat, Apr 8, 2017 at 7:52 PM, Rocky Bernstein <ro...@gnu.org> wrote: > Good point! Will make note of

Re: bashdb sig-test.sh failure

2015-10-26 Thread Rocky Bernstein
No failure using 4.4.0(1)-beta (x86_64-unknown-linux-gnu). Thanks. I'll adjust things on my side then. On Mon, Oct 26, 2015 at 2:00 PM, Chet Ramey <chet.ra...@case.edu> wrote: > On 10/26/15 1:25 PM, Rocky Bernstein wrote: > > > Bash Version: 4.3 > > Patch Level: 11 >

bashdb sig-test.sh failure

2015-10-26 Thread Rocky Bernstein
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale'

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 chet.ra...@case.edu 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 Copyright

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 chet.ra...@case.edu 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

bash --debugger on a script with no arguments

2015-04-29 Thread Rocky Bernstein
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. An example will probably make this clear. Suppose */tmp/foo.sh* is: echo hi And you run: bash --debugger /tmp/foo.sh I get hi

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

2015-04-29 Thread Rocky Bernstein
. But this is different from the problem encountered. On Wed, Apr 29, 2015 at 10:57 AM, Chet Ramey chet.ra...@case.edu wrote: 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

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

2015-04-29 Thread Rocky Bernstein
. On Wed, Apr 29, 2015 at 7:21 PM, Chet Ramey chet.ra...@case.edu wrote: 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

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

2015-04-29 Thread Rocky Bernstein
this in an else branch. Thanks. and Thanks for addressing this issue. On Wed, Apr 29, 2015 at 8:22 PM, Chet Ramey chet.ra...@case.edu 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

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 chet.ra...@case.edu 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

How does one make a bash builtin (shared loadable module) on cygwin?

2011-05-18 Thread Rocky Bernstein
I am trying to build a bash builtin on cygwin. Here's the error message I get via automake/make: $ make gcc -g -O2 -o set0.exe -shared set0-set0.o set0-set0.o: In function `set0_builtin': /tmp/bashdb/builtin/set0.c:46: undefined reference to `_builtin_error' /tmp/bashdb/builtin/set0.c:47:

Re: What exactly does read -e do? bind weirdnesses

2008-09-23 Thread Rocky Bernstein
On Tue, Sep 23, 2008 at 8:46 AM, Chet Ramey [EMAIL PROTECTED] wrote: Rocky Bernstein wrote: Sorry for the delayed reply. As I now understand it, the situation right now seems a bit inconsistent. read -e in a script uses emacs bindings by default even if I've entered set -o emacs which I note

Re: What exactly does read -e do? bind weirdnesses

2008-09-17 Thread Rocky Bernstein
of the compressed information, although I think there are other issues such as lack of examples or overall organization as well. On Sat, Sep 13, 2008 at 6:29 PM, Chet Ramey [EMAIL PROTECTED] wrote: Rocky Bernstein wrote: There is a connection between the set -o emacs, set -o vi, and set -o

Re: What exactly does read -e do? bind weirdnesses

2008-09-11 Thread Rocky Bernstein
Many thanks for the explanation. I've just updated bashdb CVS to add an edit style (emacs/vi) and which will give more complete readline handling in entering debugger commands. There still is some weirdness in how history retrieval works, but I need to isolate what's going on there. And it looks

Re: What exactly does read -e do? bind weirdnesses

2008-09-11 Thread Rocky Bernstein
which no longer are in effect. I threw in the bind command just to try to help me see what was going on. On Thu, Sep 11, 2008 at 11:36 AM, Chet Ramey [EMAIL PROTECTED] wrote: Rocky Bernstein wrote: Many thanks for the explanation. I've just updated bashdb CVS to add an edit style (emacs/vi

Re: What exactly does read -e do? bind weirdnesses

2008-09-11 Thread Rocky Bernstein
There is a connection between the set -o emacs, set -o vi, and set -o history commands and the way read -e works. But there is nothing that I could find in any of the bash/readline/history documents that make this connection explicit. Changing one of these line editing settings changes key