From: R J Williams
Subject: [Q] traversing debugger stack under program control
Date: 
Message-ID: <1994Jun27.203216.3867@leeds.ac.uk>
Hello,

[System specifics Sun Sparcstation running 4.1.3, and Lucid 4.0.2]

The reason for the question is I'm collaboratively developing a system with 
a client and after each revision the software is installed on their machine 
so they can try out the new features, etc.  The client doesn't have much 
computer experience and no lisp experience so I have set the software so 
that its started by selecting from the window manager's root menu, the 
windows of the application then appear on the screen in predefined places.
There is no lisp listener on the screen.  

As this is development code it doesn't work all the time so what I would 
like to get some diagnostic information when it fails.  The problem is 
there is no easy way of getting a stack trace and having a look at half 
a dozen of the stack frames.  A couple of solutions suggest themselves:

* Putting an error handler in the lisp code that traverses the stack and dumps
  it to a file.  The only problem is that I'm not sure if this is possible.

* Running the lisp from expect,  [expect is a scripting language to talk to 
  interactive programs like ftp, telnet and others.  It can pass input to 
  the interactive program based on the output generated.]

* Running lisp in a xterm and asking the user to cut and paste in the commands 
  for the debugger when there is a problem.  This is far from ideal.

Does anyone have a method which is reliable?

Thanks in advance for your help,

Rod
----
Roderick Williams          ············@cbl.leeds.ac.uk