2018-12-23 06:20:47 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
# RUN: ld.lld --gdb-index %t.o -o %t
|
|
|
|
# RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s
|
|
|
|
|
|
|
|
# CHECK: Address area offset = 0x28, has 1 entries:
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 0
|
2018-12-23 06:20:47 +08:00
|
|
|
|
2018-12-24 18:18:07 +08:00
|
|
|
.text
|
|
|
|
.globl main
|
|
|
|
main: # @main
|
2018-12-23 06:20:47 +08:00
|
|
|
.Lfunc_begin0:
|
2018-12-24 18:18:07 +08:00
|
|
|
retq
|
2018-12-23 06:20:47 +08:00
|
|
|
.Lfunc_end0:
|
2018-12-24 18:18:07 +08:00
|
|
|
.section .debug_abbrev,"",@progbits
|
|
|
|
.byte 1 # Abbreviation Code
|
|
|
|
.byte 17 # DW_TAG_compile_unit
|
|
|
|
.byte 0 # DW_CHILDREN_no
|
|
|
|
.byte 115 # DW_AT_addr_base
|
|
|
|
.byte 23 # DW_FORM_sec_offset
|
|
|
|
.byte 17 # DW_AT_low_pc
|
|
|
|
.byte 27 # DW_FORM_addrx
|
|
|
|
.byte 18 # DW_AT_high_pc
|
|
|
|
.byte 6 # DW_FORM_data4
|
|
|
|
.byte 0 # EOM(1)
|
|
|
|
.byte 0 # EOM(2)
|
|
|
|
.byte 0 # EOM(3)
|
|
|
|
|
|
|
|
.section .debug_info,"",@progbits
|
2018-12-23 06:20:47 +08:00
|
|
|
.Lcu_begin0:
|
2018-12-24 18:18:07 +08:00
|
|
|
.long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
|
2018-12-23 06:20:47 +08:00
|
|
|
.Ldebug_info_start0:
|
2018-12-24 18:18:07 +08:00
|
|
|
.short 5 # DWARF version number
|
|
|
|
.byte 1 # DWARF Unit Type
|
|
|
|
.byte 8 # Address Size (in bytes)
|
|
|
|
.long .debug_abbrev # Offset Into Abbrev. Section
|
|
|
|
.byte 1 # Abbrev [1] 0xc:0x2b DW_TAG_compile_unit
|
|
|
|
.long .Laddr_table_base0 # DW_AT_addr_base
|
|
|
|
.byte 0 # DW_AT_low_pc
|
|
|
|
.long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
|
2018-12-23 06:20:47 +08:00
|
|
|
.Ldebug_info_end0:
|
|
|
|
|
2018-12-24 18:18:07 +08:00
|
|
|
.section .debug_addr,"",@progbits
|
|
|
|
.long 12
|
|
|
|
.short 5
|
|
|
|
.byte 8
|
|
|
|
.byte 0
|
|
|
|
.Laddr_table_base0:
|
|
|
|
.quad .Lfunc_begin0
|