CLang libc, libc++ on Windows with debugging symbols compatible with Visual Studio

老子叫甜甜 提交于 2020-01-01 14:20:18

问题


I'm trying to find info and I don't see it on clang web site. I'm thinking to try to use it on windows, but I have no clue if it has it's own libc or it uses broken libc from MS?

another question: if i compile code with clang, will I be able to use visual studio as a debugger, e.g. is clang capable of emitting debugging symbols in MS format (this is the reason I don't want to use gcc; and this is something that intel compiler can do, but it uses MS's libc).

In short, I'd like to be able to use visual studio as a debugger, but I need at the same time decent real c compiler with normal lib c.

or, perhaps, there are commercial alternatives. I've read that dinkum sells commercial libc for Win32 and others, but I have no clue what's the price and how to get it.


回答1:


You have asked two completely different questions. I will answer the one about using Visual Studio as a debugger.

This is not currently possible. Microsoft has not released any documentation or code necessary to produce files in their PDB format, which is what Visual Studio consumes. There has been some reverse engineering efforts, but results of those have not yet made their way into general Open Source tools.

Neither GCC nor Clang are capable of producing PDB files, and hence do not work with Microsoft's debugger. Some of the commercial compilers have support for generating or consuming PDB, but not the Free/Open compilers like GCC and Clang.

You can use other IDEs on Windows which support the DWARF debugging format, used by GCC and Clang. Such compilers include Code::Blocks and Eclipse CDT.



来源:https://stackoverflow.com/questions/12048312/clang-libc-libc-on-windows-with-debugging-symbols-compatible-with-visual-stud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!