maxima debug feature? - or how to accomplish same




On Sun, 10 Oct 2010, Max B wrote:

< 
< Hi,
< 
< Thanks for Maxima - it is a great tool!? :)
< 
< I am curious about how it operates; function call tree etc.? For example: identify the functions that are called when the user inputs '2+2;', or
< 'collectterms(expand(sbs));'.? Unfortunately, maxima is written in lisp and I can't seem to debug it.?? Tools with which I am familiar include gdb, the printf
< function, and the cpp macros __LINE__ etc.
< 
< I do have the maxima-5.21.1 source code, and have managed to compile it.?
< 
< I have resolved to insert lines of code like 'at line __LINE__ in function __FUNC__' (or similar) into the functions in which I am interested, but cannot discover the
< syntax of lisp that would allow me to announce watchpoints like printf.
< 
< So in my desperation I thought to email this listserv to ask for help.
 
 Maxima can be run using either the (default) Maxima reader or the Lisp
 reader. The functions to_lisp() and (to-maxima) switch between readers.
 
 The reason I say this is because you can run the Maxima package with
 the Lisp reader on inside of, eg. SLIME. This is an Emacs mode that
 gives you gdb-like features to step through code (more precisely, it
 is similar to gdb-mode in Emacs).

 Take some time and learn Lisp. At the very least you will discover
 a language that throws many of your pre-conceptions about how things
 ought to be done out the window.

 Oh yeah, I think you will find this list is pretty friendly, so there
 is no need to apologise for asking a question.

 Leo
-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.