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: Tom Tromey <tromey at redhat dot com>
- To: Svante Signell <svante dot signell at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 23 May 2013 11:07:59 -0600
- 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>
>>>>> "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.
Tom