22 #ifndef GUI_DEBUGGER_H 23 #define GUI_DEBUGGER_H 25 #include "common/func.h" 26 #include "common/ptr.h" 27 #include "common/hashmap.h" 28 #include "common/hash-str.h" 29 #include "common/array.h" 30 #include "common/str.h" 31 #include "common/str-array.h" 33 #include "engines/engine.h" 37 #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER 46 int getCharsPerLine();
48 int debugPrintf(MSVC_PRINTF
const char *format, ...)
GCC_PRINTF(2, 3);
69 virtual void attach(
const char *entry =
nullptr);
89 #define WRAP_METHOD(cls, method) \ 90 new Common::Functor2Mem<int, const char **, bool, cls>(this, &cls::method) 97 #define WRAP_DEFAULTCOMMAND(cls, command) \ 98 new Common::Functor1Mem<const char *, bool, cls>(this, &cls::command) 125 void registerVarImpl(
const Common::String &varname,
void *variable, VarType type,
int arraySize);
129 registerVarImpl(varname, variable, DVAR_BYTE, 0);
133 registerVarImpl(varname, variable, DVAR_INT, 0);
136 void registerVar(
const Common::String &varname,
float *variable) {
137 registerVarImpl(varname, variable, DVAR_FLOAT, 0);
141 registerVarImpl(varname, variable, DVAR_BOOL, 0);
144 void registerVar(
const Common::String &varname, int32 **variable,
int arraySize) {
145 registerVarImpl(varname, variable, DVAR_INTARRAY, arraySize);
149 registerVarImpl(varname, variable, DVAR_STRING, 0);
152 void registerCmd(
const Common::String &cmdname, Debuglet *debuglet);
164 _defaultCommandProcessor = defaultCommandProcessor; }
186 uint _frameCountdown;
212 defaultCommand *_defaultCommandProcessor;
217 #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER 243 virtual bool handleCommand(
int argc,
const char **argv,
bool &keepRunning);
261 void splitCommand(
Common::String &input,
int &argc,
const char **argv);
263 bool parseCommand(
const char *input);
264 bool tabComplete(
const char *input,
Common::String &completion)
const;
267 bool cmdExit(
int argc,
const char **argv);
268 bool cmdHelp(
int argc,
const char **argv);
269 bool cmdOpenLog(
int argc,
const char **argv);
271 bool cmdMd5(
int argc,
const char **argv);
272 bool cmdMd5Mac(
int argc,
const char **argv);
274 bool cmdDebugLevel(
int argc,
const char **argv);
275 bool cmdDebugFlagsList(
int argc,
const char **argv);
276 bool cmdDebugFlagEnable(
int argc,
const char **argv);
277 bool cmdDebugFlagDisable(
int argc,
const char **argv);
278 bool cmdClearLog(
int argc,
const char **argv);
279 bool cmdExecFile(
int argc,
const char **argv);
281 #ifndef USE_TEXT_CONSOLE_FOR_DEBUGGER 283 static bool debuggerInputCallback(
GUI::ConsoleDialog *console,
const char *input,
void *refCon);
285 #elif defined(USE_READLINE) 287 char *readlineComplete(
const char *input,
int state);
void registerDefaultCmd(defaultCommand *defaultCommandProcessor)
Definition: debugger.h:163
virtual bool handleCommand(int argc, const char **argv, bool &keepRunning)
Definition: debugger.h:41
int FORCEINLINE GCC_PRINTF(2, 0) int vsprintf_s(T(&dst)[N]
bool isActive() const
Definition: debugger.h:75
virtual void attach(const char *entry=nullptr)
Definition: debugger.h:109
Definition: hash-str.h:49
Definition: hash-str.h:45