+2001-02-06 Michael Snyder <msnyder@makita.cygnus.com>
+ Submitted by Paul Hilfinger (hilfingr@gnat.com)
+ and Andrei Petrov (and@genesyslab.com).
+ * findvar.c: Buffers of size MAX_REGISTER_RAW_SIZE or REGISTER_BYTES
+ must be allocated dynamically, since these are no longer constants.
+ * infcmd.c: Ditto.
+ * regcache.c: Ditto.
+ * remote.c: Ditto.
+ * sol-thread.c: Ditto.
+ * valops.c: Ditto.
+ * config/sparc/sun4sol2.mh (MH_CFLAGS): Add -I/usr/include/v9, as a
+ work-around for a missing Sun header file in solaris for sparc64.
+
2001-02-04 Philip Blundell <philb@gnu.org>
* config/arm/linux.mh (NATDEPFILES): Add proc-service.o,
NATDEPFILES= corelow.o core-sol2.o solib.o solib-svr4.o fork-child.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
+# /usr/include/v9 is needed only by core-sol2.c when including
+# v9/sys/privregs.h, or rather the headers it in turn includes.
+MH_CFLAGS=-I/usr/include/v9
# If you are compiling with Sun's compiler, add the -xs option to CC
# (e.g. `make CC="cc -xs"').
# Sun's compilers require the -xs option to produce debug information
# files only, with undocumented pointers to it in the linked executable.
# This is commented out because we don't assume that the Sun compiler
# is in use.
-#MH_CFLAGS=-xs
+#MH_CFLAGS=-xs -I/usr/include/v9
HOST_IPC=-DBSD_IPC
CORE_ADDR addr;
int optim;
register value_ptr reg_val;
- char raw_buffer[MAX_REGISTER_RAW_SIZE];
+ char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
enum lval_type lval;
get_saved_register (raw_buffer, &optim, &addr,
case LOC_BASEREG:
case LOC_BASEREG_ARG:
{
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = (char*) alloca (MAX_REGISTER_RAW_SIZE);
get_saved_register (buf, NULL, NULL, frame, SYMBOL_BASEREG (var),
NULL);
addr = extract_address (buf, REGISTER_RAW_SIZE (SYMBOL_BASEREG (var)));
case LOC_THREAD_LOCAL_STATIC:
{
- char buf[MAX_REGISTER_RAW_SIZE];
+ char *buf = (char*) alloca (MAX_REGISTER_RAW_SIZE);
get_saved_register (buf, NULL, NULL, frame, SYMBOL_BASEREG (var),
NULL);
value_ptr
value_from_register (struct type *type, int regnum, struct frame_info *frame)
{
- char raw_buffer[MAX_REGISTER_RAW_SIZE];
+ char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
CORE_ADDR addr;
int optim;
value_ptr v = allocate_value (type);
for (i = 0; i < numregs; i++)
{
- char raw_buffer[MAX_REGISTER_RAW_SIZE];
- char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE];
+ char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
+ char *virtual_buffer = (char*) alloca (MAX_REGISTER_VIRTUAL_SIZE);
/* Decide between printing all regs, nonfloat regs, or specific reg. */
if (regnum == -1)
/* The register partially overlaps the range being written. */
else
{
- char regbuf[MAX_REGISTER_RAW_SIZE];
+ char *regbuf = (char*) alloca (MAX_REGISTER_RAW_SIZE);
/* What's the overlap between this register's bytes and
those the caller wants to write? */
int overlapstart = max (regstart, myregstart);
{
int i;
long regno;
- char regs[MAX_REGISTER_RAW_SIZE];
+ char* regs = (char*) alloca (MAX_REGISTER_RAW_SIZE);
/* Expedited reply, containing Signal, {regno, reg} repeat */
/* format is: 'Tssn...:r...;n...:r...;n...:r...;#cc', where
{
int i;
long regno;
- char regs[MAX_REGISTER_RAW_SIZE];
+ char* regs = (char*) alloca (MAX_REGISTER_RAW_SIZE);
/* Expedited reply, containing Signal, {regno, reg} repeat */
/* format is: 'Tssn...:r...;n...:r...;n...:r...;#cc', where
if (regno != -1)
{ /* Not writing all the regs */
/* save new register value */
- char old_value[REGISTER_SIZE];
+ char* old_value = (char*) alloca (REGISTER_SIZE);
memcpy (old_value, ®isters[REGISTER_BYTE (regno)], REGISTER_SIZE);
val = p_td_thr_getgregs (&thandle, gregset);
{
register struct type *type;
register value_ptr val;
- char raw_buffer[MAX_REGISTER_RAW_SIZE];
+ char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
int use_buffer = 0;
if (!toval->modifiable)
push_word (CORE_ADDR sp, ULONGEST word)
{
register int len = REGISTER_SIZE;
- char buffer[MAX_REGISTER_RAW_SIZE];
+ char *buffer = alloca (MAX_REGISTER_RAW_SIZE);
store_unsigned_integer (buffer, len, word);
if (INNER_THAN (1, 2))
SAVE_DUMMY_FRAME_TOS (sp);
{
- char retbuf[REGISTER_BYTES];
+ char *retbuf = (char*) alloca (REGISTER_BYTES);
char *name;
struct symbol *symbol;