From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29084 invoked by alias); 8 Oct 2009 07:54:56 -0000 Received: (qmail 29076 invoked by uid 22791); 8 Oct 2009 07:54:55 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Oct 2009 07:54:50 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 37CE6290035; Thu, 8 Oct 2009 09:54:48 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c0Rq+iCz4bxy; Thu, 8 Oct 2009 09:54:47 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 9EC2F290002; Thu, 8 Oct 2009 09:54:47 +0200 (CEST) Subject: Re: How to configure gdb to support '--arch=i386' on Mac OS X Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Tristan Gingold In-Reply-To: <4ACD068C.8080101@codesourcery.com> Date: Thu, 08 Oct 2009 07:54:00 -0000 Cc: Michael Snyder , gdb@sourceware.org, Stan Shebs Content-Transfer-Encoding: 7bit Message-Id: <594A4BD2-7406-4CA4-9AEA-73DCB123C889@adacore.com> References: <3b9893450910071109p19138faam7653bd1e030c57a4@mail.gmail.com> <4ACCDE85.7080009@vmware.com> <3b9893450910071310s5225e440pb1b6eaa1d62f69db@mail.gmail.com> <3b9893450910071326h41d343dfja7797b4e51744e2e@mail.gmail.com> <4ACD020F.2020907@vmware.com> <4ACD068C.8080101@codesourcery.com> To: n179911 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00158.txt.bz2 On Oct 7, 2009, at 11:22 PM, Stan Shebs wrote: > Michael Snyder wrote: >> Yeahhhh, this isn't going to work. >> >> Your binary is in... I forget what it's called -- oh, "mach-o" >> format. >> Our (fsf) gdb does not know how to read that file format. And it >> would be a huge job to port over the changes in apple gdb that tell >> it how to read mach-o files (besides the fact that they are "fat" >> files, or at least potentially might be). m > The Mach-O part does work in 7.0, thanks to Tristan and AdaCore > (check out gdb/machoread.c). I don't think fatness-handling is > there, although at the Xcode level one has to specifically ask for > fat builds anyway, so one could avoid that particular obstacle and > thus be well-positioned to smack one's face into the next wall. :-) Right. The work-around is not to build fat binaries. Current FSF gdb can't handle fat executable. I am not sure that we want to implement this, but feel free to ask. However gdb handles fat objects such as dylibs. Tristan.