Code cleanup.
	* bfd-target.c (target_bfd_xclose): Remove parameter quitting.
	* bsd-kvm.c (bsd_kvm_close): Likewise.
	* bsd-uthread.c (bsd_uthread_close): Likewise.
	* corelow.c (core_close): Likewise.
	(core_close_cleanup): Remove parameter quitting from a caller.
	* event-top.c (async_disconnect): Likewise.
	* exec.c (exec_close_1): Remove parameter quitting.
	* go32-nat.c (go32_close): Likewise.
	* linux-nat.c (linux_nat_close): Remove parameter quitting.  Remove
	parameter quitting from a caller.
	* mips-linux-nat.c (super_close): Remove parameter quitting from the
	variable.
	(mips_linux_close): Remove parameter quitting.  Remove parameter
	quitting from a caller.
	* monitor.c (monitor_close): Remove parameter quitting.
	* monitor.h (monitor_close): Likewise.
	* record-btrace.c (record_btrace_close): Likewise.
	* record-full.c (record_full_close): Likewise.
	* remote-m32r-sdi.c (m32r_close): Remove parameter quitting and remove
	it also from fprintf_unfiltered.
	* remote-mips.c (mips_close): Remove parameter quitting.
	(mips_detach): Remove parameter quitting from a caller.
	* remote-sim.c (gdbsim_close): Remove parameter quitting.
	(gdbsim_close): Remove duplicate function comment.  Remove parameter
	quitting and remove it also from printf_filtered.
	* remote.c (remote_close): Remove parameter quitting.
	* solib-svr4.c (enable_break): Remove parameter quitting from a caller.
	* target.c (update_current_target): Remove parameter int from to_close
	de_fault.
	(push_target, unpush_target, pop_target): Remove parameter quitting from
	a caller.
	(pop_all_targets_above, pop_all_targets): Remove parameter quitting.
	Remove parameter quitting from a caller.
	(target_preopen): Remove parameter quitting from a caller.
	(target_close): Remove parameter quitting.  Remove parameter quitting
	from a caller two times.  Remove parameter quitting also from
	fprintf_unfiltered.
	* target.h (struct target_ops): Remove parameter quitting and as int
	from fields to_xclose and to_close.
	(extern struct target_ops current_target):
	(target_close, pop_all_targets): Remove parameter quitting.  Update the
	comment.
	(pop_all_targets_above): Remove parameter quitting.
	* top.c (quit_target): Remove parameter quitting from a caller.
	* tracepoint.c (tfile_close): Remove parameter quitting.
	* windows-nat.c (windows_close): Remove parameter quitting.
This commit is contained in:
Jan Kratochvil
2013-03-20 15:46:24 +00:00
parent 33e32ca032
commit 460014f572
24 changed files with 107 additions and 70 deletions

View File

@ -738,7 +738,7 @@ update_current_target (void)
(void (*) (char *, int))
tcomplain);
de_fault (to_close,
(void (*) (int))
(void (*) (void))
target_ignore);
de_fault (to_post_attach,
(void (*) (int))
@ -1015,7 +1015,7 @@ push_target (struct target_ops *t)
(*cur) = (*cur)->beneath;
tmp->beneath = NULL;
target_close (tmp, 0);
target_close (tmp);
}
/* We have removed all targets in our stratum, now add the new one. */
@ -1062,7 +1062,7 @@ unpush_target (struct target_ops *t)
/* Finally close the target. Note we do this after unchaining, so
any target method calls from within the target_close
implementation don't end up in T anymore. */
target_close (t, 0);
target_close (t);
return 1;
}
@ -1070,7 +1070,7 @@ unpush_target (struct target_ops *t)
void
pop_target (void)
{
target_close (target_stack, 0); /* Let it clean up. */
target_close (target_stack); /* Let it clean up. */
if (unpush_target (target_stack) == 1)
return;
@ -1082,11 +1082,11 @@ pop_target (void)
}
void
pop_all_targets_above (enum strata above_stratum, int quitting)
pop_all_targets_above (enum strata above_stratum)
{
while ((int) (current_target.to_stratum) > (int) above_stratum)
{
target_close (target_stack, quitting);
target_close (target_stack);
if (!unpush_target (target_stack))
{
fprintf_unfiltered (gdb_stderr,
@ -1100,9 +1100,9 @@ pop_all_targets_above (enum strata above_stratum, int quitting)
}
void
pop_all_targets (int quitting)
pop_all_targets (void)
{
pop_all_targets_above (dummy_stratum, quitting);
pop_all_targets_above (dummy_stratum);
}
/* Return 1 if T is now pushed in the target stack. Return 0 otherwise. */
@ -2573,7 +2573,7 @@ target_preopen (int from_tty)
it doesn't (which seems like a win for UDI), remove it now. */
/* Leave the exec target, though. The user may be switching from a
live process to a core of the same program. */
pop_all_targets_above (file_stratum, 0);
pop_all_targets_above (file_stratum);
target_pre_inferior (from_tty);
}
@ -3775,15 +3775,15 @@ debug_to_open (char *args, int from_tty)
}
void
target_close (struct target_ops *targ, int quitting)
target_close (struct target_ops *targ)
{
if (targ->to_xclose != NULL)
targ->to_xclose (targ, quitting);
targ->to_xclose (targ);
else if (targ->to_close != NULL)
targ->to_close (quitting);
targ->to_close ();
if (targetdebug)
fprintf_unfiltered (gdb_stdlog, "target_close (%d)\n", quitting);
fprintf_unfiltered (gdb_stdlog, "target_close ()\n");
}
void