From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23870 invoked by alias); 28 Oct 2013 12:24:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23856 invoked by uid 89); 28 Oct 2013 12:24:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_00,GARBLED_BODY autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 28 Oct 2013 12:24:06 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1ValrW-0002iX-ER from Yao_Qi@mentor.com ; Mon, 28 Oct 2013 05:24:02 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 28 Oct 2013 05:24:02 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Mon, 28 Oct 2013 05:24:01 -0700 Message-ID: <526E5702.8070104@codesourcery.com> Date: Mon, 28 Oct 2013 12:24:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH] Fix ada inferior-data cleanup References: <1382759789-777-1-git-send-email-yao@codesourcery.com> <526E4A3D.60503@redhat.com> In-Reply-To: <526E4A3D.60503@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00852.txt.bz2 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 (齐尧)