From 9ce66f579aac7337e99098ad92b0c87975add048 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 15 Jul 2022 12:28:46 +0200 Subject: [gdb/symtab] Use deque instead of queue for per_objfile->queue Allows us to access all elements at once. --- gdb/dwarf2/read.c | 4 ++-- gdb/dwarf2/read.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 017711d..e9e98b3 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -7486,7 +7486,7 @@ queue_comp_unit (dwarf2_per_cu_data *per_cu, per_cu->queued = 1; gdb_assert (per_objfile->queue.has_value ()); - per_objfile->queue->emplace (per_cu, per_objfile, pretend_language); + per_objfile->queue->emplace_back (per_cu, per_objfile, pretend_language); } /* If PER_CU is not yet expanded of queued for expansion, add it to the queue. @@ -7617,7 +7617,7 @@ process_queue (dwarf2_per_objfile *per_objfile) } per_cu->queued = 0; - per_objfile->queue->pop (); + per_objfile->queue->pop_front (); } dwarf_read_debug_printf ("Done expanding symtabs of %s.", diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index c2f86a9..3a3ff6c 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -20,7 +20,7 @@ #ifndef DWARF2READ_H #define DWARF2READ_H -#include +#include #include #include "dwarf2/comp-unit-head.h" #include "dwarf2/cooked-index.h" @@ -658,7 +658,7 @@ struct dwarf2_per_objfile dwarf2_cu *sym_cu = nullptr; /* CUs that are queued to be read. */ - gdb::optional> queue; + gdb::optional> queue; private: /* Hold the corresponding compunit_symtab for each CU or TU. This -- cgit v1.1