forked from Imagelibrary/binutils-gdb
Remove make_cleanup_defer_target_commit_resume
This removes make_cleanup_defer_target_commit_resume in favor of using scoped_restore. gdb/ChangeLog 2017-09-29 Tom Tromey <tom@tromey.com> * target.h (make_scoped_defer_target_commit_resume): Update. * target.c (make_scoped_defer_target_commit_resume): Rename from make_cleanup_defer_target_commit_resume. Return a scoped_restore. * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2017-09-29 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* target.h (make_scoped_defer_target_commit_resume): Update.
|
||||
* target.c (make_scoped_defer_target_commit_resume): Rename from
|
||||
make_cleanup_defer_target_commit_resume. Return a
|
||||
scoped_restore.
|
||||
* infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
|
||||
|
||||
2017-09-29 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* main.c (captured_main_1): Remove unused declaration.
|
||||
|
||||
@@ -2990,7 +2990,6 @@ proceed (CORE_ADDR addr, enum gdb_signal siggnal)
|
||||
struct execution_control_state ecss;
|
||||
struct execution_control_state *ecs = &ecss;
|
||||
struct cleanup *old_chain;
|
||||
struct cleanup *defer_resume_cleanup;
|
||||
int started;
|
||||
|
||||
/* If we're stopped at a fork/vfork, follow the branch set by the
|
||||
@@ -3132,7 +3131,8 @@ proceed (CORE_ADDR addr, enum gdb_signal siggnal)
|
||||
until the target stops again. */
|
||||
tp->prev_pc = regcache_read_pc (regcache);
|
||||
|
||||
defer_resume_cleanup = make_cleanup_defer_target_commit_resume ();
|
||||
{
|
||||
scoped_restore save_defer_tc = make_scoped_defer_target_commit_resume ();
|
||||
|
||||
started = start_step_over ();
|
||||
|
||||
@@ -3197,8 +3197,8 @@ proceed (CORE_ADDR addr, enum gdb_signal siggnal)
|
||||
if (!ecs->wait_some_more)
|
||||
error (_("Command aborted."));
|
||||
}
|
||||
}
|
||||
|
||||
do_cleanups (defer_resume_cleanup);
|
||||
target_commit_resume ();
|
||||
|
||||
discard_cleanups (old_chain);
|
||||
|
||||
10
gdb/target.c
10
gdb/target.c
@@ -2285,14 +2285,10 @@ target_commit_resume (void)
|
||||
|
||||
/* See target.h. */
|
||||
|
||||
struct cleanup *
|
||||
make_cleanup_defer_target_commit_resume (void)
|
||||
scoped_restore_tmpl<int>
|
||||
make_scoped_defer_target_commit_resume ()
|
||||
{
|
||||
struct cleanup *old_chain;
|
||||
|
||||
old_chain = make_cleanup_restore_integer (&defer_target_commit_resume);
|
||||
defer_target_commit_resume = 1;
|
||||
return old_chain;
|
||||
return make_scoped_restore (&defer_target_commit_resume, 1);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -1376,10 +1376,10 @@ extern void target_resume (ptid_t ptid, int step, enum gdb_signal signal);
|
||||
coalesce multiple resumption requests in a single vCont packet. */
|
||||
extern void target_commit_resume ();
|
||||
|
||||
/* Setup to defer target_commit_resume calls, and return a cleanup
|
||||
that reactivates target_commit_resume, if it was previously
|
||||
/* Setup to defer target_commit_resume calls, and reactivate
|
||||
target_commit_resume on destruction, if it was previously
|
||||
active. */
|
||||
struct cleanup *make_cleanup_defer_target_commit_resume ();
|
||||
extern scoped_restore_tmpl<int> make_scoped_defer_target_commit_resume ();
|
||||
|
||||
/* For target_read_memory see target/target.h. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user