This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

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


On Thu, 2013-05-23 at 11:07 -0600, Tom Tromey wrote:
> >>>>> "Svante" == Svante Signell <svante.signell@gmail.com> writes:
> 
> Svante> In case you need feedback from me use Cc: since I'm not subscribed to
> Svante> gdb-patches.
> 
> It needs a ChangeLog entry.
> 
> Svante> -  xsnprintf (arch_path, sizeof (arch_path), "%s/%s%s", nto_root, arch, endian);
> Svante> +  arch_len = strlen (nto_root) + 1 + strlen (arch) + strlen (endian) + 1;
> Svante> +  arch_path = alloca (arch_len);
> Svante> +  xsnprintf (arch_path, arch_len, "%s/%s%s", nto_root, arch, endian);
>  
> Svante> -  xsnprintf (buf, sizeof (buf), "set solib-absolute-prefix %s", arch_path);
> Svante> +  len = strlen (FMT) - 2 + strlen (arch_path) + 1;
> Svante> +  buf =  alloca (len);
> Svante> +  xsnprintf (buf, len, FMT, arch_path);
> Svante>    execute_command (buf, 0);
> 
> I think it would be simpler to use a single xstrprintf plus a cleanup.

Thanks for your prompt reply. The code construct I used was the same as
the function defined before in the same source file:
int nto_find_and_open_solib (char *solib, unsigned o_flags, char
**temp_pathname)

How to create a correct ChangeLog entry? Any tools available, emacs?




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