summaryrefslogtreecommitdiff
path: root/tools/llvm-readobj/ELFDumper.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-01-08 03:28:09 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-01-08 03:28:09 +0000
commitbc41190a74eabd0020c089c67beb9cb706f630ed (patch)
tree1ce91bc779b5a0b53bef32ec768981ba6a81319e /tools/llvm-readobj/ELFDumper.cpp
parent9e0fd27ce7cd1a7b1a316760de7cf4795799af26 (diff)
downloadllvm-bc41190a74eabd0020c089c67beb9cb706f630ed.tar.gz
llvm-bc41190a74eabd0020c089c67beb9cb706f630ed.tar.bz2
llvm-bc41190a74eabd0020c089c67beb9cb706f630ed.tar.xz
llvm-readobj: add support for ARM EHABI unwind info
This adds some preliminary support for decoding ARM EHABI unwinding information. The major functionality that remains from complete support is bytecode translation. Each Unwind Index Table is printed out as a separate entity along with its section index, name, offset, and entries. Each entry lists the function address, and if possible, the name, of the function to which it corresponds. The encoding model, personality routine or index, and byte code is also listed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj/ELFDumper.cpp')
-rw-r--r--tools/llvm-readobj/ELFDumper.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp
index 0e0c0e08c0..b82cecdd4d 100644
--- a/tools/llvm-readobj/ELFDumper.cpp
+++ b/tools/llvm-readobj/ELFDumper.cpp
@@ -16,6 +16,7 @@
#include "Error.h"
#include "ObjDumper.h"
#include "StreamWriter.h"
+#include "ARMEHABIPrinter.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Object/ELFObjectFile.h"
@@ -774,6 +775,18 @@ void ELFDumper<ELFT>::printUnwindInfo() {
W.startLine() << "UnwindInfo not implemented.\n";
}
+namespace {
+template <>
+void ELFDumper<ELFType<support::little, 2, false> >::printUnwindInfo() {
+ const unsigned Machine = Obj->getHeader()->e_machine;
+ if (Machine == EM_ARM) {
+ ARM::EHABI::PrinterContext<ELFType<support::little, 2, false> > Ctx(W, Obj);
+ return Ctx.PrintUnwindInformation();
+ }
+ W.startLine() << "UnwindInfo not implemented.\n";
+}
+}
+
template<class ELFT>
void ELFDumper<ELFT>::printDynamicTable() {
typedef typename ELFO::Elf_Dyn_Iter EDI;