gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / registry.c
index c01929b36532e504768da1682b0bcca079128725..d7b395d1107e6e232f52d88f5eb8a78ca7bce5f0 100644 (file)
@@ -1,7 +1,6 @@
 /* Support functions for general registry objects.
 
-   Copyright (C) 2011, 2012
-   Free Software Foundation, Inc.
+   Copyright (C) 2011-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -20,9 +19,6 @@
 
 #include "defs.h"
 #include "registry.h"
-#include "gdb_assert.h"
-#include "gdb_string.h"
-
 const struct registry_data *
 register_data_with_cleanup (struct registry_data_registry *registry,
                            registry_data_callback save,
@@ -36,9 +32,9 @@ register_data_with_cleanup (struct registry_data_registry *registry,
        curr = &(*curr)->next)
     ;
 
-  *curr = XMALLOC (struct registry_data_registration);
+  *curr = XNEW (struct registry_data_registration);
   (*curr)->next = NULL;
-  (*curr)->data = XMALLOC (struct registry_data);
+  (*curr)->data = XNEW (struct registry_data);
   (*curr)->data->index = registry->num_registrations++;
   (*curr)->data->save = save;
   (*curr)->data->free = free;
@@ -52,7 +48,7 @@ registry_alloc_data (struct registry_data_registry *registry,
 {
   gdb_assert (fields->data == NULL);
   fields->num_data = registry->num_registrations;
-  fields->data = XCALLOC (fields->num_data, void *);
+  fields->data = XCNEWVEC (void *, fields->num_data);
 }
 
 void
This page took 0.024727 seconds and 4 git commands to generate.