From patchwork Thu Apr 13 07:26:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 20022 Received: (qmail 119302 invoked by alias); 13 Apr 2017 07:26:25 -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 119219 invoked by uid 89); 13 Apr 2017 07:26:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Apr 2017 07:26:21 +0000 Received: by mail-wm0-f48.google.com with SMTP id t189so40185179wmt.1 for ; Thu, 13 Apr 2017 00:26:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Wd6CVxQvAoH8vSydyObWXY0678IflhyfTlneuuXs9aw=; b=GHCaTKvHZkaM4DHEDHJPjAmpcsmC1D9+U+GRqOkKKHya3rIB0PGA8BNTErC1QqYfuG 0lJMxJ/QrpZscAAKHCWnFM7Yyu5CVtCpMyNPW/AZnN1Ml1ri+J4d9Udd7mFJHHQQRTvc ZjMsBMjW5Z7Trvc/x/SOeRMPWpU+xOa67/PKY3tAWfJVNZGP0n4C4b+WRgcefg3a/+86 X1y/p2iGf1WcSXIbwj07NZGnF1rqvpCSThNnkoJlRSf27DqYZS5MZCwcBkRhdIhf3/6K DrsalWbKBBSQrXWcI1rAC73syP7bD9rhLyy5VNyQKR00E61vfDG/npTwlCcS3lV+peqP BEdg== X-Gm-Message-State: AN3rC/5K2nFlKP7gu55lkYCha01pWrt93krjSCop57m8iY68EJZUprpb X7/XFpeHT1UGaN4n X-Received: by 10.28.86.130 with SMTP id k124mr22731775wmb.58.1492068380468; Thu, 13 Apr 2017 00:26:20 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com ([194.214.185.158]) by smtp.gmail.com with ESMTPSA id e21sm8719934wmd.3.2017.04.13.00.26.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Apr 2017 00:26:20 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 4/9] Use XCNEW gdbarch_tdep Date: Thu, 13 Apr 2017 08:26:08 +0100 Message-Id: <1492068373-4916-5-git-send-email-yao.qi@linaro.org> In-Reply-To: <1492068373-4916-1-git-send-email-yao.qi@linaro.org> References: <1492068373-4916-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes This patch uses XCNEW gdbarch_tdep instead of XNEW. gdb: 2017-04-12 Yao Qi * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW. * avr-tdep.c (avr_gdbarch_init): Likewise. * bfin-tdep.c (bfin_gdbarch_init): Likewise. * cris-tdep.c (cris_gdbarch_init): Likewise. * ft32-tdep.c (ft32_gdbarch_init): Likewise. * lm32-tdep.c (lm32_gdbarch_init): Likewise. * m32r-tdep.c (m32r_gdbarch_init): Likewise. * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise. * mep-tdep.c (mep_gdbarch_init): Likewise. * microblaze-tdep.c (microblaze_gdbarch_init): Likewise. * mips-tdep.c (mips_gdbarch_init): Likewise. * mn10300-tdep.c (mn10300_gdbarch_init): Likewise. * moxie-tdep.c (moxie_gdbarch_init): Likewise. * msp430-tdep.c (msp430_gdbarch_init): Likewise. * sh64-tdep.c (sh64_gdbarch_init): Likewise. * v850-tdep.c (v850_gdbarch_init): Likewise. --- gdb/alpha-tdep.c | 2 +- gdb/avr-tdep.c | 2 +- gdb/bfin-tdep.c | 2 +- gdb/cris-tdep.c | 2 +- gdb/ft32-tdep.c | 2 +- gdb/lm32-tdep.c | 2 +- gdb/m32r-tdep.c | 2 +- gdb/m68hc11-tdep.c | 2 +- gdb/mep-tdep.c | 2 +- gdb/microblaze-tdep.c | 2 +- gdb/mips-tdep.c | 2 +- gdb/mn10300-tdep.c | 2 +- gdb/moxie-tdep.c | 2 +- gdb/msp430-tdep.c | 2 +- gdb/sh64-tdep.c | 2 +- gdb/v850-tdep.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 4dd65c5..89f9676 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1749,7 +1749,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) if (arches != NULL) return arches->gdbarch; - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); /* Lowest text address. This is used by heuristic_proc_start() diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 0ae8a08..1c42f1b 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1453,7 +1453,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } /* None found, create a new architecture from the information provided. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); tdep->call_length = call_length; diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index 80d83d4..7b922e4 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -811,7 +811,7 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) return arches->gdbarch; } - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); tdep->bfin_abi = abi; diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index a46356f..e6fab60 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -4021,7 +4021,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } /* No matching architecture was found. Create a new one. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); info.byte_order = BFD_ENDIAN_LITTLE; gdbarch = gdbarch_alloc (&info, tdep); diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c index 5b28275..4cb8c25 100644 --- a/gdb/ft32-tdep.c +++ b/gdb/ft32-tdep.c @@ -597,7 +597,7 @@ ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) return arches->gdbarch; /* Allocate space for the new architecture. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); /* Create a type for PC. We can't use builtin types here, as they may not diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c index bd3e182..54bff6e 100644 --- a/gdb/lm32-tdep.c +++ b/gdb/lm32-tdep.c @@ -521,7 +521,7 @@ lm32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) return arches->gdbarch; /* None found, create a new architecture from the information provided. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); /* Type sizes. */ diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c index 4701f7a..84ae4be 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c @@ -908,7 +908,7 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) return arches->gdbarch; /* Allocate space for the new architecture. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); set_gdbarch_read_pc (gdbarch, m32r_read_pc); diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 893d9c2..307c9e9 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1444,7 +1444,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info, } /* Need a new architecture. Fill in a target specific vector. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); tdep->elf_flags = elf_flags; diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index 5a45d6e..7e9b855 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -2437,7 +2437,7 @@ mep_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) if (gdbarch_tdep (arches->gdbarch)->me_module == me_module) return arches->gdbarch; - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); /* Get a CGEN CPU descriptor for this architecture. */ diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index 59f94c5..e5c2ceb 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -703,7 +703,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } /* Allocate space for the new architecture. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); set_gdbarch_long_double_bit (gdbarch, 128); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 45d1d73..592d1aa 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -8488,7 +8488,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) } /* Need a new architecture. Fill in a target specific vector. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); tdep->elf_flags = elf_flags; tdep->mips64_transfers_32bit_regs_p = mips64_transfers_32bit_regs_p; diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 0f5e10f..ce66b2b 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1395,7 +1395,7 @@ mn10300_gdbarch_init (struct gdbarch_info info, if (arches != NULL) return arches->gdbarch; - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); switch (info.bfd_arch_info->mach) diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c index d0f4223..6cc4d38 100644 --- a/gdb/moxie-tdep.c +++ b/gdb/moxie-tdep.c @@ -1109,7 +1109,7 @@ moxie_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) return arches->gdbarch; /* Allocate space for the new architecture. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); set_gdbarch_read_pc (gdbarch, moxie_read_pc); diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c index d9eebf0..37a47d0 100644 --- a/gdb/msp430-tdep.c +++ b/gdb/msp430-tdep.c @@ -944,7 +944,7 @@ msp430_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* None found, create a new architecture from the information provided. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); tdep->elf_flags = elf_flags; tdep->isa = isa; diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index 33986fd..3d29506 100644 --- a/gdb/sh64-tdep.c +++ b/gdb/sh64-tdep.c @@ -2371,7 +2371,7 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* None found, create a new architecture from the information provided. */ - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); /* Determine the ABI */ diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 668635e..18af250 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -1396,7 +1396,7 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) return arches->gdbarch; } - tdep = XNEW (struct gdbarch_tdep); + tdep = XCNEW (struct gdbarch_tdep); tdep->e_flags = e_flags; tdep->e_machine = e_machine;