aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c10
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;