Use XCNEW gdbarch_tdep

This patch uses XCNEW gdbarch_tdep instead of XNEW.

gdb:

2017-05-24  Yao Qi  <yao.qi@linaro.org>

	* 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.
This commit is contained in:
Yao Qi 2017-05-24 22:15:23 +01:00
parent 7a3929c417
commit cdd238daf9
17 changed files with 35 additions and 16 deletions

View File

@ -1,3 +1,22 @@
2017-05-24 Yao Qi <yao.qi@linaro.org>
* 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.
2017-05-24 Yao Qi <yao.qi@linaro.org>
* selftest-arch.c (tests_with_arch): Call registers_changed

View File

@ -1748,7 +1748,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()

View File

@ -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;

View File

@ -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;

View File

@ -4008,7 +4008,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);

View File

@ -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

View File

@ -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. */

View File

@ -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_wchar_bit (gdbarch, 16);

View File

@ -1434,7 +1434,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;

View File

@ -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. */

View File

@ -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);

View File

@ -8492,7 +8492,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;

View File

@ -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)

View File

@ -1107,7 +1107,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_wchar_bit (gdbarch, 32);

View File

@ -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;

View File

@ -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 */

View File

@ -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;