mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
* coffread.c (end_psymtab): Free named symtabs and psymtabs for
a file, once a new symtab has been read for it.
* symtab.h (GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK): New
defines for the blocks of a blockvector that contain global and
file-static symbols and the first of the smaller scope contours.
* symtab.c (lookup_symbol, find_pc_symtab, find_pc_line,
decode_line_1, make_symbol_completion_list): Use the above.
* coffread.c (end_symtab, patch_opaque_types): Ditto.
This commit is contained in:
@@ -489,7 +489,8 @@ end_symtab ()
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create the two top-level blocks for this file. */
|
||||
/* Create the two top-level blocks for this file (STATIC_BLOCK and
|
||||
GLOBAL_BLOCK). */
|
||||
finish_block (0, &file_symbols, 0, cur_src_start_addr, cur_src_end_addr);
|
||||
finish_block (0, &global_symbols, 0, cur_src_start_addr, cur_src_end_addr);
|
||||
|
||||
@@ -517,6 +518,8 @@ end_symtab ()
|
||||
symtab->coffsyn = last_coffsyn;
|
||||
#endif
|
||||
|
||||
free_named_symtabs (symtab->filename);
|
||||
|
||||
/* Link the new symtab into the list of such. */
|
||||
symtab->next = symtab_list;
|
||||
symtab_list = symtab;
|
||||
@@ -1373,7 +1376,7 @@ patch_opaque_types ()
|
||||
register int i;
|
||||
|
||||
/* Go through the per-file symbols only */
|
||||
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), 1);
|
||||
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
|
||||
for (i = BLOCK_NSYMS (b) - 1; i >= 0; i--)
|
||||
{
|
||||
register struct symbol *real_sym;
|
||||
|
||||
Reference in New Issue
Block a user