Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WinDbg Loop in ADPlus command file

24 views
Skip to first unread message

Scott

unread,
Nov 13, 2009, 9:29:02 AM11/13/09
to
When creating a -hang dump from ADPlus I try to format some of the
application critical areas so we can get an idea what went wrong without
downloading the full dmp file.

So I am trying to dump an array of structures (cpp) and I just can't get the
syntax correct

0:000> .for ($n=0; $n<g_pTranData->m_nMakeCodes; $n++){ ??
&g_pTranData->m_pMakeCodeTable[$n] }
Couldn't resolve error at '$n<g_pTranData->m_nMakeCodes; $n++){ ??
&g_pTranData->m_pMakeCodeTable[$n] }'

I am guessing the type of $n is not correct but the windbg documentation
only says "InitialCommand" and gives an example of using .for with a register.

So can someone give me a example for this type of output.


--
Scott Norberg

Jialiang Ge [MSFT]

unread,
Nov 16, 2009, 8:31:23 AM11/16/09
to
Hello Scott

I'm performing researches on this issue, and will update you as soon as
possible.

Regards,
Jialiang Ge
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Jialiang Ge [MSFT]

unread,
Nov 18, 2009, 7:19:31 AM11/18/09
to
Hello

The pseudo-registers $t0-$t19 are used as variables in your script. Instead
of using $n, please try this:

.for (r $t1=0; $t1 < ....

Scott

unread,
Nov 18, 2009, 11:07:03 AM11/18/09
to
Changing to the following statement sort of runs:

.for (r $t0=0;@$t0<@@c++(g_pTranData->m_iApplCodeCount);@$t0++){ ??
&g_pTranData->m_pApplCodes[@$t0] }

BUT does NOT increment $t0, so the first entry is just displayed over and
over. Very slow, so I don't know if it stops at the right number of
iterations.


--
Scott Norberg

Jialiang Ge [MSFT]

unread,
Nov 23, 2009, 1:22:55 AM11/23/09
to
Hello Scott

When you set a value to the register, you need to use 'r'. I modify your
script to:

.for (r $t0=0; $t0 < @@c++(g_pTranData->m_iApplCodeCount); r $t0=$t0+1) {
.. }

Pay attention to 'r' in:

r $t0=$t0+1

If you have any other questions, please feel free to tell me.

0 new messages