From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30558 invoked by alias); 11 Jun 2009 20:47:40 -0000 Received: (qmail 30546 invoked by uid 22791); 11 Jun 2009 20:47:40 -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 20:47:34 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MErBL-0000bt-0L for gdb-patches@sources.redhat.com; Thu, 11 Jun 2009 20:47:31 +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 20:47:30 +0000 Received: from aristovski by enigma.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Jun 2009 20:47:30 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: Re: [patch] nto target: Code cleanup Date: Thu, 11 Jun 2009 20:47:00 -0000 Message-ID: <4A316D52.3010305@qnx.com> References: <200906112039.n5BKdxrg027646@brahms.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Mark Kettenis User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <200906112039.n5BKdxrg027646@brahms.sibelius.xs4all.nl> 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/msg00325.txt.bz2 Mark Kettenis wrote: >> From: Aleksandar Ristovski >> Date: Thu, 11 Jun 2009 15:15:56 -0400 >> >> Hello, >> >> This patch removes i386_nto_target as unnecessary indirection. >> >> Thanks, >> >> -- >> Aleksandar Ristovski >> QNX Software Systems >> >> ChangeLog: >> >> * 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. > > Not sure this is a step in the right direction. This being in a > -tdep.c file pretty much makes it impossible to build a multi-arch GDB > that supports multiple NTO targets. > The patch functionally doesn't change anything. If you look at nto-tdep.h there is current_nto_target extern which gets set either by macros I used in my patch or indirectly by nto_set_target. The patch removes the unnecessary indirection since it doesn't do what one might expect. Note that this approach works for multiarch but will definitely not work once we enable gdb for multiple targets (of different architectures) at the same time, and my patch doesn't change this situation. Thanks, -- Aleksandar Ristovski QNX Software Systems