基础知识
bp 程序运行过程中下断点
bu 程序未加载之前下断点
bl 列出所有断点
bc 清除断点
今天在调试驱动的时候 发现下好断点后 无法调试
WinDbg显示
kd> g
Breakpoint 11's offset expression evaluation failed.
Check for invalid symbols or bad syntax.
WaitForEvent failed
nt!DebugService2+0x11:
按照字面的理解意思就是11号断点有问题
于是 上网找WinDbg的相关操作说明
找到了一点东西 就是上面的基础知识
下面说说解决过程
首先
kd> bl
0 eu 0001 (0001) (@@masm(`HelloDDK!Driver.cpp:35+`))
1 eu 0001 (0001) (HelloDDK!DriverEntry)
2 eu 0001 (0001) (HelloDDK!DriverEntry)
3 eu 0001 (0001) (HelloDDK!DriverEntry)
4 e f9ed4890 0001 (0001) MyDDK!DriverEntry
5 eu 0001 (0001) (HelloDDK!DriverEntry)
6 e f9ed4900 0001 (0001) MyDDK!CreateDevice
7 eu 0001 (0001) (Test!DriverEntry)
8 eu 0001 (0001) (Driver!DriverEntry)
9 eu 0001 (0001) (@@masm(`Driver.cpp:18+`))
10 e f9ed4890 0001 (0001) MyDDK!DriverEntry
11 eu 0001 (0001) (MyDDK!lCreateFile)
12 e f9ed4890 0001 (0001) MyDDK!DriverEntry
13 e f9ed4890 0001 (0001) MyDDK!DriverEntry
14 e f9ed4890 0001 (0001) MyDDK!DriverEntry
15 e f9ed48ad 0001 (0001) MyDDK!DriverEntry+0x1d
发现有很多地方没有地址 应该是这些地方的断点有问题 删除之
kd> bc 0 1 2 3 5 7 8 9
kd> bl
4 e f9ed4890 0001 (0001) MyDDK!DriverEntry
6 e f9ed4900 0001 (0001) MyDDK!CreateDevice
10 e f9ed4890 0001 (0001) MyDDK!DriverEntry
12 e f9ed4890 0001 (0001) MyDDK!DriverEntry
13 e f9ed4890 0001 (0001) MyDDK!DriverEntry
14 e f9ed4890 0001 (0001) MyDDK!DriverEntry
15 e f9ed48ad 0001 (0001) MyDDK!DriverEntry+0x1d
再继续
kd> g
可以运行
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/lijiawlm/archive/2009/08/05/4412289.aspx