From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26318 invoked by alias); 15 Oct 2002 11:29:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26303 invoked from network); 15 Oct 2002 11:29:53 -0000 Received: from unknown (HELO mta02ps.bigpond.com) (144.135.25.134) by sources.redhat.com with SMTP; 15 Oct 2002 11:29:53 -0000 Received: from bubble.local ([144.135.25.78]) by mta02ps.bigpond.com (Netscape Messaging Server 4.15 mta02ps Jul 16 2002 22:47:55) with SMTP id H40T9R00.DST for ; Tue, 15 Oct 2002 21:29:51 +1000 Received: from CPE-144-136-184-138.sa.bigpond.net.au ([144.136.184.138]) by PSMAM04.mailsvc.email.bigpond.com(MailRouter V3.0n 98/7419967); 15 Oct 2002 21:29:51 Received: (qmail 6121 invoked by uid 179); 15 Oct 2002 11:29:51 -0000 Date: Tue, 15 Oct 2002 04:29:00 -0000 From: Alan Modra To: binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: bfd target lists Message-ID: <20021015205951.N22176@bubble.sa.bigpond.net.au> Mail-Followup-To: binutils@sources.redhat.com, gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2002-10/txt/msg00271.txt.bz2 If anyone has taken a close look at the list of targets printed by say, objdump --help, when compiled with --enable-targets=all, you may have noticed that the default target is mentioned twice. This patch corrects the situation, but since this may affect gdb I'd like some comment from the gdb camp before I commit the change. * targets.c (bfd_target_list): Don't return the default target twice. Index: bfd/targets.c =================================================================== RCS file: /cvs/src/src/bfd/targets.c,v retrieving revision 1.78 diff -u -p -r1.78 targets.c --- bfd/targets.c 9 Oct 2002 19:03:57 -0000 1.78 +++ bfd/targets.c 15 Oct 2002 07:24:00 -0000 @@ -1279,7 +1279,9 @@ bfd_target_list () return NULL; for (target = &bfd_target_vector[0]; *target != NULL; target++) - *(name_ptr++) = (*target)->name; + if (target == &bfd_target_vector[0] + || *target != bfd_target_vector[0]) + *name_ptr++ = (*target)->name; return name_list; } -- Alan Modra IBM OzLabs - Linux Technology Centre