diff options
author | John Gilmore <gnu@cygnus> | 1992-02-27 16:28:59 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-02-27 16:28:59 +0000 |
commit | cba0d141fb4c565ae5e04b339a95d57123aa46fb (patch) | |
tree | 5b387cd1cf67276bb4c4399124d0901537f5927c /gdb/objfiles.c | |
parent | 5c83e859b98d1d38e0f8744d3feab1b906526bfa (diff) | |
download | gdb-cba0d141fb4c565ae5e04b339a95d57123aa46fb.zip gdb-cba0d141fb4c565ae5e04b339a95d57123aa46fb.tar.gz gdb-cba0d141fb4c565ae5e04b339a95d57123aa46fb.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 14 |
1 files changed, 14 insertions, 0 deletions
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. */ |