diff options
author | Tom de Vries <tdevries@suse.de> | 2023-09-07 21:39:42 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-09-07 21:39:42 +0200 |
commit | ef136c7fa165cf3ee75c37d41561be8a7bdc89bd (patch) | |
tree | 1359a102119926582cb2b410123a790f1077cdde /gdb/testsuite/gdb.python | |
parent | b7a92724c5bd926e094ede860049c1067f0584cf (diff) | |
download | binutils-ef136c7fa165cf3ee75c37d41561be8a7bdc89bd.zip binutils-ef136c7fa165cf3ee75c37d41561be8a7bdc89bd.tar.gz binutils-ef136c7fa165cf3ee75c37d41561be8a7bdc89bd.tar.bz2 |
[gdb/ada] Move identical enums handling later
When running test-case gdb.ada/arr_acc_idx_w_gap.exp with target board
cc-with-dwz, I run into:
...
(gdb) print enum_with_gaps'enum_rep(lit3)^M
'Enum_Rep requires argument to have same type as enum^M
(gdb) FAIL: gdb.ada/arr_acc_idx_w_gap.exp: enum_rep
...
With target_board unix, we have instead:
...
(gdb) print enum_with_gaps'enum_rep(lit3)^M
$16 = 13^M
(gdb) PASS: gdb.ada/arr_acc_idx_w_gap.exp: enum_rep
...
Conversely, when I add this test to the test-case:
...
gdb_test "print enum_with_gaps'enum_rep(lit3)" " = 13" \
"enum_rep"
+ gdb_test "print enum_subrange'enum_rep(lit3)" " = 13" \
+ "other enum_rep"
...
the extra test passes with target board cc-with-dwz, but fails with target
board unix.
The problem is here in remove_extra_symbols:
...
if (symbols_are_identical_enums (syms))
syms.resize (1);
...
where one of the two identical enums is picked before the enum_rep handling
can resolve lit3 to one of the two.
Fix this by moving the code to ada_resolve_variable.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
PR ada/30726
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30726
Diffstat (limited to 'gdb/testsuite/gdb.python')
0 files changed, 0 insertions, 0 deletions