22

Is there any tool to check if a DLL and PDB match? I need to debug a process and I can't afford to use the wrong PDB and start the process all over again.

Prabhu
  • 3,434
  • 8
  • 40
  • 48
  • The Windows debuggers (VS and windbg) will check whether the DLL and PDB match and will refuse to load a mismatched PDB. Therefore this is a non-issue. – Bruce Dawson Mar 04 '19 at 19:09

4 Answers4

19

Found that chkmatch tool can find this.Check this out..

Prabhu
  • 3,434
  • 8
  • 40
  • 48
  • this tool looks outdated – denfromufa Jul 02 '14 at 12:09
  • 4
    @denfromufa - can you expand your comment to indicate what you mean - why will this tool not perform the function given. Saying it's outdated doesn't tell us what is wrong. – Preet Sangha Jul 02 '14 at 21:45
  • 2
    ChkMatch has not been updated since 2004. This is not in itself bad, but it has a serious bug which causes it to report PDB mismatches when there is no mismatch. The problem is that there are two "ages" stored in the PDB and ChkMatch checks the wrong one. This usually works (which is why the tool shipped with this bug) but if a PDB has been source indexed then a mismatch will be reported, even though there is no mismatch. See this comment on my blog for details: https://randomascii.wordpress.com/2011/11/11/source-indexing-is-underused-awesomeness/#comment-34328 – Bruce Dawson Mar 04 '19 at 19:08
6

This is a good article describing tool symchk.exe:

You can use WINPDB for this: turn on symbol diagnostic messages, then reload your symbols:

!sym noisy
.reload -f your.dll

the output shows which PDB file locations are being tried, and there will be a warning if there is a mismatch

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
denfromufa
  • 5,610
  • 13
  • 81
  • 138
2

There is a MSDN sample tool called DIA2Dump that should be able to dump out the contents of a PDB. You should be able to use this construct script that determines the correct source location.

Or you could set up your own source server to handle this.

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
1

I needed the same kind of tool and I decided to write my own. DebugSignaturesComparer

There's both CLI and GUI version available.

mcjmzn
  • 353
  • 6
  • 13