1. 程式人生 > >Pseudo Registers

Pseudo Registers

 

Pseudoregister

Description

@ERR

Last error value; the same value returned by the GetLastError() API function

@TIB

Thread information block for the current thread; necessary because the debugger doesn't handle the "FS:0" format

@CLK

Undocumented clock register; usable only in the Watch window

@EAX, @EBX, @ECX, @EDX, @ESI, @EDI, @EIP, @ESP, @EBP, @EFL

Intel CPU registers

@CS, @DS, @ES, @SS, @FS, @GS

Intel CPU segment registers

@ST0, @ST1, @ST2, @ST3, @ST4, @ST5, @ST6, @ST7

Intel CPU floating-point registers


@ERR
最後錯誤值; 和GetLastError() API 函式一致

@TIB
當前執行緒資訊; 在偵錯程式無法處理”FS:0”格式的時候是必要的

@CLK
未列入文件的時鐘暫存器; 只是在Watch視窗適用

@EAX, @EBX, @ECX, @EDX, @ESI, @EDI, @EIP, @ESP, @EBP, @EFL
Intel CPU 暫存器

@CS, @DS, @ES, @SS, @FS, @GS
Intel CPU 段暫存器

@ST0, @ST1, @ST2, @ST3, @ST4, @ST5, @ST6, @ST7


Intel CPU 浮點暫存器

其中@TIB很有用,可以用在多執行緒除錯的時候作為斷點的條件變數.這樣就可以只觀察一個執行緒的執行情況.
另一個常用的@err,hr


(X64 Debugging With Pseudo Variables And Format Specifiers)
Pseudo Variable Description
$handles Number of handles to kernel objects
$vframe Current stack frame address
$TID Current thread identifier
$registername Contents of specified register
$clk Time in clock cycles
$user Process and thread token information


Specifier Description
D Decimal
U Unsigned decimal
O Octal
X Hexadecimal
F Floating point
E Scientific notation
C Character
S Character string
Su Unicode string
s8 UTF-8 string
Hr HRESULT or Win32 error code
wc Windows class
wm Windows message
! Raw format