From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8233 invoked by alias); 7 Oct 2009 20:38:58 -0000 Received: (qmail 8219 invoked by uid 22791); 7 Oct 2009 20:38:57 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-fx0-f225.google.com (HELO mail-fx0-f225.google.com) (209.85.220.225) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Oct 2009 20:38:51 +0000 Received: by fxm25 with SMTP id 25so4982571fxm.0 for ; Wed, 07 Oct 2009 13:38:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.102.193.20 with SMTP id q20mr159101muf.28.1254947929038; Wed, 07 Oct 2009 13:38:49 -0700 (PDT) In-Reply-To: <3b9893450910071326h41d343dfja7797b4e51744e2e@mail.gmail.com> References: <3b9893450910071109p19138faam7653bd1e030c57a4@mail.gmail.com> <4ACCDE85.7080009@vmware.com> <3b9893450910071310s5225e440pb1b6eaa1d62f69db@mail.gmail.com> <3b9893450910071326h41d343dfja7797b4e51744e2e@mail.gmail.com> Date: Wed, 07 Oct 2009 20:38:00 -0000 Message-ID: <8ba6bed40910071338y2d9059dfjbb002c1717478eea@mail.gmail.com> Subject: Re: How to configure gdb to support '--arch=i386' on Mac OS X From: Matt Rice To: n179911 Cc: Michael Snyder , "gdb@sourceware.org" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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/msg00147.txt.bz2 On Wed, Oct 7, 2009 at 1:26 PM, n179911 wrote: > I tried Joel Brobecker suggested in adding that option in gdb/main.c. > > But my program still won't come up in my debugger. > > [Session started at 2009-10-07 13:27:16 -0700.] > GNU gdb (GDB) 7.0 > Copyright (C) 2009 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. =A0Type "show copyi= ng" > and "show warranty" for details. > This GDB was configured as "i386-apple-darwin9.7.0". > For bug reporting instructions, please see: > . > Loading program into debugger=85 > No symbol table is loaded. =A0Use the "file" command. > No symbol table is loaded. =A0Use the "file" command. > No symbol table is loaded. =A0Use the "file" command. > No symbol table is loaded. =A0Use the "file" command. > Program loaded. > tty /dev/ttys008 > (gdb) run > =3Dthread-group-created,id=3D"81191" > =3Dthread-created,id=3D"1",group-id=3D"81191" > I'm guessing that a stub implementation of -arch may not be enough, you may end up needing to backport the actual arch implementation, you may also try stripping the unneeded architectures from the binary you're trying to debug with the lipo command... (though I'm not sure if that would actually work...)