!gle 擴充顯示當前線程的最後一個錯誤碼。
這個太好記了,getlasterror取首字母:
0:002> !gle
- LastErrorValue: (Win32) 0 (0) - <Unable to get error code text>
- LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0
0:002> !gleLastErrorValue: (Win32) 0 (0) - <Unable to get error code text>LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0
-all 顯示目標系統中每個使用者模式線程的最終錯誤。如果在使用者模式下省略該參數,調試器顯示當前線程的最終錯誤。如果核心模式下省略該參數,調試器顯示當前的寄存器上下文指定的線程的最終錯誤。
0:002> !gle
- LastErrorValue: (Win32) 0 (0) - <Unable to get error code text>
- LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0
- 0:002> !gle -all
- Last error for thread 0:
- LastErrorValue: (Win32) 0 (0) - <Unable to get error code text>
- LastStatusValue: (NTSTATUS) 0xc0000135 - {
-
- Last error for thread 1:
- LastErrorValue: (Win32) 0 (0) - <Unable to get error code text>
- LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0
-
- Last error for thread 2:
- LastErrorValue: (Win32) 0 (0) - <Unable to get error code text>
- LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0
0:002> !gleLastErrorValue: (Win32) 0 (0) - <Unable to get error code text>LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_00:002> !gle -allLast error for thread 0:LastErrorValue: (Win32) 0 (0) - <Unable to get error code text>LastStatusValue: (NTSTATUS) 0xc0000135 - {Last error for thread 1:LastErrorValue: (Win32) 0 (0) - <Unable to get error code text>LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0Last error for thread 2:LastErrorValue: (Win32) 0 (0) - <Unable to get error code text>LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0
!gle擴充顯示GetLastError的值並嘗試解碼它。
g
g(go)命令開始指定進程或線程的執行。這種執行將會在程式結束、遇到BreakAddress 或者其他造成調試器停止的事件發生時停止。
這個我們太經常用到了,
1>.如果直接用g不帶參數,表示無條件恢複偵錯目標的執行
2.>g Address,相當於設了一個一次性斷點,然後將偵錯目標執行到斷點
3>gu 用於使偵錯目標執行完當前函數並且返回到調用者,由於這個命令知道當前的棧指標,因此它可以從遞迴函式調用中返回
在使用者態調試中,都可以通過~線程號 來指定某個線程的執行命令,所有其他線程都被凍結狀態,
比如:
0:002> ~0 g
- System 0: 2 of 3 threads are frozen
0:002> ~0 gSystem 0: 2 of 3 threads are frozen
windbg提示,3個線程中的兩個被凍結了,只有0號線程是運行狀態
p
p命令執行一條指令或者一行源碼,並且選擇性的顯示所有寄存器和標誌位的結果
這個比較好記,用過vs的都知道F10是單步調試(Step Over),這個的快速鍵就是F10
不介紹了,最常用的,