Small patch to enable build of gdb-7.6 for GNU/Hurd

Svante Signell svante.signell@gmail.com
Fri May 24 09:07:00 GMT 2013


On Fri, 2013-05-24 at 09:53 +0100, Pedro Alves wrote:
> On 05/24/2013 05:27 AM, Joel Brobecker wrote:
> > On Thu, May 23, 2013 at 11:59:46PM -0300, Sergio Durigan Junior wrote:
> >> Thanks for your patch, Svante.
> >>
> >> On Thursday, May 23 2013, Svante Signell wrote:
> >>
...
> > And quite honestly, I find this use of a macro in the middle of
> > a function quite ugly and unnecessary, no matter what was done
> > before.  My preference mirrors Tom's suggestion, but failing that,
> > I'd rather FMT be a const char * or a const char [].
> 
> Agreed.
> 
> const char fmt[] = "..." is better than 'const char *', as the
> latter gives you an unnecessary extra pointer.
> 
> Make that 'static const char fmt[] = "...";' even.
> 
> But really alloca for potentially large/unbounded buffers is evil.
> xstrprintf plus a cleanup would definitely be my preference.

I will change to use xstrprintf instead. Updated patch with ChangeLog
entry will follow shortly. Is it OK to modify also the other (preceding)
function in the same way (for consistency)?




More information about the Gdb-patches mailing list