Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>According which criteria would you like to limit the number of outputs? The -l option just limits the output according to line numbers. This is useless: let's say it shows only the first 10 objects, maybe the object you're looking for is not even listed.</p> <p>If the output is too long for WinDbgs output window, use .logopen to dump the objects into a file and then review the file with a text editor.</p> <p>If you have other ideas how your object looks like, you can perform a loop over all objects</p> <pre><code>.foreach ( obj { !dumpheap -short -type MyType} ) </code></pre> <p>and then decide with <code>.if</code> whether or not your object matches this criteria.</p> <p>As an example, I was looking for a needle in a haystack. I was searching a specific Hashtable in a program with more than 3000 Hashtables on the heap. The command I tried to use was</p> <pre><code>.foreach ( obj { !dumpheap -short -type Hashtable }) {.if (poi(poi(${obj}+1c)) &gt; 100) {!do ${obj}} } </code></pre> <p><code>1C</code> is the offset of the count member of the hashtable.</p> <p><code>100</code> is the number of items the Hashtable was expected to have at least.</p> <p>Unfortunately it didn't work for Hashtables immediately, because <code>!dumpheap -type</code> also listed HashtableEnumerators which somehow crashed the debugger.</p> <p>To dump hashtables only, run <code>!dumpheap -stat</code> and figure out the method table of hashtables and run the command with <code>-mt &lt;methodtable&gt;</code> instead of <code>-type &lt;classname&gt;</code>, which gives</p> <pre><code>.foreach ( obj { !dumpheap -short -mt &lt;MT of Hashtable&gt; }) {.if (poi(poi(${obj}+1c)) &gt; 100) {!do ${obj}} } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload