Files
clang-p2996/lldb/test/Shell/ObjectFile/PECOFF/settings-abi-i686.yaml
Martin Storsjö 4270c9cd44 [lldb] Stop passing both i386 and i686 in parallel as architectures on Windows
When an object file returns multiple architectures, it is treated
as a fat binary - which really isn't the case of i386 vs i686 where
the object file actually has one architecture.

This allows getting rid of hardcoded architecture triples in
PlatformWindows.

The parallel i386 and i686 architecture strings stem from
5e6f45201f / D7120 and
ad587ae4ca / D4658.

Differential Revision: https://reviews.llvm.org/D128617
2022-07-06 12:13:36 +03:00

62 lines
2.3 KiB
YAML

## Check that i386 executables can be opened in both ABI modes.
## I386 executables are special in the sense that the PECOFF object
## file plugin returns two architectures for them, i386 and i686, which
## causes more elaborate comparisons to be run against the Platform plugin's
## architecture list. Check that this is accepted despite potential mismatches
## in the environment part of the triple.
# RUN: yaml2obj %s -o %t
## Default ABI is msvc:
# RUN: %lldb -O "settings set plugin.object-file.pe-coff.abi msvc" \
# RUN: -f %t -o "image list --triple --basename" -o exit | \
# RUN: FileCheck -DABI=msvc -DFILENAME=%basename_t.tmp %s
## Default ABI is gnu:
# RUN: %lldb -O "settings set plugin.object-file.pe-coff.abi gnu" \
# RUN: -f %t -o "image list --triple --basename" -o exit | \
# RUN: FileCheck -DABI=gnu -DFILENAME=%basename_t.tmp %s
# CHECK-LABEL: image list --triple --basename
# CHECK-NEXT: i386-pc-windows-[[ABI]] [[FILENAME]]
--- !COFF
OptionalHeader:
AddressOfEntryPoint: 4480
ImageBase: 268435456
SectionAlignment: 4096
FileAlignment: 512
MajorOperatingSystemVersion: 6
MinorOperatingSystemVersion: 0
MajorImageVersion: 0
MinorImageVersion: 0
MajorSubsystemVersion: 6
MinorSubsystemVersion: 0
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
SizeOfStackReserve: 1048576
SizeOfStackCommit: 4096
SizeOfHeapReserve: 1048576
SizeOfHeapCommit: 4096
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_32BIT_MACHINE ]
sections:
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
VirtualAddress: 4096
VirtualSize: 64
SectionData: DEADBEEFBAADF00D
- Name: .data
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
VirtualAddress: 8192
VirtualSize: 64
SectionData: DEADBEEFBAADF00D
- Name: .debug_info
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
VirtualAddress: 16384
VirtualSize: 64
SectionData: DEADBEEFBAADF00D
symbols: []
...