]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Change DAP condition for Ada exception catchpoint
authorTom Tromey <tromey@adacore.com>
Fri, 22 Aug 2025 17:52:26 +0000 (11:52 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 19 Sep 2025 17:33:30 +0000 (11:33 -0600)
commite957baea206253a54e16e45bbe5cec0401c2a7ed
treeec90ec983149ca0290b472f2a3bebf7980a6782b
parent31cb4bb676dde0db3f24e03380a02ae92633c98f
Change DAP condition for Ada exception catchpoint

Currently, the gdb DAP implementation doesn't provide a way to filter
based on the thrown Ada exception.

There isn't really an ideal way to handle this in DAP:

* Requiring an IDE to use an expression checking $_ada_exception
  exposes the IDE to any workarounds needed to get this correct (see
  ada-lang.c).

* The setExceptionBreakpoint "filterOptions" field doesn't allow a
  special kind of condition to be set.  (We could add one but we've
  generally avoided gdb-specific extensions.)

* The "exceptionOptions" approach is under-documented.  It could be
  used but it would have to be in a somewhat gdb-specific way anyway
  -- and this approach does not allow a separate condition that is an
  expression.

So, after some internal discussion, we agreed that it isn't all that
useful to have conditions on Ada exception catchpoints.  This patch
changes the implementation to treat the condition as an exception name
here.
gdb/python/lib/gdb/dap/breakpoint.py
gdb/testsuite/gdb.dap/catch-exception.exp
gdb/testsuite/gdb.dap/catch-exception/prog.adb