Cleanup bfd_close() cleanups.
[deliverable/binutils-gdb.git] / gdb / monitor.c
index b857bbce00f27189e94dec8e11e8c29ebb284829..a9bd5026c2603bdf4a4b805d6bae066d426444cd 100644 (file)
@@ -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)");
 
This page took 0.024626 seconds and 4 git commands to generate.