/* OpenCL language support for GDB, the GNU debugger.
- Copyright (C) 2010-2021 Free Software Foundation, Inc.
+ Copyright (C) 2010-2022 Free Software Foundation, Inc.
Contributed by Ken Werner <ken.werner@de.ibm.com>.
gdb_assert (n <= c->n);
for (i = offset; i < n; i++)
- memcpy (value_contents_raw (v) + j++ * elsize,
- value_contents (c->val) + c->indices[i] * elsize,
+ memcpy (value_contents_raw (v).data () + j++ * elsize,
+ value_contents (c->val).data () + c->indices[i] * elsize,
elsize);
}
struct value *from_elm_val = allocate_value (eltype);
struct value *to_elm_val = value_subscript (c->val, c->indices[i]);
- memcpy (value_contents_writeable (from_elm_val),
- value_contents (fromval) + j++ * elsize,
+ memcpy (value_contents_writeable (from_elm_val).data (),
+ value_contents (fromval).data () + j++ * elsize,
elsize);
value_assign (to_elm_val, from_elm_val);
}
{
lval_func_read,
lval_func_write,
+ nullptr,
NULL, /* indirect */
NULL, /* coerce_ref */
lval_func_check_synthetic_pointer,
/* Copy src val contents into the destination value. */
for (i = 0; i < n; i++)
- memcpy (value_contents_writeable (ret)
+ memcpy (value_contents_writeable (ret).data ()
+ (i * TYPE_LENGTH (elm_type)),
- value_contents (val)
+ value_contents (val).data ()
+ (indices[i] * TYPE_LENGTH (elm_type)),
TYPE_LENGTH (elm_type));
}
value of its operand compares unequal to 0, and -1 (i.e. all bits
set) if the value of its operand compares equal to 0. */
int tmp = value_logical_not (value_subscript (arg, i)) ? -1 : 0;
- memset (value_contents_writeable (ret) + i * TYPE_LENGTH (eltype),
+ memset ((value_contents_writeable (ret).data ()
+ + i * TYPE_LENGTH (eltype)),
tmp, TYPE_LENGTH (eltype));
}
}
if the specified relation is true. */
int tmp = scalar_relop (value_subscript (val1, i),
value_subscript (val2, i), op) ? -1 : 0;
- memset (value_contents_writeable (ret) + i * TYPE_LENGTH (eltype1),
+ memset ((value_contents_writeable (ret).data ()
+ + i * TYPE_LENGTH (eltype1)),
tmp, TYPE_LENGTH (eltype1));
}
noside);
else
{
- struct value *v = value_struct_elt (&arg1, NULL,
+ struct value *v = value_struct_elt (&arg1, {},
std::get<1> (m_storage).c_str (),
NULL, "structure");
/* For scalar built-in types, only evaluate the right
hand operand if the left hand operand compares
unequal(&&)/equal(||) to 0. */
- int tmp = value_logical_not (arg1);
+ bool tmp = value_logical_not (arg1);
if (op == BINOP_LOGICAL_OR)
tmp = !tmp;
{
tmp = value_logical_not (value_subscript (arg1, i)) ?
value_subscript (arg3, i) : value_subscript (arg2, i);
- memcpy (value_contents_writeable (ret) +
- i * TYPE_LENGTH (eltype2), value_contents_all (tmp),
+ memcpy (value_contents_writeable (ret).data () +
+ i * TYPE_LENGTH (eltype2), value_contents_all (tmp).data (),
TYPE_LENGTH (eltype2));
}