From a7f56d5afff33782446a186cb1519e9416328799 Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Tue, 8 Oct 1996 19:00:38 +0000 Subject: Just some cleanups noticed while working on PR 10760 * dbxread.c (dbx_symfile_read): Call free_pending_blocks rather than poking global variable (which is now static). * hpread.c (hpread_build_psymtabs): Ditto. * os9kread.c (os9k_symfile_read): Ditto. * xcoffread.c (xcoff_initial_scan): Ditto. * buildsym.h (free_pending_blocks): Declare here. (pending_blocks): Remove declaration of global symbol. (free_pendings): Remove declaration of global symbol. (make_blockvector): Declare here. (record_pending_block): Declare here. * dstread.c (make_blockvector): Remove static copy that was old clone of version in buildsym.c. (process_dst_block): Call record_pending_block rather than doing it by hand. (read_dst_symtab): Ditto. * buildsym.c (make_blockvector): Make global rather than static, (record_pending_block): New function, code moved from finish_block. (finish_block): Use record_pending_block. (free_pending_blocks): New function. (really_free_pendings): Call free_pending_blocks. (pending_blocks): Make static instead of global. (free_pendings): Make static instead of global. --- gdb/buildsym.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'gdb/buildsym.h') diff --git a/gdb/buildsym.h b/gdb/buildsym.h index 58529c7..b50f9d8 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -96,10 +96,6 @@ struct pending struct symbol *symbol[PENDINGSIZE]; }; -/* List of free `struct pending' structures for reuse. */ - -EXTERN struct pending *free_pendings; - /* Here are the three lists that symbols are put on. */ EXTERN struct pending *file_symbols; /* static at top level, and types */ @@ -169,8 +165,6 @@ struct pending_block struct block *block; }; -EXTERN struct pending_block *pending_blocks; - struct subfile_stack { @@ -254,6 +248,22 @@ start_symtab PARAMS ((char *, char *, CORE_ADDR)); extern int hashname PARAMS ((char *)); +extern void +free_pending_blocks PARAMS ((void)); + +/* FIXME: Note that this is used only in buildsym.c and dstread.c, + which should be fixed to not need direct access to make_blockvector. */ + +extern struct blockvector * +make_blockvector PARAMS ((struct objfile *)); + +/* FIXME: Note that this is used only in buildsym.c and dstread.c, + which should be fixed to not need direct access to record_pending_block. */ + +extern void +record_pending_block PARAMS ((struct objfile *, struct block *, + struct pending_block *)); + #undef EXTERN #endif /* defined (BUILDSYM_H) */ -- cgit v1.1