File: multiple_debug_info_sections_in_dwp.s

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (24 lines) | stat: -rw-r--r-- 1,300 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.dwp
# RUN: not llvm-dwp %t.dwp -o /dev/null 2>&1 | FileCheck %s

## Note: To reach the test point, we need to use comdat groups, to have multiple
## .debug_info sections. One comdat group needs to have one complete unit header,
## the second one may be completely empty. 
## Furthermore, the .debug_cu_index also does not need to be complete.

# CHECK: error: expected exactly one occurrence of a debug info section in a .dwp file
    .section	.debug_info.dwo,"G",@progbits,0xFDFDFDFD,comdat
    .long	.Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit
.Ldebug_info_dwo_start1:
    .short	5                               # DWARF version number
    .byte	5                               # DWARF Unit Type (DW_UT_split_compile)
    .byte	8                               # Address Size (in bytes)
    .long	0                               # Offset Into Abbrev. Section
    .quad	-1506010254921578184
    .byte	1                               # Abbrev [1] DW_TAG_compile_unit
.Ldebug_info_dwo_end1:
.section	.debug_info.dwo,"G",@progbits,0xDFDFDFDF,comdat
    .long	0                               # Length of Unit
  .section .debug_cu_index, "", @progbits
## Incomplete Header:
    .long 2                         # Version