1
// Copyright (c) 2012- PPSSPP Project.
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
21
#include "Common/CommonTypes.h"
22
#include "math/expression_parser.h"
34
virtual const char *disasm(unsigned int address, unsigned int align) {return "NODEBUGGER";}
35
virtual int getInstructionSize(int instruction) {return 1;}
37
virtual bool isAlive() {return true;}
38
virtual bool isBreakpoint(unsigned int address) {return false;}
39
virtual void setBreakpoint(unsigned int address){}
40
virtual void clearBreakpoint(unsigned int address){}
41
virtual void clearAllBreakpoints() {}
42
virtual void toggleBreakpoint(unsigned int address){}
43
virtual unsigned int readMemory(unsigned int address){return 0;}
44
virtual unsigned int getPC() {return 0;}
45
virtual void setPC(unsigned int address) {}
46
virtual void step() {}
47
virtual void runToBreakpoint() {}
48
virtual int getColor(unsigned int address){return 0xFFFFFFFF;}
49
virtual std::string getDescription(unsigned int address) {return "";}
50
virtual bool initExpression(const char* exp, PostfixExpression& dest) { return false; };
51
virtual bool parseExpression(PostfixExpression& exp, u32& dest) { return false; };
54
virtual u32 GetHi() { return 0; };
55
virtual u32 GetLo() { return 0; };
56
virtual void SetHi(u32 val) { };
57
virtual void SetLo(u32 val) { };
58
virtual const char *GetName() = 0;
59
virtual int GetGPRSize() = 0; //32 or 64
60
virtual u32 GetGPR32Value(int reg) {return 0;}
61
virtual void SetGPR32Value(int reg) {}
62
virtual void SetGPR64Value(int reg) {}
63
virtual u32 GetPC() = 0;
64
virtual void SetPC(u32 _pc) = 0;
65
virtual u32 GetLR() {return GetPC();}
66
virtual void DisAsm(u32 op, u32 pc, int align, char *out) {sprintf(out,"[%08x] UNKNOWN", op);}
67
//More stuff for debugger
68
virtual int GetNumCategories() {return 0;}
69
virtual int GetNumRegsInCategory(int cat) {return 0;}
70
virtual const char *GetCategoryName(int cat) {return 0;}
71
virtual const char *GetRegName(int cat, int index) {return 0;}
72
virtual void PrintRegValue(int cat, int index, char *out)
74
sprintf(out,"%08X",GetGPR32Value(index));
76
virtual u32 GetRegValue(int cat, int index) {return 0;}
77
virtual void SetRegValue(int cat, int index, u32 value) {}