WinDebug 調試問題 — Breakpoint 4′s offset expression evaluation failed.

來源:互聯網
上載者:User

最近調試出現這個問題,我總是歸咎於pdb檔案問題,結果重新編譯了N次,還是出現這問題。

一開始我根本忽略這個error,所以重新編譯pdb,還是錯誤,所以我不得不重新重視這個error code.

今天第一次發現error code真的非常重要。

然後我開始找度娘協助了,很快我就解決了,是因為斷點設定不對的問題。

/////////////////////////////////////////////////////

轉自: http://blog.csdn.net/lijiawlm/article/details/4412289

// 轉載文章

基礎知識

 

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
可以運行

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.