[0/4] Check for rogue DAP exceptions

Message ID 20231212-dap-no-test-exceptions-v1-0-af0e33f10093@adacore.com
Headers
Series Check for rogue DAP exceptions |

Message

Tom Tromey Dec. 12, 2023, 5:44 p.m. UTC
  While looking into a question I got about DAP, I found out that the
DAP 'attach' test had some unexpected exceptions in the log file,
caused by an incorrect assumption in the stop event listener.

This series tries to make the DAP implementation a bit more robust.
After these patches, exceptions that are expected in the normal course
of operation are not logged by default.  Then, the test suite is
updated to check that no rogue exceptions are seen.

---
Tom Tromey (4):
      Introduce and use DAPException
      Add DAP log level parameter
      Avoid exception from attach in DAP
      Check for rogue DAP exceptions in test suite

 gdb/NEWS                             |  5 ++++
 gdb/doc/gdb.texinfo                  | 18 ++++++++++++++
 gdb/python/lib/gdb/dap/breakpoint.py | 12 ++++++---
 gdb/python/lib/gdb/dap/evaluate.py   | 12 ++++-----
 gdb/python/lib/gdb/dap/events.py     | 43 ++++++++++++++++++++++++++-------
 gdb/python/lib/gdb/dap/launch.py     |  7 +++---
 gdb/python/lib/gdb/dap/server.py     | 10 ++++++++
 gdb/python/lib/gdb/dap/sources.py    |  6 ++---
 gdb/python/lib/gdb/dap/startup.py    | 47 +++++++++++++++++++++++++++++++++---
 gdb/python/lib/gdb/dap/varref.py     |  6 ++---
 gdb/testsuite/lib/dap-support.exp    | 34 +++++++++++++++++++++++++-
 11 files changed, 167 insertions(+), 33 deletions(-)
---
base-commit: 80ffe7226459e3edf840d0c23462d93cb560d2de
change-id: 20231212-dap-no-test-exceptions-2ee5ef4771aa

Best regards,
  

Comments

Tom Tromey Dec. 22, 2023, 4:57 p.m. UTC | #1
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> While looking into a question I got about DAP, I found out that the
Tom> DAP 'attach' test had some unexpected exceptions in the log file,
Tom> caused by an incorrect assumption in the stop event listener.

Tom> This series tries to make the DAP implementation a bit more robust.
Tom> After these patches, exceptions that are expected in the normal course
Tom> of operation are not logged by default.  Then, the test suite is
Tom> updated to check that no rogue exceptions are seen.

I'm checking this in.

Tom