This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]