集中打印调试信息的模版函数
有时候我更喜欢集中打印出一个代码块中所有的我需要看到调试信息。而不需要单步跟踪的打印//打印调试信息的框架函数VOID Dump(IN PDRIVER_OBJECT pDriverObject)
{
KdPrint(("--------------------------------------------"));
KdPrint(("Begin Dump...\n"));
//打印一些调试信息
KdPrint(("Driver Address:0X%08X\n",pDriverObject));
KdPrint(("Driver name:%wZ\n",&pDriverObject->DriverName)); //驱动名字
KdPrint(("Driver HardwareDatabase:%wZ\n",pDriverObject->HardwareDatabase));
KdPrint(("Driver first device:0X%08X\n",pDriverObject->DeviceObject));
KdPrint(("End Dump...\n"));
KdPrint(("--------------------------------------------"));
}
页:
[1]