diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-02-25 23:12:11 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-12 15:24:50 -0400 |
commit | 30677c82cdacb008da9d1f1b8edad56de9f7f715 (patch) | |
tree | b0fd773e45f24e391f38f6223c33c5701bb46468 | |
parent | 9e575d411d7a7ddfb72786a011788ae22fa5bd01 (diff) | |
download | gdb-30677c82cdacb008da9d1f1b8edad56de9f7f715.zip gdb-30677c82cdacb008da9d1f1b8edad56de9f7f715.tar.gz gdb-30677c82cdacb008da9d1f1b8edad56de9f7f715.tar.bz2 |
Remove reference to dwarf2_per_cu_data::dwarf2_per_objfile in queue_and_load_all_dwo_tus
In this context, we know that per_cu->cu will be set, as there is this
assertion:
gdb_assert (per_cu->cu != NULL)
So in order to remove the dwarf2_per_cu_data::dwarf2_per_objfile
reference in queue_and_load_all_dwo_tus, we can go through per_cu->cu.
This adds a reference to dwarf2_per_cu_data::cu, but it will get removed
eventually, in a subsequent patch.
gdb/ChangeLog:
* dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
data through per_cu->cu.
-rw-r--r-- | gdb/dwarf2/read.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 5dc8a35..7470ace 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -12832,8 +12832,8 @@ queue_and_load_all_dwo_tus (struct dwarf2_per_cu_data *per_cu) struct dwo_file *dwo_file; gdb_assert (!per_cu->is_debug_types); - gdb_assert (get_dwp_file (per_cu->dwarf2_per_objfile) == NULL); gdb_assert (per_cu->cu != NULL); + gdb_assert (get_dwp_file (per_cu->cu->per_objfile) == NULL); dwo_unit = per_cu->cu->dwo_unit; gdb_assert (dwo_unit != NULL); |