[v2,0/2] Add "finish" return value to DAP

Message ID 20240213-dap-finish-v2-0-d507b889d735@adacore.com
Headers
Series Add "finish" return value to DAP |

Message

Tom Tromey Feb. 13, 2024, 4:58 p.m. UTC
  This short series changes the DAP code so that it can access the
return value from a "finish" ("stepOut" in DAP parlance) command.  It
turns out that the current DAP convention is to put this value into
the local variables of the outermost scope.

---
Changes in v2:
- Simplified _FinishScopeReference per review
- Link to v1: https://inbox.sourceware.org/gdb-patches/20240212-dap-finish-v1-0-8e30870e8b25@adacore.com

---
Tom Tromey (2):
      Export "finish" return value to Python
      Add return value to DAP scope

 gdb/doc/python.texi                |  6 +++
 gdb/infcmd.c                       | 17 --------
 gdb/python/lib/gdb/dap/events.py   |  3 ++
 gdb/python/lib/gdb/dap/scopes.py   | 39 +++++++++++++++++-
 gdb/python/py-stopevent.c          | 23 ++++++++++-
 gdb/testsuite/gdb.dap/step-out.c   | 36 +++++++++++++++++
 gdb/testsuite/gdb.dap/step-out.exp | 82 ++++++++++++++++++++++++++++++++++++++
 gdb/thread-fsm.h                   | 19 +++++++++
 8 files changed, 205 insertions(+), 20 deletions(-)
---
base-commit: a16034bf6417dc2259fef43fd5bcc2dd1dac562f
change-id: 20240212-dap-finish-e2b2d748801e

Best regards,
  

Comments

Tom Tromey March 8, 2024, 5:49 p.m. UTC | #1
>>>>> Tom Tromey <tromey@adacore.com> writes:

> This short series changes the DAP code so that it can access the
> return value from a "finish" ("stepOut" in DAP parlance) command.  It
> turns out that the current DAP convention is to put this value into
> the local variables of the outermost scope.

I'm checking this in now.

Tom