mirror of https://github.com/PCSX2/pcsx2.git
Debugger: Disable instruction simplification
This commit is contained in:
parent
be405eb705
commit
e9ead0d33d
|
@ -408,13 +408,13 @@ u32 DisassemblyFunction::getLineAddress(int line)
|
||||||
return lineAddresses[line];
|
return lineAddresses[line];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisassemblyFunction::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols)
|
bool DisassemblyFunction::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify)
|
||||||
{
|
{
|
||||||
auto it = findDisassemblyEntry(entries,address,false);
|
auto it = findDisassemblyEntry(entries,address,false);
|
||||||
if (it == entries.end())
|
if (it == entries.end())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return it->second->disassemble(address,dest,insertSymbols);
|
return it->second->disassemble(address,dest,simplify, simplify);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisassemblyFunction::getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest)
|
void DisassemblyFunction::getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest)
|
||||||
|
@ -695,11 +695,11 @@ void DisassemblyFunction::clear()
|
||||||
hash = 0;
|
hash = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisassemblyOpcode::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols)
|
bool DisassemblyOpcode::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify)
|
||||||
{
|
{
|
||||||
char opcode[64],arguments[256];
|
char opcode[64],arguments[256];
|
||||||
|
|
||||||
std::string dis = cpu->disasm(address,insertSymbols);
|
std::string dis = cpu->disasm(address,simplify);
|
||||||
parseDisasm(cpu->GetSymbolMap(),dis.c_str(),opcode,arguments,std::size(arguments),insertSymbols);
|
parseDisasm(cpu->GetSymbolMap(),dis.c_str(),opcode,arguments,std::size(arguments),insertSymbols);
|
||||||
dest.type = DISTYPE_OPCODE;
|
dest.type = DISTYPE_OPCODE;
|
||||||
dest.name = opcode;
|
dest.name = opcode;
|
||||||
|
@ -765,7 +765,7 @@ void DisassemblyMacro::setMacroMemory(const std::string& _name, u32 _immediate,
|
||||||
numOpcodes = 2;
|
numOpcodes = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisassemblyMacro::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols)
|
bool DisassemblyMacro::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify)
|
||||||
{
|
{
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
dest.type = DISTYPE_MACRO;
|
dest.type = DISTYPE_MACRO;
|
||||||
|
@ -836,7 +836,7 @@ void DisassemblyData::recheck()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisassemblyData::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols)
|
bool DisassemblyData::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify)
|
||||||
{
|
{
|
||||||
dest.type = DISTYPE_DATA;
|
dest.type = DISTYPE_DATA;
|
||||||
|
|
||||||
|
@ -1034,7 +1034,7 @@ DisassemblyComment::DisassemblyComment(DebugInterface* _cpu, u32 _address, u32 _
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisassemblyComment::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols)
|
bool DisassemblyComment::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify)
|
||||||
{
|
{
|
||||||
dest.type = DISTYPE_OTHER;
|
dest.type = DISTYPE_OTHER;
|
||||||
dest.name = name;
|
dest.name = name;
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
virtual int getLineNum(u32 address, bool findStart) = 0;
|
virtual int getLineNum(u32 address, bool findStart) = 0;
|
||||||
virtual u32 getLineAddress(int line) = 0;
|
virtual u32 getLineAddress(int line) = 0;
|
||||||
virtual u32 getTotalSize() = 0;
|
virtual u32 getTotalSize() = 0;
|
||||||
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) = 0;
|
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify = false) = 0;
|
||||||
virtual void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest) { };
|
virtual void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest) { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ public:
|
||||||
virtual int getLineNum(u32 address, bool findStart);
|
virtual int getLineNum(u32 address, bool findStart);
|
||||||
virtual u32 getLineAddress(int line);
|
virtual u32 getLineAddress(int line);
|
||||||
virtual u32 getTotalSize() { return size; };
|
virtual u32 getTotalSize() { return size; };
|
||||||
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols);
|
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify = false);
|
||||||
virtual void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest);
|
virtual void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest);
|
||||||
private:
|
private:
|
||||||
void generateBranchLines();
|
void generateBranchLines();
|
||||||
|
@ -98,7 +98,7 @@ public:
|
||||||
virtual int getLineNum(u32 address, bool findStart) { return (address-this->address)/4; };
|
virtual int getLineNum(u32 address, bool findStart) { return (address-this->address)/4; };
|
||||||
virtual u32 getLineAddress(int line) { return address+line*4; };
|
virtual u32 getLineAddress(int line) { return address+line*4; };
|
||||||
virtual u32 getTotalSize() { return num*4; };
|
virtual u32 getTotalSize() { return num*4; };
|
||||||
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols);
|
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify = false);
|
||||||
virtual void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest);
|
virtual void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest);
|
||||||
private:
|
private:
|
||||||
DebugInterface* cpu;
|
DebugInterface* cpu;
|
||||||
|
@ -122,7 +122,7 @@ public:
|
||||||
virtual int getLineNum(u32 address, bool findStart) { return 0; };
|
virtual int getLineNum(u32 address, bool findStart) { return 0; };
|
||||||
virtual u32 getLineAddress(int line) { return address; };
|
virtual u32 getLineAddress(int line) { return address; };
|
||||||
virtual u32 getTotalSize() { return numOpcodes*4; };
|
virtual u32 getTotalSize() { return numOpcodes*4; };
|
||||||
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) ;
|
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify = false);
|
||||||
private:
|
private:
|
||||||
enum MacroType { MACRO_LI, MACRO_MEMORYIMM };
|
enum MacroType { MACRO_LI, MACRO_MEMORYIMM };
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ public:
|
||||||
virtual int getLineNum(u32 address, bool findStart);
|
virtual int getLineNum(u32 address, bool findStart);
|
||||||
virtual u32 getLineAddress(int line) { return lineAddresses[line]; };
|
virtual u32 getLineAddress(int line) { return lineAddresses[line]; };
|
||||||
virtual u32 getTotalSize() { return size; };
|
virtual u32 getTotalSize() { return size; };
|
||||||
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols);
|
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify = false);
|
||||||
private:
|
private:
|
||||||
void createLines();
|
void createLines();
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ public:
|
||||||
virtual int getLineNum(u32 address, bool findStart) { return 0; };
|
virtual int getLineNum(u32 address, bool findStart) { return 0; };
|
||||||
virtual u32 getLineAddress(int line) { return address; };
|
virtual u32 getLineAddress(int line) { return address; };
|
||||||
virtual u32 getTotalSize() { return size; };
|
virtual u32 getTotalSize() { return size; };
|
||||||
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols);
|
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols, bool simplify = false);
|
||||||
private:
|
private:
|
||||||
[[maybe_unused]]DebugInterface* cpu;
|
[[maybe_unused]]DebugInterface* cpu;
|
||||||
u32 address;
|
u32 address;
|
||||||
|
|
Loading…
Reference in New Issue