Re: [PATCH v3 3/5] gdb: move commit_resume to process_stratum_target

Pedro Alves
2021-01-09T20:29:26Z

On 08/01/21 04:17, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@efficios.com>
>
> The following patch will change the commit_resume target method to
> something stateful. Because it would be difficult to track a state
> replicated in the various targets of a target stack, and since for the
> foreseeable future, only process stratum targets are going to use this
> concept, this patch makes the commit resume concept specific to process
> stratum targets.
>
> So, move the method to process_stratum_target, and move helper functions
> to process-stratum-target.h.
>
> gdb/ChangeLog:
>
> * target.h (struct target_ops) <commit_resume>: New.
> (target_commit_resume): Remove.
> (make_scoped_defer_target_commit_resume): Remove.
> * target.c (defer_target_commit_resume): Remove.
> (target_commit_resume): Remove.
> (make_scoped_defer_target_commit_resume): Remove.
> * process-stratum-target.h (class process_stratum_target)
> <commit_resume>: New.
> (maybe_commit_resume_all_process_targets): New.
> (make_scoped_defer_process_target_commit_resume): New.
> * process-stratum-target.c (defer_process_target_commit_resume):
> New.
> (maybe_commit_resume_process_target): New.
> (make_scoped_defer_process_target_commit_resume): New.
> * infrun.c (do_target_resume): Adjust.
> (commit_resume_all_targets): Rename into...
> (maybe_commit_resume_all_process_targets): ... this, adjust.
> (proceed): Adjust.
> * record-full.c (record_full_wait_1): Adjust.
> * target-delegates.c: Re-generate.
>

OK.