diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-28 15:31:23 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-01-13 07:31:28 -0700 |
commit | 70ba0933adb6b8d64b0687289d51837a58b804f9 (patch) | |
tree | 82e08cabb054d6942c907d54d0e91924f4a8b5dd /gdb/gdbarch.c | |
parent | 41bf6acad7b02f67240f4cf84f066078f9ed7116 (diff) | |
download | gdb-70ba0933adb6b8d64b0687289d51837a58b804f9.zip gdb-70ba0933adb6b8d64b0687289d51837a58b804f9.tar.gz gdb-70ba0933adb6b8d64b0687289d51837a58b804f9.tar.bz2 |
replace XMALLOC with XNEW
This replaces XMALLOC with XNEW, and removes XMALLOC. The only
non-mechanical bit here was remembering to edit gdbarch.sh.
2014-01-13 Tom Tromey <tromey@redhat.com>
* defs.h (XMALLOC): Remove.
* avr-tdep.c (avr_gdbarch_init): Use XNEW, not XMALLOC.
* bfin-tdep.c (bfin_gdbarch_init): Likewise.
* cli-out.c (struct ui_out *): Likewise.
* cli/cli-dump.c (add_dump_command): Likewise.
(add_dump_command): Likewise.
* complaints.c (get_complaints): Likewise.
(find_complaint): Likewise.
* dwarf2-frame.c (execute_cfa_program): Likewise.
* dwarf2read.c (abbrev_table_read_table): Likewise.
* gdbarch.sh: Likewise.
* gdbarch.c: Rebuild.
* inf-ttrace.c (inf_ttrace_add_page): Likewise.
* interps.c (interp_new): Likewise.
* lm32-tdep.c (lm32_gdbarch_init): Likewise.
* m32r-tdep.c (m32r_gdbarch_init): Likewise.
* mi/mi-console.c (mi_console_file_new): Likewise.
* mi/mi-interp.c (mi_interpreter_init): Likewise.
* mi/mi-out.c (mi_out_new): Likewise.
* mi/mi-parse.c (mi_parse): Likewise.
* microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
* moxie-tdep.c (moxie_gdbarch_init): Likewise.
* observer.c (xalloc_observer_list_node): Likewise.
* regcache.c (regcache_xmalloc_1): Likewise.
* reggroups.c (reggroup_new): Likewise.
(_initialize_reggroup): Likewise.
* registry.c (register_data_with_cleanup): Likewise.
* remote.c (remote_notif_stop_alloc_reply): Likewise.
* ser-base.c (serial_ttystate): Likewise.
* ser-mingw.c (make_pipe_state): Likewise.
* ser-pipe.c (pipe_open): Likewise.
* serial.c (serial_open): Likewise.
* sh64-tdep.c (sh64_gdbarch_init): Likewise.
* tui/tui-data.c (tui_alloc_generic_win_info): Likewise.
(tui_alloc_win_info): Likewise.
(tui_add_content_elements): Likewise.
* tui/tui-file.c (tui_file_new): Likewise.
* tui/tui-out.c (tui_out_new): Likewise.
* ui-file.c (mem_file_new): Likewise.
* ui-out.c (push_level): Likewise.
(make_cleanup_ui_out_end): Likewise.
(append_header_to_list): Likewise.
(ui_out_new): Likewise.
* user-regs.c (user_reg_add_builtin): Likewise.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index a605c7d..694fc0d 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -505,7 +505,7 @@ gdbarch_alloc (const struct gdbarch_info *info, /* Create an obstack for allocating all the per-architecture memory, then use that to allocate the architecture vector. */ - struct obstack *obstack = XMALLOC (struct obstack); + struct obstack *obstack = XNEW (struct obstack); obstack_init (obstack); gdbarch = obstack_alloc (obstack, sizeof (*gdbarch)); memset (gdbarch, 0, sizeof (*gdbarch)); @@ -4490,9 +4490,9 @@ gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init, for (curr = &gdbarch_data_registry.registrations; (*curr) != NULL; curr = &(*curr)->next); - (*curr) = XMALLOC (struct gdbarch_data_registration); + (*curr) = XNEW (struct gdbarch_data_registration); (*curr)->next = NULL; - (*curr)->data = XMALLOC (struct gdbarch_data); + (*curr)->data = XNEW (struct gdbarch_data); (*curr)->data->index = gdbarch_data_registry.nr++; (*curr)->data->pre_init = pre_init; (*curr)->data->post_init = post_init; @@ -4661,7 +4661,7 @@ gdbarch_register (enum bfd_architecture bfd_architecture, bfd_arch_info->printable_name, host_address_to_string (init)); /* Append it */ - (*curr) = XMALLOC (struct gdbarch_registration); + (*curr) = XNEW (struct gdbarch_registration); (*curr)->bfd_architecture = bfd_architecture; (*curr)->init = init; (*curr)->dump_tdep = dump_tdep; @@ -4805,7 +4805,7 @@ gdbarch_find_by_info (struct gdbarch_info info) /* Insert the new architecture into the front of the architecture list (keep the list sorted Most Recently Used). */ { - struct gdbarch_list *this = XMALLOC (struct gdbarch_list); + struct gdbarch_list *this = XNEW (struct gdbarch_list); this->next = rego->arches; this->gdbarch = new_gdbarch; rego->arches = this; |