aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 2ec358a..f57f4f5 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -144,14 +144,14 @@ get_objfile_bfd_data (struct objfile *objfile, struct bfd *abfd)
storage
= ((struct objfile_per_bfd_storage *)
bfd_alloc (abfd, sizeof (struct objfile_per_bfd_storage)));
+ /* objfile_per_bfd_storage is not trivially constructible, must
+ call the ctor manually. */
+ storage = new (storage) objfile_per_bfd_storage ();
set_bfd_data (abfd, objfiles_bfd_data, storage);
}
else
- storage = XOBNEW (&objfile->objfile_obstack, objfile_per_bfd_storage);
-
- /* objfile_per_bfd_storage is not trivially constructible, must
- call the ctor manually. */
- storage = new (storage) objfile_per_bfd_storage ();
+ storage
+ = obstack_new<objfile_per_bfd_storage> (&objfile->objfile_obstack);
/* Look up the gdbarch associated with the BFD. */
if (abfd != NULL)