ScummVM API documentation
Wintermute::Console Class Reference
Inheritance diagram for Wintermute::Console:
GUI::Debugger

Public Member Functions

 Console (WintermuteEngine *vm)
 
bool Cmd_Help (int argc, const char **argv)
 
bool Cmd_ShowFps (int argc, const char **argv)
 
bool Cmd_DumpFile (int argc, const char **argv)
 
bool Cmd_Step (int argc, const char **argv)
 
bool Cmd_Continue (int argc, const char **argv)
 
bool Cmd_Finish (int argc, const char **argv)
 
bool Cmd_Print (int argc, const char **argv)
 
bool Cmd_Set (int argc, const char **argv)
 
bool Cmd_AddBreakpoint (int argc, const char **argv)
 
bool Cmd_RemoveBreakpoint (int argc, const char **argv)
 
bool Cmd_EnableBreakpoint (int argc, const char **argv)
 
bool Cmd_DisableBreakpoint (int argc, const char **argv)
 
bool Cmd_Watch (int argc, const char **argv)
 
bool Cmd_RemoveWatch (int argc, const char **argv)
 
bool Cmd_EnableWatch (int argc, const char **argv)
 
bool Cmd_DisableWatch (int argc, const char **argv)
 
bool Cmd_Info (int argc, const char **argv)
 
bool Cmd_List (int argc, const char **argv)
 
bool Cmd_SourcePath (int argc, const char **argv)
 
bool Cmd_Top (int argc, const char **argv)
 
Error printSource (int n=5)
 
void notifyBreakpoint (const char *filename, int line)
 
void notifyStep (const char *filename, int line)
 
void notifyWatch (const char *filename, const char *symbol, const char *newValue)
 
- Public Member Functions inherited from GUI::Debugger
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
 

Additional Inherited Members

- Protected Types inherited from GUI::Debugger
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 inherited from GUI::Debugger
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 inherited from GUI::Debugger
PauseToken _debugPauseToken
 
GUI::ConsoleDialog_debuggerDialog
 

Member Function Documentation

◆ Cmd_Step()

bool Wintermute::Console::Cmd_Step ( int  argc,
const char **  argv 
)

Step - break again on next line

◆ Cmd_Continue()

bool Wintermute::Console::Cmd_Continue ( int  argc,
const char **  argv 
)

Continue execution

◆ Cmd_Finish()

bool Wintermute::Console::Cmd_Finish ( int  argc,
const char **  argv 
)

Only break again when the current function is finished (activation record is popped)

◆ Cmd_Watch()

bool Wintermute::Console::Cmd_Watch ( int  argc,
const char **  argv 
)

Add a watch.

It monitors the value of some variable x against its last known state and it breaks if it has changed since.

◆ Cmd_Info()

bool Wintermute::Console::Cmd_Info ( int  argc,
const char **  argv 
)

Print info re:watch and breakpoints. This differs from e.g. gdb in that we have separate lists.

◆ Cmd_List()

bool Wintermute::Console::Cmd_List ( int  argc,
const char **  argv 
)

Print source

◆ Cmd_SourcePath()

bool Wintermute::Console::Cmd_SourcePath ( int  argc,
const char **  argv 
)

Set (DOS-style) source path for debugging. This is where you will (optionally) put your sources to enable printing of sources as you step through the scripts.

Please note that we have no checksum or anything to make sure your source files are up to date.

YOU HAVE to make sure of that.

You have been warned! :)

◆ Cmd_Top()

bool Wintermute::Console::Cmd_Top ( int  argc,
const char **  argv 
)

Top

◆ notifyBreakpoint()

void Wintermute::Console::notifyBreakpoint ( const char *  filename,
int  line 
)

Hooks for the controller to open the console

◆ notifyWatch()

void Wintermute::Console::notifyWatch ( const char *  filename,
const char *  symbol,
const char *  newValue 
)

To be called by the adapter when a watched variable is changed. Opens a console and prints info and listing if available.


The documentation for this class was generated from the following file: