bfd Mach-O DWARF debugging support

Tristan Gingold gingold@adacore.com
Tue Apr 10 14:57:00 GMT 2012


On Apr 6, 2012, at 5:13 AM, Albert Zeyer wrote:

> Hi,
> 
> I was wondering about the current state of the Mach-O DWARF debugging
> support. I saw some patches recently which implemented
> `bfd_mach_o_find_nearest_line` (that is mostly what I am interested
> in).
> 
> I have a binary which was build via `gcc -gdwarf-2` (Apples GCC).
> 
> I tried binutils-2.22.52 but it doesn't really work for me. I tried to
> debug it a bit. Some things I can say so far:
> 
> * `objdump -g` doesn't output anything regarding debugging info.
> * In bfd/dwarf2.c, in find_line(), _bfd_dwarf2_slurp_debug_info returns false.
> * In _bfd_dwarf2_slurp_debug_info(), find_debug_info returns false.
> * `objdump -h` doesn't list any debug section.
> 
> When I use `dsymutil` to generate a dSYM from my binary,
> `bfd_mach_o_find_nearest_line` works.
> 
> Can somebody give some hints wether it should work or about the current state?

That's indeed the current state: find_nearest_line will only work in presence of
a dsym file.  Work in Mach-O BFD is required to handle the more common case where
it is not present (which is however handled by gdb).

Tristan.



More information about the Binutils mailing list