[00/11] Fix frame-less expression evaluation in DAP

Message ID 20230504-frameless-v1-0-4191201740b0@adacore.com
Headers
Series Fix frame-less expression evaluation in DAP |

Message

Tom Tromey May 4, 2023, 2:21 p.m. UTC
  In DAP, an evaluation request without a frame ID should be done at the
global scope.  This series implements this.  Most of the series is
minor cleanups to the parser API, to make the final code a bit
cleaner.

Regression tested on x86-64 Fedora 36.

---
Tom Tromey (11):
      Avoid forward declaration in parse.c
      Move innermost_block_tracker to expression.h
      Introduce and use parser flags
      Simplify parser_state constructor
      Boolify parser_state::comma_terminates
      Rearrange parser_state
      Add PARSER_DEBUG flag
      Add PARSER_LEAVE_BLOCK_ALONE flag
      Add flags to parse_and_eval
      Add global_context parameter to gdb.parse_and_eval
      Handle DAP evaluate request without a frame ID

 gdb/NEWS                              |  4 ++
 gdb/ada-exp.y                         |  2 +-
 gdb/ax-gdb.c                          |  3 +-
 gdb/breakpoint.c                      |  3 +-
 gdb/c-exp.y                           |  2 +-
 gdb/d-exp.y                           |  2 +-
 gdb/doc/python.texi                   |  7 ++-
 gdb/eval.c                            |  7 +--
 gdb/expression.h                      | 78 ++++++++++++++++++++++++++--
 gdb/f-exp.y                           |  2 +-
 gdb/go-exp.y                          |  2 +-
 gdb/parse.c                           | 97 ++++++++++++++++-------------------
 gdb/parser-defs.h                     | 73 ++++++--------------------
 gdb/printcmd.c                        |  5 +-
 gdb/python/lib/gdb/dap/evaluate.py    |  4 +-
 gdb/python/python.c                   | 28 +++++++---
 gdb/rust-parse.c                      |  2 +-
 gdb/testsuite/gdb.dap/frameless.c     | 24 +++++++++
 gdb/testsuite/gdb.dap/frameless.exp   | 62 ++++++++++++++++++++++
 gdb/testsuite/gdb.python/py-value.c   |  3 ++
 gdb/testsuite/gdb.python/py-value.exp |  5 ++
 gdb/tracepoint.c                      | 10 ++--
 gdb/value.h                           |  2 +-
 23 files changed, 288 insertions(+), 139 deletions(-)
---
base-commit: 3539414584be0094b0a4fe56dfd64ea79d802edc
change-id: 20230504-frameless-2cafb628e8d4

Best regards,
  

Comments

Tom Tromey May 23, 2023, 8:17 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> writes:

Tom> In DAP, an evaluation request without a frame ID should be done at the
Tom> global scope.  This series implements this.  Most of the series is
Tom> minor cleanups to the parser API, to make the final code a bit
Tom> cleaner.

Tom> Regression tested on x86-64 Fedora 36.

I'm checking this in now.

Tom