next up previous
Next: Accessing Variables by Name Up: Psd - a Portable Previous: Related Work

The Emacs Interface

Psd uses GNU Emacs as its user interface. The primary use for Emacs is to provide source code debugging. A typical Psd session is shown in figure 1.

  
Figure 1: A Psd Session

Psd uses the same interface to Emacs as the GNU project debugger Gdb, and the Psd interface was actually modified from the existing Gdb interface. When an instrumented program is run, it emits specially formatted lines containing the source file and line number of the current source line. Emacs interprets these lines by showing the appropriate file in an editing window with an arrow indicating the current line.

There is a small amount of Emacs Lisp code that interacts with the Scheme environment. Emacs generates temporary file names and issues instrumenting and loading commands. The instrumenting code is file oriented, but with the Emacs interface it is possible to pick one procedure from a source file to be debugged. The Emacs interface is also used for setting breakpoints, with the Emacs Lisp code taking care of the low level details like file names and line numbers.


next up previous
Next: Accessing Variables by Name Up: Psd - a Portable Previous: Related Work

Gary T. Leavens
8/19/1997