vc调试窗口表达式格式化资料

本文介绍了调试器中使用的各种格式规范,包括整数、浮点数、字符、字符串等类型的格式化方式,以及内存地址的显示格式。此外还提供了指针作为数组时的长度指定方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

摘自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

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值