摘自msdn,列在这里方便查阅。
The following tables show the format specifiers recognized by the debugger.
Specifier | Format | Expression | Value Displayed |
d,i | signed decimal integer | 0xF000F065, d | -268373915 |
u | unsigned decimal integer | 0x0065, u | 101 |
o | unsigned octal integer | 0xF065, o | 0170145 |
x,X | Hexadecimal integer | 61541, x | 0x0000f065 |
l,h | long or short prefix for: d, i, u, o, x, X | 00406042,hx | 0x0c22 |
f | signed floating point | (3./2.), f | 1.500000 |
e | signed scientific notation | (3./2.), e | 1.500000e+000 |
g | signed floating point or signed scientific notation, whichever is shorter | (3./2.), g | 1.5 |
c | Single character | 0x0065, c | 101 'e' |
s | String | 0x0012fde8, s | "Hello world" |
su | Unicode string | 0x0012fde8, su | "Hello world" |
s8 | UTF-8 string | 0x0012fde8, s8 | "Hello world" |
hr | HRESULT or Win32 error code. (The debugger now decodes HRESULTs automatically, so this specifier is not required in those cases. | 0x00000000L, hr | S_OK |
wc | Window class flag. | 0x00000040, wc | WC_DEFAULTCHAR |
wm | Windows message numbers | 0x0010, wm | WM_CLOSE |
! | raw format, ignoring any data type views customizations | i ! | 4 |
The following table contains formatting symbols used for memory locations. You can use a memory location specifier with any value or expression that evaluates to a location.
Symbol | Format | Expression | Value Displayed |
ma | 64 ASCII characters | ptr, ma | 0x0012ffac .4...0...".0W&.......1W&.0.:W..1...."..1.JO&.1.2.."..1...0y....1 |
m | 16 bytes in hexadecimal, followed by 16 ASCII characters | ptr, m | 0x0012ffac B3 34 CB 00 84 30 94 80 FF 22 8A 30 57 26 00 00 .4...0...".0W&.. |
mb | 16 bytes in hexadecimal, followed by 16 ASCII characters | ptr, mb | 0x0012ffac B3 34 CB 00 84 30 94 80 FF 22 8A 30 57 26 00 00 .4...0...".0W&.. |
mw | 8 words | ptr, mw | 0x0012ffac 34B3 00CB 3084 8094 22FF 308A 2657 0000 |
md | 4 doublewords | ptr, md | 0x0012ffac 00CB34B3 80943084 308A22FF 00002657 |
mq | 2 quadwords | ptr, mq | 0x0012ffac 7ffdf00000000000 5f441a790012fdd4 |
mu | 2-byte characters (Unicode) | ptr, mu | 0x0012fc60 8478 77f4 ffff ffff 0000 0000 0000 0000 |
Size Specifier for Pointers as Arrays
If you have a pointer to an object you want to view as an array, you can use an integer to specify the number of array elements:
ptr,10