From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48457 invoked by alias); 6 May 2015 15:21:42 -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 48441 invoked by uid 89); 6 May 2015 15:21:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 06 May 2015 15:21:40 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 3CEE391746 for ; Wed, 6 May 2015 15:21:39 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t46FLbPi022591; Wed, 6 May 2015 11:21:38 -0400 Message-ID: <554A3181.9040903@redhat.com> Date: Wed, 06 May 2015 15:21:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jan Kratochvil , gdb-patches@sourceware.org CC: Phil Muldoon Subject: Re: [PATCH v4 11/11] RFC only: compile: Use also inferior munmap References: <20150503140647.18583.2012.stgit@host1.jankratochvil.net> <20150503140815.18583.29612.stgit@host1.jankratochvil.net> In-Reply-To: <20150503140815.18583.29612.stgit@host1.jankratochvil.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg00107.txt.bz2 On 05/03/2015 03:08 PM, Jan Kratochvil wrote: > Hi, > > currently inferior memory is allocated by inferior mmap() but it is never > deallocated; despite the injected objfile incl. its symbols is freed. This was > intentional so that one can do for example: > inferior: > char *str = "foo"; > GDB: > (gdb) compile code str = "bar"; > > I believe later patches will be needed to introduce full control over keeping > vs. discarding the injected module as being discussed in: > compile: objfiles lifetime UI > https://sourceware.org/ml/gdb/2015-04/msg00051.html > Message-ID: <20150429135735.GA16974@host1.jankratochvil.net> > This patch at least introduces code which will be needed for the part/cases of > really freeing all the resources of an injected module. > > It is "RFC only" as given the patch as is it regresses GDB functionality. I don't which parts of this would cause regressions; it's helpful when an RFC points out what is known to be hacky or patch bits that are known to need to change. It's not obvious, at least to me. That said, I skimmed it and it overall looks good. The stop_registers bits looked surprising. My reaction was that I'd think that would be something handled around save_infcall_suspend_state/restore_infcall_suspend_state, though it's not clear to me. Thanks, Pedro Alves