From patchwork Wed Feb 12 22:27:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Terekhov, Mikhail via Gdb-patches" X-Patchwork-Id: 38010 Received: (qmail 42547 invoked by alias); 12 Feb 2020 22:27:35 -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 42533 invoked by uid 89); 12 Feb 2020 22:27:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=*tdesc, target_desc X-HELO: mail-qk1-f201.google.com Received: from mail-qk1-f201.google.com (HELO mail-qk1-f201.google.com) (209.85.222.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Feb 2020 22:27:33 +0000 Received: by mail-qk1-f201.google.com with SMTP id z64so2384806qke.10 for ; Wed, 12 Feb 2020 14:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=mOOFrjzu8/XBwA+zXMSYQrrjxSTn+2R9B5k/8UKQ6zs=; b=hW4lZSAjre/GM8OV8bXMXxreTfZx4XNYaedqtJDOH2Ig5EWF8D8aOLj84/IoaBPvtv R2GwgQDpAaLT6ZpvIhyPCyc/NWa8V8I40+hFOQ1T+zSRFrz4JY6+2RV//2jCePTQIe+z iXEJAQ33ENGD90APZ8neBb661XVJpRgY6KRJGdTqxe0GcdKV/rjaNPhyywmAF4MPogUm iUFTl32IpyDpIYikeymoAUDoJ9JMYEDjnw/tjK8JL60tfJbrcGdi1DmOujVp/FWZTQ8d R7Gg6kZI7B3AmJ35eO23PbcPd+pQNBoiMjeWvJz1D/o24y6c6XrjrVnkWFR6aw3E5Zkf GhjA== Date: Wed, 12 Feb 2020 16:27:28 -0600 Message-Id: <20200212222728.58427-1-cbiesinger@google.com> Mime-Version: 1.0 Subject: [PATCH 2/2] Change booleans to bool in ARM's gdbarch_tdep X-Patchwork-Original-From: "Christian Biesinger via gdb-patches" From: "Terekhov, Mikhail via Gdb-patches" Reply-To: Christian Biesinger To: gdb-patches@sourceware.org Cc: Christian Biesinger X-IsSubscribed: yes [Hmm, it looks like I never actually sent this :( Oops] gdb/ChangeLog: 2020-02-11 Christian Biesinger * arm-tdep.c (arm_gdbarch_init): Update. * arm-tdep.h (struct gdbarch_tdep) : Change to bool. --- gdb/arm-tdep.c | 26 ++++++++++++++------------ gdb/arm-tdep.h | 12 ++++++------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index aa26e6a48e..4efd7585a0 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -8870,11 +8870,13 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) enum arm_abi_kind arm_abi = arm_abi_global; enum arm_float_model fp_model = arm_fp_model; struct tdesc_arch_data *tdesc_data = NULL; - int i, is_m = 0; - int vfp_register_count = 0, have_vfp_pseudos = 0, have_neon_pseudos = 0; - int have_wmmx_registers = 0; - int have_neon = 0; - int have_fpa_registers = 1; + int i; + bool is_m = false; + int vfp_register_count = 0; + bool have_vfp_pseudos = false, have_neon_pseudos = false; + bool have_wmmx_registers = false; + bool have_neon = false; + bool have_fpa_registers = true; const struct target_desc *tdesc = info.target_desc; /* If we have an object to base this architecture on, try to determine @@ -8991,7 +8993,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) && (attr_arch == TAG_CPU_ARCH_V6_M || attr_arch == TAG_CPU_ARCH_V6S_M || attr_profile == 'M')) - is_m = 1; + is_m = true; #endif } @@ -9049,7 +9051,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) if (feature == NULL) return NULL; else - is_m = 1; + is_m = true; } tdesc_data = tdesc_data_alloc (); @@ -9095,7 +9097,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } } else - have_fpa_registers = 0; + have_fpa_registers = false; feature = tdesc_find_feature (tdesc, "org.gnu.gdb.xscale.iwmmxt"); @@ -9131,7 +9133,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) return NULL; } - have_wmmx_registers = 1; + have_wmmx_registers = true; } /* If we have a VFP unit, check whether the single precision registers @@ -9172,7 +9174,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } if (tdesc_unnumbered_register (feature, "s0") == 0) - have_vfp_pseudos = 1; + have_vfp_pseudos = true; vfp_register_count = i; @@ -9194,9 +9196,9 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) their type; otherwise (normally) provide them with the default type. */ if (tdesc_unnumbered_register (feature, "q0") == 0) - have_neon_pseudos = 1; + have_neon_pseudos = true; - have_neon = 1; + have_neon = true; } } } diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h index f802aac544..629c3b8ac6 100644 --- a/gdb/arm-tdep.h +++ b/gdb/arm-tdep.h @@ -95,19 +95,19 @@ struct gdbarch_tdep enum arm_float_model fp_model; /* Floating point calling conventions. */ - int have_fpa_registers; /* Does the target report the FPA registers? */ - int have_wmmx_registers; /* Does the target report the WMMX registers? */ + bool have_fpa_registers; /* Does the target report the FPA registers? */ + bool have_wmmx_registers; /* Does the target report the WMMX registers? */ /* The number of VFP registers reported by the target. It is zero if VFP registers are not supported. */ int vfp_register_count; - int have_vfp_pseudos; /* Are we synthesizing the single precision + bool have_vfp_pseudos; /* Are we synthesizing the single precision VFP registers? */ - int have_neon_pseudos; /* Are we synthesizing the quad precision + bool have_neon_pseudos; /* Are we synthesizing the quad precision NEON registers? Requires have_vfp_pseudos. */ - int have_neon; /* Do we have a NEON unit? */ + bool have_neon; /* Do we have a NEON unit? */ - int is_m; /* Does the target follow the "M" profile. */ + bool is_m; /* Does the target follow the "M" profile. */ CORE_ADDR lowest_pc; /* Lowest address at which instructions will appear. */