2014-08-17 23:15:50 +05:30
|
|
|
#pragma once
|
2013-09-05 05:47:46 +05:30
|
|
|
|
2014-08-17 23:15:50 +05:30
|
|
|
#include <cstring>
|
2013-09-05 05:47:46 +05:30
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class DebugInterface
|
|
|
|
{
|
|
|
|
protected:
|
2014-04-02 03:50:08 +05:30
|
|
|
virtual ~DebugInterface() {}
|
2013-09-05 05:47:46 +05:30
|
|
|
|
|
|
|
public:
|
2014-04-02 03:50:08 +05:30
|
|
|
virtual void disasm(unsigned int /*address*/, char *dest, int /*max_size*/) {strcpy(dest, "NODEBUGGER");}
|
|
|
|
virtual void getRawMemoryString(int /*memory*/, unsigned int /*address*/, char *dest, int /*max_size*/) {strcpy(dest, "NODEBUGGER");}
|
|
|
|
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 bool isMemCheck(unsigned int /*address*/) {return false;}
|
|
|
|
virtual void toggleMemCheck(unsigned int /*address*/){}
|
|
|
|
virtual unsigned int readMemory(unsigned int /*address*/){return 0;}
|
|
|
|
virtual void writeExtraMemory(int /*memory*/, unsigned int /*value*/, unsigned int /*address*/) {}
|
|
|
|
virtual unsigned int readExtraMemory(int /*memory*/, unsigned int /*address*/){return 0;}
|
|
|
|
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() {}
|
|
|
|
virtual void breakNow() {}
|
|
|
|
virtual void insertBLR(unsigned int /*address*/, unsigned int /*value*/) {}
|
|
|
|
virtual void showJitResults(unsigned int /*address*/) {};
|
|
|
|
virtual int getColor(unsigned int /*address*/){return 0xFFFFFFFF;}
|
|
|
|
virtual std::string getDescription(unsigned int /*address*/) = 0;
|
2013-09-05 05:47:46 +05:30
|
|
|
};
|