Classes | |
struct | Var |
Public Member Functions | |
int | getCharsPerLine () |
int | debugPrintf (MSVC_PRINTF const char *format,...) GCC_PRINTF(2 |
int void | debugPrintColumns (const Common::StringArray &list) |
virtual void | onFrame () |
virtual void | attach (const char *entry=nullptr) |
bool | isActive () const |
Protected Types | |
enum | VarType { DVAR_BYTE, DVAR_INT, DVAR_FLOAT, DVAR_BOOL, DVAR_INTARRAY, DVAR_STRING } |
typedef Common::Functor1< const char *, bool > | defaultCommand |
typedef Common::Functor2< int, const char **, bool > | Debuglet |
Protected Member Functions | |
void | registerVar (const Common::String &varname, byte *variable) |
void | registerVar (const Common::String &varname, int *variable) |
void | registerVar (const Common::String &varname, float *variable) |
void | registerVar (const Common::String &varname, bool *variable) |
void | registerVar (const Common::String &varname, int32 **variable, int arraySize) |
void | registerVar (const Common::String &varname, Common::String *variable) |
void | registerCmd (const Common::String &cmdname, Debuglet *debuglet) |
void | registerDefaultCmd (defaultCommand *defaultCommandProcessor) |
void | clearVars () |
void | setPrompt (Common::String prompt) |
void | resetPrompt () |
virtual void | preEnter () |
virtual void | postEnter () |
virtual bool | handleCommand (int argc, const char **argv, bool &keepRunning) |
void | detach () |
bool | cmdExit (int argc, const char **argv) |
bool | cmdHelp (int argc, const char **argv) |
bool | cmdOpenLog (int argc, const char **argv) |
bool | cmdMd5 (int argc, const char **argv) |
bool | cmdMd5Mac (int argc, const char **argv) |
bool | cmdDebugLevel (int argc, const char **argv) |
bool | cmdDebugFlagsList (int argc, const char **argv) |
bool | cmdDebugFlagEnable (int argc, const char **argv) |
bool | cmdDebugFlagDisable (int argc, const char **argv) |
bool | cmdClearLog (int argc, const char **argv) |
bool | cmdExecFile (int argc, const char **argv) |
Protected Attributes | |
PauseToken | _debugPauseToken |
GUI::ConsoleDialog * | _debuggerDialog |
|
virtual |
The onFrame() method should be invoked by the engine at regular intervals (usually once per main loop iteration) whenever the debugger is attached. This will open up the console and accept user input if certain preconditions are met, such as the frame countdown having reached zero.
Subclasses can override this to e.g. check for breakpoints being triggered.
Reimplemented in MM::Xeen::Debugger.
|
virtual |
'Attach' the debugger. This ensures that the next time onFrame() is invoked, the debugger will activate and accept user input.
Reimplemented in Sci::Console.
|
inline |
Return true if the debugger is currently active (i.e. executing a command or waiting for use input).
|
inlineprotected |
Register a default command processor with the debugger. This allows an engine to receive all user input in the debugger.
A defaultCommandProcessor has the following signature: bool func(const char **inputOrig)
To deactivate call with a nullptr.
|
protected |
Remove all vars except default "debug_countdown"
|
protectedvirtual |
Hook for subclasses which is called just before enter() is run. A typical usage example is pausing music and sound effects.
The default implementation invokes Engine::pauseEngine(true).
Reimplemented in TwinE::TwinEConsole.
|
protectedvirtual |
Hook for subclasses which is called just after enter() was run. A typical usage example is resuming music and sound effects.
The default implementation invokes Engine::pauseEngine(false).
Reimplemented in Sherlock::Debugger, TwinE::TwinEConsole, Buried::BuriedConsole, Access::Debugger, and Nancy::NancyConsole.
|
protectedvirtual |
Process the given command line. Returns true if and only if argv[0] is a known command and was handled, false otherwise.
Reimplemented in Ultima::Ultima4::Debugger.
|
protected |
Subclasses should invoke the detach() method in their cmdFOO methods if that command will resume execution of the program (as opposed to executing, say, a "single step through code" command).
This currently only hides the virtual keyboard, if any.