diff options
Diffstat (limited to 'gdb/dwarf2/cooked-index.h')
-rw-r--r-- | gdb/dwarf2/cooked-index.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h index 7a8216a..dc26956 100644 --- a/gdb/dwarf2/cooked-index.h +++ b/gdb/dwarf2/cooked-index.h @@ -259,10 +259,7 @@ public: void finalize (); /* Wait for this index's finalization to be complete. */ - void wait () const - { - m_future.wait (); - } + void wait (bool allow_quit = true) const; friend class cooked_index; @@ -373,8 +370,10 @@ public: end up writing to freed memory. Waiting for finalization to complete avoids this problem; and the cost seems ignorable because creating and immediately destroying the debug info is a - relatively rare thing to do. */ - wait (); + relatively rare thing to do. Do not allow quitting from this + wait. */ + for (auto &item : m_vector) + item->wait (false); } /* A range over a vector of subranges. */ |