在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>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章