2003-05-08 Andrew Cagney <cagney@redhat.com>

* gdbarch.sh: Delete references to MAX_REGISTER_RAW_SIZE.
	* gdbarch.h: Re-generate.
	* defs.h (MAX_REGISTER_RAW_SIZE): Delete macro.
	(legacy_max_register_raw_size): Delete declaration.
	* regcache.c (legacy_max_register_raw_size): Delete function.
	* valops.c: Replace MAX_REGISTER_RAW_SIZE with MAX_REGISTER_SIZE.
	* target.c, stack.c, sparc-tdep.c, sh-tdep.c: Update.
	* rs6000-tdep.c, rs6000-nat.c, remote.c, remote-sim.c: Update.
	* remote-rdp.c, remote-array.c, regcache.c: Update.
	* ppc-linux-nat.c, monitor.c, mn10300-tdep.c: Update.
	* mips-tdep.c, mips-linux-tdep.c, m68klinux-nat.c: Update.
	* infptrace.c, ia64-tdep.c, i386-tdep.c, frame.c: Update.
	* findvar.c, dwarf2cfi.c: Update.

Index: tui/ChangeLog
2003-05-08  Andrew Cagney  <cagney@redhat.com>

	* tuiRegs.c: Use MAX_REGISTER_SIZE instead of
	MAX_REGISTER_RAW_SIZE.

Index: mi/ChangeLog
2003-05-08  Andrew Cagney  <cagney@redhat.com>

	* mi-main.c (register_changed_p): Use MAX_REGISTER_SIZE instead of
	MAX_REGISTER_RAW_SIZE.
This commit is contained in:
Andrew Cagney 2003-05-08 20:52:49 +00:00
parent 22540ece94
commit d9d9c31f31
32 changed files with 111 additions and 118 deletions

View file

@ -1,3 +1,19 @@
2003-05-08 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Delete references to MAX_REGISTER_RAW_SIZE.
* gdbarch.h: Re-generate.
* defs.h (MAX_REGISTER_RAW_SIZE): Delete macro.
(legacy_max_register_raw_size): Delete declaration.
* regcache.c (legacy_max_register_raw_size): Delete function.
* valops.c: Replace MAX_REGISTER_RAW_SIZE with MAX_REGISTER_SIZE.
* target.c, stack.c, sparc-tdep.c, sh-tdep.c: Ditto.
* rs6000-tdep.c, rs6000-nat.c, remote.c, remote-sim.c: Ditto.
* remote-rdp.c, remote-array.c, regcache.c: Ditto.
* ppc-linux-nat.c, monitor.c, mn10300-tdep.c: Ditto.
* mips-tdep.c, mips-linux-tdep.c, m68klinux-nat.c: Ditto.
* infptrace.c, ia64-tdep.c, i386-tdep.c, frame.c: Ditto.
* findvar.c, dwarf2cfi.c: Ditto.
2003-05-08 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (read_signed_register): New function, moved to here

View file

@ -1091,22 +1091,6 @@ extern void *alloca ();
enum { MAX_REGISTER_SIZE = 16 };
/* FIXME: cagney/2003-03-01: Hack to prop up old targets while they
migrate to the overhauled register cache.
The problem is that some architectures specify different sized raw
and cooked (nee virtual) register sizes. They shouldn't. Instead,
all architectures should just implement a gdbarch_register_type().
That can be used to compute all needed register attributes. While
waiting for the conversion, provide compatibility macros that keep
old code working. */
#ifdef MAX_REGISTER_RAW_SIZE
#error MAX_REGISTER_RAW_SIZE defined
#endif
extern int legacy_max_register_raw_size (void);
#define MAX_REGISTER_RAW_SIZE legacy_max_register_raw_size ()
/* Static target-system-dependent parameters for GDB. */
/* Number of bits in a char or unsigned char for the target machine.

View file

@ -1751,7 +1751,7 @@ cfi_write_fp (CORE_ADDR val)
void
cfi_pop_frame (struct frame_info *fi)
{
char *regbuf = alloca (MAX_REGISTER_RAW_SIZE);
char regbuf[MAX_REGISTER_SIZE];
int regnum;
for (regnum = 0; regnum < NUM_REGS; regnum++)

View file

@ -300,7 +300,7 @@ value_of_register (int regnum, struct frame_info *frame)
int optim;
struct value *reg_val;
int realnum;
char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
enum lval_type lval;
/* Builtin registers lie completly outside of the range of normal
@ -664,7 +664,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
struct value *
value_from_register (struct type *type, int regnum, struct frame_info *frame)
{
char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
CORE_ADDR addr;
int optim;
struct value *v = allocate_value (type);
@ -699,7 +699,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
CORE_ADDR last_addr = 0;
CORE_ADDR first_addr = 0;
value_bytes = (char *) alloca (len + MAX_REGISTER_RAW_SIZE);
value_bytes = (char *) alloca (len + MAX_REGISTER_SIZE);
/* Copy all of the data out, whereever it may be. */

