Changeset View
Changeset View
Standalone View
Standalone View
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
//===-- SymbolFileDWARF.h --------------------------------------*- C++ -*-===// | //===-- SymbolFileDWARF.h --------------------------------------*- C++ -*-===// | ||||
// | // | ||||
// The LLVM Compiler Infrastructure | // The LLVM Compiler Infrastructure | ||||
// | // | ||||
// This file is distributed under the University of Illinois Open Source | // This file is distributed under the University of Illinois Open Source | ||||
// License. See LICENSE.TXT for details. | // License. See LICENSE.TXT for details. | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#ifndef SymbolFileDWARF_SymbolFileDWARF_h_ | #ifndef SymbolFileDWARF_SymbolFileDWARF_h_ | ||||
#define SymbolFileDWARF_SymbolFileDWARF_h_ | #define SymbolFileDWARF_SymbolFileDWARF_h_ | ||||
// C Includes | // C Includes | ||||
// C++ Includes | // C++ Includes | ||||
#include <list> | #include <list> | ||||
#include <map> | #include <map> | ||||
#include <mutex> | |||||
#include <set> | #include <set> | ||||
#include <vector> | #include <vector> | ||||
// Other libraries and framework includes | // Other libraries and framework includes | ||||
#include "llvm/ADT/DenseMap.h" | #include "llvm/ADT/DenseMap.h" | ||||
#include "lldb/lldb-private.h" | #include "lldb/lldb-private.h" | ||||
#include "lldb/Core/ConstString.h" | #include "lldb/Core/ConstString.h" | ||||
▲ Show 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | public: | ||||
DWARFDebugInfo* | DWARFDebugInfo* | ||||
DebugInfo(); | DebugInfo(); | ||||
const DWARFDebugInfo* | const DWARFDebugInfo* | ||||
DebugInfo() const; | DebugInfo() const; | ||||
DWARFDebugRanges* | DWARFDebugRanges* | ||||
DebugRanges(); | DebugRanges(); | ||||
const DWARFDebugRanges* | const DWARFDebugRanges* | ||||
DebugRanges() const; | DebugRanges() const; | ||||
virtual const lldb_private::DWARFDataExtractor& | |||||
GetCachedSectionData (uint32_t got_flag, | |||||
lldb::SectionType sect_type, | |||||
lldb_private::DWARFDataExtractor &data); | |||||
static bool | static bool | ||||
SupportedVersion(uint16_t version); | SupportedVersion(uint16_t version); | ||||
DWARFDIE | DWARFDIE | ||||
GetDeclContextDIEContainingDIE (const DWARFDIE &die); | GetDeclContextDIEContainingDIE (const DWARFDIE &die); | ||||
lldb_private::Flags& | |||||
GetFlags () | |||||
{ | |||||
return m_flags; | |||||
} | |||||
const lldb_private::Flags& | |||||
GetFlags () const | |||||
{ | |||||
return m_flags; | |||||
} | |||||
bool | bool | ||||
HasForwardDeclForClangType (const lldb_private::CompilerType &compiler_type); | HasForwardDeclForClangType (const lldb_private::CompilerType &compiler_type); | ||||
lldb_private::CompileUnit* | lldb_private::CompileUnit* | ||||
GetCompUnitForDWARFCompUnit(DWARFCompileUnit* dwarf_cu, | GetCompUnitForDWARFCompUnit(DWARFCompileUnit* dwarf_cu, | ||||
uint32_t cu_idx = UINT32_MAX); | uint32_t cu_idx = UINT32_MAX); | ||||
lldb::user_id_t | lldb::user_id_t | ||||
Show All 19 Lines | public: | ||||
GetLocationListFormat() const; | GetLocationListFormat() const; | ||||
protected: | protected: | ||||
typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb_private::Type *> DIEToTypePtr; | typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb_private::Type *> DIEToTypePtr; | ||||
typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::VariableSP> DIEToVariableSP; | typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::VariableSP> DIEToVariableSP; | ||||
typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::opaque_compiler_type_t> DIEToClangType; | typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::opaque_compiler_type_t> DIEToClangType; | ||||
typedef llvm::DenseMap<lldb::opaque_compiler_type_t, DIERef> ClangTypeToDIE; | typedef llvm::DenseMap<lldb::opaque_compiler_type_t, DIERef> ClangTypeToDIE; | ||||
enum | struct DWARFDataSegment | ||||
{ | { | ||||
flagsGotDebugAbbrevData = (1 << 0), | std::once_flag m_flag; | ||||
flagsGotDebugAddrData = (1 << 1), | lldb_private::DWARFDataExtractor m_data; | ||||
flagsGotDebugArangesData = (1 << 2), | |||||
flagsGotDebugFrameData = (1 << 3), | |||||
flagsGotDebugInfoData = (1 << 4), | |||||
flagsGotDebugLineData = (1 << 5), | |||||
flagsGotDebugLocData = (1 << 6), | |||||
flagsGotDebugMacInfoData = (1 << 7), | |||||
flagsGotDebugPubNamesData = (1 << 8), | |||||
flagsGotDebugPubTypesData = (1 << 9), | |||||
flagsGotDebugRangesData = (1 << 10), | |||||
flagsGotDebugStrData = (1 << 11), | |||||
flagsGotDebugStrOffsetsData = (1 << 12), | |||||
flagsGotAppleNamesData = (1 << 13), | |||||
flagsGotAppleTypesData = (1 << 14), | |||||
flagsGotAppleNamespacesData = (1 << 15), | |||||
flagsGotAppleObjCData = (1 << 16) | |||||
}; | }; | ||||
DISALLOW_COPY_AND_ASSIGN (SymbolFileDWARF); | |||||
const lldb_private::DWARFDataExtractor& | |||||
GetCachedSectionData (lldb::SectionType sect_type, DWARFDataSegment& data_segment); | |||||
virtual void | |||||
LoadSectionData (lldb::SectionType sect_type, lldb_private::DWARFDataExtractor& data); | |||||
bool | bool | ||||
DeclContextMatchesThisSymbolFile (const lldb_private::CompilerDeclContext *decl_ctx); | DeclContextMatchesThisSymbolFile (const lldb_private::CompilerDeclContext *decl_ctx); | ||||
bool | bool | ||||
DIEInDeclContext (const lldb_private::CompilerDeclContext *parent_decl_ctx, | DIEInDeclContext (const lldb_private::CompilerDeclContext *parent_decl_ctx, | ||||
const DWARFDIE &die); | const DWARFDIE &die); | ||||
DISALLOW_COPY_AND_ASSIGN (SymbolFileDWARF); | |||||
virtual DWARFCompileUnit* | virtual DWARFCompileUnit* | ||||
GetDWARFCompileUnit (lldb_private::CompileUnit *comp_unit); | GetDWARFCompileUnit (lldb_private::CompileUnit *comp_unit); | ||||
DWARFCompileUnit* | DWARFCompileUnit* | ||||
GetNextUnparsedDWARFCompileUnit (DWARFCompileUnit* prev_cu); | GetNextUnparsedDWARFCompileUnit (DWARFCompileUnit* prev_cu); | ||||
bool | bool | ||||
GetFunction (const DWARFDIE &die, | GetFunction (const DWARFDIE &die, | ||||
▲ Show 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | protected: | ||||
virtual DIEToClangType& | virtual DIEToClangType& | ||||
GetForwardDeclDieToClangType() { return m_forward_decl_die_to_clang_type; } | GetForwardDeclDieToClangType() { return m_forward_decl_die_to_clang_type; } | ||||
virtual ClangTypeToDIE& | virtual ClangTypeToDIE& | ||||
GetForwardDeclClangTypeToDie() { return m_forward_decl_clang_type_to_die; } | GetForwardDeclClangTypeToDie() { return m_forward_decl_clang_type_to_die; } | ||||
lldb::ModuleWP m_debug_map_module_wp; | lldb::ModuleWP m_debug_map_module_wp; | ||||
SymbolFileDWARFDebugMap * m_debug_map_symfile; | SymbolFileDWARFDebugMap * m_debug_map_symfile; | ||||
lldb_private::Flags m_flags; | |||||
lldb_private::DWARFDataExtractor m_dwarf_data; | lldb_private::DWARFDataExtractor m_dwarf_data; | ||||
lldb_private::DWARFDataExtractor m_data_debug_abbrev; | |||||
lldb_private::DWARFDataExtractor m_data_debug_addr; | DWARFDataSegment m_data_debug_abbrev; | ||||
lldb_private::DWARFDataExtractor m_data_debug_aranges; | DWARFDataSegment m_data_debug_addr; | ||||
lldb_private::DWARFDataExtractor m_data_debug_frame; | DWARFDataSegment m_data_debug_aranges; | ||||
lldb_private::DWARFDataExtractor m_data_debug_info; | DWARFDataSegment m_data_debug_frame; | ||||
lldb_private::DWARFDataExtractor m_data_debug_line; | DWARFDataSegment m_data_debug_info; | ||||
lldb_private::DWARFDataExtractor m_data_debug_loc; | DWARFDataSegment m_data_debug_line; | ||||
lldb_private::DWARFDataExtractor m_data_debug_ranges; | DWARFDataSegment m_data_debug_loc; | ||||
lldb_private::DWARFDataExtractor m_data_debug_str; | DWARFDataSegment m_data_debug_ranges; | ||||
lldb_private::DWARFDataExtractor m_data_debug_str_offsets; | DWARFDataSegment m_data_debug_str; | ||||
lldb_private::DWARFDataExtractor m_data_apple_names; | DWARFDataSegment m_data_debug_str_offsets; | ||||
lldb_private::DWARFDataExtractor m_data_apple_types; | DWARFDataSegment m_data_apple_names; | ||||
lldb_private::DWARFDataExtractor m_data_apple_namespaces; | DWARFDataSegment m_data_apple_types; | ||||
lldb_private::DWARFDataExtractor m_data_apple_objc; | DWARFDataSegment m_data_apple_namespaces; | ||||
DWARFDataSegment m_data_apple_objc; | |||||
// The unique pointer items below are generated on demand if and when someone accesses | // The unique pointer items below are generated on demand if and when someone accesses | ||||
// them through a non const version of this class. | // them through a non const version of this class. | ||||
std::unique_ptr<DWARFDebugAbbrev> m_abbr; | std::unique_ptr<DWARFDebugAbbrev> m_abbr; | ||||
std::unique_ptr<DWARFDebugInfo> m_info; | std::unique_ptr<DWARFDebugInfo> m_info; | ||||
std::unique_ptr<DWARFDebugLine> m_line; | std::unique_ptr<DWARFDebugLine> m_line; | ||||
std::unique_ptr<DWARFMappedHash::MemoryTable> m_apple_names_ap; | std::unique_ptr<DWARFMappedHash::MemoryTable> m_apple_names_ap; | ||||
std::unique_ptr<DWARFMappedHash::MemoryTable> m_apple_types_ap; | std::unique_ptr<DWARFMappedHash::MemoryTable> m_apple_types_ap; | ||||
Show All 26 Lines |