Supermodel/Src/Debugger/SupermodelDebugger.h
Nik Henson 8e2e8adeb3 Changes to debugger classes:
- fixed step-out to work properly
- added ability to enable/disable debugging of individual CPUs
Changes to console-based debugger:
- tidied up syntax and split some commands out to make easier to use
- implemented missing commands (loademustate, saveemustate, resetemu, configinput, configallinputs, help)
- added new commands (nextframe, enablecpu, disablecpu, removeallcomments)
- added ability to redirect command output to a file
2011-06-28 23:20:19 +00:00

67 lines
1.2 KiB
C++

#ifdef SUPERMODEL_DEBUGGER
#ifndef INCLUDED_SUPERMODELDEBUGGER_H
#define INCLUDED_SUPERMODELDEBUGGER_H
#include "ConsoleDebugger.h"
#include <stdarg.h>
#define MODEL3_STATEFILE_VERSION 0
class CModel3;
class CInputs;
class CInput;
namespace Debugger
{
class CCPUDebug;
/*
* Console-based debugger used by Supermodel.
*/
class CSupermodelDebugger : public CConsoleDebugger
{
private:
::CModel3 *m_model3;
::CInputs *m_inputs;
::CLogger *m_logger;
bool m_loadEmuState;
bool m_saveEmuState;
bool m_resetEmu;
char m_stateFile[255];
bool InputIsValid(CInput *input);
void ListInputs();
protected:
void WaitCommand(CCPUDebug *cpu);
bool ProcessToken(const char *token, const char *cmd);
void Attached();
void Detaching();
public:
CSupermodelDebugger(::CModel3 *model3, ::CInputs *inputs, ::CLogger *logger);
void Poll();
bool LoadModel3State(const char *fileName);
bool SaveModel3State(const char *fileName);
void ResetModel3();
void DebugLog(const char *fmt, va_list vl);
void InfoLog(const char *fmt, va_list vl);
void ErrorLog(const char *fmt, va_list vl);
};
}
#endif // INCLUDED_SUPERMODELDEBUGGER_H
#endif // SUPERMODEL_DEBUGGER