public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* objdump patch to recognize core files
@ 1999-09-18 10:24 fnf
  1999-09-19 15:27 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: fnf @ 1999-09-18 10:24 UTC (permalink / raw)
  To: binutils

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: objdump patch to recognize core files
  1999-09-18 10:24 objdump patch to recognize core files fnf
@ 1999-09-19 15:27 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 1999-09-19 15:27 UTC (permalink / raw)
  To: fnf; +Cc: binutils

   From: fnf@toadfish.ninemoons.com
   Date: Sat, 18 Sep 1999 10:24:00 -0700 (MST)

   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 ...

I think this patch is fine provided you fix the problem you mention.
If bfd_object is ambiguously matched, then we need to report the
matching formats from bfd_object, not the matching formats (probably
none) from bfd_core.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-09-19 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-18 10:24 objdump patch to recognize core files fnf
1999-09-19 15:27 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).