It is not a few months since I started using MS Visual C++ 6.0 IDE for source-level debugging of my project. I was very satisfied with this choice.

One day I made some changes in my project and started MSVC up again, but the source lines was getting out of synchronization soon.
The main file was synchronized well, but the very first instruction in the first call to one of main procedures, located in another module, was already out of synchronization. Additionally, the very first instruction of the procedure is located in included file. On the other side, MSVC switched to correct source file for the procedure, but not to correct included file. The line number was also correct.

I pressed Ctrl-F11 to go to disassembly, but I got "Resolve Source Line Ambiguity" dialog instead, which I never saw before (see picture). Too bad, there was list of many of subprocedures used in the procedure but the included file was missing.



I created charasteristic sample project, but I couldn't replicate my problem - it only shows the mentioned project structure. Since attachments are not allowed here, please download it here - http://www.webpark.cz/mazegen/ResolveSourceLineAmbiguity.zip (14 KB; if the link is forbidded on this server, copy&paste it in new window/panel).

How to solve it? Anybody got similar problem before?
Posted on 2005-01-09 04:33:45 by MazeGen
It can happen when a file is modified but not recompiled. Did you set up the dependencies between the files in the "Additional Dependencies" panel ?
Posted on 2005-01-09 11:04:24 by Dr. Manhattan
Hi Manhattan,
I know what you mean, but I always use "Rebuild all", so all modules get recompiled.

News:
I've tried to open last version of the project, where I haven't had any problems. When I debug the original executable, it is synchronized well, but when I rebuild whole project, I get the same problem! :!:
I remember I made some minor changes in compiling parameters of the modules (I can't remember exactly what), but they seem to be definitely correct.

I've also tried last stable version of WinDbg and there is the same problem :?
Posted on 2005-01-09 16:24:13 by MazeGen
I don't have VS 6 installed and VS 2005 beta crashes when it convert the DSP (do you want me to report it to MS ?)

I'm reading this document to try to understand the format of the debugging information and see if there is a problem in the obj file.
Posted on 2005-01-10 13:52:27 by Dr. Manhattan
I don't have VS 6 installed and VS 2005 beta crashes when it convert the DSP (do you want me to report it to MS ?)

What is "DSP"?

It was high time to download VS 2005 beta, I have done it just now (using link you provided :)). I'll see whether there is the same problem, but I guess so, since it is present in WinDbg too.

I'm reading this document to try to understand the format of the debugging information and see if there is a problem in the obj file.

Very interesting, but somewhat long and complex.
You're right there has to be some problem in debugging informations (as it is present in both MSVC nad WinDbg). I'm going to do some changes in my project :sweat: and if there will be some progress I'll let you know.

Thanks for your effort, Manhattan. :)
Posted on 2005-01-10 15:48:59 by MazeGen
VS6 uses .dsw (workspace) and .dsp (project) files - vs.net uses .sln (solution) and .vcproj (visual c++ projects).
Posted on 2005-01-10 16:12:55 by f0dder
Oh I got it, thanks f0dder.

do you want me to report it to MS ?

Yea please report it, I won't report it at the moment as I don't own VS2005b yet.
Posted on 2005-01-10 16:44:00 by MazeGen
:sweat:

It was some bug (I cannot replicate it) in MS linker. I tried both 5.012.8078.0 and 6.00.8168.0, finally 8.00.40607.16 works (from VS 2005 beta 1).
Posted on 2005-01-14 12:22:56 by MazeGen