[FASTFAT] Introduce a KDBG extension.

This is a PoC of what it's possible to realize thanks to an
already existing hack in ntoskrnl :-).
With this extension, on the kdb:> prompt, you're able to type
in commands that will be handled by the FastFAT driver and not
by the kernel, allowing internal debug, not possible otherwise.

So far, three commands exist:
- ?fat.vols: lists all the mounted volumes by FastFAT
- ?fat.files: lists all the files on a specific volume (with their attributes)
- ?fat.setdbgfile: allows watching on specifics files lifetime

This is obviously only the begin and could be greatly improved.

For instance, this is what allowed to debug CORE-14557
This commit is contained in:
Pierre Schweitzer 2018-04-28 09:34:10 +02:00
parent cb20bf8c90
commit c5a35ecd37
7 changed files with 297 additions and 4 deletions

View file

@ -48,6 +48,9 @@ VfatCloseFile(
}
else
{
#ifdef KDBG
pFcb->Flags |= FCB_CLOSED;
#endif
vfatReleaseFCB(DeviceExt, pFcb);
}