View file

@ -618,7 +618,7 @@ void
frame_unwind_signed_register (struct frame_info *frame, int regnum,
LONGEST *val)
{
void *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
frame_unwind_register (frame, regnum, buf);
(*val) = extract_signed_integer (buf, REGISTER_VIRTUAL_SIZE (regnum));
}
@ -627,7 +627,7 @@ void
frame_unwind_unsigned_register (struct frame_info *frame, int regnum,
ULONGEST *val)
{
void *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
frame_unwind_register (frame, regnum, buf);
(*val) = extract_unsigned_integer (buf, REGISTER_VIRTUAL_SIZE (regnum));
}

View file

@ -802,9 +802,9 @@ extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_regi
#endif
#endif
/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE, MAX_REGISTER_RAW_SIZE,
DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE, and MAX_REGISTER_VIRTUAL_SIZE
are all being replaced by MAX_REGISTER_SIZE (a constant). */
/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
MAX_REGISTER_SIZE (a constant). */
#if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
/* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */
@ -862,9 +862,9 @@ extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_
#endif
#endif
/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE, MAX_REGISTER_RAW_SIZE,
DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE, and MAX_REGISTER_VIRTUAL_SIZE
are all being replaced by MAX_REGISTER_SIZE (a constant). */
/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
MAX_REGISTER_SIZE (a constant). */
#if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
/* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */

View file

@ -483,16 +483,16 @@ F::REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::generic_register_byte:gene
# The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
# REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE.
f:2:REGISTER_RAW_SIZE:int:register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
# The methods DEPRECATED_MAX_REGISTER_RAW_SIZE, MAX_REGISTER_RAW_SIZE,
# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE, and MAX_REGISTER_VIRTUAL_SIZE
# are all being replaced by MAX_REGISTER_SIZE (a constant).
# The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
# MAX_REGISTER_SIZE (a constant).
V:2:DEPRECATED_MAX_REGISTER_RAW_SIZE:int:deprecated_max_register_raw_size
# The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
# REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE.
f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
# The methods DEPRECATED_MAX_REGISTER_RAW_SIZE, MAX_REGISTER_RAW_SIZE,
# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE, and MAX_REGISTER_VIRTUAL_SIZE
# are all being replaced by MAX_REGISTER_SIZE (a constant).
# The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
# MAX_REGISTER_SIZE (a constant).
V:2:DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE:int:deprecated_max_register_virtual_size
# The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
# REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE.

View file

