Ignore:
Timestamp:
Jul 1, 2002, 9:14:31 PM (23 years ago)
Author:
sandervl
Message:

Print win32 module name when exception occurs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/exceptions.cpp

    r8775 r8817  
    1 /* $Id: exceptions.cpp,v 1.60 2002-06-26 07:14:18 sandervl Exp $ */
     1/* $Id: exceptions.cpp,v 1.61 2002-07-01 19:14:31 sandervl Exp $ */
    22
    33/*
     
    10361036
    10371037  if(rc == NO_ERROR && ulObject != -1)
     1038  {
    10381039    dprintf(("<%s> (#%u), obj #%u:%08x\n",
    10391040             szModule,
     
    10411042             ulObject,
    10421043             ulOffset));
    1043   else
    1044     dprintf(("<win32 app>\n"));
    1045 
     1044  }
     1045  else
     1046  {   /* fault in DosAllocMem allocated memory, hence PE loader.. */
     1047      Win32ImageBase * pMod;
     1048      if (WinExe && WinExe->insideModule((ULONG)pERepRec->ExceptionAddress))
     1049          pMod = WinExe;
     1050      else
     1051          pMod = Win32DllBase::findModuleByAddr((ULONG)pERepRec->ExceptionAddress);
     1052      if (pMod != NULL)
     1053      {
     1054          szModule[0] = '\0';
     1055          strncat(szModule, pMod->getModuleName(), sizeof(szModule) - 1);
     1056          ulObject = 0xFF;
     1057          ulOffset = (ULONG)pERepRec->ExceptionAddress - (ULONG)pMod->getInstanceHandle();
     1058          dprintf(("<%s> (#%u), obj #%u:%08x\n",
     1059                   szModule, ulModule, ulObject, ulOffset));
     1060      }
     1061      else dprintf(("<unknown win32 module>\n"));
     1062  }
    10461063
    10471064  rc = DosGetInfoBlocks (&pTIB,           /* query kernel information blocks */
Note: See TracChangeset for help on using the changeset viewer.