Welcome to MSDN Blogs Sign in | Join | Help

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

Published Monday, November 05, 2007 8:00 AM by junfeng
Filed under:

Comments

# re: Mismatched PDBs --- Why?

Monday, November 05, 2007 9:17 PM by Norman Diamond

Question 1.

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

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

Why isn't it MISMATCH: foo1.pdb and C:\temp\foo.dll?

Question 2.

When Visual Studio 2005's debugger says there's a mismatch between the .cpp file that it just finished compiling and the .cpp file where the user tried to set a breakpoint, is there an itoldyouso to find why the .cpp file doesn't match itself?

# re: Mismatched PDBs --- Why?

Tuesday, November 06, 2007 7:10 PM by Norman Diamond

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?

# re: Mismatched PDBs --- Why?

Tuesday, November 06, 2007 7:31 PM by junfeng

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.

# re: Mismatched PDBs --- Why?

Friday, January 18, 2008 3:06 AM by Yuhong Bao

BTW, what is the story behind the name !IToldYouSo?

# re: Mismatched PDBs --- Why?

Friday, January 18, 2008 6:56 PM by junfeng

I have no idea.

New Comments to this post are disabled
 
Page view tracker