From 41bf6acad7b02f67240f4cf84f066078f9ed7116 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 28 Dec 2013 15:31:01 -0700 Subject: replace XZALLOC with XCNEW This replaces XZALLOC with XCNEW and removes XZALLOC. This change is purely mechanical. 2014-01-13 Tom Tromey * defs.h (XZALLOC): Remove. * ada-lang.c (get_ada_inferior_data): Use XCNEW, not XZALLOC. * ada-tasks.c (get_ada_tasks_pspace_data): Likewise. (get_ada_tasks_inferior_data): Likewise. * auto-load.c (get_auto_load_pspace_data): Likewise. * auxv.c (get_auxv_inferior_data): Likewise. * bfd-target.c (target_bfd_reopen): Likewise. * breakpoint.c (get_catch_syscall_inferior_data): Likewise. (deprecated_insert_raw_breakpoint): Likewise. * bsd-uthread.c (bsd_uthread_pid_to_str): Likewise. * corelow.c (core_open): Likewise. * darwin-nat.c (darwin_check_new_threads): Likewise. (darwin_attach_pid): Likewise. * dummy-frame.c (dummy_frame_push): Likewise. * dwarf2-frame.c (dwarf2_frame_cache): Likewise. * dwarf2loc.c (allocate_piece_closure): Likewise. * elfread.c (elf_symfile_segments): Likewise. * eval.c (ptrmath_type_p): Likewise. * exceptions.c (EXCEPTIONS_SIGJMP_BUF): Likewise. * gdbtypes.c (alloc_type_arch): Likewise. (alloc_type_instance): Likewise. * hppa-tdep.c (hppa_gdbarch_init): Likewise. * inf-child.c (inf_child_can_use_agent): Likewise. * inflow.c (get_inflow_inferior_data): Likewise. * infrun.c (save_infcall_suspend_state): Likewise. * jit.c (jit_reader_load): Likewise. (get_jit_objfile_data): Likewise. (get_jit_program_space_data): Likewise. (jit_object_open_impl): Likewise. (jit_symtab_open_impl): Likewise. (jit_block_open_impl): Likewise. (jit_frame_sniffer): Likewise. * linux-fork.c (add_fork): Likewise. * maint.c (make_command_stats_cleanup): Likewise. * objfiles.c (get_objfile_pspace_data): Likewise. * opencl-lang.c (struct lval_closure): Likewise. * osdata.c (osdata_start_osdata): Likewise. * progspace.c (new_address_space): Likewise. (add_program_space): Likewise. * remote-sim.c (get_sim_inferior_data): Likewise. * sh-tdep.c (sh_gdbarch_init): Likewise. * skip.c (Ignore): Likewise. (skip_delete_command): Likewise. * solib-aix.c (get_solib_aix_inferior_data): Likewise. (library_list_start_library): Likewise. (solib_aix_current_sos): Likewise. * solib-darwin.c (get_darwin_info): Likewise. (darwin_current_sos): Likewise. * solib-dsbt.c (get_dsbt_info): Likewise. * solib-ia64-hpux.c (new_so_list): Likewise. (ia64_hpux_get_solib_linkage_addr): Likewise. * solib-spu.c (append_ocl_sos): Likewise. (spu_current_sos): Likewise. * solib-svr4.c (get_svr4_info): Likewise. (svr4_keep_data_in_core): Likewise. (library_list_start_library): Likewise. (svr4_default_sos): Likewise. (svr4_read_so_list): Likewise. * solib-target.c (library_list_start_library): Likewise. (solib_target_current_sos): Likewise. * sparc-tdep.c (sparc32_gdbarch_init): Likewise. * symfile-debug.c (install_symfile_debug_logging): Likewise. * symfile.c (default_symfile_segments): Likewise. * target-descriptions.c (tdesc_data_init): Likewise. (tdesc_create_reg): Likewise. (struct tdesc_type *): Likewise. (tdesc_create_vector): Likewise. (tdesc_set_struct_size): Likewise. (struct tdesc_type *): Likewise. (tdesc_free_feature): Likewise. (tdesc_create_feature): Likewise. * windows-nat.c (windows_add_thread): Likewise. (windows_make_so): Likewise. * xml-support.c (gdb_xml_body_text): Likewise. (gdb_xml_create_parser_and_cleanup): Likewise. (xml_process_xincludes): Likewise. * xml-syscall.c (allocate_syscalls_info): Likewise. (syscall_create_syscall_desc): Likewise. --- gdb/target-descriptions.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gdb/target-descriptions.c') diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index 9147dbe..953748b 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -804,7 +804,7 @@ tdesc_data_init (struct obstack *obstack) struct tdesc_arch_data * tdesc_data_alloc (void) { - return XZALLOC (struct tdesc_arch_data); + return XCNEW (struct tdesc_arch_data); } /* Free something allocated by tdesc_data_alloc, if it is not going @@ -1242,7 +1242,7 @@ tdesc_create_reg (struct tdesc_feature *feature, const char *name, int regnum, int save_restore, const char *group, int bitsize, const char *type) { - struct tdesc_reg *reg = XZALLOC (struct tdesc_reg); + struct tdesc_reg *reg = XCNEW (struct tdesc_reg); reg->name = xstrdup (name); reg->target_regnum = regnum; @@ -1304,7 +1304,7 @@ struct tdesc_type * tdesc_create_vector (struct tdesc_feature *feature, const char *name, struct tdesc_type *field_type, int count) { - struct tdesc_type *type = XZALLOC (struct tdesc_type); + struct tdesc_type *type = XCNEW (struct tdesc_type); type->name = xstrdup (name); type->kind = TDESC_TYPE_VECTOR; @@ -1318,7 +1318,7 @@ tdesc_create_vector (struct tdesc_feature *feature, const char *name, struct tdesc_type * tdesc_create_struct (struct tdesc_feature *feature, const char *name) { - struct tdesc_type *type = XZALLOC (struct tdesc_type); + struct tdesc_type *type = XCNEW (struct tdesc_type); type->name = xstrdup (name); type->kind = TDESC_TYPE_STRUCT; @@ -1341,7 +1341,7 @@ tdesc_set_struct_size (struct tdesc_type *type, LONGEST size) struct tdesc_type * tdesc_create_union (struct tdesc_feature *feature, const char *name) { - struct tdesc_type *type = XZALLOC (struct tdesc_type); + struct tdesc_type *type = XCNEW (struct tdesc_type); type->name = xstrdup (name); type->kind = TDESC_TYPE_UNION; @@ -1354,7 +1354,7 @@ struct tdesc_type * tdesc_create_flags (struct tdesc_feature *feature, const char *name, LONGEST size) { - struct tdesc_type *type = XZALLOC (struct tdesc_type); + struct tdesc_type *type = XCNEW (struct tdesc_type); type->name = xstrdup (name); type->kind = TDESC_TYPE_FLAGS; @@ -1436,7 +1436,7 @@ tdesc_free_feature (struct tdesc_feature *feature) struct tdesc_feature * tdesc_create_feature (struct target_desc *tdesc, const char *name) { - struct tdesc_feature *new_feature = XZALLOC (struct tdesc_feature); + struct tdesc_feature *new_feature = XCNEW (struct tdesc_feature); new_feature->name = xstrdup (name); @@ -1447,7 +1447,7 @@ tdesc_create_feature (struct target_desc *tdesc, const char *name) struct target_desc * allocate_target_description (void) { - return XZALLOC (struct target_desc); + return XCNEW (struct target_desc); } static void -- cgit v1.1