aboutsummaryrefslogtreecommitdiff
path: root/gdb/valarith.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-12-09 13:52:03 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2020-12-09 13:52:03 -0500
commit14c09924a070918034b465b8ca78282afee62839 (patch)
tree711442c723f5afabb4985e2d5e6afaa6fa4e5403 /gdb/valarith.c
parent1f8d2881175920d389078852bb1ff0799d744599 (diff)
downloadfsf-binutils-gdb-14c09924a070918034b465b8ca78282afee62839.zip
fsf-binutils-gdb-14c09924a070918034b465b8ca78282afee62839.tar.gz
fsf-binutils-gdb-14c09924a070918034b465b8ca78282afee62839.tar.bz2
gdb: split get_discrete_bounds in two
get_discrete_bounds is not flexible for ranges (TYPE_CODE_RANGE), in the sense that it returns true (success) only if both bounds are present and constant values. This is a problem for code that only needs to know the low bound and fails unnecessarily if the high bound is unknown. Split the function in two, get_discrete_low_bound and get_discrete_high_bound, that both return an optional. Provide a new implementation of get_discrete_bounds based on the two others, so the callers don't have to be changed. gdb/ChangeLog: * gdbtypes.c (get_discrete_bounds): Implement with get_discrete_low_bound and get_discrete_high_bound. (get_discrete_low_bound): New. (get_discrete_high_bound): New. Change-Id: I986b5e9c0dd969800e3fb9546af9c827d52e80d0
Diffstat (limited to 'gdb/valarith.c')
0 files changed, 0 insertions, 0 deletions