Files
TheRock/compiler/amd-llvm/llvm/test/tools/obj2yaml/MachO/debug-aranges.yaml
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

140 lines
4.3 KiB
YAML

## a) Test that we are able to dump the __debug_aranges section.
## The content of the __debug_aranges section should be written in
## the "DWARF" entry and the "content" field should remain empty.
# RUN: yaml2obj --docnum=1 %s | obj2yaml | FileCheck -DSEGNAME=DWARF %s --check-prefix=ARANGES
# ARANGES: Sections:
# ARANGES-NEXT: - sectname: __debug_aranges
# ARANGES-NEXT: segname: __[[SEGNAME]]
# ARANGES-NEXT: addr: 0x0
# ARANGES-NEXT: size: 64
# ARANGES-NEXT: offset: 0x210
# ARANGES-NEXT: align: 0
# ARANGES-NEXT: reloff: 0x0
# ARANGES-NEXT: nreloc: 0
# ARANGES-NEXT: flags: 0x0
# ARANGES-NEXT: reserved1: 0x0
# ARANGES-NEXT: reserved2: 0x0
# ARANGES-NEXT: reserved3: 0x0
# ARANGES-NEXT: DWARF:
# ARANGES-NEXT: debug_aranges:
# ARANGES-NEXT: - Length: 0x3C
# ARANGES-NEXT: Version: 2
# ARANGES-NEXT: CuOffset: 0x1234
# ARANGES-NEXT: AddressSize: 0x8
# ARANGES-NEXT: Descriptors:
# ARANGES-NEXT: - Address: 0x1234
# ARANGES-NEXT: Length: 0x5678
# ARANGES-NEXT: - Address: 0x1234
# ARANGES-NEXT: Length: 0x5678
--- !mach-o
IsLittleEndian: true
FileHeader:
magic: 0xFEEDFACF
cputype: 0x01000007
cpusubtype: 0x00000003
filetype: 0x0000000A
ncmds: 1
sizeofcmds: 232
flags: 0x00000000
reserved: 0x00000000
LoadCommands:
- cmd: LC_SEGMENT_64
cmdsize: 152
segname: __DWARF
vmaddr: 0x00
vmsize: 0x00
fileoff: 0x00
filesize: 0x00
maxprot: 0
initprot: 0
nsects: 1
flags: 0
Sections:
- sectname: __debug_aranges
segname: __DWARF
addr: 0x00
size: 64
offset: 528
align: 0
reloff: 0x00000000
nreloc: 0
flags: 0x00000000
reserved1: 0x00000000
reserved2: 0x00000000
reserved3: 0x00000000
DWARF:
debug_aranges:
- Length: [[LENGTH=<none>]]
Version: 2
CuOffset: 0x1234
Descriptors:
- Address: 0x1234
Length: 0x5678
- Address: 0x1234
Length: 0x5678
## b) Test dumping a __debug_aranges section whose length field doesn't match the actual length.
## This makes the DWARF parser fail to parse it and we will dump it as a raw content section.
# RUN: yaml2obj --docnum=1 -DLENGTH=0x2 %s | obj2yaml | FileCheck %s --check-prefix=RAW-CONTENT
# RAW-CONTENT: - sectname: __debug_aranges
# RAW-CONTENT-NEXT: segname: __DWARF
# RAW-CONTENT-NEXT: addr: 0x0
# RAW-CONTENT-NEXT: size: 64
# RAW-CONTENT-NEXT: offset: 0x210
# RAW-CONTENT-NEXT: align: 0
# RAW-CONTENT-NEXT: reloff: 0x0
# RAW-CONTENT-NEXT: nreloc: 0
# RAW-CONTENT-NEXT: flags: 0x0
# RAW-CONTENT-NEXT: reserved1: 0x0
# RAW-CONTENT-NEXT: reserved2: 0x0
# RAW-CONTENT-NEXT: reserved3: 0x0
# RAW-CONTENT-NEXT: content: '02000000020034120000080000000000341200000000000078560000000000003412000000000000785600000000000000000000000000000000000000000000'
# RAW-CONTENT-NEXT: ...
## c) Test dumping a __debug_aranges section whose segname is __FOO.
# RUN: yaml2obj --docnum=2 %s | obj2yaml | FileCheck %s -DSEGNAME=FOO --check-prefix=ARANGES
--- !mach-o
IsLittleEndian: true
FileHeader:
magic: 0xFEEDFACF
cputype: 0x01000007
cpusubtype: 0x00000003
filetype: 0x0000000A
ncmds: 1
sizeofcmds: 232
flags: 0x00000000
reserved: 0x00000000
LoadCommands:
- cmd: LC_SEGMENT_64
cmdsize: 152
segname: __DWARF
vmaddr: 0x00
vmsize: 0x00
fileoff: 0x00
filesize: 0x00
maxprot: 0
initprot: 0
nsects: 1
flags: 0
Sections:
- sectname: __debug_aranges
segname: __FOO
addr: 0x00
size: 64
offset: 528
align: 0
reloff: 0x00000000
nreloc: 0
flags: 0x00000000
reserved1: 0x00000000
reserved2: 0x00000000
reserved3: 0x00000000
content: '3C000000020034120000080000000000341200000000000078560000000000003412000000000000785600000000000000000000000000000000000000000000'