From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8421 invoked by alias); 30 Nov 2011 07:47:35 -0000 Received: (qmail 8413 invoked by uid 22791); 30 Nov 2011 07:47:34 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Nov 2011 07:47:17 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id E57A9CB0794; Wed, 30 Nov 2011 08:47:17 +0100 (CET) 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 nUntETCOCmac; Wed, 30 Nov 2011 08:47:17 +0100 (CET) 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 D2C63CB033F; Wed, 30 Nov 2011 08:47:17 +0100 (CET) Subject: Re: Debugging 32/64 bit binaries on os/x 10.7 with cvs gdb? Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: Date: Wed, 30 Nov 2011 07:47:00 -0000 Cc: gdb@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <34BC371E-FD6A-4FD0-BF69-9746DB2F42A1@adacore.com> References: To: Robert Lupton the Good 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: 2011-11/txt/msg00133.txt.bz2 On Nov 29, 2011, at 9:32 PM, Robert Lupton the Good wrote: > If I build gdb from source on os/x 10.7 and attempt to debug python (a 32= /64 bit binary), gdb says; >=20 >> $ ~/Src/gnu/gdb/gdb /usr/bin/python >> GNU gdb (GDB) 7.3.50.20111109-cvs >> Copyright (C) 2011 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 copyin= g" >> and "show warranty" for details. >> This GDB was configured as "x86_64-apple-darwin11.2.0". >> For bug reporting instructions, please see: >> ... >> "/usr/bin/python": not in executable format: File format not recognized >> (gdb) quit >> $ file !$ >> file /usr/bin/python >> /usr/bin/python: Mach-O universal binary with 2 architectures >> /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable= x86_64 >> /usr/bin/python (for architecture i386): Mach-O executable i386 >=20 > Is there a way to build gdb to work around this? No. Currently gdb is not able to debug fat binary. Use lipo to extract th= e architecture you want to use.