From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22460 invoked by alias); 30 Apr 2018 14:07:37 -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 22449 invoked by uid 89); 30 Apr 2018 14:07:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:866 X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.65.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 14:07:35 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 5B7E9400D34B5 for ; Mon, 30 Apr 2018 09:07:34 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id D9SofgiJw5CKDD9SofDjyr; Mon, 30 Apr 2018 09:07:34 -0500 X-Authority-Reason: nr=8 Received: from 97-122-176-117.hlrn.qwest.net ([97.122.176.117]:38138 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fD9So-003cQs-4U for gdb-patches@sourceware.org; Mon, 30 Apr 2018 09:07:34 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [RFA 0/6] Remove some uses of is_mi_like_p Date: Mon, 30 Apr 2018 14:07:00 -0000 Message-Id: <20180430140732.21601-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fD9So-003cQs-4U X-Source-Sender: 97-122-176-117.hlrn.qwest.net (bapiya.Home) [97.122.176.117]:38138 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-04/txt/msg00624.txt.bz2 I think in the long run it would be good to remove ui_out::is_mi_like_p. This series removes some unnecessary uses of it. This is a mild improvement because it means there will be less temptation for people to copy bad examples from the existing code. Relatedly, I had an idea for how to change cli_out so that most (perhaps not all -- there are some tricky cases) uses of is_mi_like_p could be removed, and also provide new features like user control over display and colorizing. The basic idea is first to realize that table names are fixed by the MI spec, and so can be relied on by cli_out. Then, whereever there is a sequence involving textual output mixed with ui_out field output, the whole sequence could be replaced with a format string that references the field names. Regression tested by the buildbot. Tom