Re: [patch] Fix for PR gdb/9538 (loading of separate debuginfo and symlinks).

Paul Pluzhnikov
2012-01-12T23:27:21Z

On Thu, Jan 12, 2012 at 3:17 PM, Doug Evans <dje@google.com> wrote:

>> Wouldn't lstat need a configury #ifdef to make it build?
>
> [for reference sake, one patch in my basenames-may-differ series (not
> submitted) had a use for lstat.
> IWBN to have lstat in gdb so we could (appropriately of course) use it.

Right.

If there was an existing HAVE_LSTAT facility, I would definitely be for
using it here. But I am not sufficiently proficient with configury to add
it myself.

> OOC, Jan, what discussion led rise to having braces here:
>
> +  if (strcmp (dir1, dir2) == 0)
> +    {
> +      /* Same directory, no point retrying.  */
> +      goto cleanup;
> +    }
>
> and does that reasoning apply here:
>
> +  if (debuglink == NULL)
> +    /* There's no separate debug info, hence there's no way we could
> +       load it => no warning.  */
> +    return NULL;

I've added braces here (personally, I am all for braces ;-)

--
Paul Pluzhnikov