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: Using BFD to get debugging information from .elf files



On Feb 28, 2007, at 14:03 , Alan Modra wrote:


You're missing bfd_check_format (bfdRef, bfd_object)

Hmm. How bizarre. I had bfd_archive in the call to bfd_check_format (), so I changed it to bfd_object, and now it works.


When I searched the archives before, I found someone with a similar question, and a similar response. I looked up the call in the online docs to try to understand it better.

So I added the call to bfd_check_format(), I *think* with bfd_object, and it still failed. I then experimented with various calls to bfd_check_format and bfd_check_format_matches(), all to no avail. What I posted in my email was a hand-edited version of the last attempt, with bfd_check_format_matches().

The docs don't seem to indicate that there is a side-effect to calling bfd_check_format. Can you elaborate on what that side-effect is? It works with the call, and not without it, even though I take no action other than to print the result. I can call it twice, with both bfd_archive and bfd_object, in either order, and it succeeds.

Thanks!

--
Rick



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