[PATCH] Fix ada inferior-data cleanup
Yao Qi
yao@codesourcery.com
Mon Oct 28 12:24:00 GMT 2013
On 10/28/2013 07:27 PM, Pedro Alves wrote:
>> 'struct ada_inferior_data' is registered to per-inferior-data with
>> >cleanup ada_inferior_data_cleanup, which means the data will be
>> >destroyed when the inferior exits.
> That's not correct. The registry data cleanups are only ran when
> the inferior object is destroyed, IOW, when the inferior is
> removed/deleted (e.g, with "remove-inferiors"), not when the program
> exits.
>
Is it a good idea to call clear_inferior_data when inferior exists (in
exit_inferior_1)?
The comment in registry.h says:
- clear_TAG_data(TAG, OBJECT)
Clear all the data associated with OBJECT. Should be called by the
container implementation when a container object is destroyed.
It is unclear whether I can use clear_inferior_data in exit_inferior_1.
The benefit of this change is that we can remove some attached
inferior_exit observers. These inferior_exit observer functions are
duplicated to inferior_data_cleanup functions. WDYT?
--
Yao (é½å°§)
More information about the Gdb-patches
mailing list