From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12702 invoked by alias); 11 Jun 2009 19:34:19 -0000 Received: (qmail 12693 invoked by uid 22791); 11 Jun 2009 19:34:19 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Jun 2009 19:34:14 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MEq2M-0006FR-SW for gdb-patches@sources.redhat.com; Thu, 11 Jun 2009 19:34:11 +0000 Received: from enigma.qnx.com ([209.226.137.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jun 2009 19:34:10 +0000 Received: from aristovski by enigma.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jun 2009 19:34:10 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: Re: [patch] nto target: Code cleanup Date: Thu, 11 Jun 2009 19:34:00 -0000 Message-ID: References: <20090611192410.GK25703@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <20090611192410.GK25703@adacore.com> 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: 2009-06/txt/msg00315.txt.bz2 Joel Brobecker wrote: >> * i386-nto-tdep.c (i386_nto_target): Remove definition. >> (init_i386nto_ops): Use macros to set fields to global >> current_nto_target directly. >> (i386nto_init_abi): Remove unused nto_set_target call. >> * nto-tdep.h (nto_set_target): Remove unused declaration. >> * nto-tdep.c (nto_set_target): Remove unused function. > > Thanks for extracting this part out. This is OK. > > I'm wondering how the other targets do this sort of thing, > but my brain seem to be refusing to function at the moment... > Thanks for quick review! Committed. Primary motivation for this gymnastics in nto was that we actually support 5 different cpu platforms and code in nto-tdep.c is "generic", that is it calls particular nto target's (that is cpu specific stuff) from there. My motivation for cleanup is to remove things that don't seem to do what is expected (like in this example, by removing this indirection I haven't changed behaviour at all since the "nto_set_target" simply copies just set functions from i386_nto_target into current_nto_target. The whole thing will undergo further cleanups, but right now I want to bring it as close to what I have as possible. -- Aleksandar Ristovski QNX Software Systems