From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30545 invoked by alias); 27 Jun 2015 21:05:28 -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 30533 invoked by uid 89); 27 Jun 2015 21:05:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 27 Jun 2015 21:05:26 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 6E4C53017C9; Sat, 27 Jun 2015 21:05:25 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5RL5KgK002032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 27 Jun 2015 17:05:23 -0400 Date: Sat, 27 Jun 2015 21:05:00 -0000 From: Jan Kratochvil To: Doug Evans Cc: gdb-patches , Aleksandar Ristovski Subject: Re: [PATCH v8 09/10] Validate symbol file using build-id Message-ID: <20150627210519.GA19048@host1.jankratochvil.net> References: <20150614192542.18346.87859.stgit@host1.jankratochvil.net> <20150614192655.18346.17075.stgit@host1.jankratochvil.net> <20150621101644.GA12733@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00592.txt.bz2 On Tue, 23 Jun 2015 00:25:52 +0200, Doug Evans wrote: > On Sun, Jun 21, 2015 at 5:16 AM, Jan Kratochvil wrote: > > --- a/gdb/solist.h > > +++ b/gdb/solist.h > > @@ -75,6 +75,22 @@ struct so_list > > There may not be just one (e.g. if two segments are relocated > > differently); but this is only used for "info sharedlibrary". */ > > CORE_ADDR addr_low, addr_high; > > + > > + /* Build id in raw format, contains verbatim contents of > > + .note.gnu.build-id including note header. > > Including the note header will be confusing to readers. > Is there a reason to include it? > > OTOH, given the above call to hex2bin, > does this really include the note header? It does not, only the comment was wrong. Changed it to: /* Build id decoded from .note.gnu.build-id without note header. This is actual BUILD_ID which comes either from the remote target via qXfer > > ... This is actual > > + BUILD_ID which comes either from the remote target via qXfer > > + packet or via reading target memory. Therefore, it may differ > > + from the build-id of the associated bfd. In a normal > > + scenario, this so would soon lose its abfd due to failed > > + validation. > > I can't read this last sentence. > What are you trying to say here? It was written by Aleksandar Ristovski and I find it OK myself. So as an explanation the process is: 1. GDB reads/receives so->build_id from GDB server. 2. GDB opens local BFD so->abfd. 3. GDB compares so->build_id with so->abfd->build_id (by ops->validate) 4. If they differ so->abfd is freed/cleared (in solib_map_sections). Therefore could you suggest a different comment? Thanks, Jan