s/value_ptr/struct value */

This commit is contained in:
Andrew Cagney 2001-07-15 20:10:02 +00:00
parent 01467f2afb
commit ea7c478fe2
21 changed files with 76 additions and 51 deletions

View file

@ -1,3 +1,26 @@
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

View file

@ -902,7 +902,7 @@ setup_arbitrary_frame (int argc, CORE_ADDR *argv)
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;
@ -922,7 +922,7 @@ alpha_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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))

View file

@ -104,7 +104,7 @@ arm_linux_extract_return_value (struct type *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;

View file

@ -1186,7 +1186,7 @@ arm_push_dummy_frame (void)
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] =
{
@ -1255,7 +1255,7 @@ arm_call_dummy_breakpoint_offset (void)
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;

View file

@ -1006,7 +1006,7 @@ pop_stack_item (struct stack_item *si)
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;
@ -1016,7 +1016,7 @@ d10v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
/* 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);

View file

@ -869,7 +869,8 @@ d30v_do_registers_info (int regnum, int fpregs)
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;
@ -907,7 +908,7 @@ d30v_pop_dummy_frame (struct frame_info *fi)
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;
@ -919,7 +920,7 @@ d30v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
/* 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);
@ -937,7 +938,7 @@ d30v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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);

View file

@ -159,7 +159,7 @@ fr30_skip_prologue (CORE_ADDR pc)
*/
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;
@ -188,7 +188,7 @@ fr30_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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);
@ -587,7 +587,7 @@ fr30_frame_saved_pc (struct frame_info *fi)
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;

View file

@ -476,7 +476,7 @@ h8500_is_trapped_internalvar (char *name)
return 0;
}
value_ptr
struct value *
h8500_value_of_trapped_internalvar (struct internalvar *var)
{
LONGEST regval;
@ -523,7 +523,7 @@ h8500_value_of_trapped_internalvar (struct internalvar *var)
}
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;

View file

@ -148,7 +148,7 @@ extern int hp_som_som_object_present;
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
@ -1667,7 +1667,7 @@ restore_pc_queue (struct frame_saved_regs *fsr)
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 */
@ -1786,7 +1786,7 @@ hppa_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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 */
@ -1875,10 +1875,10 @@ hppa_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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);
@ -1914,15 +1914,16 @@ find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle)
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);
@ -2009,7 +2010,7 @@ cover_find_stub_with_shl_get (PTR args_untyped)
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;

View file

@ -669,7 +669,7 @@ i386_push_dummy_frame (void)
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;
@ -749,7 +749,7 @@ get_longjmp_target (CORE_ADDR *pc)
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);

View file

@ -1749,11 +1749,11 @@ find_func_descr (CORE_ADDR faddr, CORE_ADDR *fdaptr)
}
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;

View file

@ -592,7 +592,7 @@ m32r_frame_saved_pc (struct frame_info *fi)
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;
@ -675,7 +675,7 @@ m32r_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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;

View file

@ -808,7 +808,7 @@ m68hc11_stack_align (CORE_ADDR addr)
static CORE_ADDR
m68hc11_push_arguments (int nargs,
value_ptr *args,
struct value **args,
CORE_ADDR sp,
int struct_return,
CORE_ADDR struct_addr)

View file

@ -55,7 +55,7 @@ void mcore_virtual_frame_pointer (CORE_ADDR pc, long *reg, long *offset);
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);
@ -747,7 +747,7 @@ 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;

View file

@ -2157,7 +2157,7 @@ mips_type_needs_double_align (struct type *type)
CORE_ADDR
mips_push_arguments (int nargs,
value_ptr *args,
struct value **args,
CORE_ADDR sp,
int struct_return,
CORE_ADDR struct_addr)
@ -2215,7 +2215,7 @@ mips_push_arguments (int nargs,
{
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);

View file

@ -718,7 +718,7 @@ mn10200_pop_frame (struct frame_info *frame)
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;

View file

@ -423,7 +423,7 @@ ppc_linux_frame_chain (struct frame_info *thisframe)
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;
@ -432,7 +432,7 @@ ppc_sysv_abi_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int structstkspace;
int argoffset;
int structoffset;
value_ptr arg;
struct value *arg;
struct type *type;
int len;
char old_sp_buf[4];

View file

@ -845,7 +845,7 @@ rs6000_pop_frame (void)
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
@ -878,7 +878,7 @@ rs6000_fix_call_dummy (char *dummyname, CORE_ADDR pc, CORE_ADDR fun,
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;
@ -889,7 +889,7 @@ rs6000_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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;
@ -1008,7 +1008,7 @@ ran_out_of_registers_for_arguments:
for (; jj < nargs; ++jj)
{
value_ptr val = args[jj];
struct value *val = args[jj];
space += ((TYPE_LENGTH (VALUE_TYPE (val))) + 3) & -4;
}

View file

@ -974,7 +974,7 @@ sh_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
#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;
}

View file

@ -1983,7 +1983,7 @@ gdb_print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
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;
@ -2002,7 +2002,7 @@ sparc32_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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))
@ -2292,7 +2292,7 @@ sparc64_write_fp (CORE_ADDR val)
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;
@ -2307,7 +2307,7 @@ sparc64_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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)
@ -2333,7 +2333,7 @@ sparc64_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
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;

View file

@ -705,7 +705,7 @@ v850_pop_frame (struct frame_info *frame)
*/
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;
@ -817,7 +817,7 @@ v850_frame_saved_pc (struct frame_info *fi)
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;