Commit e9b41df
committed
[Dexter] Adjust launch sequencing to more closely align with DAP spec
Following PR llvm#169744 the DAP launch sequencing of Dexter was changed to
complete a launch request/response before performing configuration steps.
This matches LLDB's current behaviour, but is not compatible with the DAP
specification and causes issues interfacing with other debuggers.
This patch tries to bridge the gap by using a sequencing that is mostly
DAP-compliant while still interfacing correctly with lldb-dap: we send a
launch request first, then perform all configuration steps and sending
configurationDone, and then awaiting the launch response. For lldb-dap,
we do not wait for the launch response and may send configuration requests
before it is received, but lldb-dap appears to handle this without issue.
For other debug adapters, the launch request will be ignored until the
configurationDone request is received and responded to, at which point
the launch request will be acted upon and responded to.
As an additional note, the initialized event should be sent after the
initialize response and before the launch request according to the spec,
but as LLDB currently sends it after the launch response Dexter has
avoided checking for it. Since the initialized event is now being sent
after the launch response by LLDB, we can start checking for it earlier in
the sequence as well (though technically the client should receive the
initialized event before it sends the launch request).1 parent 2ad7174 commit e9b41df
File tree
1 file changed
+25
-9
lines changed- cross-project-tests/debuginfo-tests/dexter/dex/debugger
1 file changed
+25
-9
lines changedLines changed: 25 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
766 | | - | |
| 766 | + | |
767 | 767 | | |
768 | | - | |
769 | | - | |
770 | | - | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
771 | 774 | | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
777 | 788 | | |
778 | 789 | | |
779 | 790 | | |
780 | 791 | | |
781 | 792 | | |
782 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
783 | 799 | | |
784 | 800 | | |
785 | 801 | | |
| |||
0 commit comments