Message 3 of 4
29 Oct 09 13:36
Posts To This List: 504
Dump Structure Type
There may be a windbg command/metacommand/(existing) extension command, but I
don't know of one.
What I usually do is define the type and create an instance of it in a source
file and compile it, specifying the name of the existing pdb for the module in
question (crypt32, in your case). This will update the pdb.
typedef struct _TYPE1 TYPE1;
cl -c -Zi -Fd -Tc
Creating an instance of the type is important, as it won't appear in the pdb (as
I recall) without doing so.
You then to tell windbg to force the load by making sure that you're pdb appears
in the sympath ahead of the unmodified one
.reload -f -i =
where module.ext would be 'crypt32.dll' (for example), and would
be whatever 'lm m crypt32' reports.
The '-i' tells windbg to ignore any mismatched symbol errors, and the '-f' tells
it to load the symbols immediately, rather than wait until first use (though I
think '-i' implies '-f' anyway).
For your immediate purposes - using 'dt' or thereabouts - you could just define
the type in any module that you will be loading during your kd session. It's
quicker, but it doesn't help if there are extensions that are failing because of
a missing type that expect to find in a specific module. It might be possible
to workaround this by enabling the most permissive form of symbol resolution,
but I've never tried that, as it tends to make windbg disappear for long
stretches at a time if you mistype something.