public
Description: Korn Shell (93t 2008-10-22 or greater) Debugger
Homepage:
Clone URL: git://github.com/rocky/kshdb.git
rocky (author)
Fri Jul 03 22:47:47 -0700 2009
commit  52a294db87d3df36cc0adaf48f5dcb88e511de08
tree    0d7e4a59f0d6fe4c05861281d3efbc41fe2cfeb7
parent  1cdcf1faad508f07716edb271985ec2c35b64af2
kshdb /
name age message
file .gitignore Wed Jun 10 12:03:53 -0700 2009 break.sh: use functions for better localization [rocky]
file AUTHORS Mon Sep 29 20:14:33 -0700 2008 Use getopt_long from Stéphane Chazelas. Thanks ... [rocky]
file COPYING Thu Aug 21 10:50:54 -0700 2008 Zero origin frame handling [rocky]
file INSTALL Thu Aug 21 10:50:54 -0700 2008 Zero origin frame handling [rocky]
file Makefile.am Mon Jun 22 08:39:09 -0700 2009 Start adding documentation. In particular, a ma... [rocky]
file NEWS Loading commit data...
file README Fri Jun 19 06:21:43 -0700 2009 Revise as appropriate [rocky]
file THANKS Mon Sep 29 20:14:33 -0700 2008 Use getopt_long from Stéphane Chazelas. Thanks ... [rocky]
file acinclude.m4 Thu Aug 14 08:28:25 -0700 2008 Add print and eval. Parse -L and --library in k... [rocky]
file autogen.sh Sat Aug 16 09:53:42 -0700 2008 Add options processing. KSH_PROG->SH_PROG. [rocky]
directory command/
file configure.ac
file dbg-io.sh
file dbg-main.sh
file dbg-opts.sh
file dbg-pre.sh Thu Jun 18 05:04:16 -0700 2009 See previous commit [rocky]
file dbg-trace.sh.in Wed Jun 10 12:03:53 -0700 2009 break.sh: use functions for better localization [rocky]
directory doc/ Mon Jun 22 09:21:46 -0700 2009 Smalll doc correctoins. Subshell test in distro... [rocky]
directory emacs/ Sun Nov 02 07:21:10 -0800 2008 Get closer (I hope) to getting breakpoints work... [rocky]
file getopt-test.sh Sat Aug 16 09:53:42 -0700 2008 Add options processing. KSH_PROG->SH_PROG. [rocky]
file getopts_long.sh Mon Sep 29 20:14:33 -0700 2008 Use getopt_long from Stéphane Chazelas. Thanks ... [rocky]
file kshdb.in
directory lib/
directory test/
file testing.sh Sun Aug 10 07:19:32 -0700 2008 Add gdb's print location. Move more of the zshd... [rocky]
README
0. INTRODUCTION
This is a port and cleanup of my bash debugger bashdb
(http://bashdb.sf.net). 

The command syntax generally follows that of the GNU debugger gdb.

However this debugger depends on a number bug fixes and of debugging
support features that are neither part of the POSIX 1003.1 standard
and only in ksh93t+ releases. In particular, there are fixes to a
number of the .sh variables like .sh.level and .sh.file.

1. SETUP

To get the code, install git and run in a ksh shell:

  git-clone git://github.com/rocky/kshdb.git
  cd kshdb
  ./autogen.sh  # Add configure options. See ./configure --help 

If you've got a suitable ksh93t installed, then
  make && make test

To try on a real program such as perhaps /etc/profile:
  ./kshdb /etc/profile # substitute /etc/profile with your favorite ksh script

If you are happy and "make test" above worked, install via:
  sudo make install

and uninstall with 
  sudo make uninstall # ;-)

See INSTALL for generic configure installation instructions.

2. WHAT'S HERE, WHAT'S NOT and WHY NOT

What's missing falls into a two categories:

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

Of the things which can be ported in a straight-forward way, however
some of them I want to revise and simplify. In some cases, the fact
that ksh has associative arrays simplifies code. On other cases, the
code I wrote needs refactoring and better modularization.

Writing documentation is important, but an extensive guide will have
to wait. For now one can consult the reference guide that comes with
bashdb: http://bashdb.sf.net/bashdb.html There is some minimal help to
get a list of commands and some help for each.

3. WHAT'S NOT HERE YET IN DETAIL

3.a) Showing frame arguments

This can done with or without support from ksh, albeit faster with
help from ksh.

3.b) Setting $0

3.c) lots of other stuff including...

  display expressions, signal handling, 
  debugger commands:
     debug
     condition
     file
     handle
     history
     pwd
     signal
     tty
     watch

  None of this is rocket science. Should be pretty straight-forward to
  add.

4. WHAT MAY NEED MORE WORK AND SUPPORT FROM KSH

4.a) stopping points that can be used for breakpoint