diff options
author | Tom Tromey <tromey@adacore.com> | 2024-01-18 07:35:48 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-02-12 10:43:17 -0700 |
commit | 25558d2fc0e8b77d4c522c322012b048db4c1485 (patch) | |
tree | 7f4321b8f28ea77cae202a53d69c360af5824355 /gdb/testsuite/gdb.dap/args-env.exp | |
parent | 95fc420a40ebcbd510b41df77b93b11ec819f0a1 (diff) | |
download | binutils-25558d2fc0e8b77d4c522c322012b048db4c1485.zip binutils-25558d2fc0e8b77d4c522c322012b048db4c1485.tar.gz binutils-25558d2fc0e8b77d4c522c322012b048db4c1485.tar.bz2 |
Fix DAP launch and configurationDone requests
Co-workers at AdaCore pointed out that gdb incorrectly implements the
DAP launch and configurationDone requests. It's somewhat strange to
me, but the spec does in fact say that configuration requests should
occur before the executable is known to gdb. This was clarified in
this bug report against the spec:
https://github.com/microsoft/debug-adapter-protocol/issues/452
Fixing 'launch' to start the inferior was straightforward, but this
then required some changes to how breakpoints are handled. In
particular, now gdb will emit the "pending" reason on a breakpoint,
and will suppress breakpoint events during breakpoint setting.
Diffstat (limited to 'gdb/testsuite/gdb.dap/args-env.exp')
-rw-r--r-- | gdb/testsuite/gdb.dap/args-env.exp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.dap/args-env.exp b/gdb/testsuite/gdb.dap/args-env.exp index 0f07fd2..d651173 100644 --- a/gdb/testsuite/gdb.dap/args-env.exp +++ b/gdb/testsuite/gdb.dap/args-env.exp @@ -25,7 +25,7 @@ if {[build_executable ${testfile}.exp $testfile] == -1} { return } -if {[dap_launch $testfile arguments {a "b c"} env {{DEI something}}] == ""} { +if {[dap_initialize] == ""} { return } @@ -36,7 +36,11 @@ set obj [dap_check_request_and_response "set breakpoint by line number" \ [list s $srcfile] $line]] set line_bpno [dap_get_breakpoint_number $obj] -dap_check_request_and_response "start inferior" configurationDone +dap_check_request_and_response "configurationDone" configurationDone + +if {[dap_launch $testfile arguments {a "b c"} env {{DEI something}}] == ""} { + return +} dap_wait_for_event_and_check "inferior started" thread "body reason" started dap_wait_for_event_and_check "stopped at line breakpoint" stopped \ |