Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* bfd target lists
@ 2002-10-15  4:29 Alan Modra
  2002-11-06 14:16 ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2002-10-15  4:29 UTC (permalink / raw)
  To: binutils, gdb-patches

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-11-06 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-15  4:29 bfd target lists Alan Modra
2002-11-06 14:16 ` Andrew Cagney
2002-11-06 14:48   ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox