diff options
| author | Tom Tromey <tromey@adacore.com> | 2025-12-16 06:54:28 -0700 |
|---|---|---|
| committer | Tom Tromey <tromey@adacore.com> | 2026-01-05 07:01:29 -0700 |
| commit | f9e1578266943cb59fc37e37673725f2fd270c8b (patch) | |
| tree | 634cc3976e3ca84110f1450cd7f912a15c23c65d /gdb/python/lib | |
| parent | f33058a1fcea5f3b95df38ebcdd0c81b79e5c59e (diff) | |
| download | binutils-f9e1578266943cb59fc37e37673725f2fd270c8b.tar.gz binutils-f9e1578266943cb59fc37e37673725f2fd270c8b.tar.bz2 binutils-f9e1578266943cb59fc37e37673725f2fd270c8b.zip | |
Add Ada unhandled exception filter to DAP
This adds a way for DAP clients to catch unhandled Ada exceptions,
similar to the "catch exception unhandled" CLI command.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/python/lib')
| -rw-r--r-- | gdb/python/lib/gdb/dap/breakpoint.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/python/lib/gdb/dap/breakpoint.py b/gdb/python/lib/gdb/dap/breakpoint.py index 060e4d8878c..b1d42ed3d8b 100644 --- a/gdb/python/lib/gdb/dap/breakpoint.py +++ b/gdb/python/lib/gdb/dap/breakpoint.py @@ -367,7 +367,9 @@ def set_insn_breakpoints( @in_gdb_thread def _catch_exception(filterId, **args): - if filterId in ("assert", "exception", "throw", "rethrow", "catch"): + if filterId == "unhandled": + cmd = ["-catch-exception", "-u"] + elif filterId in ("assert", "exception", "throw", "rethrow", "catch"): cmd = ["-catch-" + filterId] else: raise DAPException("Invalid exception filterID: " + str(filterId)) @@ -425,6 +427,11 @@ def _rewrite_exception_breakpoint( "supportsCondition": True, }, { + "filter": "unhandled", + "label": "Ada exceptions without a handler", + "supportsCondition": True, + }, + { "filter": "throw", "label": "C++ exceptions, when thrown", "supportsCondition": True, |
