From 0743a2f7bb193bb26a3f148bb86e2b3a28d9905e Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 17 Feb 2024 13:15:49 +0100 Subject: Core/CrashHandler: Support dumping variables stored in cpu registers (not accurate for all variables) --- src/common/Debugging/WheatyExceptionReport.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/common/Debugging/WheatyExceptionReport.cpp') diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp index 0879913cb76..ab851a7d2e5 100644 --- a/src/common/Debugging/WheatyExceptionReport.cpp +++ b/src/common/Debugging/WheatyExceptionReport.cpp @@ -1326,7 +1326,13 @@ EnumerateSymbolsCallbackContext* pCtx) pVariable += *registerValue; } else if (pSym->Flags & IMAGEHLP_SYMBOL_INFO_REGISTER) - return false; // Don't try to report register variable + { + registerVariableStorage = GetIntegerRegisterValue(pCtx->context, pSym->Register); + if (!registerVariableStorage) + return false; // Don't try to report non-integer register variable + + pVariable = reinterpret_cast(&*registerVariableStorage); + } else { // It must be a global variable -- cgit v1.2.3