diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2/read.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 35afa8e..ed01ed7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2021-01-20 Simon Marchi <simon.marchi@polymtl.ca> + PR gdb/26828 + * dwarf2/read.c (maybe_queue_comp_unit): Add assertion. + +2021-01-20 Simon Marchi <simon.marchi@polymtl.ca> + * dwarf2/read.c (follow_die_offset): Add logging. (dwarf2_per_objfile::age_comp_units): Add logging. 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. */ |