From: Masatake Y. <je...@gy...> - 2006-12-27 09:13:25
|
Hi, I read your article http://article.gmane.org/gmane.comp.shells.zsh.devel/11563 F.Y.I bash has really good debugger written by Rocky Bernstein. See http://bashdb.sourceforge.net/ bashdb is well documented. So it will be help to implement a debugger for zsh. Masatake YAMATO |
From: Rocky B. <roc...@gm...> - 2006-12-27 14:53:58
|
Thanks for the kind words. I just looked at the excellent zsh documentation (http://zsh.sourceforge.net/Doc/Release/index-frame.html). It has many interesting and nice features. For example in the bash debugger we wrote our own routine to read a file into an array quickly. I see in zsh this is called "mapfile". (Masatake: That's the name you decided on in revising readarray.c, right? - zsh I now see that got there first with this routine, so we should make it easy on those folks who use both.) There are some things added to bash mostly between versions 2.05b and 3.0 that might not be in zsh (yet). For example I see there is a LINENO variable, and for functions it reports the position as the absolute position from the file it was included from - good! However in a debugger (or debugging tool such as line tracing), one would also probably want the name of the source file. And one would want this information for all of the routines in the current call stack. Another thing that is nice (but not strictly necessary) would be a variable which stores the command that is about to be executed. If zsh doesn't already have these, I suspect these are pretty easy to add. But even without these, one could probably write some sort of debugger. However nice zsh is, I don't have a need for using it and I can't justify spending time on this. someone wants to undertake this, I'd be happy to answer questions or offer a little help. (Ditto for ksh93 which also has nice features and might be even easier to write a debugger for than bashdb was.) One way to get started is to write a program that more or less simulates set -x. See http://sourceforge.net/mailarchive/forum.php?thread_id=31299742&forum_id=12061 Even though this is not how bashdb was developed, I think it would be a good approach. The idea is that after you are convinced you can get some basic information about the program non-interactively, and that you cover tracing the entire program, adding a read loop and adding conditions under which you want to stop is pretty straightforward. On 12/27/06, Masatake YAMATO <je...@gy...> wrote: > Hi, > > I read your article > > http://article.gmane.org/gmane.comp.shells.zsh.devel/11563 > > > F.Y.I bash has really good debugger written by Rocky Bernstein. See > > http://bashdb.sourceforge.net/ > > bashdb is well documented. So it will be help to implement a debugger > for zsh. > > Masatake YAMATO > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Bashdb-devel mailing list > Bas...@li... > https://lists.sourceforge.net/lists/listinfo/bashdb-devel > |
From: <nws...@al...> - 2006-12-27 15:24:37
|
Rocky, I took a quick look at the bashdb web site. Great work! I hope that someone will be willing to port it to zsh. I have invested too much in zsh to give it up for bash now. Besides, zsh does have many good features that I like. Keep up the excellent work. mk ******************************************************************** > From roc...@gm... Wed Dec 27 08:53:59 2006 > To: "Masatake YAMATO" <je...@gy...> > Subject: Re: [Bashdb-devel] debugger for zsh > Cc: mkk...@al..., bas...@li... > > Thanks for the kind words. > > I just looked at the excellent zsh documentation > (http://zsh.sourceforge.net/Doc/Release/index-frame.html). It has > many interesting and nice features. > > For example in the bash debugger we wrote our own routine to read a > file into an array quickly. I see in zsh this is called "mapfile". > (Masatake: That's the name you decided on in revising readarray.c, > right? - zsh I now see that got there first with this routine, so we > should make it easy on those folks who use both.) > > There are some things added to bash mostly between versions 2.05b and > 3.0 that might not be in zsh (yet). For example I see there is a > LINENO variable, and for functions it reports the position as the > absolute position from the file it was included from - good! However > in a debugger (or debugging tool such as line tracing), one would also > probably want the name of the source file. And one would want this > information for all of the routines in the current call stack. > > Another thing that is nice (but not strictly necessary) would be a > variable which stores the command that is about to be executed. If zsh > doesn't already have these, I suspect these are pretty easy to add. > > But even without these, one could probably write some sort of > debugger. However nice zsh is, I don't have a need for using it and > I can't justify spending time on this. someone wants to undertake > this, I'd be happy to answer questions or offer a little help. (Ditto > for ksh93 which also has nice features and might be even easier to > write a debugger for than bashdb was.) > > One way to get started is to write a program that more or less > simulates set -x. See > http://sourceforge.net/mailarchive/forum.php?thread_id=31299742&forum_id=12061 > Even though this is not how bashdb was developed, I think it would be > a good approach. The idea is that after you are convinced you can get > some basic information about the program non-interactively, and that > you cover tracing the entire program, adding a read loop and adding > conditions under which you want to stop is pretty straightforward. > > On 12/27/06, Masatake YAMATO <je...@gy...> wrote: > > Hi, > > > > I read your article > > > > http://article.gmane.org/gmane.comp.shells.zsh.devel/11563 > > > > > > F.Y.I bash has really good debugger written by Rocky Bernstein. See > > > > http://bashdb.sourceforge.net/ > > > > bashdb is well documented. So it will be help to implement a debugger > > for zsh. > > > > Masatake YAMATO > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys - and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Bashdb-devel mailing list > > Bas...@li... > > https://lists.sourceforge.net/lists/listinfo/bashdb-devel > > > |
From: Rocky B. <roc...@gm...> - 2006-12-27 18:10:08
|
On 12/27/06, nws...@al... < nws...@al...> wrote: > > Rocky, > > I took a quick look at the bashdb web site. Great work! Again, thanks. I hope that someone will be willing to port it to zsh. I hope your have more luck with your hoping that I have had in the past. Or hope you will not not be disappointed if it doesn't happen. A little fable: When I first learned about Perl4 I thought, gee, this is great -- it has hash tables, access to C library routines and a debugger. I'll just wait for POSIX shells to disappear. Ten years later, I'm still plagued with init scipts and configure scripts that are written using POSIX shells. So I embarked on that debugger. When that debugger became good enough to debug configure scripts, I thought all my autotools problems were solved! Well, no there still was GNU Make. I read this article about autoconf http://freshmeat.net/articles/view/889/ and suggested someone write a debugger for GNU Make. A year later, I started writing one myself. Sometimes people tell me: I don't really have the skills to undertake such a task. Maybe. But I'm not sure I had the skills to do many of the projects I've undertook beforehand either. moral: one can suggest, hope, pray, and/or wait. But if it's really important I've found it more expedient to just dig in. :-) I have > invested too much in zsh to give it up for bash now. Besides, zsh > does have many good features that I like. > > Keep up the excellent work. > > mk > > ******************************************************************** > > > From roc...@gm... Wed Dec 27 08:53:59 2006 > > To: "Masatake YAMATO" <je...@gy...> > > Subject: Re: [Bashdb-devel] debugger for zsh > > Cc: mkk...@al..., bas...@li... > > > > Thanks for the kind words. > > > > I just looked at the excellent zsh documentation > > (http://zsh.sourceforge.net/Doc/Release/index-frame.html). It has > > many interesting and nice features. > > > > For example in the bash debugger we wrote our own routine to read a > > file into an array quickly. I see in zsh this is called "mapfile". > > (Masatake: That's the name you decided on in revising readarray.c, > > right? - zsh I now see that got there first with this routine, so we > > should make it easy on those folks who use both.) > > > > There are some things added to bash mostly between versions 2.05b and > > 3.0 that might not be in zsh (yet). For example I see there is a > > LINENO variable, and for functions it reports the position as the > > absolute position from the file it was included from - good! However > > in a debugger (or debugging tool such as line tracing), one would also > > probably want the name of the source file. And one would want this > > information for all of the routines in the current call stack. > > > > Another thing that is nice (but not strictly necessary) would be a > > variable which stores the command that is about to be executed. If zsh > > doesn't already have these, I suspect these are pretty easy to add. > > > > But even without these, one could probably write some sort of > > debugger. However nice zsh is, I don't have a need for using it and > > I can't justify spending time on this. someone wants to undertake > > this, I'd be happy to answer questions or offer a little help. (Ditto > > for ksh93 which also has nice features and might be even easier to > > write a debugger for than bashdb was.) > > > > One way to get started is to write a program that more or less > > simulates set -x. See > > > http://sourceforge.net/mailarchive/forum.php?thread_id=31299742&forum_id=12061 > > Even though this is not how bashdb was developed, I think it would be > > a good approach. The idea is that after you are convinced you can get > > some basic information about the program non-interactively, and that > > you cover tracing the entire program, adding a read loop and adding > > conditions under which you want to stop is pretty straightforward. > > > > On 12/27/06, Masatake YAMATO <je...@gy...> wrote: > > > Hi, > > > > > > I read your article > > > > > > http://article.gmane.org/gmane.comp.shells.zsh.devel/11563 > > > > > > > > > F.Y.I bash has really good debugger written by Rocky Bernstein. See > > > > > > http://bashdb.sourceforge.net/ > > > > > > bashdb is well documented. So it will be help to implement a debugger > > > for zsh. > > > > > > Masatake YAMATO > > > > > > > ------------------------------------------------------------------------- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > > > opinions on IT & business topics through brief surveys - and earn cash > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > _______________________________________________ > > > Bashdb-devel mailing list > > > Bas...@li... > > > https://lists.sourceforge.net/lists/listinfo/bashdb-devel > > > > > > > |