aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2000-05-03 18:21:52 +0000
committerMichael Snyder <msnyder@vmware.com>2000-05-03 18:21:52 +0000
commit86110418ab8a27557e8471d4674bc5c7edcd3c26 (patch)
tree3eb5746b6df8351ff3da1d83f7444f4ca12cc024
parent54cf9c0344af81977caffd086d53a74c3b5d3aaf (diff)
downloadgdb-86110418ab8a27557e8471d4674bc5c7edcd3c26.zip
gdb-86110418ab8a27557e8471d4674bc5c7edcd3c26.tar.gz
gdb-86110418ab8a27557e8471d4674bc5c7edcd3c26.tar.bz2
2000-05-03 Michael Snyder <msnyder@seadog.cygnus.com>
* monitor.c (monitor_fetch_register): MAX_REGISTER_RAW_SIZE is not static in the MULTI_ARCH world, so don't use it in a static array declaration.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/monitor.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7b1fcc1..0e59956 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2000-05-03 Michael Snyder <msnyder@seadog.cygnus.com>
+
+ * monitor.c (monitor_fetch_register): MAX_REGISTER_RAW_SIZE
+ is not static in the MULTI_ARCH world, so don't use it in a
+ static array declaration.
+
2000-05-03 Elena Zannoni <ezannoni@makita.cygnus.com>
* symtab.c (in_prologue): From Jim Blandy. Rewrite, more
diff --git a/gdb/monitor.c b/gdb/monitor.c
index b857bbc..a9bd502 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -1206,11 +1206,14 @@ monitor_fetch_register (regno)
int regno;
{
char *name;
- static char zerobuf[MAX_REGISTER_RAW_SIZE] =
- {0};
- char regbuf[MAX_REGISTER_RAW_SIZE * 2 + 1];
+ char *zerobuf;
+ 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);
+
name = current_monitor->regnames[regno];
monitor_debug ("MON fetchreg %d '%s'\n", regno, name ? name : "(null name)");