Ignore:
Timestamp:
Jan 30, 2004, 11:17:00 PM (22 years ago)
Author:
bird
Message:

#682: Test for DEBUG_LOGGING not DEBUG. dprintf may be used in release.

File:
1 edited

Legend:

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

    r8504 r10433  
    1 /* $Id: oslibdebug.cpp,v 1.7 2002-05-28 09:53:34 sandervl Exp $ */
     1/* $Id: oslibdebug.cpp,v 1.8 2004-01-30 22:17:00 bird Exp $ */
    22
    33/*
     
    9393  HEV    hevSem           = 0,
    9494         hevQSem          = 0,
    95          hevWinQSem       = 0;   
     95         hevWinQSem       = 0; 
    9696  uDB_t  DbgBuf           = {0};
    9797  int    rc, rc2;
     
    237237        // break;
    238238        if (DbgBuf.Value == 0 && DbgBuf.Buffer == XCPT_BREAKPOINT)
    239         { 
     239        {
    240240          dprintf(("Breakpoint encountered"));
    241           // This may be win32 event exception as well as common int3 
     241          // This may be win32 event exception as well as common int3
    242242          Priority = 0;
    243243          ulElemCode = 0;
     
    252252             //Forward it to receiver
    253253             lpde2 = (LPDEBUG_EVENT) malloc(sizeof(DEBUG_EVENT));
    254              OSLibDebugReadMemory ( lpde, lpde2,sizeof(DEBUG_EVENT),NULL); 
     254             OSLibDebugReadMemory ( lpde, lpde2,sizeof(DEBUG_EVENT),NULL);
     255             #ifdef DEBUG
    255256             dprintf(("DebugThread Win32 Event %s",GetDebugMsgText(lpde2->dwDebugEventCode)));
     257             #endif
    256258             DosWriteQueue(QueueHandle, 0, sizeof(DEBUG_EVENT), lpde2, 0);
    257259             //Stay stopped
    258260          }
    259261          dprintf(("DebugThread - waiting for continue signal"));
    260           DosWaitEventSem(hevSem, SEM_INDEFINITE_WAIT);         
     262          DosWaitEventSem(hevSem, SEM_INDEFINITE_WAIT);
    261263          DosResetEventSem(hevSem,&ulNumCalled);
    262264          DbgBuf.Cmd = DBG_C_ReadReg;
     
    272274          DbgBuf.Value = XCPT_CONTINUE_EXECUTION;
    273275          goto DebugApi;
    274        } 
     276       }
    275277       DbgBuf.Cmd = DBG_C_Continue;
    276278       DbgBuf.Value = XCPT_CONTINUE_SEARCH;
     
    592594  USHORT sel = RestoreOS2FS();
    593595  APIRET rc;
    594   dprintf(("OSLibDebugReadMemory - reading from pid %d",superpid));        
     596  dprintf(("OSLibDebugReadMemory - reading from pid %d",superpid));     
    595597  DbgBuf.Pid = superpid;
    596598  DbgBuf.Cmd = DBG_C_ReadMemBuf;
     
    625627  PID    pidOwner;
    626628
    627   dprintf(("OSLibAddWin32Event"));         
     629  dprintf(("OSLibAddWin32Event"));     
    628630  // open main debug semaphore
    629631  strcat(SemName, itoa(getpid(),tmp, 10));
     
    662664  }
    663665  _interrupt(3);
    664   free(lpde_copy); 
     666  free(lpde_copy);
    665667  DosCloseEventSem(hevSem);
    666668  DosCloseQueue(WinQueueHandle);
     
    668670  return TRUE;
    669671fail:
    670   if (lpde_copy) free(lpde_copy); 
     672  if (lpde_copy) free(lpde_copy);
    671673  DosCloseEventSem(hevSem);
    672674  DosCloseQueue(WinQueueHandle);
Note: See TracChangeset for help on using the changeset viewer.