This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Universal Mach-O target for BFD
- From: Tristan Gingold <gingold at adacore dot com>
- To: Ryan Govostes <rgovostes at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>, gdb at sourceware dot org
- Date: Fri, 9 Oct 2009 09:49:31 +0200
- Subject: Re: Universal Mach-O target for BFD
- References: <B13FDB79-489E-4D9F-8F28-2BE899AA1D92@gmail.com>
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.