Adjust reference to point to readthedocs
Rocky, sure, I will have a look at zshdb on GitHub, as you suggest.
@Jokerwild - I have created a github repository for this and copied all of the code there. If you have a github account, please suggest changes from the above as Pull Requests (PR's) there. Here is a suggestion for something to do that is both needed and will get understanding the code better. Look at https://github.com/rocky/zshdb/ and the more recent changes there. See if these can be applied to bashdb. When this project was started, there wasn't much in the way of linters for shell code. In the...
@Jokerwild - I have created a github repository for this and copied all of the code there. If you have a github account, please suggest changes as Pull Requests (PR's) there. Here is a suggestion for something to do that is both needed and will get understanding the code better. Look at https://github.com/rocky/zshdb/ and the more recent changes there. See if these can be applied to bashdb. When this project was started, there wasn't much in the way of linters for shell code. In the past I have used...
I am using Termux in Android without root, and my understanding of Bash is rather rudimentary, but I would like to help. I am a keen learner. I noted that the documentation didn't mention the ’git clone' download option, but I used it successfully: ’git clone https://git.code.sf.net/p/bashdb/code bashdb-code’. The ’INSTALL' instructions in my local directory are a bit esoteric for me considering I am running Android without root, so I have parked them for the time being. I even tried using Bing Copilot,...
I am using Termux in Android without root, and my understanding of Bash is rather rudimentary, but I would like to help. I am a keen learner. I noted that the documentation didn't mention the ’git clone' download option, but I used it successfully: ’git clone https://git.code.sf.net/p/bashdb/code bashdb-code’. The ’INSTALL' instructions in my local directory are a bit esoteric for me considering I am running Android without root, so I have parked them for the time being. If I can assist in any simple...
I am using Termux in Android without root, and my understanding of Bash is rather rudimentary, but I would like to help. I noted that the documentation didn't mention the ’git clone' download option, but I used it successfully: ’git clone https://git.code.sf.net/p/bashdb/code bashdb-code’. The ’INSTALL' instructions in my local directory are a bit esoteric for me considering I am running Android without root, so I have parked them for the time being. If I can assist in any simple way with this projhect...
I am using Termux in Android, and my understanding of Bash is rather rudimentary, but I would like to help. If I can assist in any simple way to start with, please let me know. I can definitely test the new version to see if they work on Android and I can assist with updating documentation. I note the comments that a person recently updated the install script to represent their system's version of Bash, and they said that after doing this, the install script worked on their system. I am running Bash...
I am using Termux in Android, and my understanding of Bash is rather rudimentary, but I would like to help. If I can assist in any simple way to start with, please let me know. I can definitely test the new version to see if they work on Android and I can assist with updating documentation. I note the comments that a person recently updated the install script to represent their system's version of Bash, and they said that after doing this, the install script worked on their system. I am running Bash...
My understanding of Bash is rather rudimentary, but I would like to help. If I can assist in any simple way to start with, please let me know.
Starting next week my time will finally free up. for open-source things. The top priority will be whatever is needed for bashdb and zshdb.
@rockyb Thanks! I've submitted most of the commits as merge requests. There's one against 4.4 and one against 5.1 where applicable. I've kept most PRs to just one commit to help with the review.
4.4: Fix pollution by global variables
5.1: Fix pollution with global variables
5.1: Fix gitignore for logging test
4.4: Fix test-settrace
5.1: Fix test-settrace
4.4: Fix tests with pygmentize
Fix tests with pygmentize
4.4: Rewrite "info variables -p"
5.1: Rewrite "info variables -p"
4.4: Fix step command
5.1: Fix step command
4.4: Fix highlighting on macOS
5.1: Fix highlighting on macOS
Yes, please submit these, to the extent we can, I would prefer the code bases to be as close as possible. As for the changes due pygments changing things from time to type, my view is that this is fragility in testing . Testing should be done without pygmentizing output. There should be tests just to see that pygments does something, but that test needs to be crafted more carefully so that it does not rely too heavily on specific kinds of formatting that is likely to change. For example it might...
Yes, please submit these, to the extent we can, I would prefer the code bases to be as close as possible. As for the changes due pygments changing things from time to type, my view is that this is fragility in testing . Testing should be done without pygmentizing output. There should be tests just to see that pygments does something, but that test needs to be crafted more careful so that it does not rely too heavily on specific kinds of formatting that is likely to change. For example it might detect...
Yes, please submit these, to the extent we can, I would prefer the code bases to as close as possible. As for the changes due pygments changing things from time to type, my view is that this is fragility in testing . Testing should be done without pygmentizing output. There should be tests just to see that pygments does something, but that test needs to be crafted more careful so that it does not rely too heavily on specific kinds of formatting that is likely to change. For example it might detect...
Yes, please submit these, to the extend we can I would prefer the code bases to as close as possible. As for the changes due pygments changing things from time to type, my view is that this is fragility in testing . Testing should be done without pygmentizing output. There should be tests just to see that pygments does something, but that test needs to be crafted more careful so that it does not rely too heavily on specific kinds of formatting that is likely to change. For example it might detect...
I've cleaned my commits and made sure that all tests are passing. I had to repair a few, the commits should contain the details. Some failures were related to a new version of pygmentize. I wasn't sure which version is expected to run the tests. Commits to bash-5.1, which may be useful: - https://github.com/BashSupport-Pro/bashdb/commit/89f60e890ad7dbc904e61cd8861f74a643162958 - https://github.com/BashSupport-Pro/bashdb/commit/d83d7dc913fc66521926cfb3a689c3b9f6708f0a - https://github.com/BashSupport-Pro/bashdb/commit/2d25b38290d317161efeb5c080e02184d3f5959d...
I've cleaned my commits and made sure that all tests are passing. I had to repair a few, the commits should contain the details. Some failures were related to a new version of pygmentize. I wasn't sure which version is expected to run the tests. Commits to bash-5.1, which may be useful: - https://github.com/BashSupport-Pro/bashdb/commit/89f60e890ad7dbc904e61cd8861f74a643162958 - https://github.com/BashSupport-Pro/bashdb/commit/d83d7dc913fc66521926cfb3a689c3b9f6708f0a - https://github.com/BashSupport-Pro/bashdb/commit/2d25b38290d317161efeb5c080e02184d3f5959d...
For BashSupport Pro, I have made a few changes to my fork of bashdb which were not yet submitted. https://github.com/BashSupport-Pro/bashdb/commits/bashsupport-5.1 for the 5.1 branch and https://github.com/BashSupport-Pro/bashdb/commits/bashsupport-4.4 for the 4.4 branch. Commits like https://github.com/BashSupport-Pro/bashdb/commit/389ad7668318ed6866d4fde32b820c1e321302dc are most likely only useful for the use in BashSupport. For example, there's https://github.com/BashSupport-Pro/bashdb/commit/f0bda0c2d67515444c2dcda18f7228f000c53d75,...
Thanks - I will look at the changes this weekend to let you know.
For BashSupport Pro, I have made a few changes to my fork of bashdb which were not yet submitted. https://github.com/BashSupport-Pro/bashdb/commits/bashsupport-5.1 for the 5.1 branch and https://github.com/BashSupport-Pro/bashdb/commits/bashsupport-4.4 for the 4.4 branch. Commits like https://github.com/BashSupport-Pro/bashdb/commit/389ad7668318ed6866d4fde32b820c1e321302dc are most likely only useful for the use in BashSupport. For example, there's https://github.com/BashSupport-Pro/bashdb/commit/f0bda0c2d67515444c2dcda18f7228f000c53d75,...
djust warning to note that version 5.1 is okay
Actually, I just tried from branch 5.1 and I do not see "This package is only known to work with Bash 5.0". line 106 of configure.ac looks like 5.1 was allowed since 2020-07-29 in commit 6daffb5c. I have just adjusted the error message which reported that only 5.0 was allowed. As for the failures. I do still see two of them,. test-bash-rematch however is not in there, but another one test-bug-loc. Again though these can be ignored.
Those two tests are very fragile and should be reworked. If you look at the differences it is about how traceback lines are reported and this kind of thing has happened too much in the past. Yes, I believe Bash 5.1 works fine with the existing code. I had meant to get around to adjusting things to basically silence
Dunno where to report this, but attempted to install bashdb on ubuntu 22.04 with 5.1.16. Running configure exited due to 'This package is only known to work with Bash 5.0' but defeating that did produce a successful result. Running make appeared successful but 'make check' did produce 2 FAILs, for test-bash-rematch & test-bug-loc. Install was successful and works for basic stepping, printing, breakpointing - so far have not had a case where I needed more functionality so that not tested.
More lint changes
Lint Python term-highlight program
Misc shellcode linting
More shellcheck lint stuff
Try ShellCheck for linting
How to use??
'set logging' not working - w/ patch
Looking good. Thx for the quick turn-around.
Thanks - this is now applied in the bash-5.1 branch at commit 69de4e2 A small additional change was added to configure.ac ensure the test program gets created. Please double check.
get set logging working + test
Fix for 2 is actually the following: --- a/lib/msg.sh +++ b/lib/msg.sh @@ -84,7 +84,7 @@ function _Dbg_errmsg_no_cr { # print message to output device function _Dbg_msg { if (( _Dbg_logging )) ; then - builtin echo -e "$@" >>$_Dbg_logfid + builtin echo -e "$@" >>$_Dbg_logging_file fi if (( ! _Dbg_logging_redirect )) ; then if [[ -n $_Dbg_tty ]] && [[ $_Dbg_tty != '&1' ]] ; then @@ -98,7 +98,7 @@ function _Dbg_msg { # print message to output device without a carriage return at the end function _Dbg_msg_nocr...
'set logging' not working - w/ patch
AC_HELP_STRING -> AS_HELP_STRING
/configure[2413]: ${ac_default_prefix/prefix}/bashdb/bashdb-main.inc: bad substitution
You are righht... ./configure --with-dbg-main=bashdb-main.inc successfully ends on AIX 7.1. I'm going to try bashdb in practice. This issue can be closed.
I just tried building this on AIX 7.1 which is the only thing I have available. In the directory you have the source untarred to, try running bash ./configure --with-dbg-main=bashdb-main.inc. With that, everything built an I was able to run the debugger as well. But let me say, nowadays I don't have that much time and interest in bashdb on AIX 7.1. This is open source code which means you have all of the information available for you or someone else to understand what's wrong and fix.
I just tried building this on AIX 7.1 which is the only thing I have available. In the directory you have the source untarred to, try running bash ./configure --with-dbg-main=bashdb-main.inc. With that everything built an I was able to run the debugger as well. But let me say, nowadays I don't have that much time and interest in bashdb on AIX 7.1. This is open source code which means you have all of the information available for you or someone else to understand what's wrong and fix.
I just tried building this on AIX 7.1 which is the only thing I have available. In the directory you have the source untarred to,t ry running bash ./configure --with-dbg-main=bashdb-main.inc. With that everything built an I was able to run the debugger as well. But let me say, nowadays I don't have that much time and interest in bashdb on AIX 7.1. This is open source code which means you have all of the information available for you or someone else to understand what's wrong and fix.
I just tried building this on AIX 7.1 which is the only thing I have available. In the directory you have the source untarred to, ry running bash ./configure --with-dbg-main=bashdb-main.inc. With that everything built an I was able to run the debugger as well. But let me say, nowadays I don't have that much time and interest in bashdb on AIX 7.1. This is open source code which means you have all of the information available for you or someone else to understand what's wrong and fix.
/configure[2413]: ${ac_default_prefix/prefix}/bashdb/bashdb-main.inc: bad substitution
Is it necessary for bashdb to use identifiers without '_Dbg...' for variables (e.g. the variable 'args' in complete.sh among others)? Never ascribe to maliciousness that which can easily be explained by oversight. Adding _Dbg_ was done pretty late in the game, and the entire code base has not been gone over thoroughly. In commit 890536b I have converted the variable you mention and maybe a couple of other cases as well. Also I never get correct responses for 'x $#' as opposed to 'x $@'. Why? I guess...
Preface more locals with _Dbg_
Is it necessary for bashdb to use identifiers without '_Dbg...' for variables (e.g. the variable 'args' in complete.sh among others)? The use of these identifiers seem to kind of spoil variables with the same name in the debugged bash file. I.e. if I then do 'x args' in a debug session I never get a correct response from bashdb. Also I never get correct responses for 'x $#' as opposed to 'x $@'. Why? -Lothar
configure.ac: add bash 5.2 to supported versions
Add XDG support to history file
Typo on web site
bashdbg probably mislinked on github & fail to compile.
Using MX21 Linux version 5.15.0-12.2-liquorix-amd64 (stevep@mxlinux.org) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 ZEN SMP PREEMPT liquorix 5.15-15~mx21+1 (2022-01-03) I am trying to install bash debugger from source. I read all the readme's and cannot figure out the correct compilation procedure. I did ./configure make make install but the below error about "PIE" keeps creeping up. I tried passing --pie to make but it didnt work either. Searching on the...
Using MX21 Linux version 5.15.0-12.2-liquorix-amd64 (stevep@mxlinux.org) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 ZEN SMP PREEMPT liquorix 5.15-15~mx21+1 (2022-01-03) I am trying to install bash debugger from source. I read all the readme's and cannot figure out the correct compilation procedure. I did ./configure make make install but the below error about "PIE" keeps creeping up. I tried passing --pie to make but it didnt work either. Searching on the...
Using MX21 Linux version 5.15.0-12.2-liquorix-amd64 (stevep@mxlinux.org) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 ZEN SMP PREEMPT liquorix 5.15-15~mx21+1 (2022-01-03) I am trying to install bash debugger from source. I read all the readme's and cannot figure out the correct compilation procedure. I did ./configure make make install but the below error about "PIE" keeps creeping up. I tried passing --pie to make but it didnt work either. Searching on the...
Using MX21 Linux version 5.15.0-12.2-liquorix-amd64 (stevep@mxlinux.org) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 ZEN SMP PREEMPT liquorix 5.15-15~mx21+1 (2022-01-03) I am trying to install bash debugger from source. I read all the readme's and cannot figure out the correct compilation procedure. I did ./configure make make install but the below error about "PIE" keeps creeping up. I tried passing --pie to make but it didnt work either. Searching on the...
@DiagonalArg Are you aware that each bashdb version/tag matches a bash version? The first post of this thread was written more than 1 year ago for Ubuntu focal when there was a bashdb tag matching a relevant bash version. Since then, Ubuntu has moved on to impish and so has my PPA which targets only the latest Ubuntu distribution. For the latter, bash version is 5.1.3 and bashdb is not compatible with that release. That's the reasons why you couldn't find any bashdb package on https://git.sdxlive.com/PPA/tree/Ubuntu/pool/stable/b....
@jcmanciot - Are you aware that each bashdb version/tag matches a bash version? I did not know that. Thanks for clarifying. Is the sub-version relevant, too? Ubuntu 20.04 is right now on bash version 5.0.17, and I have installed bashdb_5.0-1.1.12-11.0.
@DiagonalArg Regarding your remark about the postinst, it is a leftover from older bashdb versions and it should have been removed. You're right, It prevents a correct installation of bashdb on bullseye. A new release has been posted without the postinst to allow a correct installation. You need to install a compatible bash version first with: # wget https://git.sdxlive.com/DR/plain/Debian/pool/stable/b/bash/bash_5.0-4+11.0_amd64.deb # dpkg -i bash_5.0-4+11.0_amd64.deb # apt-mark hold bash You can...
Regarding your remark about the postinst, it is a leftover from older bashdb versions and it should have been removed. You're right, It prevents a correct installation of bashdb on bullseye. A new release has been posted without the postinst to allow a correct installation. You need to install a compatible bash version first with: # wget https://git.sdxlive.com/DR/plain/Debian/pool/stable/b/bash/bash_5.0-4+11.0_amd64.deb # dpkg -i bash_5.0-4+11.0_amd64.deb # apt-mark hold bash You can grab the new...
@DiagonalArg Are you aware that each bashdb version/tag matches a bash version? The first post of this thread was written more than 1 year ago for Ubuntu focal when there was a bashdb tag matching a relevant bash version. Since then, Ubuntu has moved on to impish and so has my PPA which targets only the latest Ubuntu development distribution. For the latter, bash version is 5.1.3 and bashdb is not compatible with that release. That's the reasons why you couldn't find any bashdb package on https://git.sdxlive.com/PPA/tree/Ubuntu/pool/stable/b....
@jcmanicot - I've emailed you directly, but for anyone else ... There is an error in the postinst script in the .deb package in his Debian repos. a ln -sfv /usr/share/bin/bashdb is being created to /bin/bashdb. For one thing, /usr/share/bin/bashdb does not exist. I think this should be /usr/bin/bashdb. Secondly, in Ubuntu, /bin is simlinked to /usr/bin. The effect is to wipe out bashdb altogether. The solution I found was to extract the deb (ar x <file>.deb) and copy usr/bin/bashdb into place.
I think what is going on is who is supposed to resolve the full path of the script. I believe if you install bashdb as a command rather than run it as a script to thebash command, then things are fine because the your shell resolves this so that the bashdb program doesn't. As bash is currently distributed, there is no builtin bash function whence or which command. So far as I know, so bashdb would have to do this resolution, and I am not sure I'd want to add that. I suppose it could try running whence...
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing, so instead I'll use Bullseye for Ubuntu 20.04. Edit: I was having trouble with your Debian packages when downloading with curl, but then discovered that the links have to be selected in the browser, and then select >> "plain" to download.
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing, so instead I'll use Bullseye for Ubuntu 20.04. Unfortunately, I'm having a little trouble with your packages: $ curl -LO "https://git.sdxlive.com/DR/tree/Debian/pool/stable/b/bashdb/bashdb_5.0-1.1.12-11.0_amd64.deb" $ dpkg -c ./bashdb_5.0-1.1.12-11.0_amd64.deb dpkg-deb: error: './bashdb_5.0-1.1.12-11.0_amd64.deb' is not a Debian format archive
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing, so instead I'll use Bullseye for Ubuntu 20.04. Unfortunately, I'm having a little trouble with your packages: $ curl -LO "https://git.sdxlive.com/DR/tree/Debian/pool/stable/b/bashdb/bashdb_5.0-1.1.12-11.0_amd64.deb" $ dpkg -c ./bashdb_5.0-1.1.12-11.0_amd64.deb dpkg-deb: error: './bashdb_5.0-1.1.12-11.0_amd64.deb' is not a Debian format archive @gmadrone - have a look here or here. I think the install instructions for...
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing, so instead I'll use Bullseye for Ubuntu 20.04. Unfortunately, I'm having a little trouble: $ curl -LO "https://git.sdxlive.com/DR/tree/Debian/pool/stable/b/bashdb/bashdb_5.0-1.1.12-11.0_amd64.deb" $ dpkg -c ./bashdb_5.0-1.1.12-11.0_amd64.deb dpkg-deb: error: './bashdb_5.0-1.1.12-11.0_amd64.deb' is not a Debian format archive @gmadrone - have a look here or here. I think the install instructions for the gpg key should...
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing, so instead I'll use Bullseye for Ubuntu 20.04. I've installed your gpg key to /etc/apt/trusted.gpg.d/JC_Manciot_DR.asc and only want to install the bashdb package: $ sudo apt install ./bashdb_5.0-1.1.12-11.0_amd64.deb Reading package lists... Error! E: Invalid archive signature E: Internal error, could not locate member control.tar.{zstlz4gzxzbz2lzma} E: Could not read meta data from /home/dev/Downloads/Software/bashdb_5.0-1.1.12-11.0_amd64.deb...
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing, so instead I'll use Bullseye for Ubuntu 20.04. I've installed your gpg key and only want to install the bashdb package: $ sudo apt install ./bashdb_5.0-1.1.12-11.0_amd64.deb Reading package lists... Error! E: Invalid archive signature E: Internal error, could not locate member control.tar.{zstlz4gzxzbz2lzma} E: Could not read meta data from /home/dev/Downloads/Software/bashdb_5.0-1.1.12-11.0_amd64.deb E: The package...
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing. I'm on Ubuntu 20.04, so I'll use bullseye. Could you clarify the distinction between these two? The log says they were both committed on the same day: bashdb_5.0-1.1.12+b1-11.0_amd64.deb bashdb_5.0-1.1.12-11.0_amd64.deb @gmadrone - have a look here or here. I think the install instructions should look more like: gpg --keyserver keys.openpgp.org --receive-keys DF7396D82BBA3684FCCADD4DB063838ED13997FD gpg --export --armor...
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing. I'm on Ubuntu 20.04, so I'll use bullseye. Could you clarify the distinction between these two? The log says they were both committed on the same day: bashdb_5.0-1.1.12+b1-11.0_amd64.deb bashdb_5.0-1.1.12-11.0_amd64.deb @gmadrone - have a look here or here.
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing. I'm on Ubuntu 20.04, so I'll use bullseye. Could you clarify the distinction between these two? The log says they were both committed on the same day: bashdb_5.0-1.1.12+b1-11.0_amd64.deb bashdb_5.0-1.1.12-11.0_amd64.deb Finally, forgive my ignorance, but is there a way to add in your Ubuntu PPA to my /etc/apt/sources.list? @gmadrone - try this: apt-get install ./<package_name>.deb
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing. I'll use debian. Could you clarify the distinction between these two? The log says they were both committed on the same day: bashdb_5.0-1.1.12+b1-11.0_amd64.deb bashdb_5.0-1.1.12-11.0_amd64.deb Finally, forgive my ignorance, but is there a way to add in your Ubuntu PPA to my /etc/apt/sources.list? @gmadrone - try this: apt-get install ./<package_name>.deb
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing: https://git.sdxlive.com/PPA/tree/Ubuntu/pool/stable/b I'll use debian. Could you clarify the distinction between these two? The log says they were both committed on the same day: bashdb_5.0-1.1.12+b1-11.0_amd64.deb bashdb_5.0-1.1.12-11.0_amd64.deb Finally, forgive my ignorance, but is there a way to add in your PPA to my /etc/apt/sources.list? @gmadrone - try this: apt-get install ./<package_name>.deb
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing: https://git.sdxlive.com/PPA/tree/Ubuntu/pool/stable/b I'll use debian. Could you clarify the distinction between these two? The log says they were both committed on the same day: bashdb_5.0-1.1.12+b1-11.0_amd64.deb bashdb_5.0-1.1.12-11.0_amd64.deb @gmadrone - try this: apt-get install ./<package_name>.deb
@jcmanicot - Thanks for that PPA. Note that the Ubuntu bashdb package is missing: https://git.sdxlive.com/PPA/tree/Ubuntu/pool/stable/b I'll use debian. @gmadrone - try this: apt-get install ./<package_name>.deb
The debugger is working fine, but unfortunately it doesn't work like you want it to work ... test_eval 1 #!/usr/bin/env bash 2 3 a=false 4 if $a ; then echo true; else echo false; fi 5 a=true 6 if $a ; then echo true; else echo false; fi $ bashdb -- test_eval bash debugger, bashdb, release 5.1-1.1.2 Copyright 2002-2004, 2006-2012, 2014, 2016-2019, 2021 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...
This was fixed in 28d4d2 and broken (again) with the 9a0bf97 ... ev false $? is 0 😕