在vc调试s60应用的时候的时候显示symbian字符串的内容

How to display Symbian strings and descriptors in Visual C++ debugger

如何在vc里面显示symbian字符串

Currently, using Visual Studio is a little bit painful when you deal with descriptor since you cannot directly display their content (you have to use the memory window). Here is a little trick that will allow you to display clear content of Symbian descriptors.

目前使用vc时有点痛苦,那就时当你和描述符打交道的时候,不能够直接显示描述符的内容(你必须使用内存窗口来查看)。这里有一个小技巧可以让你清楚的看到描述符内容。

For this, you will have to take benefit of a feature of Microsoft Visual Studio called "Auto Expand". It allows the debugger to specify rules to display the content of custom data. This feature can be configured manually by editing the AutoExp.dat file which is located by default in C:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin)

你必须了解一个vc的自动扩展方面的特性,它允许定义调试器显示特殊的用户定义的数据的内容。这个特性可以在C:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin下面的autoexp.dat 里面配置。

Open this file in your favorite text editor, copy/paste the following text at the end of it:

用你喜欢的文本编辑器打开这个文件,将下面这段文本加到后面:

Re-start the environment, put a breakpoint or two, start the debugger, and here you are....

重启vc,设置一两个断点,按F5来调试一下吧,你会看到像下面这样的显示

desc-display.png

Isn't it nice ?

爽不爽?

;=======================================================
;
; Symbian Strings & Descriptors
;
;=======================================================
TDes16=<,t> length=<iLength> max=<iMaxLength>
TDesC16=<,t> length=<iLength>
TPtr=length=<iLength> max=<iMaxLength> ptr=<iPtr+2,su>
TPtr16=length=<iLength> max=<iMaxLength> ptr=<iPtr+2,su>
TPtrC=length=<iLength> ptr=<iPtr,su>
TPtrC16=length=<iLength> ptr=<iPtr,su>
TBuf<*>=length=<iLength> max=<iMaxLength> buf=<iBuf,su>
TBufC<*>=length=<iLength> buffer=<iBuf,su>
HBufC16=length=<iLength> buffer=<iBuf,su>
TLitC<*>=length=<iTypeLength> buf=<iBuf,su>

TDes8=<,t> length=<iLength> max=<iMaxLength>
TDesC8=<,t> length=<iLength>
TPtr8=length=<iLength> max=<iMaxLength> ptr=<iPtr,s>
TPtrC8=length=<iLength> ptr=<iPtr,s>
TBuf8<*>=length=<iLength> max=<iMaxLength> buffer=<iBuf,s>
TBufC8<*>=length=<iLength> buffer=<iBuf,s>
HBufC8=length=<iLength> buffer=<iBuf,su>
TLitC8<*>=length=<iTypeLength> buffer=<iBuf,s>

TFileName= <iBuf,su>
TFullName= <iBuf,su>

猜你喜欢

转载自blog.csdn.net/windcao/article/details/1633752