mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Add a new log category
This commit is contained in:
1 parent
bf3e1b4ee1
commit
e3aaf93e28
5 files changed
+21
-22
No files matched your search
+1
-1
@@ -48,7 +48,7 @@ enum class Log {
|
||||
HTTP,
|
||||
Printf,
|
||||
TexReplacement,
|
||||
Debugger,
|
||||
GeDebugger,
|
||||
|
||||
sceAudio,
|
||||
sceCtrl,
|
||||
|
||||
@@ -163,7 +163,7 @@ NotifyResult NotifyCommand(u32 pc) {
|
||||
}
|
||||
|
||||
if (isBreakpoint && pc == g_skipPcOnce) {
|
||||
INFO_LOG(Log::G3D, "Skipping break at %08x (last break was here)", g_skipPcOnce);
|
||||
INFO_LOG(Log::GeDebugger, "Skipping GE break at %08x (last break was here)", g_skipPcOnce);
|
||||
g_skipPcOnce = 0;
|
||||
return process ? NotifyResult::Execute : NotifyResult::Skip;
|
||||
}
|
||||
@@ -179,10 +179,10 @@ NotifyResult NotifyCommand(u32 pc) {
|
||||
|
||||
auto info = gpuDebug->DisassembleOp(pc);
|
||||
if (lastStepTime >= 0.0) {
|
||||
NOTICE_LOG(Log::G3D, "Waiting at %08x, %s (%fms)", pc, info.desc.c_str(), (time_now_d() - lastStepTime) * 1000.0);
|
||||
NOTICE_LOG(Log::GeDebugger, "Waiting at %08x, %s (%fms)", pc, info.desc.c_str(), (time_now_d() - lastStepTime) * 1000.0);
|
||||
lastStepTime = -1.0;
|
||||
} else {
|
||||
NOTICE_LOG(Log::G3D, "Waiting at %08x, %s", pc, info.desc.c_str());
|
||||
NOTICE_LOG(Log::GeDebugger, "Waiting at %08x, %s", pc, info.desc.c_str());
|
||||
}
|
||||
|
||||
g_skipPcOnce = pc;
|
||||
@@ -199,10 +199,10 @@ void NotifyDraw() {
|
||||
return;
|
||||
if (breakNext == BreakNext::DRAW && !GPUStepping::IsStepping()) {
|
||||
if (lastStepTime >= 0.0) {
|
||||
NOTICE_LOG(Log::G3D, "Waiting at a draw (%fms)", (time_now_d() - lastStepTime) * 1000.0);
|
||||
NOTICE_LOG(Log::GeDebugger, "Waiting at a draw (%fms)", (time_now_d() - lastStepTime) * 1000.0);
|
||||
lastStepTime = -1.0;
|
||||
} else {
|
||||
NOTICE_LOG(Log::G3D, "Waiting at a draw");
|
||||
NOTICE_LOG(Log::GeDebugger, "Waiting at a draw");
|
||||
}
|
||||
g_drawNotified = true;
|
||||
}
|
||||
|
||||
+11
-12
@@ -383,7 +383,7 @@ private:
|
||||
|
||||
void DumpExecute::SyncStall() {
|
||||
if (execListBuf == 0) {
|
||||
VERBOSE_LOG(Log::G3D, "SyncStall: No active display list");
|
||||
VERBOSE_LOG(Log::GeDebugger, "SyncStall: No active display list");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ void DumpExecute::Registers(u32 ptr, u32 sz) {
|
||||
execListBuf = 0;
|
||||
}
|
||||
if (execListBuf == 0) {
|
||||
ERROR_LOG(Log::System, "Unable to allocate for display list");
|
||||
ERROR_LOG(Log::GeDebugger, "Unable to allocate for display list");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -514,7 +514,7 @@ void DumpExecute::Init(u32 ptr, u32 sz) {
|
||||
void DumpExecute::Vertices(u32 ptr, u32 sz) {
|
||||
u32 psp = mapping_.Map(ptr, sz, std::bind(&DumpExecute::SyncStall, this));
|
||||
if (psp == 0) {
|
||||
ERROR_LOG(Log::System, "Unable to allocate for vertices");
|
||||
ERROR_LOG(Log::GeDebugger, "Unable to allocate for vertices");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -528,7 +528,7 @@ void DumpExecute::Vertices(u32 ptr, u32 sz) {
|
||||
void DumpExecute::Indices(u32 ptr, u32 sz) {
|
||||
u32 psp = mapping_.Map(ptr, sz, std::bind(&DumpExecute::SyncStall, this));
|
||||
if (psp == 0) {
|
||||
ERROR_LOG(Log::System, "Unable to allocate for indices");
|
||||
ERROR_LOG(Log::GeDebugger, "Unable to allocate for indices");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -565,7 +565,7 @@ void DumpExecute::Clut(u32 ptr, u32 sz) {
|
||||
} else {
|
||||
u32 psp = mapping_.Map(ptr, sz, std::bind(&DumpExecute::SyncStall, this));
|
||||
if (psp == 0) {
|
||||
ERROR_LOG(Log::System, "Unable to allocate for clut");
|
||||
ERROR_LOG(Log::GeDebugger, "Unable to allocate for clut");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -577,7 +577,7 @@ void DumpExecute::Clut(u32 ptr, u32 sz) {
|
||||
void DumpExecute::TransferSrc(u32 ptr, u32 sz) {
|
||||
u32 psp = mapping_.Map(ptr, sz, std::bind(&DumpExecute::SyncStall, this));
|
||||
if (psp == 0) {
|
||||
ERROR_LOG(Log::System, "Unable to allocate for transfer");
|
||||
ERROR_LOG(Log::GeDebugger, "Unable to allocate for transfer");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -622,7 +622,7 @@ void DumpExecute::Memcpy(u32 ptr, u32 sz) {
|
||||
void DumpExecute::Texture(int level, u32 ptr, u32 sz) {
|
||||
u32 psp = mapping_.Map(ptr, sz, std::bind(&DumpExecute::SyncStall, this));
|
||||
if (psp == 0) {
|
||||
ERROR_LOG(Log::System, "Unable to allocate for texture");
|
||||
ERROR_LOG(Log::GeDebugger, "Unable to allocate for texture");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -791,7 +791,7 @@ ReplayResult DumpExecute::Run() {
|
||||
break;
|
||||
|
||||
default:
|
||||
ERROR_LOG(Log::System, "Unsupported GE dump command: %d", (int)cmd.type);
|
||||
ERROR_LOG(Log::GeDebugger, "Unsupported GE dump command: %d", (int)cmd.type);
|
||||
return ReplayResult::Error;
|
||||
}
|
||||
}
|
||||
@@ -840,7 +840,7 @@ static u32 LoadReplay(const std::string &filename) {
|
||||
u32 version = header.version;
|
||||
|
||||
if (memcmp(header.magic, HEADER_MAGIC, sizeof(header.magic)) != 0 || header.version > VERSION || header.version < MIN_VERSION) {
|
||||
ERROR_LOG(Log::System, "Invalid GE dump or unsupported version");
|
||||
ERROR_LOG(Log::GeDebugger, "Invalid GE dump or unsupported version");
|
||||
pspFileSystem.CloseFile(fp);
|
||||
return 0;
|
||||
}
|
||||
@@ -869,7 +869,7 @@ static u32 LoadReplay(const std::string &filename) {
|
||||
pspFileSystem.CloseFile(fp);
|
||||
|
||||
if (truncated) {
|
||||
ERROR_LOG(Log::System, "Truncated GE dump detected - can't replay");
|
||||
ERROR_LOG(Log::GeDebugger, "Truncated GE dump detected - can't replay");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -921,7 +921,7 @@ ReplayResult RunMountedReplay(const std::string &filename) {
|
||||
}
|
||||
version = LoadReplay(filename);
|
||||
if (!version) {
|
||||
ERROR_LOG(Log::G3D, "bad version %08x", version);
|
||||
ERROR_LOG(Log::GeDebugger, "bad version %08x", version);
|
||||
return ReplayResult::Error;
|
||||
}
|
||||
}
|
||||
@@ -971,7 +971,6 @@ ReplayResult RunMountedReplay(const std::string &filename) {
|
||||
u32 execListPos = g_opToExec.param;
|
||||
auto optParam = PSPPointer<PspGeListArgs>::Create(0);
|
||||
g_retVal = gpu->EnqueueList(listPC, execListPos, -1, optParam, false, &runList);
|
||||
INFO_LOG(Log::G3D, "Enqueued: dl=%d", g_retVal);
|
||||
if (runList) {
|
||||
hleSplitSyscallOverGe();
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ static void RunPauseAction() {
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(Log::G3D, "RunPauseAction: %s", PauseActionToString(pauseAction));
|
||||
DEBUG_LOG(Log::GeDebugger, "RunPauseAction: %s", PauseActionToString(pauseAction));
|
||||
|
||||
switch (pauseAction) {
|
||||
case PAUSE_BREAK:
|
||||
@@ -141,7 +141,8 @@ static void RunPauseAction() {
|
||||
break;
|
||||
|
||||
default:
|
||||
ERROR_LOG(Log::G3D, "Unsupported pause action, forgot to add it to the switch.");
|
||||
ERROR_LOG(Log::GeDebugger, "Unsupported pause action, forgot to add it to the switch.");
|
||||
break;
|
||||
}
|
||||
|
||||
actionComplete = true;
|
||||
@@ -185,7 +186,7 @@ bool ProcessStepping() {
|
||||
|
||||
if (pauseAction == PAUSE_CONTINUE) {
|
||||
// This is fine, can just mean to run to the next breakpoint/event.
|
||||
INFO_LOG(Log::G3D, "Continuing...");
|
||||
DEBUG_LOG(Log::GeDebugger, "Continuing...");
|
||||
actionComplete = true;
|
||||
actionWait.notify_all();
|
||||
coreState = CORE_RUNNING_GE;
|
||||
|
||||
@@ -30,7 +30,6 @@ namespace GPUStepping {
|
||||
bool EnterStepping();
|
||||
bool IsStepping();
|
||||
void ResumeFromStepping();
|
||||
void WaitForAction();
|
||||
|
||||
int GetSteppingCounter();
|
||||
|
||||
|
||||
Reference in new issue
Block a user