From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22846 invoked by alias); 30 Apr 2018 14:07:40 -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 22522 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=brings 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:37 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 0E0C8400D6CDB for ; Mon, 30 Apr 2018 09:07:36 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id D9SqfENmglAdrD9SqfnNv4; Mon, 30 Apr 2018 09:07:36 -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-Pv; Mon, 30 Apr 2018 09:07:35 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 5/6] Remove some is_mi_like_p from breakpoint code Date: Mon, 30 Apr 2018 14:07:00 -0000 Message-Id: <20180430140732.21601-6-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-Pv 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: 6 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-04/txt/msg00629.txt.bz2 This removes some uses of is_mi_like_p from the breakpoint code. The break-catch-throw.c change brings it into line with what other breakpoint classes do. The other changes simply replace printf calls with ui_out::text or ui_out::message calls. 2018-04-29 Tom Tromey * breakpoint.c (mention): Remove use of is_mi_like_p. (print_mention_ranged_breakpoint): Likewise. * break-catch-throw.c (print_it_exception_catchpoint): Remove use of is_mi_like_p. --- gdb/ChangeLog | 7 +++++++ gdb/break-catch-throw.c | 4 +--- gdb/breakpoint.c | 13 ++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index a911ddd9b5..bdb552c863 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -238,8 +238,7 @@ print_it_exception_catchpoint (bpstat bs) bp_temp = b->disposition == disp_del; uiout->text (bp_temp ? "Temporary catchpoint " : "Catchpoint "); - if (!uiout->is_mi_like_p ()) - uiout->field_int ("bkptno", b->number); + uiout->field_int ("bkptno", b->number); uiout->text ((kind == EX_EVENT_THROW ? " (exception thrown), " : (kind == EX_EVENT_CATCH ? " (exception caught), " : " (exception rethrown), "))); @@ -248,7 +247,6 @@ print_it_exception_catchpoint (bpstat bs) uiout->field_string ("reason", async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT)); uiout->field_string ("disp", bpdisp_text (b->disposition)); - uiout->field_int ("bkptno", b->number); } return PRINT_SRC_AND_LOC; } diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index b019610130..ae6f161ec9 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -8596,9 +8596,7 @@ static void mention (struct breakpoint *b) { b->ops->print_mention (b); - if (current_uiout->is_mi_like_p ()) - return; - printf_filtered ("\n"); + current_uiout->text ("\n"); } @@ -9795,12 +9793,9 @@ print_mention_ranged_breakpoint (struct breakpoint *b) gdb_assert (bl); gdb_assert (b->type == bp_hardware_breakpoint); - if (uiout->is_mi_like_p ()) - return; - - printf_filtered (_("Hardware assisted ranged breakpoint %d from %s to %s."), - b->number, paddress (bl->gdbarch, bl->address), - paddress (bl->gdbarch, bl->address + bl->length - 1)); + uiout->message (_("Hardware assisted ranged breakpoint %d from %s to %s."), + b->number, paddress (bl->gdbarch, bl->address), + paddress (bl->gdbarch, bl->address + bl->length - 1)); } /* Implement the "print_recreate" breakpoint_ops method for -- 2.13.6