* defs.h (store_address): Delete declaration.
findvar.c (store_address): Delete function.
* arm-tdep.c (arm_push_dummy_call): Replace store_address with
store_unsigned_integer.
* xstormy16-tdep.c (xstormy16_address_to_pointer): Ditto.
* v850-tdep.c (v850_push_arguments): Ditto.
* sparc-tdep.c (sparc_get_saved_register): Ditto.
* sh-tdep.c (sh64_get_saved_register): Ditto.
* rs6000-tdep.c (rs6000_push_arguments): Ditto.
* ppc-sysv-tdep.c (ppc_sysv_abi_push_arguments): Ditto.
* mips-tdep.c (mips_eabi_push_arguments): Ditto.
(mips_get_saved_register): Ditto.
* ia64-tdep.c (ia64_get_saved_register): Ditto.
(find_func_descr, ia64_push_arguments): Ditto.
* i386-tdep.c (i386_push_arguments): Ditto.
* hpux-thread.c (hpux_thread_fetch_registers): Ditto.
* frv-tdep.c (frv_push_arguments): Ditto.
* frame.c (legacy_saved_regs_prev_register): Ditto.
(deprecated_generic_get_saved_register): Ditto.
* findvar.c (unsigned_address_to_pointer): Ditto.
* dwarf2read.c (dwarf2_const_value): Ditto.
* arm-linux-tdep.c (arm_linux_push_arguments): Ditto.
* alpha-tdep.c (alpha_push_arguments): Ditto.
+2003-05-13 Andrew Cagney <cagney@redhat.com>
+
+ * defs.h (store_address): Delete declaration.
+ findvar.c (store_address): Delete function.
+ * arm-tdep.c (arm_push_dummy_call): Replace store_address with
+ store_unsigned_integer.
+ * xstormy16-tdep.c (xstormy16_address_to_pointer): Ditto.
+ * v850-tdep.c (v850_push_arguments): Ditto.
+ * sparc-tdep.c (sparc_get_saved_register): Ditto.
+ * sh-tdep.c (sh64_get_saved_register): Ditto.
+ * rs6000-tdep.c (rs6000_push_arguments): Ditto.
+ * ppc-sysv-tdep.c (ppc_sysv_abi_push_arguments): Ditto.
+ * mips-tdep.c (mips_eabi_push_arguments): Ditto.
+ (mips_get_saved_register): Ditto.
+ * ia64-tdep.c (ia64_get_saved_register): Ditto.
+ (find_func_descr, ia64_push_arguments): Ditto.
+ * i386-tdep.c (i386_push_arguments): Ditto.
+ * hpux-thread.c (hpux_thread_fetch_registers): Ditto.
+ * frv-tdep.c (frv_push_arguments): Ditto.
+ * frame.c (legacy_saved_regs_prev_register): Ditto.
+ (deprecated_generic_get_saved_register): Ditto.
+ * findvar.c (unsigned_address_to_pointer): Ditto.
+ * dwarf2read.c (dwarf2_const_value): Ditto.
+ * arm-linux-tdep.c (arm_linux_push_arguments): Ditto.
+ * alpha-tdep.c (alpha_push_arguments): Ditto.
+
2003-05-12 J. Brobecker <brobecker@gnat.com>
* NEWS: Mention that the hppa-hpux port has been partially
write_memory (sp + m_arg->offset, m_arg->contents, m_arg->len);
if (struct_return)
{
- store_address (raw_buffer, sizeof (CORE_ADDR), struct_addr);
+ /* NOTE: cagney/2003-05-09: Using sizeof CORE_ADDR here is just
+ wrong. */
+ store_unsigned_integer (raw_buffer, sizeof (CORE_ADDR), struct_addr);
write_memory (sp, raw_buffer, sizeof (CORE_ADDR));
}
registers follow in ascending order.
The PC is saved immediately below the SP. */
save_address = sp + PROC_REG_OFFSET (proc_desc);
- store_address (raw_buffer, 8, read_register (ALPHA_RA_REGNUM));
+ store_unsigned_integer (raw_buffer, 8, read_register (ALPHA_RA_REGNUM));
write_memory (save_address, raw_buffer, 8);
save_address += 8;
mask = PROC_REG_MASK (proc_desc) & 0xffffffffL;
{
if (ireg == ALPHA_RA_REGNUM)
continue;
- store_address (raw_buffer, 8, read_register (ireg));
+ store_unsigned_integer (raw_buffer, 8, read_register (ireg));
write_memory (save_address, raw_buffer, 8);
save_address += 8;
}
- store_address (raw_buffer, 8, read_register (PC_REGNUM));
+ store_unsigned_integer (raw_buffer, 8, read_register (PC_REGNUM));
write_memory (sp - 8, raw_buffer, 8);
/* Save floating point registers. */
for (ireg = 0; mask; ireg++, mask >>= 1)
if (mask & 1)
{
- store_address (raw_buffer, 8, read_register (ireg + FP0_REGNUM));
+ store_unsigned_integer (raw_buffer, 8, read_register (ireg + FP0_REGNUM));
write_memory (save_address, raw_buffer, 8);
save_address += 8;
}
{
CORE_ADDR regval = extract_address (val, len);
if (arm_pc_is_thumb (regval))
- store_address (val, len, MAKE_THUMB_ADDR (regval));
+ store_unsigned_integer (val, len, MAKE_THUMB_ADDR (regval));
}
/* Copy the argument to general registers or the stack in
if (arm_pc_is_thumb (regval))
{
val = alloca (len);
- store_address (val, len, MAKE_THUMB_ADDR (regval));
+ store_unsigned_integer (val, len, MAKE_THUMB_ADDR (regval));
}
}
extern void store_unsigned_integer (void *, int, ULONGEST);
-extern void store_address (void *, int, LONGEST);
-
extern void store_typed_address (void *buf, struct type *type, CORE_ADDR addr);
\f
(sym)));
SYMBOL_VALUE_BYTES (sym) = (char *)
obstack_alloc (&objfile->symbol_obstack, cu_header->addr_size);
- store_address (SYMBOL_VALUE_BYTES (sym), cu_header->addr_size,
- DW_ADDR (attr));
+ /* NOTE: cagney/2003-05-09: In-lined store_address call with
+ it's body - store_unsigned_integer. */
+ store_unsigned_integer (SYMBOL_VALUE_BYTES (sym), cu_header->addr_size,
+ DW_ADDR (attr));
SYMBOL_CLASS (sym) = LOC_CONST_BYTES;
break;
case DW_FORM_block1:
}
}
-/* Store the address VAL as a LEN-byte value in target byte order at
- ADDR. ADDR is a buffer in the GDB process, not in the inferior.
-
- This function should only be used by target-specific code. It
- assumes that a pointer has the same representation as that thing's
- address represented as an integer. Some machines use word
- addresses, or similarly munged things, for certain types of
- pointers, so that assumption doesn't hold everywhere.
-
- Common code should use store_typed_address instead, or something else
- based on ADDRESS_TO_POINTER. */
-void
-store_address (void *addr, int len, LONGEST val)
-{
- store_unsigned_integer (addr, len, val);
-}
-
-
/* Store the address ADDR as a pointer of type TYPE at BUF, in target
form. */
void
void
unsigned_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
{
- store_address (buf, TYPE_LENGTH (type), addr);
+ store_unsigned_integer (buf, TYPE_LENGTH (type), addr);
}
void
*addrp = 0;
*realnump = -1;
if (bufferp != NULL)
- store_address (bufferp, REGISTER_RAW_SIZE (regnum),
- get_frame_saved_regs (frame)[regnum]);
+ /* NOTE: cagney/2003-05-09: In-lined store_address with
+ it's body - store_unsigned_integer. */
+ store_unsigned_integer (bufferp, REGISTER_RAW_SIZE (regnum),
+ get_frame_saved_regs (frame)[regnum]);
}
else
{
if (regnum == SP_REGNUM)
{
if (raw_buffer) /* SP register treated specially */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- get_frame_saved_regs (frame)[regnum]);
+ /* NOTE: cagney/2003-05-09: In-line store_address
+ with it's body - store_unsigned_integer. */
+ store_unsigned_integer (raw_buffer,
+ REGISTER_RAW_SIZE (regnum),
+ get_frame_saved_regs (frame)[regnum]);
}
else
{
if (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
{
- store_address (valbuf, 4, VALUE_ADDRESS (arg));
+ store_unsigned_integer (valbuf, 4, VALUE_ADDRESS (arg));
typecode = TYPE_CODE_PTR;
len = 4;
val = valbuf;
/* Flags must be 0 to avoid bogus value for SS_INSYSCALL */
memset (buf, '\000', REGISTER_RAW_SIZE (regno));
else if (regno == SP_REGNUM)
- store_address (buf, sizeof sp, sp);
+ store_unsigned_integer (buf, sizeof sp, sp);
else if (regno == PC_REGNUM)
read_memory (sp - 20, buf, REGISTER_RAW_SIZE (regno));
else
char buf[4];
sp -= 4;
- store_address (buf, 4, struct_addr);
+ store_unsigned_integer (buf, 4, struct_addr);
write_memory (sp, buf, 4);
}
if (regnum == SP_REGNUM && get_next_frame (frame))
{
/* Handle SP values for all frames but the topmost. */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- get_frame_base (frame));
+ store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum),
+ get_frame_base (frame));
}
else if (regnum == IA64_BSP_REGNUM)
{
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- get_frame_extra_info (frame)->bsp);
+ store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum),
+ get_frame_extra_info (frame)->bsp);
}
else if (regnum == IA64_VFP_REGNUM)
{
still provide a value since we know the size of the frame */
CORE_ADDR vfp = (get_frame_base (frame)
+ get_frame_extra_info (frame)->mem_stack_frame_size);
- store_address (raw_buffer, REGISTER_RAW_SIZE (IA64_VFP_REGNUM), vfp);
+ store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (IA64_VFP_REGNUM), vfp);
}
else if (IA64_PR0_REGNUM <= regnum && regnum <= IA64_PR63_REGNUM)
{
{
pc = read_pc ();
}
- store_address (raw_buffer, REGISTER_RAW_SIZE (IA64_IP_REGNUM), pc);
+ store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (IA64_IP_REGNUM), pc);
}
else if (IA64_GR32_REGNUM <= regnum && regnum <= IA64_GR127_REGNUM)
{
if (global_pointer == 0)
global_pointer = read_register (IA64_GR1_REGNUM);
- store_address (buf, 8, faddr);
- store_address (buf + 8, 8, global_pointer);
+ store_unsigned_integer (buf, 8, faddr);
+ store_unsigned_integer (buf + 8, 8, global_pointer);
write_memory (fdesc, buf, 16);
}
{
char val_buf[8];
- store_address (val_buf, 8,
- find_func_descr (extract_address (VALUE_CONTENTS (arg), 8),
- &funcdescaddr));
+ store_unsigned_integer (val_buf, 8,
+ find_func_descr (extract_address (VALUE_CONTENTS (arg), 8),
+ &funcdescaddr));
if (slotnum < rseslots)
write_memory (rse_address_add (bsp, slotnum), val_buf, 8);
else
/* Store the struct return value in r8 if necessary. */
if (struct_return)
{
- store_address (&deprecated_registers[REGISTER_BYTE (IA64_GR8_REGNUM)],
- REGISTER_RAW_SIZE (IA64_GR8_REGNUM),
- struct_addr);
+ store_unsigned_integer (&deprecated_registers[REGISTER_BYTE (IA64_GR8_REGNUM)],
+ REGISTER_RAW_SIZE (IA64_GR8_REGNUM),
+ struct_addr);
}
/* Sync gdb's idea of what the registers are with the target. */
if (len > MIPS_SAVED_REGSIZE
&& (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION))
{
- store_address (valbuf, MIPS_SAVED_REGSIZE, VALUE_ADDRESS (arg));
+ store_unsigned_integer (valbuf, MIPS_SAVED_REGSIZE, VALUE_ADDRESS (arg));
typecode = TYPE_CODE_PTR;
len = MIPS_SAVED_REGSIZE;
val = valbuf;
/* Only MIPS_SAVED_REGSIZE bytes of GP registers are
saved. */
LONGEST val = read_memory_integer ((*addrp), MIPS_SAVED_REGSIZE);
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), val);
+ store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum), val);
}
}
}
write_register (SP_REGNUM, sp);
/* write the backchain */
- store_address (old_sp_buf, 4, saved_sp);
+ store_unsigned_integer (old_sp_buf, 4, saved_sp);
write_memory (sp, old_sp_buf, 4);
argoffset = 8;
|| TYPE_CODE (type) == TYPE_CODE_UNION)
{
write_memory (sp + structoffset, val, len);
- store_address (val_buf, 4, sp + structoffset);
+ store_unsigned_integer (val_buf, 4, sp + structoffset);
structoffset += round2 (len, 8);
}
else
write_register (SP_REGNUM, sp);
/* set back chain properly */
- store_address (tmp_buffer, 4, saved_sp);
+ store_unsigned_integer (tmp_buffer, 4, saved_sp);
write_memory (sp, tmp_buffer, 4);
target_store_registers (-1);
if (regnum == SP_REGNUM)
{
if (raw_buffer) /* SP register treated specially */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- get_frame_saved_regs (frame)[regnum]);
+ store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum),
+ get_frame_saved_regs (frame)[regnum]);
}
else
{ /* any other register */
if (raw_buffer != NULL)
{
/* Put it back in target format. */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), get_frame_pc (frame));
+ store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum), get_frame_pc (frame));
}
if (addrp != NULL)
*addrp = 0;
if (raw_buffer != NULL)
{
/* Put it back in target format. */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum), addr);
+ store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum), addr);
}
if (addrp != NULL)
*addrp = 0;
if (!v850_type_is_scalar (VALUE_TYPE (*args))
&& TYPE_LENGTH (VALUE_TYPE (*args)) > E_MAX_RETTYPE_SIZE_IN_REGS)
{
- store_address (valbuf, 4, VALUE_ADDRESS (*args));
+ store_unsigned_integer (valbuf, 4, VALUE_ADDRESS (*args));
len = 4;
val = valbuf;
}
if (addr2)
addr = addr2;
}
- store_address (buf, TYPE_LENGTH (type), addr);
+ store_unsigned_integer (buf, TYPE_LENGTH (type), addr);
}
static CORE_ADDR