From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31051 invoked by alias); 13 Mar 2012 19:47:49 -0000 Received: (qmail 31025 invoked by uid 22791); 13 Mar 2012 19:47:46 -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 19:47:32 +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 q2DJlM4n003850 for ; Tue, 13 Mar 2012 14:47:31 -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 15:47:26 -0400 From: Marc Khouzam To: "'gdb@sourceware.org'" Date: Tue, 13 Mar 2012 19:47:00 -0000 Subject: Can't get cross debugging to work Message-ID: 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/msg00036.txt.bz2 Hi, I've been breaking my head trying to figure out the recipe to cross debug from a Linux 32bit to a Linux 64bit. Can't do it. Could someone be kind enough to confirm the steps? Do I need to 'set architecture'? Do I need to 'set osabi'? Target: > uname -a Linux toside-linux64 2.6.16.54-0.2.5-smp #1 SMP Mon Jan 21 13:29:51 UTC 200= 8 x86_64 x86_64 x86_64 GNU/Linux Compile gdbserver like this: > cd gdb/build;../configure && make Run: > ./gdb/gdbserver/gdbserver :9999 ~/myBin.64 Host: > uname -a Linux toside-linux32 2.6.16.60-0.27-smp #1 SMP Mon Jul 28 13:07:19 UTC 2008= i686 i686 i386 GNU/Linux Compile gdb like this: > cd gdb/build; ../configure --enable-targets=3Dx86_64-unknown-linux-gnu &&= make Run: > ./gdb/gdb ~/myBin.32 GNU gdb (GDB) 7.4 This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /project/lmimtdesign/lmckhou/myBin.32...done. (gdb) tar remote toside-linux64:9998 Remote debugging using toside-linux64:9998 warning: Selected architecture i386 is not compatible with reported target = architecture i386:x86-64 warning: Architecture rejected target-supplied description Remote register badly formatted: T0506:0000000000000000;07:90cbffffff7f0000= ;10:80baaaaaaa2a0000;thread:66c7;core:0; here: 00000000;07:90cbffffff7f0000;10:80baaaaaaa2a0000;thread:66c7;core:0; =3D=3D I've tried setting the architecture, I've tried building with --target inst= ead of --enable-targets, I've tried different names for the target (where are those defined anyway?)= , I've tried using --enable-targets=3Dall. Nothing works. Sigh. Thanks in advance Marc