From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63155 invoked by alias); 1 Nov 2019 01:36:32 -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 63107 invoked by uid 89); 1 Nov 2019 01:36:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 spammy=D*117 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; Fri, 01 Nov 2019 01:36:29 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 5A9D420300; Thu, 31 Oct 2019 21:36:28 -0400 (EDT) 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 2AC8D20339; Thu, 31 Oct 2019 21:36:27 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 11A2520AF6; Thu, 31 Oct 2019 21:36:27 -0400 (EDT) X-Gerrit-PatchSet: 2 Date: Fri, 01 Nov 2019 01:36:00 -0000 From: "Andrew Burgess (Code Review)" To: gdb-patches@sourceware.org Cc: Tom Tromey Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review v2] gdb/mi: Add new commands -symbol-info-{functions,variables,types} X-Gerrit-Change-Id: Ic2fc6a6750bbce91cdde2344791014e5ef45642d X-Gerrit-Change-Number: 266 X-Gerrit-ChangeURL: X-Gerrit-Commit: c5398a7703e279a8cd2e5ace2a425673b660fa46 In-Reply-To: References: X-Gerrit-Comment-Date: Thu, 31 Oct 2019 21:36:26 -0400 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-75-g9005159e5d Content-Type: text/plain; charset=UTF-8 Message-Id: <20191101013627.11A2520AF6@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-11/txt/msg00009.txt.bz2 Andrew Burgess has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/266 ...................................................................... Patch Set 2: (1 comment) https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/266/1/gdb/mi/mi-symbol-cmds.c File gdb/mi/mi-symbol-cmds.c: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/266/1/gdb/mi/mi-symbol-cmds.c@117 PS1, Line 117: 102 | mi_symbol_info (enum search_domain kind, const char *regexp, | ... 112 | ui_out_emit_tuple all_matching_symbols (uiout, "symbols"); 113 | 114 | /* The order of these optional emitters is critical as they will be 115 | deleted in reverse order, which is important as these are popped from 116 | the uiout stack as they are destroyed. */ 117 > gdb::optional debug_func_emitter_outer; 118 > gdb::optional debug_func_emitter_symtab; 119 > gdb::optional debug_func_emitter_symbols; 120 > gdb::optional nondebug_func_emitter; 121 | 122 | const symtab *last_symtab = nullptr; 123 | 124 | for (const symbol_search &p : symbols) 125 | { > I wonder if there's a better way. It's ok if not, this is just […] I don't know of any other way to get the structured MI output without creating and destroying all of these different ui_out_emit_* objects, however, I've tried harder to hide the complexity. I'm not completely convinced that the new way is better - I'd be interested to hear your thoughts. If you prefer this then there's a later patch in this series that could get the same treatment. I've not done that yet because, like I said, I'm not completely convinced the new code is that much better. -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: Ic2fc6a6750bbce91cdde2344791014e5ef45642d Gerrit-Change-Number: 266 Gerrit-PatchSet: 2 Gerrit-Owner: Andrew Burgess Gerrit-Reviewer: Andrew Burgess Gerrit-Reviewer: Tom Tromey Gerrit-Comment-Date: Fri, 01 Nov 2019 01:36:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Tom Tromey Gerrit-MessageType: comment