From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9624 invoked by alias); 23 Jan 2007 17:17:13 -0000 Received: (qmail 9610 invoked by uid 22791); 23 Jan 2007 17:17:12 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 23 Jan 2007 17:17:05 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H9PGZ-0004qQ-S8 for gdb-patches@sourceware.org; Tue, 23 Jan 2007 12:17:03 -0500 Date: Tue, 23 Jan 2007 17:17:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: [rfc] Plug memory leaks during gdbarch initialization Message-ID: <20070123171703.GA18534@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20070123144523.GA6339@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2007-01/txt/msg00481.txt.bz2 On Tue, Jan 23, 2007 at 07:25:01AM -0800, Jim Blandy wrote: > > Daniel Jacobowitz writes: > > The patch is an improvement, but doesn't fix that wart. I don't really > > want to check it in without fixing the underlying problem but I don't > > see a good way... anyone have a suggestion? > > I could imagine having each file's _initialize function start with: Now that they're in deprecated_register_gdbarch_swap, this isn't enough - we no longer rely on _initialize_foo's order directly, but indirectly through the order of initializer functions in the swap list. Hmm, but your change would still fix it, with judicious addition of comments that order matters for swaps... -- Daniel Jacobowitz CodeSourcery