| 1 |
# Demonstrate dumping DW_AT_language_version in human-readable form. |
| 2 |
# RUN: llvm-mc -triple=x86_64--linux -filetype=obj -o %t.o < %s |
| 3 |
# RUN: llvm-dwarfdump %t.o -v | FileCheck %s --check-prefix=VERBOSE |
| 4 |
# RUN: llvm-dwarfdump %t.o | FileCheck %s --check-prefix=NO-VERBOSE |
| 5 |
|
| 6 |
# VERBOSE: .debug_info contents: |
| 7 |
# VERBOSE: DW_AT_language_name [DW_FORM_data2] (DW_LNAME_C) |
| 8 |
# VERBOSE: DW_AT_language_version [DW_FORM_data4] (201112 C11) |
| 9 |
# VERBOSE: DW_AT_language_name [DW_FORM_data2] (0x0000) |
| 10 |
# VERBOSE: DW_AT_language_version [DW_FORM_data4] (12 Unknown) |
| 11 |
|
| 12 |
# NO-VERBOSE: .debug_info contents: |
| 13 |
# NO-VERBOSE: DW_AT_language_name (DW_LNAME_C) |
| 14 |
# NO-VERBOSE: DW_AT_language_version (C11) |
| 15 |
# NO-VERBOSE: DW_AT_language_name (0x0000) |
| 16 |
# NO-VERBOSE: DW_AT_language_version (Unknown) |
| 17 |
|
| 18 |
.section .debug_abbrev,"",@progbits |
| 19 |
.byte 1 # Abbreviation Code |
| 20 |
.byte 17 # DW_TAG_compile_unit |
| 21 |
.byte 1 # DW_CHILDREN_no |
| 22 |
.ascii "\220\001" # DW_AT_language_name |
| 23 |
.byte 5 # DW_FORM_data2 |
| 24 |
.ascii "\221\001" # DW_AT_language_version |
| 25 |
.byte 6 # DW_FORM_data4 |
| 26 |
.byte 0 # EOM(1) |
| 27 |
.byte 0 # EOM(2) |
| 28 |
.byte 0 # EOM(3) |
| 29 |
|
| 30 |
.section .debug_info,"",@progbits |
| 31 |
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit |
| 32 |
.Ldebug_info_start0: |
| 33 |
.short 5 # DWARF version number |
| 34 |
.byte 1 # Unit type |
| 35 |
.byte 8 # Address Size (in bytes) |
| 36 |
.long .debug_abbrev # Offset Into Abbrev. Section |
| 37 |
.byte 1 # Abbrev [1] DW_TAG_compile_unit |
| 38 |
.short 3 # DW_AT_language_name |
| 39 |
.long 201112 # DW_AT_language_version |
| 40 |
.byte 1 # Abbrev [1] DW_TAG_compile_unit |
| 41 |
.short 0 # DW_AT_language_name |
| 42 |
.long 12 # DW_AT_language_version |
| 43 |
.byte 0 |
| 44 |
.Ldebug_info_end0: |