/* See buildsym.h. */
-struct pending **
+std::vector<symbol *> &
get_local_symbols ()
{
gdb_assert (buildsym_compunit != nullptr);
/* See buildsym.h. */
-struct pending **
+std::vector<symbol *> &
get_file_symbols ()
{
gdb_assert (buildsym_compunit != nullptr);
/* See buildsym.h. */
-struct pending **
+std::vector<symbol *> &
get_global_symbols ()
{
gdb_assert (buildsym_compunit != nullptr);
/* Return the local symbol list. */
-extern struct pending **get_local_symbols ();
+extern std::vector<symbol *> &get_local_symbols ();
/* Return the file symbol list. */
-extern struct pending **get_file_symbols ();
+extern std::vector<symbol *> &get_file_symbols ();
/* Return the global symbol list. */
-extern struct pending **get_global_symbols ();
+extern std::vector<symbol *> &get_global_symbols ();
/* Return the current buildsym_compunit. */
nextsub = subfile->next;
delete subfile;
}
-
- struct pending *next, *next1;
-
- for (next = m_file_symbols; next != NULL; next = next1)
- {
- next1 = next->next;
- xfree ((void *) next);
- }
-
- for (next = m_global_symbols; next != NULL; next = next1)
- {
- next1 = next->next;
- xfree ((void *) next);
- }
}
struct macro_table *
/* Add a symbol to one of the lists of symbols. */
void
-add_symbol_to_list (struct symbol *symbol, struct pending **listhead)
+add_symbol_to_list (symbol *symbol, std::vector<struct symbol *> &list)
{
- struct pending *link;
-
/* If this is an alias for another symbol, don't add it. */
if (symbol->linkage_name () && symbol->linkage_name ()[0] == '#')
return;
- /* We keep PENDINGSIZE symbols in each link of the list. If we
- don't have a link with room in it, add a new link. */
- if (*listhead == NULL || (*listhead)->nsyms == PENDINGSIZE)
- {
- link = XNEW (struct pending);
- link->next = *listhead;
- *listhead = link;
- link->nsyms = 0;
- }
-
- (*listhead)->symbol[(*listhead)->nsyms++] = symbol;
+ list.push_back (symbol);
}
/* Record BLOCK on the list of all blocks in the file. Put it after
struct block *
buildsym_compunit::finish_block_internal
(struct symbol *symbol,
- struct pending **listhead,
+ std::vector<struct symbol *> &symbol_list,
struct pending_block *old_blocks,
const struct dynamic_prop *static_link,
CORE_ADDR start, CORE_ADDR end,
bool is_global, bool expandable)
{
struct gdbarch *gdbarch = m_objfile->arch ();
- struct pending *next, *next1;
struct block *block;
struct pending_block *pblock;
struct pending_block *opblock;
if (symbol)
{
block->set_multidict
- (mdict_create_linear (&m_objfile->objfile_obstack, *listhead));
+ (mdict_create_linear (&m_objfile->objfile_obstack, symbol_list));
}
else
{
{
block->set_multidict
(mdict_create_hashed_expandable (m_language));
- mdict_add_pending (block->multidict (), *listhead);
+ mdict_add_pending (block->multidict (), symbol_list);
}
else
{
block->set_multidict
- (mdict_create_hashed (&m_objfile->objfile_obstack, *listhead));
+ (mdict_create_hashed (&m_objfile->objfile_obstack, symbol_list));
}
}
if (static_link != NULL)
objfile_register_static_link (m_objfile, block, static_link);
- /* Now free the links of the list, and empty the list. */
-
- for (next = *listhead; next; next = next1)
- {
- next1 = next->next;
- xfree (next);
- }
- *listhead = NULL;
+ /* Now empty the list. */
+ symbol_list.clear ();
/* Check to be sure that the blocks have an end address that is
greater than starting address. */
const struct dynamic_prop *static_link,
CORE_ADDR start, CORE_ADDR end)
{
- return finish_block_internal (symbol, &m_local_symbols,
+ return finish_block_internal (symbol, m_local_symbols,
old_blocks, static_link, start, end, false,
false);
}
if (!required
&& m_pending_blocks == NULL
- && m_file_symbols == NULL
- && m_global_symbols == NULL
+ && m_file_symbols.empty ()
+ && m_global_symbols.empty ()
&& !m_have_line_numbers
&& m_pending_macros == NULL
&& m_global_using_directives == NULL)
else
{
/* Define the STATIC_BLOCK. */
- return finish_block_internal (NULL, get_file_symbols (), NULL, NULL,
+ return finish_block_internal (NULL, m_file_symbols, NULL, NULL,
m_last_source_start_addr,
end_addr, false, expandable);
}
end_addr = static_block->end ();
/* Create the GLOBAL_BLOCK and build the blockvector. */
- finish_block_internal (NULL, get_global_symbols (), NULL, NULL,
+ finish_block_internal (NULL, m_global_symbols, NULL, NULL,
m_last_source_start_addr, end_addr,
true, expandable);
blockvector_up blockvector = make_blockvector ();
don't have one. */
static void
-set_missing_symtab (struct pending *pending_list,
- struct compunit_symtab *cu)
+set_missing_symtab (const std::vector<symbol *> &symbols, compunit_symtab *cu)
{
- struct pending *pending;
- int i;
-
- for (pending = pending_list; pending != NULL; pending = pending->next)
- {
- for (i = 0; i < pending->nsyms; ++i)
- {
- if (pending->symbol[i]->symtab () == NULL)
- pending->symbol[i]->set_symtab (cu->primary_filetab ());
- }
- }
+ for (symbol *sym : symbols)
+ if (sym->symtab () == nullptr)
+ sym->set_symtab (cu->primary_filetab ());
}
/* Same as end_compunit_symtab, but for the case where we're adding more symbols
if (m_have_line_numbers)
complaint (_("Line numbers recorded in a type symtab"));
- if (m_file_symbols != NULL)
+ if (!m_file_symbols.empty ())
{
struct block *block = blockvector->static_block ();
mdict_add_pending (block->multidict (), m_file_symbols);
}
- if (m_global_symbols != NULL)
+ if (!m_global_symbols.empty ())
{
struct block *block = blockvector->global_block ();
buildsym_compunit::push_context (int desc, CORE_ADDR valu)
{
context_stack &ctx
- = m_context_stack.emplace_back (m_local_symbols, m_local_using_directives,
+ = m_context_stack.emplace_back (std::move (m_local_symbols),
+ m_local_using_directives,
m_pending_blocks, valu, desc);
- m_local_symbols = nullptr;
m_local_using_directives = nullptr;
return ctx;
using subfile_up = std::unique_ptr<subfile>;
-/* Record the symbols defined for each context in a list. We don't
- create a struct block for the context until we know how long to
- make it. */
-
-#define PENDINGSIZE 100
-
-struct pending
- {
- struct pending *next;
- int nsyms;
- struct symbol *symbol[PENDINGSIZE];
- };
-
/* Stack representing unclosed lexical contexts (that will become
blocks, eventually). */
struct context_stack
{
- context_stack (pending *locals, using_direct *local_using_directives,
+ context_stack (std::vector<symbol *> locals, using_direct *local_using_directives,
pending_block *old_blocks, CORE_ADDR start_addr, int depth)
- : locals (locals),
+ : locals (std::move (locals)),
local_using_directives (local_using_directives),
old_blocks (old_blocks),
start_addr (start_addr),
{}
/* Outer locals at the time we entered. */
- pending *locals;
+ std::vector<symbol *> locals;
/* Pending using directives at the time we entered. */
using_direct *local_using_directives;
return m_current_subfile;
}
- struct pending **get_local_symbols ()
+ std::vector<symbol *> &get_local_symbols ()
{
- return &m_local_symbols;
+ return m_local_symbols;
}
- struct pending **get_file_symbols ()
+ std::vector<symbol *> &get_file_symbols ()
{
- return &m_file_symbols;
+ return m_file_symbols;
}
- struct pending **get_global_symbols ()
+ std::vector<symbol *> &get_global_symbols ()
{
- return &m_global_symbols;
+ return m_global_symbols;
}
void record_debugformat (const char *format)
void record_pending_block (struct block *block, struct pending_block *opblock);
struct block *finish_block_internal (struct symbol *symbol,
- struct pending **listhead,
+ std::vector<struct symbol *> &symbol_list,
struct pending_block *old_blocks,
const struct dynamic_prop *static_link,
CORE_ADDR start, CORE_ADDR end,
struct pending_block *m_pending_blocks = nullptr;
/* Pending static symbols and types at the top level. */
- struct pending *m_file_symbols = nullptr;
+ std::vector<symbol *> m_file_symbols;
/* Pending global functions and variables. */
- struct pending *m_global_symbols = nullptr;
+ std::vector<symbol *> m_global_symbols;
/* Pending symbols that are local to the lexical context. */
- struct pending *m_local_symbols = nullptr;
+ std::vector<symbol *> m_local_symbols;
};
using buildsym_compunit_up = std::unique_ptr<buildsym_compunit>;
-extern void add_symbol_to_list (struct symbol *symbol,
- struct pending **listhead);
+extern void add_symbol_to_list (symbol *symbol,
+ std::vector<struct symbol *> &list);
#endif /* GDB_BUILDSYM_H */
symnum);
break;
}
- if (*get_local_symbols () && !outermost_context_p ())
+ if (!get_local_symbols ().empty () && !outermost_context_p ())
{
tmpaddr = cs->c_value + objfile->text_section_offset ();
/* Make a block for the local symbols within. */
cstk.start_addr, tmpaddr);
}
/* Now pop locals of block just finished. */
- *get_local_symbols () = cstk.locals;
+ get_local_symbols () = std::move (cstk.locals);
}
break;
struct type *type;
int nsyms = 0;
int done = 0;
- struct pending **symlist;
+ std::vector<symbol *> *symlist;
struct coff_symbol member_sym;
struct coff_symbol *ms = &member_sym;
struct internal_syment sub_sym;
union internal_auxent sub_aux;
- struct pending *osyms, *syms;
- int o_nsyms;
- int n;
char *name;
int unsigned_enum = 1;
type = coff_alloc_type (index);
if (within_function)
- symlist = get_local_symbols ();
+ symlist = &get_local_symbols ();
else
- symlist = get_file_symbols ();
- osyms = *symlist;
- o_nsyms = osyms ? osyms->nsyms : 0;
+ symlist = &get_file_symbols ();
+
+ size_t o_nsyms = symlist->size ();
while (!done && symnum < lastsym && symnum < nlist_nsyms_global)
{
sym->set_loc_class_index (LOC_CONST);
sym->set_domain (VAR_DOMAIN);
sym->set_value_longest (ms->c_value);
- add_symbol_to_list (sym, symlist);
+ add_symbol_to_list (sym, *symlist);
nsyms++;
break;
/* Find the symbols for the values and put them into the type.
The symbols can be found in the symlist that we put them on
- to cause them to be defined. osyms contains the old value
- of that symlist; everything up to there was defined by us. */
+ to cause them to be defined. o_nsyms is the original size of
+ that symlist; everything from there to the end was defined by us. */
/* Note that we preserve the order of the enum constants, so
that in something like "enum {FOO, LAST_THING=FOO}" we print
FOO, not LAST_THING. */
- for (syms = *symlist, n = 0; syms; syms = syms->next)
+ for (size_t i = o_nsyms, n = 0; i < symlist->size (); i++, n++)
{
- int j = 0;
-
- if (syms == osyms)
- j = o_nsyms;
- for (; j < syms->nsyms; j++, n++)
- {
- struct symbol *xsym = syms->symbol[j];
-
- xsym->set_type (type);
- type->field (n).set_name (xsym->linkage_name ());
- type->field (n).set_loc_enumval (xsym->value_longest ());
- if (xsym->value_longest () < 0)
- unsigned_enum = 0;
- type->field (n).set_bitsize (0);
- }
- if (syms == osyms)
- break;
+ symbol *xsym = (*symlist)[i];
+
+ xsym->set_type (type);
+ type->field (n).set_name (xsym->linkage_name ());
+ type->field (n).set_loc_enumval (xsym->value_longest ());
+ if (xsym->value_longest () < 0)
+ unsigned_enum = 0;
+ type->field (n).set_bitsize (0);
}
if (unsigned_enum)
/* A helper function to collate symbols on the pending list by language. */
static gdb::unordered_map<enum language, std::vector<symbol *>>
-collate_pending_symbols_by_language (const struct pending *symbol_list)
+collate_pending_symbols_by_language (const std::vector<symbol *> &symbol_list)
{
gdb::unordered_map<enum language, std::vector<symbol *>> nsyms;
- for (const pending *list_counter = symbol_list;
- list_counter != nullptr; list_counter = list_counter->next)
- {
- for (int i = list_counter->nsyms - 1; i >= 0; --i)
- {
- enum language language = list_counter->symbol[i]->language ();
- nsyms[language].push_back (list_counter->symbol[i]);
- }
- }
+ for (auto it = symbol_list.rbegin (); it != symbol_list.rend (); ++it)
+ nsyms[(*it)->language ()].push_back (*it);
return nsyms;
}
struct multidictionary *
mdict_create_hashed (struct obstack *obstack,
- const struct pending *symbol_list)
+ const std::vector<symbol *> &symbol_list)
{
struct multidictionary *retval
= XOBNEW (obstack, struct multidictionary);
struct multidictionary *
mdict_create_linear (struct obstack *obstack,
- const struct pending *symbol_list)
+ const std::vector<symbol *> &symbol_list)
{
struct multidictionary *retval
= XOBNEW (obstack, struct multidictionary);
void
mdict_add_pending (struct multidictionary *mdict,
- const struct pending *symbol_list)
+ const std::vector<symbol *> &symbol_list)
{
gdb::unordered_map<enum language, std::vector<symbol *>> nsyms
= collate_pending_symbols_by_language (symbol_list);
struct symbol;
struct obstack;
-struct pending;
struct language_defn;
/* The creation functions for various implementations of
extern struct multidictionary *
mdict_create_hashed (struct obstack *obstack,
- const struct pending *symbol_list);
+ const std::vector<struct symbol *> &symbol_list);
/* Create a multi-language dictionary of symbols, implemented
via a hashtable that grows as necessary. The initial dictionary of
extern struct multidictionary *
mdict_create_linear (struct obstack *obstack,
- const struct pending *symbol_list);
+ const std::vector<struct symbol *> &symbol_list);
/* Create a multi-language dictionary of symbols, implemented
via an array that grows as necessary. The multidictionary initially
/* Utility to add a list of symbols to a multidictionary. */
extern void mdict_add_pending (struct multidictionary *mdict,
- const struct pending *symbol_list);
+ const std::vector<struct symbol *> &symbol_list);
/* A type containing data that is used when iterating over all symbols
in a dictionary. Don't ever look at its innards; this type would
lang (),
low_pc);
- list_in_scope = get_builder ()->get_file_symbols ();
+ list_in_scope = &get_builder ()->get_file_symbols ();
/* DWARF versions are restricted to [2, 5], thanks to the check in
read_comp_unit_head. */
first local scope, and all other local scopes as nested local
scopes, and worked fine. Check to see if we really need to
distinguish these in buildsym.c. */
- struct pending **list_in_scope = nullptr;
+ std::vector<symbol *> *list_in_scope = nullptr;
/* Storage for things with the same lifetime as this read-in
compilation unit. */
fixup_go_packaging (struct dwarf2_cu *cu)
{
gdb::unique_xmalloc_ptr<char> package_name;
- struct pending *list;
- int i;
- for (list = *cu->get_builder ()->get_global_symbols ();
- list != NULL;
- list = list->next)
- {
- for (i = 0; i < list->nsyms; ++i)
- {
- struct symbol *sym = list->symbol[i];
+ for (symbol *sym : cu->get_builder ()->get_global_symbols ())
+ if (sym->language () == language_go && sym->loc_class () == LOC_BLOCK)
+ {
+ gdb::unique_xmalloc_ptr<char> this_package_name
+ = go_symbol_package_name (sym);
- if (sym->language () == language_go
- && sym->loc_class () == LOC_BLOCK)
- {
- gdb::unique_xmalloc_ptr<char> this_package_name
- = go_symbol_package_name (sym);
+ if (this_package_name == nullptr)
+ continue;
- if (this_package_name == NULL)
- continue;
- if (package_name == NULL)
- package_name = std::move (this_package_name);
- else
- {
- struct objfile *objfile = cu->per_objfile->objfile;
- if (strcmp (package_name.get (), this_package_name.get ()) != 0)
- complaint (_("Symtab %s has objects from two different Go packages: %s and %s"),
- (sym->symtab () != NULL
- ? symtab_to_filename_for_display
- (sym->symtab ())
- : objfile_name (objfile)),
- this_package_name.get (), package_name.get ());
- }
- }
- }
- }
+ if (package_name == nullptr)
+ package_name = std::move (this_package_name);
+ else
+ {
+ objfile *objfile = cu->per_objfile->objfile;
+
+ if (strcmp (package_name.get (), this_package_name.get ()) != 0)
+ complaint (_("Symtab %s has objects from two different Go "
+ "packages: %s and %s"),
+ (sym->symtab () != NULL
+ ? symtab_to_filename_for_display (sym->symtab ())
+ : objfile_name (objfile)),
+ this_package_name.get (), package_name.get ());
+ }
+ }
if (package_name != NULL)
{
cust->dirname (),
cust->language (),
0, cust);
- list_in_scope = get_builder ()->get_file_symbols ();
+ list_in_scope = &get_builder ()->get_file_symbols ();
}
return;
}
cust->dirname (),
cust->language (),
0, cust);
- list_in_scope = get_builder ()->get_file_symbols ();
+ list_in_scope = &get_builder ()->get_file_symbols ();
auto &file_names = line_header->file_names ();
for (i = 0; i < file_names.size (); ++i)
/* We're inheriting ORIGIN's children into the scope we'd put DIE's
symbols in. */
- struct pending **origin_previous_list_in_scope = origin_cu->list_in_scope;
+ std::vector<symbol *> *origin_previous_list_in_scope
+ = origin_cu->list_in_scope;
origin_cu->list_in_scope = cu->list_in_scope;
if (die->tag != origin_die->tag
cu->addr_type ());
}
- cu->list_in_scope = cu->get_builder ()->get_local_symbols ();
+ cu->list_in_scope = &cu->get_builder ()->get_local_symbols ();
for (die_info *child_die : die->children ())
{
a function declares a class that has methods). This means that
when we finish processing a function scope, we may need to go
back to building a containing block's symbol lists. */
- *cu->get_builder ()->get_local_symbols () = cstk.locals;
+ cu->get_builder ()->get_local_symbols () = std::move (cstk.locals);
cu->get_builder ()->set_local_using_directives (cstk.local_using_directives);
/* If we've finished processing a top-level function, subsequent
symbols go in the file symbol list. */
if (cu->get_builder ()->outermost_context_p ())
- cu->list_in_scope = cu->get_builder ()->get_file_symbols ();
+ cu->list_in_scope = &cu->get_builder ()->get_file_symbols ();
}
/* Process all the DIES contained within a lexical block scope. Start
inherit_abstract_dies (die, cu);
struct context_stack cstk = cu->get_builder ()->pop_context ();
- if (*cu->get_builder ()->get_local_symbols () != NULL
+ if (!cu->get_builder ()->get_local_symbols ().empty ()
|| (*cu->get_builder ()->get_local_using_directives ()) != NULL)
{
struct block *block
to do. */
dwarf2_record_block_ranges (die, block, cu);
}
- *cu->get_builder ()->get_local_symbols () = cstk.locals;
+ cu->get_builder ()->get_local_symbols () = std::move (cstk.locals);
cu->get_builder ()->set_local_using_directives (cstk.local_using_directives);
}
static void
add_ada_export_symbol (struct symbol *orig, const char *new_name,
const char *orig_name, struct dwarf2_cu *cu,
- struct pending **list_to_add)
+ std::vector<symbol *> &list_to_add)
{
struct symbol *copy
= new (&cu->per_objfile->objfile->objfile_obstack) symbol (*orig);
const char *name;
struct attribute *attr = NULL;
struct attribute *attr2 = NULL;
- struct pending **list_to_add = NULL;
+ std::vector<symbol *> *list_to_add = nullptr;
int inlined_func = (die->tag == DW_TAG_inlined_subroutine);
belongs to. */
attr2 = dwarf2_attr (die->parent, DW_AT_external, cu);
if (attr2 != nullptr && attr2->as_boolean ())
- list_to_add = cu->get_builder ()->get_global_symbols ();
+ list_to_add = &cu->get_builder ()->get_global_symbols ();
else
list_to_add = cu->list_in_scope;
break;
to be able to access them globally. For instance, we want
to be able to break on a nested subprogram without having
to specify the context. */
- list_to_add = cu->get_builder ()->get_global_symbols ();
+ list_to_add = &cu->get_builder ()->get_global_symbols ();
}
else
{
name, then create a second symbol that refers
back to it. */
add_ada_export_symbol (sym, linkagename, physname, cu,
- list_to_add);
+ *list_to_add);
}
}
break;
if (!suppress_add)
{
if (attr2 != nullptr && attr2->as_boolean ())
- list_to_add = cu->get_builder ()->get_global_symbols ();
+ list_to_add = &cu->get_builder ()->get_global_symbols ();
else
list_to_add = cu->list_in_scope;
}
but it may be block-scoped. */
list_to_add
= ((cu->list_in_scope
- == cu->get_builder ()->get_file_symbols ())
- ? cu->get_builder ()->get_global_symbols ()
+ == &cu->get_builder ()->get_file_symbols ())
+ ? &cu->get_builder ()->get_global_symbols ()
: cu->list_in_scope);
}
else
be seen here, because it will not have a location
and so will be handled below. */
add_ada_export_symbol (sym, physname, linkagename, cu,
- list_to_add);
+ *list_to_add);
}
}
else
sym->set_linkage_name (physname);
list_to_add
= ((cu->list_in_scope
- == cu->get_builder ()->get_file_symbols ())
- ? cu->get_builder ()->get_global_symbols ()
+ == &cu->get_builder ()->get_file_symbols ())
+ ? &cu->get_builder ()->get_global_symbols ()
: cu->list_in_scope);
SYMBOL_LOCATION_BATON (sym) = (void *) linkagename;
sym->set_loc_class_index (ada_imported_index);
may be block-scoped. */
list_to_add
= ((cu->list_in_scope
- == cu->get_builder ()->get_file_symbols ())
- ? cu->get_builder ()->get_global_symbols ()
+ == &cu->get_builder ()->get_file_symbols ())
+ ? &cu->get_builder ()->get_global_symbols ()
: cu->list_in_scope);
sym->set_loc_class_index (LOC_UNRESOLVED);
{
buildsym_compunit *builder = cu->get_builder ();
list_to_add
- = (cu->list_in_scope == builder->get_file_symbols ()
- && cu->lang () == language_cplus
- ? builder->get_global_symbols ()
+ = ((cu->list_in_scope == &builder->get_file_symbols ()
+ && cu->lang () == language_cplus)
+ ? &builder->get_global_symbols ()
: cu->list_in_scope);
/* The semantics of C++ state that "struct foo {
DW_TAG_class_type, etc. block. */
list_to_add
- = (cu->list_in_scope == cu->get_builder ()->get_file_symbols ()
- && cu->lang () == language_cplus
- ? cu->get_builder ()->get_global_symbols ()
+ = ((cu->list_in_scope == &cu->get_builder ()->get_file_symbols ()
+ && cu->lang () == language_cplus)
+ ? &cu->get_builder ()->get_global_symbols ()
: cu->list_in_scope);
break;
case DW_TAG_imported_declaration:
case DW_TAG_namespace:
sym->set_domain (TYPE_DOMAIN);
sym->set_loc_class_index (LOC_TYPEDEF);
- list_to_add = cu->get_builder ()->get_global_symbols ();
+ list_to_add = &cu->get_builder ()->get_global_symbols ();
break;
case DW_TAG_module:
sym->set_loc_class_index (LOC_TYPEDEF);
sym->set_domain (MODULE_DOMAIN);
- list_to_add = cu->get_builder ()->get_global_symbols ();
+ list_to_add = &cu->get_builder ()->get_global_symbols ();
break;
case DW_TAG_common_block:
sym->set_loc_class_index (LOC_COMMON_BLOCK);
}
if (list_to_add != NULL)
- add_symbol_to_list (sym, list_to_add);
+ add_symbol_to_list (sym, *list_to_add);
/* For the benefit of old versions of GCC, check for anonymous
namespaces based on the demangled name. */
struct type *block_type = builtin_type (objfile->arch ())->builtin_void;
new_block->set_multidict
- (mdict_create_linear (&objfile->objfile_obstack, NULL));
+ (mdict_create_linear (&objfile->objfile_obstack, {}));
/* The address range. */
new_block->set_start (gdb_block_iter.begin);
new_block->set_end (gdb_block_iter.end);
new_block = new (&objfile->objfile_obstack) block;
new_block->set_multidict
- (mdict_create_linear (&objfile->objfile_obstack, NULL));
+ (mdict_create_linear (&objfile->objfile_obstack, {}));
new_block->set_superblock (block_iter);
block_iter = new_block;