xref: /llvm-project/llvm/test/DebugInfo/X86/debug-macro-empty-str-offset.s (revision 92f2d02b4a315eb91cd59e90394c0805123a96fa)
193aee9caSSourabh Singh Tomar## This test checks that llvm-dwarfdump produces error message
293aee9caSSourabh Singh Tomar## while parsing an *_strx form, if units contribution to
393aee9caSSourabh Singh Tomar## debug_str_offsets[.dwo] section is missing.
493aee9caSSourabh Singh Tomar
593aee9caSSourabh Singh Tomar# RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %s -o -| \
693aee9caSSourabh Singh Tomar# RUN:   not llvm-dwarfdump -debug-macro - /dev/null 2>&1 | FileCheck %s
793aee9caSSourabh Singh Tomar
8*92f2d02bSDavid Blaikie# CHECK: error: DW_FORM_strx used without a valid string offsets table
993aee9caSSourabh Singh Tomar
1093aee9caSSourabh Singh Tomar       .section        .debug_abbrev,"",@progbits
1193aee9caSSourabh Singh Tomar       .byte   1                       # Abbreviation Code
1293aee9caSSourabh Singh Tomar       .byte   17                      # DW_TAG_compile_unit
1393aee9caSSourabh Singh Tomar       .byte   0                       # DW_CHILDREN_no
1493aee9caSSourabh Singh Tomar       .byte   121                     # DW_AT_macros
1593aee9caSSourabh Singh Tomar       .byte   23                      # DW_FORM_sec_offset
1693aee9caSSourabh Singh Tomar       .byte   0                       # EOM(1)
1793aee9caSSourabh Singh Tomar       .byte   0                       # EOM(2)
1893aee9caSSourabh Singh Tomar       .byte   0                       # EOM(3)
1993aee9caSSourabh Singh Tomar
2093aee9caSSourabh Singh Tomar       .section        .debug_info,"",@progbits
2193aee9caSSourabh Singh Tomar.Lcu_begin0:
2293aee9caSSourabh Singh Tomar       .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
2393aee9caSSourabh Singh Tomar.Ldebug_info_start0:
2493aee9caSSourabh Singh Tomar       .short  5                      # DWARF version number
2593aee9caSSourabh Singh Tomar       .byte   1                       # DWARF Unit Type
2693aee9caSSourabh Singh Tomar       .byte   8                       # Address Size (in bytes)
2793aee9caSSourabh Singh Tomar       .long   .debug_abbrev           # Offset Into Abbrev. Section
2893aee9caSSourabh Singh Tomar       .byte   1                       # Abbrev [1] 0xc:0x12 DW_TAG_compile_unit
2993aee9caSSourabh Singh Tomar       .long   .Lcu_macro_begin0       # DW_AT_macros
3093aee9caSSourabh Singh Tomar.Ldebug_info_end0:
3193aee9caSSourabh Singh Tomar
3293aee9caSSourabh Singh Tomar       .section        .debug_macro,"",@progbits
3393aee9caSSourabh Singh Tomar.Lcu_macro_begin0:
3493aee9caSSourabh Singh Tomar       .short  5                      # Macro information version
3593aee9caSSourabh Singh Tomar       .byte   0                       # Flags: 32 bit
3693aee9caSSourabh Singh Tomar       .byte   11                      # DW_MACRO_define_strx
37