2008-12-07 21:46:09 -07:00
|
|
|
#ifndef _DEBUGINTERFACE_H
|
|
|
|
#define _DEBUGINTERFACE_H
|
|
|
|
|
|
|
|
#include <string>
|
2009-02-07 12:17:20 -07:00
|
|
|
#include <string.h>
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
class DebugInterface
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
virtual ~DebugInterface() {}
|
2008-12-20 05:46:14 -07:00
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
public:
|
2008-12-20 05:46:14 -07:00
|
|
|
virtual void disasm(unsigned int /*address*/, char *dest, int /*max_size*/) {strcpy(dest, "NODEBUGGER");}
|
2009-07-15 14:15:34 -06:00
|
|
|
virtual void getRawMemoryString(int /*memory*/, unsigned int /*address*/, char *dest, int /*max_size*/) {strcpy(dest, "NODEBUGGER");}
|
2008-12-07 21:46:09 -07:00
|
|
|
virtual int getInstructionSize(int /*instruction*/) {return 1;}
|
|
|
|
virtual bool isAlive() {return true;}
|
|
|
|
virtual bool isBreakpoint(unsigned int /*address*/) {return false;}
|
|
|
|
virtual void setBreakpoint(unsigned int /*address*/){}
|
|
|
|
virtual void clearBreakpoint(unsigned int /*address*/){}
|
|
|
|
virtual void clearAllBreakpoints() {}
|
|
|
|
virtual void toggleBreakpoint(unsigned int /*address*/){}
|
|
|
|
virtual unsigned int readMemory(unsigned int /*address*/){return 0;}
|
2009-07-11 14:37:55 -06:00
|
|
|
virtual void writeExtraMemory(int /*memory*/, unsigned int /*value*/, unsigned int /*address*/) {}
|
|
|
|
virtual unsigned int readExtraMemory(int /*memory*/, unsigned int /*address*/){return 0;}
|
2008-12-07 21:46:09 -07:00
|
|
|
virtual unsigned int readInstruction(unsigned int /*address*/){return 0;}
|
|
|
|
virtual unsigned int getPC() {return 0;}
|
|
|
|
virtual void setPC(unsigned int /*address*/) {}
|
|
|
|
virtual void step() {}
|
|
|
|
virtual void runToBreakpoint() {}
|
2009-06-28 06:15:31 -06:00
|
|
|
virtual void breakNow() {}
|
2009-06-08 23:26:39 -06:00
|
|
|
virtual void insertBLR(unsigned int /*address*/, unsigned int) {}
|
2009-07-11 14:37:55 -06:00
|
|
|
virtual void showJitResults(unsigned int /*address*/) {};
|
2008-12-07 21:46:09 -07:00
|
|
|
virtual int getColor(unsigned int /*address*/){return 0xFFFFFFFF;}
|
|
|
|
virtual std::string getDescription(unsigned int /*address*/) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|