This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
bfd target lists
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Tue, 15 Oct 2002 20:59:51 +0930
- Subject: bfd target lists
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