From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31975 invoked by alias); 16 Jun 2011 02:54:04 -0000 Received: (qmail 31965 invoked by uid 22791); 16 Jun 2011 02:54:03 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jun 2011 02:53:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 298EB2BB2B7; Wed, 15 Jun 2011 22:53:48 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JCp19LkNxTFx; Wed, 15 Jun 2011 22:53:48 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id F18952BB2AC; Wed, 15 Jun 2011 22:53:47 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id AB13E145615; Wed, 15 Jun 2011 19:53:42 -0700 (PDT) Date: Thu, 16 Jun 2011 02:54:00 -0000 From: Joel Brobecker To: Chris Sutcliffe Cc: gdb@sourceware.org Subject: Re: Cross debugger Message-ID: <20110616025342.GS5944@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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-06/txt/msg00113.txt.bz2 > I'm trying to debug a binary I made using the x86_64-w64-mingw32 cross > compiler toolchain hosted on Cygwin. To that end I've attempted to > create an x86_64-w64-mingw32 cross debugger by specifying > '--target=x86_64-w64-mingw32' when configuring gdb 7.2. It worked in > that a gdb.exe and gdbtui.exe were created (thought there was no > gdbserver.exe created). The gdbserver will be automatically built only when host = target, which is not your case. What I don't understand is why you created a cross compiler/debugger, while it seems to me you could have just created a native x64 MinGW toolset. That's what we do at AdaCore: We use cygwin as the build environment, but then build a MinGW toolset by configuring with --build=x86_64-pc-mingw32. As far as I know, the gdbserver will be automatically built. And if you can't build a native x64 MinGW compiler (for instance if you can't find an x86_64-mingw32 compiler), you can still use your cross compiler to cross-build a native MinGW GDB. Or you can use that cross compiler to cross-build a native MinGW GCC, and then use that to build GDB. > (gdb) start [...] > Don't know how to run. Try "help target". And that's also expected, since you have a cross-debugger. So the debugger is expecting you to connect to the target where the process is running. But the nice thing is that, if I understand your situation correctly, as soon as you build a native debugger, you will not have to worry about that anymore. -- Joel