From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 408 invoked by alias); 18 Oct 2006 00:20:29 -0000 Received: (qmail 394 invoked by uid 22791); 18 Oct 2006 00:20:28 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 18 Oct 2006 00:20:23 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 1482848CE43 for ; Tue, 17 Oct 2006 20:20:22 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26308-01-4 for ; Tue, 17 Oct 2006 20:20:21 -0400 (EDT) Received: from takamaka.act-europe.fr (joel.gnat.com [205.232.38.116]) by nile.gnat.com (Postfix) with ESMTP id E574C48CE40 for ; Tue, 17 Oct 2006 20:20:21 -0400 (EDT) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id E5DEA47F01; Tue, 17 Oct 2006 20:20:21 -0400 (EDT) Date: Wed, 18 Oct 2006 00:20:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFC] Replace deprecated_target_new_objfile_hook by observer? Message-ID: <20061018002021.GA1338@adacore.com> References: <20061017233217.GS1903@adacore.com> <20061017233524.GA18064@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061017233524.GA18064@nevyn.them.org> User-Agent: Mutt/1.4i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00209.txt.bz2 > There Be Dragons! Note that there is a case where the remote objfile > hook does _not_ call the next thing on the chain. Is this then one instance you were mentioning (remote.c)? /* Call predecessor on chain, if any. */ if (remote_new_objfile_chain != 0 && remote_desc == 0) remote_new_objfile_chain (objfile); I'm trying to understand how this is supposed to work, since my understanding is that the order in which _init routines are called is not guarantied. So the above breaks the chain, but we just don't know where... > > Assuming that it is, there are several platforms that use that > > mechanism. It's going to be hard to test all of them. But the changes > > themselves should be pretty mechanical. So what I can propose is > > to make all the necessary changes to replace that hook model with > > an approach using observers and test on x86-linux. And then rely > > on the mechanical aspect of the change together with the review of > > another pair of eyes. Would that be OK? > > Isn't there already an adequate observer? Well, not a single one I > guess, you'd have to survey the uses and see what they really wanted. > But solib_loaded goes a long way. Even better, but that would make the change a little less mechanical because the current solib_loaded observer has a different profile... Perhaps I can reconcile the two - I'll have a look at that tomorrow. -- Joel