aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-02-06 20:05:42 +0000
committerMichael Snyder <msnyder@vmware.com>2001-02-06 20:05:42 +0000
commite6cbd02ac2c4dd07c92d152b10c03c7bb24aec2b (patch)
tree876e170f720eb924e4121a1fcdb47d7d9e8ae2df /gdb
parent713f0374c042c67cfed6110a7ce2dd852ad49500 (diff)
downloadgdb-e6cbd02ac2c4dd07c92d152b10c03c7bb24aec2b.zip
gdb-e6cbd02ac2c4dd07c92d152b10c03c7bb24aec2b.tar.gz
gdb-e6cbd02ac2c4dd07c92d152b10c03c7bb24aec2b.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/config/sparc/sun4sol2.mh5
-rw-r--r--gdb/findvar.c8
-rw-r--r--gdb/infcmd.c4
-rw-r--r--gdb/regcache.c2
-rw-r--r--gdb/remote.c4
-rw-r--r--gdb/sol-thread.c2
-rw-r--r--gdb/valops.c6
8 files changed, 30 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 70beb84..168b63a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,16 @@
+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,
diff --git a/gdb/config/sparc/sun4sol2.mh b/gdb/config/sparc/sun4sol2.mh
index 4ab69c5..9d24697 100644
--- a/gdb/config/sparc/sun4sol2.mh
+++ b/gdb/config/sparc/sun4sol2.mh
@@ -8,6 +8,9 @@ NAT_FILE= nm-sun4sol2.h
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
@@ -15,5 +18,5 @@ NATDEPFILES= corelow.o core-sol2.o solib.o solib-svr4.o fork-child.o procfs.o \
# 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
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 002f3f3..ea6cccf 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -393,7 +393,7 @@ value_of_register (int regnum)
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,
@@ -606,7 +606,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
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)));
@@ -616,7 +616,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
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);
@@ -711,7 +711,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
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);
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 6f43eba..6eb3d83 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1467,8 +1467,8 @@ do_registers_info (int regnum, int fpregs)
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)
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 6e5a2c1..db963f7 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -558,7 +558,7 @@ write_register_bytes (int myregstart, char *myaddr, int inlen)
/* 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);
diff --git a/gdb/remote.c b/gdb/remote.c
index 2a00036..b79634d 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2604,7 +2604,7 @@ remote_wait (int pid, struct target_waitstatus *status)
{
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
@@ -2825,7 +2825,7 @@ remote_async_wait (int pid, struct target_waitstatus *status)
{
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
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index d4325a0..f7727b4 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -685,7 +685,7 @@ sol_thread_store_registers (int regno)
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, &registers[REGISTER_BYTE (regno)], REGISTER_SIZE);
val = p_td_thr_getgregs (&thandle, gregset);
diff --git a/gdb/valops.c b/gdb/valops.c
index 9a90e3d..ce15c20 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -570,7 +570,7 @@ value_assign (register value_ptr toval, register value_ptr fromval)
{
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)
@@ -1027,7 +1027,7 @@ CORE_ADDR
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))
@@ -1665,7 +1665,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
SAVE_DUMMY_FRAME_TOS (sp);
{
- char retbuf[REGISTER_BYTES];
+ char *retbuf = (char*) alloca (REGISTER_BYTES);
char *name;
struct symbol *symbol;