From: Rob W. <rcw...@gm...> - 2009-10-22 18:41:02
|
I tried using bashdb for the first time. I was impressed with how well it was working on a 32000 line ./configure script. It had some trouble on line 23000 with a for loop. I created a simple testcase that causes the problem to appear: #!/bin/bash for i in /bin /etc; do echo $i done The script executes successfully without the debugger, but when the debugger is used it gives the following output: $ bashdb bashdb_test.sh bash debugger, release 4.0-0.3 Copyright 2002, 2003, 2004, 2006, 2007, 2008 Rocky Bernstein This is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. (/tmp/bashdb_test.sh:3): 3: for i in /bin /etc; do bashdb<0> c bashdb_test.sh: line 3: /bin: syntax error: operand expected (error token is "/bin") Debugged program terminated with code 1. Use q to quit or R to restart. bashdb<1> I'm using bashdb, release 4.0-0.3 on Fedora 11 I'm happy to assist with the debugging if there's anything I can help with. Cheers, Rob |
From: Rocky B. <roc...@gm...> - 2009-10-22 19:37:04
|
Simple attempts to isolate the problem elude me so further research is needed. However I note if the debugger is installed and bash knows about it (i.e. has been compiled the right way) then this seems to work even though the banner comes out multiple times: $/bin/bash --debugger /tmp/bashdbbug.sh Shell Debugger, release Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009 Rocky Bernstein This is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Bourne-Again Shell Debugger, release Copyright 2002, 2003, 2004, 2006, 2007, 2008 Rocky Bernstein This is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Shell Debugger, release Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009 Rocky Bernstein This is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. (/tmp/bashdbbug.sh:3): 3: for i in /bin /etc; do bashdb<0> c /bin /etc On Thu, Oct 22, 2009 at 2:40 PM, Rob Woolley <rcw...@gm...> wrote: > I tried using bashdb for the first time. I was impressed with how well it > was working on a 32000 line ./configure script. > > It had some trouble on line 23000 with a for loop. I created a simple > testcase that causes the problem to appear: > > #!/bin/bash > > for i in /bin /etc; do > echo $i > done > > The script executes successfully without the debugger, but when the > debugger is used it gives the following output: > > $ bashdb bashdb_test.sh > bash debugger, release 4.0-0.3 > > Copyright 2002, 2003, 2004, 2006, 2007, 2008 Rocky Bernstein > This is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > > (/tmp/bashdb_test.sh:3): > 3: for i in /bin /etc; do > bashdb<0> c > bashdb_test.sh: line 3: /bin: syntax error: operand expected (error token > is "/bin") > Debugged program terminated with code 1. Use q to quit or R to restart. > bashdb<1> > > I'm using bashdb, release 4.0-0.3 on Fedora 11 > > I'm happy to assist with the debugging if there's anything I can help with. > > Cheers, > Rob > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Bashdb-help mailing list > Bas...@li... > https://lists.sourceforge.net/lists/listinfo/bashdb-help > > |
From: Rocky B. <roc...@gm...> - 2009-10-23 03:25:09
|
Ok. I think I have found and fixed the problem. Thanks for whittling it down to something manageable. (It was something really silly; surprising it wasn't detected earlier.) Please try out what's in git on sourceforge or the candidate release tarball http://bashdb.sourceforge.net/bashdb-4.0-0.4git.tar.bz2 There will probably be a general release soon. Thanks On Thu, Oct 22, 2009 at 3:36 PM, Rocky Bernstein <roc...@gm...>wrote: > Simple attempts to isolate the problem elude me so further research is > needed. > > However I note if the debugger is installed and bash knows about it (i.e. > has been compiled the right way) then this seems to work even though the > banner comes out multiple times: > > $/bin/bash --debugger /tmp/bashdbbug.sh > Shell Debugger, release > > Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009 Rocky Bernstein > This is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > > Bourne-Again Shell Debugger, release > > Copyright 2002, 2003, 2004, 2006, 2007, 2008 Rocky Bernstein > This is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > > Shell Debugger, release > > Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009 Rocky Bernstein > This is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > > (/tmp/bashdbbug.sh:3): > 3: for i in /bin /etc; do > bashdb<0> c > /bin > /etc > > On Thu, Oct 22, 2009 at 2:40 PM, Rob Woolley <rcw...@gm...> wrote: > >> I tried using bashdb for the first time. I was impressed with how well it >> was working on a 32000 line ./configure script. >> >> It had some trouble on line 23000 with a for loop. I created a simple >> testcase that causes the problem to appear: >> >> #!/bin/bash >> >> for i in /bin /etc; do >> echo $i >> done >> >> The script executes successfully without the debugger, but when the >> debugger is used it gives the following output: >> >> $ bashdb bashdb_test.sh >> bash debugger, release 4.0-0.3 >> >> Copyright 2002, 2003, 2004, 2006, 2007, 2008 Rocky Bernstein >> This is free software, covered by the GNU General Public License, and you >> are >> welcome to change it and/or distribute copies of it under certain >> conditions. >> >> (/tmp/bashdb_test.sh:3): >> 3: for i in /bin /etc; do >> bashdb<0> c >> bashdb_test.sh: line 3: /bin: syntax error: operand expected (error token >> is "/bin") >> Debugged program terminated with code 1. Use q to quit or R to restart. >> bashdb<1> >> >> I'm using bashdb, release 4.0-0.3 on Fedora 11 >> >> I'm happy to assist with the debugging if there's anything I can help >> with. >> >> Cheers, >> Rob >> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> _______________________________________________ >> Bashdb-help mailing list >> Bas...@li... >> https://lists.sourceforge.net/lists/listinfo/bashdb-help >> >> > |
From: Rob W. <rcw...@gm...> - 2009-10-23 10:54:56
|
Hi Rocky, That's great news! I've seen comments about complications with building bashdb correctly so I'll be a little explicit in what I tested: I cloned the git repo. Then ran ./autogen.sh and make. Then used "./bashdb -L . /tmp/bashdb_test.sh" to debug my script from within the top-level of my git clone. The testcase I provided passed without any problems. Originally the problem I saw used: "for i in $foo" with foo="/path" so I tested that too. That worked perfectly as well. Thanks, Rob On Thu, Oct 22, 2009 at 11:24 PM, Rocky Bernstein <roc...@gm... > wrote: > Ok. I think I have found and fixed the problem. Thanks for whittling it > down to something manageable. > > (It was something really silly; surprising it wasn't detected earlier.) > Please try out what's in git on sourceforge or the candidate release tarball > http://bashdb.sourceforge.net/bashdb-4.0-0.4git.tar.bz2 > > There will probably be a general release soon. > > Thanks > > > On Thu, Oct 22, 2009 at 3:36 PM, Rocky Bernstein < > roc...@gm...> wrote: > >> Simple attempts to isolate the problem elude me so further research is >> needed. >> >> However I note if the debugger is installed and bash knows about it (i.e. >> has been compiled the right way) then this seems to work even though the >> banner comes out multiple times: >> >> $/bin/bash --debugger /tmp/bashdbbug.sh >> Shell Debugger, release >> >> Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009 Rocky Bernstein >> This is free software, covered by the GNU General Public License, and you >> are >> welcome to change it and/or distribute copies of it under certain >> conditions. >> >> Bourne-Again Shell Debugger, release >> >> Copyright 2002, 2003, 2004, 2006, 2007, 2008 Rocky Bernstein >> This is free software, covered by the GNU General Public License, and you >> are >> welcome to change it and/or distribute copies of it under certain >> conditions. >> >> Shell Debugger, release >> >> Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009 Rocky Bernstein >> This is free software, covered by the GNU General Public License, and you >> are >> welcome to change it and/or distribute copies of it under certain >> conditions. >> >> (/tmp/bashdbbug.sh:3): >> 3: for i in /bin /etc; do >> bashdb<0> c >> /bin >> /etc >> >> On Thu, Oct 22, 2009 at 2:40 PM, Rob Woolley <rcw...@gm...> wrote: >> >>> I tried using bashdb for the first time. I was impressed with how well >>> it was working on a 32000 line ./configure script. >>> >>> It had some trouble on line 23000 with a for loop. I created a simple >>> testcase that causes the problem to appear: >>> >>> #!/bin/bash >>> >>> for i in /bin /etc; do >>> echo $i >>> done >>> >>> The script executes successfully without the debugger, but when the >>> debugger is used it gives the following output: >>> >>> $ bashdb bashdb_test.sh >>> bash debugger, release 4.0-0.3 >>> >>> Copyright 2002, 2003, 2004, 2006, 2007, 2008 Rocky Bernstein >>> This is free software, covered by the GNU General Public License, and you >>> are >>> welcome to change it and/or distribute copies of it under certain >>> conditions. >>> >>> (/tmp/bashdb_test.sh:3): >>> 3: for i in /bin /etc; do >>> bashdb<0> c >>> bashdb_test.sh: line 3: /bin: syntax error: operand expected (error token >>> is "/bin") >>> Debugged program terminated with code 1. Use q to quit or R to restart. >>> bashdb<1> >>> >>> I'm using bashdb, release 4.0-0.3 on Fedora 11 >>> >>> I'm happy to assist with the debugging if there's anything I can help >>> with. >>> >>> Cheers, >>> Rob >>> >>> >>> ------------------------------------------------------------------------------ >>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >>> is the only developer event you need to attend this year. Jumpstart your >>> developing skills, take BlackBerry mobile applications to market and stay >>> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >>> http://p.sf.net/sfu/devconference >>> _______________________________________________ >>> Bashdb-help mailing list >>> Bas...@li... >>> https://lists.sourceforge.net/lists/listinfo/bashdb-help >>> >>> >> > |