[PATCH]: multi-arch fix for monitor.c

Frank Ch. Eigler fche@cygnus.com
Wed Sep 5 00:14:00 GMT 2001


msnyder wrote:

> !   static char *zerobuf;
> +   if (zerobuf == NULL)
> +       zerobuf = malloc (MAX_REGISTER_RAW_SIZE);

Something is still a little suspicious.

If the gdbarch were to change during run time, there is no way to
reallocate space to match the new MAX_REGISTER_RAW_SIZE.  That value
is treated a de facto constant.

Is allocating a new zerobuf too at every call too much work?

- FChE



More information about the Gdb-patches mailing list