From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 963053858D37; Mon, 10 Oct 2022 12:10:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 963053858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665403818; bh=T5xUy8jIQIHW2Smr3Q7ArS6TGc4K1fEwM79DgqqIoIA=; h=From:To:Subject:Date:From; b=MsGR0PgkFrmdl3npJAG3Dn1UoPf+ns/Bv7d1Kuzw51rg4AuYUggbGt7KSiKC8qwmR OExCYAFWQAMsIq+OVquXujGL0KsX/gHc2mHGVGPIxw84JicMGrv0ohvoUC2xwLSofo Y/yMu/3LlpGvpPF6yMt8/hgWle+JNm8l1YEdX2o0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: remove filename arg from gdb_bfd_open_from_target_memory X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: e4014689b9a1b9aa0dde8f8a358401774566fe8b X-Git-Newrev: 322dd71cbffdd681f3c94ad28b625f71ea9369f8 Message-Id: <20221010121018.963053858D37@sourceware.org> Date: Mon, 10 Oct 2022 12:10:18 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D322dd71cbffd= d681f3c94ad28b625f71ea9369f8 commit 322dd71cbffdd681f3c94ad28b625f71ea9369f8 Author: Andrew Burgess Date: Wed Oct 5 15:25:59 2022 +0100 gdb: remove filename arg from gdb_bfd_open_from_target_memory =20 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. =20 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. =20 This commit removes the filename argument. =20 There should be no user visible changes after this commit. Diff: --- gdb/gdb_bfd.c | 5 ++--- gdb/gdb_bfd.h | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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, s= truct stat *sb) =20 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 =3D XNEW (struct target_buffer); =20 buffer->base =3D addr; buffer->size =3D 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); =20 -/* 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. */ =20 gdb_bfd_ref_ptr gdb_bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST = size, - const char *target, - const char *filename =3D nullptr); + const char *target); =20 /* Range adapter for a BFD's sections.