This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: BFD Error when Loading an Oracle Table
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Wed, 26 Oct 2005 17:02:44 +0930
- Subject: Re: BFD Error when Loading an Oracle Table
- References: <OF11D1FF31.1960B3F6-ON852570A4.006A3FBB-862570A4.006ACBB1@LocalDomain> <OF25EE8021.0B5E11B5-ON862570A5.00689CEF-862570A5.0068B8E2@us.ibm.com> <20051026004526.GK17244@bubble.grove.modra.org> <20051026020543.GL17244@bubble.grove.modra.org>
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