This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 0/8] Validate binary before use
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org, ARistovski at qnx dot com
- Date: Sun, 09 Mar 2014 18:53:12 +0200
- Subject: Re: [PATCH v4 0/8] Validate binary before use
- Authentication-results: sourceware.org; auth=none
- References: <20140302195248 dot 10290 dot 22958 dot stgit at host1 dot jankratochvil dot net> <837g8ctjkj dot fsf at gnu dot org> <20140308195717 dot GA2333 at host2 dot jankratochvil dot net>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Sat, 8 Mar 2014 20:57:17 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb-patches@sourceware.org, ARistovski@qnx.com
>
> > > +If both build-ids are present but they do not match then this setting
> >
> > That "both" part came as a surprise to me. Are there only two of
> > them? If so, where is each one stored? I don't think preceding text
> > describes this.
>
> The goal of my text was to say:
> * there are multiple pairs of build-ids
> * each build-id pair corresponds to:
> * one shared library
> * one symbol file
> * the two build-ids in one pair should match
Ah, OK. Then we should say that explicitly.
> +Inferior shared libraries and symbol files may contain unique build-id.
> +By default @value{GDBN} will ignore symbol files with non-matching build-id
I suggest to say that between these two sentences. Something like
@value{GDBN} expects the build-ids of each shared library and its
corresponding symbol file to match. If they don't match, then by
default @value{GDBN} will ...
A question: does "match" here means the build-ids should be identical?
If so, perhaps use "identical" or "equal" instead of "match".
> +while printing:
> +
> +@smallexample
> + Shared object "libfoo.so.1" could not be validated and will be ignored;
> + or use 'set solib-build-id-force'.
> +@end smallexample
Hmm... the text says that GDB will ignore symbol files, but the error
message you cite complains about the shared library, and doesn't even
mention the fact that the problem is a mismatch of the 2 build-ids.
Why not say explicitly that the build-id of the symbol file doesn't
match that of the shared library?
Or did I misunderstand what this setting is about?
Thanks.