From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24318 invoked by alias); 28 Nov 2019 20: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 24310 invoked by uid 89); 28 Nov 2019 20:05:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=219,0, 2190 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; Thu, 28 Nov 2019 20:05:27 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 28DF2201F1; Thu, 28 Nov 2019 15:05:25 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id 3D01020277; Thu, 28 Nov 2019 15:05:22 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 1B50F20AF6; Thu, 28 Nov 2019 15:05:22 -0500 (EST) X-Gerrit-PatchSet: 8 Date: Thu, 28 Nov 2019 20:05:00 -0000 From: "Simon Marchi (Code Review)" To: Andrew Burgess , gdb-patches@sourceware.org Cc: Joel Brobecker Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review v8] gdb/mi: Add -symbol-info-module-{variables,functions} X-Gerrit-Change-Id: Ic96f12dd14bd7e34774c3cde008fec30a4055bfe X-Gerrit-Change-Number: 268 X-Gerrit-ChangeURL: X-Gerrit-Commit: 841683bfedfdf4d3ce8d5da52a350b98e7b7d93b In-Reply-To: References: X-Gerrit-Comment-Date: Thu, 28 Nov 2019 15:05:21 -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: <20191128200522.1B50F20AF6@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-11/txt/msg01114.txt.bz2 Simon Marchi has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/268 ...................................................................... Patch Set 8: (1 comment) | --- gdb/mi/mi-symbol-cmds.c | +++ gdb/mi/mi-symbol-cmds.c | @@ -219,0 +256,19 @@ /* Helper for mi_info_module_functions_or_variables. Display the results | + from ITER up to END or until we find a symbol that is in a different | + module than the first symbol we print. Update and return the new value | + for ITER. */ | +static auto | +output_module_symbols_in_single_module (struct ui_out *uiout, | + auto iter, | + auto end, | + enum search_domain kind) | +{ | + gdb_assert ((*iter).first.symbol != nullptr); PS8, Line 265: Can't you use `iter->first` (throughout this patch)? | + gdb_assert ((*iter).second.symbol != nullptr); | + | + /* The symbol for the module in which the first result resides. */ | + const symbol *first_module_symbol = (*iter).first.symbol; | + | + /* Create output formatting. */ | + ui_out_emit_tuple module_tuple (uiout, nullptr); | + uiout->field_string ("module", first_module_symbol->print_name ()); | + ui_out_emit_list files_list (uiout, "files"); -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: Ic96f12dd14bd7e34774c3cde008fec30a4055bfe Gerrit-Change-Number: 268 Gerrit-PatchSet: 8 Gerrit-Owner: Andrew Burgess Gerrit-Reviewer: Andrew Burgess Gerrit-CC: Joel Brobecker Gerrit-CC: Simon Marchi Gerrit-Comment-Date: Thu, 28 Nov 2019 20:05:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment