diff options
author | Tom de Vries <tdevries@suse.de> | 2022-07-15 12:28:46 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2022-07-21 15:06:39 +0200 |
commit | 9ce66f579aac7337e99098ad92b0c87975add048 (patch) | |
tree | 6326937b8fa9e7ff9fd8debc7252c57a1e4c3a55 | |
parent | 947a1585216b0ff01bde184bccb1231626e86b57 (diff) | |
download | gdb-9ce66f579aac7337e99098ad92b0c87975add048.zip gdb-9ce66f579aac7337e99098ad92b0c87975add048.tar.gz gdb-9ce66f579aac7337e99098ad92b0c87975add048.tar.bz2 |
[gdb/symtab] Use deque instead of queue for per_objfile->queue
Allows us to access all elements at once.
-rw-r--r-- | gdb/dwarf2/read.c | 4 | ||||
-rw-r--r-- | 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 <queue> +#include <deque> #include <unordered_map> #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<std::queue<dwarf2_queue_item>> queue; + gdb::optional<std::deque<dwarf2_queue_item>> queue; private: /* Hold the corresponding compunit_symtab for each CU or TU. This |