aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/read-debug-names.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-12-10 14:16:06 -0700
committerTom Tromey <tom@tromey.com>2024-01-08 18:40:21 -0700
commit8e279fda0f725500c8f84a8b2ed56b0ee8d00ce0 (patch)
tree266a39de85287280db4ad3a9cc77f3eaf3c5b384 /gdb/dwarf2/read-debug-names.c
parent54b815ddb428944a70694e3767a0fadbdd9ca9ea (diff)
downloadfsf-binutils-gdb-8e279fda0f725500c8f84a8b2ed56b0ee8d00ce0.zip
fsf-binutils-gdb-8e279fda0f725500c8f84a8b2ed56b0ee8d00ce0.tar.gz
fsf-binutils-gdb-8e279fda0f725500c8f84a8b2ed56b0ee8d00ce0.tar.bz2
Add deferred_warnings parameter to read_addrmap_from_aranges
When DWARF reading is done in the background, read_addrmap_from_aranges will be called from a worker thread. Because warnings can't be emitted from these threads, this patch adds a new deferred_warnings parameter to the function, letting the caller control exactly how the warnings are emitted.
Diffstat (limited to 'gdb/dwarf2/read-debug-names.c')
-rw-r--r--gdb/dwarf2/read-debug-names.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/dwarf2/read-debug-names.c b/gdb/dwarf2/read-debug-names.c
index e912c2a..0877bf3 100644
--- a/gdb/dwarf2/read-debug-names.c
+++ b/gdb/dwarf2/read-debug-names.c
@@ -153,12 +153,16 @@ create_addrmap_from_aranges (dwarf2_per_objfile *per_objfile,
dwarf2_per_bfd *per_bfd = per_objfile->per_bfd;
addrmap_mutable mutable_map;
+ deferred_warnings warnings;
section->read (per_objfile->objfile);
- if (read_addrmap_from_aranges (per_objfile, section, &mutable_map))
+ if (read_addrmap_from_aranges (per_objfile, section, &mutable_map,
+ &warnings))
per_bfd->index_addrmap
= new (&per_bfd->obstack) addrmap_fixed (&per_bfd->obstack,
&mutable_map);
+
+ warnings.emit ();
}
/* DWARF-5 debug_names reader. */