aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r--gdb/dwarf2/read.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 30e25ca..309ff83 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -9179,7 +9179,12 @@ maybe_queue_comp_unit (struct dwarf2_cu *dependent_cu,
/* If it's already on the queue, we have nothing to do. */
if (per_cu->queued)
- return 0;
+ {
+ /* Verify the invariant that if a CU is queued for expansion, its DIEs are
+ loaded. */
+ gdb_assert (per_objfile->get_cu (per_cu) != nullptr);
+ return 0;
+ }
/* If the compilation unit is already loaded, just mark it as
used. */