]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove reference to dwarf2_per_cu_data::dwarf2_per_objfile in queue_and_load_all_dwo_tus
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:13:59 +0000 (11:13 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:15:56 +0000 (11:15 -0400)
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.

Change-Id: Id4662828ac3c5bc93fe221df3c9bd9a36a8427ad

gdb/ChangeLog
gdb/dwarf2/read.c

index 9a0d68b1124c0f8c2fc5c535e8f1e82e88b0e640..7ab7f6cf989fbb25ff38c723a5c1986e5c6f0d18 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-27  Simon Marchi  <simon.marchi@efficios.com>
+
+       * dwarf2/read.c (queue_and_load_all_dwo_tus): Access per_objfile
+       data through per_cu->cu.
+
 2020-05-27  Simon Marchi  <simon.marchi@efficios.com>
 
        * dwarf2/read.c (lookup_dwo_comp_unit): Change
 2020-05-27  Simon Marchi  <simon.marchi@efficios.com>
 
        * dwarf2/read.c (lookup_dwo_comp_unit): Change
index 5e3ab374289bc7e61ea2d1fa6c3d438961cf5690..4b63b8e8b9bc0000878877e46eb3f51a39ceee73 100644 (file)
@@ -12870,8 +12870,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);
   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 (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);
 
   dwo_unit = per_cu->cu->dwo_unit;
   gdb_assert (dwo_unit != NULL);