diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2017-09-18 14:15:57 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2017-09-18 14:15:57 +0000 |
commit | c0a758d8abcafa9f696b29bcf5eea44df9b96973 (patch) | |
tree | 4bd04806495c5787fc69b63ea0a4003900aaceff /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | |
parent | 360629d170778f08eb03d67907f25ff81cfde03b (diff) | |
download | bcm5719-llvm-c0a758d8abcafa9f696b29bcf5eea44df9b96973.tar.gz bcm5719-llvm-c0a758d8abcafa9f696b29bcf5eea44df9b96973.zip |
[dwarfdump] Make .eh_frame an alias for .debug_frame
This patch makes the `.eh_frame` extension an alias for `.debug_frame`.
Up till now it was only possible to dump the section using objdump, but
not with dwarfdump. Since the two are essentially interchangeable, we
dump whichever of the two is present.
As a workaround, this patch also adds parsing for 3 currently
unimplemented CFA instructions: `DW_CFA_def_cfa_expression`,
`DW_CFA_expression`, and `DW_CFA_val_expression`. Because I lack the
required knowledge, I just parse the fields without actually creating
the instructions.
Finally, this also fixes the typo in the `.debug_frame` section name
which incorrectly contained a trailing `s`.
Differential revision: https://reviews.llvm.org/D37852
llvm-svn: 313530
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index 725152161a6..c2bcd382ee3 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -122,6 +122,8 @@ static std::array<llvm::Optional<uint64_t>, (unsigned)DIDT_ID_Count> DumpOffsets #include "llvm/BinaryFormat/Dwarf.def" #undef HANDLE_DWARF_SECTION +static alias DumpDebugFrameAlias("eh-frame", desc("Alias for -debug-frame"), + aliasopt(DumpDebugFrame)); static opt<bool> DumpUUID("uuid", desc("Show the UUID for each architecture"), cat(DwarfDumpCategory)); static alias DumpUUIDAlias("u", desc("Alias for -uuid"), aliasopt(DumpUUID)); @@ -186,7 +188,7 @@ static bool verifyObjectFile(ObjectFile &Obj, Twine Filename) { raw_ostream &stream = Quiet ? nulls() : outs(); stream << "Verifying " << Filename.str() << ":\tfile format " << Obj.getFileFormatName() << "\n"; - bool Result = DICtx->verify(stream, DumpType, getDumpOpts()); + bool Result = DICtx->verify(stream, getDumpOpts()); if (Result) stream << "No errors.\n"; else |