| 1 | /* $Id: debug.cpp,v 1.2 2000-02-16 14:25:38 sandervl Exp $ */ | 
|---|
| 2 |  | 
|---|
| 3 | /* | 
|---|
| 4 | * Win32 debug Subsystem for OS/2 | 
|---|
| 5 | * | 
|---|
| 6 | * Copyright 1999 Edgar Buerkle | 
|---|
| 7 | * | 
|---|
| 8 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 9 | * | 
|---|
| 10 | */ | 
|---|
| 11 |  | 
|---|
| 12 | /***************************************************************************** | 
|---|
| 13 | * Includes                                                                  * | 
|---|
| 14 | *****************************************************************************/ | 
|---|
| 15 | #include <os2win.h> | 
|---|
| 16 | #include <misc.h> | 
|---|
| 17 | #include "oslibdebug.h" | 
|---|
| 18 |  | 
|---|
| 19 | #define DBG_LOCALLOG    DBG_debug | 
|---|
| 20 | #include "dbglocal.h" | 
|---|
| 21 |  | 
|---|
| 22 | /***************************************************************************** | 
|---|
| 23 | * Name      : BOOL WaitForDebugEvent | 
|---|
| 24 | * Purpose   : The WaitForDebugEvent function waits for a debugging event to | 
|---|
| 25 | *             occur in a process being debugged. | 
|---|
| 26 | * Parameters: LPDEBUG_EVENT lpde      address of structure for event information | 
|---|
| 27 | *             DWORD         dwTimeout number of milliseconds to wait for event | 
|---|
| 28 | * Variables : | 
|---|
| 29 | * Result    : TRUE / FALSE | 
|---|
| 30 | * Remark    : | 
|---|
| 31 | * Status    : UNTESTED STUB | 
|---|
| 32 | * | 
|---|
| 33 | * Author    : Patrick Haller [Mon, 1998/06/15 08:00] | 
|---|
| 34 | *****************************************************************************/ | 
|---|
| 35 | BOOL WIN32API WaitForDebugEvent(LPDEBUG_EVENT lpde, DWORD dwTimeout) | 
|---|
| 36 | { | 
|---|
| 37 | dprintf(("KERNEL32: WaitForDebugEvent timeout:%d\n", dwTimeout)); | 
|---|
| 38 |  | 
|---|
| 39 | return OSLibWaitForDebugEvent(lpde, dwTimeout); | 
|---|
| 40 | } | 
|---|
| 41 | /***************************************************************************** | 
|---|
| 42 | * Name      : BOOL WIN32API ContinueDebugEvent | 
|---|
| 43 | * Purpose   : The ContinueDebugEvent function enables a debugger to continue | 
|---|
| 44 | *             a thread that previously reported a debugging event. | 
|---|
| 45 | * Parameters: DWORD dwProcessId       process to continue | 
|---|
| 46 | *             DWORD dwThreadId        thread to continue | 
|---|
| 47 | *             DWORD dwContinueStatus  continuation status | 
|---|
| 48 | * Variables : | 
|---|
| 49 | * Result    : If the function succeeds, the return value is nonzero. | 
|---|
| 50 | *             If the function fails, the return value is zero. | 
|---|
| 51 | *             To get extended error information, call GetLastError. | 
|---|
| 52 | * Remark    : Only the thread that created dwProcessId with the CreateProcess | 
|---|
| 53 | *             function can call ContinueDebugEvent. | 
|---|
| 54 | *             After the ContinueDebugEvent function succeeds, the specified | 
|---|
| 55 | *             thread continues. Depending on the debugging event previously | 
|---|
| 56 | *             reported by the thread, different actions occur. If the continued | 
|---|
| 57 | *             thread previously reported an EXIT_THREAD_DEBUG_EVENT | 
|---|
| 58 | *             debugging event, ContinueDebugEvent closes the handle the | 
|---|
| 59 | *             debugger has to the thread. If the continued thread previously | 
|---|
| 60 | *             reported an EXIT_PROCESS_DEBUG_EVENT debugging event, | 
|---|
| 61 | *             ContinueDebugEvent closes the handles the debugger has to the | 
|---|
| 62 | *             process and to the thread. | 
|---|
| 63 | * Status    : UNTESTED STUB | 
|---|
| 64 | * | 
|---|
| 65 | * Author    : Markus Montkowski [Thu, 1998/05/19 11:46] | 
|---|
| 66 | *****************************************************************************/ | 
|---|
| 67 | BOOL WIN32API ContinueDebugEvent( DWORD dwProcessId, DWORD dwThreadId, | 
|---|
| 68 | DWORD dwContinueStatus) | 
|---|
| 69 | { | 
|---|
| 70 |  | 
|---|
| 71 | dprintf(("KERNEL32:  ContinueDebugEvent(%08x,%08x,%08x)not correctly implemented\n", | 
|---|
| 72 | dwProcessId, dwThreadId, dwContinueStatus)); | 
|---|
| 73 |  | 
|---|
| 74 | return OSLibContinueDebugEvent(dwProcessId, dwThreadId, dwContinueStatus); | 
|---|
| 75 | } | 
|---|
| 76 | //****************************************************************************** | 
|---|
| 77 | //****************************************************************************** | 
|---|