From 358f4fd9ee078b3c79597fc688855fb48bc1f356 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 14 Sep 2011 01:09:52 +0000 Subject: DWARF: Port support for parsing .debug_aranges section from LLDB and wire it up to llvm-dwarfdump. This is only one half of it, the part that caches address ranges from the DIEs when .debug_aranges is not available will be ported soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139680 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/llvm-dwarfdump/llvm-dwarfdump.cpp') diff --git a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index cf8b4d0806..076dcd10fb 100644 --- a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -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 dictx(DIContext::getDWARFContext(/*FIXME*/true, DebugInfoSection, - DebugAbbrevSection)); + DebugAbbrevSection, + DebugArangesSection)); dictx->dump(outs()); } -- cgit v1.2.3