* 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.
+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
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.
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++)
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
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);
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. */
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));
}
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));
}
#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 */
#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 */
# 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.
{
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). */
{
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 ... */
}
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;
}
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;
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))
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))
{
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))
{
+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.
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;
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);
{
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));
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,
{
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));
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,
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. */
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)
{
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);
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);
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);
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);
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)
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;
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);
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);
/* 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;
/* 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;
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);
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);
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))
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))
{
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)
{
{
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. */
/* 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);
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);
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);
}
{
/* 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;
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));
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
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
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;
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. */
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. */
/* 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
{
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
{
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
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
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
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
{
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
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. */
&& 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;
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.
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 */
&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);
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++)
+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
else
{
int i, j;
- char rawBuf[MAX_REGISTER_RAW_SIZE];
+ char rawBuf[MAX_REGISTER_SIZE];
for (i = 0;
(i < dataWin->detail.dataDisplayInfo.regsContentCount); i++)
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 (
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);
}
{
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;
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;
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))