brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · f52ec2a Raw
87 lines · plain
1# Test basics of debug_line parsing. This test uses a linker script which2# ensures the code is placed at the end of a module to test the boundary3# condition when the final end-of-sequence line table entry points to an address4# that is outside the range of memory covered by the module.5 6# REQUIRES: lld7 8# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o9# RUN: ld.lld --script=%S/Inputs/debug-line-basic.script %t.o -o %t10# RUN: %lldb %t -o "image dump line-table -v a.c" -o exit | FileCheck %s11 12	.text13	.globl	_start14_start:15# CHECK: Line table for /tmp/a.c16	.file	1 "/tmp/b.c"17	.loc	1 0 018        nop19# CHECK-NEXT: 0x0000000000201000: /tmp/b.c, is_start_of_statement = TRUE{{$}}20	.loc	1 1 021        nop22# CHECK-NEXT: 0x0000000000201001: /tmp/b.c:1, is_start_of_statement = TRUE{{$}}23        .loc   1 1 124        nop25# CHECK-NEXT: 0x0000000000201002: /tmp/b.c:1:1, is_start_of_statement = TRUE{{$}}26        .loc   1 2 0 is_stmt 027        nop28# CHECK-NEXT: 0x0000000000201003: /tmp/b.c:2{{$}}29        .loc   1 2 0 is_stmt 0 basic_block30        nop31# CHECK-NEXT: 0x0000000000201004: /tmp/b.c:2, is_start_of_basic_block = TRUE{{$}}32        .loc   1 2 0 is_stmt 0 prologue_end33        nop34# CHECK-NEXT: 0x0000000000201005: /tmp/b.c:2, is_prologue_end = TRUE{{$}}35        .loc   1 2 0 is_stmt 0 epilogue_begin36        nop37# CHECK-NEXT: 0x0000000000201006: /tmp/b.c:2, is_epilogue_begin = TRUE{{$}}38	.file  2 "/tmp/c.c"39	.loc   2 1 0 is_stmt 040        nop41# CHECK-NEXT: 0x0000000000201007: /tmp/c.c:1{{$}}42# CHECK-NEXT: 0x0000000000201008: /tmp/c.c:1, is_terminal_entry = TRUE{{$}}43 44	.section	.text.f,"ax",@progbits45f:46        .loc   1 3 0 is_stmt 047        nop48# CHECK-NEXT: 0x0000000000201008: /tmp/b.c:3{{$}}49# CHECK-NEXT: 0x0000000000201009: /tmp/b.c:3, is_terminal_entry = TRUE{{$}}50 51 52	.section	.debug_str,"MS",@progbits,153.Linfo_string1:54	.asciz	"a.c"55.Linfo_string2:56	.asciz	"/tmp"57	.section	.debug_abbrev,"",@progbits58	.byte	1                       # Abbreviation Code59	.byte	17                      # DW_TAG_compile_unit60	.byte	0                       # DW_CHILDREN_no61	.byte	19                      # DW_AT_language62	.byte	5                       # DW_FORM_data263	.byte	3                       # DW_AT_name64	.byte	14                      # DW_FORM_strp65	.byte	16                      # DW_AT_stmt_list66	.byte	23                      # DW_FORM_sec_offset67	.byte	27                      # DW_AT_comp_dir68	.byte	14                      # DW_FORM_strp69	.byte	0                       # EOM(1)70	.byte	0                       # EOM(2)71	.byte	0                       # EOM(3)72	.section	.debug_info,"",@progbits73.Lcu_begin0:74	.long	.Lcu_end0-.Lcu_start0   # Length of Unit75.Lcu_start0:76	.short	4                       # DWARF version number77	.long	.debug_abbrev           # Offset Into Abbrev. Section78	.byte	8                       # Address Size (in bytes)79	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit80	.short	12                      # DW_AT_language81	.long	.Linfo_string1          # DW_AT_name82	.long	.Lline_table_start0     # DW_AT_stmt_list83	.long	.Linfo_string2          # DW_AT_comp_dir84.Lcu_end0:85	.section	.debug_line,"",@progbits86.Lline_table_start0:87