2012-09-18 35 views
3

作爲驅動程序開發人員WinDbg是我最好的朋友之一。如何增加當前WinDbg中的斷點限制?

現在開始使用Windows 8,我安裝了新的WDK並希望使用其新的WinDbg。它具有一些很好的功能,例如通過網絡進行遠程調試。

但是在使用它的時候,當我意識到我只能激活32個斷點時,我感到震驚。顯示以下消息:

******************************************************************************* 
* You have attempted to enable 33 KD breakpoints, which exceeds the   * 
* currently supported limit of 32 breakpoints for Windows kernel debugging. * 
* Breakpoints exceeding this limit are ignored.        * 
* Please disable/clear breakpoints until you are within the supported limit. * 
******************************************************************************* 

在早期版本中不是這種情況。有沒有解決的辦法?我還沒有找到一個選項,一個註冊表項,或者我可以修補可執行文件?

回答

0

有趣。 !警告消息從dbgeng AddBreakpoint到來,在逐步執行代碼,它看起來像32的限制是硬編碼:

cmp  esi, 20h 
jbe  short loc_100A5721 
push offset asc_10038758 ; "***************************************"... 
call [email protected]@YAXPBGZZ 
pop  ecx 
push esi 
push offset aYouHaveAttempt ; "* You have attempted to enable %4u KD b"... 
call [email protected]@YAXPBGZZ 
push 20h 
push offset aCurrentlySuppo ; "* currently supported limit of %4u brea"... 
call [email protected]@YAXPBGZZ 
push offset aBreakpointsExc ; "* Breakpoints exceeding this limit are "... 
call [email protected]@YAXPBGZZ 

我懷疑,只是修補這個檢查是不夠的,但還沒t看得更遠以確認這一點。

0

你可以把INT 3(字節的0xCC)處通過如下命令的任何地址:EB [地址] CC

確保恢復原始字節,當你打INT 3

+0

我知道這一點,但不太舒適,特別是因爲WinDbg的bm命令使用通配符。 – ConfusedSushi

+0

是的,如果你想要使用額外的斷點選項,這樣做並不方便。但是,您可以使用「x」來獲取地址,從而解決通配符符號問題。 – Attila