From mboxrd@z Thu Jan 1 00:00:00 1970 From: fche@cygnus.com (Frank Ch. Eigler) To: gdb-patches@sources.redhat.com Cc: msnyder@cygnus.com Subject: Re: [PATCH]: multi-arch fix for monitor.c Date: Wed, 05 Sep 2001 00:14:00 -0000 Message-id: References: <200004262144.OAA05362@seadog.cygnus.com> <3907743C.BDD@cygnus.com> X-SW-Source: 2001-09/msg00016.html 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