public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Change parameters to write_address_map
@ 2022-04-12 15:41 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-04-12 15:41 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fca9326e27b7b41847565d7afcd9070144256306
commit fca9326e27b7b41847565d7afcd9070144256306
Author: Tom Tromey <tom@tromey.com>
Date: Thu May 27 16:29:52 2021 -0600
Change parameters to write_address_map
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. */
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);
- addrmap_foreach (per_bfd->partial_symtabs->psymtabs_addrmap,
- addrmap_index_data);
+ addrmap_foreach (addrmap, addrmap_index_data);
/* It's highly unlikely the last entry (end address = 0xff...ff)
is valid, but we should still handle it.
@@ -1378,7 +1377,8 @@ write_gdbindex (dwarf2_per_objfile *per_objfile, FILE *out_file,
/* 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_addrmap,
+ addr_vec, cu_index_htab);
/* Now that we've processed all symbols we can shrink their cu_indices
lists. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-12 15:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 15:41 [binutils-gdb] Change parameters to write_address_map Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).