aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-05-26 14:11:08 -0600
committerTom Tromey <tromey@adacore.com>2020-05-26 14:11:08 -0600
commit0bc2354b811e913b39c288e74d7166eaa3639309 (patch)
treee807e4fde40111f355fd7605933120fe13e3d52c /gdb/ada-valprint.c
parent0db49895f30daea6edcc57e4c5003fd02a747c2b (diff)
downloadgdb-0bc2354b811e913b39c288e74d7166eaa3639309.zip
gdb-0bc2354b811e913b39c288e74d7166eaa3639309.tar.gz
gdb-0bc2354b811e913b39c288e74d7166eaa3639309.tar.bz2
Fix bugs in 'val and 'pos with range types
In Ada, the 'val and 'pos attributes can be used to map from an enumeration constant to its position in the enum and vice versa. These operators did not work properly when the type in question was a subrange of an enum type with "holes". gdb/ChangeLog 2020-05-26 Tom Tromey <tromey@adacore.com> * ada-lang.c (value_val_atr): Handle TYPE_CODE_RANGE. * gdbtypes.c (discrete_position): Handle TYPE_CODE_RANGE. gdb/testsuite/ChangeLog 2020-05-26 Tom Tromey <tromey@adacore.com> * gdb.ada/arr_acc_idx_w_gap.exp: Add enum subrange tests. * gdb.ada/arr_acc_idx_w_gap/enum_with_gap.ads (Enum_Subrange): New type. * gdb.ada/arr_acc_idx_w_gap/enum_with_gap_main.adb (V): New variable.
Diffstat (limited to 'gdb/ada-valprint.c')
0 files changed, 0 insertions, 0 deletions