+2002-11-02 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h (deprecated_read_register_gen): Rename
+ read_register_gen.
+ (deprecated_write_register_gen): Rename write_register_gen.
+ * i387-tdep.c: Update.
+ * x86-64-linux-nat.c: Update
+ * wince.c: Update.
+ * thread-db.c: Update.
+ * win32-nat.c: Update.
+ * mips-tdep.c: Update.
+ * d10v-tdep.c: Update.
+ * cris-tdep.c: Update.
+ * remote-sim.c: Update.
+ * remote-rdi.c: Update.
+ * remote-rdp.c: Update.
+ * frame.c: Update.
+ * target.c: Update.
+ * blockframe.c: Update.
+ * x86-64-tdep.c: Update.
+ * xstormy16-tdep.c: Update.
+ * sh-tdep.c: Update.
+ * s390-tdep.c: Update.
+ * rs6000-tdep.c: Update.
+ * sparc-tdep.c: Update.
+ * i386-tdep.c: Update.
+ * dwarf2cfi.c: Update.
+ * regcache.c: Update.
+
2002-11-01 Joel Brobecker <brobecker@gnat.com>
New interix-specific files:
if (addrp)
*addrp = REGISTER_BYTE (regnum);
if (raw_buffer)
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
}
void
function (since there's no push srp in that case). */
int innermost_frame = 1;
- read_register_gen (PC_REGNUM, (char *) &pc);
- read_register_gen (SP_REGNUM, (char *) &sp);
+ deprecated_read_register_gen (PC_REGNUM, (char *) &pc);
+ deprecated_read_register_gen (SP_REGNUM, (char *) &sp);
/* We make an explicit return when we can't find an outer frame. */
while (1)
/* We couldn't find a push srp in the prologue, so this must be
a leaf function, and thus we use the srp register directly.
This should happen at most once, for the innermost function. */
- read_register_gen (SRP_REGNUM, (char *) &pc);
+ deprecated_read_register_gen (SRP_REGNUM, (char *) &pc);
}
else
{
char num[MAX_REGISTER_RAW_SIZE];
int i;
printf_filtered (" ");
- read_register_gen (a, (char *) &num);
+ deprecated_read_register_gen (a, (char *) &num);
for (i = 0; i < MAX_REGISTER_RAW_SIZE; i++)
{
printf_filtered ("%02x", (num[i] & 0xff));
switch (context->reg[regnum].how)
{
case REG_CTX_UNSAVED:
- read_register_gen (regnum, reg);
+ deprecated_read_register_gen (regnum, reg);
break;
case REG_CTX_SAVED_OFFSET:
target_read_memory (context->cfa + context->reg[regnum].loc.offset,
reg, REGISTER_RAW_SIZE (regnum));
break;
case REG_CTX_SAVED_REG:
- read_register_gen (context->reg[regnum].loc.reg, reg);
+ deprecated_read_register_gen (context->reg[regnum].loc.reg, reg);
break;
case REG_CTX_SAVED_ADDR:
target_read_memory (context->reg[regnum].loc.addr,
if (fs->cfa_how == CFA_REG_OFFSET)
{
val -= fs->cfa_offset;
- write_register_gen (fs->cfa_reg, (char *) &val);
+ deprecated_write_register_gen (fs->cfa_reg, (char *) &val);
}
else
warning ("Can't write fp.");
if (!frame->next)
{
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
if (lval != NULL)
*lval = lval_register;
if (addrp != NULL)
switch (UNWIND_CONTEXT (frame)->reg[regnum].how)
{
case REG_CTX_UNSAVED:
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
if (lval != NULL)
*lval = not_lval;
if (optimized != NULL)
UNWIND_CONTEXT (frame)->reg[regnum].loc.offset;
break;
case REG_CTX_SAVED_REG:
- read_register_gen (UNWIND_CONTEXT (frame)->reg[regnum].loc.reg,
- raw_buffer);
+ deprecated_read_register_gen (UNWIND_CONTEXT (frame)->reg[regnum].loc.reg,
+ raw_buffer);
if (lval != NULL)
*lval = lval_register;
if (addrp != NULL)
available? */
*realnump = regnum;
if (bufferp)
- read_register_gen (regnum, bufferp);
+ deprecated_read_register_gen (regnum, bufferp);
return;
}
if (addr)
{
read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
- write_register_gen (regnum, regbuf);
+ deprecated_write_register_gen (regnum, regbuf);
}
}
write_register (FP_REGNUM, read_memory_integer (fp, 4));
break;
}
- read_register_gen ((fpreg + 8 - top) % 8 + FP0_REGNUM, raw);
+ deprecated_read_register_gen ((fpreg + 8 - top) % 8 + FP0_REGNUM, raw);
fputs_filtered ("0x", file);
for (i = 9; i >= 0; i--)
offset = 0;
}
*sp -= regsize;
- read_register_gen (regno, buffer);
+ deprecated_read_register_gen (regno, buffer);
write_memory (*sp, buffer + offset, regsize);
}
if (REGISTER_NAME (regnum) != NULL && *REGISTER_NAME (regnum) != '\0')
/* Force the cache to fetch the entire register. */
- read_register_gen (regnum, reg_buf);
+ deprecated_read_register_gen (regnum, reg_buf);
else
/* Legacy note: even though this register is ``invalid'' we
still need to return something. It would appear that some
}
void
-read_register_gen (int regnum, char *buf)
+deprecated_read_register_gen (int regnum, char *buf)
{
gdb_assert (current_regcache != NULL);
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
}
void
-write_register_gen (int regnum, char *buf)
+deprecated_write_register_gen (int regnum, char *buf)
{
gdb_assert (current_regcache != NULL);
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
/* Is this register completely within the range the user is writing? */
else if (myregstart <= regstart && regend <= myregend)
- write_register_gen (regnum, myaddr + (regstart - myregstart));
+ deprecated_write_register_gen (regnum, myaddr + (regstart - myregstart));
/* The register partially overlaps the range being written. */
else
/* We may be doing a partial update of an invalid register.
Update it from the target before scribbling on it. */
- read_register_gen (regnum, regbuf);
+ deprecated_read_register_gen (regnum, regbuf);
memcpy (registers + overlapstart,
myaddr + (overlapstart - myregstart),
read_register (int regnum)
{
char *buf = alloca (REGISTER_RAW_SIZE (regnum));
- read_register_gen (regnum, buf);
+ deprecated_read_register_gen (regnum, buf);
return (extract_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum)));
}
read_signed_register (int regnum)
{
void *buf = alloca (REGISTER_RAW_SIZE (regnum));
- read_register_gen (regnum, buf);
+ deprecated_read_register_gen (regnum, buf);
return (extract_signed_integer (buf, REGISTER_RAW_SIZE (regnum)));
}
size = REGISTER_RAW_SIZE (regnum);
buf = alloca (size);
store_signed_integer (buf, size, (LONGEST) val);
- write_register_gen (regnum, buf);
+ deprecated_write_register_gen (regnum, buf);
}
void
extern void read_register_bytes (int regbyte, char *myaddr, int len);
-extern void read_register_gen (int regnum, char *myaddr);
+extern void deprecated_read_register_gen (int regnum, char *myaddr);
-extern void write_register_gen (int regnum, char *myaddr);
+extern void deprecated_write_register_gen (int regnum, char *myaddr);
extern void write_register_bytes (int regbyte, char *myaddr, int len);
}
else
{
- read_register_gen (regno, (char *) rawreg);
+ deprecated_read_register_gen (regno, (char *) rawreg);
/* RDI manipulates data in host byte order, so convert now. */
store_unsigned_integer (rawerreg, 4, rawreg[0]);
else
{
char tmp[ARM_MAX_REGISTER_RAW_SIZE];
- read_register_gen (regno, tmp);
+ deprecated_read_register_gen (regno, tmp);
if (regno < 15)
rdp_store_one_register (1 << regno, tmp);
else if (regno == ARM_PC_REGNUM)
{
char tmp[MAX_REGISTER_RAW_SIZE];
int nr_bytes;
- read_register_gen (regno, tmp);
+ deprecated_read_register_gen (regno, tmp);
nr_bytes = sim_store_register (gdbsim_desc,
REGISTER_SIM_REGNO (regno),
tmp, REGISTER_RAW_SIZE (regno));
memcpy (reg_val_buf, valbuf + copied, reg_size);
copied += reg_size;
- write_register_gen (regnum, reg_val_buf);
+ deprecated_write_register_gen (regnum, reg_val_buf);
i++;
}
}
else if (is_double_arg (type)
&& gr <= 5)
{
- write_register_gen (S390_GP0_REGNUM + gr,
- VALUE_CONTENTS (arg));
- write_register_gen (S390_GP0_REGNUM + gr + 1,
- VALUE_CONTENTS (arg) + 4);
+ deprecated_write_register_gen (S390_GP0_REGNUM + gr,
+ VALUE_CONTENTS (arg));
+ deprecated_write_register_gen (S390_GP0_REGNUM + gr + 1,
+ VALUE_CONTENTS (arg) + 4);
gr += 2;
}
else
if (addrp)
*addrp = REGISTER_BYTE (live_regnum);
if (raw_buffer)
- read_register_gen (live_regnum, raw_buffer);
+ deprecated_read_register_gen (live_regnum, raw_buffer);
}
/* Extract from an array REGBUF containing the (raw) register state
if (float_arg_index <= tdep->FLOAT_ARGLAST_REGNUM)
{
/* Goes in FR0...FR11 */
- write_register_gen (FP0_REGNUM + float_arg_index, val);
+ deprecated_write_register_gen (FP0_REGNUM + float_arg_index,
+ val);
fp_args[float_arg_index] = 1;
/* Skip the corresponding general argument register. */
int_argreg ++;
call the gdbarch function to do register
writes, and that will properly know how to deal
with pseudoregs. */
- write_register_gen (regnum, val);
+ deprecated_write_register_gen (regnum, val);
fp_args[double_arg_index] = 1;
fp_args[double_arg_index + 1] = 1;
/* Skip the corresponding general argument register. */
if (len == 4)
{
/* Return value stored in FP0_REGNUM */
- write_register_gen (FP0_REGNUM, valbuf);
+ deprecated_write_register_gen (FP0_REGNUM, valbuf);
}
if (len == 8)
{
offset = REGISTER_RAW_SIZE (return_register) - len;
memcpy (buf + offset, valbuf, len);
- write_register_gen (return_register, buf);
+ deprecated_write_register_gen (return_register, buf);
}
else
- write_register_gen (return_register, valbuf);
+ deprecated_write_register_gen (return_register, valbuf);
}
}
*lval = lval_register;
addr = REGISTER_BYTE (regnum);
if (raw_buffer != NULL)
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
}
if (addrp != NULL)
*addrp = addr;
if (fsr[FPS_REGNUM])
{
read_memory (fsr[FPS_REGNUM], raw_buffer, SPARC_INTREG_SIZE);
- write_register_gen (FPS_REGNUM, raw_buffer);
+ deprecated_write_register_gen (FPS_REGNUM, raw_buffer);
}
if (fsr[CPS_REGNUM])
{
read_memory (fsr[CPS_REGNUM], raw_buffer, SPARC_INTREG_SIZE);
- write_register_gen (CPS_REGNUM, raw_buffer);
+ deprecated_write_register_gen (CPS_REGNUM, raw_buffer);
}
}
}
for (regi = 0; regi <= R_I7; regi++)
if ((regno == -1) || (regno == regi))
- read_register_gen (regi, (char *) (regp + regi) + offset);
+ deprecated_read_register_gen (regi, (char *) (regp + regi) + offset);
if ((regno == -1) || (regno == PC_REGNUM))
- read_register_gen (PC_REGNUM, (char *) (regp + R_PC) + offset);
+ deprecated_read_register_gen (PC_REGNUM, (char *) (regp + R_PC) + offset);
if ((regno == -1) || (regno == NPC_REGNUM))
- read_register_gen (NPC_REGNUM, (char *) (regp + R_nPC) + offset);
+ deprecated_read_register_gen (NPC_REGNUM, (char *) (regp + R_nPC) + offset);
if ((regno == -1) || (regno == Y_REGNUM))
- read_register_gen (Y_REGNUM, (char *) (regp + R_Y) + offset);
+ deprecated_read_register_gen (Y_REGNUM, (char *) (regp + R_Y) + offset);
if (GDB_TARGET_IS_SPARC64)
{
#ifdef R_CCR
if (regno == -1 || regno == CCR_REGNUM)
- read_register_gen (CCR_REGNUM, ((char *) (regp + R_CCR)) + offset);
+ deprecated_read_register_gen (CCR_REGNUM, ((char *) (regp + R_CCR)) + offset);
#endif
#ifdef R_FPRS
if (regno == -1 || regno == FPRS_REGNUM)
- read_register_gen (FPRS_REGNUM, ((char *) (regp + R_FPRS)) + offset);
+ deprecated_read_register_gen (FPRS_REGNUM, ((char *) (regp + R_FPRS)) + offset);
#endif
#ifdef R_ASI
if (regno == -1 || regno == ASI_REGNUM)
- read_register_gen (ASI_REGNUM, ((char *) (regp + R_ASI)) + offset);
+ deprecated_read_register_gen (ASI_REGNUM, ((char *) (regp + R_ASI)) + offset);
#endif
}
else /* sparc32 */
{
#ifdef R_PS
if (regno == -1 || regno == PS_REGNUM)
- read_register_gen (PS_REGNUM, ((char *) (regp + R_PS)) + offset);
+ deprecated_read_register_gen (PS_REGNUM, ((char *) (regp + R_PS)) + offset);
#endif
/* For 64-bit hosts, R_WIM and R_TBR may not be defined.
#if defined (R_WIM)
if (regno == -1 || regno == WIM_REGNUM)
- read_register_gen (WIM_REGNUM, ((char *) (regp + R_WIM)) + offset);
+ deprecated_read_register_gen (WIM_REGNUM, ((char *) (regp + R_WIM)) + offset);
#else
if (regno == -1 || regno == WIM_REGNUM)
- read_register_gen (WIM_REGNUM, NULL);
+ deprecated_read_register_gen (WIM_REGNUM, NULL);
#endif
#if defined (R_TBR)
if (regno == -1 || regno == TBR_REGNUM)
- read_register_gen (TBR_REGNUM, ((char *) (regp + R_TBR)) + offset);
+ deprecated_read_register_gen (TBR_REGNUM, ((char *) (regp + R_TBR)) + offset);
#else
if (regno == -1 || regno == TBR_REGNUM)
- read_register_gen (TBR_REGNUM, NULL);
+ deprecated_read_register_gen (TBR_REGNUM, NULL);
#endif
}
}
for (j = 0;
j < m_arg->len && oregnum < 6;
j += SPARC_INTREG_SIZE, oregnum++)
- write_register_gen (O0_REGNUM + oregnum, m_arg->contents + j);
+ deprecated_write_register_gen (O0_REGNUM + oregnum, m_arg->contents + j);
}
return sp;
memset (buffer, 0, REGISTER_RAW_SIZE (regno));
memcpy (buffer + REGISTER_RAW_SIZE (regno) - TYPE_LENGTH (type), valbuf,
TYPE_LENGTH (type));
- write_register_gen (regno, buffer);
+ deprecated_write_register_gen (regno, buffer);
}
else
write_register_bytes (REGISTER_BYTE (regno), valbuf, TYPE_LENGTH (type));
{
int oreg = O0_REGNUM + register_counter;
- write_register_gen (oreg, VALUE_CONTENTS (copyarg) + j);
+ deprecated_write_register_gen (oreg, VALUE_CONTENTS (copyarg) + j);
register_counter += 1;
}
}
{
int i;
unsigned char *buf = alloca (MAX_REGISTER_RAW_SIZE);
- read_register_gen (regno, buf);
+ deprecated_read_register_gen (regno, buf);
fprintf_unfiltered (gdb_stdlog, " = ");
for (i = 0; i < REGISTER_RAW_SIZE (regno); i++)
{
{
char raw[MAX_REGISTER_RAW_SIZE];
- read_register_gen (regno, raw);
+ deprecated_read_register_gen (regno, raw);
thread_db_fetch_registers (-1);
supply_register (regno, raw);
}
do_child_store_inferior_registers (int r)
{
if (r >= 0)
- read_register_gen (r, ((char *) ¤t_thread->context) + mappings[r]);
+ deprecated_read_register_gen (r, ((char *) ¤t_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
do_child_store_inferior_registers (int r)
{
if (r >= 0)
- read_register_gen (r, ((char *) ¤t_thread->context) + mappings[r]);
+ deprecated_read_register_gen (r, ((char *) ¤t_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
do_child_store_inferior_registers (int r)
{
if (r >= 0)
- read_register_gen (r, ((char *) ¤t_thread->context) + mappings[r]);
+ deprecated_read_register_gen (r, ((char *) ¤t_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
for (i = 0; i < x86_64_num_gregs; i++)
if ((regno == -1 || regno == i))
- read_register_gen (i, (char *) (regp + x86_64_regmap[i]));
+ deprecated_read_register_gen (i, (char *) (regp + x86_64_regmap[i]));
}
/* Fetch all general-purpose registers from process/thread TID and
case X86_64_NO_CLASS:
break;
case X86_64_INTEGER_CLASS:
- write_register_gen (int_parameter_registers
- [(intreg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (int_parameter_registers
+ [(intreg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
intreg += 2;
break;
case X86_64_INTEGERSI_CLASS:
- write_register_gen (int_parameter_registers[intreg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (int_parameter_registers[intreg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
intreg++;
break;
case X86_64_SSEDF_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSE_CLASS:
- write_register_gen (sse_parameter_registers
- [(ssereg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (sse_parameter_registers
+ [(ssereg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg += 2;
break;
case X86_64_SSEUP_CLASS:
- write_register_gen (sse_parameter_registers[ssereg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (sse_parameter_registers[ssereg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg++;
break;
/* Add leading zeros to the value. */
memset (buf, 0, xstormy16_reg_size);
memcpy (buf, valbuf, 1);
- write_register_gen (E_1ST_ARG_REGNUM, buf);
+ deprecated_write_register_gen (E_1ST_ARG_REGNUM, buf);
}
else if (xstormy16_type_is_scalar (type) &&
TYPE_LENGTH (type) <= E_MAX_RETTYPE_SIZE_IN_REGS)