From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5797 invoked by alias); 9 Feb 2017 16:04:09 -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 5756 invoked by uid 89); 9 Feb 2017 16:04:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*u:1.2.3, H*UA:1.2.3, variation, HX-PHP-Originating-Script:rcube.php 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; Thu, 09 Feb 2017 16:03:58 +0000 Received: by simark.ca (Postfix, from userid 33) id CB1CE1E9A5; Thu, 9 Feb 2017 11:03:56 -0500 (EST) To: Matt Rice Subject: Re: [RFA 1/5] Remove some ui_out-related cleanups from Python X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 09 Feb 2017 16:04:00 -0000 From: Simon Marchi Cc: Pedro Alves , Tom Tromey , Trevor Saunders , gdb-patches@sourceware.org In-Reply-To: References: <20170115134253.24018-1-tom@tromey.com> <20170115134253.24018-2-tom@tromey.com> <20170116113021.sar3yh5ivykpqmbw@ball> <87inok708e.fsf@tromey.com> <10eb506c-e8be-de98-e9b0-77cedd69cc92@redhat.com> <86ddf1f5-a957-5a99-deac-936848b10190@redhat.com> Message-ID: <6ee817e1e04a6aa180d5aa2d8734a02f@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.3 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00228.txt.bz2 On 2017-02-09 10:46, Matt Rice wrote: > There is a good example of a command which outputs both in the > documentation (in the example below "The -break-insert command") > > interpreter-exec mi -break-insert main > interpreter-exec mi -break-insert -t foo > interpreter-exec mi -break-list > > in the output of the -break-list command there is a list of results of > the form: > body=[bkpt=... , bkpt=...] > > https://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI-Breakpoint-Commands.html#g_t_002dbreak_002dinsert > > I picked that one specifically because it shows the duplicate "bkpt" > keys. > inside those bkpt={... thread-groups=["i1"] ... } should be a list of > values. > > interpreter-exec mi -list-thread-groups is a slightly easier to read > one that returns a list of values (tuples) > ^done,groups=[tuple, ...] > > Additionally of note is: > https://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax > * New gdb/mi commands should only output lists containing values. > > So, i suppose result_list should be some variation on > compat_only_result_list or some such... I like the idea of enforcing proper MI output through code. One situation I know GDB outputs broken MI is with multiple locations breakpoints. See: https://sourceware.org/bugzilla/show_bug.cgi?id=14733 It'd be nice if the MI building API didn't even let us do that. >>>> it'd be nice to migrate this to something like: >>>> result_list, value_list, deprecated_unspecified_list, It would be >>>> nice >>>> to know if/when you guys think it would be a convenient time to >>>> introduce such a change so I could get back up to speed... Yes that would be great. I would say that the most convenient time is when you have time to contribute to the project :). About the naming, I think that "result_list" and "value_list" is confusing, since a list containing results is exactly what is deprecated. What about just "tuple" and "list"? According to the syntax and the note you mentioned, a tuple ({...}) will only accept results (foo=bar) and a list ([...]) will only accept values. And we'd have deprecated_result_list to build lists containing results. Simon