# Test that LLDB can read executables with DWARF sections generated by Clang

# RUN: yaml2obj %s -o %t
# RUN: lldb-test object-file %t | FileCheck %s

# CHECK: Name: .debug_abbrev
# CHECK-NEXT: Type: dwarf-abbrev

# CHECK: Name: .debug_addr
# CHECK-NEXT: Type: dwarf-addr

# CHECK: Name: .debug_aranges
# CHECK-NEXT: Type: dwarf-aranges

# CHECK: Name: .debug_info
# CHECK-NEXT: Type: dwarf-info

# CHECK: Name: .debug_line
# CHECK-NEXT: Type: dwarf-line

# CHECK: Name: .debug_line_str
# CHECK-NEXT: Type: dwarf-line-str

# CHECK: Name: .debug_rnglists
# CHECK-NEXT: Type: dwarf-rnglists

# CHECK: Name: .debug_str
# CHECK-NEXT: Type: dwarf-str

# CHECK: Name: .debug_str_offsets
# CHECK-NEXT: Type: dwarf-str-offsets

--- !COFF
OptionalHeader:
  AddressOfEntryPoint: 4956
  ImageBase:       5368709120
  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_HIGH_ENTROPY_VA, 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_AMD64
  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
sections:
  - Name:            .text
    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  4096
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .rdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  401408
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .data
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
    VirtualAddress:  479232
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .pdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  491520
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .fptable
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
    VirtualAddress:  512000
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            _RDATA
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  516096
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            _guard_c
    Characteristics: [  ]
    VirtualAddress:  520192
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            _guard_d
    Characteristics: [  ]
    VirtualAddress:  524288
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            memcpy_
    Characteristics: [  ]
    VirtualAddress:  528384
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .reloc
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  532480
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_abbrev
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  536576
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_addr
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  540672
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_aranges
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  544768
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_info
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  548864
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_line
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  552960
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_line_str
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  557056
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_rnglists
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  561152
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_str
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  565248
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_str_offsets
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  569344
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
symbols:         []
...
