1.
"120" Take the 12th lesson of the source code as an example
"160" recompile the source with DDK
"210" in order to facilitate debugging, our next breakpoint (ZC: Directly in the source code inside the breakpoint ah?) ), ∵ in the entry function where the breakpoint is not very good under (ZC: Why?) ), we can unload the routine inside the next breakpoint.
"250" If you need to start with the entry function, you need to add code to the DriverEntry.
“
__asm int 3; Which is a 0xCC instruction.
”
"285" recompile
"325" Driver File "Ddk_helloworld.sys" renamed to "Ddk.sys"
"345" For later use, we will change the value of "TARGETNAME" in the file source from "Ddk_helloworld" to "DDK"
"390" Copy "Ddk.sys" and drive tool to virtual machine
"440" ZC: Virtual machine is running state, at this time open Windbg, it can automatically connect to the virtual machine, I remember I can not do this before AH? Why? is the version of ∵ virtual machine/windbg different? ∵ virtual machine inside also installed WinDbg's sake? Here the virtual machine inside of the WinDbg also did not do ah ...
"570" Drivermonitor Load drive Ddk.sys, "GO", Virtual machine broken down
"608" to view content in WinDbg
"635" windbg input instruction "U ddk! DriverEntry ", so you can see" ddk! Driverentry+0x5 "is the CC directive (ZC: Here the" +0x5 "should refer to the body of the function body at 5 byte offset (starting from 0))
"705" WinDbg in the source code automatically appears, ∵ source code path is automatically included in our compiled driver inside. If it is not displayed, through the windbg--> file--"Symbol file path (s) ..." To set the path to the corresponding. pdb file for our drivers
"825" F10 ==> step Over, f8/f11 ==> walk into
"1020" jump out of the function, only see the corresponding button on the toolbar/the corresponding command is "gu", but do not know what the corresponding shortcut key is
"1075" jumps out of the function ==> shift+f11 ==> that is to return to the previous layer call execution
"1205"
“
Order:
1, presumably everyone has used OD debugging procedures, single Here I want to say OD user layer debugging and WinDbg kernel debugging have the essential difference. At OD we can choose to debug a process separately, while the kernel is a whole from WinDbg, and they have something in common, so let's get to the bottom of the list.
”
2.
yjx_driver_014_vm+wlndbg Debug Driver