@ -1097,7 +1097,7 @@ i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{
if (i386_mmx_regnum_p (regnum))
{
char *mmx_buf = alloca (MAX_REGISTER_RAW_SIZE);
char mmx_buf[MAX_REGISTER_SIZE];
int fpnum = i386_mmx_regnum_to_fp_regnum (regcache, regnum);
/* Extract (always little endian). */
@ -1114,7 +1114,7 @@ i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
{
if (i386_mmx_regnum_p (regnum))
{
char *mmx_buf = alloca (MAX_REGISTER_RAW_SIZE);
char mmx_buf[MAX_REGISTER_SIZE];
int fpnum = i386_mmx_regnum_to_fp_regnum (regcache, regnum);
/* Read ... */

View file

@ -1259,7 +1259,7 @@ ia64_get_saved_register (char *raw_buffer,
}
else if (IA64_PR0_REGNUM <= regnum && regnum <= IA64_PR63_REGNUM)
{
char *pr_raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char pr_raw_buffer[MAX_REGISTER_SIZE];
int pr_optim;
enum lval_type pr_lval;
CORE_ADDR pr_addr;
@ -1282,7 +1282,7 @@ ia64_get_saved_register (char *raw_buffer,
}
else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
{
char *unat_raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char unat_raw_buffer[MAX_REGISTER_SIZE];
int unat_optim;
enum lval_type unat_lval;
CORE_ADDR unat_addr;

View file

@ -359,7 +359,7 @@ fetch_register (int regno)
char mess[128]; /* For messages */
register int i;
unsigned int offset; /* Offset of registers within the u area. */
char *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
int tid;
if (CANNOT_FETCH_REGISTER (regno))
@ -424,7 +424,7 @@ store_register (int regno)
register int i;
unsigned int offset; /* Offset of registers within the u area. */
int tid;
char *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
if (CANNOT_STORE_REGISTER (regno))
{

View file

@ -199,7 +199,7 @@ store_register (int regno)
register int i;
unsigned int offset; /* Offset of registers within the u area. */
int tid;
char *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
if (CANNOT_STORE_REGISTER (regno))
{

View file

@ -1,3 +1,8 @@
2003-05-08 Andrew Cagney <cagney@redhat.com>
* mi-main.c (register_changed_p): Use MAX_REGISTER_SIZE instead of
MAX_REGISTER_RAW_SIZE.
2003-05-08 Andrew Cagney <cagney@redhat.com>
* mi-main.c (get_register): Use MAX_REGISTER_SIZE.

View file

@ -398,7 +398,7 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
static int
register_changed_p (int regnum)
{
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
if (! frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
return -1;

View file

@ -91,7 +91,7 @@ mips_linux_get_longjmp_target (CORE_ADDR *pc)
static void
supply_32bit_reg (int regnum, const void *addr)
{
char *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
store_signed_integer (buf, REGISTER_RAW_SIZE (regnum),
extract_signed_integer (addr, 4));
supply_register (regnum, buf);
@ -104,9 +104,9 @@ supply_gregset (elf_gregset_t *gregsetp)
{
int regi;
elf_greg_t *regp = *gregsetp;
char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
char zerobuf[MAX_REGISTER_SIZE];
memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = EF_REG0; regi <= EF_REG31; regi++)
supply_32bit_reg ((regi - EF_REG0), (char *)(regp + regi));
@ -192,9 +192,9 @@ void
supply_fpregset (elf_fpregset_t *fpregsetp)
{
register int regi;
char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
char zerobuf[MAX_REGISTER_SIZE];
memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi < 32; regi++)
supply_register (FP0_REGNUM + regi,
@ -379,9 +379,9 @@ mips64_supply_gregset (mips64_elf_gregset_t *gregsetp)
{
int regi;
mips64_elf_greg_t *regp = *gregsetp;
char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
char zerobuf[MAX_REGISTER_SIZE];
memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = MIPS64_EF_REG0; regi <= MIPS64_EF_REG31; regi++)
supply_register ((regi - MIPS64_EF_REG0), (char *)(regp + regi));
@ -467,9 +467,9 @@ static void
mips64_supply_fpregset (mips64_elf_fpregset_t *fpregsetp)
{
register int regi;
char *zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
char zerobuf[MAX_REGISTER_SIZE];
memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
memset (zerobuf, 0, MAX_REGISTER_SIZE);
for (regi = 0; regi < 32; regi++)
supply_register (FP0_REGNUM + regi,

View file

@ -245,7 +245,7 @@ mips_xfer_register (struct regcache *regcache, int reg_num, int length,
enum bfd_endian endian, bfd_byte *in, const bfd_byte *out,
int buf_offset)
{
bfd_byte *reg = alloca (MAX_REGISTER_RAW_SIZE);
bfd_byte reg[MAX_REGISTER_SIZE];
int reg_offset = 0;
/* Need to transfer the left or right part of the register, based on
the targets byte order. */
@ -1642,7 +1642,7 @@ read_next_frame_reg (struct frame_info *fi, int regno)
CORE_ADDR addr;
int realnum;
enum lval_type lval;
void *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
if (fi == NULL)
{
@ -2751,7 +2751,7 @@ mips_eabi_push_arguments (int nargs,
for (argnum = 0; argnum < nargs; argnum++)
{
char *val;
char *valbuf = alloca (MAX_REGISTER_RAW_SIZE);
char valbuf[MAX_REGISTER_SIZE];
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
int len = TYPE_LENGTH (arg_type);
@ -3002,7 +3002,7 @@ mips_n32n64_push_arguments (int nargs,
for (argnum = 0; argnum < nargs; argnum++)
{
char *val;
char *valbuf = alloca (MAX_REGISTER_RAW_SIZE);
char valbuf[MAX_REGISTER_SIZE];
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
int len = TYPE_LENGTH (arg_type);
@ -3225,7 +3225,7 @@ mips_o32_push_arguments (int nargs,
for (argnum = 0; argnum < nargs; argnum++)
{
char *val;
char *valbuf = alloca (MAX_REGISTER_RAW_SIZE);
char valbuf[MAX_REGISTER_SIZE];
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
int len = TYPE_LENGTH (arg_type);
@ -3524,7 +3524,7 @@ mips_o64_push_arguments (int nargs,
for (argnum = 0; argnum < nargs; argnum++)
{
char *val;
char *valbuf = alloca (MAX_REGISTER_RAW_SIZE);
char valbuf[MAX_REGISTER_SIZE];
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
int len = TYPE_LENGTH (arg_type);
@ -4044,7 +4044,7 @@ mips_print_fp_register (int regnum)
static void
mips_print_register (int regnum, int all)
{
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
int offset;
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
@ -4100,7 +4100,7 @@ static int
do_gp_register_row (int regnum)
{
/* do values for GP (int) regs */
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
int ncols = (MIPS_REGSIZE == 8 ? 4 : 8); /* display cols per row */
int col, byte;
int start_regnum = regnum;
@ -4603,7 +4603,7 @@ mips_o64_extract_return_value (struct type *valtype,
static void
mips_eabi_store_return_value (struct type *valtype, char *valbuf)
{
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
struct return_value_word lo;
struct return_value_word hi;
return_value_location (valtype, &hi, &lo);
@ -4625,7 +4625,7 @@ mips_eabi_store_return_value (struct type *valtype, char *valbuf)
static void
mips_o64_store_return_value (struct type *valtype, char *valbuf)
{
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
struct return_value_word lo;
struct return_value_word hi;
return_value_location (valtype, &hi, &lo);
@ -4707,7 +4707,7 @@ mips_o32_xfer_return_value (struct type *type,
/* A struct that contains one or two floats. Each value is part
in the least significant part of their floating point
register.. */
bfd_byte *reg = alloca (MAX_REGISTER_RAW_SIZE);
bfd_byte reg[MAX_REGISTER_SIZE];
int regnum;
int field;
for (field = 0, regnum = FP0_REGNUM;
@ -4819,7 +4819,7 @@ mips_n32n64_xfer_return_value (struct type *type,
/* A struct that contains one or two floats. Each value is part
in the least significant part of their floating point
register.. */
bfd_byte *reg = alloca (MAX_REGISTER_RAW_SIZE);
bfd_byte reg[MAX_REGISTER_SIZE];
int regnum;
int field;
for (field = 0, regnum = FP0_REGNUM;

View file

@ -1010,7 +1010,7 @@ mn10300_dwarf2_reg_to_regnum (int dwarf2)
static void
mn10300_print_register (const char *name, int regnum, int reg_width)
{
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
if (reg_width)
printf_filtered ("%*s: ", reg_width, name);

View file

@ -1181,9 +1181,9 @@ monitor_fetch_register (int regno)
char *regbuf;
int i;
regbuf = alloca (MAX_REGISTER_RAW_SIZE * 2 + 1);
zerobuf = alloca (MAX_REGISTER_RAW_SIZE);
memset (zerobuf, 0, MAX_REGISTER_RAW_SIZE);
regbuf = alloca (MAX_REGISTER_SIZE * 2 + 1);
zerobuf = alloca (MAX_REGISTER_SIZE);
memset (zerobuf, 0, MAX_REGISTER_SIZE);
if (current_monitor->regname != NULL)
name = current_monitor->regname (regno);

View file

@ -204,7 +204,7 @@ fetch_register (int tid, int regno)
char mess[128]; /* For messages */
register int i;
unsigned int offset; /* Offset of registers within the u area. */
char *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
CORE_ADDR regaddr = ppc_register_u_addr (regno);
if (altivec_register_p (regno))
@ -364,7 +364,7 @@ store_register (int tid, int regno)
char mess[128]; /* For messages */
register int i;
unsigned int offset; /* Offset of registers within the u area. */
char *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
if (altivec_register_p (regno))
{

View file

@ -296,15 +296,6 @@ max_register_size (struct gdbarch *gdbarch)
return descr->max_register_size;
}
int
legacy_max_register_raw_size (void)
{
if (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ())
return DEPRECATED_MAX_REGISTER_RAW_SIZE;
else
return max_register_size (current_gdbarch);
}
int
register_size (struct gdbarch *gdbarch, int regnum)
{
@ -676,7 +667,7 @@ deprecated_read_register_bytes (int in_start, char *in_buf, int in_len)
{
int in_end = in_start + in_len;
int regnum;
char *reg_buf = alloca (MAX_REGISTER_RAW_SIZE);
char reg_buf[MAX_REGISTER_SIZE];
/* See if we are trying to read bytes from out-of-date registers. If so,
update just those registers. */
@ -1066,7 +1057,7 @@ deprecated_write_register_bytes (int myregstart, char *myaddr, int inlen)
/* The register partially overlaps the range being written. */
else
{
char *regbuf = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char regbuf[MAX_REGISTER_SIZE];
/* What's the overlap between this register's bytes and
those the caller wants to write? */
int overlapstart = max (regstart, myregstart);

View file

@ -731,7 +731,7 @@ array_wait (ptid_t ptid, struct target_waitstatus *status)
static void
array_fetch_registers (int ignored)
{
char *reg = alloca (MAX_REGISTER_RAW_SIZE);
char reg[MAX_REGISTER_SIZE];
int regno;
char *p;
char *packet = alloca (PBUFSIZ);

View file

@ -550,7 +550,7 @@ rdp_fetch_one_fpu_register (int mask, char *buf)
send_rdp ("bbw-SWWWWZ", RDP_COPRO_READ, FPU_COPRO_NUMBER, mask, buf + 0, buf + 4, buf + 8, &dummy);
}
#endif
memset (buf, 0, MAX_REGISTER_RAW_SIZE);
memset (buf, 0, MAX_REGISTER_SIZE);
}

View file

@ -304,9 +304,9 @@ gdbsim_fetch_register (int regno)
{
/* For moment treat a `does not exist' register the same way
as an ``unavailable'' register. */
char *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
int nr_bytes;
memset (buf, 0, MAX_REGISTER_RAW_SIZE);
memset (buf, 0, MAX_REGISTER_SIZE);
supply_register (regno, buf);
set_register_cached (regno, -1);
break;
@ -314,10 +314,10 @@ gdbsim_fetch_register (int regno)
default:
{
static int warn_user = 1;
char *buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
int nr_bytes;
gdb_assert (regno >= 0 && regno < NUM_REGS);
memset (buf, 0, MAX_REGISTER_RAW_SIZE);
memset (buf, 0, MAX_REGISTER_SIZE);
nr_bytes = sim_fetch_register (gdbsim_desc,
REGISTER_SIM_REGNO (regno),
buf, REGISTER_RAW_SIZE (regno));

View file

@ -2948,7 +2948,7 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status)
case 'T': /* Status with PC, SP, FP, ... */
{
int i;
char* regs = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char regs[MAX_REGISTER_SIZE];
/* Expedited reply, containing Signal, {regno, reg} repeat */
/* format is: 'Tssn...:r...;n...:r...;n...:r...;#cc', where
@ -3199,7 +3199,7 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
case 'T': /* Status with PC, SP, FP, ... */
{
int i;
char* regs = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char regs[MAX_REGISTER_SIZE];
/* Expedited reply, containing Signal, {regno, reg} repeat */
/* format is: 'Tssn...:r...;n...:r...;n...:r...;#cc', where
@ -3546,7 +3546,7 @@ store_register_using_P (int regnum)
struct packet_reg *reg = packet_reg_from_regnum (rs, regnum);
/* Try storing a single register. */
char *buf = alloca (rs->remote_packet_size);
char *regp = alloca (MAX_REGISTER_RAW_SIZE);
char regp[MAX_REGISTER_SIZE];
char *p;
int i;

View file

@ -218,7 +218,7 @@ rs6000_ptrace64 (int req, int id, long long addr, int data, int *buf)
static void
fetch_register (int regno)
{
int *addr = alloca (MAX_REGISTER_RAW_SIZE);
int addr[MAX_REGISTER_SIZE];
int nr, isfloat;
/* Retrieved values may be -1, so infer errors from errno. */
@ -275,7 +275,7 @@ fetch_register (int regno)
static void
store_register (int regno)
{
int *addr = alloca (MAX_REGISTER_RAW_SIZE);
int addr[MAX_REGISTER_SIZE];
int nr, isfloat;
/* Fetch the register's value from the register cache. */

View file

@ -1739,7 +1739,7 @@ frame_initial_stack_address (struct frame_info *fi)
/* There is an alloca register, use its value, in the current frame,
as the initial stack pointer. */
{
char *tmpbuf = alloca (MAX_REGISTER_RAW_SIZE);
char tmpbuf[MAX_REGISTER_SIZE];
if (frame_register_read (fi, fdata.alloca_reg, tmpbuf))
{
get_frame_extra_info (fi)->initial_sp
@ -1921,7 +1921,7 @@ e500_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{
int base_regnum;
int offset = 0;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char temp_buffer[MAX_REGISTER_SIZE];
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->ppc_gp0_regnum
@ -1944,7 +1944,7 @@ e500_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
{
int base_regnum;
int offset = 0;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char temp_buffer[MAX_REGISTER_SIZE];
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->ppc_gp0_regnum

View file

@ -3481,7 +3481,7 @@ sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, void *buffer)
{
int base_regnum, portion;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char temp_buffer[MAX_REGISTER_SIZE];
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->DR0_REGNUM
@ -3520,7 +3520,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int base_regnum;
int portion;
int offset = 0;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char temp_buffer[MAX_REGISTER_SIZE];
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->DR0_REGNUM
@ -3684,7 +3684,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, const void *buffer)
{
int base_regnum, portion;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char temp_buffer[MAX_REGISTER_SIZE];
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->DR0_REGNUM
@ -3721,7 +3721,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
{
int base_regnum, portion;
int offset;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char temp_buffer[MAX_REGISTER_SIZE];
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->DR0_REGNUM

View file

@ -317,9 +317,7 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
deprecated_read_fp() to create_new_frame. */
if (get_next_frame (fi))
{
char *buf;
buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
/* Compute ->frame as if not flat. If it is flat, we'll change
it later. */
@ -368,9 +366,7 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
&& X_OP3 (insn) == 4
&& X_RS1 (insn) == 14)
{
char *buf;
buf = alloca (MAX_REGISTER_RAW_SIZE);
char buf[MAX_REGISTER_SIZE];
/* We definitely have a flat frame now. */
get_frame_extra_info (fi)->flat = 1;
@ -474,10 +470,9 @@ sparc_extract_struct_value_address (char *regbuf)
CORE_ADDR
sparc_frame_saved_pc (struct frame_info *frame)
{
char *buf;
char buf[MAX_REGISTER_SIZE];
CORE_ADDR addr;
buf = alloca (MAX_REGISTER_RAW_SIZE);
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
{
/* This is the signal trampoline frame.
@ -2311,9 +2306,7 @@ void
sparc_store_return_value (struct type *type, char *valbuf)
{
int regno;
char *buffer;
buffer = alloca (MAX_REGISTER_RAW_SIZE);
char buffer[MAX_REGISTER_SIZE];
if (TYPE_CODE (type) == TYPE_CODE_FLT && SPARC_HAS_FPU)
/* Floating-point values are returned in the register pair */

View file

@ -814,7 +814,7 @@ frame_info (char *addr_exp, int from_tty)
&realnum, NULL);
if (!optimized && lval == not_lval)
{
void *value = alloca (MAX_REGISTER_RAW_SIZE);
char value[MAX_REGISTER_SIZE];
CORE_ADDR sp;
frame_register_unwind (fi, SP_REGNUM, &optimized, &lval, &addr,
&realnum, value);

View file

@ -1640,7 +1640,7 @@ debug_print_register (const char * func, int regno)
if (regno >= 0)
{
int i;
unsigned char *buf = alloca (MAX_REGISTER_RAW_SIZE);
unsigned char buf[MAX_REGISTER_SIZE];
deprecated_read_register_gen (regno, buf);
fprintf_unfiltered (gdb_stdlog, " = ");
for (i = 0; i < REGISTER_RAW_SIZE (regno); i++)

View file

@ -1,3 +1,8 @@
2003-05-08 Andrew Cagney <cagney@redhat.com>
* tuiRegs.c: Use MAX_REGISTER_SIZE instead of
MAX_REGISTER_RAW_SIZE.
2003-05-03 Andrew Cagney <cagney@redhat.com>
* tuiDisassem.c (tui_disassemble): Call gdb_print_insn, instead of

View file

@ -489,7 +489,7 @@ tuiCheckRegisterValues (struct frame_info *frame)
else
{
int i, j;
char rawBuf[MAX_REGISTER_RAW_SIZE];
char rawBuf[MAX_REGISTER_SIZE];
for (i = 0;
(i < dataWin->detail.dataDisplayInfo.regsContentCount); i++)
@ -766,7 +766,7 @@ _tuiRegValueHasChanged (TuiDataElementPtr dataElement,
if (dataElement->itemNo != UNDEFINED_ITEM &&
_tuiRegisterName (dataElement->itemNo) != (char *) NULL)
{
char rawBuf[MAX_REGISTER_RAW_SIZE];
char rawBuf[MAX_REGISTER_SIZE];
int i;
if (_tuiGetRegisterRawValue (
@ -830,7 +830,7 @@ _tuiSetRegisterElement (int regNum, struct frame_info *frame,
dataElement->highlight = FALSE;
}
if (dataElement->value == (Opaque) NULL)
dataElement->value = (Opaque) xmalloc (MAX_REGISTER_RAW_SIZE);
dataElement->value = (Opaque) xmalloc (MAX_REGISTER_SIZE);
if (dataElement->value != (Opaque) NULL)
_tuiGetRegisterRawValue (regNum, dataElement->value, frame);
}

View file

@ -480,7 +480,7 @@ value_assign (struct value *toval, struct value *fromval)
{
register struct type *type;
struct value *val;
char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
char raw_buffer[MAX_REGISTER_SIZE];
int use_buffer = 0;
struct frame_id old_frame;
@ -634,8 +634,7 @@ value_assign (struct value *toval, struct value *fromval)
amount_to_copy = byte_offset + TYPE_LENGTH (type);
/* And a bounce buffer. Be slightly over generous. */
buffer = (char *) alloca (amount_to_copy
+ MAX_REGISTER_RAW_SIZE);
buffer = (char *) alloca (amount_to_copy + MAX_REGISTER_SIZE);
/* Copy it in. */
for (regno = reg_offset, amount_copied = 0;
@ -963,7 +962,7 @@ CORE_ADDR
push_word (CORE_ADDR sp, ULONGEST word)
{
register int len = DEPRECATED_REGISTER_SIZE;
char *buffer = alloca (MAX_REGISTER_RAW_SIZE);
char buffer[MAX_REGISTER_SIZE]);
store_unsigned_integer (buffer, len, word);
if (INNER_THAN (1, 2))