From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12191 invoked by alias); 13 Mar 2012 20:03:36 -0000 Received: (qmail 12183 invoked by uid 22791); 13 Mar 2012 20:03:35 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from imr4.ericy.com (HELO imr4.ericy.com) (198.24.6.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Mar 2012 20:03:22 +0000 Received: from eusaamw0712.eamcs.ericsson.se ([147.117.20.181]) by imr4.ericy.com (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id q2DK2gjL007781; Tue, 13 Mar 2012 15:03:21 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.46]) by eusaamw0712.eamcs.ericsson.se ([147.117.20.181]) with mapi; Tue, 13 Mar 2012 16:03:04 -0400 From: Marc Khouzam To: "'Pedro Alves'" CC: "'gdb@sourceware.org'" Date: Tue, 13 Mar 2012 20:03:00 -0000 Subject: RE: Can't get cross debugging to work Message-ID: References: <4F5FA684.1050206@redhat.com> In-Reply-To: <4F5FA684.1050206@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2012-03/txt/msg00038.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com]=20 > Sent: Tuesday, March 13, 2012 3:57 PM > To: Marc Khouzam > Cc: 'gdb@sourceware.org' > Subject: Re: Can't get cross debugging to work >=20 > On 03/13/2012 07:47 PM, Marc Khouzam wrote: >=20 > > Run: > >> > ./gdb/gdbserver/gdbserver :9999 ~/myBin.64 >=20 >=20 > > Run: > >> > ./gdb/gdb ~/myBin.32 >=20 >=20 > Here's the problem. You should be doing: >=20 > ./gdb/gdb ~/myBin.64 >=20 > > warning: Selected architecture i386 is not compatible with=20 > reported target architecture i386:x86-64 > > warning: Architecture rejected target-supplied description >=20 > This means that GDB thinks the architecture is i386 (because=20 > you've gave it a 32-bit > executable to debug), while gdbserver claims it is debugging=20 > a x86-64 program. And it works! Thanks for the quick answer. I'd like to see the --enable-targets feature explained better in the documentation. I'll try to find time and write a patch, but I don't understand much of it, so it will be to get the ball=20 rolling. Thanks again! Marc