]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Do not write the index cache from an index
authorTom Tromey <tom@tromey.com>
Sun, 3 Dec 2023 19:10:14 +0000 (12:10 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 18 Jan 2024 15:20:16 +0000 (08:20 -0700)
commit6e53356b77887974e554ae07f9d76b83cd211700
treeacf2bb649fd6bca725736d1c1f9a02b41a52da0a
parent9fac3e79fdec94b53fffdab6e8605d0ff8bab9d6
Do not write the index cache from an index

The new .debug_names reader will work by creating a cooked index from
.debug_names.  This patch updates cooked_index::maybe_write_index to
avoid writing the index in this case.

However, in order to do this in a clean way, the readers are changed
so that a nullptr result from index_for_writing means "cannot be
done", and then the error message is moved into write_dwarf_index
(where it historically lived).
gdb/dwarf2/cooked-index.c
gdb/dwarf2/index-write.c
gdb/dwarf2/mapped-index.h