summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2017-08-15 12:32:54 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2017-08-15 12:32:54 +0000
commit6957ab5b7b98f7c372313eec6c81601bfa6b5860 (patch)
tree207e098cf775b363ed57a0451f61ef47918935ea /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
parent67820e015fc79aa115b594269de51d7a9d132682 (diff)
downloadbcm5719-llvm-6957ab5b7b98f7c372313eec6c81601bfa6b5860.tar.gz
bcm5719-llvm-6957ab5b7b98f7c372313eec6c81601bfa6b5860.zip
[llvm-dwarfdump] - Print section name and index when dumping .debug_info ranges
Teaches llvm-dwarfdump to print section index and name of range when it dumps .debug_info. Differential revision: https://reviews.llvm.org/D36313 llvm-svn: 310915
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index fdfc95fe24b..703fc894918 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -933,6 +933,7 @@ class DWARFObjInMemory final : public DWARFObject {
bool IsLittleEndian;
uint8_t AddressSize;
StringRef FileName;
+ const object::ObjectFile *Obj = nullptr;
using TypeSectionMap = MapVector<object::SectionRef, DWARFSectionMap,
std::map<object::SectionRef, unsigned>>;
@@ -1051,7 +1052,8 @@ public:
DWARFObjInMemory(const object::ObjectFile &Obj, const LoadedObjectInfo *L,
function_ref<ErrorPolicy(Error)> HandleError)
: IsLittleEndian(Obj.isLittleEndian()),
- AddressSize(Obj.getBytesInAddress()), FileName(Obj.getFileName()) {
+ AddressSize(Obj.getBytesInAddress()), FileName(Obj.getFileName()),
+ Obj(&Obj) {
for (const SectionRef &Section : Obj.sections()) {
StringRef Name;
@@ -1188,6 +1190,8 @@ public:
return AI->second;
}
+ const object::ObjectFile *getFile() const override { return Obj; }
+
bool isLittleEndian() const override { return IsLittleEndian; }
StringRef getAbbrevDWOSection() const override { return AbbrevDWOSection; }
const DWARFSection &getLineDWOSection() const override {
OpenPOWER on IntegriCloud