From patchwork Thu Dec 22 22:07:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 18645 Received: (qmail 70068 invoked by alias); 22 Dec 2016 22:08:00 -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 70053 invoked by uid 89); 22 Dec 2016 22:07:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=ui_file, gdb_stdout, thunk, do_cleanups X-HELO: sesbmg23.ericsson.net Received: from sesbmg23.ericsson.net (HELO sesbmg23.ericsson.net) (193.180.251.37) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Dec 2016 22:07:49 +0000 Received: from ESESSHC006.ericsson.se (Unknown_Domain [153.88.183.36]) by (Symantec Mail Security) with SMTP id 3C.04.17130.0BE4C585; Thu, 22 Dec 2016 23:07:46 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.36) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 22 Dec 2016 23:08:10 +0100 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from elxcz23q12-y4.ca.am.ericsson.se (192.75.88.130) by DBXPR07MB397.eurprd07.prod.outlook.com (10.141.14.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.5; Thu, 22 Dec 2016 22:07:42 +0000 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH] Change return type of ui_out redirect to void Date: Thu, 22 Dec 2016 17:07:28 -0500 Message-ID: <20161222220728.15146-1-simon.marchi@ericsson.com> MIME-Version: 1.0 X-ClientProxiedBy: MWHPR22CA0071.namprd22.prod.outlook.com (10.171.142.33) To DBXPR07MB397.eurprd07.prod.outlook.com (10.141.14.146) X-MS-Office365-Filtering-Correlation-Id: 0654929f-e283-43ff-d936-08d42ab6f3e5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DBXPR07MB397; X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB397; 3:y/lLoiusKXYsZeDhrAimiAfu23I741BVv9RaD4VReS12SaGiMW7QAMEpAxzxknP8++gqEIs0ks83eZPPNmjueYoAGY/zNfQ6aStnLS7pEUt0UbG0TBEF4FqCH0G5NDn9C0BhP/cNA8frGDb0B7xNpZnyUQ26UD7YQe8t+rUZeazPbBktLF+4tnlo9dFOgp4BL7FwKlgFTzQKvC28JfKL+yLA7rOfMUf0UNQMWwDXdFUBkE9hzfCRasmUuGRShV5ROoquD4iNmNDLJUnd/GipiQ== X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB397; 25:SgEifio+P/kgy6bYcIl69v3uQy4aRTAYVC6XukYLfympaA8UM/kv/XHtg7VnqBfp9CTmNayFrdO81PUMO/a8RhKLQDACjEkhoVAUaVBPC8ywhza7jNRReCkwXQVy1kzTik7OXTgwHlzWwsrVuYDtBKiywt4Tj1GNvR7somQeWYEi9hocJtMiNETjAUVMyLW6pSBXTMWrIRGTAwwULfqkiOu5dSTH2WkkHBWr1z+q0Kg666N84omheTUM/o0zcDQCrPhQo0UjtcEMT1VabJu+N/B4+sezYOJwJWmaIAhg46FKiwHHCTIEb0hmkr7r8S7OHrDokX4wb84MLTQOT8wMVI93Q87ER0A1Paf+rp8XeAopW9FU1jHyjiw88T6M3GXEO33eJHltFuOPtuvS1AlcEbzf425k3G+SEb0yOrHSeaJkHH9FZropTgHW+52GZXcaLsKE+OfKAIoek37cypOpQ0AGOFFvL68jq7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Ar5d4B5SCI7m28fPoHHpWgnr/UAv8ihefFYjagaX6k7DbSvN/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148); SRVR:DBXPR07MB397; BCL:0; PCL:0; RULEID:; SRVR:DBXPR07MB397; X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB397; 4:+YKfn1jgD0IRpQNpwVKxmIkWNZVztnxvOCh2xBWSO7h7AbWQFNF0m6Wsr1pAsWSmZDZi+a6Fw097vy3RimslyjMPwk9Sbiym4xU1P3DY7EKA4TRWKsK9LbShoi7W958pi7M2DkLigMJkNNi7Oa9hVFPI59u5P1SydxoU69xQU0ev1tvYar74kB95OOpkEIaID4VYmRDc2oGBIpH4nhFQHEZM5X9zCuPmRx5j8pc1O8/BHTiaK+rYH9i9dr/KVjejNe33bozpOReXFjIzwMG1M0/IYyVeP2DEgHoCyFkh4CQtGRUBwLuJlMF75IOua9vKsY6vDotIkbqaeojeadexMPjBKTddYLuuP4ZD0YGQNyhwFR3P0/7DtE0y2+oydkvVJF9PbQbT/BfUxgKYbzdEWkbjPr5px1+gpgjUih1FIgL8c31XWa6e5pFYNKKlGUbBv7dXf42lUglIPITIpccvhA110sk+M9aBGarrRHPd7cwwXLDlzrZvE4qWzGxDPviwkzxS9CLXuQmy5fLOIqzm7hpIrWDB0OOWXwKgdOn+imwfaOgn7DEp3k+c2bt/GhhLtKcZaImRAN8uOg6b6insWoELu+wvbWhPLiwpowXwgyg= X-Forefront-PRVS: 01644DCF4A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(54534003)(189002)(199003)(48376002)(38730400001)(50986999)(4001430100002)(6506006)(6666003)(5660300001)(81166006)(6486002)(6512006)(101416001)(305945005)(68736007)(8676002)(81156014)(6916009)(2351001)(106356001)(97736004)(7736002)(33646002)(189998001)(66066001)(450100001)(4326007)(3846002)(6116002)(47776003)(105586002)(42186005)(50466002)(110136003)(92566002)(2906002)(36756003)(5003940100001)(25786008)(107886002)(575784001)(86362001)(50226002)(1076002); DIR:OUT; SFP:1101; SCL:1; SRVR:DBXPR07MB397; H:elxcz23q12-y4.ca.am.ericsson.se; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DBXPR07MB397; 23:xoyErnPJXQZgI48x9ELW7xiDZUmolHMxSA6Ej8cFS+?= =?us-ascii?Q?C1F+td6FIEJMrLH4Qc+UDPEtbrXtejryeqogjrM69ig4yNejhtZRMPrh5Rud?= =?us-ascii?Q?hqob4B3WAODXtIJFt2phYaG6ra7TcdqnpA+T95kzCWN1R2mYrm/fzx/LaKFU?= =?us-ascii?Q?pnZKfgZ32KamgpzzQaEujTS6/NK0DdK55YcKSprJkDxCbmecgKOwlHysF850?= =?us-ascii?Q?vejC3n5b1GSqOgMUwufvaAFbkJPUOb6HsvD24RG0Vd5oJzr1yACRaQHy6FhX?= =?us-ascii?Q?qS2zXBTEQckr3TAL+nd8nI3CTALEOpnJx521f8v5Tf8gFhfXEaMu6DxxT0nt?= =?us-ascii?Q?7XICJcmaavymbeDeWMOQ+qDjYWYj60qqK2prDMlE5FQs+UDuJKpqYmmSNlvw?= =?us-ascii?Q?KhULMcIKz5fR14aZvUVSLcH49iMAWIYp3pnWK5LvbpvuHeV3ELcc2FD2l/mI?= =?us-ascii?Q?yWzP424clwy8Mu95C/w2rjSWP40uf8iuZFWuatL9ufqRXylXhyhteMadUOSq?= =?us-ascii?Q?KicxBPzGB20icVJ3drr/PDzicY4wuTcvsIMz277xkYUQNY5t3IxSE63iHHM2?= =?us-ascii?Q?9SZoz/awPJnDhD7Zsw8k8c6yagk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Vztz/jKKkUnO+zzhOeGPgsOjxUqSU3HALAcZ+VfLpai8W1D1uUXBerJBj6DjtksDcERXRm1v00ZaDYJHtGjp470vnPjv36KQNRb2vSgpGDERUE78U=; 5:teJEBOX5aicKJZRTOz3ZRwIUKtr+DhsjMwgIdK3QLzZgVsMGKgwlG79u6gYS0ZcpAVRHBY1HFuqf3XDEzZL4BwbVFNCqzZXsEXm2hUnbhhpD6BTrQvRPpVojreeg/Y/Xz0b9LPtC9OW81WZZ20ZqHg==; 24:zRLYhwRscQ2Ey2GICLoov3sXGU7nBkUZDkD55rzQeb00oSTNCfq7VAHQaNVJ3wtqso8NRkydcQtjk1dkQ6Bv3s/RWPCgHAedfYZFOtFp0/U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB397; 7:+kg2uFKrAuSoE/WnBKB6ztfoRX+9Fj9HROGZI4G8P1KDNjwWBDt5rAZvg2sM/2kars7vOhuE/MUJ52hvGhebLIDBHdugTS5NZjGaZxvRMkl92n5Wsly+GSM4QfaYYG1TrFD3z0o5at7qFdXTb9/BdcEllQy0Dbls4NBGSO0Q6nHGDN8pn8j50m516RgIvN5Zz2n6FjcpHtgTXt6CI0jWbluyC237oF+aEAabSngqfRhkbmbgLP1M18yXf/2zf7S2b7aXeeDX/U1FrTGqD5j/aZDak/StPKdmNLwagfcQ83y/EDmDDMV+SFZKDvQWCy17quLaunDB56UbnYSGoCLqggW7aRJ/tzFtgBLMtg4+X46LrYLqJrYSgtWvJ/mI7ca1ZAZO8uHjV7omOc8lZ5eqN2YttS1UrpT6Imp4HsDsHfP6b0H9ziTeQ2A/Sejjob84V89ySsWyjF11eKeEoNhUEA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2016 22:07:42.2017 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR07MB397 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes All implementations of redirect/do_redirect in the ui_out subsystem always return 0 (success). We can therefore clean it up and make them return void. gdb/ChangeLog: * cli-out.c (cli_ui_out::do_redirect): Change return type to void. * cli-out.h (cli_ui_out::do_redirect): Likewise. * mi/mi-out.c (mi_ui_out::do_redirect): Likewise. * mi/mi-out.h (mi_ui_out::do_redirect): Likewise. * ui-out.c (ui_out::redirect): Likewise. * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise. * cli/cli-logging.c (set_logging_redirect): Update call site of ui_out::redirect. (handle_redirections): Likewise. * scm-ports.c (ioscm_with_output_to_port_worker): Likewise. * top.c (execute_command_to_string): Likewise. * utils.c (do_ui_out_redirect_pop): Likewise. --- gdb/cli-out.c | 4 +--- gdb/cli-out.h | 2 +- gdb/cli/cli-logging.c | 15 +++++---------- gdb/guile/scm-ports.c | 6 ++---- gdb/mi/mi-out.c | 4 +--- gdb/mi/mi-out.h | 2 +- gdb/top.c | 6 ++---- gdb/ui-out.c | 4 ++-- gdb/ui-out.h | 4 ++-- gdb/utils.c | 3 +-- 10 files changed, 18 insertions(+), 32 deletions(-) diff --git a/gdb/cli-out.c b/gdb/cli-out.c index af983a1a1f..d84ae37cac 100644 --- a/gdb/cli-out.c +++ b/gdb/cli-out.c @@ -227,15 +227,13 @@ cli_ui_out::do_flush () and make it therefore active. OUTSTREAM as NULL will pop the last pushed output stream; it is an internal error if it does not exist. */ -int +void cli_ui_out::do_redirect (ui_file *outstream) { if (outstream != NULL) m_streams.push_back (outstream); else m_streams.pop_back (); - - return 0; } /* local functions */ diff --git a/gdb/cli-out.h b/gdb/cli-out.h index ef996c41dc..e86fda2760 100644 --- a/gdb/cli-out.h +++ b/gdb/cli-out.h @@ -60,7 +60,7 @@ protected: ATTRIBUTE_PRINTF (2,0); virtual void do_wrap_hint (const char *identstring) override; virtual void do_flush () override; - virtual int do_redirect (struct ui_file * outstream) override; + virtual void do_redirect (struct ui_file * outstream) override; bool suppress_output () { return m_suppress_output; } diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c index 46c23064fc..02e2705310 100644 --- a/gdb/cli/cli-logging.c +++ b/gdb/cli/cli-logging.c @@ -130,13 +130,11 @@ set_logging_redirect (char *args, int from_tty, struct cmd_list_element *c) /* There is a former output pushed on the ui_out_redirect stack. We want to replace it by OUTPUT so we must pop the former value - first. We should either do both the pop and push or to do - neither of it. At least do not try to push OUTPUT if the pop - already failed. */ + first. Ideally, we should either do both the pop and push or to do + neither of it. */ - if (uiout->redirect (NULL) < 0 - || uiout->redirect (output) < 0) - warning (_("Current output protocol does not support redirection")); + uiout->redirect (NULL); + uiout->redirect (output); do_cleanups (cleanups); } @@ -246,10 +244,7 @@ handle_redirections (int from_tty) /* Don't do the redirect for MI, it confuses MI's ui-out scheme. */ if (!current_uiout->is_mi_like_p ()) - { - if (current_uiout->redirect (output) < 0) - warning (_("Current output protocol does not support redirection")); - } + current_uiout->redirect (output); } static void diff --git a/gdb/guile/scm-ports.c b/gdb/guile/scm-ports.c index 68f2f8d0b9..6603698788 100644 --- a/gdb/guile/scm-ports.c +++ b/gdb/guile/scm-ports.c @@ -531,10 +531,8 @@ ioscm_with_output_to_port_worker (SCM port, SCM thunk, enum oport oport, gdb_stderr = port_file; else { - if (current_uiout->redirect (port_file) < 0) - warning (_("Current output protocol does not support redirection")); - else - make_cleanup_ui_out_redirect_pop (current_uiout); + current_uiout->redirect (port_file); + make_cleanup_ui_out_redirect_pop (current_uiout); gdb_stdout = port_file; } diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index 3761a5c0e5..e9e657ba0f 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -170,15 +170,13 @@ mi_ui_out::do_flush () gdb_flush (m_streams.back ()); } -int +void mi_ui_out::do_redirect (ui_file *outstream) { if (outstream != NULL) m_streams.push_back (outstream); else m_streams.pop_back (); - - return 0; } void diff --git a/gdb/mi/mi-out.h b/gdb/mi/mi-out.h index 933f1d0d98..21e6880a41 100644 --- a/gdb/mi/mi-out.h +++ b/gdb/mi/mi-out.h @@ -67,7 +67,7 @@ protected: ATTRIBUTE_PRINTF (2,0); virtual void do_wrap_hint (const char *identstring) override; virtual void do_flush () override; - virtual int do_redirect (struct ui_file * outstream) override; + virtual void do_redirect (struct ui_file * outstream) override; virtual bool do_is_mi_like_p () override { return true; } diff --git a/gdb/top.c b/gdb/top.c index 077fb2afec..49034ee454 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -706,10 +706,8 @@ execute_command_to_string (char *p, int from_tty) make_cleanup_ui_file_delete (str_file); - if (current_uiout->redirect (str_file) < 0) - warning (_("Current output protocol does not support redirection")); - else - make_cleanup_ui_out_redirect_pop (current_uiout); + current_uiout->redirect (str_file); + make_cleanup_ui_out_redirect_pop (current_uiout); scoped_restore save_stdout = make_scoped_restore (&gdb_stdout, str_file); diff --git a/gdb/ui-out.c b/gdb/ui-out.c index 9fe72ddf3b..34857162b4 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -619,10 +619,10 @@ ui_out::flush () do_flush (); } -int +void ui_out::redirect (ui_file *outstream) { - return do_redirect (outstream); + do_redirect (outstream); } /* Test the flags against the mask given. */ diff --git a/gdb/ui-out.h b/gdb/ui-out.h index c7e0efb2e0..9f56866903 100644 --- a/gdb/ui-out.h +++ b/gdb/ui-out.h @@ -121,7 +121,7 @@ class ui_out void flush (); /* Redirect the output of a ui_out object temporarily. */ - int redirect (ui_file *outstream); + void redirect (ui_file *outstream); ui_out_flags test_flags (ui_out_flags mask); @@ -163,7 +163,7 @@ class ui_out ATTRIBUTE_PRINTF (2,0) = 0; virtual void do_wrap_hint (const char *identstring) = 0; virtual void do_flush () = 0; - virtual int do_redirect (struct ui_file * outstream) = 0; + virtual void do_redirect (struct ui_file * outstream) = 0; /* Set as not MI-like by default. It is overridden in subclasses if necessary. */ diff --git a/gdb/utils.c b/gdb/utils.c index 787e0e37b9..d4be28a34b 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -218,8 +218,7 @@ do_ui_out_redirect_pop (void *arg) { struct ui_out *uiout = (struct ui_out *) arg; - if (uiout->redirect (NULL) < 0) - warning (_("Cannot restore redirection of the current output protocol")); + uiout->redirect (NULL); } /* Return a new cleanup that pops the last redirection by ui_out_redirect