diff options
author | Eli Bendersky <eliben@google.com> | 2013-01-25 20:26:43 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2013-01-25 20:26:43 +0000 |
commit | 939a4e8b693820d161f362317f7dba9057e66cc7 (patch) | |
tree | e9f235edbfd2e837ff68dcc3d0f8291e4f4b63b5 /tools | |
parent | 3b6a5eefe0ab2199bc69094b390b736ae332b905 (diff) | |
download | external_llvm-939a4e8b693820d161f362317f7dba9057e66cc7.zip external_llvm-939a4e8b693820d161f362317f7dba9057e66cc7.tar.gz external_llvm-939a4e8b693820d161f362317f7dba9057e66cc7.tar.bz2 |
Add command-line flags for DWARF dumping.
Flags for dumping specific DWARF sections added in lib/DebugInfo and
llvm-dwarfdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index ccaf466..0687500 100644 --- a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -52,6 +52,23 @@ static cl::opt<bool> PrintInlining("inlining", cl::init(false), cl::desc("Print all inlined frames for a given address")); +static cl::opt<DIDumpType> +DumpType("debug-dump", cl::init(DIDT_All), + cl::desc("Dump of debug sections:"), + cl::values( + clEnumValN(DIDT_All, "all", "Dump all debug sections"), + clEnumValN(DIDT_Abbrev, "abbrev", ".debug_abbrev"), + clEnumValN(DIDT_AbbrevDwo, "abbrev.dwo", ".debug_abbrev.dwo"), + clEnumValN(DIDT_Aranges, "aranges", ".debug_aranges"), + clEnumValN(DIDT_Info, "info", ".debug_info"), + clEnumValN(DIDT_InfoDwo, "info.dwo", ".debug_info.dwo"), + clEnumValN(DIDT_Line, "line", ".debug_line"), + clEnumValN(DIDT_Ranges, "ranges", ".debug_ranges"), + clEnumValN(DIDT_Str, "str", ".debug_str"), + clEnumValN(DIDT_StrDwo, "str.dwo", ".debug_str.dwo"), + clEnumValN(DIDT_StrOffsetsDwo, "str_offsets.dwo", ".debug_str_offsets.dwo"), + clEnumValEnd)); + static void PrintDILineInfo(DILineInfo dli) { if (PrintFunctions) outs() << (dli.getFunctionName() ? dli.getFunctionName() : "<unknown>") @@ -75,7 +92,7 @@ static void DumpInput(const StringRef &Filename) { outs() << Filename << ":\tfile format " << Obj->getFileFormatName() << "\n\n"; // Dump the complete DWARF structure. - DICtx->dump(outs()); + DICtx->dump(outs(), DumpType); } else { // Print line info for the specified address. int SpecFlags = DILineInfoSpecifier::FileLineInfo | |