This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb: Replace make_bpstat_clear_actions_cleanup


>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> Replace make_bpstat_clear_actions_cleanup with a new class that can
Andrew> perform the cleanup.

Andrew> gdb/ChangeLog:

Andrew> 	* breakpoint.c (bpstat_clear_actions): Rename to...
Andrew> 	(scoped_bpstat_clear_actions::do_bpstat_clear_actions): ...this.
Andrew> 	(bpstat_do_actions): Switch from using
Andrew> 	make_bpstat_clear_actions_cleanup to use
Andrew> 	scoped_bpstat_clear_actions.
Andrew> 	* breakpoint.h (class scoped_bpstat_clear_actions): New.
Andrew> 	* infrun.c (fetch_inferior_event): Switch from using
Andrew> 	make_bpstat_clear_actions_cleanup to use
Andrew> 	scoped_bpstat_clear_actions.
Andrew> 	* top.c (execute_command): Likewise.
Andrew> 	* utils.c (do_bpstat_clear_actions_cleanup): Delete.
Andrew> 	(make_bpstat_clear_actions_cleanup): Delete.
Andrew> 	* utils.h (make_bpstat_clear_actions_cleanup): Delete.

BTW, this is ok.  There's no need to wait on some other series that
hasn't been sent.

Andrew>  void
Andrew> -bpstat_clear_actions (void)
Andrew> +scoped_bpstat_clear_actions::do_bpstat_clear_actions (void)

I looked more closely, and this approach is actually a bit more
"integrated" (not sure what word to use) than mine, as mine left
bpstat_clear_actions as an ordinary function.  So perhaps this is a
better way to go.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]