mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
some cleanup checker fixes
Fix some bugs pointed out by the cleanup checker. This one just fixes some simple CLI reports, where CLI commands know that their caller will do cleanups. This an older style with few instances, so it is simpler to fix them up than to teach the checker about it. * cli/cli-cmds.c (cd_command, alias_command): Call do_cleanups. * cli/cli-dump.c (restore_binary_file): Call do_cleanups. * interps.c (interpreter_exec_cmd): Call do_cleanups. * source.c (show_substitute_path_command): Call do_cleanups. (unset_substitute_path_command, set_substitute_path_command): Likewise. * symfile.c (load_command): Call do_cleanups.
This commit is contained in:
@@ -1772,6 +1772,8 @@ find_sym_fns (bfd *abfd)
|
||||
static void
|
||||
load_command (char *arg, int from_tty)
|
||||
{
|
||||
struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
|
||||
|
||||
dont_repeat ();
|
||||
|
||||
/* The user might be reloading because the binary has changed. Take
|
||||
@@ -1821,6 +1823,8 @@ load_command (char *arg, int from_tty)
|
||||
/* After re-loading the executable, we don't really know which
|
||||
overlays are mapped any more. */
|
||||
overlay_cache_invalid = 1;
|
||||
|
||||
do_cleanups (cleanup);
|
||||
}
|
||||
|
||||
/* This version of "load" should be usable for any target. Currently
|
||||
|
||||
Reference in New Issue
Block a user