[NTOSKRNL] Add a first implementation of !handle command in KDBG

It allows dumping all the handles (filtered by PID/Process)
and it displays basic information about file and key handles
This commit is contained in:
Pierre Schweitzer 2019-02-09 13:45:19 +01:00
parent 5bfe6a5376
commit 2991f6e76e
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
2 changed files with 229 additions and 0 deletions

View file

@ -97,6 +97,7 @@ BOOLEAN ExpKdbgExtPoolFind(ULONG Argc, PCHAR Argv[]);
BOOLEAN ExpKdbgExtFileCache(ULONG Argc, PCHAR Argv[]);
BOOLEAN ExpKdbgExtDefWrites(ULONG Argc, PCHAR Argv[]);
BOOLEAN ExpKdbgExtIrpFind(ULONG Argc, PCHAR Argv[]);
BOOLEAN ExpKdbgExtHandle(ULONG Argc, PCHAR Argv[]);
#ifdef __ROS_DWARF__
static BOOLEAN KdbpCmdPrintStruct(ULONG Argc, PCHAR Argv[]);
@ -194,6 +195,7 @@ static const struct
{ "!filecache", "!filecache", "Display cache usage.", ExpKdbgExtFileCache },
{ "!defwrites", "!defwrites", "Display cache write values.", ExpKdbgExtDefWrites },
{ "!irpfind", "!irpfind [Pool [startaddress [criteria data]]]", "Lists IRPs potentially matching criteria", ExpKdbgExtIrpFind },
{ "!handle", "!handle [Handle]", "Displays info about handles", ExpKdbgExtHandle },
};
/* FUNCTIONS *****************************************************************/