|
LLDB mainline
|
#include <cstdlib>#include "DWARFASTParser.h"#include "DWARFASTParserClang.h"#include "DWARFDebugInfo.h"#include "DWARFDeclContext.h"#include "DWARFDefines.h"#include "SymbolFileDWARF.h"#include "SymbolFileDWARFDebugMap.h"#include "SymbolFileDWARFDwo.h"#include "UniqueDWARFASTType.h"#include "Plugins/ExpressionParser/Clang/ClangASTImporter.h"#include "Plugins/ExpressionParser/Clang/ClangASTMetadata.h"#include "Plugins/ExpressionParser/Clang/ClangUtil.h"#include "Plugins/Language/ObjC/ObjCLanguage.h"#include "lldb/Core/Module.h"#include "lldb/Core/Value.h"#include "lldb/Expression/Expression.h"#include "lldb/Host/Host.h"#include "lldb/Symbol/CompileUnit.h"#include "lldb/Symbol/Function.h"#include "lldb/Symbol/ObjectFile.h"#include "lldb/Symbol/SymbolFile.h"#include "lldb/Symbol/TypeList.h"#include "lldb/Symbol/TypeMap.h"#include "lldb/Symbol/VariableList.h"#include "lldb/Target/Language.h"#include "lldb/Utility/LLDBAssert.h"#include "lldb/Utility/Log.h"#include "lldb/Utility/StreamString.h"#include "lldb/lldb-private-enumerations.h"#include "clang/AST/CXXInheritance.h"#include "clang/AST/DeclBase.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/DeclObjC.h"#include "clang/AST/DeclTemplate.h"#include "clang/AST/Type.h"#include "clang/Basic/Specifiers.h"#include "llvm/ADT/StringExtras.h"#include "llvm/DebugInfo/DWARF/DWARFAddressRange.h"#include "llvm/DebugInfo/DWARF/DWARFTypePrinter.h"#include "llvm/Demangle/Demangle.h"#include <map>#include <memory>#include <optional>#include <vector>Go to the source code of this file.
Classes | |
| class | DWARFASTParserClang::DelayedAddObjCClassProperty |
Functions | |
| static bool | DeclKindIsCXXClass (clang::Decl::Kind decl_kind) |
| static bool | IsClangModuleFwdDecl (const DWARFDIE &Die) |
| Detect a forward declaration that is nested in a DW_TAG_module. | |
| static DWARFDIE | GetContainingClangModuleDIE (const DWARFDIE &die) |
| static lldb::ModuleSP | GetContainingClangModule (const DWARFDIE &die) |
| static bool | ShouldIgnoreArtificialField (llvm::StringRef FieldName) |
| static bool | TagIsRecordType (dw_tag_t tag) |
| Returns true for C++ constructs represented by clang::CXXRecordDecl. | |
| static unsigned | GetCXXMethodCVQuals (const DWARFDIE &subprogram, const DWARFDIE &object_parameter) |
| In order to determine the CV-qualifiers for a C++ class method in DWARF, we have to look at the CV-qualifiers of the object parameter's type. | |
| static std::string | MakeLLDBFuncAsmLabel (const DWARFDIE &die) |
| static void | PrepareContextToReceiveMembers (TypeSystemClang &ast, ClangASTImporter &ast_importer, clang::DeclContext *decl_ctx, DWARFDIE die, const char *type_name_cstr) |
| This function ensures we are able to add members (nested types, functions, etc.) to this type. | |
| static std::string | GetUnitName (const DWARFDIE &die) |
| static std::optional< uint32_t > | ExtractDataMemberLocation (DWARFDIE const &die, DWARFFormValue const &form_value, ModuleSP module_sp) |
| static TypePayloadClang | GetPtrAuthMofidierPayload (const DWARFDIE &die) |
| static clang::CallingConv | ConvertDWARFCallingConventionToClang (const ParsedDWARFTypeAttributes &attrs) |
| static std::optional< clang::APValue > | MakeAPValue (const clang::ASTContext &ast, CompilerType clang_type, uint64_t value) |
| static bool | IsSubroutine (const DWARFDIE &die) |
| static DWARFDIE | GetContainingFunctionWithAbstractOrigin (const DWARFDIE &die) |
| static DWARFDIE | FindAnyChildWithAbstractOrigin (const DWARFDIE &context) |
| static DWARFDIE | FindFirstChildWithAbstractOrigin (const DWARFDIE &block, const DWARFDIE &function) |
|
static |
Definition at line 1096 of file DWARFASTParserClang.cpp.
References ParsedDWARFTypeAttributes::calling_convention, lldb_private::GetLog(), LLDB_LOG, lldb_private::Lookups, and lldb_private::TypeCompletion.
Referenced by DWARFASTParserClang::ParseSubroutine().
|
static |
Definition at line 70 of file DWARFASTParserClang.cpp.
Referenced by DWARFASTParserClang::ParseStructureLikeDIE(), and DWARFASTParserClang::ParseSubroutine().
|
static |
Definition at line 666 of file DWARFASTParserClang.cpp.
References lldb_private::plugin::dwarf::DWARFFormValue::BlockData(), lldb::eRegisterKindDWARF, lldb_private::DWARFExpression::Evaluate(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetCU(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetData(), lldb_private::DataExtractor::GetDataStart(), lldb_private::GetLog(), LLDB_LOG_ERROR, lldb_private::Lookups, lldb_private::TypeCompletion, and lldb_private::plugin::dwarf::DWARFFormValue::Unsigned().
Referenced by DWARFASTParserClang::MemberAttributes::MemberAttributes(), and DWARFASTParserClang::ParseInheritance().
Definition at line 3452 of file DWARFASTParserClang.cpp.
References lldb_private::plugin::dwarf::DWARFDIE::children().
Referenced by FindFirstChildWithAbstractOrigin().
|
static |
Definition at line 3461 of file DWARFASTParserClang.cpp.
References FindAnyChildWithAbstractOrigin(), lldb_private::plugin::dwarf::DWARFDIE::GetParent(), and IsSubroutine().
Referenced by DWARFASTParserClang::GetDeclContextForBlock().
|
static |
Definition at line 121 of file DWARFASTParserClang.cpp.
References GetContainingClangModuleDIE(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetDWARF(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetExternalModule(), lldb_private::plugin::dwarf::DWARFDIE::GetName(), and lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid().
Referenced by DWARFASTParserClang::ParseTypeFromClangModule().
Definition at line 102 of file DWARFASTParserClang.cpp.
References lldb_private::plugin::dwarf::DWARFDIE::GetParent(), and lldb_private::plugin::dwarf::DWARFBaseDIE::IsValid().
Referenced by GetContainingClangModule().
Definition at line 3437 of file DWARFASTParserClang.cpp.
References lldb_private::plugin::dwarf::DWARFDIE::GetParent(), and IsSubroutine().
Referenced by DWARFASTParserClang::GetDeclContextForBlock().
|
static |
In order to determine the CV-qualifiers for a C++ class method in DWARF, we have to look at the CV-qualifiers of the object parameter's type.
Definition at line 225 of file DWARFASTParserClang.cpp.
References lldb_private::Type::eEncodingIsConstUID, lldb_private::Type::eEncodingIsVolatileUID, lldb_private::plugin::dwarf::DWARFDIE::GetAttributeValueAsReferenceDIE(), lldb_private::Type::GetEncodingMask(), and lldb_private::plugin::dwarf::DWARFDIE::ResolveTypeUID().
Referenced by DWARFASTParserClang::ConstructDemangledNameFromDWARF(), and DWARFASTParserClang::ParseSubroutine().
|
static |
Definition at line 696 of file DWARFASTParserClang.cpp.
References lldb_private::plugin::dwarf::DWARFBaseDIE::GetAttributeValueAsUnsigned(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetDWARF(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFileCommon::GetObjectFile(), and lldb_private::plugin::dwarf::DWARFBaseDIE::GetOffset().
Referenced by DWARFASTParserClang::ParseTypeModifier().
|
static |
Definition at line 558 of file DWARFASTParserClang.cpp.
References lldb_private::plugin::dwarf::DWARFBaseDIE::GetCU().
Referenced by DWARFASTParserClang::ParseSingleMember().
Detect a forward declaration that is nested in a DW_TAG_module.
Definition at line 90 of file DWARFASTParserClang.cpp.
References lldb_private::plugin::dwarf::DWARFBaseDIE::GetAttributeValueAsUnsigned(), and lldb_private::plugin::dwarf::DWARFDIE::GetParent().
Referenced by DWARFASTParserClang::ParseCXXMethod().
Definition at line 3427 of file DWARFASTParserClang.cpp.
References lldb_private::plugin::dwarf::DWARFBaseDIE::Tag().
Referenced by FindFirstChildWithAbstractOrigin(), and GetContainingFunctionWithAbstractOrigin().
|
static |
Definition at line 2027 of file DWARFASTParserClang.cpp.
References lldb_private::CompilerType::GetBitSize(), lldb_private::ClangUtil::GetQualType(), lldb_private::CompilerType::IsFloatingPointType(), and lldb_private::CompilerType::IsIntegerOrEnumerationType().
Referenced by DWARFASTParserClang::ParseTemplateDIE().
|
static |
Definition at line 245 of file DWARFASTParserClang.cpp.
References lldb_private::plugin::dwarf::DWARFBaseDIE::GetDWARF(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetID(), lldb_private::plugin::dwarf::DWARFDIE::GetMangledName(), LLDB_INVALID_UID, and lldb_private::FunctionCallLabel::toString().
Referenced by DWARFASTParserClang::ParseCXXMethod(), and DWARFASTParserClang::ParseSubroutine().
|
static |
This function ensures we are able to add members (nested types, functions, etc.) to this type.
It does so by starting its definition even if one cannot be found in the debug info. This means the type may need to be "forcibly completed" later – see CompleteTypeFromDWARF).
Definition at line 373 of file DWARFASTParserClang.cpp.
References lldb_private::ClangASTImporter::CanImport(), lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetDWARF(), lldb_private::ModuleChild::GetModule(), lldb_private::SymbolFileCommon::GetObjectFile(), lldb_private::plugin::dwarf::DWARFBaseDIE::GetOffset(), lldb_private::ClangUtil::GetQualType(), lldb_private::TypeSystemClang::GetTypeForDecl(), lldb_private::ClangASTImporter::RequireCompleteType(), lldb_private::TypeSystemClang::SetDeclIsForcefullyCompleted(), and lldb_private::TypeSystemClang::StartTagDeclarationDefinition().
Referenced by DWARFASTParserClang::ParseCXXMethod(), DWARFASTParserClang::ParseStructureLikeDIE(), and DWARFASTParserClang::ParseTypeModifier().
|
static |
Definition at line 137 of file DWARFASTParserClang.cpp.
Referenced by DWARFASTParserClang::ParseSingleMember().
Returns true for C++ constructs represented by clang::CXXRecordDecl.
Definition at line 144 of file DWARFASTParserClang.cpp.
Referenced by DWARFASTParserClang::GetClangDeclForDIE().