Changeset View
Changeset View
Standalone View
Standalone View
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Show First 20 Lines • Show All 654 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
const DWARFDataExtractor &SymbolFileDWARF::get_gnu_debugaltlink() { | const DWARFDataExtractor &SymbolFileDWARF::get_gnu_debugaltlink() { | ||||
return GetCachedSectionData(eSectionTypeDWARFGNUDebugAltLink, | return GetCachedSectionData(eSectionTypeDWARFGNUDebugAltLink, | ||||
m_data_gnu_debugaltlink); | m_data_gnu_debugaltlink); | ||||
} | } | ||||
DWARFDebugAbbrev *SymbolFileDWARF::DebugAbbrev() { | DWARFDebugAbbrev *SymbolFileDWARF::DebugAbbrev() { | ||||
if (m_abbr == NULL) { | |||||
const DWARFDataExtractor &debug_abbrev_data = get_debug_abbrev_data(); | |||||
if (debug_abbrev_data.GetByteSize() > 0) { | |||||
m_abbr.reset(new DWARFDebugAbbrev()); | |||||
if (m_abbr) | if (m_abbr) | ||||
m_abbr->Parse(debug_abbrev_data); | return m_abbr.get(); | ||||
} | |||||
const DWARFDataExtractor &debug_abbrev_data = get_debug_abbrev_data(); | |||||
if (debug_abbrev_data.GetByteSize() == 0) | |||||
return nullptr; | |||||
auto abbr = llvm::make_unique<DWARFDebugAbbrev>(); | |||||
llvm::Error error = abbr->parse(debug_abbrev_data); | |||||
if (error) { | |||||
Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO); | |||||
LLDB_LOG_ERROR(log, std::move(error), | |||||
"Unable to read .debug_abbrev section: {0}"); | |||||
return nullptr; | |||||
} | } | ||||
m_abbr = std::move(abbr); | |||||
return m_abbr.get(); | return m_abbr.get(); | ||||
} | } | ||||
const DWARFDebugAbbrev *SymbolFileDWARF::DebugAbbrev() const { | const DWARFDebugAbbrev *SymbolFileDWARF::DebugAbbrev() const { | ||||
return m_abbr.get(); | return m_abbr.get(); | ||||
} | } | ||||
DWARFDebugInfo *SymbolFileDWARF::DebugInfo() { | DWARFDebugInfo *SymbolFileDWARF::DebugInfo() { | ||||
▲ Show 20 Lines • Show All 3,167 Lines • Show Last 20 Lines |