+2001-07-14 Andrew Cagney <ac131313@redhat.com>
+
+ * mn10200-tdep.c: Replace value_ptr with ``struct value *''.
+ * mcore-tdep.c: Ditto.
+ * sparc-tdep.c: Ditto.
+ * sh-tdep.c: Ditto.
+ * rs6000-tdep.c: Ditto.
+ * ppc-linux-tdep.c: Ditto.
+ * m68hc11-tdep.c: Ditto.
+ * ia64-tdep.c: Ditto.
+ * i386-tdep.c: Ditto.
+ * arm-linux-tdep.c: Ditto.
+ * hppa-tdep.c: Ditto.
+ * h8500-tdep.c: Ditto.
+ * fr30-tdep.c: Ditto.
+ * arm-tdep.c: Ditto.
+ * alpha-tdep.c: Ditto.
+ * d30v-tdep.c: Ditto.
+ * d10v-tdep.c: Ditto.
+ * m32r-tdep.c: Ditto.
+ * mips-tdep.c: Ditto.
+ * v850-tdep.c: Ditto.
+
2001-07-15 Elena Zannoni <ezannoni@redhat.com>
* top.c (readline_line_completion_function, noop_completer): Move
structure to be returned is passed as a hidden first argument. */
CORE_ADDR
-alpha_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+alpha_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
int i;
for (i = 0, m_arg = alpha_args; i < nargs; i++, m_arg++)
{
- value_ptr arg = args[i];
+ struct value *arg = args[i];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
/* Cast argument to long if necessary as the compiler does it too. */
switch (TYPE_CODE (arg_type))
#define UNMAKE_THUMB_ADDR(addr) ((addr) & ~1)
CORE_ADDR
-arm_linux_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
+arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
char *fp;
void
arm_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- value_ptr *args, struct type *type, int gcc_p)
+ struct value **args, struct type *type, int gcc_p)
{
static short thumb_dummy[4] =
{
general registers and/or on the stack. */
CORE_ADDR
-arm_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
+arm_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
char *fp;
static CORE_ADDR
-d10v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+d10v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
int i;
/* Fill in registers and arg lists */
for (i = 0; i < nargs; i++)
{
- value_ptr arg = args[i];
+ struct value *arg = args[i];
struct type *type = check_typedef (VALUE_TYPE (arg));
char *contents = VALUE_CONTENTS (arg);
int len = TYPE_LENGTH (type);
CORE_ADDR
d30v_fix_call_dummy (char *dummyname, CORE_ADDR start_sp, CORE_ADDR fun,
- int nargs, value_ptr *args, struct type *type, int gcc_p)
+ int nargs, struct value **args,
+ struct type *type, int gcc_p)
{
int regnum;
CORE_ADDR sp;
CORE_ADDR
-d30v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+d30v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
int i, len, index = 0, regnum = 2;
/* Pass 1. Put all large args on stack */
for (i = 0; i < nargs; i++)
{
- value_ptr arg = args[i];
+ struct value *arg = args[i];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
len = TYPE_LENGTH (arg_type);
contents = VALUE_CONTENTS (arg);
for (i = 0; i < nargs; i++)
{
- value_ptr arg = args[i];
+ struct value *arg = args[i];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
len = TYPE_LENGTH (arg_type);
contents = VALUE_CONTENTS (arg);
*/
CORE_ADDR
-fr30_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+fr30_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
int argreg;
for (argnum = 0; argnum < nargs; argnum++)
{
char *val;
- value_ptr arg = args[argnum];
+ struct value *arg = args[argnum];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
struct type *target_type = TYPE_TARGET_TYPE (arg_type);
int len = TYPE_LENGTH (arg_type);
int
fr30_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
- value_ptr *args, struct type *type, int gcc_p)
+ struct value **args, struct type *type, int gcc_p)
{
long offset24;
return 0;
}
-value_ptr
+struct value *
h8500_value_of_trapped_internalvar (struct internalvar *var)
{
LONGEST regval;
}
void
-h8500_set_trapped_internalvar (struct internalvar *var, value_ptr newval,
+h8500_set_trapped_internalvar (struct internalvar *var, struct value *newval,
int bitpos, int bitsize, int offset)
{
char *page_regnum, *regnum;
extern int exception_catchpoints_are_fragile;
/* This is defined in valops.c. */
-extern value_ptr find_function_in_inferior (char *);
+extern struct value *find_function_in_inferior (char *);
/* Should call_function allocate stack space for a struct return? */
int
to the callee, so we do that too. */
CORE_ADDR
-hppa_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
/* array of arguments' offsets */
arguments into registers as needed by the ABI. */
CORE_ADDR
-hppa_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
/* array of arguments' offsets */
This function does the same stuff as value_being_returned in values.c, but
gets the value from the stack rather than from the buffer where all the
registers were saved when the function called completed. */
-value_ptr
+struct value *
hppa_value_returned_from_stack (register struct type *valtype, CORE_ADDR addr)
{
- register value_ptr val;
+ register struct value *val;
val = allocate_value (valtype);
CHECK_TYPEDEF (valtype);
struct symbol *get_sym, *symbol2;
struct minimal_symbol *buff_minsym, *msymbol;
struct type *ftype;
- value_ptr *args;
- value_ptr funcval, val;
+ struct value **args;
+ struct value *funcval;
+ struct value *val;
int x, namelen, err_value, tmp = -1;
CORE_ADDR endo_buff_addr, value_return_addr, errno_return_addr;
CORE_ADDR stub_addr;
- args = (value_ptr *) alloca (sizeof (value_ptr) * 8); /* 6 for the arguments and one null one??? */
+ args = alloca (sizeof (struct value *) * 8); /* 6 for the arguments and one null one??? */
funcval = find_function_in_inferior ("__d_shl_get");
get_sym = lookup_symbol ("__d_shl_get", NULL, VAR_NAMESPACE, NULL, NULL);
buff_minsym = lookup_minimal_symbol ("__buffer", NULL, NULL);
CORE_ADDR
hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- value_ptr *args, struct type *type, int gcc_p)
+ struct value **args, struct type *type, int gcc_p)
{
CORE_ADDR dyncall_addr;
struct minimal_symbol *msymbol;
void
i386_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- value_ptr *args, struct type *type, int gcc_p)
+ struct value **args, struct type *type, int gcc_p)
{
int from, to, delta, loc;
\f
CORE_ADDR
-i386_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+i386_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
sp = default_push_arguments (nargs, args, sp, struct_return, struct_addr);
}
CORE_ADDR
-ia64_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
int argno;
- value_ptr arg;
+ struct value *arg;
struct type *type;
int len, argoffset;
int nslots, rseslots, memslots, slotnum, nfuncargs;
passed as an implicit first argument, always in R0. */
CORE_ADDR
-m32r_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+m32r_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
unsigned char struct_return, CORE_ADDR struct_addr)
{
int stack_offset, stack_alloc;
void
m32r_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- value_ptr *args, struct type *type, int gcc_p)
+ struct value **args, struct type *type, int gcc_p)
{
/* ld24 r8, <(imm24) fun> */
*(unsigned long *) (dummy) = (fun & 0x00ffffff) | 0xe8000000;
static CORE_ADDR
m68hc11_push_arguments (int nargs,
- value_ptr *args,
+ struct value **args,
CORE_ADDR sp,
int struct_return,
CORE_ADDR struct_addr)
CORE_ADDR mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp);
-CORE_ADDR mcore_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
+CORE_ADDR mcore_push_arguments (int nargs, struct value ** args, CORE_ADDR sp,
unsigned char struct_return, CORE_ADDR struct_addr);
void mcore_pop_frame (struct frame_info *fi);
bytes) as hidden first arguments. */
CORE_ADDR
-mcore_push_arguments (int nargs, value_ptr * args, CORE_ADDR sp,
+mcore_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
unsigned char struct_return, CORE_ADDR struct_addr)
{
int argreg;
CORE_ADDR
mips_push_arguments (int nargs,
- value_ptr *args,
+ struct value **args,
CORE_ADDR sp,
int struct_return,
CORE_ADDR struct_addr)
{
char *val;
char valbuf[MAX_REGISTER_RAW_SIZE];
- value_ptr arg = args[argnum];
+ struct value *arg = args[argnum];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
int len = TYPE_LENGTH (arg_type);
enum type_code typecode = TYPE_CODE (arg_type);
order on the stack. */
CORE_ADDR
-mn10200_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+mn10200_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
unsigned char struct_return, CORE_ADDR struct_addr)
{
int argnum = 0;
starting from r4. */
CORE_ADDR
-ppc_sysv_abi_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
int argno;
int structstkspace;
int argoffset;
int structoffset;
- value_ptr arg;
+ struct value *arg;
struct type *type;
int len;
char old_sp_buf[4];
static void
rs6000_fix_call_dummy (char *dummyname, CORE_ADDR pc, CORE_ADDR fun,
- int nargs, value_ptr *args, struct type *type,
+ int nargs, struct value **args, struct type *type,
int gcc_p)
{
#define TOC_ADDR_OFFSET 20
starting from r4. */
static CORE_ADDR
-rs6000_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+rs6000_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
int ii;
int f_argno = 0; /* current floating point argno */
int wordsize = TDEP->wordsize;
- value_ptr arg = 0;
+ struct value *arg = 0;
struct type *type;
CORE_ADDR saved_sp;
for (; jj < nargs; ++jj)
{
- value_ptr val = args[jj];
+ struct value *val = args[jj];
space += ((TYPE_LENGTH (VALUE_TYPE (val))) + 3) & -4;
}
#if 0
void
sh_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- value_ptr *args, struct type *type, int gcc_p)
+ struct value **args, struct type *type, int gcc_p)
{
*(unsigned long *) (dummy + 8) = fun;
}
args are also passed in registers o0 - o5. */
CORE_ADDR
-sparc32_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+sparc32_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
int i, j, oregnum;
and sizes. */
for (i = 0, m_arg = sparc_args; i < nargs; i++, m_arg++)
{
- value_ptr arg = args[i];
+ struct value *arg = args[i];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
/* Cast argument to long if necessary as the compiler does it too. */
switch (TYPE_CODE (arg_type))
int and float, we will waste every other register of both types. */
CORE_ADDR
-sparc64_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_retaddr)
{
int i, j, register_counter = 0;
for (i = nargs - 1; i >= 0; i--)
{
int len = TYPE_LENGTH (check_typedef (VALUE_TYPE (args[i])));
- value_ptr copyarg = args[i];
+ struct value *copyarg = args[i];
int copylen = len;
if (copylen < SPARC_INTREG_SIZE)
for (i = 0; i < nargs; i++)
{
int len = TYPE_LENGTH (check_typedef (VALUE_TYPE (args[i])));
- value_ptr copyarg = args[i];
+ struct value *copyarg = args[i];
enum type_code typecode = TYPE_CODE (VALUE_TYPE (args[i]));
int copylen = len;
*/
CORE_ADDR
-v850_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
+v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
unsigned char struct_return, CORE_ADDR struct_addr)
{
int argreg;
int
v850_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
- value_ptr *args, struct type *type, int gcc_p)
+ struct value **args, struct type *type, int gcc_p)
{
long offset24;