diff options
author | Rui Ueyama <ruiu@google.com> | 2013-09-27 00:07:01 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2013-09-27 00:07:01 +0000 |
commit | 0c873adc82a81b0bce317c3e2cb3139e990a0f9e (patch) | |
tree | 5e84958bcbb706131e88776ef82c8fcafbc404c5 /test/tools/llvm-objdump/win64-unwind-data.test | |
parent | deac137da710cd8566b857ee9d1e182d4fd35932 (diff) | |
download | llvm-0c873adc82a81b0bce317c3e2cb3139e990a0f9e.tar.gz llvm-0c873adc82a81b0bce317c3e2cb3139e990a0f9e.tar.bz2 llvm-0c873adc82a81b0bce317c3e2cb3139e990a0f9e.tar.xz |
llvm-objdump: Dump COFF import table if -private-headers option is given.
This is a patch to add capability to llvm-objdump to dump COFF Import Table
entries, so that we can write tests for LLD checking Import Table contents.
llvm-objdump did not print anything but just file name if the format is COFF
and -private-headers option is given. This is a patch adds capability for
dumping DLL Import Table, which is specific to the COFF format.
In this patch I defined a new iterator to iterate over import table entries.
Also added a few functions to COFFObjectFile.cpp to access fields of the entry.
Differential Revision: http://llvm-reviews.chandlerc.com/D1719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191472 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tools/llvm-objdump/win64-unwind-data.test')
-rw-r--r-- | test/tools/llvm-objdump/win64-unwind-data.test | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/test/tools/llvm-objdump/win64-unwind-data.test b/test/tools/llvm-objdump/win64-unwind-data.test new file mode 100644 index 0000000000..a723ffed3e --- /dev/null +++ b/test/tools/llvm-objdump/win64-unwind-data.test @@ -0,0 +1,52 @@ +// This test checks that the unwind data is dumped by llvm-objdump. +// RUN: llvm-objdump -u %p/Inputs/win64-unwind.exe.coff-x86_64 | FileCheck %s + +CHECK: Unwind info: +CHECK: Function Table: +CHECK-NEXT: Start Address: func +CHECK-NEXT: End Address: func + 0x001b +CHECK-NEXT: Unwind Info Address: .xdata +CHECK-NEXT: Version: 1 +CHECK-NEXT: Flags: 1 UNW_ExceptionHandler +CHECK-NEXT: Size of prolog: 18 +CHECK-NEXT: Number of Codes: 8 +CHECK-NEXT: Frame register: RBX +CHECK-NEXT: Frame offset: 0 +CHECK-NEXT: Unwind Codes: +CHECK-NEXT: 0x12: UOP_SetFPReg +CHECK-NEXT: 0x0f: UOP_PushNonVol RBX +CHECK-NEXT: 0x0e: UOP_SaveXMM128 XMM8 [0x0000] +CHECK-NEXT: 0x09: UOP_SaveNonVol RSI [0x0010] +CHECK-NEXT: 0x04: UOP_AllocSmall 24 +CHECK-NEXT: 0x00: UOP_PushMachFrame w/o error code +CHECK: Function Table: +CHECK-NEXT: Start Address: func + 0x0012 +CHECK-NEXT: End Address: func + 0x0012 +CHECK-NEXT: Unwind Info Address: .xdata + 0x001c +CHECK-NEXT: Version: 1 +CHECK-NEXT: Flags: 4 UNW_ChainInfo +CHECK-NEXT: Size of prolog: 0 +CHECK-NEXT: Number of Codes: 0 +CHECK-NEXT: No frame pointer used +CHECK: Function Table: +CHECK-NEXT: Start Address: smallFunc +CHECK-NEXT: End Address: smallFunc + 0x0001 +CHECK-NEXT: Unwind Info Address: .xdata + 0x002c +CHECK-NEXT: Version: 1 +CHECK-NEXT: Flags: 0 +CHECK-NEXT: Size of prolog: 0 +CHECK-NEXT: Number of Codes: 0 +CHECK-NEXT: No frame pointer used +CHECK: Function Table: +CHECK-NEXT: Start Address: allocFunc +CHECK-NEXT: End Address: allocFunc + 0x001d +CHECK-NEXT: Unwind Info Address: .xdata + 0x0034 +CHECK-NEXT: Version: 1 +CHECK-NEXT: Flags: 0 +CHECK-NEXT: Size of prolog: 14 +CHECK-NEXT: Number of Codes: 6 +CHECK-NEXT: No frame pointer used +CHECK-NEXT: Unwind Codes: +CHECK-NEXT: 0x0e: UOP_AllocLarge 8454128 +CHECK-NEXT: 0x07: UOP_AllocLarge 8190 +CHECK-NEXT: 0x00: UOP_PushMachFrame w/o error code |