This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH]: multi-arch fix for monitor.c
- To: gdb-patches at sources dot redhat dot com
- Subject: Re: [PATCH]: multi-arch fix for monitor.c
- From: fche at cygnus dot com (Frank Ch. Eigler)
- Date: 26 Apr 2000 19:09:15 -0400
- cc: msnyder at cygnus dot com
- Newsgroups: cygnus.patches.gdb
- Organization: Cygnus Solutions / Red Hat (Toronto)
- References: <200004262144.OAA05362@seadog.cygnus.com> <3907743C.BDD@cygnus.com>
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