aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/amd64-tdep.c')
-rw-r--r--gdb/amd64-tdep.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 4d416a4..ea2b3b1 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -376,7 +376,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch,
memcpy (buf, raw_buf + 1, 1);
else
mark_value_bytes_unavailable (result_value, 0,
- TYPE_LENGTH (value_type (result_value)));
+ value_type (result_value)->length ());
}
else
{
@@ -386,7 +386,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch,
memcpy (buf, raw_buf, 1);
else
mark_value_bytes_unavailable (result_value, 0,
- TYPE_LENGTH (value_type (result_value)));
+ value_type (result_value)->length ());
}
}
else if (i386_dword_regnum_p (gdbarch, regnum))
@@ -399,7 +399,7 @@ amd64_pseudo_register_read_value (struct gdbarch *gdbarch,
memcpy (buf, raw_buf, 4);
else
mark_value_bytes_unavailable (result_value, 0,
- TYPE_LENGTH (value_type (result_value)));
+ value_type (result_value)->length ());
}
else
i386_pseudo_register_read_into_value (gdbarch, regcache, regnum,
@@ -559,7 +559,7 @@ amd64_has_unaligned_fields (struct type *type)
the caller). */
if (field_is_static (&type->field (i))
|| (TYPE_FIELD_BITSIZE (type, i) == 0
- && TYPE_LENGTH (subtype) == 0)
+ && subtype->length () == 0)
|| TYPE_FIELD_PACKED (type, i))
continue;
@@ -597,7 +597,7 @@ amd64_classify_aggregate_field (struct type *type, int i,
int bitsize = TYPE_FIELD_BITSIZE (type, i);
if (bitsize == 0)
- bitsize = TYPE_LENGTH (subtype) * 8;
+ bitsize = subtype->length () * 8;
/* Ignore static fields, or empty fields, for example nested
empty structures.*/
@@ -666,7 +666,7 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class theclass[2])
loc_bitpos attributes, which will cause an assert to trigger within
the unaligned field check. As classes with virtual bases are not
trivially copyable, checking that first avoids this problem. */
- if (TYPE_LENGTH (type) > 16
+ if (type->length () > 16
|| !language_pass_by_reference (type).trivially_copyable
|| amd64_has_unaligned_fields (type))
{
@@ -688,7 +688,7 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class theclass[2])
/* All fields in an array have the same type. */
amd64_classify (subtype, theclass);
- if (TYPE_LENGTH (type) > 8 && theclass[1] == AMD64_NO_CLASS)
+ if (type->length () > 8 && theclass[1] == AMD64_NO_CLASS)
theclass[1] = theclass[0];
}
else
@@ -724,7 +724,7 @@ static void
amd64_classify (struct type *type, enum amd64_reg_class theclass[2])
{
enum type_code code = type->code ();
- int len = TYPE_LENGTH (type);
+ int len = type->length ();
theclass[0] = theclass[1] = AMD64_NO_CLASS;
@@ -791,7 +791,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
enum amd64_reg_class theclass[2];
- int len = TYPE_LENGTH (type);
+ int len = type->length ();
static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM };
static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM };
int integer_reg = 0;
@@ -821,7 +821,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
ULONGEST addr;
regcache_raw_read_unsigned (regcache, AMD64_RAX_REGNUM, &addr);
- read_memory (addr, readbuf, TYPE_LENGTH (type));
+ read_memory (addr, readbuf, type->length ());
}
return RETURN_VALUE_ABI_RETURNS_ADDRESS;
@@ -955,7 +955,7 @@ if (return_method == return_method_struct)
for (i = 0; i < nargs; i++)
{
struct type *type = value_type (args[i]);
- int len = TYPE_LENGTH (type);
+ int len = type->length ();
enum amd64_reg_class theclass[2];
int needed_integer_regs = 0;
int needed_sse_regs = 0;
@@ -1040,7 +1040,7 @@ if (return_method == return_method_struct)
{
struct type *type = value_type (stack_args[i]);
const gdb_byte *valbuf = value_contents (stack_args[i]).data ();
- int len = TYPE_LENGTH (type);
+ int len = type->length ();
write_memory (sp + element * 8, valbuf, len);
element += ((len + 7) / 8);
@@ -3071,7 +3071,7 @@ amd64_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
struct gdbarch *gdbarch = get_frame_arch (frame);
i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
int jb_pc_offset = tdep->jb_pc_offset;
- int len = TYPE_LENGTH (builtin_type (gdbarch)->builtin_func_ptr);
+ int len = builtin_type (gdbarch)->builtin_func_ptr->length ();
/* If JB_PC_OFFSET is -1, we have no way to find out where the
longjmp will land. */