2015-05-24 04:32:32 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2008-12-08 04:46:09 +00:00
|
|
|
|
2017-03-03 01:07:24 +00:00
|
|
|
#include <cstddef>
|
2014-02-20 03:11:52 +00:00
|
|
|
#include <cstring>
|
2008-12-08 04:46:09 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class DebugInterface
|
|
|
|
{
|
|
|
|
protected:
|
2016-06-24 08:43:46 +00:00
|
|
|
virtual ~DebugInterface() {}
|
2018-04-12 12:18:04 +00:00
|
|
|
|
2008-12-08 04:46:09 +00:00
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
virtual std::string Disassemble(unsigned int /*address*/) { return "NODEBUGGER"; }
|
2016-10-07 13:56:02 +00:00
|
|
|
virtual std::string GetRawMemoryString(int /*memory*/, unsigned int /*address*/)
|
2016-06-24 08:43:46 +00:00
|
|
|
{
|
2016-10-07 13:56:02 +00:00
|
|
|
return "NODEBUGGER";
|
2016-06-24 08:43:46 +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 void AddWatch(unsigned int /*address*/) {}
|
|
|
|
virtual void ClearAllMemChecks() {}
|
2017-03-03 01:07:24 +00:00
|
|
|
virtual bool IsMemCheck(unsigned int /*address*/, size_t /*size*/) { return false; }
|
2016-08-18 20:08:08 +00:00
|
|
|
virtual void ToggleMemCheck(unsigned int /*address*/, bool /*read*/, bool /*write*/, bool /*log*/)
|
|
|
|
{
|
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
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() {}
|
2017-10-05 18:09:12 +00:00
|
|
|
virtual void Patch(unsigned int /*address*/, unsigned int /*value*/) {}
|
2016-06-24 08:43:46 +00:00
|
|
|
virtual int GetColor(unsigned int /*address*/) { return 0xFFFFFFFF; }
|
|
|
|
virtual std::string GetDescription(unsigned int /*address*/) = 0;
|
2008-12-08 04:46:09 +00:00
|
|
|
};
|