Visual Studio has a couple of great features for ensuring that it displays the correct source code when debugging. PTU needs to adopt both of these.
The firstfeature that VS hasis using a check-sum to determine whether a source file matches the one used to build a binary. The PDB sources the check-sum, the debugger calculates the check-sum and compares it, and this ensures that the user does not inadvertentlydebug usingstale source code. PTU uses an inferior algorithm. It checks to see if the date on the source file is later than the date on the binary. This can fail for all sorts of reasons. In my case I have retrieved the source from Perforce and got the binaries from the build machine. Therefore it is normal and expected that the source file date might be later than the binary date, so PTU refuses to use the *correct* source file.
The second feature that VS (and windbg) have is source indexing. Our build machine runs source indexing as a final build step and this means that our PDBs contain full Perforce version-control information. VS or windbg can invoke p4.exe to retrieve the correct source file. Therefore I can step through our code even if my enlistment doesn't match the source.
Since PTU supports neither of these features it means that I cannot run PTU on binaries created by our build machines. Supporting both features would be ideal. Supporting just *one* of the features would let me profile binaries from our build machines.