EE Rec: Remove memcheck code that got the current pc op and did nothing with it

This commit is contained in:
Ty Lamontagne
2026-09-20 10:29:14 -04:00
committed by Ty
parent dcd87f73ee
commit c09e8f34dd
9 changed files with 14 additions and 18 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ struct BreakPointCond
PostfixExpression expression;
std::string expressionString;
u32 Evaluate()
u32 Evaluate() const
{
u64 result;
std::string error;
@@ -170,7 +170,7 @@ public:
// Returns count of all non-temporary breakpoints
static size_t GetNumBreakpoints()
{
return std::count_if(breakPoints_.begin(), breakPoints_.end(), [](BreakPoint& bp) { return !bp.temporary; });
return std::count_if(breakPoints_.begin(), breakPoints_.end(), [](const BreakPoint& bp) { return !bp.temporary; });
}
static size_t GetNumMemchecks() { return memChecks_.size(); }
+1 -1
View File
@@ -122,7 +122,7 @@ bool DebugInterface::initExpression(const char* exp, PostfixExpression& dest, st
return initPostfixExpression(exp, &funcs, dest, error);
}
bool DebugInterface::parseExpression(PostfixExpression& exp, u64& dest, std::string& error)
bool DebugInterface::parseExpression(const PostfixExpression& exp, u64& dest, std::string& error)
{
MipsExpressionFunctions funcs(this, nullptr, false);
return parsePostfixExpression(exp, &funcs, dest, error);
+1 -1
View File
@@ -86,7 +86,7 @@ public:
bool evaluateExpression(const char* expression, u64& dest, std::string& error);
bool initExpression(const char* exp, PostfixExpression& dest, std::string& error);
bool parseExpression(PostfixExpression& exp, u64& dest, std::string& error);
bool parseExpression(const PostfixExpression& exp, u64& dest, std::string& error);
static void setPauseOnEntry(bool pauseOnEntry) { m_pause_on_entry = pauseOnEntry; };
static bool getPauseOnEntry() { return m_pause_on_entry; }
+1 -1
View File
@@ -411,7 +411,7 @@ bool initPostfixExpression(const char* infix, IExpressionFunctions* funcs, Postf
return true;
}
bool parsePostfixExpression(PostfixExpression& exp, IExpressionFunctions* funcs, u64& dest, std::string& error)
bool parsePostfixExpression(const PostfixExpression& exp, IExpressionFunctions* funcs, u64& dest, std::string& error)
{
size_t num = 0;
u64 opcode;
+1 -1
View File
@@ -27,5 +27,5 @@ public:
};
bool initPostfixExpression(const char* infix, IExpressionFunctions* funcs, PostfixExpression& dest, std::string& error);
bool parsePostfixExpression(PostfixExpression& exp, IExpressionFunctions* funcs, u64& dest, std::string& error);
bool parsePostfixExpression(const PostfixExpression& exp, IExpressionFunctions* funcs, u64& dest, std::string& error);
bool parseExpression(const char* exp, IExpressionFunctions* funcs, u64& dest, std::string& error);
+2 -2
View File
@@ -99,10 +99,10 @@ void intMemcheck(u32 op, u32 bits, bool store)
start = standardizeBreakpointAddress(start);
const u32 end = start + bits/8;
auto checks = CBreakPoints::GetMemChecks(BREAKPOINT_EE);
const auto checks = CBreakPoints::GetMemChecks(BREAKPOINT_EE);
for (size_t i = 0; i < checks.size(); i++)
{
auto& check = checks[i];
const auto& check = checks[i];
if (check.result == 0)
continue;
+2 -2
View File
@@ -149,10 +149,10 @@ void psxMemcheck(u32 op, u32 bits, bool store)
u32 end = start + bits / 8;
auto checks = CBreakPoints::GetMemChecks(BREAKPOINT_IOP);
const auto checks = CBreakPoints::GetMemChecks(BREAKPOINT_IOP);
for (size_t i = 0; i < checks.size(); i++)
{
auto& check = checks[i];
const auto& check = checks[i];
if (check.result == 0)
continue;
+2 -4
View File
@@ -1368,9 +1368,7 @@ static bool psxDynarecCheckBreakpoint()
static bool psxDynarecMemcheck(size_t i)
{
const u32 pc = psxRegs.pc;
const u32 op = iopMemRead32(pc);
const R5900::OPCODE& opcode = R5900::GetInstruction(op);
auto mc = CBreakPoints::GetMemChecks(BREAKPOINT_IOP)[i];
const auto mc = CBreakPoints::GetMemChecks(BREAKPOINT_IOP)[i];
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_IOP, pc) == pc)
{
@@ -1409,7 +1407,7 @@ static void psxRecMemcheck(u32 op, u32 bits, bool store)
// ecx = access address
// edx = access address+size
auto checks = CBreakPoints::GetMemChecks(BREAKPOINT_IOP);
const auto checks = CBreakPoints::GetMemChecks(BREAKPOINT_IOP);
for (size_t i = 0; i < checks.size(); i++)
{
if (checks[i].result == 0)
+2 -4
View File
@@ -1564,15 +1564,13 @@ void dynarecCheckBreakpoint()
void dynarecMemcheck(size_t i)
{
const u32 op = memRead32(cpuRegs.pc);
const OPCODE& opcode = GetInstruction(op);
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_EE, pc) != 0)
{
CBreakPoints::ClearSkipFirst(BREAKPOINT_EE);
return;
}
auto mc = CBreakPoints::GetMemChecks(BREAKPOINT_EE)[i];
const auto mc = CBreakPoints::GetMemChecks(BREAKPOINT_EE)[i];
if (mc.hasCond)
{
@@ -1608,7 +1606,7 @@ void recMemcheck(u32 op, u32 bits, bool store)
// ecx = access address
// edx = access address+size
auto checks = CBreakPoints::GetMemChecks(BREAKPOINT_EE);
const auto checks = CBreakPoints::GetMemChecks(BREAKPOINT_EE);
for (size_t i = 0; i < checks.size(); i++)
{
if (checks[i].result == 0)