aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32r-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 11:05:21 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 11:05:21 -0400
commitdf86565b31bf12aab6fdceade49169bc6f378b13 (patch)
tree76d5944661919552ce4ea01ac49188e151d72fa7 /gdb/m32r-tdep.c
parentb6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02 (diff)
downloadgdb-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/m32r-tdep.c')
-rw-r--r--gdb/m32r-tdep.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 7edbd50..4c2ecd3 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -247,7 +247,7 @@ m32r_store_return_value (struct type *type, struct regcache *regcache,
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR regval;
- int len = TYPE_LENGTH (type);
+ int len = type->length ();
regval = extract_unsigned_integer (valbuf, len > 4 ? 4 : len, byte_order);
regcache_cooked_write_unsigned (regcache, RET1_REGNUM, regval);
@@ -685,14 +685,14 @@ m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
/* Now make sure there's space on the stack. */
for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
- stack_alloc += ((TYPE_LENGTH (value_type (args[argnum])) + 3) & ~3);
+ stack_alloc += ((value_type (args[argnum])->length () + 3) & ~3);
sp -= stack_alloc; /* Make room on stack for args. */
for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
{
type = value_type (args[argnum]);
typecode = type->code ();
- len = TYPE_LENGTH (type);
+ len = type->length ();
memset (valbuf, 0, sizeof (valbuf));
@@ -758,7 +758,7 @@ m32r_extract_return_value (struct type *type, struct regcache *regcache,
{
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- int len = TYPE_LENGTH (type);
+ int len = type->length ();
ULONGEST tmp;
/* By using store_unsigned_integer we avoid having to do
@@ -780,7 +780,7 @@ m32r_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- if (TYPE_LENGTH (valtype) > 8)
+ if (valtype->length () > 8)
return RETURN_VALUE_STRUCT_CONVENTION;
else
{