This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

objdump patch to recognize core files


Is there any good reason to NOT do something like this?

Hmm, I just realized that if neither format matching call succeeds,
the error will be determined by the attempt to match the bfd_core, so
perhaps we need a different patch ...

-Fred

1999-09-18  Fred Fish  <fnf@cygnus.com>

	* objdump.c (display_bfd): Recognize core files.

Index: objdump.c
===================================================================
RCS file: /cvs/binutils/binutils/binutils/objdump.c,v
retrieving revision 1.11
diff -c -p -r1.11 objdump.c
*** objdump.c	1999/09/12 18:49:47	1.11
--- objdump.c	1999/09/18 17:17:29
*************** display_bfd (abfd)
*** 2045,2051 ****
  {
    char **matching;
  
!   if (!bfd_check_format_matches (abfd, bfd_object, &matching))
      {
        nonfatal (bfd_get_filename (abfd));
        if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
--- 2045,2052 ----
  {
    char **matching;
  
!   if (!bfd_check_format_matches (abfd, bfd_object, &matching) &&
!       !bfd_check_format_matches (abfd, bfd_core, &matching))
      {
        nonfatal (bfd_get_filename (abfd));
        if (bfd_get_error () == bfd_error_file_ambiguously_recognized)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]