public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Remove reference to dwarf2_per_cu_data::dwarf2_per_objfile in queue_and_load_all_dwo_tus
@ 2020-05-27 15:51 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2020-05-27 15:51 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=64874a40306f556c290c8829f42526443db0f9e9

commit 64874a40306f556c290c8829f42526443db0f9e9
Author: Simon Marchi <simon.marchi@efficios.com>
Date:   Wed May 27 11:13:59 2020 -0400

    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.
    
    Change-Id: Id4662828ac3c5bc93fe221df3c9bd9a36a8427ad

Diff:
---
 gdb/ChangeLog     | 5 +++++
 gdb/dwarf2/read.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9a0d68b1124..7ab7f6cf989 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 5e3ab374289..4b63b8e8b9b 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -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);
-  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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-27 15:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 15:51 [binutils-gdb] Remove reference to dwarf2_per_cu_data::dwarf2_per_objfile in queue_and_load_all_dwo_tus Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).