From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3659 invoked by alias); 16 May 2012 19:38:45 -0000 Received: (qmail 3596 invoked by uid 22791); 16 May 2012 19:38:43 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 May 2012 19:38:30 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SUk3I-0006RQ-NX from Maciej_Rozycki@mentor.com ; Wed, 16 May 2012 12:38:28 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 16 May 2012 12:38:28 -0700 Received: from [172.30.0.201] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Wed, 16 May 2012 20:38:25 +0100 Date: Wed, 16 May 2012 19:38:00 -0000 From: "Maciej W. Rozycki" To: Joel Brobecker CC: Tom Tromey , Thomas Schwinge , , Kevin Buettner Subject: Re: [SH] regs command In-Reply-To: <20120516190539.GZ10253@adacore.com> Message-ID: References: <87ehqkrzzw.fsf@schwinge.name> <20120516142633.GV10253@adacore.com> <87zk98qe8t.fsf@schwinge.name> <20120516165730.GY10253@adacore.com> <87pqa4qbzp.fsf@schwinge.name> <87r4ukox0y.fsf@fleche.redhat.com> <20120516190539.GZ10253@adacore.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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-05/txt/msg00620.txt.bz2 On Wed, 16 May 2012, Joel Brobecker wrote: > > This means you registered "regs" before the thing it aliases was > > registered. This can happen because _initialize_xxx order is not > > defined. > > > > There's no easy fix :(. You could move "regs" initialization to a > > better spot but then it will be visible in all builds of gdb, not just > > those with this target compiled in. > > It seems better in that case to just go with what Thomas had initially, > maybe just adding a comment why we don't use an alias? It's only for > a few weeks... I think a fix is actually very easy. All that has to be done is to tweak the init.c scriptery such that *_tdep initialisers are run last. And actually I think it is worth the while regardless of this particular issue as this way all the target-dependent bits can rely on generic stuff to have been initialised. Of course tweaking the scriptery can be horribly boring, but there you go. I'll see if I can give it a shot -- unless anyone beats me to it. Maciej