diff options
-rw-r--r-- | gdb/dwarf2/read.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 11ba01c..66f3ca0 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -8463,8 +8463,14 @@ process_full_comp_unit (dwarf2_cu *cu, enum language pretend_language) per_objfile->set_symtab (cu->per_cu, cust); - /* Push it for inclusion processing later. */ - per_objfile->per_bfd->just_read_cus.push_back (cu->per_cu); +#if CXX_STD_THREAD + { + static std::mutex just_read_cus_lock; + std::lock_guard<std::mutex> guard (just_read_cus_lock); +#endif + /* Push it for inclusion processing later. */ + per_objfile->per_bfd->just_read_cus.push_back (cu->per_cu); + } /* Not needed any more. */ cu->reset_builder (); |