Windbg.for loop

I'm having trouble getting the WinDbg.for command.

I would like to dump an array of C ++ structures.

?? gpTranData->mpApplCodes[0] ?? gpTranData->mpApplCodes[0] works for a single entry, but I would like to skip n of them.

 .for ($t0=0;$t0<(gpTranData->miApplCodeCount);$t0++){ ?? &gpTranData->mpApplCodes[$t0] } 

sound logical to me but i get

 Numeric expression missing from '>miApplCodeCount);$t0++){ ?? &gpTranData->m_pApplCodes[$t0] }' 

Any ideas?

Scott

+4
source share
2 answers

You cannot use C ++ operators to change pseudo-register values โ€‹โ€‹of l in Windbg. Instead, you can use r $ t0 = @ $ t0 + 1 . This will work the way you want:

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

I assume that the masm analyst has no data on your input gpTranData->miApplCodeCount . Wrap your expression with @@ C ++ () or @@ ().

0
source

All Articles