aboutsummaryrefslogtreecommitdiff
path: root/gdb/mdebugread.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-07-12 22:58:50 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-07-12 22:58:50 -0400
commitc4dfcb3638cbdb33589e3789df45d76178b333bf (patch)
treec44705cd72d8c10eb1629f14abaa5e858de041a3 /gdb/mdebugread.c
parent07716b63cb03c5489d243a48fef73930206d348f (diff)
downloadfsf-binutils-gdb-c4dfcb3638cbdb33589e3789df45d76178b333bf.zip
fsf-binutils-gdb-c4dfcb3638cbdb33589e3789df45d76178b333bf.tar.gz
fsf-binutils-gdb-c4dfcb3638cbdb33589e3789df45d76178b333bf.tar.bz2
gdb: add type::bounds / type::set_bounds
Add the `bounds` and `set_bounds` methods on `struct type`, in order to remove the `TYPE_RANGE_DATA` macro. In this patch, the `TYPE_RANGE_DATA` macro is changed to use `type::bounds`, so all the call sites that are used to set a range type's bounds are changed to use `type::set_bounds`. The next patch will remove `TYPE_RANGE_DATA` completely. gdb/ChangeLog: * gdbtypes.h (struct type) <bounds, set_bounds>: New methods. (TYPE_RANGE_DATA): Use type::bounds. Change all uses that are used to set the range type's bounds to use set_bounds. Change-Id: I62e15506239b98404e62bbea8120db184ed87847
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r--gdb/mdebugread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 6f76bc6..aa0c715 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -1734,8 +1734,8 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
if (t->bt == btRange)
{
tp->set_num_fields (0);
- TYPE_RANGE_DATA (tp) = ((struct range_bounds *)
- TYPE_ZALLOC (tp, sizeof (struct range_bounds)));
+ tp->set_bounds (((struct range_bounds *)
+ TYPE_ZALLOC (tp, sizeof (struct range_bounds))));
TYPE_LOW_BOUND (tp) = AUX_GET_DNLOW (bigend, ax);
ax++;
TYPE_HIGH_BOUND (tp) = AUX_GET_DNHIGH (bigend, ax);