Merge pull request #16047 from unknownbrackets/ge-debugger

GE Debugger: Allow search by state name
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2022-09-19 09:42:26 +02:00
commit 2b93fac3c3
3 files changed
+59 -2

No files matched your search

+17 -2
View File
@@ -18,6 +18,7 @@
#include <vector>
#include "Common/Log.h"
#include "Common/StringUtils.h"
#include "Common/TimeUtil.h"
#include "GPU/GPU.h"
#include "GPU/Debugger/Breakpoints.h"
#include "GPU/Debugger/Debugger.h"
@@ -35,6 +36,8 @@ static int primsLastFrame = 0;
static int primsThisFrame = 0;
static int thisFlipNum = 0;
static double lastStepTime = -1.0;
static std::vector<std::pair<int, int>> restrictPrimRanges;
static std::string restrictPrimRule;
@@ -56,6 +59,7 @@ void SetActive(bool flag) {
breakNext = BreakNext::NONE;
breakAtCount = -1;
GPUStepping::ResumeFromStepping();
lastStepTime = -1.0;
}
}
@@ -79,6 +83,7 @@ void SetBreakNext(BreakNext next) {
GPUBreakpoints::AddCmdBreakpoint(GE_CMD_SPLINE, true);
}
GPUStepping::ResumeFromStepping();
lastStepTime = next == BreakNext::NONE ? -1.0 : time_now_d();
}
void SetBreakCount(int c, bool relative) {
@@ -130,7 +135,12 @@ bool NotifyCommand(u32 pc) {
GPUBreakpoints::ClearTempBreakpoints();
auto info = gpuDebug->DissassembleOp(pc);
NOTICE_LOG(G3D, "Waiting at %08x, %s", pc, info.desc.c_str());
if (lastStepTime >= 0.0) {
NOTICE_LOG(G3D, "Waiting at %08x, %s (%fms)", pc, info.desc.c_str(), (time_now_d() - lastStepTime) * 1000.0);
lastStepTime = -1.0;
} else {
NOTICE_LOG(G3D, "Waiting at %08x, %s", pc, info.desc.c_str());
}
GPUStepping::EnterStepping();
}
@@ -141,7 +151,12 @@ void NotifyDraw() {
if (!active)
return;
if (breakNext == BreakNext::DRAW && !GPUStepping::IsStepping()) {
NOTICE_LOG(G3D, "Waiting at a draw");
if (lastStepTime >= 0.0) {
NOTICE_LOG(G3D, "Waiting at a draw (%fms)", (time_now_d() - lastStepTime) * 1000.0);
lastStepTime = -1.0;
} else {
NOTICE_LOG(G3D, "Waiting at a draw");
}
GPUStepping::EnterStepping();
}
}