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 > |