summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/ELFDumper.cpp
diff options
context:
space:
mode:
authorRafael Auler <rafaelauler@fb.com>2018-03-08 00:46:53 +0000
committerRafael Auler <rafaelauler@fb.com>2018-03-08 00:46:53 +0000
commit86fb7bf2bca553bc7137e85d0ac0c7a809e16c80 (patch)
tree6af7787dea9d397d6c399d683cbeff5d2dbd17db /llvm/tools/llvm-readobj/ELFDumper.cpp
parenta4259cd3a6268d6b7e27acd45fd6f114e2ac9ac2 (diff)
downloadbcm5719-llvm-86fb7bf2bca553bc7137e85d0ac0c7a809e16c80.tar.gz
bcm5719-llvm-86fb7bf2bca553bc7137e85d0ac0c7a809e16c80.zip
Reland "[DebugInfo] Support DWARF expressions in eh_frame"
Summary: Original change was D43313 (r326932) and reverted by r326953 because it broke an LLD test and a windows build. The LLD test was already fixed in lld commit r326944 (thanks maskray). This is the original change with the windows build fixed. llvm-svn: 326970
Diffstat (limited to 'llvm/tools/llvm-readobj/ELFDumper.cpp')
-rw-r--r--llvm/tools/llvm-readobj/ELFDumper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index 36cda459225..6b6582b7566 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//
#include "ARMEHABIPrinter.h"
+#include "DwarfCFIEHPrinter.h"
#include "Error.h"
#include "ObjDumper.h"
#include "StackMapPrinter.h"
@@ -1808,6 +1809,11 @@ void ELFDumper<ELFT>::printValue(uint64_t Type, uint64_t Value) {
template<class ELFT>
void ELFDumper<ELFT>::printUnwindInfo() {
+ const unsigned Machine = Obj->getHeader()->e_machine;
+ if (Machine == EM_386 || Machine == EM_X86_64) {
+ DwarfCFIEH::PrinterContext<ELFT> Ctx(W, Obj);
+ return Ctx.printUnwindInformation();
+ }
W.startLine() << "UnwindInfo not implemented.\n";
}
OpenPOWER on IntegriCloud