1
0
Fork 0

Add some analysis for exceptions containing FACILITY_VISUALCPP in exinfo

This commit is contained in:
Duncan Ogilvie 2018-10-10 15:33:49 +02:00
parent 23c2f0455d
commit 22861d69e5
1 changed files with 9 additions and 0 deletions

View File

@ -364,6 +364,7 @@ bool cbInstrExhandlers(int argc, char* argv[])
bool cbInstrExinfo(int argc, char* argv[])
{
const unsigned int MASK_FACILITY_VISUALCPP = 0x006D0000;
auto info = getLastExceptionInfo();
const auto & record = info.ExceptionRecord;
dputs_untranslated("EXCEPTION_DEBUG_INFO:");
@ -373,6 +374,14 @@ bool cbInstrExinfo(int argc, char* argv[])
exceptionName = ErrorCodeToName(record.ExceptionCode);
if(exceptionName.size())
dprintf_untranslated(" ExceptionCode: %08X (%s)\n", record.ExceptionCode, exceptionName.c_str());
else if((record.ExceptionCode & MASK_FACILITY_VISUALCPP) == MASK_FACILITY_VISUALCPP) //delayhlp.cpp
{
auto possibleError = record.ExceptionCode & 0xFFFF;
exceptionName = ErrorCodeToName(possibleError);
if(!exceptionName.empty())
exceptionName = StringUtils::sprintf(" (Visual C++ %s)", exceptionName.c_str());
dprintf_untranslated(" ExceptionCode: %08X%s\n", record.ExceptionCode, exceptionName.c_str());
}
else
dprintf_untranslated(" ExceptionCode: %08X\n", record.ExceptionCode);
dprintf_untranslated(" ExceptionFlags: %08X\n", record.ExceptionFlags);