From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111462 invoked by alias); 9 Feb 2017 12:51:21 -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 111443 invoked by uid 89); 9 Feb 2017 12:51:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1311, H*f:sk:10eb506, H*i:sk:10eb506, H*MI:sk:10eb506 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Feb 2017 12:51:18 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D1A78C7075; Thu, 9 Feb 2017 12:51:18 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v19CpFVK017829; Thu, 9 Feb 2017 07:51:16 -0500 Subject: Re: [RFA 1/5] Remove some ui_out-related cleanups from Python To: Matt Rice 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> Cc: Tom Tromey , Trevor Saunders , "gdb-patches@sourceware.org" From: Pedro Alves Message-ID: <86ddf1f5-a957-5a99-deac-936848b10190@redhat.com> Date: Thu, 09 Feb 2017 12:51:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <10eb506c-e8be-de98-e9b0-77cedd69cc92@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00218.txt.bz2 On 02/09/2017 12:48 PM, Pedro Alves wrote: > Hi Matt, > > On 02/09/2017 04:34 AM, Matt Rice wrote: > >> Wondering if this would be a good opportunity to try and transition >> ui_out_list construction into a more type safe manner, e.g. >> result ==> variable "=" value >> list ==> "[]" | "[" value ( "," value )* "]" | "[" result ( "," result )* "]" >> >> currently when building a list, it didn't specify whether you were >> declaring a list of results or a list of values, unless/until the >> first value or result was added, and IIRC this | property wasn't >> really explicitly enforced. > > More type-safety sounds good to me. :-) > > Can you give an example of a command that outputs a result list, > and an example of a command that outputs a value list? > >> 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... > > Simon has already C++-fyed ui_out in master, so this seems like > a good time to me. Though, to be clear, IIUC, you're talking about changing GDB internals without affecting the resulting MI output, right? Thanks, Pedro Alves