aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/objfiles.h4
-rw-r--r--gdb/symmisc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index a35aafb..7803ebb 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -167,13 +167,13 @@ struct entry_info
struct objstats
{
/* Number of full symbols read. */
- int n_syms = 0;
+ std::atomic<int> n_syms {0};
/* Number of ".stabs" read (if applicable). */
int n_stabs = 0;
/* Number of types. */
- int n_types = 0;
+ std::atomic<int> n_types {0};
/* Size of stringtable, (if applicable). */
int sz_strtab = 0;
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index e1d6b20..ad49245 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -66,10 +66,10 @@ print_objfile_statistics (void)
objfile->per_bfd->n_minsyms);
if (OBJSTAT (objfile, n_syms) > 0)
gdb_printf (_(" Number of \"full\" symbols read: %d\n"),
- OBJSTAT (objfile, n_syms));
+ OBJSTAT (objfile, n_syms).load ());
if (OBJSTAT (objfile, n_types) > 0)
gdb_printf (_(" Number of \"types\" defined: %d\n"),
- OBJSTAT (objfile, n_types));
+ OBJSTAT (objfile, n_types).load ());
i = linetables = 0;
for (compunit_symtab *cu : objfile->compunits ())