From f895edc10d25a321d30d476f3faffee8d1654dc2 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Fri, 1 Aug 2008 20:36:14 +0000 Subject: [PATCH] add simple PC logging facility for debugging. not enabled by default. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@125 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/x64Emitter.cpp | 1 + Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/Src/x64Emitter.cpp b/Source/Core/Common/Src/x64Emitter.cpp index e4894a8068..680f1f9927 100644 --- a/Source/Core/Common/Src/x64Emitter.cpp +++ b/Source/Core/Common/Src/x64Emitter.cpp @@ -16,6 +16,7 @@ // http://code.google.com/p/dolphin-emu/ #include "Common.h" #include "x64Emitter.h" +#include "ABI.h" #include "CPUDetect.h" namespace Gen diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp index 5d4deb3a69..04f5828b0f 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp @@ -259,10 +259,16 @@ namespace Jit64 } bool ImHereDebug = false; - + bool ImHereLog = false; std::map been_here; void ImHere() { + static FILE *f = 0; + if (ImHereLog) { + if (!f) + f = fopen("log.txt", "w"); + fprintf(f, "%08x\n", PC); + } if (been_here.find(PC) != been_here.end()) { been_here.find(PC)->second++; if ((been_here.find(PC)->second) & 1023)