* fhandler_process.cc (struct heap_info::heap): Convert base to
uintptr_t. Add heap_id, end, flags members. (heap_info::heap_vm_chunks): Rename from heaps. (heap_info::heap_info): Rearrange using RtlQueryProcessDebugInformation to get information of heap virtual memory blocks. Store heap id and flags, as well as end address of each block. (heap_info::fill_if_match): Check incoming base address against full address range of heap chunks. Convert flag values in extra heap information. (format_process_maps): Change order so that heap check is done before MEM_MAPPED check since there are shareable heaps. * ntdll.h (PDI_HEAP_BLOCKS): Define. (HEAP_FLAG_NOSERIALIZE): Define. (HEAP_FLAG_GROWABLE): Define. (HEAP_FLAG_EXCEPTIONS): Define. (HEAP_FLAG_NONDEFAULT): Define. (HEAP_FLAG_SHAREABLE): Define. (HEAP_FLAG_EXECUTABLE): Define. (HEAP_FLAG_DEBUGGED): Define. (struct _DEBUG_HEAP_ARRAY): Define. (struct _DEBUG_HEAP_BLOCK): Define.
This commit is contained in:
@ -63,6 +63,7 @@
|
||||
|
||||
#define PDI_MODULES 0x01
|
||||
#define PDI_HEAPS 0x04
|
||||
#define PDI_HEAP_BLOCKS 0x10
|
||||
#define LDRP_IMAGE_DLL 0x00000004
|
||||
#define WSLE_PAGE_READONLY 0x001
|
||||
#define WSLE_PAGE_EXECUTE 0x002
|
||||
@ -510,6 +511,15 @@ typedef struct _DEBUG_BUFFER
|
||||
PVOID Reserved[9];
|
||||
} DEBUG_BUFFER, *PDEBUG_BUFFER;
|
||||
|
||||
/* Known debug heap flags */
|
||||
#define HEAP_FLAG_NOSERIALIZE 0x1
|
||||
#define HEAP_FLAG_GROWABLE 0x2
|
||||
#define HEAP_FLAG_EXCEPTIONS 0x4
|
||||
#define HEAP_FLAG_NONDEFAULT 0x1000
|
||||
#define HEAP_FLAG_SHAREABLE 0x8000
|
||||
#define HEAP_FLAG_EXECUTABLE 0x40000
|
||||
#define HEAP_FLAG_DEBUGGED 0x40000000
|
||||
|
||||
typedef struct _DEBUG_HEAP_INFORMATION
|
||||
{
|
||||
ULONG Base;
|
||||
@ -525,6 +535,20 @@ typedef struct _DEBUG_HEAP_INFORMATION
|
||||
PVOID Blocks;
|
||||
} DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
|
||||
|
||||
typedef struct _DEBUG_HEAP_ARRAY
|
||||
{
|
||||
ULONG Count;
|
||||
DEBUG_HEAP_INFORMATION Heaps[1];
|
||||
} DEBUG_HEAP_ARRAY, *PDEBUG_HEAP_ARRAY;
|
||||
|
||||
typedef struct _DEBUG_HEAP_BLOCK
|
||||
{
|
||||
ULONG Size;
|
||||
ULONG Flags;
|
||||
ULONG Committed;
|
||||
ULONG Address;
|
||||
} DEBUG_HEAP_BLOCK, *PDEBUG_HEAP_BLOCK;
|
||||
|
||||
typedef struct _DEBUG_MODULE_INFORMATION
|
||||
{
|
||||
ULONG Reserved[2];
|
||||
|
Reference in New Issue
Block a user