Ignore:
Timestamp:
Apr 30, 2002, 11:36:09 AM (23 years ago)
Author:
sandervl
Message:

KSO: Changes for debug heap (makefile + exception handler)

File:
1 edited

Legend:

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

    r7202 r8339  
    1 /* $Id: exceptions.cpp,v 1.57 2001-10-25 13:19:04 sandervl Exp $ */
     1/* $Id: exceptions.cpp,v 1.58 2002-04-30 09:36:09 sandervl Exp $ */
    22
    33/*
     
    7272#define DBG_LOCALLOG    DBG_exceptions
    7373#include "dbglocal.h"
     74
     75#ifdef WITH_KLIB
     76/* quick and dirty - don't wanna mess with includes. */
     77typedef enum { enmRead, enmWrite, enmUnknown } ENMACCESS;
     78BOOL  _Optlink      kHeapDbgException(void *    pvAccess,
     79                                      ENMACCESS enmAccess,
     80                                      void *    pvIP,
     81                                      void *    pvOS);
     82#endif
    7483
    7584/* Exception record for handling exceptions happening inside exception handlers */
     
    11641173  case XCPT_ACCESS_VIOLATION:
    11651174  {
    1166    Win32MemMap *map;
    1167    BOOL  fWriteAccess = FALSE;
    1168    ULONG offset, accessflag;
     1175        Win32MemMap *map;
     1176        BOOL  fWriteAccess = FALSE;
     1177        ULONG offset, accessflag;
     1178
     1179#ifdef WITH_KLIB
     1180        if (     pERepRec->ExceptionInfo[0] == XCPT_READ_ACCESS
     1181              || pERepRec->ExceptionInfo[0] == XCPT_WRITE_ACCESS
     1182              || pERepRec->ExceptionInfo[0] == XCPT_EXECUTE_ACCESS
     1183              || pERepRec->ExceptionInfo[0] == XCPT_UNKNOWN_ACCESS
     1184                )
     1185        {
     1186            ENMACCESS enmAccess = enmRead;
     1187            switch (pERepRec->ExceptionInfo[0])
     1188            {
     1189                case XCPT_WRITE_ACCESS:     enmAccess = enmWrite; break;
     1190                case XCPT_UNKNOWN_ACCESS:   enmAccess = enmUnknown; break;
     1191            }
     1192
     1193            if (kHeapDbgException((void*)pERepRec->ExceptionInfo[1],
     1194                                  enmAccess,
     1195                                  pERepRec->ExceptionAddress,
     1196                                  pERepRec))
     1197                goto continueexecution;
     1198        }
     1199#endif
    11691200
    11701201        if(pERepRec->ExceptionInfo[1] == 0 && pERepRec->ExceptionInfo[1] == XCPT_DATA_UNKNOWN) {
Note: See TracChangeset for help on using the changeset viewer.