summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r--contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
index 4b3a011..84fa0e4 100644
--- a/contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ b/contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -71,7 +71,12 @@ static cl::opt<DIDumpType> DumpType(
clEnumValN(DIDT_StrOffsetsDwo, "str_offsets.dwo",
".debug_str_offsets.dwo"),
clEnumValN(DIDT_CUIndex, "cu_index", ".debug_cu_index"),
- clEnumValN(DIDT_TUIndex, "tu_index", ".debug_tu_index"), clEnumValEnd));
+ clEnumValN(DIDT_GdbIndex, "gdb_index", ".gdb_index"),
+ clEnumValN(DIDT_TUIndex, "tu_index", ".debug_tu_index")));
+
+static cl::opt<bool>
+ SummarizeTypes("summarize-types",
+ cl::desc("Abbreviate the description of type unit entries"));
static void error(StringRef Filename, std::error_code EC) {
if (!EC)
@@ -86,7 +91,7 @@ static void DumpObjectFile(ObjectFile &Obj, Twine Filename) {
outs() << Filename.str() << ":\tfile format " << Obj.getFileFormatName()
<< "\n\n";
// Dump the complete DWARF structure.
- DICtx->dump(outs(), DumpType);
+ DICtx->dump(outs(), DumpType, false, SummarizeTypes);
}
static void DumpInput(StringRef Filename) {
@@ -107,7 +112,7 @@ static void DumpInput(StringRef Filename) {
auto MachOOrErr = ObjForArch.getAsObjectFile();
error(Filename, errorToErrorCode(MachOOrErr.takeError()));
DumpObjectFile(**MachOOrErr,
- Filename + " (" + ObjForArch.getArchTypeName() + ")");
+ Filename + " (" + ObjForArch.getArchFlagName() + ")");
}
}
OpenPOWER on IntegriCloud