1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/test/DebugInfo/X86/dwarfdump-str-offsets-invalid-1.s
Wolfgang Pieb 6ac9f9bfcd [NFC] Change the string offsets table tests to generate the object on the fly
which enables us to remove the test scripts and object files from the repository.

https://reviews.llvm.org/D40914

llvm-svn: 320227
2017-12-09 00:39:53 +00:00

38 lines
1.4 KiB
ArmAsm

# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o
# RUN: llvm-dwarfdump -v %t.o | FileCheck --check-prefix=INVALIDCONTRIB %s
#
# Test object to verify that llvm-dwarfdump handles an invalid string offsets
# table.
#
# A rudimentary abbrev section.
.section .debug_abbrev,"",@progbits
.byte 0x01 # Abbrev code
.byte 0x11 # DW_TAG_compile_unit
.byte 0x00 # DW_CHILDREN_no
.byte 0x00 # EOM(1)
.byte 0x00 # EOM(2)
.byte 0x00 # EOM(3)
# A rudimentary compile unit to convince dwarfdump that we are dealing with a
# DWARF v5 string offsets table.
.section .debug_info,"",@progbits
# DWARF v5 CU header.
.long CU1_5_end-CU1_5_version # Length of Unit
CU1_5_version:
.short 5 # DWARF version number
.byte 1 # DWARF Unit Type
.byte 8 # Address Size (in bytes)
.long .debug_abbrev # Offset Into Abbrev. Section
# A compile-unit DIE, which has no attributes.
.byte 1 # Abbreviation code
CU1_5_end:
.section .debug_str_offsets,"",@progbits
# A degenerate section, not enough for a single contribution size.
.byte 2
# INVALIDCONTRIB: .debug_str_offsets contents:
# INVALIDCONTRIB-NOT: contents:
# INVALIDCONTRIB: error: invalid contribution to string offsets table in section .debug_str_offsets.