ReactOS  0.4.14-dev-604-gcfdd483
kdgdb.h File Reference
#include <ntifs.h>
#include <halfuncs.h>
#include <stdio.h>
#include <arc/arc.h>
#include <inttypes.h>
#include <windbgkd.h>
#include <kddll.h>
#include <pstypes.h>
Include dependency graph for kdgdb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NOEXTAPI
 
#define MONOPROCESS   1
 
#define KDDBGPRINT(...)
 
#define gdb_pid_to_handle   gdb_tid_to_handle
 
#define handle_to_gdb_pid   handle_to_gdb_tid
 

Typedefs

typedef VOID(* KDP_SEND_HANDLER) (_In_ ULONG PacketType, _In_ PSTRING MessageHeader, _In_ PSTRING MessageData)
 
typedef KDSTATUS(* KDP_MANIPULATESTATE_HANDLER) (_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
 

Functions

FORCEINLINE HANDLE gdb_tid_to_handle (UINT_PTR Tid)
 
FORCEINLINE UINT_PTR handle_to_gdb_tid (HANDLE Handle)
 
FORCEINLINE VOID InitManipulateFromStateChange (_In_ ULONG ApiNumber, _In_ const DBGKD_ANY_WAIT_STATE_CHANGE *StateChange, _Out_ DBGKD_MANIPULATE_STATE64 *Manipulate)
 
KDSTATUS gdb_receive_and_interpret_packet (_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
 
KDSTATUS NTAPI gdb_receive_packet (_Inout_ PKD_CONTEXT KdContext)
 
char hex_value (char ch)
 
KDSTATUS send_gdb_packet (_In_ const CHAR *Buffer)
 
void start_gdb_packet (void)
 
void send_gdb_partial_packet (_In_ const CHAR *Buffer)
 
KDSTATUS finish_gdb_packet (void)
 
KDSTATUS send_gdb_memory (_In_ const VOID *Buffer, size_t Length)
 
void send_gdb_partial_memory (_In_ const VOID *Buffer, _In_ size_t Length)
 
ULONG send_gdb_partial_binary (_In_ const VOID *Buffer, _In_ size_t Length)
 
KDSTATUS gdb_send_debug_io (_In_ PSTRING String, _In_ BOOLEAN WithPrefix)
 
KDSTATUS gdb_send_exception (void)
 
void send_gdb_ntstatus (_In_ NTSTATUS Status)
 
KDSTATUS NTAPI KdpPollBreakIn (VOID)
 
VOID NTAPI KdpSendByte (_In_ UCHAR Byte)
 
KDSTATUS NTAPI KdpReceiveByte (_Out_ PUCHAR OutByte)
 
KDSTATUS ContinueManipulateStateHandler (_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
 
KDSTATUS SetContextManipulateHandler (_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
 
PEPROCESS find_process (_In_ UINT_PTR Pid)
 
PETHREAD find_thread (_In_ UINT_PTR Pid, _In_ UINT_PTR Tid)
 
KDSTATUS gdb_send_register (void)
 
KDSTATUS gdb_send_registers (void)
 

Variables

UINT_PTR gdb_dbg_tid
 
UINT_PTR gdb_dbg_pid
 
CHAR gdb_input []
 
const char hex_chars []
 
DBGKD_ANY_WAIT_STATE_CHANGE CurrentStateChange
 
CONTEXT CurrentContext
 
DBGKD_GET_VERSION64 KdVersion
 
KDDEBUGGER_DATA64KdDebuggerDataBlock
 
LIST_ENTRYProcessListHead
 
LIST_ENTRYModuleListHead
 
KDP_SEND_HANDLER KdpSendPacketHandler
 
KDP_MANIPULATESTATE_HANDLER KdpManipulateStateHandler
 
PEPROCESS TheIdleProcess
 
PETHREAD TheIdleThread
 

Macro Definition Documentation

◆ gdb_pid_to_handle

#define gdb_pid_to_handle   gdb_tid_to_handle

Definition at line 39 of file kdgdb.h.

◆ handle_to_gdb_pid

#define handle_to_gdb_pid   handle_to_gdb_tid

Definition at line 45 of file kdgdb.h.

◆ KDDBGPRINT

#define KDDBGPRINT (   ...)

Definition at line 28 of file kdgdb.h.

◆ MONOPROCESS

#define MONOPROCESS   1

Definition at line 25 of file kdgdb.h.

◆ NOEXTAPI

#define NOEXTAPI

Definition at line 11 of file kdgdb.h.

Typedef Documentation

◆ KDP_MANIPULATESTATE_HANDLER

typedef KDSTATUS(* KDP_MANIPULATESTATE_HANDLER) (_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)

Definition at line 65 of file kdgdb.h.

◆ KDP_SEND_HANDLER

typedef VOID(* KDP_SEND_HANDLER) (_In_ ULONG PacketType, _In_ PSTRING MessageHeader, _In_ PSTRING MessageData)

Definition at line 60 of file kdgdb.h.

Function Documentation

◆ ContinueManipulateStateHandler()

KDSTATUS ContinueManipulateStateHandler ( _Out_ DBGKD_MANIPULATE_STATE64 State,
_Out_ PSTRING  MessageData,
_Out_ PULONG  MessageLength,
_Inout_ PKD_CONTEXT  KdContext 
)

Definition at line 212 of file kdpacket.c.

218 {
219  /* Let's go on */
220  State->ApiNumber = DbgKdContinueApi;
221  State->ReturnStatus = STATUS_SUCCESS; /* ? */
222  State->Processor = CurrentStateChange.Processor;
223  State->ProcessorLevel = CurrentStateChange.ProcessorLevel;
224  if (MessageData)
225  MessageData->Length = 0;
226  *MessageLength = 0;
227  State->u.Continue.ContinueStatus = STATUS_SUCCESS;
228 
229  /* We definitely are at the end of the send <-> receive loop, if any */
232  /* We're not handling an exception anymore */
233  InException = FALSE;
234 
235  return KdPacketReceived;
236 }
#define KdPacketReceived
Definition: kddll.h:5
DBGKD_ANY_WAIT_STATE_CHANGE CurrentStateChange
Definition: kdpacket.c:28
static BOOLEAN InException
Definition: kdpacket.c:17
#define DbgKdContinueApi
Definition: windbgkd.h:80
smooth NULL
Definition: ftsmooth.c:416
KDP_SEND_HANDLER KdpSendPacketHandler
Definition: kdpacket.c:25
return STATUS_SUCCESS
Definition: btrfs.c:2938
KDP_MANIPULATESTATE_HANDLER KdpManipulateStateHandler
Definition: kdpacket.c:26

Referenced by handle_gdb_c(), and handle_gdb_s().

◆ find_process()

PEPROCESS find_process ( _In_ UINT_PTR  Pid)

Definition at line 16 of file utils.c.

18 {
20  LIST_ENTRY* ProcessEntry;
22 
23  /* Special case for idle process */
24  if (ProcessId == NULL)
25  return TheIdleProcess;
26 
27  for (ProcessEntry = ProcessListHead->Flink;
28  ProcessEntry != ProcessListHead;
29  ProcessEntry = ProcessEntry->Flink)
30  {
31  Process = CONTAINING_RECORD(ProcessEntry, EPROCESS, ActiveProcessLinks);
32 
33  if (Process->UniqueProcessId == ProcessId)
34  return Process;
35  }
36 
37  return NULL;
38 }
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2697
smooth NULL
Definition: ftsmooth.c:416
PEPROCESS TheIdleProcess
Definition: kdpacket.c:30
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
Definition: typedefs.h:117
LIST_ENTRY * ProcessListHead
Definition: kdpacket.c:22
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
#define gdb_pid_to_handle
Definition: kdgdb.h:39

Referenced by find_thread(), handle_gdb_query(), handle_gdb_read_mem(), and handle_gdb_write_mem().

◆ find_thread()

PETHREAD find_thread ( _In_ UINT_PTR  Pid,
_In_ UINT_PTR  Tid 
)

Definition at line 41 of file utils.c.

44 {
45  HANDLE ThreadId = gdb_tid_to_handle(Tid);
49 #if MONOPROCESS
50  LIST_ENTRY* ProcessEntry;
51 #endif
52 
53  if (
54 #if !MONOPROCESS
55  (Pid == 0) &&
56 #endif
57  (Tid == 0))
58  {
59  /* Zero means any, so use the current one */
61  }
62 
63 #if MONOPROCESS
64 
65  /* Special case for the idle thread */
66  if (Tid == 1)
67  return TheIdleThread;
68 
69  for (ProcessEntry = ProcessListHead->Flink;
70  ProcessEntry != ProcessListHead;
71  ProcessEntry = ProcessEntry->Flink)
72  {
73  Process = CONTAINING_RECORD(ProcessEntry, EPROCESS, ActiveProcessLinks);
74 #else
75 
76  Process = find_process(Pid);
77 
78  /* Special case for the idle thread */
79  if ((Process == TheIdleProcess) && (Tid == 1))
80  return TheIdleThread;
81 
82  if (!Process)
83  return NULL;
84 
85 #endif
86 
87  for (ThreadEntry = Process->ThreadListHead.Flink;
88  ThreadEntry != &Process->ThreadListHead;
89  ThreadEntry = ThreadEntry->Flink)
90  {
91  Thread = CONTAINING_RECORD(ThreadEntry, ETHREAD, ThreadListEntry);
92  /* For GDB, Tid == 0 means any thread */
93  if ((Thread->Cid.UniqueThread == ThreadId) || (Tid == 0))
94  {
95  return Thread;
96  }
97  }
98 
99 #if MONOPROCESS
100  }
101 #endif
102 
103  return NULL;
104 }
FORCEINLINE HANDLE gdb_tid_to_handle(UINT_PTR Tid)
Definition: kdgdb.h:35
DBGKD_ANY_WAIT_STATE_CHANGE CurrentStateChange
Definition: kdpacket.c:28
PETHREAD TheIdleThread
Definition: kdpacket.c:31
smooth NULL
Definition: ftsmooth.c:416
PEPROCESS TheIdleProcess
Definition: kdpacket.c:30
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
CLIENT_ID Cid
Definition: pstypes.h:1059
PEPROCESS find_process(_In_ UINT_PTR Pid)
Definition: utils.c:16
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
#define MONOPROCESS
Definition: kdgdb.h:25
HANDLE UniqueThread
Definition: compat.h:483
Definition: typedefs.h:117
LIST_ENTRY * ProcessListHead
Definition: kdpacket.c:22
DWORD WINAPI ThreadEntry(LPVOID parameter)
Definition: thread.cpp:16
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
#define ULONG_PTR
Definition: config.h:101

Referenced by gdb_send_register(), gdb_send_registers(), handle_gdb_query(), handle_gdb_read_mem(), handle_gdb_thread_alive(), handle_gdb_write_mem(), xmlGetThreadId(), xmlIsMainThread(), xmlMutexLock(), xmlMutexUnlock(), xmlRMutexLock(), and xmlRMutexUnlock().

◆ finish_gdb_packet()

KDSTATUS finish_gdb_packet ( void  )

Definition at line 74 of file gdb_send.c.

75 {
76  UCHAR ack;
78 
79  /* Send finish byte and append checksum */
80  KdpSendByte('#');
81  KdpSendByte(hex_chars[(currentChecksum >> 4) & 0xf]);
83 
84  /* Wait for acknowledgement */
85  Status = KdpReceiveByte(&ack);
86 
87  if (Status != KdPacketReceived)
88  {
90  return Status;
91  }
92 
93  if (ack != '+')
94  return KdPacketNeedsResend;
95 
96  return KdPacketReceived;
97 }
#define KdPacketReceived
Definition: kddll.h:5
const char hex_chars[]
Definition: gdb_send.c:11
#define TRUE
Definition: types.h:120
KDP_STATUS NTAPI KdpReceiveByte(OUT PUCHAR OutByte)
Definition: kdcom.c:310
static CHAR currentChecksum
Definition: gdb_send.c:12
#define KD_DEBUGGER_NOT_PRESENT
Definition: kdfuncs.h:133
#define KdPacketNeedsResend
Definition: kddll.h:7
VOID NTAPI KdpSendByte(IN UCHAR Byte)
Definition: kdcom.c:280
unsigned char UCHAR
Definition: xmlstorage.h:181
Status
Definition: gdiplustypes.h:24
ULONG KDSTATUS
Definition: kddll.h:4

Referenced by gdb_send_debug_io(), gdb_send_registers(), handle_gdb_query(), send_gdb_memory(), and send_gdb_packet().

◆ gdb_receive_and_interpret_packet()

KDSTATUS gdb_receive_and_interpret_packet ( _Out_ DBGKD_MANIPULATE_STATE64 State,
_Out_ PSTRING  MessageData,
_Out_ PULONG  MessageLength,
_Inout_ PKD_CONTEXT  KdContext 
)

Definition at line 954 of file gdb_input.c.

959 {
961 
962  do
963  {
964  KDDBGPRINT("KDGBD: Receiving packet.\n");
965  Status = gdb_receive_packet(KdContext);
966  KDDBGPRINT("KDGBD: Packet \"%s\" received with status %u\n", gdb_input, Status);
967 
968  if (Status != KdPacketReceived)
969  return Status;
970 
971  Status = (KDSTATUS)-1;
972 
973  switch (gdb_input[0])
974  {
975  case '?':
976  /* Send the Status */
978  break;
979  case '!':
981  break;
982  case 'c':
983  Status = handle_gdb_c(State, MessageData, MessageLength, KdContext);
984  break;
985  case 'g':
987  break;
988  case 'H':
990  break;
991  case 'm':
992  Status = handle_gdb_read_mem(State, MessageData, MessageLength, KdContext);
993  break;
994  case 'p':
996  break;
997  case 'q':
999  break;
1000  case 's':
1001  Status = handle_gdb_s(State, MessageData, MessageLength, KdContext);
1002  break;
1003  case 'T':
1005  break;
1006  case 'v':
1007  Status = handle_gdb_v(State, MessageData, MessageLength, KdContext);
1008  break;
1009  case 'X':
1010  Status = handle_gdb_write_mem(State, MessageData, MessageLength, KdContext);
1011  break;
1012  case 'z':
1013  Status = handle_gdb_remove_breakpoint(State, MessageData, MessageLength, KdContext);
1014  break;
1015  case 'Z':
1016  Status = handle_gdb_insert_breakpoint(State, MessageData, MessageLength, KdContext);
1017  break;
1018  default:
1019  /* We don't know how to handle this request. */
1020  KDDBGPRINT("Unsupported GDB command: %s.\n", gdb_input);
1022  }
1023  } while (Status == (KDSTATUS)-1);
1024 
1025  return Status;
1026 }
#define KdPacketReceived
Definition: kddll.h:5
#define KDDBGPRINT(...)
Definition: kddll.h:19
KDSTATUS gdb_send_registers(void)
Definition: i386_sup.c:150
KDSTATUS gdb_send_register(void)
Definition: i386_sup.c:221
static KDSTATUS handle_gdb_thread_alive(void)
Definition: gdb_input.c:122
KDSTATUS send_gdb_packet(_In_ const CHAR *Buffer)
Definition: gdb_send.c:100
KDSTATUS gdb_send_exception()
Definition: gdb_send.c:197
static KDSTATUS handle_gdb_remove_breakpoint(_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
Definition: gdb_input.c:817
static KDSTATUS handle_gdb_read_mem(_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
Definition: gdb_input.c:482
static KDSTATUS handle_gdb_insert_breakpoint(_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
Definition: gdb_input.c:725
KDSTATUS NTAPI gdb_receive_packet(_Inout_ PKD_CONTEXT KdContext)
Definition: gdb_receive.c:31
static KDSTATUS handle_gdb_write_mem(_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
Definition: gdb_input.c:583
static KDSTATUS handle_gdb_c(_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
Definition: gdb_input.c:870
static KDSTATUS handle_gdb_set_thread(void)
Definition: gdb_input.c:69
Status
Definition: gdiplustypes.h:24
ULONG KDSTATUS
Definition: kddll.h:4
static KDSTATUS handle_gdb_v(_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
Definition: gdb_input.c:923
static KDSTATUS handle_gdb_s(_Out_ DBGKD_MANIPULATE_STATE64 *State, _Out_ PSTRING MessageData, _Out_ PULONG MessageLength, _Inout_ PKD_CONTEXT KdContext)
Definition: gdb_input.c:907
CHAR gdb_input[0x1000]
Definition: gdb_receive.c:11
static KDSTATUS handle_gdb_query(void)
Definition: gdb_input.c:156
static KDSTATUS LOOP_IF_SUCCESS(x)
Definition: gdb_input.c:25

Referenced by KdReceivePacket().

◆ gdb_receive_packet()

KDSTATUS NTAPI gdb_receive_packet ( _Inout_ PKD_CONTEXT  KdContext)

Definition at line 31 of file gdb_receive.c.

32 {
33  UCHAR* ByteBuffer = (UCHAR*)gdb_input;
34  UCHAR Byte;
36  CHAR CheckSum = 0, ReceivedCheckSum;
37 
38  do
39  {
41  if (Status != KdPacketReceived)
42  return Status;
43  if (Byte == 0x03)
44  {
45  KDDBGPRINT("BREAK!");
46  KdContext->KdpControlCPending = TRUE;
47  return KdPacketNeedsResend;
48  }
49  } while (Byte != '$');
50 
51  while (TRUE)
52  {
53  /* Try to get a byte from the port */
55  if (Status != KdPacketReceived)
56  return Status;
57 
58  if (Byte == '#')
59  {
60  *ByteBuffer = '\0';
61  break;
62  }
63  CheckSum += (CHAR)Byte;
64 
65  /* See if we should escape */
66  if (Byte == 0x7d)
67  {
69  if (Status != KdPacketReceived)
70  return Status;
71  CheckSum += (CHAR)Byte;
72  Byte ^= 0x20;
73  }
74  *ByteBuffer++ = Byte;
75  }
76 
77  /* Get Check sum (two bytes) */
79  if (Status != KdPacketReceived)
80  goto end;
81  ReceivedCheckSum = hex_value(Byte) << 4;
82 
84  if (Status != KdPacketReceived)
85  goto end;
86  ReceivedCheckSum += hex_value(Byte);
87 
88 end:
89  if (ReceivedCheckSum != CheckSum)
90  {
91  /* Do not acknowledge to GDB */
92  KDDBGPRINT("Check sums don't match!");
93  KdpSendByte('-');
94  return KdPacketNeedsResend;
95  }
96 
97  /* Acknowledge */
98  KdpSendByte('+');
99 
100  return KdPacketReceived;
101 }
#define KdPacketReceived
Definition: kddll.h:5
#define TRUE
Definition: types.h:120
#define KDDBGPRINT(...)
Definition: kddll.h:19
unsigned char Byte
Definition: zconf.h:391
char CHAR
Definition: xmlstorage.h:175
KDP_STATUS NTAPI KdpReceiveByte(OUT PUCHAR OutByte)
Definition: kdcom.c:310
GLuint GLuint end
Definition: gl.h:1545
#define KdPacketNeedsResend
Definition: kddll.h:7
char hex_value(char ch)
Definition: gdb_receive.c:15
UCHAR CheckSum(LPSTR p, ULONG Len)
Definition: serial.c:197
VOID NTAPI KdpSendByte(IN UCHAR Byte)
Definition: kdcom.c:280
unsigned char UCHAR
Definition: xmlstorage.h:181
Status
Definition: gdiplustypes.h:24
ULONG KDSTATUS
Definition: kddll.h:4
CHAR gdb_input[0x1000]
Definition: gdb_receive.c:11
#define CHAR(Char)

Referenced by gdb_receive_and_interpret_packet().

◆ gdb_send_debug_io()

KDSTATUS gdb_send_debug_io ( _In_ PSTRING  String,
_In_ BOOLEAN  WithPrefix 
)

Definition at line 168 of file gdb_send.c.

171 {
172  CHAR gdb_out[3];
173  CHAR* ptr = String->Buffer;
174  USHORT Length = String->Length;
175 
176  gdb_out[2] = '\0';
177 
179 
180  if (WithPrefix)
181  {
183  }
184 
185  /* Send the data */
186  while (Length--)
187  {
188  gdb_out[0] = hex_chars[(*ptr >> 4) & 0xf];
189  gdb_out[1] = hex_chars[*ptr++ & 0xf];
190  send_gdb_partial_packet(gdb_out);
191  }
192 
193  return finish_gdb_packet();
194 }
void send_gdb_partial_packet(_In_ const CHAR *Buffer)
Definition: gdb_send.c:60
const char hex_chars[]
Definition: gdb_send.c:11
char CHAR
Definition: xmlstorage.h:175
static WCHAR String[]
Definition: stringtable.c:55
static PVOID ptr
Definition: dispmode.c:27
void start_gdb_packet(void)
Definition: gdb_send.c:52
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
unsigned short USHORT
Definition: pedump.c:61
KDSTATUS finish_gdb_packet(void)
Definition: gdb_send.c:74

Referenced by handle_gdb_query(), and send_kd_debug_io().

◆ gdb_send_exception()

KDSTATUS gdb_send_exception ( void  )

Definition at line 197 of file gdb_send.c.

198 {
199  char gdb_out[1024];
200  char* ptr = gdb_out;
202 
203  /* Report to GDB */
204  *ptr++ = 'T';
205 
207  {
209  ptr = exception_code_to_gdb(ExceptionRecord->ExceptionCode, ptr);
210  }
211  else
212  ptr += sprintf(ptr, "05");
213 
215  ptr += sprintf(ptr, "library:");
216 
217 #if MONOPROCESS
218  ptr += sprintf(ptr, "thread:%" PRIxPTR ";",
220 #else
221  ptr += sprintf(ptr, "thread:p%" PRIxPTR ".%" PRIxPTR ";",
224 #endif
225 
226  ptr += sprintf(ptr, "core:%x;", CurrentStateChange.Processor);
227  return send_gdb_packet(gdb_out);
228 }
union _DBGKD_ANY_WAIT_STATE_CHANGE::@3422 u
#define handle_to_gdb_pid
Definition: kdgdb.h:45
static char * exception_code_to_gdb(NTSTATUS code, char *out)
Definition: gdb_send.c:17
NTSTATUS ExceptionCode
Definition: rtltypes.h:186
#define DbgKdExceptionStateChange
Definition: windbgkd.h:59
DBGKD_ANY_WAIT_STATE_CHANGE CurrentStateChange
Definition: kdpacket.c:28
KDSTATUS send_gdb_packet(_In_ const CHAR *Buffer)
Definition: gdb_send.c:100
uint32_t ULONG_PTR
Definition: typedefs.h:63
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static PVOID ptr
Definition: dispmode.c:27
#define DbgKdLoadSymbolsStateChange
Definition: windbgkd.h:60
HANDLE NTAPI PsGetThreadProcessId(IN PETHREAD Thread)
Definition: thread.c:745
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
EXCEPTION_RECORD64 ExceptionRecord
Definition: windbgkd.h:303
#define PRIxPTR
Definition: inttypes.h:236
HANDLE NTAPI PsGetThreadId(IN PETHREAD Thread)
Definition: thread.c:705
DBGKM_EXCEPTION64 Exception
Definition: windbgkd.h:488
FORCEINLINE UINT_PTR handle_to_gdb_tid(HANDLE Handle)
Definition: kdgdb.h:41
struct _ETHREAD * PETHREAD
Definition: nt_native.h:29

Referenced by gdb_receive_and_interpret_packet(), and send_kd_state_change().

◆ gdb_send_register()

KDSTATUS gdb_send_register ( void  )

Definition at line 221 of file i386_sup.c.

222 {
223  enum reg_name reg_name;
224  void *ptr;
225  unsigned short size;
226 
227  /* Get the GDB register name (gdb_input = "pXX") */
228  reg_name = (hex_value(gdb_input[1]) << 4) | hex_value(gdb_input[2]);
229 
230  if (((gdb_dbg_pid == 0) && (gdb_dbg_tid == 0)) ||
232  {
233  /* We can get it from the context of the current exception */
235  }
236  else
237  {
238  PETHREAD DbgThread;
239 
240  DbgThread = find_thread(gdb_dbg_pid, gdb_dbg_tid);
241 
242  if (DbgThread == NULL)
243  {
244  /* Thread is dead */
245  return send_gdb_packet("E03");
246  }
247 
248  ptr = thread_to_reg(DbgThread, reg_name, &size);
249  }
250 
251  if (!ptr)
252  {
253  /* Undefined. Let's assume 32 bit register */
254  return send_gdb_packet("xxxxxxxx");
255  }
256  else
257  {
258  KDDBGPRINT("KDDBG : Sending registers as memory.\n");
259  return send_gdb_memory(ptr, size);
260  }
261 }
FORCEINLINE HANDLE gdb_tid_to_handle(UINT_PTR Tid)
Definition: kdgdb.h:35
static void * thread_to_reg(PETHREAD Thread, enum reg_name reg_name, unsigned short *size)
Definition: i386_sup.c:84
CONTEXT CurrentContext
Definition: kdpacket.c:29
#define KDDBGPRINT(...)
Definition: kddll.h:19
KDSTATUS send_gdb_memory(_In_ const VOID *Buffer, _In_ size_t Length)
Definition: gdb_send.c:158
DBGKD_ANY_WAIT_STATE_CHANGE CurrentStateChange
Definition: kdpacket.c:28
KDSTATUS send_gdb_packet(_In_ const CHAR *Buffer)
Definition: gdb_send.c:100
uint32_t ULONG_PTR
Definition: typedefs.h:63
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
PETHREAD find_thread(_In_ UINT_PTR Pid, _In_ UINT_PTR Tid)
Definition: utils.c:41
char hex_value(char ch)
Definition: gdb_receive.c:15
UINT_PTR gdb_dbg_tid
Definition: gdb_input.c:21
UINT_PTR gdb_dbg_pid
Definition: gdb_input.c:20
GLsizeiptr size
Definition: glext.h:5919
static void * ctx_to_reg(CONTEXT *ctx, enum reg_name name, unsigned short *size)
Definition: i386_sup.c:24
reg_name
Definition: i386_sup.c:10
HANDLE NTAPI PsGetThreadId(IN PETHREAD Thread)
Definition: thread.c:705
CHAR gdb_input[0x1000]
Definition: gdb_receive.c:11

Referenced by gdb_receive_and_interpret_packet().

◆ gdb_send_registers()

KDSTATUS gdb_send_registers ( void  )

Definition at line 150 of file i386_sup.c.

151 {
152  CHAR RegisterStr[9];
153  UCHAR* RegisterPtr;
154  unsigned i;
155  unsigned short size;
156 
157  RegisterStr[8] = '\0';
158 
160 
161  KDDBGPRINT("Sending registers of thread %" PRIxPTR ".\n", gdb_dbg_tid);
162  KDDBGPRINT("Current thread_id: %p.\n", PsGetThreadId((PETHREAD)(ULONG_PTR)CurrentStateChange.Thread));
163  if (((gdb_dbg_pid == 0) && (gdb_dbg_tid == 0)) ||
165  {
166  for(i=0; i < 16; i++)
167  {
168  RegisterPtr = ctx_to_reg(&CurrentContext, i, &size);
169  RegisterStr[0] = hex_chars[RegisterPtr[0] >> 4];
170  RegisterStr[1] = hex_chars[RegisterPtr[0] & 0xF];
171  RegisterStr[2] = hex_chars[RegisterPtr[1] >> 4];
172  RegisterStr[3] = hex_chars[RegisterPtr[1] & 0xF];
173  RegisterStr[4] = hex_chars[RegisterPtr[2] >> 4];
174  RegisterStr[5] = hex_chars[RegisterPtr[2] & 0xF];
175  RegisterStr[6] = hex_chars[RegisterPtr[3] >> 4];
176  RegisterStr[7] = hex_chars[RegisterPtr[3] & 0xF];
177 
178  send_gdb_partial_packet(RegisterStr);
179  }
180  }
181  else
182  {
183  PETHREAD DbgThread;
184 
185  DbgThread = find_thread(gdb_dbg_pid, gdb_dbg_tid);
186 
187  if (DbgThread == NULL)
188  {
189  /* Thread is dead */
191  return finish_gdb_packet();
192  }
193 
194  for(i=0; i < 16; i++)
195  {
196  RegisterPtr = thread_to_reg(DbgThread, i, &size);
197  if (RegisterPtr)
198  {
199  RegisterStr[0] = hex_chars[RegisterPtr[0] >> 4];
200  RegisterStr[1] = hex_chars[RegisterPtr[0] & 0xF];
201  RegisterStr[2] = hex_chars[RegisterPtr[1] >> 4];
202  RegisterStr[3] = hex_chars[RegisterPtr[1] & 0xF];
203  RegisterStr[4] = hex_chars[RegisterPtr[2] >> 4];
204  RegisterStr[5] = hex_chars[RegisterPtr[2] & 0xF];
205  RegisterStr[6] = hex_chars[RegisterPtr[3] >> 4];
206  RegisterStr[7] = hex_chars[RegisterPtr[3] & 0xF];
207 
208  send_gdb_partial_packet(RegisterStr);
209  }
210  else
211  {
212  send_gdb_partial_packet("xxxxxxxx");
213  }
214  }
215  }
216 
217  return finish_gdb_packet();
218 }
void send_gdb_partial_packet(_In_ const CHAR *Buffer)
Definition: gdb_send.c:60
const char hex_chars[]
Definition: gdb_send.c:11
FORCEINLINE HANDLE gdb_tid_to_handle(UINT_PTR Tid)
Definition: kdgdb.h:35
static void * thread_to_reg(PETHREAD Thread, enum reg_name reg_name, unsigned short *size)
Definition: i386_sup.c:84
CONTEXT CurrentContext
Definition: kdpacket.c:29
#define KDDBGPRINT(...)
Definition: kddll.h:19
char CHAR
Definition: xmlstorage.h:175
DBGKD_ANY_WAIT_STATE_CHANGE CurrentStateChange
Definition: kdpacket.c:28
uint32_t ULONG_PTR
Definition: typedefs.h:63
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
PETHREAD find_thread(_In_ UINT_PTR Pid, _In_ UINT_PTR Tid)
Definition: utils.c:41
UINT_PTR gdb_dbg_tid
Definition: gdb_input.c:21
void start_gdb_packet(void)
Definition: gdb_send.c:52
UINT_PTR gdb_dbg_pid
Definition: gdb_input.c:20
GLsizeiptr size
Definition: glext.h:5919
static void * ctx_to_reg(CONTEXT *ctx, enum reg_name name, unsigned short *size)
Definition: i386_sup.c:24
unsigned char UCHAR
Definition: xmlstorage.h:181
#define PRIxPTR
Definition: inttypes.h:236
HANDLE NTAPI PsGetThreadId(IN PETHREAD Thread)
Definition: thread.c:705
KDSTATUS finish_gdb_packet(void)
Definition: gdb_send.c:74

Referenced by gdb_receive_and_interpret_packet(), and send_kd_state_manipulate().

◆ gdb_tid_to_handle()

FORCEINLINE HANDLE gdb_tid_to_handle ( UINT_PTR  Tid)

Definition at line 35 of file kdgdb.h.

36 {
37  return (HANDLE)(Tid - 1);
38 }

Referenced by find_thread(), gdb_send_register(), gdb_send_registers(), handle_gdb_read_mem(), and handle_gdb_write_mem().

◆ handle_to_gdb_tid()

FORCEINLINE UINT_PTR handle_to_gdb_tid ( HANDLE  Handle)

Definition at line 41 of file kdgdb.h.

42 {
43  return (UINT_PTR)Handle + 1;
44 }
_In_ HANDLE Handle
Definition: extypes.h:390
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274

Referenced by FirstSendHandler(), gdb_send_exception(), handle_gdb_query(), and send_kd_state_change().

◆ hex_value()

char hex_value ( char  ch)

Definition at line 15 of file gdb_receive.c.

16 {
17  if ((ch >= '0') && (ch <= '9'))
18  return (ch - '0');
19 
20  if ((ch >= 'a') && (ch <= 'f'))
21  return (ch - 'a' + 10);
22 
23  if ((ch >= 'A') && (ch <= 'F'))
24  return (ch - 'A' + 10);
25 
26  return -1;
27 }

Referenced by gdb_receive_packet(), gdb_send_register(), hex_to_address(), and hex_to_tid().

◆ InitManipulateFromStateChange()

FORCEINLINE VOID InitManipulateFromStateChange ( _In_ ULONG  ApiNumber,
_In_ const DBGKD_ANY_WAIT_STATE_CHANGE StateChange,
_Out_ DBGKD_MANIPULATE_STATE64 Manipulate 
)

Definition at line 49 of file kdgdb.h.

53 {
54  Manipulate->ApiNumber = ApiNumber;
55  Manipulate->Processor = StateChange->Processor;
56  Manipulate->ProcessorLevel = StateChange->ProcessorLevel;
57 }

◆ KdpPollBreakIn()

KDSTATUS NTAPI KdpPollBreakIn ( VOID  )

Definition at line 332 of file kdcom.c.

333 {
334  KDP_STATUS KdStatus;
335  UCHAR Byte;
336 
337  KdStatus = KdpPollByte(&Byte);
338  if ((KdStatus == KDP_PACKET_RECEIVED) && (Byte == BREAKIN_PACKET_BYTE))
339  {
340  return KDP_PACKET_RECEIVED;
341  }
342  return KDP_PACKET_TIMEOUT;
343 }
unsigned char Byte
Definition: zconf.h:391
KDP_STATUS
Definition: kddll.h:25
KDP_STATUS NTAPI KdpPollByte(OUT PUCHAR OutByte)
Definition: kdcom.c:288
#define BREAKIN_PACKET_BYTE
Definition: windbgkd.h:31
unsigned char UCHAR
Definition: xmlstorage.h:181

Referenced by KdReceivePacket().

◆ KdpReceiveByte()

KDSTATUS NTAPI KdpReceiveByte ( _Out_ PUCHAR  OutByte)

Definition at line 297 of file kdcom.c.

298 {
299  USHORT CpStatus = CpGetByte(&KdComPort, OutByte, TRUE, FALSE);
300  /* Get the byte */
301  if (CpStatus == CP_GET_SUCCESS)
302  {
303  return KdPacketReceived;
304  }
305 
306  return KdPacketTimedOut;
307 }
#define KdPacketReceived
Definition: kddll.h:5
#define TRUE
Definition: types.h:120
USHORT NTAPI CpGetByte(IN PCPPORT Port, OUT PUCHAR Byte, IN BOOLEAN Wait, IN BOOLEAN Poll)
Definition: cport.c:256
CPPORT KdComPort
Definition: kdcom.c:41
#define KdPacketTimedOut
Definition: kddll.h:6
unsigned short USHORT
Definition: pedump.c:61
#define CP_GET_SUCCESS
Definition: cportlib.h:18

◆ KdpSendByte()

VOID NTAPI KdpSendByte ( _In_ UCHAR  Byte)

Definition at line 274 of file kdcom.c.

275 {
276  /* Send the byte */
278 }
unsigned char Byte
Definition: zconf.h:391
CPPORT KdComPort
Definition: kdcom.c:41
VOID NTAPI CpPutByte(IN PCPPORT Port, IN UCHAR Byte)
Definition: cport.c:306

◆ send_gdb_memory()

KDSTATUS send_gdb_memory ( _In_ const VOID Buffer,
size_t  Length 
)

◆ send_gdb_ntstatus()

void send_gdb_ntstatus ( _In_ NTSTATUS  Status)

Definition at line 231 of file gdb_send.c.

233 {
234  /* Just build a EXX packet and send it */
235  char gdb_out[4];
236  gdb_out[0] = 'E';
237  exception_code_to_gdb(Status, &gdb_out[1]);
238  gdb_out[3] = '\0';
239  send_gdb_packet(gdb_out);
240 }
static char * exception_code_to_gdb(NTSTATUS code, char *out)
Definition: gdb_send.c:17
KDSTATUS send_gdb_packet(_In_ const CHAR *Buffer)
Definition: gdb_send.c:100
Status
Definition: gdiplustypes.h:24

Referenced by ReadMemorySendHandler(), WriteBreakPointSendHandler(), and WriteMemorySendHandler().

◆ send_gdb_packet()

◆ send_gdb_partial_binary()

ULONG send_gdb_partial_binary ( _In_ const VOID Buffer,
_In_ size_t  Length 
)

Definition at line 108 of file gdb_send.c.

111 {
112  const UCHAR* ptr = Buffer;
113  ULONG Sent = Length;
114 
115  while(Length--)
116  {
117  UCHAR Byte = *ptr++;
118 
119  switch (Byte)
120  {
121  case 0x7d:
122  case 0x23:
123  case 0x24:
124  case 0x2a:
125  currentChecksum += 0x7d;
126  KdpSendByte(0x7d);
127  Byte ^= 0x20;
128  Sent++;
129  /* Fall-through */
130  default:
132  KdpSendByte(Byte);
133  }
134  }
135 
136  return Sent;
137 }
unsigned char Byte
Definition: zconf.h:391
static CHAR currentChecksum
Definition: gdb_send.c:12
static PVOID ptr
Definition: dispmode.c:27
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
VOID NTAPI KdpSendByte(IN UCHAR Byte)
Definition: kdcom.c:280
unsigned char UCHAR
Definition: xmlstorage.h:181
UINT Sent
Definition: arping.c:39
unsigned int ULONG
Definition: retypes.h:1
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34

Referenced by handle_gdb_query().

◆ send_gdb_partial_memory()

void send_gdb_partial_memory ( _In_ const VOID Buffer,
_In_ size_t  Length 
)

Definition at line 140 of file gdb_send.c.

143 {
144  const UCHAR* ptr = Buffer;
145  CHAR gdb_out[3];
146 
147  gdb_out[2] = '\0';
148 
149  while(Length--)
150  {
151  gdb_out[0] = hex_chars[(*ptr >> 4) & 0xf];
152  gdb_out[1] = hex_chars[*ptr++ & 0xf];
153  send_gdb_partial_packet(gdb_out);
154  }
155 }
void send_gdb_partial_packet(_In_ const CHAR *Buffer)
Definition: gdb_send.c:60
const char hex_chars[]
Definition: gdb_send.c:11
char CHAR
Definition: xmlstorage.h:175
static PVOID ptr
Definition: dispmode.c:27
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
unsigned char UCHAR
Definition: xmlstorage.h:181
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34

Referenced by send_gdb_memory().

◆ send_gdb_partial_packet()

void send_gdb_partial_packet ( _In_ const CHAR Buffer)

Definition at line 60 of file gdb_send.c.

61 {
62  const CHAR* ptr = Buffer;
63 
64  /* Update check sum and send */
65  while (*ptr)
66  {
67  currentChecksum += *ptr;
68  KdpSendByte(*ptr++);
69  }
70 }
char CHAR
Definition: xmlstorage.h:175
static CHAR currentChecksum
Definition: gdb_send.c:12
static PVOID ptr
Definition: dispmode.c:27
VOID NTAPI KdpSendByte(IN UCHAR Byte)
Definition: kdcom.c:280
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34

Referenced by gdb_send_debug_io(), gdb_send_registers(), handle_gdb_query(), send_gdb_packet(), and send_gdb_partial_memory().

◆ SetContextManipulateHandler()

KDSTATUS SetContextManipulateHandler ( _Out_ DBGKD_MANIPULATE_STATE64 State,
_Out_ PSTRING  MessageData,
_Out_ PULONG  MessageLength,
_Inout_ PKD_CONTEXT  KdContext 
)

Definition at line 106 of file kdpacket.c.

112 {
113  State->ApiNumber = DbgKdSetContextApi;
114  State->Processor = CurrentStateChange.Processor;
115  State->ReturnStatus = STATUS_SUCCESS;
116  State->ProcessorLevel = CurrentStateChange.ProcessorLevel;
117  MessageData->Length = sizeof(CurrentContext);
118 
119  if (MessageData->MaximumLength < sizeof(CurrentContext))
120  {
121  KDDBGPRINT("Wrong message length %u.\n", MessageData->MaximumLength);
122  while (1);
123  }
124 
125  RtlCopyMemory(MessageData->Buffer, &CurrentContext, sizeof(CurrentContext));
126 
127  /* Update the send <-> receive loop handlers */
130 
131  return KdPacketReceived;
132 }
#define KdPacketReceived
Definition: kddll.h:5
DBGKD_ANY_WAIT_STATE_CHANGE CurrentStateChange
Definition: kdpacket.c:28
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define KDDBGPRINT(...)
Definition: kddll.h:19
CONTEXT CurrentContext
Definition: kdpacket.c:29
smooth NULL
Definition: ftsmooth.c:416
KDP_SEND_HANDLER KdpSendPacketHandler
Definition: kdpacket.c:25
#define DbgKdSetContextApi
Definition: windbgkd.h:77
static VOID SetContextSendHandler(_In_ ULONG PacketType, _In_ PSTRING MessageHeader, _In_ PSTRING MessageData)
Definition: kdpacket.c:84
return STATUS_SUCCESS
Definition: btrfs.c:2938
KDP_MANIPULATESTATE_HANDLER KdpManipulateStateHandler
Definition: kdpacket.c:26

Referenced by handle_gdb_c(), and handle_gdb_s().

◆ start_gdb_packet()

void start_gdb_packet ( void  )

Definition at line 52 of file gdb_send.c.

53 {
54  /* Start the start byte and begin checksum calculation */
55  KdpSendByte('$');
56  currentChecksum = 0;
57 }
static CHAR currentChecksum
Definition: gdb_send.c:12
VOID NTAPI KdpSendByte(IN UCHAR Byte)
Definition: kdcom.c:280

Referenced by gdb_send_debug_io(), gdb_send_registers(), handle_gdb_query(), send_gdb_memory(), and send_gdb_packet().

Variable Documentation

◆ CurrentContext

◆ CurrentStateChange

◆ gdb_dbg_pid

◆ gdb_dbg_tid

◆ gdb_input

◆ hex_chars

◆ KdDebuggerDataBlock

KDDEBUGGER_DATA64* KdDebuggerDataBlock

Definition at line 21 of file kdpacket.c.

Referenced by KdInitSystem(), KdUpdateDataBlock(), and KeBugCheckWithTf().

◆ KdpManipulateStateHandler

◆ KdpSendPacketHandler

◆ KdVersion

Definition at line 20 of file kdpacket.c.

Referenced by GetVersionSendHandler().

◆ ModuleListHead

◆ ProcessListHead

◆ TheIdleProcess

PEPROCESS TheIdleProcess

Definition at line 30 of file kdpacket.c.

Referenced by find_process(), find_thread(), FirstSendHandler(), and QSI_DEF().

◆ TheIdleThread

PETHREAD TheIdleThread

Definition at line 31 of file kdpacket.c.

Referenced by find_thread(), and FirstSendHandler().