Remove two infrun cleanups

This removes a couple of cleanups from infrun by introducing a couple
of unique_ptr specializations.

gdb/ChangeLog
2018-09-17  Tom Tromey  <tom@tromey.com>

	* inferior.h (struct infcall_suspend_state_deleter): New.
	(infcall_suspend_state_up): New typedef.
	(struct infcall_control_state_deleter): New.
	(infcall_control_state_up): New typedef.
	(make_cleanup_restore_infcall_suspend_state)
	(make_cleanup_restore_infcall_control_state): Don't declare.
	* infcall.c (call_function_by_hand_dummy): Update.
	* infrun.c (do_restore_infcall_suspend_state_cleanup)
	(make_cleanup_restore_infcall_suspend_state): Remove.
	(do_restore_infcall_control_state_cleanup)
	(make_cleanup_restore_infcall_control_state): Remove.
This commit is contained in:
Tom Tromey
2018-06-14 16:01:24 -07:00
parent ee841dd8fe
commit c7c4d3fa80
4 changed files with 55 additions and 55 deletions

View File

@@ -8893,19 +8893,6 @@ restore_infcall_suspend_state (struct infcall_suspend_state *inf_state)
discard_infcall_suspend_state (inf_state);
}
static void
do_restore_infcall_suspend_state_cleanup (void *state)
{
restore_infcall_suspend_state ((struct infcall_suspend_state *) state);
}
struct cleanup *
make_cleanup_restore_infcall_suspend_state
(struct infcall_suspend_state *inf_state)
{
return make_cleanup (do_restore_infcall_suspend_state_cleanup, inf_state);
}
void
discard_infcall_suspend_state (struct infcall_suspend_state *inf_state)
{
@@ -9030,19 +9017,6 @@ restore_infcall_control_state (struct infcall_control_state *inf_status)
delete inf_status;
}
static void
do_restore_infcall_control_state_cleanup (void *sts)
{
restore_infcall_control_state ((struct infcall_control_state *) sts);
}
struct cleanup *
make_cleanup_restore_infcall_control_state
(struct infcall_control_state *inf_status)
{
return make_cleanup (do_restore_infcall_control_state_cleanup, inf_status);
}
void
discard_infcall_control_state (struct infcall_control_state *inf_status)
{