From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93603 invoked by alias); 31 Jul 2019 23:59:26 -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 93595 invoked by uid 89); 31 Jul 2019 23:59:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1327, H*r:10.0.0 X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Jul 2019 23:59:24 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 01A831E47D; Wed, 31 Jul 2019 19:59:22 -0400 (EDT) Subject: Re: [PATCH] Add a comment briefly explaining partial symbols To: Christian Biesinger , gdb-patches@sourceware.org References: <20190731221252.143637-1-cbiesinger@google.com> From: Simon Marchi Message-ID: Date: Wed, 31 Jul 2019 23:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190731221252.143637-1-cbiesinger@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-07/txt/msg00690.txt.bz2 On 2019-07-31 6:12 p.m., Christian Biesinger via gdb-patches wrote: > Based on an explanation by tromey on IRC. > > gdb/ChangeLog: > > 2019-07-31 Christian Biesinger > > * objfiles.h (objfile): Add a comment describing partial symbols. > --- > gdb/objfiles.h | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/gdb/objfiles.h b/gdb/objfiles.h > index a0c106be3d..c7e0be1955 100644 > --- a/gdb/objfiles.h > +++ b/gdb/objfiles.h > @@ -382,7 +382,13 @@ private: > 2. Additional symbol files added by the add-symbol-file command, > 3. Shared library objfiles, added by ADD_SOLIB, 4. symbol files > for modules that were loaded when GDB attached to a remote system > - (see remote-vx.c). */ > + (see remote-vx.c). > + > + GDB typically reads symbols twice -- first an initial scan which just > + reads "partial symbols"; these are partial information for the > + static/global symbols in a symbol file. When later looking up symbols, > + objfile->sf->qf->lookup_symbol is used to check if we only have a partial > + symbol and if so, read and expand the full compunit. */ > > struct objfile > { > Hi Christian, Thanks, that LGTM. But please wait a few days before pushing to see if others have things to add. Simon