Start work on imdbg

This commit is contained in:
Henrik Rydgård committed 2024-11-07 11:10:12 +01:00
1 parent 6fcb75ce63
commit cf6d06c56a
23 files changed
+1645 -31

No files matched your search

+14 -8
View File
@@ -243,15 +243,21 @@ void MIPSDebugInterface::toggleBreakpoint(unsigned int address)
}
int MIPSDebugInterface::getColor(unsigned int address)
{
int colors[6] = {0xe0FFFF,0xFFe0e0,0xe8e8FF,0xFFe0FF,0xe0FFe0,0xFFFFe0};
int n=g_symbolMap->GetFunctionNum(address);
if (n==-1) return 0xFFFFFF;
return colors[n%6];
int MIPSDebugInterface::getColor(unsigned int address, bool darkMode) const {
int colors[6] = { 0xe0FFFF, 0xFFe0e0, 0xe8e8FF, 0xFFe0FF, 0xe0FFe0, 0xFFFFe0 };
int colorsDark[6] = { ~0xe0FFFF, ~0xFFe0e0, ~0xe8e8FF, ~0xFFe0FF, ~0xe0FFe0, ~0xFFFFe0 };
int n = g_symbolMap->GetFunctionNum(address);
if (n == -1) {
return DebugInterface::getColor(address, darkMode);
} else if (darkMode) {
return colorsDark[n % ARRAY_SIZE(colorsDark)];
} else {
return colors[n % ARRAY_SIZE(colors)];
}
}
std::string MIPSDebugInterface::getDescription(unsigned int address)
{
std::string MIPSDebugInterface::getDescription(unsigned int address) {
return g_symbolMap->GetDescription(address);
}