This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: BFD Error when Loading an Oracle Table


On Wed, Oct 26, 2005 at 11:35:43AM +0930, Alan Modra wrote:
> !   bfd_perror ("Cannot continue");
> !   abort ();
> !   return NULL;

That wasn't such a good patch.  This should give a better idea of what
is going awry.

	* cache.c (bfd_cache_lookup_worker): Use bfd_error_handler
	rather than bfd_perror.  Print file name.  Internationalise.

Index: bfd/cache.c
===================================================================
RCS file: /cvs/src/src/bfd/cache.c,v
retrieving revision 1.22
diff -u -p -r1.22 cache.c
--- bfd/cache.c	26 Oct 2005 04:29:53 -0000	1.22
+++ bfd/cache.c	26 Oct 2005 07:30:02 -0000
@@ -477,6 +477,7 @@ DESCRIPTION
 FILE *
 bfd_cache_lookup_worker (bfd *abfd)
 {
+  bfd *orig_bfd = abfd;
   if ((abfd->flags & BFD_IN_MEMORY) != 0)
     abort ();
 
@@ -501,7 +502,8 @@ bfd_cache_lookup_worker (bfd *abfd)
   else
     return (FILE *) abfd->iostream;
 
-  bfd_perror ("Cannot continue");
+  (*_bfd_error_handler) (_("reopening %B: %s\n"),
+			 orig_bfd, bfd_errmsg (bfd_get_error ()));
   abort ();
   return NULL;
 }

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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