[PATCH 1/2] Try both make_relative_prefix{,ignore_links} for relocatability
Pedro Alves
palves@redhat.com
Tue Sep 29 11:01:00 GMT 2015
On 08/12/2015 07:20 PM, Doug Evans wrote:
> - }
> +/* Relocate a directory.
> + INITIAL is the default value of the directory.
> + FLAG is true if the value is relocatable, false otherwise.
Nit: why not s/FLAG/RELOCATABLE/ then?
> + If the result is a directory, it is used; otherwise, INITIAL is used.
> + The chosen directory is then canonicalized using lrealpath. This
> + function always returns a newly-allocated string. */
> +
> +char *
> +relocate_gdb_directory (const char *initial, int flag)
> +{
> + char *dir;
>
> - return dir;
> + /* Early exit if there's nothing we can do. */
> + if (initial[0] == '\0')
> + return xstrdup ("");
> + if (!flag)
> + return maybe_lrealpath (xstrdup (initial));
> +
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list