diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-01-08 03:28:09 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-01-08 03:28:09 +0000 |
commit | be981ebcf07fee5a14c6a298d83bed5a473db7cc (patch) | |
tree | d8aa3bd191f94f4aaea0bfc1759bef47d0ecc099 /llvm/tools/llvm-readobj/ELFDumper.cpp | |
parent | ddc793674fe6c1cb1a69ce4f23ecd63637e93ad8 (diff) | |
download | llvm-be981ebcf07fee5a14c6a298d83bed5a473db7cc.zip llvm-be981ebcf07fee5a14c6a298d83bed5a473db7cc.tar.gz llvm-be981ebcf07fee5a14c6a298d83bed5a473db7cc.tar.bz2 |
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.
llvm-svn: 198734
Diffstat (limited to 'llvm/tools/llvm-readobj/ELFDumper.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/ELFDumper.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 0e0c0e0..b82cecd 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/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; |