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