Re: [PATCH v4 0/8] Validate binary before use

Eli Zaretskii
2014-03-02T20:47:01Z

> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Aleksandar Ristovski <ARistovski@qnx.com>
> Date: Sun, 02 Mar 2014 20:52:48 +0100
>
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -43,6 +43,12 @@ maint ada show ignore-descriptive-types
> the user manual for more details on descriptive types and the intended
> usage of this option.
>
> +set solib-build-id-force (on|off)
> +show solib-build-id-force
> + Inferior shared library and symbol file may contain unique build-id.
> + If both build-ids are present but they do not match then this setting
> + enables (on) or disables (off) loading of such symbol file.
> +
> * New features in the GDB remote stub, GDBserver
>
> ** New option --debug-format=option1[,option2,...] allows one to add
> @@ -51,6 +57,10 @@ maint ada show ignore-descriptive-types
> Timestamps can also be turned on with the
> "monitor set debug-format timestamps" command from GDB.
>
> + ** library-list-svr4 contains also optional attribute 'build-id' for
> + each library. GDB does not load library with build-id that
> + does not match such attribute.
> +

This part is OK.

> +@table @code
> +@kindex set solib-build-id-force
> +@item set solib-build-id-force @var{mode}
> +Setting to override @value{GDBN} build-id check.

There should be a @cindex entry here about overriding the build-id
check.

> +Inferior shared library and symbol file may contain unique build-id.

I guess you meant "libraries" and "symbol files", in plural here.

> +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.

> +Loading non-matching symbol file may confuse debugging including breakage
> +of backtrace output.
> +
> +By default @value{GDBN} will ignore symbol files with non-matching build-id
> +while printing:

Perhaps this stuff should be before you describe the option itself,
because it explains why there's a need for the option in the first
place.

Thanks.