Re: [PATCH] Skip VDSO when reading SO list

Jan Kratochvil
2013-09-20T18:14:07Z

On Fri, 20 Sep 2013 19:00:07 +0200, Andreas Arnez wrote:
> Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> > Here should be also '&& ignore_first'.
>
> Hm, this shouldn't be necessary, because 'first' is only set when
> 'ignore_first' is set. Or did I miss something?

I agree now, replied in another mail.

> >> + {
> >> + do_cleanups (old_chain);
> >> + continue;
> >> + }
> >
> > And move this block below so that the condition is evaluated only if
> > target_read_string has really failed.
> >
> > The purpose is that no workarounds should complicate the code in the case the
> > system components are already bug-free (after glibc gets fixed).
>
> That's a good point. Still, after thinking about this some more, I
> prefer the order in the original patch, because it prevents a bogus
> l_name from being detected in a second scan when the core dump is
> debugged on a system with a different glibc version. Users may also
> experience this after a glibc update. Thoughts?

If you use non-matching glibc then it should complain. In such case there is
a pointer to some real string so it is correct GDB tries to read it as
a library. While the library load will fail it does not block trying to debug
such a core file.

A bit off-topic but for the non-matching libraries I should upstream the patch
(plus some related patches therein)
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-6.6-buildid-locate.patch
as then it does not try to load non-matching executable/libraries at all.

Thanks,
Jan