HOW TO USE LDB


Compile your program with lcc -G

To start your program, type `a.out --pause-- args'
It will print out a message like

  => DEBUG NUB <=
  to debug: /usr/local/bin/ldb target a.out connect dynastar 1143

In a separate window, execute the ldb command.
You can also start ldb by typing just `ldb' or `ldb a.out'.
YOU MUST EXECUTE LDB FROM THE DIRECTORY IN WHICH A.OUT WAS LINKED.
ldb has a cd command so you can change directories without restarting.
Type '?' to ldb for a list of commands.

ldb is under development, and changes may invalidate your existing executables.
Send mail to nr@cs to be notified automatically of such changes.

Common problems:

  If the expression server gets into a bad state (as a result of
  faulty error recovery), the following sequence will get a new one:
	disc wait		(disconnect)
	target a.out		(loses old state, including bad exp server)
	connect host port	(reconnect to the same target)


Complaints, questions, or comments to nr@cs.

TRICKS

  To generate information for external symbols, compile a file
  with lcc -G -SE.  Useful if you want to call strcmp() or want to
  refer to _iobuf[0] (stdin), etc.

  To dereference pointers in structures, arrays, etc, type to ldb
    i /followpointers 1 def
  2, 3, or more will follow more pointers.  0 is default, doesn't
  follow pointers.

  By default ldb prints only the first 100 elements of an array.
  To change the number, type to ldb
    i /$ArrayLimit 15 def
  e.g. to print the first 15 elements.  Similary ldb prints only the
  first 30 characters of strings; for more, type to ldb e.g.
    i /$StringLimit 50 def

BUGS

  You can run ldb and a target program in the same window using
  ldb's `run' command.  ldb shares standard input gracefully, but
  there are some problems:
    -- no I/O redirection
    -- no way to interrupt a running target without clobbering ldb
       (keyboard quit, ^\, will make ldb dump core), except to use
       kill(1)
