Changeset 10433 for trunk/src/kernel32/oslibdebug.cpp
- Timestamp:
- Jan 30, 2004, 11:17:00 PM (22 years ago)
- 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 sandervlExp $ */1 /* $Id: oslibdebug.cpp,v 1.8 2004-01-30 22:17:00 bird Exp $ */ 2 2 3 3 /* … … 93 93 HEV hevSem = 0, 94 94 hevQSem = 0, 95 hevWinQSem = 0; 95 hevWinQSem = 0; 96 96 uDB_t DbgBuf = {0}; 97 97 int rc, rc2; … … 237 237 // break; 238 238 if (DbgBuf.Value == 0 && DbgBuf.Buffer == XCPT_BREAKPOINT) 239 { 239 { 240 240 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 242 242 Priority = 0; 243 243 ulElemCode = 0; … … 252 252 //Forward it to receiver 253 253 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 255 256 dprintf(("DebugThread Win32 Event %s",GetDebugMsgText(lpde2->dwDebugEventCode))); 257 #endif 256 258 DosWriteQueue(QueueHandle, 0, sizeof(DEBUG_EVENT), lpde2, 0); 257 259 //Stay stopped 258 260 } 259 261 dprintf(("DebugThread - waiting for continue signal")); 260 DosWaitEventSem(hevSem, SEM_INDEFINITE_WAIT); 262 DosWaitEventSem(hevSem, SEM_INDEFINITE_WAIT); 261 263 DosResetEventSem(hevSem,&ulNumCalled); 262 264 DbgBuf.Cmd = DBG_C_ReadReg; … … 272 274 DbgBuf.Value = XCPT_CONTINUE_EXECUTION; 273 275 goto DebugApi; 274 } 276 } 275 277 DbgBuf.Cmd = DBG_C_Continue; 276 278 DbgBuf.Value = XCPT_CONTINUE_SEARCH; … … 592 594 USHORT sel = RestoreOS2FS(); 593 595 APIRET rc; 594 dprintf(("OSLibDebugReadMemory - reading from pid %d",superpid)); 596 dprintf(("OSLibDebugReadMemory - reading from pid %d",superpid)); 595 597 DbgBuf.Pid = superpid; 596 598 DbgBuf.Cmd = DBG_C_ReadMemBuf; … … 625 627 PID pidOwner; 626 628 627 dprintf(("OSLibAddWin32Event")); 629 dprintf(("OSLibAddWin32Event")); 628 630 // open main debug semaphore 629 631 strcat(SemName, itoa(getpid(),tmp, 10)); … … 662 664 } 663 665 _interrupt(3); 664 free(lpde_copy); 666 free(lpde_copy); 665 667 DosCloseEventSem(hevSem); 666 668 DosCloseQueue(WinQueueHandle); … … 668 670 return TRUE; 669 671 fail: 670 if (lpde_copy) free(lpde_copy); 672 if (lpde_copy) free(lpde_copy); 671 673 DosCloseEventSem(hevSem); 672 674 DosCloseQueue(WinQueueHandle);
Note:
See TracChangeset
for help on using the changeset viewer.