From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105547 invoked by alias); 2 Dec 2019 19:42:23 -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 105532 invoked by uid 89); 2 Dec 2019 19:42:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1532 X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Dec 2019 19:42:20 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 66BD720362; Mon, 2 Dec 2019 14:42:19 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 120BB2032B; Mon, 2 Dec 2019 14:42:17 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id EA06E2816F; Mon, 2 Dec 2019 14:42:16 -0500 (EST) X-Gerrit-PatchSet: 1 Date: Mon, 02 Dec 2019 19:42:00 -0000 From: "Simon Marchi (Code Review)" To: Andrew Burgess , gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review] gdb: Split global symbol search into separate functions X-Gerrit-Change-Id: I06b26920f35c268f7a38d8203dc2c2813aa501c6 X-Gerrit-Change-Number: 738 X-Gerrit-ChangeURL: X-Gerrit-Commit: ae1bf42fcaa37c1260fee4e6017ea2bdde68e547 In-Reply-To: References: X-Gerrit-Comment-Date: Mon, 2 Dec 2019 14:42:16 -0500 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Content-Type: text/plain; charset=UTF-8 Message-Id: <20191202194216.EA06E2816F@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-12/txt/msg00060.txt.bz2 Simon Marchi has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/738 ...................................................................... Patch Set 1: (1 comment) | --- gdb/symtab.c | +++ gdb/symtab.c | @@ -4597,17 +4714,4 @@ global_symbol_searcher::search () const | - .symbol == NULL)) | - found_misc = 1; | - } | - } | - } | - } | - } | - | + bool found_msymbol = false; | + std::set result_set; PS1, Line 4715: Maybe a bit pedantic, but introducing the set in this patch does possibly change the behavior, doesn't it? Wouldn't it be better to keep appending to a vector, as before, and then replace the vector with a set in the following patch, with a justification of why that change is needed? | for (objfile *objfile : current_program_space->objfiles ()) | { | - for (compunit_symtab *cust : objfile->compunits ()) | - { | - bv = COMPUNIT_BLOCKVECTOR (cust); | - for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) | - { | - b = BLOCKVECTOR_BLOCK (bv, i); | - ALL_BLOCK_SYMBOLS (b, iter, sym) -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: I06b26920f35c268f7a38d8203dc2c2813aa501c6 Gerrit-Change-Number: 738 Gerrit-PatchSet: 1 Gerrit-Owner: Andrew Burgess Gerrit-CC: Simon Marchi Gerrit-Comment-Date: Mon, 02 Dec 2019 19:42:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment