From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16111 invoked by alias); 8 Mar 2014 19:57:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 16101 invoked by uid 89); 8 Mar 2014 19:57:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Mar 2014 19:57:27 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s28JvM3j023294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 8 Mar 2014 14:57:22 -0500 Received: from host2.jankratochvil.net (ovpn-116-86.ams2.redhat.com [10.36.116.86]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s28JvIp9000894 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 8 Mar 2014 14:57:20 -0500 Date: Sat, 08 Mar 2014 19:57:00 -0000 From: Jan Kratochvil To: Eli Zaretskii Cc: gdb-patches@sourceware.org, ARistovski@qnx.com Subject: Re: [PATCH v4 0/8] Validate binary before use Message-ID: <20140308195717.GA2333@host2.jankratochvil.net> References: <20140302195248.10290.22958.stgit@host1.jankratochvil.net> <837g8ctjkj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <837g8ctjkj.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00217.txt.bz2 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 * 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