diff options
author | David MacKenzie <djm@cygnus> | 1994-01-24 23:38:03 +0000 |
---|---|---|
committer | David MacKenzie <djm@cygnus> | 1994-01-24 23:38:03 +0000 |
commit | 209e5610416f7b2c28f90aafc02ea7c6e62c3359 (patch) | |
tree | 6876a4e09d7093898993d32f5716e9203b3b4742 /binutils | |
parent | aabda2da07cdaa4d5ed277fce7d99da42499df1e (diff) | |
download | gdb-209e5610416f7b2c28f90aafc02ea7c6e62c3359.zip gdb-209e5610416f7b2c28f90aafc02ea7c6e62c3359.tar.gz gdb-209e5610416f7b2c28f90aafc02ea7c6e62c3359.tar.bz2 |
* objdump.c (display_file): Remove call to list_matching_formats.
It would never be called.
(list_matching_formats): Take an arg giving the list of matching
formats.
(display_bfd): Pass the arg, and get it filled in by calling
bfd_check_format_matches instead of bfd_check_format.
* binutils.texi (objdump): Note some limitations of -h section
address printing.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 7 | ||||
-rw-r--r-- | binutils/objdump.c | 16 |
2 files changed, 16 insertions, 7 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 90c3308..794d6de 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,12 @@ Mon Jan 24 13:29:02 1994 David J. Mackenzie (djm@thepub.cygnus.com) + * objdump.c (display_file): Remove call to list_matching_formats. + It would never be called. + (list_matching_formats): Take an arg giving the list of matching + formats. + (display_bfd): Pass the arg, and get it filled in by calling + bfd_check_format_matches instead of bfd_check_format. + * binutils.texi (objdump): Note some limitations of -h section address printing. diff --git a/binutils/objdump.c b/binutils/objdump.c index 9214f06..125f3a1 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -834,10 +834,9 @@ dump_stabs_1 (abfd, name1, name2) } static void -list_matching_formats() +list_matching_formats(p) + char **p; { - char **p = bfd_matching_formats (); - fprintf(stderr, "%s: Matching formats:", program_name); while (*p) fprintf(stderr, " %s", *p++); @@ -848,12 +847,17 @@ static void display_bfd (abfd) bfd *abfd; { - if (!bfd_check_format (abfd, bfd_object)) + char **matching; + + if (!bfd_check_format_matches (abfd, bfd_object, &matching)) { fprintf (stderr, "%s: %s: %s\n", program_name, abfd->filename, bfd_errmsg (bfd_error)); if (bfd_error == file_ambiguously_recognized) - list_matching_formats(); + { + list_matching_formats (matching); + free (matching); + } return; } printf ("\n%s: file format %s\n", abfd->filename, abfd->xvec->name); @@ -917,8 +921,6 @@ display_file (filename, target) { fprintf (stderr, "%s: ", program_name); bfd_perror (filename); - if (bfd_error == file_ambiguously_recognized) - list_matching_formats(); return; } |