Help understanding what BFD can do
don.bebout@conexant.com
don.bebout@conexant.com
Tue Jan 23 13:22:00 GMT 2001
Hello,
I am looking for some help understanding what BFD can do. To be specific,
I have developed a source-level debugger of my own and want to utilize BFD
to support the various file formats.
My question:
I built an executable file (from a C file) on a Sun Space machine with gcc.
It is supposed to be elf/dwarf2 format. I then wrote a small program which
calls bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
bfd_print_symbol_vandf functions to dump all of the symbols. All that I
get are the global symbols (including function names) and local-static
symbols. What I don't get is detailed type information, structure
definitions, function arguments, local (stack based) variables, typedefs,
etc.
I then took a look at some source for the objdump utility. debug.c and
rddbg.c appear to create another set of data structures to hold the
information I am looking for. However, I have been unable to use objdump
(v2.9.1) to dump the debug infomation that I am looking for.
And finally, the gdb source has a file dwarf2.c which appears to parse the
binary data of a bfd section. I thought BFD was supposed to parse the
dwarf2 sections? Am I missing the point of BFD?
Thanks,
Don
More information about the Binutils
mailing list