1//===--- DebugOptions.def - Debug option database ----------------- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// This file defines debug-specific codegen options. Users of this file 10// must define the CODEGENOPT macro to make use of this information. 11// Optionally, the user may also define DEBUGOPT (for flags), ENUM_DEBUGOPT (for 12// options that have enumeration type), and VALUE_DEBUGOPT (is a debug option 13// that describes a value rather than a flag). 14// 15//===----------------------------------------------------------------------===// 16#ifndef DEBUGOPT 17#define DEBUGOPT(Name, Bits, Default, Compatibility) \ 18CODEGENOPT(Name, Bits, Default, Compatibility) 19#endif 20 21#ifndef VALUE_DEBUGOPT 22# define VALUE_DEBUGOPT(Name, Bits, Default, Compatibility) \ 23VALUE_CODEGENOPT(Name, Bits, Default, Compatibility) 24#endif 25 26#ifndef ENUM_DEBUGOPT 27# define ENUM_DEBUGOPT(Name, Type, Bits, Default, Compatibility) \ 28ENUM_CODEGENOPT(Name, Type, Bits, Default, Compatibility) 29#endif 30 31ENUM_DEBUGOPT(CompressDebugSections, llvm::DebugCompressionType, 2, 32 llvm::DebugCompressionType::None, Benign) 33DEBUGOPT(Dwarf64, 1, 0, Affecting) ///< -gdwarf64. 34DEBUGOPT(EnableDIPreservationVerify, 1, 0, Benign) ///< Enable di preservation 35 ///< verify each (it means 36 ///< check the original debug 37 ///< info metadata 38 ///< preservation). 39DEBUGOPT(ForceDwarfFrameSection , 1, 0, Benign) ///< Set when -fforce-dwarf-frame 40 ///< is enabled. 41 42///< Set when -femit-dwarf-unwind is passed. 43ENUM_DEBUGOPT(EmitDwarfUnwind, llvm::EmitDwarfUnwindType, 2, 44 llvm::EmitDwarfUnwindType::Default, Benign) 45 46DEBUGOPT(NoDwarfDirectoryAsm , 1, 0, Benign) ///< Set when -fno-dwarf-directory-asm 47 ///< is enabled. 48 49DEBUGOPT(NoInlineLineTables, 1, 0, Benign) ///< Whether debug info should contain 50 ///< inline line tables. 51 52DEBUGOPT(DebugStrictDwarf, 1, 1, Affecting) ///< Whether or not to use strict DWARF info. 53DEBUGOPT(DebugOmitUnreferencedMethods, 1, 0, Affecting) ///< Omit unreferenced member 54 ///< functions in type debug info. 55 56/// Control the Assignment Tracking debug info feature. 57ENUM_DEBUGOPT(AssignmentTrackingMode, AssignmentTrackingOpts, 2, 58 AssignmentTrackingOpts::Disabled, Benign) 59 60/// Whether or not to use Key Instructions to determine breakpoint locations. 61DEBUGOPT(DebugKeyInstructions, 1, 0, Benign) 62 63DEBUGOPT(DebugColumnInfo, 1, 0, Affecting) ///< Whether or not to use column information 64 ///< in debug info. 65 66DEBUGOPT(DebugTypeExtRefs, 1, 0, Affecting) ///< Whether or not debug info should contain 67 ///< external references to a PCH or module. 68 69DEBUGOPT(DebugExplicitImport, 1, 0, Affecting) ///< Whether or not debug info should 70 ///< contain explicit imports for 71 ///< anonymous namespaces 72 73/// Set debug info source file hashing algorithm. 74ENUM_DEBUGOPT(DebugSrcHash, DebugSrcHashKind, 2, DSH_MD5, Affecting) 75 76DEBUGOPT(SplitDwarfInlining, 1, 1, Affecting) ///< Whether to include inlining info in the 77 ///< skeleton CU to allow for symbolication 78 ///< of inline stack frames without .dwo files. 79DEBUGOPT(DebugFwdTemplateParams, 1, 0, Affecting) ///< Whether to emit complete 80 ///< template parameter descriptions in 81 ///< forward declarations (versus just 82 ///< including them in the name). 83ENUM_DEBUGOPT(DebugSimpleTemplateNames, 84 llvm::codegenoptions::DebugTemplateNamesKind, 2, 85 llvm::codegenoptions::DebugTemplateNamesKind::Full, Affecting) 86 ///< Whether to emit template parameters in the textual names of 87 ///< template specializations. 88 ///< Implies DebugFwdTemplateNames to allow decorated names to be 89 ///< reconstructed when needed. 90 91/// The kind of generated debug info. 92ENUM_DEBUGOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, 93 llvm::codegenoptions::NoDebugInfo, Affecting) 94 95/// Whether to generate macro debug info. 96DEBUGOPT(MacroDebugInfo, 1, 0, Affecting) 97 98/// Tune the debug info for this debugger. 99ENUM_DEBUGOPT(DebuggerTuning, llvm::DebuggerKind, 3, 100 llvm::DebuggerKind::Default, Affecting) 101 102/// Dwarf version. Version zero indicates to LLVM that no DWARF should be 103/// emitted. 104VALUE_DEBUGOPT(DwarfVersion, 3, 0, Affecting) 105 106/// Whether we should emit CodeView debug information. It's possible to emit 107/// CodeView and DWARF into the same object. 108DEBUGOPT(EmitCodeView, 1, 0, Affecting) 109 110/// Whether to emit the .debug$H section containing hashes of CodeView types. 111DEBUGOPT(CodeViewGHash, 1, 0, Affecting) 112 113/// Whether to emit the compiler path and command line into the CodeView debug information. 114DEBUGOPT(CodeViewCommandLine, 1, 0, Affecting) 115 116/// Whether emit extra debug info for sample pgo profile collection. 117DEBUGOPT(DebugInfoForProfiling, 1, 0, Affecting) 118 119/// Whether to emit DW_TAG_template_alias for template aliases. 120DEBUGOPT(DebugTemplateAlias, 1, 0, Affecting) 121 122/// Whether to emit .debug_gnu_pubnames section instead of .debug_pubnames. 123DEBUGOPT(DebugNameTable, 2, 0, Affecting) 124 125/// Whether to use DWARF base address specifiers in .debug_ranges. 126DEBUGOPT(DebugRangesBaseAddress, 1, 0, Affecting) 127 128/// Whether to embed source in DWARF debug line section. 129DEBUGOPT(EmbedSource, 1, 0, Affecting) 130 131#undef DEBUGOPT 132#undef ENUM_DEBUGOPT 133#undef VALUE_DEBUGOPT 134