mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 21:01:30 +00:00
Mostly implemented, Listdlls half way works now.
svn path=/trunk/; revision=10459
This commit is contained in:
parent
082128c460
commit
d81fcdb79e
1 changed files with 75 additions and 5 deletions
|
@ -16,12 +16,15 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id:
|
/*
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* PURPOSE: User-mode Debug Buffer support
|
* PURPOSE: User-mode Debug Buffer support
|
||||||
* FILE: lib/ntdll/rtl/dbgbuffer.c
|
* FILE: lib/ntdll/rtl/dbgbuffer.c
|
||||||
* PROGRAMER: James Tabor
|
* PROGRAMER: James Tabor
|
||||||
|
* Fixme: Add Process and Thread event pair support.
|
||||||
|
* Fix Heap support.
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
@ -33,25 +36,92 @@
|
||||||
|
|
||||||
/* FUNCTIONS ***************************************************************/
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
PDEBUG_BUFFER STDCALL
|
PDEBUG_BUFFER STDCALL
|
||||||
RtlCreateQueryDebugBuffer(IN ULONG Size,
|
RtlCreateQueryDebugBuffer(IN ULONG Size,
|
||||||
IN BOOLEAN EventPair)
|
IN BOOLEAN EventPair)
|
||||||
{
|
{
|
||||||
return(0);
|
PDEBUG_BUFFER Buf = NULL;
|
||||||
|
|
||||||
|
if (Size < sizeof(DEBUG_BUFFER))
|
||||||
|
{
|
||||||
|
Size = sizeof(DEBUG_BUFFER);
|
||||||
|
}
|
||||||
|
Buf = (PDEBUG_BUFFER) RtlAllocateHeap(RtlGetProcessHeap(), 0, Size);
|
||||||
|
memset(Buf, 0, Size);
|
||||||
|
|
||||||
|
return Buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
RtlDestroyQueryDebugBuffer(IN PDEBUG_BUFFER Buf)
|
RtlDestroyQueryDebugBuffer(IN PDEBUG_BUFFER Buf)
|
||||||
{
|
{
|
||||||
return(0);
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
|
if (NULL != Buf) {
|
||||||
|
if (NULL != Buf->ModuleInformation)
|
||||||
|
RtlFreeHeap(RtlGetProcessHeap(), 0, Buf->ModuleInformation);
|
||||||
|
|
||||||
|
if (NULL != Buf->HeapInformation)
|
||||||
|
RtlFreeHeap(RtlGetProcessHeap(), 0, Buf->HeapInformation);
|
||||||
|
|
||||||
|
if (NULL != Buf->LockInformation)
|
||||||
|
RtlFreeHeap(RtlGetProcessHeap(), 0, Buf->LockInformation);
|
||||||
|
|
||||||
|
RtlFreeHeap(RtlGetProcessHeap(), 0, Buf);
|
||||||
|
}
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
RtlQueryProcessDebugInformation(IN ULONG ProcessId,
|
RtlQueryProcessDebugInformation(IN ULONG ProcessId,
|
||||||
IN ULONG DebugInfoMask,
|
IN ULONG DebugInfoMask,
|
||||||
IN OUT PDEBUG_BUFFER Buf)
|
IN OUT PDEBUG_BUFFER Buf)
|
||||||
{
|
{
|
||||||
return (0);
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
|
Buf->InfoClassMask = DebugInfoMask;
|
||||||
|
|
||||||
|
if (DebugInfoMask & PDI_MODULES)
|
||||||
|
{
|
||||||
|
PDEBUG_MODULE_INFORMATION info =
|
||||||
|
RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(DEBUG_MODULE_INFORMATION));
|
||||||
|
memset(info, 0, sizeof(DEBUG_MODULE_INFORMATION));
|
||||||
|
Buf->ModuleInformation = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DebugInfoMask & PDI_HEAPS)
|
||||||
|
{
|
||||||
|
PDEBUG_HEAP_INFORMATION info =
|
||||||
|
RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(DEBUG_HEAP_INFORMATION));
|
||||||
|
memset(info, 0, sizeof(DEBUG_HEAP_INFORMATION));
|
||||||
|
|
||||||
|
if (DebugInfoMask & PDI_HEAP_TAGS)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
if (DebugInfoMask & PDI_HEAP_BLOCKS)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
Buf->HeapInformation = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DebugInfoMask & PDI_LOCKS)
|
||||||
|
{
|
||||||
|
PDEBUG_LOCK_INFORMATION info =
|
||||||
|
RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(DEBUG_LOCK_INFORMATION));
|
||||||
|
memset(info, 0, sizeof(DEBUG_LOCK_INFORMATION));
|
||||||
|
Buf->LockInformation = info;
|
||||||
|
}
|
||||||
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOL */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue