xref: /llvm-project/lldb/test/Shell/SymbolFile/DWARF/x86/dwarf5-debug_line-file-index.s (revision 8a64d80a959bf2844df33f9112e456f33de7b468)
1# Test handling of DWARF5 file index 0.
2
3# RUN: llvm-mc -filetype=obj -o %t -triple x86_64-pc-linux %s
4# RUN: %lldb %t -o "image lookup -f hello.c -l 1" \
5# RUN:   -o exit | FileCheck %s
6
7# CHECK: 2 matches found in hello.c:1
8	.text
9.Lfunc_begin0:
10	.file	0 "." "hello.c"
11	.loc	0 1 0                           # hello.c:1:0
12		nop
13	.loc	0 1 13 prologue_end             # hello.c:1:13
14		nop
15.Lfunc_end0:
16	.section	.debug_abbrev,"",@progbits
17	.byte	1                               # Abbreviation Code
18	.byte	17                              # DW_TAG_compile_unit
19	.byte	0                               # DW_CHILDREN_no
20	.byte	37                              # DW_AT_producer
21	.byte	37                              # DW_FORM_strx1
22	.byte	19                              # DW_AT_language
23	.byte	5                               # DW_FORM_data2
24	.byte	3                               # DW_AT_name
25	.byte	37                              # DW_FORM_strx1
26	.byte	114                             # DW_AT_str_offsets_base
27	.byte	23                              # DW_FORM_sec_offset
28	.byte	16                              # DW_AT_stmt_list
29	.byte	23                              # DW_FORM_sec_offset
30	.byte	27                              # DW_AT_comp_dir
31	.byte	37                              # DW_FORM_strx1
32	.byte	17                              # DW_AT_low_pc
33	.byte	27                              # DW_FORM_addrx
34	.byte	18                              # DW_AT_high_pc
35	.byte	6                               # DW_FORM_data4
36	.byte	115                             # DW_AT_addr_base
37	.byte	23                              # DW_FORM_sec_offset
38	.byte	0                               # EOM(1)
39	.byte	0                               # EOM(2)
40	.byte	0                               # EOM(3)
41	.section	.debug_info,"",@progbits
42.Lcu_begin0:
43	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
44.Ldebug_info_start0:
45	.short	5                               # DWARF version number
46	.byte	1                               # DWARF Unit Type
47	.byte	8                               # Address Size (in bytes)
48	.long	.debug_abbrev                   # Offset Into Abbrev. Section
49	.byte	1                               # Abbrev [1] 0xc:0x2b DW_TAG_compile_unit
50	.byte	0                               # DW_AT_producer
51	.short	12                              # DW_AT_language
52	.byte	1                               # DW_AT_name
53	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
54	.long	.Lline_table_start0             # DW_AT_stmt_list
55	.byte	2                               # DW_AT_comp_dir
56	.byte	0                               # DW_AT_low_pc
57	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
58	.long	.Laddr_table_base0              # DW_AT_addr_base
59.Ldebug_info_end0:
60	.section	.debug_str_offsets,"",@progbits
61	.long	12                              # Length of String Offsets Set
62	.short	5
63	.short	0
64.Lstr_offsets_base0:
65	.section	.debug_str,"MS",@progbits,1
66.Linfo_string0:
67	.asciz	"" # string offset=0
68.Linfo_string1:
69	.asciz	"hello.c"                       # string offset=101
70.Linfo_string2:
71	.asciz	"."                             # string offset=109
72	.section	.debug_str_offsets,"",@progbits
73	.long	.Linfo_string0
74	.long	.Linfo_string1
75	.long	.Linfo_string2
76	.section	.debug_addr,"",@progbits
77.Ldebug_addr_start0:
78	.short	5                               # DWARF version number
79	.byte	8                               # Address size
80	.byte	0                               # Segment selector size
81.Laddr_table_base0:
82	.quad	.Lfunc_begin0
83.Ldebug_addr_end0:
84	.section	.debug_line,"",@progbits
85.Lline_table_start0:
86