]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
Make load_cu return the loaded dwarf2_cu
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 27 May 2020 15:14:09 +0000 (11:14 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:19:40 +0000 (11:19 -0400)
commit1b555f17476d99f97f33fb4c648d94f7767bcbd7
tree16823e3579a5051ecafff0bcccdd68757806334e
parent8fc0b21da6d25e0a9fc565a94d2301c2365f2d3c
Make load_cu return the loaded dwarf2_cu

In a subsequent patch, the dwarf2_per_cu_data::cu link will be removed.
dwarf2_cu objects will instead need to be looked up from a per-objfile
map, using the dwarf2_per_cu_data object as the key.

To make it easier for some callers, this patch makes load_cu return the
dwarf2_cu it creates.  If the caller needs to use the created dwarf2_cu,
it will have it available right away, rather than having to do a map
lookup.

At the same time, this allows changing queue_and_load_all_dwo_tus to
take a dwarf2_cu instead of a dwarf2_per_cu_data.

gdb/ChangeLog:

* dwarf2/read.c (load_cu): Return dwarf2_cu.
(dw2_do_instantiate_symtab): Update.
(queue_and_load_all_dwo_tus): Change parameter from
dwarf2_per_cu_data to dwarf2_cu.
(dwarf2_fetch_die_loc_sect_off): Update.
(dwarf2_fetch_constant_bytes): Update.
(dwarf2_fetch_die_type_sect_off): Update.

Change-Id: I8a04c5d1b8cc661b8203f97999258ba8e04e1765
gdb/ChangeLog
gdb/dwarf2/read.c