DWARF: Port support for parsing .debug_aranges section from LLDB and wire it up to...
[oota-llvm.git] / tools / llvm-dwarfdump / llvm-dwarfdump.cpp
index cf8b4d08067b9422a24cc0c8aff4a4710ea60ba4..076dcd10fb090d80b52d06a6f110ef0e9dcadeff 100644 (file)
@@ -52,6 +52,7 @@ static void DumpInput(const StringRef &Filename) {
   StringRef DebugInfoSection;
   StringRef DebugAbbrevSection;
   StringRef DebugLineSection;
+  StringRef DebugArangesSection;
 
   error_code ec;
   for (ObjectFile::section_iterator i = Obj->begin_sections(),
@@ -67,11 +68,14 @@ static void DumpInput(const StringRef &Filename) {
       DebugAbbrevSection = data;
     else if (name.endswith("debug_line"))
       DebugLineSection = data;
+    else if (name.endswith("debug_aranges"))
+      DebugArangesSection = data;
   }
 
   OwningPtr<DIContext> dictx(DIContext::getDWARFContext(/*FIXME*/true,
                                                         DebugInfoSection,
-                                                        DebugAbbrevSection));
+                                                        DebugAbbrevSection,
+                                                        DebugArangesSection));
   dictx->dump(outs());
 }