From 2f83960e2ca6a38b4a68d3c394fb2b5c0db2e2af Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sun, 29 Jul 2001 05:31:43 +0000 Subject: [PATCH] * bucomm.c (list_supported_architectures): New function. * bucomm.h (list_supported_architectures): Declare. * objdump.c (usage): Call the above. --- binutils/ChangeLog | 6 ++++++ binutils/bucomm.c | 19 +++++++++++++++++++ binutils/bucomm.h | 2 ++ binutils/objdump.c | 1 + 4 files changed, 28 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 93aba19..24d1199 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2001-07-28 Matthias Kramm + + * bucomm.c (list_supported_architectures): New function. + * bucomm.h (list_supported_architectures): Declare. + * objdump.c (usage): Call the above. + 2001-07-25 Dave Brolley * objdump.c (SKIP_ZEROES): Only define it if it is not already defined. diff --git a/binutils/bucomm.c b/binutils/bucomm.c index 401a3e4..bf0f799 100644 --- a/binutils/bucomm.c +++ b/binutils/bucomm.c @@ -168,6 +168,25 @@ list_supported_targets (name, f) fprintf (f, " %s", bfd_target_vector[t]->name); fprintf (f, "\n"); } + +/* List the supported architectures. */ + +void +list_supported_architectures (name, f) + const char *name; + FILE *f; +{ + const char** arch; + + if (name == NULL) + fprintf (f, _("Supported architectures:")); + else + fprintf (f, _("%s: supported architectures:"), name); + + for (arch = bfd_arch_list (); *arch; arch++) + fprintf (f, " %s", *arch); + fprintf (f, "\n"); +} /* Display the archive header for an element as if it were an ls -l listing: diff --git a/binutils/bucomm.h b/binutils/bucomm.h index f8c8608..0c98a7f 100644 --- a/binutils/bucomm.h +++ b/binutils/bucomm.h @@ -164,6 +164,8 @@ void list_matching_formats PARAMS ((char **p)); void list_supported_targets PARAMS ((const char *, FILE *)); +void list_supported_architectures PARAMS ((const char *, FILE *)); + void print_arelt_descr PARAMS ((FILE *file, bfd *abfd, boolean verbose)); char *make_tempname PARAMS ((char *)); diff --git a/binutils/objdump.c b/binutils/objdump.c index 4b64bd6..12a8324 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -268,6 +268,7 @@ usage (stream, status) --adjust-vma=OFFSET Add OFFSET to all displayed section addresses\n\ \n")); list_supported_targets (program_name, stream); + list_supported_architectures (program_name, stream); disassembler_usage (stream); } -- 2.7.4