Next: , Previous: , Up: Debugging   [Contents][Index]


18.1 Source Level Debugging in Emacs

In emacs load (load "dbl.el") from the gcl/doc directory. [ It also requires gcl.el from that directory. Your system administrator should do make in the doc directory, so that these files are copied to the standard location.]

OVERVIEW:

Lisp files loaded with si::nload will have source line information about them recorded. Break points may be set, and functions stepped. Source code will be automatically displayed in the other window, with a little arrow beside the current line. The backtrace (command :bt) will show line information and you will get automatic display of the source as you move up and down the stack.

FUNCTIONS: break points which have been set. si::nload (file) load a lisp file collecting source line information.

si::break-function (function &optional line absolute) set up a breakpoint for FUNCTION at LINE relative to start or ABSOLUTE

EMACS COMMANDS: M-x dbl makes a dbl buffer, suitable for running an inferior gcl. It has special keybindings for stepping and viewing sources. You may start your favorite gcl program in the dbl shell buffer.

Inferior Dbl Mode: Major mode for interacting with an inferior Dbl process. The following commands are available:

C-c l dbl-find-line

ESC d dbl-:down ESC u dbl-:up ESC c dbl-:r ESC n dbl-:next ESC i dbl-:step ESC s dbl-:step

M-x dbl-display-frame displays in the other window the last line referred to in the dbl buffer.

ESC i and ESC n in the dbl window, call dbl to step and next and then update the other window with the current file and position.

If you are in a source file, you may select a point to break at, by doing C-x SPC.

Commands: Many commands are inherited from shell mode. Additionally we have:

M-x dbl-display-frame display frames file in other window ESC i advance one line in program ESC n advance one line in program (skip over calls). M-x send-dbl-command used for special printing of an arg at the current point. C-x SPACE sets break point at current line.

—————————-

When visiting a lisp buffer (if gcl.el is loaded in your emacs) the command c-m-x evaluates the current defun into the process running in the other window. Line information will be kept. This line information allows you to set break points at a given line (by typing C-x \space on the line in the source file where you want the break to occur. Once stopped within a function you may single step with M-s. This moves one line at a time in the source code, displaying a little arrow beside your current position. M-c is like M-s, except that function invocations are skipped over, rather than entered into. M-c continues execution.

Keywords typed at top level, in the debug loop have a special meaning:

Files: debug.lsp dbl.el gcl.el


Next: , Previous: , Up: Debugging   [Contents][Index]