sys: fsp_debug: greatly simplify debugging support

This commit is contained in:
Bill Zissimopoulos
2016-04-10 23:45:09 -07:00
parent adb6819de1
commit 9b81c03ccc
12 changed files with 90 additions and 77 deletions

View File

@ -296,4 +296,19 @@ ULONG DebugRandom(VOID)
return Result;
}
VOID FspDebugLogIrp(const char *func, PIRP Irp, NTSTATUS Result)
{
PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
DbgPrint("[%d] " DRIVER_NAME "!%s: IRP=%p, %s%c, %s%s, IoStatus=%s[%lld]\n",
KeGetCurrentIrql(),
func,
Irp,
DeviceExtensionKindSym(FspDeviceExtension(IrpSp->DeviceObject)->Kind),
Irp->RequestorMode == KernelMode ? 'K' : 'U',
IrpMajorFunctionSym(IrpSp->MajorFunction),
IrpMinorFunctionSym(IrpSp->MajorFunction, IrpSp->MinorFunction),
NtStatusSym(Result),
(LONGLONG)Irp->IoStatus.Information);
}
#endif