From patchwork Sat May 4 20:11:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32554 Received: (qmail 97349 invoked by alias); 4 May 2019 20:12:45 -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 97340 invoked by uid 89); 4 May 2019 20:12:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.3 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.1 spammy= X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 04 May 2019 20:12:43 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 2BB0C1BDBB for ; Sat, 4 May 2019 15:11:51 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id N10hhovq9dnCeN10hhYPAK; Sat, 04 May 2019 15:11:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yYltMgGyzkBZOpajrAeAkIU6QKzl4F/7oELRfffo5HE=; b=Ci9Mm1wMl9Sd7V4gsqYmK/3bz0 vJ2uppPoozLPkhtoOKV+wqIRHaO+Vu/A5W+VCYAqQLhGM3qQEhWCAhCyzZINA5Rp2kripmtNkDBCx deSR9k99R8zguNbutUrC8EtvO; Received: from 97-122-168-123.hlrn.qwest.net ([97.122.168.123]:39978 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hN10g-004Jf3-Vj; Sat, 04 May 2019 15:11:51 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI 7/7] Change arc_tdesc_init to return bool Date: Sat, 4 May 2019 14:11:47 -0600 Message-Id: <20190504201147.3095-8-tom@tromey.com> In-Reply-To: <20190504201147.3095-1-tom@tromey.com> References: <20190504201147.3095-1-tom@tromey.com> This changes arc_tdesc_init to return bool. gdb/ChangeLog 2019-05-04 Tom Tromey * arc-tdep.c (arc_tdesc_init): Return bool. --- gdb/ChangeLog | 4 ++++ gdb/arc-tdep.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c index 9c0296083d5..108b6717f7d 100644 --- a/gdb/arc-tdep.c +++ b/gdb/arc-tdep.c @@ -1720,7 +1720,7 @@ static const struct frame_base arc_normal_base = { Returns TRUE if input tdesc was valid and in this case it will assign TDESC and TDESC_DATA output parameters. */ -static int +static bool arc_tdesc_init (struct gdbarch_info info, const struct target_desc **tdesc, struct tdesc_arch_data **tdesc_data) { @@ -1803,7 +1803,7 @@ arc_tdesc_init (struct gdbarch_info info, const struct target_desc **tdesc, { arc_print (_("Error: ARC v2 target description supplied for " "non-ARCv2 target.\n")); - return FALSE; + return false; } is_reduced_rf = false; @@ -1819,7 +1819,7 @@ arc_tdesc_init (struct gdbarch_info info, const struct target_desc **tdesc, { arc_print (_("Error: ARC v2 target description supplied for " "non-ARCv2 target.\n")); - return FALSE; + return false; } is_reduced_rf = true; @@ -1836,7 +1836,7 @@ arc_tdesc_init (struct gdbarch_info info, const struct target_desc **tdesc, { arc_print (_("Error: ARCompact target description supplied " "for non-ARCompact target.\n")); - return FALSE; + return false; } is_reduced_rf = false; @@ -1847,7 +1847,7 @@ arc_tdesc_init (struct gdbarch_info info, const struct target_desc **tdesc, { arc_print (_("Error: Couldn't find core register feature in " "supplied target description.")); - return FALSE; + return false; } } } @@ -1882,7 +1882,7 @@ arc_tdesc_init (struct gdbarch_info info, const struct target_desc **tdesc, arc_print (_("Error: Cannot find required register `%s' in " "feature `%s'.\n"), core_regs[i], core_feature_name); tdesc_data_cleanup (tdesc_data_loc); - return FALSE; + return false; } } @@ -1894,7 +1894,7 @@ arc_tdesc_init (struct gdbarch_info info, const struct target_desc **tdesc, arc_print (_("Error: Cannot find required feature `%s' in supplied " "target description.\n"), aux_minimal_feature_name); tdesc_data_cleanup (tdesc_data_loc); - return FALSE; + return false; } for (int i = ARC_FIRST_AUX_REGNUM; i <= ARC_LAST_AUX_REGNUM; i++) @@ -1907,14 +1907,14 @@ arc_tdesc_init (struct gdbarch_info info, const struct target_desc **tdesc, "in feature `%s'.\n"), name, tdesc_feature_name (feature)); tdesc_data_cleanup (tdesc_data_loc); - return FALSE; + return false; } } *tdesc = tdesc_loc; *tdesc_data = tdesc_data_loc; - return TRUE; + return true; } /* Implement the type_align gdbarch function. */