diff options
Diffstat (limited to 'lib/DebugInfo/DWARFContext.cpp')
-rw-r--r-- | lib/DebugInfo/DWARFContext.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/DebugInfo/DWARFContext.cpp b/lib/DebugInfo/DWARFContext.cpp index 3359ae3..68f58d9 100644 --- a/lib/DebugInfo/DWARFContext.cpp +++ b/lib/DebugInfo/DWARFContext.cpp @@ -25,6 +25,10 @@ void DWARFContext::dump(raw_ostream &OS) { DWARFDebugArangeSet set; while (set.extract(arangesData, &offset)) set.dump(OS); + + OS << "\n.debug_lines contents:\n"; + DataExtractor lineData(getLineSection(), isLittleEndian(), 8); + DWARFDebugLine::dump(lineData, OS); } const DWARFDebugAbbrev *DWARFContext::getDebugAbbrev() { @@ -51,6 +55,17 @@ const DWARFDebugAranges *DWARFContext::getDebugAranges() { return Aranges.get(); } +const DWARFDebugLine *DWARFContext::getDebugLine() { + if (Line) + return Line.get(); + + DataExtractor lineData(getLineSection(), isLittleEndian(), 0); + + Line.reset(new DWARFDebugLine()); + Line->parse(lineData); + return Line.get(); +} + void DWARFContext::parseCompileUnits() { uint32_t offset = 0; const DataExtractor &debug_info_data = DataExtractor(getInfoSection(), |