+2018-07-20 Tom Tromey <tom@tromey.com>
+
+ * buildsym.c (reset_symtab_globals): Remove.
+ (buildsym_compunit::end_symtab_from_static_block): Update.
+ (buildsym_compunit::augment_type_symtab): Update.
+ (end_symtab_from_static_block): Call free_buildsym_compunit.
+ (augment_type_symtab, end_symtab, end_expandable_symtab):
+ Likewise.
+
2018-07-20 Tom Tromey <tom@tromey.com>
* arch-utils.c: Do not include buildsym.h.
}
}
-/* Reset state after a successful building of a symtab. */
-
-static void
-reset_symtab_globals (void)
-{
- free_buildsym_compunit ();
-}
-
/* Implementation of the first part of end_symtab. It allows modifying
STATIC_BLOCK before it gets finalized by end_symtab_from_static_block.
If the returned value is NULL there is no blockvector created for
else
cu = end_symtab_with_blockvector (static_block, section, expandable);
- reset_symtab_globals ();
-
return cu;
}
dict_add_pending (BLOCK_DICT (block),
m_global_symbols);
}
-
- reset_symtab_globals ();
}
/* Push a context block. Args are an identifying nesting level
struct compunit_symtab *result
= buildsym_compunit->end_symtab_from_static_block (static_block,
section, expandable);
- reset_symtab_globals ();
+ free_buildsym_compunit ();
return result;
}
gdb_assert (buildsym_compunit != nullptr);
struct compunit_symtab *result
= buildsym_compunit->end_symtab (end_addr, section);
- reset_symtab_globals ();
+ free_buildsym_compunit ();
return result;
}
gdb_assert (buildsym_compunit != nullptr);
struct compunit_symtab *result
= buildsym_compunit->end_expandable_symtab (end_addr, section);
- reset_symtab_globals ();
+ free_buildsym_compunit ();
return result;
}
{
gdb_assert (buildsym_compunit != nullptr);
buildsym_compunit->augment_type_symtab ();
- reset_symtab_globals ();
+ free_buildsym_compunit ();
}
struct context_stack *