* ax-gdb.c (require_rvalue): Disallow non-scalars.
2010-03-17 Stan Shebs <stan@codesourcery.com>
+ * ax-gdb.c (require_rvalue): Disallow non-scalars.
+
* infcall.c: Include tracepoint.h.
(call_function_by_hand): Disallow calls in tfind mode.
* infcmd.c: Include tracepoint.h.
static void
require_rvalue (struct agent_expr *ax, struct axs_value *value)
{
+ /* Only deal with scalars, structs and such may be too large
+ to fit in a stack entry. */
+ value->type = check_typedef (value->type);
+ if (TYPE_CODE (value->type) == TYPE_CODE_ARRAY
+ || TYPE_CODE (value->type) == TYPE_CODE_STRUCT
+ || TYPE_CODE (value->type) == TYPE_CODE_UNION
+ || TYPE_CODE (value->type) == TYPE_CODE_FUNC)
+ error ("Value not scalar: cannot be an rvalue.");
+
switch (value->kind)
{
case axs_rvalue: