Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh debugger skeleton code



I've put the skeletal zsh debugger code I've been working on
github. This code is probably not usable for novices (yet).

To browse code: http://github.com/rocky/zshdb/tree/master
To get a copy:

  git-clone git://github.com/rocky/zshdb.git

The README http://github.com/rocky/zshdb/tree/master/README has full
details and this is an summary of information from that.

To use and play the game, you'll need patched CVS zsh sources. In
particular the "functrace" function should report filenames and
absolute line numbers.  Also both "functrace" and "funcstack" should
include source'd files in their arrays. I don't have a check in right
now a compatible zsh in the code right now, will add this soon.

Assuming you have a compatible zsh and downlaoded:
  cd zshdb
  ./autogen.sh  # Add configure options. See ./configure --help
  make && make check

In the unlikely event this works for you, running ./zshdb with no
arguments in the checked out directory runs a silly test program
testing.sh. Of course you can give your own file name and down the
line testing.sh will be removed.

The initial gdb-like commands I've put in:
  alias     eval      run       trace     where
  continue  frame     source    untrace
  down      print     step      up

(actually alias, eval, trace and untrace aren't gdb) .

What's missing falls into a two categories:

  * Stuff that can be ported in a straightforward way from bashdb
  * Stuff that needs additional zsh support

A breakdown of some of the things missing right now. Again details of
why, how and when are in the README

 * source listing commands
 * breakpoints
 * next (step over function calls)
 * Showing frame arguments
 * Information persisting when a subshell is left
 * "skip" command
 * Setting $0
 * lots of other stuff including...
   display expressions, signal handling, invoking the debugger directly
   from a script, command history, command completion.

Share and Enjoy!



Messages sorted by: Reverse Date, Date, Thread, Author