2008-12-08 04:46:09 +00:00
|
|
|
#ifndef _DEBUGINTERFACE_H
|
|
|
|
#define _DEBUGINTERFACE_H
|
|
|
|
|
|
|
|
#include <string>
|
2009-02-07 19:17:20 +00:00
|
|
|
#include <string.h>
|
2008-12-08 04:46:09 +00:00
|
|
|
|
|
|
|
class DebugInterface
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
virtual ~DebugInterface() {}
|
2008-12-20 12:46:14 +00:00
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
public:
|
2008-12-20 12:46:14 +00:00
|
|
|
virtual void disasm(unsigned int /*address*/, char *dest, int /*max_size*/) {strcpy(dest, "NODEBUGGER");}
|
2009-06-17 19:50:59 +00:00
|
|
|
virtual void getRawMemoryString(int memory, unsigned int /*address*/, char *dest, int /*max_size*/) {strcpy(dest, "NODEBUGGER");}
|
2008-12-08 04:46:09 +00: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-06-21 08:39:21 +00:00
|
|
|
virtual void writeExtraMemory(int memory, unsigned int value, unsigned int /*address*/) {}
|
2009-06-17 19:50:59 +00:00
|
|
|
virtual unsigned int readExtraMemory(int memory, unsigned int address){return 0;}
|
2008-12-08 04:46:09 +00: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-09 05:26:39 +00:00
|
|
|
virtual void insertBLR(unsigned int /*address*/, unsigned int) {}
|
2008-12-08 04:46:09 +00:00
|
|
|
virtual int getColor(unsigned int /*address*/){return 0xFFFFFFFF;}
|
|
|
|
virtual std::string getDescription(unsigned int /*address*/) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|