]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ada-lang.c
Fix regression due to Pragma Import series
authorTom Tromey <tromey@adacore.com>
Tue, 4 Apr 2023 15:25:21 +0000 (09:25 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 12 May 2023 19:25:28 +0000 (13:25 -0600)
commite9151f7d626a6988e91320d5523778d02851c92f
treecfab2103a58e9c7765844dfc866b5e79c73e4cba
parent44a37a985325184e36743685ce496b042da7a816
Fix regression due to Pragma Import series

A co-worker here at AdaCore discovered that the Pragma Import series
caused a rgression.  When debugging gnat1, gdb started asking for
overload resolution like:

(gdb) call pp(n)
Multiple matches for pp
[0] cancel
[1] pp (types.union_id) at ../../gcc/gcc/ada/treepr.adb:511
[2] treepr.pp (types.union_id) at ../../gcc/gcc/ada/treepr.adb:511

This worked before the series, and is strange anyway, because the
matches refer to the same function.

This patch adds a test case for this situation and fixes the bug by
pruning identical functions in remove_extra_symbols.
gdb/ada-lang.c
gdb/testsuite/gdb.ada/import.exp
gdb/testsuite/gdb.ada/import/pkg.adb
gdb/testsuite/gdb.ada/import/pkg.ads