aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-windows-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/amd64-windows-tdep.c')
-rw-r--r--gdb/amd64-windows-tdep.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c
index 1f779fb..8573e4c 100644
--- a/gdb/amd64-windows-tdep.c
+++ b/gdb/amd64-windows-tdep.c
@@ -126,10 +126,10 @@ amd64_windows_passed_by_integer_register (struct type *type)
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
case TYPE_CODE_COMPLEX:
- return (TYPE_LENGTH (type) == 1
- || TYPE_LENGTH (type) == 2
- || TYPE_LENGTH (type) == 4
- || TYPE_LENGTH (type) == 8);
+ return (type->length () == 1
+ || type->length () == 2
+ || type->length () == 4
+ || type->length () == 8);
default:
return 0;
@@ -144,7 +144,7 @@ amd64_windows_passed_by_xmm_register (struct type *type)
{
return ((type->code () == TYPE_CODE_FLT
|| type->code () == TYPE_CODE_DECFLOAT)
- && (TYPE_LENGTH (type) == 4 || TYPE_LENGTH (type) == 8));
+ && (type->length () == 4 || type->length () == 8));
}
/* Return non-zero iff an argument of the given TYPE should be passed
@@ -180,7 +180,7 @@ amd64_windows_adjust_args_passed_by_pointer (struct value **args,
{
struct type *type = value_type (args[i]);
const gdb_byte *valbuf = value_contents (args[i]).data ();
- const int len = TYPE_LENGTH (type);
+ const int len = type->length ();
/* Store a copy of that argument on the stack, aligned to
a 16 bytes boundary, and then use the copy's address as
@@ -208,9 +208,9 @@ amd64_windows_store_arg_in_reg (struct regcache *regcache,
const gdb_byte *valbuf = value_contents (arg).data ();
gdb_byte buf[8];
- gdb_assert (TYPE_LENGTH (type) <= 8);
+ gdb_assert (type->length () <= 8);
memset (buf, 0, sizeof buf);
- memcpy (buf, valbuf, std::min (TYPE_LENGTH (type), (ULONGEST) 8));
+ memcpy (buf, valbuf, std::min (type->length (), (ULONGEST) 8));
regcache->cooked_write (regno, buf);
}
@@ -252,7 +252,7 @@ amd64_windows_push_arguments (struct regcache *regcache, int nargs,
for (i = 0; i < nargs; i++)
{
struct type *type = value_type (args[i]);
- int len = TYPE_LENGTH (type);
+ int len = type->length ();
int on_stack_p = 1;
if (reg_idx < ARRAY_SIZE (amd64_windows_dummy_call_integer_regs))
@@ -297,8 +297,8 @@ amd64_windows_push_arguments (struct regcache *regcache, int nargs,
struct type *type = value_type (stack_args[i]);
const gdb_byte *valbuf = value_contents (stack_args[i]).data ();
- write_memory (sp + element * 8, valbuf, TYPE_LENGTH (type));
- element += ((TYPE_LENGTH (type) + 7) / 8);
+ write_memory (sp + element * 8, valbuf, type->length ());
+ element += ((type->length () + 7) / 8);
}
return sp;
@@ -357,7 +357,7 @@ amd64_windows_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- int len = TYPE_LENGTH (type);
+ int len = type->length ();
int regnum = -1;
/* See if our value is returned through a register. If it is, then
@@ -399,7 +399,7 @@ amd64_windows_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;
}