Commit 5c77f71
committed
[lldb-dap] Take two at refactoring the startup sequence.
This is more straight forward refactor of the startup sequence that reverts parts of ba29e60. Unlike my previous attempt, I ended up removing the pending request queue and not including an `AsyncReqeustHandler` because I don't think we actually need that at the moment.
The key is that during the startup flow there are 2 parallel operations happening in the DAP that have different triggers.
* The `initialize` request is sent and once the response is received the `launch` or `attach` is sent.
* When the `initialized` event is recieved the `setBreakpionts` and other config requests are made followed by the `configurationDone` event.
I moved the `initialized` event back to happen in the `PostRun` of the `launch` or `attach` request handlers. This ensures that we have a valid target by the time the configuration calls are made. I added also added a few extra validations that to the `configurationeDone` handler to ensure we're in an expected state.
I've also fixed up the tests to match the new flow. With the other additional test fixes in 087a5d2 I think we've narrowed down the main source of test instability that motivated the startup sequence change.1 parent efa2833 commit 5c77f71
File tree
30 files changed
+150
-251
lines changed- lldb
- packages/Python/lldbsuite/test/tools/lldb-dap
- test/API/tools/lldb-dap
- breakpoint-events
- cancel
- completions
- console
- coreFile
- evaluate
- launch
- module-event
- module
- repl-mode
- restart
- send-event
- stackTraceDisassemblyDisplay
- stackTrace
- startDebugging
- stop-hooks
- threads
- variables/children
- tools/lldb-dap
- Handler
- Protocol
30 files changed
+150
-251
lines changedLines changed: 10 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
| 239 | + | |
| 240 | + | |
238 | 241 | | |
239 | 242 | | |
240 | 243 | | |
| |||
602 | 605 | | |
603 | 606 | | |
604 | 607 | | |
605 | | - | |
| 608 | + | |
606 | 609 | | |
607 | 610 | | |
608 | 611 | | |
| |||
629 | 632 | | |
630 | 633 | | |
631 | 634 | | |
632 | | - | |
633 | | - | |
| 635 | + | |
| 636 | + | |
634 | 637 | | |
635 | 638 | | |
636 | 639 | | |
| |||
640 | 643 | | |
641 | 644 | | |
642 | 645 | | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
| 646 | + | |
648 | 647 | | |
649 | 648 | | |
650 | 649 | | |
| |||
677 | 676 | | |
678 | 677 | | |
679 | 678 | | |
| 679 | + | |
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| |||
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
827 | | - | |
| 827 | + | |
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
| 897 | + | |
902 | 898 | | |
903 | 899 | | |
904 | 900 | | |
| |||
Lines changed: 3 additions & 67 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | 357 | | |
359 | 358 | | |
360 | 359 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | 360 | | |
365 | 361 | | |
366 | 362 | | |
| |||
378 | 374 | | |
379 | 375 | | |
380 | 376 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
| 377 | + | |
404 | 378 | | |
405 | 379 | | |
406 | 380 | | |
407 | 381 | | |
408 | 382 | | |
409 | 383 | | |
410 | | - | |
411 | | - | |
412 | 384 | | |
413 | 385 | | |
414 | 386 | | |
415 | 387 | | |
416 | 388 | | |
417 | 389 | | |
418 | 390 | | |
419 | | - | |
420 | | - | |
421 | 391 | | |
422 | | - | |
423 | | - | |
424 | 392 | | |
425 | 393 | | |
426 | 394 | | |
| |||
437 | 405 | | |
438 | 406 | | |
439 | 407 | | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
| 408 | + | |
469 | 409 | | |
470 | 410 | | |
471 | 411 | | |
472 | 412 | | |
473 | 413 | | |
474 | 414 | | |
475 | 415 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | 416 | | |
481 | 417 | | |
482 | 418 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
Lines changed: 6 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
60 | 55 | | |
61 | 56 | | |
62 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | | - | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | | - | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | | - | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
360 | | - | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| |||
0 commit comments