From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20505 invoked by alias); 20 Oct 2010 14:42:34 -0000 Received: (qmail 20496 invoked by uid 22791); 20 Oct 2010 14:42:33 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=BAYES_00,TW_RW,TW_WX X-Spam-Check-By: sourceware.org Received: from nx.neverkill.us (HELO nx.neverkill.us) (193.34.68.112) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Oct 2010 14:42:28 +0000 Received: from [127.0.0.1] (srv.neverkill.us [10.10.10.1]) by nx.neverkill.us (Postfix) with ESMTP id 2316031366; Wed, 20 Oct 2010 16:42:14 +0200 (CEST) Subject: Re: gdb darwin target on Linux host? From: Peter Steiner To: Tristan Gingold Cc: gdb@sourceware.org In-Reply-To: <20101020143016.6BE9131366@nx.neverkill.us> References: <20101020135306.9C60531366@nx.neverkill.us> <20101020143016.6BE9131366@nx.neverkill.us> Content-Type: text/plain; charset="ISO-8859-1" Date: Wed, 20 Oct 2010 14:42:00 -0000 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Message-Id: <20101020144225.2316031366@nx.neverkill.us> 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: 2010-10/txt/msg00078.txt.bz2 On Wed, 2010-10-20 at 16:20 +0200, Tristan Gingold wrote: > Could you post the log messages ? I suppose that if no binary is > built, then an error has occurred. > > Not sure why you try to build such a tool, as it would be basically > useless to debug. > Hi found the bug - there must be some typo/bug in your build system as it does not build the gdb/ directory at all with --target=x86_64-darwin! I had to run configure in topdir first then after it finishes cd gdb, then rerun same configure (--target=x86_64-darwin) in gdb dir, make, cd .. && make install. This worked and gives me: l /usr/local/gdb/bin/ total 44032 drwxr-xr-x 2 root root 4096 2010-10-20 16:22 ./ drwxr-xr-x 6 root root 4096 2010-10-20 16:05 ../ -rwxr-xr-x 1 root root 17567402 2010-10-20 16:22 x86_64-apple-darwin-gdb* -rwxr-xr-x 1 root root 17567431 2010-10-20 16:22 x86_64-apple-darwin-gdbtui* BUT, there is another issue now. The so generated x86_64-apple-darwin-gdb* does not recognize 64bit binaries: (e.g. /home/exchange/ls is the binary I want to debug) /usr/local/gdb/bin/x86_64-apple-darwin-gdb /home/exchange/ls GNU gdb (GDB) 7.2 Copyright (C) 2010 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 "--host= --target=x86_64-apple-darwin". For bug reporting instructions, please see: ... "/home/exchange/ls": not in executable format: File format not recognized Setting up the environment for debugging gdb. WHY it says: "/home/exchange/ls": not in executable format: File format not recognized ? as I built for the darwin target? file /home/exchange/ls /home/exchange/ls: Mach-O fat file with 2 architectures