2005-09-08 00:09:32 +00:00
|
|
|
/* COPYRIGHT: See COPYING in the top level directory
|
2011-12-16 15:45:09 +00:00
|
|
|
* PROJECT: ReactOS system libraries
|
|
|
|
* FILE: lib/rtl/dbgbuffer.c
|
|
|
|
* PROGRAMER: James Tabor
|
|
|
|
*/
|
2004-08-09 18:17:23 +00:00
|
|
|
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
|
2005-09-08 00:09:32 +00:00
|
|
|
#include <rtl.h>
|
|
|
|
|
2005-06-19 22:50:59 +00:00
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
2004-08-11 03:48:31 +00:00
|
|
|
|
2005-09-08 00:09:32 +00:00
|
|
|
/* FUNCTIONS *****************************************************************/
|
2004-08-09 18:17:23 +00:00
|
|
|
|
2004-08-09 19:55:33 +00:00
|
|
|
/*
|
2011-12-16 15:45:09 +00:00
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
PRTL_DEBUG_INFORMATION
|
|
|
|
NTAPI
|
2004-08-09 18:17:23 +00:00
|
|
|
RtlCreateQueryDebugBuffer(IN ULONG Size,
|
|
|
|
IN BOOLEAN EventPair)
|
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
NTSTATUS Status;
|
|
|
|
PRTL_DEBUG_INFORMATION Buf = NULL;
|
|
|
|
SIZE_T ViewSize = 100 * PAGE_SIZE;
|
2005-05-09 01:43:25 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
Status = NtAllocateVirtualMemory(NtCurrentProcess(),
|
|
|
|
(PVOID*)&Buf,
|
2004-08-11 03:48:31 +00:00
|
|
|
0,
|
2006-05-10 17:47:44 +00:00
|
|
|
&ViewSize,
|
2011-12-16 20:12:28 +00:00
|
|
|
MEM_RESERVE | MEM_COMMIT,
|
2004-08-11 03:48:31 +00:00
|
|
|
PAGE_READWRITE);
|
2011-12-16 15:45:09 +00:00
|
|
|
if (!NT_SUCCESS(Status)) return NULL;
|
2004-08-11 03:48:31 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
Buf->ViewBaseClient = Buf;
|
|
|
|
Buf->ViewSize = (ULONG)ViewSize;
|
2005-05-09 01:43:25 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
DPRINT("RtlCQDB: BA: %p BS: 0x%lx\n", Buf->ViewBaseClient, Buf->ViewSize);
|
2004-08-09 19:55:33 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
return Buf;
|
2004-08-09 18:17:23 +00:00
|
|
|
}
|
|
|
|
|
2004-08-09 19:55:33 +00:00
|
|
|
/*
|
2011-12-16 15:45:09 +00:00
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2006-05-10 17:47:44 +00:00
|
|
|
RtlDestroyQueryDebugBuffer(IN PRTL_DEBUG_INFORMATION Buf)
|
2004-08-09 18:17:23 +00:00
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
NTSTATUS Status = STATUS_SUCCESS;
|
2011-12-16 20:12:28 +00:00
|
|
|
SIZE_T ViewSize = 0;
|
2011-12-16 15:45:09 +00:00
|
|
|
|
|
|
|
if (NULL != Buf)
|
|
|
|
{
|
|
|
|
Status = NtFreeVirtualMemory(NtCurrentProcess(),
|
2011-12-16 20:12:28 +00:00
|
|
|
(PVOID*)&Buf,
|
|
|
|
&ViewSize,
|
2011-12-16 15:45:09 +00:00
|
|
|
MEM_RELEASE);
|
|
|
|
}
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-08-11 03:48:31 +00:00
|
|
|
DPRINT1("RtlDQDB: Failed to free VM!\n");
|
2011-12-16 15:45:09 +00:00
|
|
|
}
|
|
|
|
return Status;
|
2004-08-09 18:17:23 +00:00
|
|
|
}
|
|
|
|
|
2004-08-11 21:02:12 +00:00
|
|
|
/*
|
2011-12-16 15:45:09 +00:00
|
|
|
* Based on lib/epsapi/enum/modules.c by KJK::Hyperion.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2004-08-11 21:02:12 +00:00
|
|
|
RtlpQueryRemoteProcessModules(HANDLE ProcessHandle,
|
2006-05-10 17:47:44 +00:00
|
|
|
IN PRTL_PROCESS_MODULES Modules OPTIONAL,
|
2004-11-19 01:30:35 +00:00
|
|
|
IN ULONG Size OPTIONAL,
|
|
|
|
OUT PULONG ReturnedSize)
|
2004-08-11 21:02:12 +00:00
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
PROCESS_BASIC_INFORMATION pbiInfo;
|
|
|
|
PPEB_LDR_DATA ppldLdrData;
|
|
|
|
LDR_DATA_TABLE_ENTRY lmModule;
|
|
|
|
PLIST_ENTRY pleListHead;
|
|
|
|
PLIST_ENTRY pleCurEntry;
|
|
|
|
|
|
|
|
PRTL_PROCESS_MODULE_INFORMATION ModulePtr = NULL;
|
|
|
|
NTSTATUS Status = STATUS_SUCCESS;
|
|
|
|
ULONG UsedSize = sizeof(ULONG);
|
|
|
|
ANSI_STRING AnsiString;
|
|
|
|
PCHAR p;
|
|
|
|
|
|
|
|
DPRINT("RtlpQueryRemoteProcessModules Start\n");
|
|
|
|
|
|
|
|
/* query the process basic information (includes the PEB address) */
|
|
|
|
Status = NtQueryInformationProcess(ProcessHandle,
|
2004-08-11 21:02:12 +00:00
|
|
|
ProcessBasicInformation,
|
2004-11-19 01:30:35 +00:00
|
|
|
&pbiInfo,
|
2004-08-11 21:02:12 +00:00
|
|
|
sizeof(PROCESS_BASIC_INFORMATION),
|
|
|
|
NULL);
|
2005-05-09 01:43:25 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
if (!NT_SUCCESS(Status))
|
2004-08-11 21:02:12 +00:00
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
/* failure */
|
|
|
|
DPRINT("NtQueryInformationProcess 1 0x%lx \n", Status);
|
|
|
|
return Status;
|
2004-08-11 21:02:12 +00:00
|
|
|
}
|
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
if (Modules == NULL || Size == 0)
|
2004-08-11 21:02:12 +00:00
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
Status = STATUS_INFO_LENGTH_MISMATCH;
|
2004-08-11 21:02:12 +00:00
|
|
|
}
|
2011-12-16 15:45:09 +00:00
|
|
|
else
|
2004-08-11 21:02:12 +00:00
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
Modules->NumberOfModules = 0;
|
|
|
|
ModulePtr = &Modules->Modules[0];
|
|
|
|
Status = STATUS_SUCCESS;
|
2004-08-11 21:02:12 +00:00
|
|
|
}
|
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
/* get the address of the PE Loader data */
|
|
|
|
Status = NtReadVirtualMemory(ProcessHandle,
|
|
|
|
&(pbiInfo.PebBaseAddress->Ldr),
|
|
|
|
&ppldLdrData,
|
|
|
|
sizeof(ppldLdrData),
|
|
|
|
NULL);
|
2005-05-09 01:43:25 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
if (!NT_SUCCESS(Status))
|
2004-08-11 21:02:12 +00:00
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
/* failure */
|
|
|
|
DPRINT("NtReadVirtualMemory 1 0x%lx \n", Status);
|
|
|
|
return Status;
|
2004-08-11 21:02:12 +00:00
|
|
|
}
|
|
|
|
|
2005-05-09 01:43:25 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
/* head of the module list: the last element in the list will point to this */
|
|
|
|
pleListHead = &ppldLdrData->InLoadOrderModuleList;
|
2004-08-11 21:02:12 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
/* get the address of the first element in the list */
|
|
|
|
Status = NtReadVirtualMemory(ProcessHandle,
|
|
|
|
&(ppldLdrData->InLoadOrderModuleList.Flink),
|
|
|
|
&pleCurEntry,
|
2004-08-11 21:02:12 +00:00
|
|
|
sizeof(pleCurEntry),
|
2011-12-16 15:45:09 +00:00
|
|
|
NULL);
|
2004-08-11 21:02:12 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
2004-08-11 21:02:12 +00:00
|
|
|
/* failure */
|
2005-12-08 23:44:31 +00:00
|
|
|
DPRINT("NtReadVirtualMemory 2 0x%lx \n", Status);
|
2004-08-11 21:02:12 +00:00
|
|
|
return Status;
|
2011-12-16 15:45:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
while(pleCurEntry != pleListHead)
|
|
|
|
{
|
|
|
|
UNICODE_STRING Unicode;
|
|
|
|
WCHAR Buffer[256 * sizeof(WCHAR)];
|
|
|
|
|
|
|
|
/* read the current module */
|
|
|
|
Status = NtReadVirtualMemory(ProcessHandle,
|
|
|
|
CONTAINING_RECORD(pleCurEntry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks),
|
|
|
|
&lmModule,
|
|
|
|
sizeof(LDR_DATA_TABLE_ENTRY),
|
|
|
|
NULL);
|
|
|
|
|
2013-07-22 13:45:56 +00:00
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
/* failure */
|
|
|
|
DPRINT( "NtReadVirtualMemory 3 0x%lx \n", Status);
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
/* Import module name from remote Process user space. */
|
|
|
|
Unicode.Length = lmModule.FullDllName.Length;
|
|
|
|
Unicode.MaximumLength = lmModule.FullDllName.MaximumLength;
|
|
|
|
Unicode.Buffer = Buffer;
|
|
|
|
|
|
|
|
Status = NtReadVirtualMemory(ProcessHandle,
|
|
|
|
lmModule.FullDllName.Buffer,
|
|
|
|
Unicode.Buffer,
|
|
|
|
Unicode.Length,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
/* failure */
|
|
|
|
DPRINT( "NtReadVirtualMemory 3 0x%lx \n", Status);
|
|
|
|
return Status;
|
|
|
|
}
|
2004-08-11 21:02:12 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
DPRINT(" Module %wZ\n", &Unicode);
|
2004-08-11 21:02:12 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
if (UsedSize > Size)
|
2004-08-11 21:02:12 +00:00
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
Status = STATUS_INFO_LENGTH_MISMATCH;
|
2004-08-11 21:02:12 +00:00
|
|
|
}
|
2011-12-16 15:45:09 +00:00
|
|
|
else if (Modules != NULL)
|
2004-08-11 21:02:12 +00:00
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
ModulePtr->Section = 0;
|
|
|
|
ModulePtr->MappedBase = NULL; // FIXME: ??
|
|
|
|
ModulePtr->ImageBase = lmModule.DllBase;
|
|
|
|
ModulePtr->ImageSize = lmModule.SizeOfImage;
|
|
|
|
ModulePtr->Flags = lmModule.Flags;
|
|
|
|
ModulePtr->LoadOrderIndex = 0; // FIXME: ??
|
|
|
|
ModulePtr->InitOrderIndex = 0; // FIXME: ??
|
|
|
|
ModulePtr->LoadCount = lmModule.LoadCount;
|
|
|
|
|
|
|
|
AnsiString.Length = 0;
|
|
|
|
AnsiString.MaximumLength = 256;
|
|
|
|
AnsiString.Buffer = ModulePtr->FullPathName;
|
|
|
|
RtlUnicodeStringToAnsiString(&AnsiString,
|
|
|
|
&Unicode,
|
|
|
|
FALSE);
|
|
|
|
|
|
|
|
p = strrchr(ModulePtr->FullPathName, '\\');
|
|
|
|
if (p != NULL)
|
|
|
|
ModulePtr->OffsetToFileName = (USHORT)(p - ModulePtr->FullPathName + 1);
|
|
|
|
else
|
|
|
|
ModulePtr->OffsetToFileName = 0;
|
|
|
|
|
|
|
|
ModulePtr++;
|
|
|
|
Modules->NumberOfModules++;
|
2004-08-11 21:02:12 +00:00
|
|
|
}
|
2011-12-16 15:45:09 +00:00
|
|
|
UsedSize += sizeof(RTL_PROCESS_MODULE_INFORMATION);
|
2004-08-11 21:02:12 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
/* address of the next module in the list */
|
|
|
|
pleCurEntry = lmModule.InLoadOrderLinks.Flink;
|
|
|
|
}
|
2005-05-09 01:43:25 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
if (ReturnedSize != 0)
|
|
|
|
*ReturnedSize = UsedSize;
|
2004-08-11 21:02:12 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
DPRINT("RtlpQueryRemoteProcessModules End\n");
|
2004-08-11 21:02:12 +00:00
|
|
|
|
|
|
|
/* success */
|
2011-12-16 15:45:09 +00:00
|
|
|
return (STATUS_SUCCESS);
|
2004-08-11 21:02:12 +00:00
|
|
|
}
|
|
|
|
|
2004-08-09 19:55:33 +00:00
|
|
|
/*
|
2011-12-16 15:45:09 +00:00
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2005-05-09 01:43:25 +00:00
|
|
|
RtlQueryProcessDebugInformation(IN ULONG ProcessId,
|
|
|
|
IN ULONG DebugInfoMask,
|
2006-05-10 17:47:44 +00:00
|
|
|
IN OUT PRTL_DEBUG_INFORMATION Buf)
|
2004-08-09 18:17:23 +00:00
|
|
|
{
|
2011-12-16 15:45:09 +00:00
|
|
|
NTSTATUS Status = STATUS_SUCCESS;
|
|
|
|
ULONG Pid = (ULONG)(ULONG_PTR) NtCurrentTeb()->ClientId.UniqueProcess;
|
2004-08-11 03:48:31 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
Buf->Flags = DebugInfoMask;
|
|
|
|
Buf->OffsetFree = sizeof(RTL_DEBUG_INFORMATION);
|
2004-08-11 21:02:12 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
DPRINT("QueryProcessDebugInformation Start\n");
|
2004-08-11 03:48:31 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
/*
|
|
|
|
Currently ROS can not read-only from kenrel space, and doesn't
|
|
|
|
check for boundaries inside kernel space that are page protected
|
|
|
|
from every one but the kernel. aka page 0 - 2
|
|
|
|
*/
|
|
|
|
if (ProcessId <= 1)
|
|
|
|
{
|
|
|
|
Status = STATUS_ACCESS_VIOLATION;
|
2004-08-11 21:02:12 +00:00
|
|
|
}
|
2011-12-16 15:45:09 +00:00
|
|
|
else
|
|
|
|
if (Pid == ProcessId)
|
|
|
|
{
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_MODULES)
|
|
|
|
{
|
|
|
|
PRTL_PROCESS_MODULES Mp;
|
|
|
|
ULONG ReturnSize = 0;
|
|
|
|
ULONG MSize;
|
|
|
|
|
2012-12-17 12:06:14 +00:00
|
|
|
Mp = (PRTL_PROCESS_MODULES)((PUCHAR)Buf + Buf->OffsetFree);
|
2011-12-16 15:45:09 +00:00
|
|
|
|
|
|
|
/* I like this better than the do & while loop. */
|
|
|
|
Status = LdrQueryProcessModuleInformation(NULL,
|
|
|
|
0,
|
|
|
|
&ReturnSize);
|
|
|
|
Status = LdrQueryProcessModuleInformation(Mp,
|
|
|
|
ReturnSize ,
|
|
|
|
&ReturnSize);
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
|
|
|
MSize = Mp->NumberOfModules * (sizeof(RTL_PROCESS_MODULES) + 8);
|
|
|
|
Buf->Modules = Mp;
|
|
|
|
Buf->OffsetFree = Buf->OffsetFree + MSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_HEAPS)
|
|
|
|
{
|
|
|
|
PRTL_PROCESS_HEAPS Hp;
|
|
|
|
ULONG HSize;
|
|
|
|
|
2012-12-17 12:06:14 +00:00
|
|
|
Hp = (PRTL_PROCESS_HEAPS)((PUCHAR)Buf + Buf->OffsetFree);
|
2011-12-16 15:45:09 +00:00
|
|
|
HSize = sizeof(RTL_PROCESS_HEAPS);
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_HEAP_TAGS)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_HEAP_BLOCKS)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
Buf->Heaps = Hp;
|
|
|
|
Buf->OffsetFree = Buf->OffsetFree + HSize;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_LOCKS)
|
|
|
|
{
|
|
|
|
PRTL_PROCESS_LOCKS Lp;
|
|
|
|
ULONG LSize;
|
|
|
|
|
2012-12-17 12:06:14 +00:00
|
|
|
Lp = (PRTL_PROCESS_LOCKS)((PUCHAR)Buf + Buf->OffsetFree);
|
2011-12-16 15:45:09 +00:00
|
|
|
LSize = sizeof(RTL_PROCESS_LOCKS);
|
|
|
|
Buf->Locks = Lp;
|
|
|
|
Buf->OffsetFree = Buf->OffsetFree + LSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
DPRINT("QueryProcessDebugInformation end \n");
|
|
|
|
DPRINT("QueryDebugInfo : 0x%lx\n", Buf->OffsetFree);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
HANDLE hProcess;
|
|
|
|
CLIENT_ID ClientId;
|
|
|
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
|
|
|
|
|
|
|
Buf->TargetProcessHandle = NtCurrentProcess();
|
|
|
|
|
|
|
|
ClientId.UniqueThread = 0;
|
|
|
|
ClientId.UniqueProcess = (HANDLE)(ULONG_PTR)ProcessId;
|
|
|
|
InitializeObjectAttributes(&ObjectAttributes,
|
|
|
|
NULL,
|
|
|
|
0,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2004-08-11 21:02:12 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
Status = NtOpenProcess(&hProcess,
|
|
|
|
(PROCESS_ALL_ACCESS),
|
|
|
|
&ObjectAttributes,
|
|
|
|
&ClientId );
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_MODULES)
|
|
|
|
{
|
|
|
|
PRTL_PROCESS_MODULES Mp;
|
|
|
|
ULONG ReturnSize = 0;
|
|
|
|
ULONG MSize;
|
|
|
|
|
2012-12-17 12:06:14 +00:00
|
|
|
Mp = (PRTL_PROCESS_MODULES)((PUCHAR)Buf + Buf->OffsetFree);
|
2011-12-16 15:45:09 +00:00
|
|
|
|
|
|
|
Status = RtlpQueryRemoteProcessModules(hProcess,
|
|
|
|
NULL,
|
|
|
|
0,
|
|
|
|
&ReturnSize);
|
|
|
|
|
|
|
|
Status = RtlpQueryRemoteProcessModules(hProcess,
|
|
|
|
Mp,
|
|
|
|
ReturnSize ,
|
|
|
|
&ReturnSize);
|
|
|
|
if (!NT_SUCCESS(Status))
|
|
|
|
{
|
|
|
|
return Status;
|
|
|
|
}
|
|
|
|
|
|
|
|
MSize = Mp->NumberOfModules * (sizeof(RTL_PROCESS_MODULES) + 8);
|
|
|
|
Buf->Modules = Mp;
|
|
|
|
Buf->OffsetFree = Buf->OffsetFree + MSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_HEAPS)
|
|
|
|
{
|
|
|
|
PRTL_PROCESS_HEAPS Hp;
|
|
|
|
ULONG HSize;
|
|
|
|
|
2012-12-17 12:06:14 +00:00
|
|
|
Hp = (PRTL_PROCESS_HEAPS)((PUCHAR)Buf + Buf->OffsetFree);
|
2011-12-16 15:45:09 +00:00
|
|
|
HSize = sizeof(RTL_PROCESS_HEAPS);
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_HEAP_TAGS)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_HEAP_BLOCKS)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
Buf->Heaps = Hp;
|
|
|
|
Buf->OffsetFree = Buf->OffsetFree + HSize;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (DebugInfoMask & RTL_DEBUG_QUERY_LOCKS)
|
|
|
|
{
|
|
|
|
PRTL_PROCESS_LOCKS Lp;
|
|
|
|
ULONG LSize;
|
|
|
|
|
2012-12-17 12:06:14 +00:00
|
|
|
Lp = (PRTL_PROCESS_LOCKS)((PUCHAR)Buf + Buf->OffsetFree);
|
2011-12-16 15:45:09 +00:00
|
|
|
LSize = sizeof(RTL_PROCESS_LOCKS);
|
|
|
|
Buf->Locks = Lp;
|
|
|
|
Buf->OffsetFree = Buf->OffsetFree + LSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
DPRINT("QueryProcessDebugInformation end \n");
|
|
|
|
DPRINT("QueryDebugInfo : 0x%lx\n", Buf->OffsetFree);
|
|
|
|
}
|
2004-08-09 19:55:33 +00:00
|
|
|
|
2011-12-16 15:45:09 +00:00
|
|
|
return Status;
|
2004-08-09 19:55:33 +00:00
|
|
|
}
|
2004-08-09 18:17:23 +00:00
|
|
|
|
2004-08-09 19:55:33 +00:00
|
|
|
/* EOL */
|