From cba0d141fb4c565ae5e04b339a95d57123aa46fb Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Thu, 27 Feb 1992 16:28:59 +0000 Subject: * breakpoint.h (ALL_BREAKPOINTS_SAFE): Add. * breakpoint.c (breakpoint_re_set): Use ALL_BREAKPOINTS_SAFE. * symtab.c (find_pc_symtab): Handle having no objfiles. * infcmd.c: Fix comment. * objfiles.c (free_all_objfiles): Add. * symfile.h (ALL_OBJFILES, ALL_OBJFILES_SAFE): Add. * symfile.c (symbol_file_command): free all objfiles when specifying a new symbol file. (reread_symbols): Stat the file name, don't fstat the descriptor. --- gdb/objfiles.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gdb/objfiles.c') diff --git a/gdb/objfiles.c b/gdb/objfiles.c index a1fb22f..53ac034 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -163,6 +163,20 @@ free_objfile (objfile) (*objfile -> free) (objfile); } + +/* Free all the object files at once. */ + +void +free_all_objfiles () +{ + struct objfile *objfile, *temp; + + ALL_OBJFILES_SAFE (objfile, temp) + { + free_objfile (objfile); + } +} + /* Many places in gdb want to test just to see if we have any partial symbols available. This function returns zero if none are currently available, nonzero otherwise. */ -- cgit v1.1