tools: initial implementation of WoA EH decoding

Add support to llvm-readobj to decode Windows ARM Exception Handling data.  This
uses the previously added datastructures to decode the information into a format
that can be used by tests.  This is a necessary step to add support for emitting
Windows on ARM exception handling information.

A fair amount of formatting inspiration is drawn from the Win64 EH printer as
well as the ARM EHABI printer.  This allows for a reasonably thorough look into
the encoded data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210192 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool
2014-06-04 15:47:15 +00:00
parent b35de82adc
commit fe3b74ec71
4 changed files with 812 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include "Error.h"
#include "ObjDumper.h"
#include "StreamWriter.h"
#include "ARMWinEHPrinter.h"
#include "Win64EHDumper.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallString.h"
@ -858,6 +859,11 @@ void COFFDumper::printUnwindInfo() {
Dumper.printData(Ctx);
break;
}
case COFF::IMAGE_FILE_MACHINE_ARMNT: {
ARM::WinEH::Decoder Decoder(W);
Decoder.dumpProcedureData(*Obj);
break;
}
default:
W.printEnum("unsupported Image Machine", Header->Machine,
makeArrayRef(ImageFileMachineType));