Rebuild produces .pdb and .exe that don't match
-
Tuesday, November 15, 2005 11:11 PMOccasionally, after I build and run my large VS2005 project, I get an error dialog that says:
No Debugging Information
Debugging information for 'myapp.exe' cannot be found or does not match. No symbols loaded. Do you want to continue debugging? [Yes/No]
This is right after a rebuild. The .pdb file does exist. Deleting the .pdb and relinking does not generally fix the problem. Rebuilding the .exe project occasionally does fix the problem, but not always. If I open the "Modules" view, I see that all my DLL projects loaded symbols successfully. I can right-click my .exe and try to navigate to the .pdb to open it, but I just get "The symbols file does not match the module" again.
Could I be producing a corrupt .obj file somewhere? Is there a way to inspect PDB file structures similar to dumpbin for .exe/.dlls? I'm just looking for hints on how to track down the source of the inconsistency.
All Replies
-
Wednesday, November 16, 2005 1:25 AM
If the PDB file exists and it is next to the executable that doen't mean it is matching the executable. It rather depends on your project settings and where the things that get build end up. Look at the project properties, "Linker->Command Line" in the "All options:" window, in that large number of linker options there should be a "/PDB:" option that tells you exactly where the PDB will be created. You can also overwrite that from the Debugging option just to make sure of the location and that nobody else overwrites it.
If you still want a PDB dumper, in the DIA SDK folder there should be a sample that dumps the content of a PDB. Just compile it and run it against a PDB file or it's corresponding EXE. -
Thursday, November 17, 2005 12:49 AMI should have been clearer -- the PDB file is being generated in the correct place. Most of the time it works, but occasionally I'll get this "doesn't match" message.
Quitting Visual Studio, killing any stray devenv.exe and mspdbsrv.exe processes, deleting the .pdb and .exe, and relinking seems to reliably fix the problem.
Thanks for the pointer to the DIA SDK, that's exactly the sort of thing I was asking for. -
Monday, January 30, 2006 8:48 AM
Hello,
I have the same problem.
My program name is SvcTracing. When I build I got the following files:
- SvcTracing.exe
- SvcTracing.pdb
However in the output debug window I have the message:
'SvcTracing.exe': Loaded '\\Svr-be\Cesa\Affaire\4701\Informatique\Sources\Tracing\debug\SvcTracing.exe再', No symbols loaded.
As you can see two strange caracters are addeded to the executable name, so no symbols are found. It looks like a buffer overrun.
I use Visual Studio 2005 Professional shipped with MSDN December 2005.
Edit: more info
Actually my project name is 'Service'. In project setting -> Linker -> General -> Output name I set $(OutputDir)\SvcTracing.exe
If i set the default param $(OutputDir)\$(ProjectName).exe I don't have the bug:
'Service.exe': Loaded '\\Svr-be\Cesa\Affaire\4701\Informatique\Sources\Tracing\debug\Service.exe', Symbols loaded.
I hope it can help to correct the problem.
-
Monday, January 30, 2006 10:27 PM
I notice you are building on a network share. Can you try to build on the local machine and see if you get the same problem?
Thanks.
-
Thursday, February 02, 2006 10:29 AMIndeed if I build on the local machine I don't get the problem.
-
Thursday, February 02, 2006 6:12 PM
You seem to be hitting a bug. Can you log one at: http://msdn.microsoft.com/productfeedback?
This will allow you to track our progress on the bug as well as have a direct communication channel with the developer who will be working on your bug.
Thanks.

