/* Definitions for BFD wrappers used by GDB.
- Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of GDB.
#include "ui-out.h"
#include "gdbcmd.h"
#include "hashtab.h"
-#include "filestuff.h"
-#include "vec.h"
+#include "common/filestuff.h"
+#include "common/vec.h"
#ifdef HAVE_MMAP
#include <sys/mman.h>
#ifndef MAP_FAILED
host_address_to_string (abfd),
bfd_get_filename (abfd));
close (fd);
- return new_bfd_ref (abfd);
+ return gdb_bfd_ref_ptr::new_reference (abfd);
}
abfd = bfd_fopen (name, target, FOPEN_RB, fd);
*slot = abfd;
}
- return new_bfd_ref (abfd);
+ return gdb_bfd_ref_ptr::new_reference (abfd);
}
/* A helper function that releases any section data attached to the
{
bfd *result = bfd_fopen (filename, target, mode, fd);
- return new_bfd_ref (result);
+ return gdb_bfd_ref_ptr::new_reference (result);
}
/* See gdb_bfd.h. */
{
bfd *result = bfd_openr (filename, target);
- return new_bfd_ref (result);
+ return gdb_bfd_ref_ptr::new_reference (result);
}
/* See gdb_bfd.h. */
{
bfd *result = bfd_openw (filename, target);
- return new_bfd_ref (result);
+ return gdb_bfd_ref_ptr::new_reference (result);
}
/* See gdb_bfd.h. */
open_func, open_closure,
pread_func, close_func, stat_func);
- return new_bfd_ref (result);
+ return gdb_bfd_ref_ptr::new_reference (result);
}
/* See gdb_bfd.h. */
struct gdb_bfd_data *gdata;
gdata = (struct gdb_bfd_data *) bfd_usrdata (includer);
- gdata->included_bfds.push_back (new_bfd_ref (includee));
-}
-
-/* See gdb_bfd.h. */
-
-gdb_bfd_ref_ptr
-gdb_bfd_fdopenr (const char *filename, const char *target, int fd)
-{
- bfd *result = bfd_fdopenr (filename, target, fd);
-
- return new_bfd_ref (result);
+ gdata->included_bfds.push_back (gdb_bfd_ref_ptr::new_reference (includee));
}
\f