Alert the debugger of the HLECache filename
Quick workaround, but the HLE files should work well as symbol names
This commit is contained in:
parent
65587deb17
commit
6899e6511e
|
@ -148,6 +148,26 @@ bool VerifySymbolAddressAgainstXRef(char *SymbolName, xbaddr Address, int XRef)
|
|||
return false;
|
||||
}
|
||||
|
||||
// x1nixmzeng: Hack to notify CxbxDebugger of the HLECache file, which is currently a hashed XBE header AND stripped title (see EmuHLEIntercept)
|
||||
class CxbxDebuggerScopedMessage
|
||||
{
|
||||
std::string& message;
|
||||
|
||||
CxbxDebuggerScopedMessage() = delete;
|
||||
CxbxDebuggerScopedMessage(const CxbxDebuggerScopedMessage&) = delete;
|
||||
public:
|
||||
|
||||
CxbxDebuggerScopedMessage(std::string& message_string)
|
||||
: message(message_string)
|
||||
{ }
|
||||
|
||||
~CxbxDebuggerScopedMessage()
|
||||
{
|
||||
std::string debuggerMessage = "CxbxDebugger! " + message;
|
||||
OutputDebugString(debuggerMessage.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
void EmuHLEIntercept(Xbe::Header *pXbeHeader)
|
||||
{
|
||||
Xbe::LibraryVersion *pLibraryVersion = (Xbe::LibraryVersion*)pXbeHeader->dwLibraryVersionsAddr;
|
||||
|
@ -176,6 +196,9 @@ void EmuHLEIntercept(Xbe::Header *pXbeHeader)
|
|||
sstream << cachePath << szTitleName << "-" << std::hex << uiHash << ".ini";
|
||||
std::string filename = sstream.str();
|
||||
|
||||
// This will fire when we exit this function scope; either after detecting a previous cache file, or when one is created
|
||||
CxbxDebuggerScopedMessage hleCacheFilename(filename);
|
||||
|
||||
if (PathFileExists(filename.c_str())) {
|
||||
printf("Found HLE Cache File: %08X.ini\n", uiHash);
|
||||
|
||||
|
@ -645,8 +668,6 @@ void EmuHLEIntercept(Xbe::Header *pXbeHeader)
|
|||
cacheAddress << std::hex << (*it).second;
|
||||
WritePrivateProfileString("Symbols", (*it).first.c_str(), cacheAddress.str().c_str(), filename.c_str());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
inline void EmuInstallPatch(std::string FunctionName, xbaddr FunctionAddr, void *Patch)
|
||||
|
|
Loading…
Reference in New Issue