xref: /llvm-project-15.0.7/llvm/test/DebugInfo/X86/debug-macro-empty-str-offset.s (revision 92f2d02b)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## This test checks that llvm-dwarfdump produces error message
2## while parsing an *_strx form, if units contribution to
3## debug_str_offsets[.dwo] section is missing.
4
5# RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %s -o -| \
6# RUN:   not llvm-dwarfdump -debug-macro - /dev/null 2>&1 | FileCheck %s
7
8# CHECK: error: DW_FORM_strx used without a valid string offsets table
9
10       .section        .debug_abbrev,"",@progbits
11       .byte   1                       # Abbreviation Code
12       .byte   17                      # DW_TAG_compile_unit
13       .byte   0                       # DW_CHILDREN_no
14       .byte   121                     # DW_AT_macros
15       .byte   23                      # DW_FORM_sec_offset
16       .byte   0                       # EOM(1)
17       .byte   0                       # EOM(2)
18       .byte   0                       # EOM(3)
19
20       .section        .debug_info,"",@progbits
21.Lcu_begin0:
22       .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
23.Ldebug_info_start0:
24       .short  5                      # DWARF version number
25       .byte   1                       # DWARF Unit Type
26       .byte   8                       # Address Size (in bytes)
27       .long   .debug_abbrev           # Offset Into Abbrev. Section
28       .byte   1                       # Abbrev [1] 0xc:0x12 DW_TAG_compile_unit
29       .long   .Lcu_macro_begin0       # DW_AT_macros
30.Ldebug_info_end0:
31
32       .section        .debug_macro,"",@progbits
33.Lcu_macro_begin0:
34       .short  5                      # Macro information version
35       .byte   0                       # Flags: 32 bit
36       .byte   11                      # DW_MACRO_define_strx
37

served by {OpenGrok

Last Index Update: Tue Oct 21 18:42:31 GMT 2025