Mismatched PDBs --- Why?

If you are developing software, most likely you have encountered the "mismatched pdbs" debugger error. It usually happens when you point the debugger to the wrong symbol path.

But there are times you are confident that the symbols you point to are the correct symbols, and it left you wondering why the debugger believes the symbols do not match.

" !sym noisy" will tell you how the windows debugger searches for symbols, and report mismatched pdbs when encountered, but it does not tell you why the symbols do not match.

The answer is in a debugger extension !itoldyouso.

0:000> !itoldyouso

!IToldYouSo <module> [symbol]

!IToldYouSo tests the validity of a module against a symbol file.
The module can be specified by either its name or base address.
If a symbol file is not specified, then the loaded symbol is tested.
Otherwise, if a pdb or dbg symbol file path is specified, it is tested
against the loaded module.

0:000> !itoldyouso foo c:\temp\foo.pdb

C:\temp\foo.dll
Timestamp: 4549BCD2
SizeOfImage: BF000
pdb: foo.pdb
pdb sig: 18D24151-2AA3-4917-9980-58CB02F5E5F9
age: 2

foo.pdb
pdb sig: 18D24151-2AA3-4917-9980-58CB02F5E5F9
age: 2

MATCH: foo.pdb and C:\temp\foo.dll

0:000> !itoldyouso foo c:\temp\foo1.pdb

C:\temp\foo.dll
Timestamp: 4549BCD2
SizeOfImage: BF000
pdb: foo.pdb
pdb sig: 18D24151-2AA3-4917-9980-58CB02F5E5F9
age: 2

foo.pdb
pdb sig: 4B81E62F-84A3-4864-8ADF-8AD0F9EFEEDB
age: 2

MISMATCH: foo.pdb and C:\temp\foo.dll

Comments

  • Anonymous
    November 05, 2007
    The comment has been removed

  • Anonymous
    November 06, 2007
    Sorry, my second question needs a correction.  Is there an itoldyouso to find why the .cpp file doesn't match the .dll that resulted from compiling that .cpp and is now being executed?

  • Anonymous
    November 06, 2007
    The first question: It is a copy&paste error:) The second question: No I don't know. I am one of those guys that don't use VS.

  • Anonymous
    January 17, 2008
    BTW, what is the story behind the name !IToldYouSo?

  • Anonymous
    January 18, 2008
    I have no idea.