diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-05-22 09:02:23 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-05-22 09:02:23 +0000 |
commit | 74b7792f0fcae41f7c7da524527b7261a3fd68c4 (patch) | |
tree | b88a9a20c59780f3b51c4819b6dea5acce3ec446 /gdb/infrun.c | |
parent | 32c092c3fab0ca778242005a793cc4641c3e1b4b (diff) | |
download | gdb-74b7792f0fcae41f7c7da524527b7261a3fd68c4.zip gdb-74b7792f0fcae41f7c7da524527b7261a3fd68c4.tar.gz gdb-74b7792f0fcae41f7c7da524527b7261a3fd68c4.tar.bz2 |
Purge (almost) make_cleanup_func.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 0e84a6d..d607577 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -46,7 +46,7 @@ static void sig_print_info (enum target_signal); static void sig_print_header (void); -static void resume_cleanups (int); +static void resume_cleanups (void *); static int hook_stop_stub (void *); @@ -752,7 +752,7 @@ static int singlestep_breakpoints_inserted_p = 0; /* Things to clean up if we QUIT out of resume (). */ /* ARGSUSED */ static void -resume_cleanups (int arg) +resume_cleanups (void *ignore) { normal_stop (); } @@ -796,8 +796,7 @@ void resume (int step, enum target_signal sig) { int should_resume = 1; - struct cleanup *old_cleanups = make_cleanup ((make_cleanup_func) - resume_cleanups, 0); + struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0); QUIT; #ifdef CANNOT_STEP_BREAKPOINT @@ -4114,6 +4113,18 @@ restore_inferior_status (struct inferior_status *inf_status) free_inferior_status (inf_status); } +static void +do_restore_inferior_status_cleanup (void *sts) +{ + restore_inferior_status (sts); +} + +struct cleanup * +make_cleanup_restore_inferior_status (struct inferior_status *inf_status) +{ + return make_cleanup (do_restore_inferior_status_cleanup, inf_status); +} + void discard_inferior_status (struct inferior_status *inf_status) { |