Changeset 6146 for trunk/src/kernel32/exceptions.cpp
- Timestamp:
- Jul 3, 2001, 3:17:42 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/exceptions.cpp
r5905 r6146 1 /* $Id: exceptions.cpp,v 1.5 3 2001-06-04 21:18:39 sandervlExp $ */1 /* $Id: exceptions.cpp,v 1.54 2001-07-03 13:17:42 bird Exp $ */ 2 2 3 3 /* … … 65 65 #include "oslibexcept.h" 66 66 #include "exceptstackdump.h" 67 68 #include "WinImageBase.h" 69 #include "WinDllBase.h" 70 #include "WinExeBase.h" 67 71 68 72 #define DBG_LOCALLOG DBG_exceptions … … 524 528 LONG WIN32API UnhandledExceptionFilter(PWINEXCEPTION_POINTERS lpexpExceptionInfo) 525 529 { 526 char message[72]; 527 DWORD rc; 528 530 char szModName[16]; 531 char message[128]; 532 ULONG iObj; 533 ULONG offObj; 534 HMODULE hmod; 535 DWORD rc; 536 537 #if 0 //not in use... 529 538 // @@@PH: experimental change to have more control over exception handling 530 539 #pragma pack(4) … … 550 559 {"~terminate process", 103, BS_PUSHBUTTON | BS_TEXT | BS_AUTOSIZE} } 551 560 }; 561 #endif 552 562 553 563 dprintf(("KERNEL32: Default UnhandledExceptionFilter, CurrentErrorMode=%X", CurrentErrorMode)); … … 563 573 } 564 574 565 sprintf(message, 566 "Unhandled exception 0x%08lx at address 0x%08lx.", 567 lpexpExceptionInfo->ExceptionRecord->ExceptionCode, 568 lpexpExceptionInfo->ExceptionRecord->ExceptionAddress); 575 576 if (DosQueryModFromEIP(&hmod, &iObj, sizeof(szModName), szModName, &offObj, (ULONG)lpexpExceptionInfo->ExceptionRecord->ExceptionAddress)) 577 sprintf(message, 578 "Unhandled exception 0x%08lx at address 0x%08lx. (DQMFEIP rc=%d)", 579 lpexpExceptionInfo->ExceptionRecord->ExceptionCode, 580 lpexpExceptionInfo->ExceptionRecord->ExceptionAddress); 581 else 582 { 583 if (iObj == -1) 584 { /* fault in DosAllocMem allocated memory, hence PE loader.. */ 585 Win32ImageBase * pMod; 586 if (WinExe && WinExe->insideModule((ULONG)lpexpExceptionInfo->ExceptionRecord->ExceptionAddress)) 587 pMod = WinExe; 588 else 589 pMod = Win32DllBase::findModuleByAddr((ULONG)lpexpExceptionInfo->ExceptionRecord->ExceptionAddress); 590 if (pMod != NULL) 591 { 592 szModName[0] = '\0'; 593 strncat(szModName, pMod->getModuleName(), sizeof(szModName) - 1); 594 } 595 } 596 sprintf(message, 597 "Unhandled exception 0x%08lx at address 0x%08lx.\r" 598 "Mod: %s obj: 0x%2lx off:0x%08lx", 599 lpexpExceptionInfo->ExceptionRecord->ExceptionCode, 600 lpexpExceptionInfo->ExceptionRecord->ExceptionAddress, 601 szModName, iObj, offObj); 602 } 603 569 604 /* 570 605 rc = WinMessageBox2(HWND_DESKTOP,
Note:
See TracChangeset
for help on using the changeset viewer.