summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-02-28 22:42:55 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-02-28 22:42:55 +0000
commitac136cd18c55c1a5d6884b868b460a5439dd3a52 (patch)
treeab7a378dc17ebebf3b47db216e48f19a628324b4 /llvm/tools/llvm-readobj
parentb7812652c6f76045884ac4ee45a315e63c905302 (diff)
downloadbcm5719-llvm-ac136cd18c55c1a5d6884b868b460a5439dd3a52.tar.gz
bcm5719-llvm-ac136cd18c55c1a5d6884b868b460a5439dd3a52.zip
llvm-readobj: Try the DWARF CFI dumper on all machines.
There's no reason to limit the DWARF CFI dumper to EM_386 and EM_X86_64; ELF files could contain DWARF CFI on almost any platform (even 32-bit ARM; NetBSD uses DWARF CFI on that platform). So start using the DWARF CFI dumper unconditionally so that we can dump .eh_frame sections on the remaining ELF platforms as well as in NetBSD binaries. Differential Revision: https://reviews.llvm.org/D58761 llvm-svn: 355151
Diffstat (limited to 'llvm/tools/llvm-readobj')
-rw-r--r--llvm/tools/llvm-readobj/ELFDumper.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index 410ab3f87ca..6428e9926ef 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -1890,12 +1890,8 @@ void ELFDumper<ELFT>::printValue(uint64_t Type, uint64_t Value) {
template<class ELFT>
void ELFDumper<ELFT>::printUnwindInfo() {
- const unsigned Machine = ObjF->getELFFile()->getHeader()->e_machine;
- if (Machine == EM_386 || Machine == EM_X86_64) {
- DwarfCFIEH::PrinterContext<ELFT> Ctx(W, ObjF);
- return Ctx.printUnwindInformation();
- }
- W.startLine() << "UnwindInfo not implemented.\n";
+ DwarfCFIEH::PrinterContext<ELFT> Ctx(W, ObjF);
+ Ctx.printUnwindInformation();
}
namespace {
@@ -1905,9 +1901,10 @@ template <> void ELFDumper<ELF32LE>::printUnwindInfo() {
const unsigned Machine = Obj->getHeader()->e_machine;
if (Machine == EM_ARM) {
ARM::EHABI::PrinterContext<ELF32LE> Ctx(W, Obj, DotSymtabSec);
- return Ctx.PrintUnwindInformation();
+ Ctx.PrintUnwindInformation();
}
- W.startLine() << "UnwindInfo not implemented.\n";
+ DwarfCFIEH::PrinterContext<ELF32LE> Ctx(W, ObjF);
+ Ctx.printUnwindInformation();
}
} // end anonymous namespace
OpenPOWER on IntegriCloud