llvm-project/llvm/test/tools/llvm-dwarfutil/ELF/X86/warning-skipped-macinfo.test

63 lines
1.8 KiB
Plaintext

## This test checks the warning message displayed if input file
## contains non-empty .debug_macinfo section. Warning message
## should not be displayed if .debug_macinfo is empty.
# RUN: yaml2obj -D MACINFO_CONTENT="0000" %s -o %t.o
# RUN: llvm-dwarfutil --garbage-collection %t.o %t1 2>&1 \
# RUN: | FileCheck %s -DFILE=%t.o --check-prefix=NOWARN --allow-empty
# RUN: yaml2obj -D MACINFO_CONTENT="0001" %s -o %t.o
# RUN: llvm-dwarfutil --garbage-collection %t.o %t1 2>&1 \
# RUN: | FileCheck %s -DFILE=%t.o --check-prefix=WARN
# WARN: [[FILE]]: warning: '.debug_macinfo' is not currently supported: file will be skipped
# NOWARN-NOT: warning
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
AddressAlign: 0x0000000000000010
Content: "FFFFFFFF"
- Name: .debug_macinfo
Type: SHT_PROGBITS
Flags: [ ]
Content: [[MACINFO_CONTENT]]
DWARF:
debug_abbrev:
- Table:
- Tag: DW_TAG_compile_unit
Children: DW_CHILDREN_yes
Attributes:
- Attribute: DW_AT_producer
Form: DW_FORM_string
- Attribute: DW_AT_language
Form: DW_FORM_data2
- Attribute: DW_AT_name
Form: DW_FORM_string
- Attribute: DW_AT_low_pc
Form: DW_FORM_addr
- Attribute: DW_AT_high_pc
Form: DW_FORM_data8
debug_info:
- Version: 4
Entries:
- AbbrCode: 1
Values:
- CStr: by_hand
- Value: 0x04
- CStr: CU1
- Value: 0x1000
- Value: 0x4
- AbbrCode: 0
...