This directory contains the ILC 2007 Tutorial called "Optimizing and Debugging Programs in Allegro CL" by Duane Rettig.  The file Opt-and-debug.ppt contains a Powerpoint-compatible presentation (it was actually written in NeoOffice Impress but it should also run in PowerPoint and in OpenOffice).  Unfortunately, there are no notes attached to the pages, but hopefully the scripts should bring out the general intention of the concepts being brought forth.

The files are named after their styles:

 Files with .lisp extensions are meant to be used with the F8 emacs macro (used with the emacs-lisp interface with it in one window and the .lisp file in the other) - each press of the F8 key causes each form to be executed in the Allegro CL in the *common-lisp* buffer.  If an error occurs, f7 will cause :reset to be presented to the lisp listener and one form is backed up, so multiple f7 presses will get you back to the beginning of the buffer.  The macros needed to set up this functionality are in a file called dot.emacs.ilc07.  It can be placed into your .emacs file, or pointed to for later loading.

Files with .html extensions are intended to be viewed with any html browser, as data of some sort; this might be a list, or it might be a transcript of a session run on some other machine.  This demo was run on a Macbook, which is a32-bit Intel model.

Files with a .cl extension are treated as Allegro CL source code.

There are  2 files with .s extension; leave these with read/write access.  They will be modified later in the script process.

Finally, there is a .png file which can be viewed as a picture of how the lisp.zo() function works in windbg.

The gdb/dbx/windbg commands (shown on slide 4) can be called from 8.1  (and

some 8.0) machines.  To execute the commands, use the call command in gdb/dbx, and the .call command on winapi. The commands are:

lisp_zo(frame, count) provides a zoom-like display of the stack for at most  count frames starting at frame location.  If count is zero then there's no limit, and the zoom prints as many as possible.  The frame must be specified in the manner of the architecture; on x86-based machines, the register $ebp, and on most others frame is $sp or the register that constitutes the stack pointer.  [8.0 note: this function is called lisp_bt, and it only works properly on some platforms]



lisp_cur(): frame movement functions.  Move up or down the stack n times, or print the current stack.  [8.0 note: not implemented in 8.0]

lisp_output_object(obj): produces a printed representation of obj, which should be a register or a tagged address.


lisp_print_length: like the lisp similar variables, controls lisp printouts.