首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian英文资料 >> Tips Tricks >> 正文
How to view all descriptor types (and others) in VC6 debugger
作者:佚名    文章来源:不详    更新时间:2006-5-7 11:27:50

While CodeWarrior and/or Borland have now become Symbians IDE’s of choice, there are still some stubborn people (myself included!) that simply prefer MSDEV for development.

Though MSDEV is fine, it lacks the ability to display Descriptors, which can be a pain. A workaround is presented here, however this method also has a limitation.

The method presented above works fine for the concrete descriptor types, TBuf etc, but will only display the length when using the base classes, TDes or TDesC.

Viewing TDes and other descriptors

Using a little MSDEV knowledge we can overcome this by creating an addon DLL to display descriptor data. The DLL, ShowDes.dll (attached), must first be copied to :

\Microsoft Visual Studio\Common\MSDev98\Bin\

Next, we modify AUTOEXP.DAT to use this DLL. This change should be added in the [AutoExpand] section:


TDesC16=$ADDIN(ShowDes.dll,TDesC16_View)
TDesC8=$ADDIN(ShowDes.dll,TDesC8_View)

Once done, restart MSDEV for the changes to take effect.

This instructs MSDEV to call the TDesC16_View export of ShowDes.dll when viewing a TDesC16 or TDesC8_View when viewing a TDesC8. TDesC16_View and TDesC8_View extract the data, and return it to the debugger. This will correctly display both concreate (TBuf etc) and abstract (TDes/TDesC) descriptors in the debugger, along with their current length and max legnth (if they are non-constant).

Viewing Basic Symbian OS Structure

While we are modifying AutoExp.dat, we can add some other lines to aid Symbian Debugging - again, in the [AutoExpand] section:


TInt64 =low=<iLow> high=<iHigh>
TDateTime =day(zero based)=<iDay> mth=<iMonth> yr=<iYear> hr=<iHour> min=<iMinute> sec=<iSecond>.<iMicroSecond>
CActive= iIsActive=<iActive>
CArrayFixBase= iCount=<iCount>
CArrayVarBase= iCount=<iCount>
CBase= <,t>
RHandleBase= <iHandle,x> <,t>
RRegion= Rects=<iCount> Err=<iError> iTl.iX=<iRectangleList->iTl.iX> iTl.iY=<iRectangleList->iTl.iY> iBr.iX=<iRectangleList->iBr.iX> iBr.iY=<iRectangleList->iBr.iY>
TChar=<iChar> <iChar,c>
TLex8= iNext=<iNext,s>
TLex16= iNext=<iNext,su>
TPoint= iX=<iX> iY=<iY>
TRect= iTl.iX=<iTl.iX> iTl.iY=<iTl.iY> iBr.iX=<iBr.iX> iBr.iY=<iBr.iY>
TRegion= numRects=<iCount> Err=<iError>
TRequestStatus= <iStatus>
TSize= iWidth=<iWidth> iHeight=<iHeight>
TTime= iLow=<iTime.iLow,x> iHigh=<iTime.iHigh,x>
TTimeIntervalBase= <iInterval,d> <,t>
TUid= iUid=<iUid>
TStreamId= iVal=<iVal>
TMargins= iLeft=<iLeft> iRight=<iRight> iTop=<iTop> iBottom=<iBottom>
TPageSpec= iOrientation=<iOrientation>
TRgb= R=<iValue&0xff> G=<iValue/256%256)> B=<iValue/65536>
TPointerEvent=iType=<iType>, iPos.iX=<iPosition.iX>, iPos.iY=<iPosition.iY>
TCellRef=iRow=<iRow>, iCol=<iCol>
TRangeRef=iFrom.iRow=<iFrom.iRow>, iFrom.iCol=<iFrom.iCol>, iTo.iRow=<iTo.iRow>, iTo.iCol=<iTo.iCol>
CCoeControl= iPosition=(<iPosition.iX>,<iPosition.iY>) iSize=(<iSize.iWidth>,<iSize.iHeight>)

These expand several Symbian clases in the debugger automatically. The result:

No step in TRAP macros

Finally, we can avoid the annoying way MSDEV steps into TRAP macros:


[ExecutionControl]
TTrap::*=NoStepInto

Adding this line prevents stepping into any method from TTrap - including TTrap::Trap used for TRAP(D).

Download

DesView DLL
DLL for viewing descriptors from MSDEV
相关文章:
Cmo ver todos los tipos de descriptores (y otras estructuras) en el depurador de VC6
Using the View Server - Advanced features
How to  view all descriptor types (and others) in VC6 debugger
Cmo ver todos los tipos de descriptores (y otras estructuras) en el depurador de VC6
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号