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


>>>>> "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


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