@@ -134,37 +134,37 @@ def do_check_copyable_value_test(self):
134
134
self .assertIsNone (varK .value , "varK initialized too early?!" )
135
135
136
136
# Go to break point 2. k should be valid.
137
- self .runCmd ( 'continue' )
137
+ self .process . Continue ( )
138
138
self .assertGreater (varK .unsigned , 0 , "varK not initialized?!" )
139
139
140
140
# Go to breakpoint 3. k should no longer be valid.
141
- self .runCmd ( 'continue' )
141
+ self .process . Continue ( )
142
142
self .assertIsNone (varK .value , "K is live but was moved?!" )
143
143
144
144
# Run so we hit the next breakpoint to jump to the next test's
145
145
# breakpoint.
146
- self .runCmd ( 'continue' )
146
+ self .process . Continue ( )
147
147
148
148
def do_check_copyable_var_test (self ):
149
149
# We haven't defined varK yet.
150
150
varK = self .get_var ('k' )
151
151
self .assertIsNone (varK .value , "varK initialized too early?!" )
152
152
153
153
# Go to break point 2. k should be valid.
154
- self .runCmd ( 'continue' )
154
+ self .process . Continue ( )
155
155
self .assertGreater (varK .unsigned , 0 , "varK not initialized?!" )
156
156
157
157
# Go to breakpoint 3. We invalidated k
158
- self .runCmd ( 'continue' )
158
+ self .process . Continue ( )
159
159
self .assertIsNone (varK .value , "K is live but was moved?!" )
160
160
161
161
# Go to the last breakpoint and make sure that k is reinitialized
162
162
# properly.
163
- self .runCmd ( 'continue' )
163
+ self .process . Continue ( )
164
164
self .assertGreater (varK .unsigned , 0 , "varK not initialized" )
165
165
166
166
# Run so we hit the next breakpoint to go to the next test.
167
- self .runCmd ( 'continue' )
167
+ self .process . Continue ( )
168
168
169
169
def do_check_addressonly_value_test (self ):
170
170
# We haven't defined varK yet.
@@ -175,73 +175,73 @@ def do_check_addressonly_value_test(self):
175
175
# so we don't do so. We have an additional llvm.dbg.addr test where we
176
176
# move the other variable and show the correct behavior with
177
177
# llvm.dbg.declare.
178
- self .runCmd ( 'continue' )
178
+ self .process . Continue ( )
179
179
self .assertGreater (varK .unsigned , 0 , "var not initialized?!" )
180
180
181
181
# Go to breakpoint 3.
182
- self .runCmd ( 'continue' )
182
+ self .process . Continue ( )
183
183
self .assertEqual (varK .unsigned , 0 ,
184
184
"dbg thinks varK is live despite move?!" )
185
185
186
186
# Run so we hit the next breakpoint as part of the next test.
187
- self .runCmd ( 'continue' )
187
+ self .process . Continue ( )
188
188
189
189
def do_check_addressonly_var_test (self ):
190
190
varK = self .get_var ('k' )
191
191
192
192
# Go to break point 2. k should be valid.
193
- self .runCmd ( 'continue' )
193
+ self .process . Continue ( )
194
194
self .assertGreater (varK .unsigned , 0 , "varK not initialized?!" )
195
195
196
196
# Go to breakpoint 3. K was invalidated.
197
- self .runCmd ( 'continue' )
197
+ self .process . Continue ( )
198
198
self .assertIsNone (varK .value , "K is live but was moved?!" )
199
199
200
200
# Go to the last breakpoint and make sure that k is reinitialized
201
201
# properly.
202
- self .runCmd ( 'continue' )
202
+ self .process . Continue ( )
203
203
self .assertGreater (varK .unsigned , 0 , "varK not initialized" )
204
204
205
205
# Run so we hit the next breakpoint as part of the next test.
206
- self .runCmd ( 'continue' )
206
+ self .process . Continue ( )
207
207
208
208
def do_check_copyable_value_arg_test (self ):
209
209
# k is defined by the argument so it is valid.
210
210
varK = self .get_var ('k' )
211
211
self .assertGreater (varK .unsigned , 0 , "varK not initialized?!" )
212
212
213
213
# Go to break point 2. k should be valid.
214
- self .runCmd ( 'continue' )
214
+ self .process . Continue ( )
215
215
self .assertGreater (varK .unsigned , 0 , "varK not initialized?!" )
216
216
217
217
# Go to breakpoint 3. k should no longer be valid.
218
- self .runCmd ( 'continue' )
218
+ self .process . Continue ( )
219
219
#self.assertIsNone(varK.value, "K is live but was moved?!")
220
220
221
221
# Run so we hit the next breakpoint to jump to the next test's
222
222
# breakpoint.
223
- self .runCmd ( 'continue' )
223
+ self .process . Continue ( )
224
224
225
225
def do_check_copyable_var_arg_test (self ):
226
226
# k is already defined and is an argument.
227
227
varK = self .get_var ('k' )
228
228
self .assertGreater (varK .unsigned , 0 , "varK not initialized?!" )
229
229
230
230
# Go to break point 2. k should be valid.
231
- self .runCmd ( 'continue' )
231
+ self .process . Continue ( )
232
232
self .assertGreater (varK .unsigned , 0 , "varK not initialized?!" )
233
233
234
234
# Go to breakpoint 3. We invalidated k
235
- self .runCmd ( 'continue' )
235
+ self .process . Continue ( )
236
236
self .assertIsNone (varK .value , "K is live but was moved?!" )
237
237
238
238
# Go to the last breakpoint and make sure that k is reinitialized
239
239
# properly.
240
- self .runCmd ( 'continue' )
240
+ self .process . Continue ( )
241
241
self .assertGreater (varK .unsigned , 0 , "varK not initialized" )
242
242
243
243
# Run so we hit the next breakpoint to go to the next test.
244
- self .runCmd ( 'continue' )
244
+ self .process . Continue ( )
245
245
246
246
def do_check_addressonly_value_arg_test (self ):
247
247
# k is defined since it is an argument.
@@ -253,81 +253,81 @@ def do_check_addressonly_value_arg_test(self):
253
253
# so we don't do so. We have an additional llvm.dbg.addr test where we
254
254
# move the other variable and show the correct behavior with
255
255
# llvm.dbg.declare.
256
- self .runCmd ( 'continue' )
256
+ self .process . Continue ( )
257
257
self .assertGreater (varK .unsigned , 0 , "var not initialized?!" )
258
258
259
259
# Go to breakpoint 3.
260
- self .runCmd ( 'continue' )
260
+ self .process . Continue ( )
261
261
self .assertEqual (varK .unsigned , 0 ,
262
262
"dbg thinks varK is live despite move?!" )
263
263
264
264
# Run so we hit the next breakpoint as part of the next test.
265
- self .runCmd ( 'continue' )
265
+ self .process . Continue ( )
266
266
267
267
def do_check_addressonly_var_arg_test (self ):
268
268
varK = self .get_var ('k' )
269
269
self .assertGreater (varK .unsigned , 0 , "varK not initialized?!" )
270
270
271
271
# Go to break point 2. k should be valid.
272
- self .runCmd ( 'continue' )
272
+ self .process . Continue ( )
273
273
self .assertGreater (varK .unsigned , 0 , "varK not initialized?!" )
274
274
275
275
# Go to breakpoint 3. K was invalidated.
276
- self .runCmd ( 'continue' )
276
+ self .process . Continue ( )
277
277
self .assertIsNone (varK .value , "K is live but was moved?!" )
278
278
279
279
# Go to the last breakpoint and make sure that k is reinitialized
280
280
# properly.
281
- self .runCmd ( 'continue' )
281
+ self .process . Continue ( )
282
282
# There is some sort of bug here. We should have the value here. For now
283
283
# leave the next line commented out and validate we are not seeing the
284
284
# value so we can detect change in behavior.
285
285
self .assertGreater (varK .unsigned , 0 , "varK not initialized" )
286
286
287
287
# Run so we hit the next breakpoint as part of the next test.
288
- self .runCmd ( 'continue' )
288
+ self .process . Continue ( )
289
289
290
290
def do_check_copyable_value_ccf_true (self ):
291
291
varK = self .get_var ('k' )
292
292
293
293
# Check at our start point that we do not have any state for varK and
294
294
# then continue to our next breakpoint.
295
295
self .assertIsNone (varK .value , "varK should not have a value?!" )
296
- self .runCmd ( 'continue' )
296
+ self .process . Continue ( )
297
297
298
298
# At this breakpoint, k should be defined since we are going to do
299
299
# something with it.
300
300
self .assertIsNotNone (varK .value , "varK should have a value?!" )
301
- self .runCmd ( 'continue' )
301
+ self .process . Continue ( )
302
302
303
303
# At this breakpoint, we are now in the conditional control flow part of
304
304
# the loop. Make sure that we can see k still.
305
305
self .assertIsNotNone (varK .value , "varK should have a value?!" )
306
- self .runCmd ( 'continue' )
306
+ self .process . Continue ( )
307
307
308
308
# Ok, we just performed the move. k should not be no longer initialized.
309
309
self .assertIsNone (varK .value , "varK should not have a value?!" )
310
- self .runCmd ( 'continue' )
310
+ self .process . Continue ( )
311
311
312
312
# Finally we left the conditional control flow part of the function. k
313
313
# should still be None.
314
314
self .assertIsNone (varK .value , "varK should not have a value!" )
315
315
316
316
# Run again so we go and run to the next test.
317
- self .runCmd ( 'continue' )
317
+ self .process . Continue ( )
318
318
319
319
def do_check_copyable_value_ccf_false (self ):
320
320
varK = self .get_var ('k' )
321
321
322
322
# Check at our start point that we do not have any state for varK and
323
323
# then continue to our next breakpoint.
324
324
self .assertIsNone (varK .value , "varK should not have a value?!" )
325
- self .runCmd ( 'continue' )
325
+ self .process . Continue ( )
326
326
327
327
# At this breakpoint, k should be defined since we are going to do
328
328
# something with it.
329
329
self .assertIsNotNone (varK .value , "varK should have a value?!" )
330
- self .runCmd ( 'continue' )
330
+ self .process . Continue ( )
331
331
332
332
# At this breakpoint, we are now past the end of the conditional
333
333
# statement. We know due to the move checking that k can not have any
@@ -336,110 +336,110 @@ def do_check_copyable_value_ccf_false(self):
336
336
self .assertIsNone (varK .value , "varK should have a value?!" )
337
337
338
338
# Run again so we go and run to the next test.
339
- self .runCmd ( 'continue' )
339
+ self .process . Continue ( )
340
340
341
341
def do_check_copyable_var_ccf_true_reinit_out_block (self ):
342
342
varK = self .get_var ('k' )
343
343
344
344
# At first we should not have a value for k.
345
345
self .assertEqual (varK .unsigned , 0 , "varK should be nullptr!" )
346
- self .runCmd ( 'continue' )
346
+ self .process . Continue ( )
347
347
348
348
# Now we are in the conditional true block. K should be defined since we
349
349
# are on the move itself.
350
350
self .assertGreater (varK .unsigned , 0 , "varK should not be nullptr!" )
351
- self .runCmd ( 'continue' )
351
+ self .process . Continue ( )
352
352
353
353
# Now we have executed the move and we are about to run code using
354
354
# m. Make sure that K is not available!
355
355
self .assertEqual (varK .unsigned , 0 ,
356
356
"varK was already moved! Should be nullptr" )
357
- self .runCmd ( 'continue' )
357
+ self .process . Continue ( )
358
358
359
359
# We are now out of the conditional lexical block on the line of code
360
360
# that redefines k. k should still be not available.
361
361
self .assertEqual (varK .unsigned , 0 ,
362
362
"varK was already moved! Should be nullptr" )
363
- self .runCmd ( 'continue' )
363
+ self .process . Continue ( )
364
364
365
365
# Ok, we have now reinit k and are about to call a method on it. We
366
366
# should be valid now.
367
367
self .assertGreater (varK .unsigned , 0 ,
368
368
"varK should have be reinitialized?!" )
369
369
370
370
# Run again so we go and run to the next test.
371
- self .runCmd ( 'continue' )
371
+ self .process . Continue ( )
372
372
373
373
def do_check_copyable_var_ccf_true_reinit_in_block (self ):
374
374
varK = self .get_var ('k' )
375
375
376
376
# At first we should not have a value for k.
377
377
self .assertEqual (varK .unsigned , 0 , "varK should be nullptr!" )
378
- self .runCmd ( 'continue' )
378
+ self .process . Continue ( )
379
379
380
380
# Now we are in the conditional true block. K should be defined since we
381
381
# are on the move itself.
382
382
self .assertGreater (varK .unsigned , 0 , "varK should not be nullptr!" )
383
- self .runCmd ( 'continue' )
383
+ self .process . Continue ( )
384
384
385
385
# Now we have executed the move and we are about to reinit k but have
386
386
# not yet. Make sure we are not available!
387
387
self .assertEqual (varK .unsigned , 0 ,
388
388
"varK was already moved! Should be nullptr" )
389
- self .runCmd ( 'continue' )
389
+ self .process . Continue ( )
390
390
391
391
# We are now still inside the conditional part of the code, but have
392
392
# reinitialized varK.
393
393
self .assertGreater (varK .unsigned , 0 ,
394
394
"varK was reinit! Should be valid value!" )
395
- self .runCmd ( 'continue' )
395
+ self .process . Continue ( )
396
396
397
397
# We now have left the conditional part of the function. k should still
398
398
# be available.
399
399
self .assertGreater (varK .unsigned , 0 ,
400
400
"varK should have be reinitialized?!" )
401
401
402
402
# Run again so we go and run to the next test.
403
- self .runCmd ( 'continue' )
403
+ self .process . Continue ( )
404
404
405
405
def do_check_copyable_var_ccf_false_reinit_out_block (self ):
406
406
varK = self .get_var ('k' )
407
407
408
408
# At first we should not have a value for k.
409
409
self .assertEqual (varK .unsigned , 0 , "varK should be nullptr!" )
410
- self .runCmd ( 'continue' )
410
+ self .process . Continue ( )
411
411
412
412
# Now we are right above the beginning of the false check. varK should
413
413
# still be valid.
414
414
self .assertGreater (varK .unsigned , 0 , "varK should not be nullptr!" )
415
- self .runCmd ( 'continue' )
415
+ self .process . Continue ( )
416
416
417
417
# Now we are after the conditional part of the code on the reinit
418
418
# line. Since this is reachable from the move and we haven't reinit yet,
419
419
# k should not be available.
420
420
self .assertEqual (varK .unsigned , 0 ,
421
421
"varK was already moved! Should be nullptr" )
422
- self .runCmd ( 'continue' )
422
+ self .process . Continue ( )
423
423
424
424
# Ok, we have now reinit k and are about to call a method on it. We
425
425
# should be valid now.
426
426
self .assertGreater (varK .unsigned , 0 ,
427
427
"varK should have be reinitialized?!" )
428
428
429
429
# Run again so we go and run to the next test.
430
- self .runCmd ( 'continue' )
430
+ self .process . Continue ( )
431
431
432
432
def do_check_copyable_var_ccf_false_reinit_in_block (self ):
433
433
varK = self .get_var ('k' )
434
434
435
435
# At first we should not have a value for k.
436
436
self .assertEqual (varK .unsigned , 0 , "varK should be nullptr!" )
437
- self .runCmd ( 'continue' )
437
+ self .process . Continue ( )
438
438
439
439
# Now we are on the doSomething above the false check. So varK should be
440
440
# valid.
441
441
self .assertGreater (varK .unsigned , 0 , "varK should not be nullptr!" )
442
- self .runCmd ( 'continue' )
442
+ self .process . Continue ( )
443
443
444
444
# Now we are after the conditional scope. Since k was reinitialized in
445
445
# the conditional scope, along all paths we are valid so varK should
@@ -448,4 +448,4 @@ def do_check_copyable_var_ccf_false_reinit_in_block(self):
448
448
"varK should not be nullptr?!" )
449
449
450
450
# Run again so we go and run to the next test.
451
- self .runCmd ( 'continue' )
451
+ self .process . Continue ( )
0 commit comments