From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26282 invoked by alias); 29 Nov 2011 20:33:00 -0000 Received: (qmail 26272 invoked by uid 22791); 29 Nov 2011 20:32:59 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from kay.astro.Princeton.EDU (HELO mail.astro.princeton.edu) (128.112.24.221) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Nov 2011 20:32:25 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astro.princeton.edu (Postfix) with ESMTP id 27F051BC00D23 for ; Tue, 29 Nov 2011 15:32:24 -0500 (EST) Received: from mail.astro.princeton.edu ([127.0.0.1]) by localhost (kay.astro.princeton.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ztg6uIOJM88p for ; Tue, 29 Nov 2011 15:32:22 -0500 (EST) X-Submitted: to mail.astro.princeton.edu (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: rhl) with ESMTP for ; Tue, 29 Nov 2011 15:32:22 -0500 (EST) From: Robert Lupton the Good Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Debugging 32/64 bit binaries on os/x 10.7 with cvs gdb? Date: Tue, 29 Nov 2011 20:33:00 -0000 Message-Id: To: gdb@sourceware.org Mime-Version: 1.0 (Apple Message framework v1251.1) 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/msg00129.txt.bz2 If I build gdb from source on os/x 10.7 and attempt to debug python (a 32/6= 4 bit binary), gdb says; > $ ~/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 copying" > 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 Is there a way to build gdb to work around this? R