I'm not sure whether this is a bug or not, so I'm asking here.
Given this script, called test.sh:
1
2
3
4
5
6
#!/bin/bashset -e
echo hi
exit0
I am presented with this disappointing bashdb session:
> ./bashdb /tmp/test.sh
bash debugger, bashdb, release 4.4-0.92
Copyright 2002-2004, 2006-2012, 2014, 2016-2017 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/test.sh:3):
3: set -e
bashdb<0> s
Debugged program terminated with code 1. Use q to quit or R to restart.
bashdb<1>
Is this a bug? Something I'm doing wrong?
Last edit: Adam Di Carlo 2017-07-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Copyright 2002-2004, 2006-2012, 2014, 2016-2017 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/test.sh:3):
3: set -e
bashdb<0> s
Debugged program terminated with code 1. Use q to quit or R to restart.
bashdb<1>
Copyright 2002-2004, 2006-2012, 2014, 2016-2017 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/test.sh:3):
3: set -e
bashdb<0> s
(/tmp/test.sh:5):
5: echo hi
bashdb<1>
hi
(/tmp/test.sh:6):
6: exit 0
bashdb<2>
(/tmp/test.sh:1):
1: #!/bin/bash
bashdb<3>
Interesting how it goes back to the shbang line after 'exit 0'. I guess
that's the out "calling frame", in a manner of speaking?
Copyright 2002-2004, 2006-2012, 2014, 2016-2017 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/test.sh:3):
3: set -e
bashdb<0> s
(/tmp/test.sh:5):
5: echo hi
bashdb<1>
hi
(/tmp/test.sh:6):
6: exit 0
bashdb<2>
(/tmp/test.sh:1):
1: #!/bin/bash
bashdb<3>
Interesting how it goes back to the shbang line after 'exit 0'. I guess
that's the out "calling frame", in a manner of speaking?
Yep. bashdb is dumb and just gets its information about where you are at
from ${BASH_LINENO[0]}
--
...Adam Di Carlo...a.p.dicarlo@gmail.com............................
I'm not sure whether this is a bug or not, so I'm asking here.
Given this script, called test.sh:
I am presented with this disappointing bashdb session:
Is this a bug? Something I'm doing wrong?
Last edit: Adam Di Carlo 2017-07-29
Hi, Adam!
Comments are in line.
On Sat, Jul 29, 2017 at 6:50 PM, Adam Di Carlo adicarlo@users.sf.net
wrote:
Yes
Nah. Should be addressed in commit 384dae9
"Rocky Bernstein" rockyb@users.sf.net writes:
Awesome! I just pulled it, rebuilt, and can confirm the fix:
Copyright 2002-2004, 2006-2012, 2014, 2016-2017 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/test.sh:3):
3: set -e
bashdb<0> s
(/tmp/test.sh:5):
5: echo hi
bashdb<1>
hi
(/tmp/test.sh:6):
6: exit 0
bashdb<2>
(/tmp/test.sh:1):
1: #!/bin/bash
bashdb<3>
Interesting how it goes back to the shbang line after 'exit 0'. I guess
that's the out "calling frame", in a manner of speaking?
--
...Adam Di Carlo...a.p.dicarlo@gmail.com............................
On Tue, Aug 1, 2017 at 1:07 AM, Adam Di Carlo adicarlo@users.sf.net wrote:
Yep. bashdb is dumb and just gets its information about where you are at
from ${BASH_LINENO[0]}
--