From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2769 invoked by alias); 23 Jul 2012 08:54:26 -0000 Received: (qmail 2755 invoked by uid 22791); 23 Jul 2012 08:54:23 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Jul 2012 08:54:05 +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 (8.14.4/8.14.4) with ESMTP id q6N8s4Y3030149 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 23 Jul 2012 04:54:05 -0400 Received: from host2.jankratochvil.net (ovpn-116-30.ams2.redhat.com [10.36.116.30]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6N8s1oW014377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 23 Jul 2012 04:54:03 -0400 Date: Mon, 23 Jul 2012 08:54:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 01/10] change gdb to refcount bfd everywhere Message-ID: <20120723085355.GA29593@host2.jankratochvil.net> References: <87vchk3lxs.fsf@fleche.redhat.com> <20120719141750.GB23801@host2.jankratochvil.net> <877gtzxyck.fsf@fleche.redhat.com> <87sjcmv16h.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sjcmv16h.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-07/txt/msg00438.txt.bz2 On Fri, 20 Jul 2012 18:37:26 +0200, Tom Tromey wrote: > This changes allocate_objfile to acquire a reference to the BFD, > rather than steal a reference. Then it changes all callers, direct or > indirect, to follow. map_vmap still steals a reference. > I'm still undecided as to whether this patch is an improvement. I > think it does fix a couple of obscure latent memory leaks. I find the code the only way "how it should be" now. > In practice, though, this means adding a bunch of cleanups, which tends to > obscure the code. This should be fixed with the transition to C++. > Let me know what you think. I can't speak for each patch individually but all the 3 patches together seem right to me. Even solib_read_symbols looks as fixed now. Thanks, Jan