Clang Debugger
Xcode eclipse cdt4 codeblocks qt creator use the codeblocks generator kdevelop3.
Clang debugger. Generate debug info with external references to clang modules or precompiled headers. The clang project provides a language front end and tooling infrastructure for languages in the c language family c c objective cc opencl cuda and renderscript for the llvmproject. 1 clang g test01c o test01 the o flag is just to define the name of the compiled file which in this case is test01. Lldb is then often asked to look for type foo or namespace bar or list items in namespace baz.
For instance clang will not emit type definitions for types that are not needed by a module and could be replaced with a forward declaration. Cmake allows you to generate project files for several ides. For more details see building llvm with cmake page. This builds both llvm and clang for debug mode.
Both a gcc compatible compiler driver clang and an msvc compatible compiler driver clang clexe are provided. If you intend to use clangs c support you may need to tell it how to find. You can use visual studio 2019 version 162 with clang to edit build and debug c visual studio projects msbuild that target windows or linux. Namespaces are not included in the pubnames or pubtypes tables.
Lldb uses clang for its expression parsing where lldb acts as a pch. Further clang will only emit type info. These tables are also insufficient for what a debugger like lldb needs. Since clang asks a.
Lldb is the default debugger in xcode on macos and supports debugging c objective c and c on the desktop and ios devices and simulator. Clang supports a number of optimizations to reduce the size of debug information in the binary. Set additional properties edit build and debug you can use visual studio 2019 version 162 with clang to edit build and debug c visual studio projects msbuild that target windows or linux. For adding the debugger information to our compiled file we just need to add the g flag to the clang compiler.
For subsequent clang development you can just run make clang. It is built as a set of reusable components which highly leverage existing libraries in the larger llvm project such as the clang expression parser and llvm disassembler.