WinDbg: How do I programmatically parse output from `dt`?
<p>The WinDbg <code>dt</code> command is very useful for displaying type information, and I commonly use <code>dt -a &lt;memory-address&gt; &lt;type&gt;</code> to output type information for an array of elements.</p>

<p>How do I programmatically manipulate the values output by <code>dt</code>?  Specifically, for each element in the array, I'd like to output the bit shifted value of each element in the array (<code>??(array-element)&gt;&gt;1</code> for each value in the array).  I've tried this for an array of 100 elements (with an example array memory address of 0xDEADBEEF, with datatype MY_TYPE):</p>

<pre><code>.for (r $t0=0; @$t0&lt;0n100; r $t0=@$t0+1) { ??(dt 0xDEADBEEF)+(@@c++(sizeof(MY_TYPE))*@$t0) MY_TYPE)&gt;&gt;1 }
</code></pre>

<p>Essentially, for each element in the array, I'd like to print the output of <code>dt</code>, with the numerical value shifted by 1.</p>