[cfe-dev] Missing debug information for Windows
David Blaikie
dblaikie at gmail.com
Fri Jun 19 10:32:22 PDT 2015
On Fri, Jun 19, 2015 at 12:22 AM, Javier Múgica <javier_3 at runbox.com> wrote:
> Hello:
>
> 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?
>
That's the reason, but there is no easy solution - Clang does not generate
PDB files at the moment. The debug story on windows is still uncertain and
a fair way out - it may entail integrating something like LLDB into MSVC to
use the existing DWARF debug info Clang can produce.
For now you could use LLDB directly on windows, though I think support
there is still work-in-progress too.
Sorry,
- David
>
> Lest's hope you can help me, otherwise I will have to stop using clang
> just when I was beginning with it.
>
> -- Javier
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150619/d47d928e/attachment.html>
More information about the cfe-dev
mailing list