[cfe-dev] Missing debug information for Windows

Javier Múgica javier_3 at runbox.com
Fri Jun 19 00:22:09 PDT 2015


I am facing a critic problem with the compiler, which I hope will have an easy solution. I am using it on Windows and use Visual Studio to debug the applications. The information of which source lines correspond to which machine instructions is right and I can break into the code, execute one instruction at a time, etc. But all the information regarding the variables is missing, so I cannot know the values they store if not by guessing upon the assembly code where is stored each variable and asking VS to show me the value of, say, **(double**)(esp+01Ch).

I have tried both clang and clang-cl, and both -O0 and -O1, and both VS 2010 and VS 2015. I use clang with the -c option (do not link), and then call the VS linker, which is what clang does if the -c option is not used.

The Microsoft compiler generates an intermediate .pdb file when compiling and assemblying, named vc100.pdb (the name is of course irrelevant), and afterwards, when linking, the definite pdb file, foo.pdb for instance. When using clang the intermediate file is not generated.  May that be the reason or has it nothing to do with my problem?

Lest's hope you can help me, otherwise I will have to stop using clang just when I was beginning with it.

-- Javier

More information about the cfe-dev mailing list