gdb: remove filename arg from gdb_bfd_open_from_target_memory

The filename argument to gdb_bfd_open_from_target_memory was never
used; this argument had a default value of nullptr, and the only call
to this function, in jit.c, relied on the default value.

In the next commit I'm going to make some changes to the
gdb_bfd_open_from_target_memory function, and, though I could take
account of a filename parameter, it seems pointless to maintain an
unused argument.

This commit removes the filename argument.

There should be no user visible changes after this commit.
This commit is contained in:
Andrew Burgess
2022-10-05 15:25:59 +01:00
parent e4014689b9
commit 322dd71cbf
2 changed files with 6 additions and 6 deletions

View File

@@ -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 : "<in-memory>", target,
return gdb_bfd_openr_iovec ("<in-memory>", target,
mem_bfd_iovec_open,
buffer,
mem_bfd_iovec_pread,