LLDB  mainline
Macros | Enumerations | Functions
SymbolFileDWARF.cpp File Reference
#include "SymbolFileDWARF.h"
#include "llvm/ADT/Optional.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Threading.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Section.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/Value.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/RegularExpression.h"
#include "lldb/Utility/Scalar.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/Utility/Timer.h"
#include "Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h"
#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Interpreter/OptionValueFileSpecList.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "Plugins/ExpressionParser/Clang/ClangUtil.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "lldb/Symbol/Block.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/CompilerDecl.h"
#include "lldb/Symbol/CompilerDeclContext.h"
#include "lldb/Symbol/DebugMacros.h"
#include "lldb/Symbol/LineTable.h"
#include "lldb/Symbol/LocateSymbolFile.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/TypeMap.h"
#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/Target.h"
#include "AppleDWARFIndex.h"
#include "DWARFASTParser.h"
#include "DWARFASTParserClang.h"
#include "DWARFCompileUnit.h"
#include "DWARFDebugAbbrev.h"
#include "DWARFDebugAranges.h"
#include "DWARFDebugInfo.h"
#include "DWARFDebugMacro.h"
#include "DWARFDebugRanges.h"
#include "DWARFDeclContext.h"
#include "DWARFFormValue.h"
#include "DWARFTypeUnit.h"
#include "DWARFUnit.h"
#include "DebugNamesDWARFIndex.h"
#include "LogChannelDWARF.h"
#include "ManualDWARFIndex.h"
#include "SymbolFileDWARFDebugMap.h"
#include "SymbolFileDWARFDwo.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/Support/FileSystem.h"
#include <algorithm>
#include <map>
#include <memory>
#include <ctype.h>
#include <string.h>
#include "SymbolFileDWARFProperties.inc"
#include "SymbolFileDWARFPropertiesEnum.inc"

Go to the source code of this file.

Macros

#define DEBUG_PRINTF(fmt, ...)
 
#define LLDB_PROPERTIES_symbolfiledwarf
 
#define LLDB_PROPERTIES_symbolfiledwarf
 

Enumerations

enum  
 

Functions

static const llvm::DWARFDebugLine::LineTable * ParseLLVMLineTable (lldb_private::DWARFContext &context, llvm::DWARFDebugLine &line, dw_offset_t line_offset, dw_offset_t unit_offset)
 
static llvm::Optional< std::string > GetFileByIndex (const llvm::DWARFDebugLine::Prologue &prologue, size_t idx, llvm::StringRef compile_dir, FileSpec::Style style)
 
static FileSpecList ParseSupportFilesFromPrologue (const lldb::ModuleSP &module, const llvm::DWARFDebugLine::Prologue &prologue, FileSpec::Style style, llvm::StringRef compile_dir={})
 
static ConstString GetDWARFMachOSegmentName ()
 
static void MakeAbsoluteAndRemap (FileSpec &file_spec, DWARFUnit &dwarf_cu, const ModuleSP &module_sp)
 Make an absolute path out of file_spec and remap it using the module's source remapping dictionary. More...
 
static const char * GetDWOName (DWARFCompileUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die)
 Return the DW_AT_(GNU_)dwo_name. More...
 
static uint64_t GetDWOId (DWARFCompileUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die)
 Return the DW_AT_(GNU_)dwo_id. More...
 
static CallSiteParameterArray CollectCallSiteParameters (ModuleSP module, DWARFDIE call_site_die)
 Collect call site parameters in a DW_TAG_call_site DIE. More...
 

Macro Definition Documentation

◆ DEBUG_PRINTF

#define DEBUG_PRINTF (   fmt,
  ... 
)

◆ LLDB_PROPERTIES_symbolfiledwarf [1/2]

#define LLDB_PROPERTIES_symbolfiledwarf

Definition at line 124 of file SymbolFileDWARF.cpp.

◆ LLDB_PROPERTIES_symbolfiledwarf [2/2]

#define LLDB_PROPERTIES_symbolfiledwarf

Definition at line 124 of file SymbolFileDWARF.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 123 of file SymbolFileDWARF.cpp.

Function Documentation

◆ CollectCallSiteParameters()

static CallSiteParameterArray CollectCallSiteParameters ( ModuleSP  module,
DWARFDIE  call_site_die 
)
static

◆ GetDWARFMachOSegmentName()

static ConstString GetDWARFMachOSegmentName ( )
static

Definition at line 412 of file SymbolFileDWARF.cpp.

Referenced by SymbolFileDWARF::CalculateAbilities().

◆ GetDWOId()

static uint64_t GetDWOId ( DWARFCompileUnit dwarf_cu,
const DWARFDebugInfoEntry cu_die 
)
static

Return the DW_AT_(GNU_)dwo_id.

FIXME: Technically 0 is a valid hash.

Definition at line 1553 of file SymbolFileDWARF.cpp.

References DWARFDebugInfoEntry::GetAttributeValueAsUnsigned().

◆ GetDWOName()

static const char* GetDWOName ( DWARFCompileUnit dwarf_cu,
const DWARFDebugInfoEntry cu_die 
)
static

◆ GetFileByIndex()

static llvm::Optional<std::string> GetFileByIndex ( const llvm::DWARFDebugLine::Prologue &  prologue,
size_t  idx,
llvm::StringRef  compile_dir,
FileSpec::Style  style 
)
static

Definition at line 178 of file SymbolFileDWARF.cpp.

Referenced by ParseSupportFilesFromPrologue().

◆ MakeAbsoluteAndRemap()

static void MakeAbsoluteAndRemap ( FileSpec file_spec,
DWARFUnit dwarf_cu,
const ModuleSP &  module_sp 
)
static

Make an absolute path out of file_spec and remap it using the module's source remapping dictionary.

Definition at line 636 of file SymbolFileDWARF.cpp.

References DWARFUnit::GetCompilationDirectory(), lldb_private::FileSpec::GetPath(), lldb_private::FileSpec::MakeAbsolute(), and lldb_private::FileSpec::SetFile().

Referenced by SymbolFileDWARF::ParseCompileUnit(), and SymbolFileDWARF::ParseImportedModules().

◆ ParseLLVMLineTable()

static const llvm::DWARFDebugLine::LineTable* ParseLLVMLineTable ( lldb_private::DWARFContext context,
llvm::DWARFDebugLine &  line,
dw_offset_t  line_offset,
dw_offset_t  unit_offset 
)
static

◆ ParseSupportFilesFromPrologue()

static FileSpecList ParseSupportFilesFromPrologue ( const lldb::ModuleSP &  module,
const llvm::DWARFDebugLine::Prologue &  prologue,
FileSpec::Style  style,
llvm::StringRef  compile_dir = {} 
)
static