Copy w32api from trunk
[reactos.git] / reactos / ntoskrnl / dbgk / dbgkutil.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Kernel
4 * FILE: ntoskrnl/dbgk/dbgkutil.c
5 * PURPOSE: User-Mode Debugging Support, Internal Debug Functions.
6 *
7 * PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
8 */
9
10 /* INCLUDES *****************************************************************/
11
12 #include <ntoskrnl.h>
13 #define NDEBUG
14 #include <internal/debug.h>
15
16 /* FUNCTIONS *****************************************************************/
17
18 VOID
19 STDCALL
20 DbgkCreateThread(PVOID StartAddress)
21 {
22 #if 0
23 LPC_DBG_MESSAGE Message;
24 LPC_DBG_MESSAGE Reply;
25 NTSTATUS Status;
26
27 if (PsGetCurrentThread()->ThreadsProcess->DebugPort == NULL)
28 {
29 return;
30 }
31
32 Message.Header.MessageSize = sizeof(LPC_DBG_MESSAGE);
33 Message.Header.DataSize = sizeof(LPC_DBG_MESSAGE) -
34 sizeof(LPC_MESSAGE);
35 Message.Type = DBG_EVENT_CREATE_THREAD;
36 Message.Status = STATUS_SUCCESS;
37 Message.Data.CreateThread.Reserved = 0;
38 Message.Data.CreateThread.StartAddress = StartAddress;
39
40 /* FIXME: Freeze all threads in process */
41
42 /* Send the message to the process's debug port and wait for a reply */
43 Status =
44 LpcSendDebugMessagePort(PsGetCurrentThread()->ThreadsProcess->DebugPort,
45 &Message,
46 &Reply);
47 if (!NT_SUCCESS(Status))
48 {
49 return;
50 }
51
52 /* FIXME: Examine reply */
53 return;
54 #endif
55 }
56
57 /* EOF */