This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Small patch to enable build of gdb-7.6 for GNU/Hurd
- From: Svante Signell <svante dot signell at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 23 May 2013 19:21:17 +0200
- Subject: Re: Small patch to enable build of gdb-7.6 for GNU/Hurd
- References: <1369326967 dot 8127 dot 33 dot camel at s1499 dot it dot kth dot se> <87mwrld3ps dot fsf at fleche dot redhat dot com>
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?