[0/7] Rewrite DAP launch and attach implementations

Message ID 20241121-dap-launch-v3-v1-0-c1fa046b3285@adacore.com
Headers
Series Rewrite DAP launch and attach implementations |

Message

Tom Tromey Nov. 21, 2024, 8:35 p.m. UTC
  This series rewrites the DAP launch and attach requests, in keeping
with some clarifications that were made to the protocol.

---
Tom Tromey (7):
      Reimplement DAP's stopAtBeginningOfMainSubprogram
      Reimplement DAP delayed events
      Add call_function_later to DAP
      Refactor CancellationHandler in DAP
      Allow cancellation of DAP-thread requests
      Add DAP deferred requests
      Defer DAP launch command until after configurationDone

 gdb/NEWS                                  |   6 +
 gdb/python/lib/gdb/dap/launch.py          | 150 ++++++++++++++-----
 gdb/python/lib/gdb/dap/server.py          | 229 +++++++++++++++++++++++-------
 gdb/testsuite/gdb.dap/ada-arrays.exp      |   7 +-
 gdb/testsuite/gdb.dap/ada-nested.exp      |   7 +-
 gdb/testsuite/gdb.dap/ada-scopes.exp      |   7 +-
 gdb/testsuite/gdb.dap/args-env.exp        |   7 +-
 gdb/testsuite/gdb.dap/assign.exp          |   7 +-
 gdb/testsuite/gdb.dap/attach.exp          |  19 ++-
 gdb/testsuite/gdb.dap/basic-dap.exp       |   7 +-
 gdb/testsuite/gdb.dap/bt-nodebug.exp      |   7 +-
 gdb/testsuite/gdb.dap/cancel-launch.exp   |  56 ++++++++
 gdb/testsuite/gdb.dap/catch-exception.exp |   7 +-
 gdb/testsuite/gdb.dap/children.exp        |   7 +-
 gdb/testsuite/gdb.dap/cond-bp.exp         |   7 +-
 gdb/testsuite/gdb.dap/cwd.exp             |  10 +-
 gdb/testsuite/gdb.dap/cxx-exception.exp   |   7 +-
 gdb/testsuite/gdb.dap/disassem.exp        |   7 +-
 gdb/testsuite/gdb.dap/frameless.exp       |   7 +-
 gdb/testsuite/gdb.dap/global.exp          |   7 +-
 gdb/testsuite/gdb.dap/hover.exp           |   7 +-
 gdb/testsuite/gdb.dap/insn-bp.exp         |  12 +-
 gdb/testsuite/gdb.dap/lazy-string.exp     |   7 +-
 gdb/testsuite/gdb.dap/log-message.exp     |   7 +-
 gdb/testsuite/gdb.dap/memory.exp          |   7 +-
 gdb/testsuite/gdb.dap/modules.exp         |   7 +-
 gdb/testsuite/gdb.dap/pause.exp           |   7 +-
 gdb/testsuite/gdb.dap/ptrref.exp          |   7 +-
 gdb/testsuite/gdb.dap/remote-dap.exp      |  10 +-
 gdb/testsuite/gdb.dap/rust-slices.exp     |   7 +-
 gdb/testsuite/gdb.dap/scopes.exp          |   7 +-
 gdb/testsuite/gdb.dap/sources.exp         |  14 +-
 gdb/testsuite/gdb.dap/stack-format.exp    |   7 +-
 gdb/testsuite/gdb.dap/step-out.exp        |   7 +-
 gdb/testsuite/gdb.dap/stop-at-main.exp    |   7 +-
 gdb/testsuite/gdb.dap/terminate.exp       |   7 +-
 gdb/testsuite/lib/dap-support.exp         |  33 +++--
 37 files changed, 518 insertions(+), 210 deletions(-)
---
base-commit: 978324718990b6b371d4eeeba02cfe13a0ebf120
change-id: 20241121-dap-launch-v3-b297655bba10

Best regards,
  

Comments

Kévin Le Gouguec Dec. 2, 2024, 4:47 p.m. UTC | #1
Tom Tromey <tromey@adacore.com> writes:

> This series rewrites the DAP launch and attach requests, in keeping
> with some clarifications that were made to the protocol.
>
> ---
> Tom Tromey (7):
>       Reimplement DAP's stopAtBeginningOfMainSubprogram
>       Reimplement DAP delayed events
>       Add call_function_later to DAP
>       Refactor CancellationHandler in DAP
>       Allow cancellation of DAP-thread requests
>       Add DAP deferred requests
>       Defer DAP launch command until after configurationDone

ACK; sent some musings but nothing seems show-stopping to me; thanks for
breaking it down into these incremental steps.

Thanks also for the references in the last commit message.
Cross-referencing the changes with PR dap/32090,
microsoft/debug-adapter-protocol#497, the new § "Launch Sequencing" spec
section, I think it all makes sense.

Reviewed-by: Kévin Le Gouguec <legouguec@adacore.com>
  
Tom Tromey Dec. 9, 2024, 8:52 p.m. UTC | #2
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> This series rewrites the DAP launch and attach requests, in keeping
Tom> with some clarifications that were made to the protocol.

I'm checking these in now.

Tom