开发者

How to debug to assembly level with visual studio express?

I'm curious about how so开发者_开发技巧me features are implemented under the hood,like :

pEvent->WaitForCompletion(INFINITE, &evCode);

I tried to step into it but failed.

Is there a way to do that?


You don't say which actual version of Visual Studio, but I believe all versions contain the ability to set into disassembly of native code for which you do not have source.

However, default debugger options are often set to disable this kind of display. Check out the debugging options in Tools->Options and enable 'show disassembly if source is not available', disable 'just my code' and other similar options.

One caveat: It's quite possible that the core implementation of WaitForCompletion is in kernel mode code (especially if pEvent is a wrapper for a HANDLE created by CreateEvent). In this case you'll need a kernel debugger to step through the inner workings.

Martyn


If you would like to debug in pure assembler I have better tool for you - OllyDbg http://www.ollydbg.de/. Load the executable file with it, then find all calls of WaitForCompletion (RMB on assembler view -> Search For -> Names -> Select "WaitForCompletion" -> RMB -> Find References). Then create breakpoints on all occurrences and run executable. Debugger should stop on one of breakpoint and you can step into your function.

Happy reverse-engineering.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