2
2
3
3
# RUN: split-file %s %t
4
4
# RUN: llvm-mc --triple=x86_64-pc-linux -filetype=obj %t/a.s -o %t/a.o
5
- # RUN: %lldb %t/a.o -o "settings set target.source-map . %t" -s %t/commands -o exit | FileCheck %s
5
+ # RUN: %lldb %t/a.o -o "settings set target.source-map . %t" \
6
+ # RUN: -o "settings set interpreter.stop-command-source-on-error false" \
7
+ # RUN: -s %t/commands -o exit 2>&1 | FileCheck %s
6
8
7
9
#--- commands
8
10
# CASE 0: function at the start of the file
@@ -69,9 +71,14 @@ source list -n func3
69
71
# CHECK-NEXT: 9 content of file0.c:9
70
72
# CHECK-NEXT: 10 content of file0.c:10
71
73
72
- # CASE 4: discontinuous function
74
+ # CASE 4: function has no line entry with line!=0
73
75
source list -n func4
74
- # CHECK-NEXT: source list -n func4
76
+ # CHECK-LABEL: source list -n func4
77
+ # CHECK: error: Could not find line information for function "func4".
78
+
79
+ # CASE 5: discontinuous function
80
+ source list -n func5
81
+ # CHECK-LABEL: source list -n func5
75
82
# CHECK-NEXT: File: file0.c
76
83
# CHECK-NEXT: 1 content of file0.c:1
77
84
# CHECK-NEXT: 2 content of file0.c:2
@@ -119,18 +126,23 @@ func3:
119
126
nop
120
127
.Lfunc3_end:
121
128
122
- func4.__part.1:
129
+ func4:
130
+ .loc 0 0
131
+ nop
132
+ .Lfunc4_end:
133
+
134
+ func5.__part.1:
123
135
.loc 0 1
124
136
nop
125
- .Lfunc4 .__part.1_end:
137
+ .Lfunc5 .__part.1_end:
126
138
127
139
.Lpadding:
128
140
nop
129
141
130
- func4 :
142
+ func5 :
131
143
.loc 0 5
132
144
nop
133
- .Lfunc4_end :
145
+ .Lfunc5_end :
134
146
135
147
.Ltext_end:
136
148
@@ -188,15 +200,15 @@ func4:
188
200
.quad .text # DW_AT_low_pc
189
201
.quad .Ltext_end # DW_AT_high_pc
190
202
.long .Lline_table_start0 # DW_AT_stmt_list
191
- .rept 4
203
+ .rept 5
192
204
.byte 2 # Abbrev DW_TAG_subprogram
193
205
.quad func\+ # DW_AT_low_pc
194
206
.quad .Lfunc\+_end # DW_AT_high_pc
195
207
.asciz "func\+" # DW_AT_name
196
208
.endr
197
209
.byte 3 # Abbrev DW_TAG_subprogram
198
210
.long .Ldebug_ranges0
199
- .asciz "func4 " # DW_AT_name
211
+ .asciz "func5 " # DW_AT_name
200
212
.byte 0 # End Of Children Mark
201
213
.Ldebug_info_end0:
202
214
@@ -211,11 +223,11 @@ func4:
211
223
.long .Ldebug_ranges0-.Lrnglists_table_base0
212
224
.Ldebug_ranges0:
213
225
.byte 6 # DW_RLE_start_end
214
- .quad func4
215
- .quad .Lfunc4_end
226
+ .quad func5
227
+ .quad .Lfunc5_end
216
228
.byte 6 # DW_RLE_start_end
217
- .quad func4 .__part.1
218
- .quad .Lfunc4 .__part.1_end
229
+ .quad func5 .__part.1
230
+ .quad .Lfunc5 .__part.1_end
219
231
.byte 0 # DW_RLE_end_of_list
220
232
.Ldebug_list_header_end0:
221
233
.section .debug_line,"",@progbits
0 commit comments