diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c index 7e743891aed..36ef5e1cc5a 100644 --- a/gdb/gdb_bfd.c +++ b/gdb/gdb_bfd.c @@ -288,14 +288,13 @@ mem_bfd_iovec_stat (struct bfd *abfd, void *stream, struct stat *sb) gdb_bfd_ref_ptr gdb_bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size, - const char *target, - const char *filename) + const char *target) { struct target_buffer *buffer = XNEW (struct target_buffer); buffer->base = addr; buffer->size = size; - return gdb_bfd_openr_iovec (filename ? filename : "", target, + return gdb_bfd_openr_iovec ("", target, mem_bfd_iovec_open, buffer, mem_bfd_iovec_pread, diff --git a/gdb/gdb_bfd.h b/gdb/gdb_bfd.h index 86f7be85f20..6ea16ddc735 100644 --- a/gdb/gdb_bfd.h +++ b/gdb/gdb_bfd.h @@ -201,11 +201,12 @@ int gdb_bfd_requires_relocations (bfd *abfd); bool gdb_bfd_get_full_section_contents (bfd *abfd, asection *section, gdb::byte_vector *contents); -/* Create and initialize a BFD handle from a target in-memory range. */ +/* Create and initialize a BFD handle from a target in-memory range. The + BFD starts at ADDR and is SIZE bytes long. TARGET is the BFD target + name as used in bfd_find_target. */ gdb_bfd_ref_ptr gdb_bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size, - const char *target, - const char *filename = nullptr); + const char *target); /* Range adapter for a BFD's sections.