aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-10-15 11:34:01 +0000
committerAlan Modra <amodra@gmail.com>2002-10-15 11:34:01 +0000
commit48417c1accc44a505e6bdd5d205a7960e3756064 (patch)
tree029ef62444d384e0ee662bb21de9f0cc3890e749 /binutils
parent49c1257607d865a171f98f85bac9d72bcea51bbd (diff)
downloadgdb-48417c1accc44a505e6bdd5d205a7960e3756064.zip
gdb-48417c1accc44a505e6bdd5d205a7960e3756064.tar.gz
gdb-48417c1accc44a505e6bdd5d205a7960e3756064.tar.bz2
* bucomm.c (list_supported_targets): Use bfd_target_list.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog2
-rw-r--r--binutils/bucomm.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index ef0f03f..d1823c3 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,7 @@
2002-10-15 Alan Modra <amodra@bigpond.net.au>
+ * bucomm.c (list_supported_targets): Use bfd_target_list.
+
* objcopy.c (copy_file): Report ambiguous bfd_object matches, and
other object errors in preference to bfd_core errors.
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 35112fc..2bc8cef 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -128,16 +128,18 @@ list_supported_targets (name, f)
const char *name;
FILE *f;
{
- extern const bfd_target *const *bfd_target_vector;
int t;
+ const char **targ_names = bfd_target_list ();
if (name == NULL)
fprintf (f, _("Supported targets:"));
else
fprintf (f, _("%s: supported targets:"), name);
- for (t = 0; bfd_target_vector[t] != NULL; t++)
- fprintf (f, " %s", bfd_target_vector[t]->name);
+
+ for (t = 0; targ_names[t] != NULL; t++)
+ fprintf (f, " %s", targ_names[t]);
fprintf (f, "\n");
+ free (targ_names);
}
/* List the supported architectures. */
@@ -147,7 +149,7 @@ list_supported_architectures (name, f)
const char *name;
FILE *f;
{
- const char** arch;
+ const char **arch;
if (name == NULL)
fprintf (f, _("Supported architectures:"));