Universal Mach-O target for BFD

Tristan Gingold gingold@adacore.com
Fri Oct 9 07:49:00 GMT 2009


On Oct 8, 2009, at 10:59 PM, Ryan Govostes wrote:

> I noticed that GDB 7, while it supports single-architecture Mach-O  
> files, does not like "universal" (fat) binaries.
>
> I haven't done any hacking on gdb / binutils before, so I'm not sure  
> of the extent of changes that need to be made. I expect it's  
> something like,
>
> 1. Add support for universal binaries to BFD.

Eeeh, this is already implemented!  Universal binaries are seen as  
archive.  The current implementation
is not complete, but you can do objdump on an universal binaries.

> 2. Add flags to GDB to select which architecture to extract.

Automatically extracting an architecture from a universal binary is  
already implemented.  GDB does that
to read dylib.

What must do done for gdb (but use gdb mailing list for that) is to  
select which part to use (either
by adding the --arch option or using some heuristic) but also be sure  
that the selected part is executed.
Apple gdb use the arch(1) utility for that.

Tristan.



More information about the Binutils mailing list