|
wxMaxima
|
Pure helpers for recognizing sbcl's low-level debugger (LDB). More...
#include <wx/string.h>Go to the source code of this file.
Functions | |
| bool | LdbSupport::ContainsLdbBanner (const wxString &streamText) |
Does streamText (a chunk read from Maxima's stdout/stderr) contain the banner sbcl prints when it enters LDB? This marks the transition INTO LDB. | |
| bool | LdbSupport::EndsWithLdbPrompt (const wxString &streamText) |
Does streamText end with an LDB input prompt ("ldb> ")? LDB is then waiting for a command on stdin. | |
| bool | LdbSupport::LooksLikeLdb (const wxString &streamText) |
Does streamText look like LDB is active at all (banner or prompt)? A convenience for the stdout/stderr reader. | |
Pure helpers for recognizing sbcl's low-level debugger (LDB).
When the Lisp runtime under Maxima faults badly enough (a memory fault, an unhandled runtime signal, corruption) sbcl drops into LDB. Unlike Maxima's own (dbm:N) / MAXIMA> Lisp debugger - which talks to us as <PROMPT> XML over the control socket - LDB runs below Maxima: it writes to the Maxima process's stdout/stderr and reads commands from its stdin, entirely outside the socket protocol. wxMaxima therefore has to recognize LDB in the raw stdout/stderr stream (that is what these helpers do) and, once in LDB mode, send the user's input to the process's stdin rather than the socket.
These functions are deliberately free of any GUI/state so they can be unit tested against captured LDB output.