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

Jan Kratochvil
2012-01-12T22:26:27Z

On Thu, 12 Jan 2012 23:19:17 +0100, Paul Pluzhnikov wrote:
> On Thu, Jan 12, 2012 at 1:29 PM, Jan Kratochvil
> <jan.kratochvil@redhat.com> wrote:
> >> + Â dir1 = xstrdup (objfile->name);
> >> + Â terminate_after_last_dir_separator (dir1);
> >> + Â canon_dir = lrealpath (dir1);
> >
> > lrealpath can return NULL. Â GDB did not crash before. Â It will now.
>
> Where? canon_dir is passed into the utility function, which checks for NULL
> (as it did before).

I misread some comment as a code before, sorry. I agree.

> 2012-01-11 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> PR gdb/9538
> * symfile.c (find_separate_debug_file): New function.
> (terminate_after_last_dir_separator): Likewise.
> (find_separate_debug_file_by_debuglink): Also try realpath.
>
>
> testsuite/ChangeLog:
>
> PR gdb/9538
> * gdb.base/sepdebug.exp: New test.

I do not see the new patch but the described changes look OK.

Thanks,
Jan