aboutsummaryrefslogtreecommitdiff
path: root/binutils/nm.c
diff options
context:
space:
mode:
authorDavid MacKenzie <djm@cygnus>1994-02-03 13:08:29 +0000
committerDavid MacKenzie <djm@cygnus>1994-02-03 13:08:29 +0000
commit6f9dff07e17b829b8becf9fcb9b34b4711f4ceb1 (patch)
tree90acc7d8c89467404be984a13a5dbd77d2cef4b4 /binutils/nm.c
parent139c8857be582c3e05fecd3b0f91368632fd9b12 (diff)
downloadgdb-6f9dff07e17b829b8becf9fcb9b34b4711f4ceb1.zip
gdb-6f9dff07e17b829b8becf9fcb9b34b4711f4ceb1.tar.gz
gdb-6f9dff07e17b829b8becf9fcb9b34b4711f4ceb1.tar.bz2
More changes to print ambiguous matches and use the
abstracting macros.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r--binutils/nm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/binutils/nm.c b/binutils/nm.c
index c3045ee..6580e7b 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -368,6 +368,7 @@ display_archive (file)
bfd *file;
{
bfd *arfile = NULL;
+ char **matching;
(*format->print_archive_filename) (bfd_get_filename (file));
@@ -385,14 +386,21 @@ display_archive (file)
break;
}
- if (bfd_check_format (arfile, bfd_object))
+ if (bfd_check_format_matches (arfile, bfd_object, &matching))
{
(*format->print_archive_member) (bfd_get_filename (file),
bfd_get_filename (arfile));
display_rel_file (arfile, file);
}
else
- printf ("%s: not an object file\n", arfile->filename);
+ {
+ bfd_nonfatal (bfd_get_filename (arfile));
+ if (bfd_error == file_ambiguously_recognized)
+ {
+ list_matching_formats (matching);
+ free (matching);
+ }
+ }
}
}