Changeset 10433 for trunk/src


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.

Location:
trunk/src/kernel32
Files:
3 edited

Legend:

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

    r10185 r10433  
    1 /* $Id: hmcomm.cpp,v 1.40 2003-07-28 11:35:31 sandervl Exp $ */
     1/* $Id: hmcomm.cpp,v 1.41 2004-01-30 22:16:59 bird Exp $ */
    22
    33/*
     
    6262static DWORD CommWriteIOHandler(LPASYNCIOREQUEST lpRequest, DWORD *lpdwResult, DWORD *lpdwTimeOut);
    6363static DWORD CommPollIOHandler(LPASYNCIOREQUEST lpRequest, DWORD *lpdwResult, DWORD *lpdwTimeOut);
    64 #ifdef DEBUG
     64#ifdef DEBUG_LOGGING
    6565static char *DebugCommEvent(DWORD dwEvents);
    6666static char *DebugModemStatus(DWORD dwModemStatus);
     
    249249            comnr = comname[3] - '1';
    250250
    251             if(handler[comnr] == NULL) 
     251            if(handler[comnr] == NULL)
    252252            {
    253253                try {
     
    445445        dwEvent |= (COMEvt&0x0080)? EV_ERR:0;
    446446        dwEvent |= (COMEvt&0x0100)? EV_RING:0;
    447  
     447
    448448#ifdef DEBUG
    449449        if(dwEvent & EV_ERR) {
     
    460460        }
    461461#endif
    462         if((dwEvent & EV_RXCHAR) && (dwMask & EV_RXCHAR)) 
     462        if((dwEvent & EV_RXCHAR) && (dwMask & EV_RXCHAR))
    463463        {
    464464            //check if there's really data in the in queue
     
    552552                        &ulBytesWritten);
    553553
    554     if(lpNumberOfBytesWritten) { 
     554    if(lpNumberOfBytesWritten) {
    555555       *lpNumberOfBytesWritten = (ret) ? ulBytesWritten : 0;
    556556       dprintf2(("KERNEL32:HMDeviceCommClass::WriteFile %d byte(s) written", *lpNumberOfBytesWritten));
     
    942942  USHORT COMErr;
    943943
    944   if(lpdwErrors == NULL) 
     944  if(lpdwErrors == NULL)
    945945     lpdwErrors = &dwError;
    946  
     946
    947947  dprintf(("HMDeviceCommClass::ClearCommError"));
    948948  ulLen = sizeof(USHORT);
     
    16661666    }
    16671667}
    1668 #ifdef DEBUG
     1668#ifdef DEBUG_LOGGING
    16691669//******************************************************************************
    16701670//******************************************************************************
     
    16721672{
    16731673    static char szCommEvents[128];
    1674  
     1674
    16751675    szCommEvents[0] = 0;
    16761676
     
    17061706{
    17071707    static char szModemStatus[128];
    1708  
     1708
    17091709    szModemStatus[0] = 0;
    17101710
  • 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);
  • trunk/src/kernel32/windllbase.cpp

    r10397 r10433  
    1 /* $Id: windllbase.cpp,v 1.34 2004-01-15 10:39:06 sandervl Exp $ */
     1/* $Id: windllbase.cpp,v 1.35 2004-01-30 22:17:00 bird Exp $ */
    22
    33/*
     
    213213 Win32DllBase *dll;
    214214
     215#ifdef DEBUG
    215216    dprintf(("Win32DllBase::AddRef %s->%s %d", parentname, getModuleName(), referenced+1));
     217#endif
    216218    ++referenced;
    217219#ifdef DEBUG
Note: See TracChangeset for help on using the changeset viewer.