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: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, ARistovski at qnx dot com
- Date: Sat, 8 Mar 2014 20:57:17 +0100
- 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>
On Sun, 02 Mar 2014 21:46:36 +0100, Eli Zaretskii wrote:
> > +@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.
Done.
@cindex override @value{GDBN} 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.
It was intentionally in singular form but I am not sure it was right, see
below.
> > +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
> > +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.
Done.
Current version is below.
Thanks,
Jan
gdb/doc/
2014-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (Files): Add 'set solib-build-id-force'
and 'show solib-build-id-force'.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index b1b29bd..ebdc9ea 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -17114,6 +17114,41 @@ libraries that were loaded by explicit user requests are not
discarded.
@end table
+@table @code
+@kindex set solib-build-id-force
+@cindex override @value{GDBN} build-id check
+@item set solib-build-id-force @var{mode}
+Setting to override @value{GDBN} build-id check.
+
+Inferior shared libraries and symbol files may contain unique build-id.
+By default @value{GDBN} will ignore symbol files with non-matching build-id
+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
+
+Turning on this setting would load such symbol file while still printing:
+
+@smallexample
+ Shared object "libfoo.so.1" could not be validated but it is being loaded
+ due to 'set solib-build-id-force'.
+@end smallexample
+
+If both build-ids are present but they do not match then this setting
+enables (@var{mode} is @code{on}) or disables (@var{mode} is @code{off})
+loading of such symbol file. On systems where build-id is not present
+in files this setting has no effect. The default value is @code{off}.
+
+Loading non-matching symbol file may confuse debugging including breakage
+of backtrace output.
+
+@kindex show solib-build-id-force
+@item show solib-build-id-force
+Display the current mode of build-id check override.
+@end table
+
Sometimes you may wish that @value{GDBN} stops and gives you control
when any of shared library events happen. The best way to do this is
to use @code{catch load} and @code{catch unload} (@pxref{Set