This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Help understanding what BFD can do
- To: binutils at sources dot redhat dot com
- Subject: Help understanding what BFD can do
- From: don dot bebout at conexant dot com
- Date: Tue, 23 Jan 2001 13:20:57 -0800
- Cc: andrew dot hong at conexant dot com
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