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:27:08 -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.
Hah, I took a stab at this too. I started with something like your
patch but generalized it to a cleanup_function that takes a
function_view as a callback. This allowed for the removal of some more
cleanups. See my branch submit/cleanup/longjmp-bp.
I wonder what you think of that approach. I was on the fence about it
myself. On the one hand, it's pretty simple to understand and it fits a
number of existing spots in gdb. On the other hand, maybe it's a bit
too easy to get into trouble with something generic.
If you try the branch, be warned it still has some regressions, which is
why I haven't submitted it yet.
Tom