John Eldridge : Windows CE Debugging

KITL First. Ask Questions Later.

Finding functions in watch window

One of the elements of the Windows CE debugger that I use everyday, but have found to be not that well-known, is the ability to look at global variables and functions in any named DLL or EXE. Doesn't have to be in the currently stopped location. For instance, break into the debugger, and add a watch in the watch window named...

    {,,coredll.dll} LocalAlloc

This says to resolve the name "LocalAlloc" in the context of the module "COREDLL.DLL". You should see something like...

    0x03f9a4f4 LocalAlloc(unsigned int, unsigned int)

Which means that the LocalAlloc() function lives at 0x03f9a4f4.  That alone has limited usefulness. But now the really cool part... click on the result (Value Column) and drag it into the disassembly window.  Now the disassembly window shows the assembly for the LocalAlloc function. 

Want the source instead? Now right-click in the disassembly window and choose "Go To Source". If you didn't compile the code yourself for the function you are looking at, it may ask you to input the path. I actually use this trick a lot just to let the debugger tell me where source code lives for certain functions that I'm not familiar with.

Did I mention that you don't get this functionality without implementing KITL?   :-)

Published Saturday, January 29, 2005 2:20 AM by kitlfirst

Comments

No Comments
New Comments to this post are disabled

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker