This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb: Replace make_bpstat_clear_actions_cleanup
- From: Tom Tromey <tom at tromey dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 07 Jan 2019 08:40:32 -0700
- Subject: Re: [PATCH] gdb: Replace make_bpstat_clear_actions_cleanup
- References: <20190107124354.17415-1-andrew.burgess@embecosm.com>
>>>>> "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