From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3690 invoked by alias); 7 Oct 2009 20:26:21 -0000 Received: (qmail 3681 invoked by uid 22791); 7 Oct 2009 20:26:20 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Oct 2009 20:26:16 +0000 Received: by yxe5 with SMTP id 5so5600227yxe.24 for ; Wed, 07 Oct 2009 13:26:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.159.16 with SMTP id h16mr239723age.24.1254947174471; Wed, 07 Oct 2009 13:26:14 -0700 (PDT) In-Reply-To: <3b9893450910071310s5225e440pb1b6eaa1d62f69db@mail.gmail.com> References: <3b9893450910071109p19138faam7653bd1e030c57a4@mail.gmail.com> <4ACCDE85.7080009@vmware.com> <3b9893450910071310s5225e440pb1b6eaa1d62f69db@mail.gmail.com> Date: Wed, 07 Oct 2009 20:26:00 -0000 Message-ID: <3b9893450910071326h41d343dfja7797b4e51744e2e@mail.gmail.com> Subject: Re: How to configure gdb to support '--arch=i386' on Mac OS X From: n179911 To: Michael Snyder Cc: "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/msg00146.txt.bz2 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. Type "show copying" 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. Use the "file" command. No symbol table is loaded. Use the "file" command. No symbol table is loaded. Use the "file" command. No symbol table is loaded. Use 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" On Wed, Oct 7, 2009 at 1:10 PM, n179911 wrote: > Thank you. You are right. > > The gdb comes with apple has '-arch' =A0option, but gdb 7.0 does not. > > =A0$ /usr/bin/gdb --help > =A0--translate =A0 =A0 =A0 =A0Debug applications running under translatio= n. > =A0-arch i386|armv6|x86_64|ppc =A0 =A0 Specify a gdb targetting a specific > architecture > > So should I do what Joel Brobecker suggested in adding that option in > gdb/main.c? > > Thank you. > > > On Wed, Oct 7, 2009 at 11:31 AM, Michael Snyder wrot= e: >> 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=3Di386'. 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=3Di386' >>> 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 stat= us >>> >>> Can you please tell me how to build gdb to support '--arch-i386' option? >> >> I don't think this has ever been a command line option in fsf gdb. >> Maybe it is one that was added to Apple's version of gdb. >> >> Try running `/Users/n179911/bin/gdb/bin/gdb --help', and >> then run the same command using your installed gdb that came >> with Mac OS. =A0My guess is that the Mac version will list >> "--arch" among the command line options, but the fsf version >> will not (mine doesn't). >> >> >