Break at n-th Iteration

In WinDBG, there is a concept that until now, I haven’t put it into use. This concept is called “break at n-th iteration”.

It means that certain break point is to be break after nth encounter.

I never used it until I am encountering the unavoidable situation in certain debugging session.

In the above mentioned debugging session, I am doing the debugging traces of accHitTest in the accessibility framework implementation. Using pa command, I found that this routine in oleacc.dll is called several times, and I want to examine the returned variant value at each iteration.

On superficial consideration, I think I can done it manually by breaking at this point, and re-enter this break point using the “g” command. But alas, I can only doing it for first iteration only. The second one etc will yield the garbage value, i.e. value that I am not intending to examine.

Why ? Because on second iteration, the screen that I will perform accHitTest against is the debugger window screen ! Not the application’s window screen that I am currently inspecting.

So, the break at nth iteration should resolve this situation.

The syntax for this form of break point is :

bp address n

The n value can be 1, 2, 3, etc for first, second, third iteration etc. This is called “passes” in WinDBG terminology.

Advertisements

One Response to “Break at n-th Iteration”

  1. Mike Says:

    Just passing by.Btw, your website have great content!

    _________________________________
    Making Money $150 An Hour

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: