diff options
author | Michael Snyder <msnyder@specifix.com> | 2000-05-03 18:21:52 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@specifix.com> | 2000-05-03 18:21:52 +0000 |
commit | f69a514274d185cb5f8bfacaa7337e550de474ba (patch) | |
tree | abe547b2285df9951a0f1189a7f329f74f8989f0 /gdb/monitor.c | |
parent | 65d1c61978bae2d0a49ab61a66d705a33f610ecc (diff) | |
download | gdb-f69a514274d185cb5f8bfacaa7337e550de474ba.tar.gz |
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.
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r-- | gdb/monitor.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c index b857bbce00f..a9bd5026c26 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)"); |