From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11042 invoked by alias); 7 Oct 2009 20:45:37 -0000 Received: (qmail 11030 invoked by uid 22791); 7 Oct 2009 20:45:36 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Wed, 07 Oct 2009 20:45:28 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id E7765B005E; Wed, 7 Oct 2009 16:45:25 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id n97KjPQf020928; Wed, 7 Oct 2009 16:45:25 -0400 Date: Wed, 07 Oct 2009 20:45:00 -0000 From: Jack Howarth To: n179911 , y@bromo.med.uc.edu Cc: gdb@sourceware.org Subject: Re: How to configure gdb to support '--arch=i386' on Mac OS X Message-ID: <20091007204525.GA20427@bromo.med.uc.edu> References: <3b9893450910071109p19138faam7653bd1e030c57a4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3b9893450910071109p19138faam7653bd1e030c57a4@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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/msg00148.txt.bz2 On Wed, Oct 07, 2009 at 11:09:39AM -0700, n179911 wrote: > Hi, > > I have compiled gdb 7.0 on Mac OS X. And I have configured XCode to > use this new version of gdb 7.0. > > But when I start debug my XCode project it said gdb can't recognize > the option '--arch=i386'. Here is the log of my error: > > [Session started at 2009-10-07 11:00:43 -0700.] > /Users/n179911/bin/gdb/bin/gdb: unrecognized option `--arch=i386' > Use `/Users/n179911/bin/gdb/bin/gdb --help' for a complete list of options. > > The Debugger has exited with status 1.The Debugger has exited with status > > Can you please tell me how to build gdb to support '--arch-i386' option? > > Thank you. You don't indicate if you are running Snow Leopard are not. The gdb 7.0 release uses the latest config.guess which detects the architecture as that of the default code generation for the system compiler (which is x86_64 on EMT64 capable hardware). If you want to build the 32-bit gdb under those conditions, you should explicitly pass the triplet i386-apple-darwin10 or i686-apple-darwin10 to configure for --host/--build/--target. I would note that currently for the x86_64-apple-darwin10 build, the resulting gdb doesn't load i386 binaires (unlike the situation under Linux). I haven't tested the i686-apple-darwin9 build to see if it can load x86_64 binaries yet. Jack