diff options
author | John Gilmore <gnu@cygnus> | 1991-04-13 22:29:36 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-04-13 22:29:36 +0000 |
commit | a6e2b4241e9d830169f32e21997b175523cff377 (patch) | |
tree | 7624d82faab342faf1386c0f46735cb798ea8c94 /gdb/coffread.c | |
parent | 92a29b47d76bc5345917523a0dec412a472d06ef (diff) | |
download | gdb-a6e2b4241e9d830169f32e21997b175523cff377.zip gdb-a6e2b4241e9d830169f32e21997b175523cff377.tar.gz gdb-a6e2b4241e9d830169f32e21997b175523cff377.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/coffread.c')
-rw-r--r-- | gdb/coffread.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index 0e6b2c7..ab94485 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -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; |