diff options
| author | Shauren <shauren.trinity@gmail.com> | 2024-02-17 13:15:49 +0100 | 
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2024-02-26 12:29:16 +0100 | 
| commit | 2cb5f7a81ed67fb217b78a131faf35d16ac83dba (patch) | |
| tree | 8db3e7ca14c0fd85e82c31b4e71fba02b4802880 /src/common | |
| parent | 120b4d7cf44bf2c833f649f13c51ad177bd9d01c (diff) | |
Core/CrashHandler: Support dumping variables stored in cpu registers (not accurate for all variables)
(cherry picked from commit 0743a2f7bb193bb26a3f148bb86e2b3a28d9905e)
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/Debugging/WheatyExceptionReport.cpp | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp index 969c7575d4e..b88b510fbbb 100644 --- a/src/common/Debugging/WheatyExceptionReport.cpp +++ b/src/common/Debugging/WheatyExceptionReport.cpp @@ -1323,7 +1323,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<DWORD_PTR>(&*registerVariableStorage); +    }      else      {          // It must be a global variable  | 
