Go to the documentation of this file.
9 #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERCLANG_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERCLANG_H
12 #include "clang/AST/CharUnits.h"
13 #include "clang/AST/Type.h"
14 #include "llvm/ADT/DenseMap.h"
15 #include "llvm/ADT/SmallPtrSet.h"
16 #include "llvm/ADT/SmallVector.h"
48 bool *type_is_new_ptr)
override;
88 llvm::Expected<llvm::APInt>
111 typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::DeclContext *>
113 typedef std::multimap<const clang::DeclContext *, const DWARFDIE>
118 typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::Decl *>
137 &template_param_infos);
142 &template_param_infos);
148 std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> &base_classes,
149 std::vector<DWARFDIE> &member_function_dies,
156 const DWARFDIE &parent_die,
bool skip_artificial,
157 bool &is_static,
bool &is_variadic,
158 bool &has_template_params,
159 std::vector<lldb_private::CompilerType> &function_args,
160 std::vector<clang::ParmVarDecl *> &function_param_decls,
161 unsigned &type_quals);
164 bool is_signed,
uint32_t enumerator_byte_size,
185 std::vector<DWARFDIE> &failures);
199 const DWARFDIE &die, lldb::TypeSP type_sp);
249 FieldInfo &last_field_info);
286 const lldb::ModuleSP &module_sp,
287 std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> &base_classes,
330 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFASTPARSERCLANG_H
bool CopyUniqueClassMethodTypes(const DWARFDIE &src_class_die, const DWARFDIE &dst_class_die, lldb_private::Type *class_type, std::vector< DWARFDIE > &failures)
std::optional< uint64_t > byte_size
lldb_private::Type * GetTypeForDIE(const DWARFDIE &die)
clang::RefQualifierKind ref_qual
Indicates ref-qualifier of C++ member function if present.
lldb_private::ConstString name
Parsed form of all attributes that are relevant for type reconstruction.
clang::DeclContext * GetCachedClangDeclContextForDIE(const DWARFDIE &die)
bool is_forward_declaration
bool ParseChildMembers(const DWARFDIE &die, lldb_private::CompilerType &class_compiler_type, std::vector< std::unique_ptr< clang::CXXBaseSpecifier >> &base_classes, std::vector< DWARFDIE > &member_function_dies, DelayedPropertyList &delayed_properties, const lldb::AccessType default_accessibility, lldb_private::ClangASTImporter::LayoutInfo &layout_info)
std::vector< DelayedAddObjCClassProperty > DelayedPropertyList
lldb::LanguageType class_language
clang::NamespaceDecl * ResolveNamespaceDIE(const DWARFDIE &die)
lldb::TypeSP ParseArrayType(const DWARFDIE &die, const ParsedDWARFTypeAttributes &attrs)
lldb_private::CompilerDecl GetDeclForUIDFromDWARF(const DWARFDIE &die) override
LanguageType
Programming language type.
Represents a generic declaration such as a function declaration.
bool ParseTemplateParameterInfos(const DWARFDIE &parent_die, lldb_private::TypeSystemClang::TemplateParameterInfos &template_param_infos)
llvm::DenseMap< const DWARFDebugInfoEntry *, clang::Decl * > DIEToDeclMap
lldb::TypeSP ParseStructureLikeDIE(const lldb_private::SymbolContext &sc, const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
Parse a structure, class, or union type DIE.
DWARFDebugInfoEntry objects assume that they are living in one big vector and do pointer arithmetic o...
lldb_private::Function * ParseFunctionFromDWARF(lldb_private::CompileUnit &comp_unit, const DWARFDIE &die, const lldb_private::AddressRange &func_range) override
llvm::DenseMap< const DWARFDebugInfoEntry *, clang::DeclContext * > DIEToDeclContextMap
clang::Decl * GetClangDeclForDIE(const DWARFDIE &die)
void LinkDeclContextToDIE(clang::DeclContext *decl_ctx, const DWARFDIE &die)
size_t ParseChildParameters(clang::DeclContext *containing_decl_ctx, const DWARFDIE &parent_die, bool skip_artificial, bool &is_static, bool &is_variadic, bool &has_template_params, std::vector< lldb_private::CompilerType > &function_args, std::vector< clang::ParmVarDecl * > &function_param_decls, unsigned &type_quals)
clang::DeclContext * GetClangDeclContextContainingDIE(const DWARFDIE &die, DWARFDIE *decl_ctx_die)
llvm::Expected< llvm::APInt > ExtractIntFromFormValue(const lldb_private::CompilerType &int_type, const DWARFFormValue &form_value) const
Extracts an value for a given Clang integer type from a DWARFFormValue.
lldb_private::ConstString ConstructDemangledNameFromDWARF(const DWARFDIE &die) override
lldb::TypeSP UpdateSymbolContextScopeForType(const lldb_private::SymbolContext &sc, const DWARFDIE &die, lldb::TypeSP type_sp)
If type_sp is valid, calculate and set its symbol context scope, and update the type list for its bac...
clang::DeclContext * GetClangDeclContextForDIE(const DWARFDIE &die)
clang::StorageClass storage
void LinkDeclToDIE(clang::Decl *decl, const DWARFDIE &die)
bool NextBitfieldOffsetIsValid(const uint64_t next_bit_offset) const
DIEToModuleMap m_die_to_module
lldb_private::CompilerDeclContext GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) override
bool CompleteRecordType(const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &clang_type)
lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc, const DWARFDIE &die, bool *type_is_new_ptr) override
lldb::AccessType accessibility
void SetIsBitfield(bool flag)
std::multimap< const clang::DeclContext *, const DWARFDIE > DeclContextToDIEMap
DWARFFormValue abstract_origin
void ParseInheritance(const DWARFDIE &die, const DWARFDIE &parent_die, const lldb_private::CompilerType class_clang_type, const lldb::AccessType default_accessibility, const lldb::ModuleSP &module_sp, std::vector< std::unique_ptr< clang::CXXBaseSpecifier >> &base_classes, lldb_private::ClangASTImporter::LayoutInfo &layout_info)
Parses a DW_TAG_inheritance DIE into a base/super class.
DIEToDeclContextMap m_die_to_decl_ctx
string(SUBSTRING ${p} 10 -1 pStripped) if($
Represents a generic declaration context in a program.
lldb_private::ClangASTImporter & GetClangASTImporter()
lldb_private::ConstString GetDIEClassTemplateParams(const DWARFDIE &die) override
Returns the template parameters of a class DWARFDIE as a string.
size_t calling_convention
~DWARFASTParserClang() override
lldb::ModuleSP GetModuleForType(const DWARFDIE &die)
bool is_complete_objc_class
@ eLanguageTypeUnknown
Unknown or invalid language value.
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb_private::OptionalClangModuleID > DIEToModuleMap
lldb::TypeSP ParseTypeModifier(const lldb_private::SymbolContext &sc, const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
const char * mangled_name
lldb_private::CompilerDeclContext GetDeclContextForUIDFromDWARF(const DWARFDIE &die) override
DIEToDeclMap m_die_to_decl
void EnsureAllDIEsInDeclContextHaveBeenParsed(lldb_private::CompilerDeclContext decl_context) override
bool CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &compiler_type) override
lldb_private::TypeSystemClang & m_ast
lldb::TypeSP ParseEnum(const lldb_private::SymbolContext &sc, const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
void ParseObjCProperty(const DWARFDIE &die, const DWARFDIE &parent_die, const lldb_private::CompilerType &class_clang_type, DelayedPropertyList &delayed_properties)
Parses a DW_TAG_APPLE_property DIE and appends the parsed data to the list of delayed Objective-C pro...
Manages and observes all Clang AST node importing in LLDB.
Generic representation of a type in a programming language.
DWARFFormValue specification
lldb_private::Declaration decl
clang::BlockDecl * ResolveBlockDIE(const DWARFDIE &die)
DWARFFormValue containing_type
A class that represents a running process on the host machine.
lldb::TypeSP ParseSubroutine(const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs)
std::string GetCPlusPlusQualifiedName(const DWARFDIE &die)
A TypeSystem implementation based on Clang.
bool ParseTemplateDIE(const DWARFDIE &die, lldb_private::TypeSystemClang::TemplateParameterInfos &template_param_infos)
lldb_private::OptionalClangModuleID GetOwningClangModule(const DWARFDIE &die)
lldb::TypeSP ParseTypeFromClangModule(const lldb_private::SymbolContext &sc, const DWARFDIE &die, lldb_private::Log *log)
Follow Clang Module Skeleton CU references to find a type definition.
clang::DeclContext * GetDeclContextForBlock(const DWARFDIE &die)
void ParseSingleMember(const DWARFDIE &die, const DWARFDIE &parent_die, const lldb_private::CompilerType &class_clang_type, lldb::AccessType default_accessibility, lldb_private::ClangASTImporter::LayoutInfo &layout_info, FieldInfo &last_field_info)
DeclContextToDIEMap m_decl_ctx_to_die
DWARFASTParserClang(lldb_private::TypeSystemClang &ast)
ParsedDWARFTypeAttributes(const DWARFDIE &die)
bool CompleteEnumType(const DWARFDIE &die, lldb_private::Type *type, lldb_private::CompilerType &clang_type)
lldb::TypeSP ParsePointerToMemberType(const DWARFDIE &die, const ParsedDWARFTypeAttributes &attrs)
size_t ParseChildEnumerators(lldb_private::CompilerType &compiler_type, bool is_signed, uint32_t enumerator_byte_size, const DWARFDIE &parent_die)
std::unique_ptr< lldb_private::ClangASTImporter > m_clang_ast_importer_up