aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-dwarfdump/X86/debug-str-offsets-mixed-dwarf-4-5.yaml
blob: d10460896171d6e098b30949e716ddfec0ee3b17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# RUN: yaml2obj %s -o %t.o
# RUN: llvm-dwarfdump -debug-str-offsets -verify %t.o | FileCheck %s

# CHECK: Verifying .debug_str_offsets...
# CHECK: No errors

# Check that when mixing standard DWARF 4 debug information with standard DWARF
# 5 debug information, the verifier correctly interprets the debug_str_offsets
# section as a standards-conforming DWARF 5 section.

--- !ELF
FileHeader:
  Class: ELFCLASS64
  Data:  ELFDATA2LSB
  Type:  ET_EXEC
DWARF:
  debug_str:
    - 'cu1'
    - 'cu2'
  debug_str_offsets:
    - Offsets:
        - 0x0
  debug_abbrev:
    - Table:
        - Code:            0x1
          Tag:             DW_TAG_compile_unit
          Children:        DW_CHILDREN_no
          Attributes:
            - Attribute:       DW_AT_name
              Form:            DW_FORM_strp
        - Code:            0x2
          Tag:             DW_TAG_compile_unit
          Children:        DW_CHILDREN_no
          Attributes:
            - Attribute:       DW_AT_name
              Form:            DW_FORM_strx1
            - Attribute:       DW_AT_str_offsets_base
              Form:            DW_FORM_sec_offset
  debug_info:
    - Version:         4
      AbbrevTableID:   0
      AbbrOffset:      0x0
      AddrSize:        8
      Entries:
        - AbbrCode:        0x1
          Values:
            - Value:           0x4
    - Version:         5
      UnitType:        DW_UT_compile
      AbbrOffset:      0x0
      AddrSize:        8
      AbbrevTableID:   0
      Entries:
        - AbbrCode:        0x2
          Values:
            - Value:           0x0
            - Value:           0x8 # str offsets base