This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 2/2] Assert leftover cleanups in TRY_CATCH
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Date: Tue, 07 May 2013 08:40:32 -0600
- Subject: Re: [patch 2/2] Assert leftover cleanups in TRY_CATCH
- References: <20130501165750 dot GA453 at host2 dot jankratochvil dot net> <87obcoyot3 dot fsf at fleche dot redhat dot com> <20130507062305 dot GH5278 at adacore dot com>
Joel> Should we consider changing it into an internal_warning?
I think that is fine as long as it still makes tests fail.
Tom> I think it would be possible to automate adding this declaration in
Tom> all needed spots. I'm curious what you think about it.
Joel> I'm certainly curious about the suggestion. How would the current
Joel> code be adapted to make this work?
Well, first a manual patch both to define this macro appropriately and
to add whatever supporting functions are needed.
Then, modify the cleanup checker to add this declaration to any function
it thinks could use it. The cleanup checker already has some code,
written in a more optimistic time, to try to determine whether a
function could be converted to "RAII style". It could be adapted to
insert the macro use at the right spot.
Then, rebuild and fix whatever bugs were introduced.
Finally, update our patch review guidelines so we know to look for this
macro in ordinary cleanup-using functions.
Alternatively I think we could probably change all the code to be
cleanup-checker-clean. I'll try to prep that series soon to see what
people think. I think it actually less work.
Tom