diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 11:05:21 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-09-21 11:05:21 -0400 |
commit | df86565b31bf12aab6fdceade49169bc6f378b13 (patch) | |
tree | 76d5944661919552ce4ea01ac49188e151d72fa7 /gdb/rx-tdep.c | |
parent | b6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02 (diff) | |
download | gdb-df86565b31bf12aab6fdceade49169bc6f378b13.zip gdb-df86565b31bf12aab6fdceade49169bc6f378b13.tar.gz gdb-df86565b31bf12aab6fdceade49169bc6f378b13.tar.bz2 |
gdb: remove TYPE_LENGTH
Remove the macro, replace all uses with calls to type::length.
Change-Id: Ib9bdc954576860b21190886534c99103d6a47afb
Diffstat (limited to 'gdb/rx-tdep.c')
-rw-r--r-- | gdb/rx-tdep.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c index 62a9ac4..faca81a 100644 --- a/gdb/rx-tdep.c +++ b/gdb/rx-tdep.c @@ -712,8 +712,8 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, gdb_assert (return_type->code () == TYPE_CODE_STRUCT || func_type->code () == TYPE_CODE_UNION); - if (TYPE_LENGTH (return_type) > 16 - || TYPE_LENGTH (return_type) % 4 != 0) + if (return_type->length () > 16 + || return_type->length () % 4 != 0) { if (write_pass) regcache_cooked_write_unsigned (regcache, RX_R15_REGNUM, @@ -727,7 +727,7 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct value *arg = args[i]; const gdb_byte *arg_bits = value_contents_all (arg).data (); struct type *arg_type = check_typedef (value_type (arg)); - ULONGEST arg_size = TYPE_LENGTH (arg_type); + ULONGEST arg_size = arg_type->length (); if (i == 0 && struct_addr != 0 && return_method != return_method_struct @@ -803,7 +803,7 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function, { struct type *p_arg_type = func_type->field (i).type (); - p_arg_size = TYPE_LENGTH (p_arg_type); + p_arg_size = p_arg_type->length (); } sp_off = align_up (sp_off, p_arg_size); @@ -874,12 +874,12 @@ rx_return_value (struct gdbarch *gdbarch, gdb_byte *readbuf, const gdb_byte *writebuf) { enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); - ULONGEST valtype_len = TYPE_LENGTH (valtype); + ULONGEST valtype_len = valtype->length (); - if (TYPE_LENGTH (valtype) > 16 + if (valtype->length () > 16 || ((valtype->code () == TYPE_CODE_STRUCT || valtype->code () == TYPE_CODE_UNION) - && TYPE_LENGTH (valtype) % 4 != 0)) + && valtype->length () % 4 != 0)) return RETURN_VALUE_STRUCT_CONVENTION; if (readbuf) |