ntoskrnl/dbgk
(according to functions_list.txt in audited branch comments by Alex Ionescu, and comments by me)
- debug.c: Clean/trivial implementation based on the object's structure. I merely create it and then initailize all its members. Other functions are stubs
- dbgkutil.c: Code is #if0'ed, and doesn't belong to Alex Ionescu. Author is unknown.
- Unified / prettified formatting, STDCALL -> NTAPI

svn path=/trunk/; revision=21931
This commit is contained in:
Aleksey Bragin 2006-05-18 12:16:53 +00:00
parent 8a2eb6433b
commit 659e7c97df
2 changed files with 29 additions and 29 deletions

View file

@ -16,41 +16,41 @@
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
VOID VOID
STDCALL NTAPI
DbgkCreateThread(PVOID StartAddress) DbgkCreateThread(PVOID StartAddress)
{ {
#if 0 #if 0
LPC_DBG_MESSAGE Message; LPC_DBG_MESSAGE Message;
LPC_DBG_MESSAGE Reply; LPC_DBG_MESSAGE Reply;
NTSTATUS Status; NTSTATUS Status;
if (PsGetCurrentThread()->ThreadsProcess->DebugPort == NULL) if (PsGetCurrentThread()->ThreadsProcess->DebugPort == NULL)
{ {
return; return;
} }
Message.Header.MessageSize = sizeof(LPC_DBG_MESSAGE); Message.Header.MessageSize = sizeof(LPC_DBG_MESSAGE);
Message.Header.DataSize = sizeof(LPC_DBG_MESSAGE) - Message.Header.DataSize = sizeof(LPC_DBG_MESSAGE) -
sizeof(LPC_MESSAGE); sizeof(LPC_MESSAGE);
Message.Type = DBG_EVENT_CREATE_THREAD; Message.Type = DBG_EVENT_CREATE_THREAD;
Message.Status = STATUS_SUCCESS; Message.Status = STATUS_SUCCESS;
Message.Data.CreateThread.Reserved = 0; Message.Data.CreateThread.Reserved = 0;
Message.Data.CreateThread.StartAddress = StartAddress; Message.Data.CreateThread.StartAddress = StartAddress;
/* FIXME: Freeze all threads in process */ /* FIXME: Freeze all threads in process */
/* Send the message to the process's debug port and wait for a reply */ /* Send the message to the process's debug port and wait for a reply */
Status = Status =
LpcSendDebugMessagePort(PsGetCurrentThread()->ThreadsProcess->DebugPort, LpcSendDebugMessagePort(PsGetCurrentThread()->ThreadsProcess->DebugPort,
&Message, &Message,
&Reply); &Reply);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
return; return;
} }
/* FIXME: Examine reply */ /* FIXME: Examine reply */
return; return;
#endif #endif
} }

View file

@ -17,7 +17,7 @@ POBJECT_TYPE DbgkDebugObjectType;
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
NTSTATUS NTSTATUS
STDCALL NTAPI
NtCreateDebugObject(OUT PHANDLE DebugHandle, NtCreateDebugObject(OUT PHANDLE DebugHandle,
IN ACCESS_MASK DesiredAccess, IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes, IN POBJECT_ATTRIBUTES ObjectAttributes,
@ -103,7 +103,7 @@ NtCreateDebugObject(OUT PHANDLE DebugHandle,
} }
NTSTATUS NTSTATUS
STDCALL NTAPI
NtWaitForDebugEvent(IN HANDLE DebugObject, // Debug object handle must grant DEBUG_OBJECT_WAIT_STATE_CHANGE access. NtWaitForDebugEvent(IN HANDLE DebugObject, // Debug object handle must grant DEBUG_OBJECT_WAIT_STATE_CHANGE access.
IN BOOLEAN Alertable, IN BOOLEAN Alertable,
IN PLARGE_INTEGER Timeout OPTIONAL, IN PLARGE_INTEGER Timeout OPTIONAL,
@ -116,7 +116,7 @@ NtWaitForDebugEvent(IN HANDLE DebugObject, // Debug object handle must grant DEB
} }
NTSTATUS NTSTATUS
STDCALL NTAPI
NtDebugContinue(IN HANDLE DebugObject, // Debug object handle must grant DEBUG_OBJECT_WAIT_STATE_CHANGE access. NtDebugContinue(IN HANDLE DebugObject, // Debug object handle must grant DEBUG_OBJECT_WAIT_STATE_CHANGE access.
IN PCLIENT_ID AppClientId, IN PCLIENT_ID AppClientId,
IN NTSTATUS ContinueStatus) IN NTSTATUS ContinueStatus)
@ -128,7 +128,7 @@ NtDebugContinue(IN HANDLE DebugObject, // Debug object handle must grant DEBU
} }
NTSTATUS NTSTATUS
STDCALL NTAPI
NtDebugActiveProcess(IN HANDLE Process, // Process handle must grant PROCESS_SUSPEND_RESUME access. NtDebugActiveProcess(IN HANDLE Process, // Process handle must grant PROCESS_SUSPEND_RESUME access.
IN HANDLE DebugObject) // Debug object handle must grant DEBUG_OBJECT_ADD_REMOVE_PROCESS access. IN HANDLE DebugObject) // Debug object handle must grant DEBUG_OBJECT_ADD_REMOVE_PROCESS access.
{ {
@ -139,7 +139,7 @@ NtDebugActiveProcess(IN HANDLE Process, // Process handle must grant PROCESS
} }
NTSTATUS NTSTATUS
STDCALL NTAPI
NtRemoveProcessDebug(IN HANDLE Process, // Process handle must grant PROCESS_SUSPEND_RESUME access. NtRemoveProcessDebug(IN HANDLE Process, // Process handle must grant PROCESS_SUSPEND_RESUME access.
IN HANDLE DebugObject) // Debug object handle must grant DEBUG_OBJECT_ADD_REMOVE_PROCESS access. IN HANDLE DebugObject) // Debug object handle must grant DEBUG_OBJECT_ADD_REMOVE_PROCESS access.
{ {
@ -150,7 +150,7 @@ NtRemoveProcessDebug(IN HANDLE Process, // Process handle must grant PROCESS
} }
NTSTATUS NTSTATUS
STDCALL NTAPI
NtSetInformationDebugObject(IN HANDLE DebugObject, // Debug object handle need not grant any particular access right. NtSetInformationDebugObject(IN HANDLE DebugObject, // Debug object handle need not grant any particular access right.
IN DEBUGOBJECTINFOCLASS DebugObjectInformationClass, IN DEBUGOBJECTINFOCLASS DebugObjectInformationClass,
IN PVOID DebugInformation, IN PVOID DebugInformation,