From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 2C8BF3858D28; Tue, 12 Apr 2022 15:41:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C8BF3858D28 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Change parameters to write_address_map X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 88a981942d16cbf4a75581aa72744e8d778bcd38 X-Git-Newrev: fca9326e27b7b41847565d7afcd9070144256306 Message-Id: <20220412154127.2C8BF3858D28@sourceware.org> Date: Tue, 12 Apr 2022 15:41:27 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2022 15:41:27 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dfca9326e27b7= b41847565d7afcd9070144256306 commit fca9326e27b7b41847565d7afcd9070144256306 Author: Tom Tromey Date: Thu May 27 16:29:52 2021 -0600 Change parameters to write_address_map =20 To support the removal of partial symtabs from the DWARF index writer, this makes a small change to have write_address_map accept the address map as a parameter, rather than assuming it always comes from the per-BFD object. Diff: --- gdb/dwarf2/index-write.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c index 958fc9bed3b..509dde462e3 100644 --- a/gdb/dwarf2/index-write.c +++ b/gdb/dwarf2/index-write.c @@ -473,13 +473,12 @@ addrmap_index_data::operator() (CORE_ADDR start_addr,= void *obj) in the index file. */ =20 static void -write_address_map (dwarf2_per_bfd *per_bfd, data_buf &addr_vec, +write_address_map (struct addrmap *addrmap, data_buf &addr_vec, cu_index_map &cu_index_htab) { struct addrmap_index_data addrmap_index_data (addr_vec, cu_index_htab); =20 - addrmap_foreach (per_bfd->partial_symtabs->psymtabs_addrmap, - addrmap_index_data); + addrmap_foreach (addrmap, addrmap_index_data); =20 /* It's highly unlikely the last entry (end address =3D 0xff...ff) is valid, but we should still handle it. @@ -1378,7 +1377,8 @@ write_gdbindex (dwarf2_per_objfile *per_objfile, FILE= *out_file, =20 /* Dump the address map. */ data_buf addr_vec; - write_address_map (per_objfile->per_bfd, addr_vec, cu_index_htab); + write_address_map (per_objfile->per_bfd->partial_symtabs->psymtabs_addrm= ap, + addr_vec, cu_index_htab); =20 /* Now that we've processed all symbols we can shrink their cu_indices lists. */