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
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.
=================================================
The pseudo-registers $t0-$t19 are used as variables in your script. Instead
of using $n, please try this:
.for (r $t1=0; $t1 < ....
.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
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.