Hi,
I want to debug one of my driver but I still haven’t found a way to see the KdPrint or DebugPrintEx.
My setup is the following:
Target: (WinXP SP3)
It is where the driver is installed. I’ve also modified the boot.ini file by doing:
bootcfg /debug ON /port COM1 /baud 115200 /ID 1
The driver is compled under this PC.
This PC is then connected to the host using a DB9 NULL cable
Host: (Win7)
Where the WinDbg is running.
I have correctly setup the debug print register for Win Vista and upper (http://www.osronline.com/article.cfm?article=295)
C:\Users\Ben\>reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter
DEFAULT REG_DWORD 0xf
And i’ve also tried to setup using “kd> ed Kd_DEFAULT_MASK 0xF” but this doesn’t work.
I think that all of this is not necessary because my target is winXP.
Finally, I have added the symbols path:
SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols
The connection and symbols are working and I can also setup a specific breakpoint function:
0: kd\> bm pcie_demo!StartDMA\*
1: ba418ec4 @!"pcie_demo!StartDMAWrite"
2: ba418d8c @!"pcie_demo!StartDMARead"
However I have no way to see any printf from my driver
I have tried different type of printf function in my driver and none of them work
KdPrint((“Ben KdPrint: StartDMARead\n”));
DbgPrintEx(DPFLTR_IHVDRIVER_ID,DPFLTR_TRACE_LEVEL,“Ben DbgPrintEx: s3_1000.sys: StartDMARead\n”);
TraceEvents(TRACE_LEVEL_INFORMATION, DBG_INIT,“Ben TraceEvent: startDMA Built %s %s”, DATE, TIME);
But the function is correctly called and the breakpoint on this functon is correclty reached.
0: kd\> g
NOD32 protected [MSAFD Tcpip [TCP/IP]]NOD32 protected [MSAFD Tcpip [UDP/IP]]NOD32 protected [MSAFD Tcpip [RAW/IP]]NOD32 protected [RSVP UDP Service Provider]NOD32 protected [RSVP TCP Service Provider]NOD32 protected [MSAFD Tcpip [TCP/IP]]NOD32 protected [MSAFD Tcpip [UDP/IP]]NOD32 protected [MSAFD Tcpip [RAW/IP]]NOD32 protected [RSVP UDP Service Provider]NOD32 protected [RSVP TCP Service Provider]Breakpoint 2 hit
pcie_demo!StartDMARead:
ba418d8c 8bff mov edi,edi
I hope someone can help me!!!
Cheers,