# Test that LLDB can read executables with DWARF sections generated by GCC on MinGW

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

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

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

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

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

# CHECK: Name: .debug_frame
# CHECK-NEXT: Type: dwarf-frame

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

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

# CHECK: Name: .debug_loclists
# CHECK-NEXT: Type: dwarf-loclists

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

--- !COFF
OptionalHeader:
  AddressOfEntryPoint: 5136
  ImageBase:       5368709120
  SectionAlignment: 4096
  FileAlignment:   512
  MajorOperatingSystemVersion: 4
  MinorOperatingSystemVersion: 0
  MajorImageVersion: 0
  MinorImageVersion: 0
  MajorSubsystemVersion: 5
  MinorSubsystemVersion: 2
  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT ]
  SizeOfStackReserve: 2097152
  SizeOfStackCommit: 4096
  SizeOfHeapReserve: 1048576
  SizeOfHeapCommit: 4096
header:
  Machine:         IMAGE_FILE_MACHINE_AMD64
  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LINE_NUMS_STRIPPED, 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:            .data
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
    VirtualAddress:  12288
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .rdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  16384
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .pdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  20480
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .xdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  24576
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .bss
    Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
    VirtualAddress:  28672
    VirtualSize:     384
    SectionData:     ''
  - Name:            .idata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  32768
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .tls
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
    VirtualAddress:  36864
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .rsrc
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  40960
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .reloc
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  45056
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_aranges
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  49152
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_info
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  53248
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_abbrev
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  98304
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_line
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  106496
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_frame
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  114688
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_str
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  118784
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_line_str
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  122880
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_loclists
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  131072
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
  - Name:            .debug_rnglists
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  139264
    VirtualSize:     64
    SectionData:     DEADBEEFBAADF00D
symbols:         []
...
