[binutils-gdb] Sort and uniquify Ada standard exceptions

Tom Tromey tromey@sourceware.org
Tue Feb 24 15:56:40 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9ea9be3d5f6e0b8cc90bc8c65a98f7d2411bea8b

commit 9ea9be3d5f6e0b8cc90bc8c65a98f7d2411bea8b
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Feb 9 07:13:33 2026 -0700

    Sort and uniquify Ada standard exceptions
    
    With libgnat debuginfo installed, I noticed some test failures.
    
    This patch fixes gdb.ada/info_exc.exp and gdb.ada/mi_exc_info.exp,
    both of which had failures caused by not unique-ifying the list of
    standard exceptions.

Diff:
---
 gdb/ada-lang.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 9ffe453b027..b4b5f049bd1 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -13250,6 +13250,8 @@ ada_exceptions_list_1 (compiled_regex *preg)
      runtime units that have been compiled without debugging info.  */
 
   ada_add_standard_exceptions (preg, &result);
+  if (!result.empty ())
+    sort_remove_dups_ada_exceptions_list (&result, 0);
 
   /* Next, find all exceptions whose scope is local and accessible
      from the currently selected frame.  */


More information about the Gdb-cvs mailing list