From patchwork Mon Apr 30 14:07:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27036 Received: (qmail 22683 invoked by alias); 30 Apr 2018 14:07:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 22478 invoked by uid 89); 30 Apr 2018 14:07:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Event X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.155) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 14:07:36 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 91378400C9F26 for ; Mon, 30 Apr 2018 09:07:35 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id D9SpfoVXTWCOCD9SpfiARD; Mon, 30 Apr 2018 09:07:35 -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 1fD9Sp-003cQs-4f; Mon, 30 Apr 2018 09:07:35 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 3/6] Remove some uses of is_mi_like_p from spu-tdep.c Date: Mon, 30 Apr 2018 08:07:29 -0600 Message-Id: <20180430140732.21601-4-tom@tromey.com> In-Reply-To: <20180430140732.21601-1-tom@tromey.com> References: <20180430140732.21601-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fD9Sp-003cQs-4f 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: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes There were a few spots in spu-tdep.c where a use of is_mi_like_p was not needed. ChangeLog 2018-04-29 Tom Tromey * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist) (info_spu_event_command): Remove some uses of is_mi_like_p. --- gdb/ChangeLog | 5 +++++ gdb/spu-tdep.c | 22 ++++++---------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c index 783ef5b247..772ec7339d 100644 --- a/gdb/spu-tdep.c +++ b/gdb/spu-tdep.c @@ -2096,18 +2096,10 @@ info_spu_event_command (const char *args, int from_tty) ui_out_emit_tuple tuple_emitter (current_uiout, "SPUInfoEvent"); - if (current_uiout->is_mi_like_p ()) - { - current_uiout->field_fmt ("event_status", - "0x%s", phex_nz (event_status, 4)); - current_uiout->field_fmt ("event_mask", - "0x%s", phex_nz (event_mask, 4)); - } - else - { - printf_filtered (_("Event Status 0x%s\n"), phex (event_status, 4)); - printf_filtered (_("Event Mask 0x%s\n"), phex (event_mask, 4)); - } + current_uiout->text (_("Event Status ")); + current_uiout->field_fmt ("event_status", "0x%s", phex_nz (event_status, 4)); + current_uiout->text (_("\nEvent Mask ")); + current_uiout->field_fmt ("event_mask", "0x%s", phex_nz (event_mask, 4)); } static void @@ -2226,8 +2218,7 @@ info_spu_mailbox_list (gdb_byte *buf, int nr, enum bfd_endian byte_order, current_uiout->field_fmt (field, "0x%s", phex (val, 4)); } - if (!current_uiout->is_mi_like_p ()) - printf_filtered ("\n"); + current_uiout->text ("\n"); } } @@ -2454,8 +2445,7 @@ info_spu_dma_cmdlist (gdb_byte *buf, int nr, enum bfd_endian byte_order) current_uiout->field_skip ("error_p"); } - if (!current_uiout->is_mi_like_p ()) - printf_filtered ("\n"); + current_uiout->text ("\n"); } }