From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22958 invoked by alias); 2 Apr 2007 23:15:20 -0000 Received: (qmail 22949 invoked by uid 22791); 2 Apr 2007 23:15:19 -0000 X-Spam-Check-By: sourceware.org Received: from sj-iport-6.cisco.com (HELO sj-iport-6.cisco.com) (171.71.176.117) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 03 Apr 2007 00:15:17 +0100 Received: from sj-dkim-1.cisco.com ([171.71.179.21]) by sj-iport-6.cisco.com with ESMTP; 02 Apr 2007 16:15:16 -0700 Received: from sj-core-2.cisco.com (sj-core-2.cisco.com [171.71.177.254]) by sj-dkim-1.cisco.com (8.12.11/8.12.11) with ESMTP id l32NFFEw005540; Mon, 2 Apr 2007 16:15:15 -0700 Received: from xbh-sjc-231.amer.cisco.com (xbh-sjc-231.cisco.com [128.107.191.100]) by sj-core-2.cisco.com (8.12.10/8.12.6) with ESMTP id l32NFFZT009917; Mon, 2 Apr 2007 23:15:15 GMT Received: from xmb-sjc-236.amer.cisco.com ([128.107.191.121]) by xbh-sjc-231.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 2 Apr 2007 16:15:15 -0700 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: crosstool gdb6.6 from i686 to x86_64 Date: Mon, 02 Apr 2007 23:15:00 -0000 Message-ID: <0D48315C0192E64BA0767F616E5A3B6601CF9489@xmb-sjc-236.amer.cisco.com> In-Reply-To: <1175552753.9195.30.camel@svmsnyderlnx.palmsource.com> References: <0D48315C0192E64BA0767F616E5A3B6601CF9425@xmb-sjc-236.amer.cisco.com> <1175552753.9195.30.camel@svmsnyderlnx.palmsource.com> From: "Sri Dharmasanam \(sdharmas\)" To: "Michael Snyder" Cc: Authentication-Results: sj-dkim-1; header.From=sdharmas@cisco.com; dkim=pass ( sig from cisco.com/sjdkim1004 verified; ); 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: 2007-04/txt/msg00016.txt.bz2 Crosstool builds the cross-gdb client and the gdbserver together. In this case, the host is a 32b machine and the target is 64b.=20 The host: % x86_64-unknown-linux-gnu-gdb GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=3Di686-pc-linux-gnu --target=3Dx86_64-unknown-linux-gnu". (gdb) target remote target:12312 Remote debugging using target:12312 Remote register badly formatted: T0506:0000000000000000;07:c0f4ffbf7f000000;10:806a55952a000000; here: 0000000;07:c0f4ffbf7f000000;10:806a55952a000000; The target: % gdbserver ipadd:12312 --attach /usr/local/appln Process /usr/local/appln created; pid =3D 529 Listening on port 12312 Remote debugging from host=20 readchar: Got EOF Remote side has terminated connection. GDBserver will reopen the connection. Listening on port 12312 Yes, it does seem like the gdb client on the host thinks its talking to a 32b instead of the 64b machine. But the config options reported by the client look ok.=20 > -----Original Message----- > From: Michael Snyder [mailto:Michael.Snyder@access-company.com]=20 > Sent: Monday, April 02, 2007 3:26 PM > To: Sri Dharmasanam (sdharmas) > Cc: gdb@sourceware.org > Subject: Re: crosstool gdb6.6 from i686 to x86_64 >=20 > On Mon, 2007-04-02 at 15:04 -0700, Sri Dharmasanam (sdharmas) wrote: > > I'm seeing this problem with gdb6.6 built using crosstool 0.43 > >=20=20 > > host is a typical linux i686 system and the target is=20 > x86_64 smp linux=20 > > 2.6.10. > >=20=20 > > The compiler version is 4.1.1 and binutils 2.16. > >=20=20 > > on the target, when I try remote debug: > >=20=20 > > %target% (gdb) target remote tcp:target_ipaddr:12312 Remote=20 > debugging=20 > > using tcp:target_ipaddr:12312 Remote register badly formatted: > > T0506:b0f3ffbf7f000000;07:f0f2ffbf7f000000;10:358170962a000000; > > here: f000000;07:f0f2ffbf7f000000;10:358170962a000000; > >=20 > >=20=20 > > on the host, I get: > > ./gdbserver hostipaddr:12312 --attach 2826 Attached; pid =3D 2826=20 > > Listening on port 12312 Remote debugging from host ipaddr > > readchar: Got EOF > > Remote side has terminated connection. GDBserver will reopen the=20 > > connection. > > Listening on port 12312 > >=20 > >=20 > > Any ideas what's wrong with my setup? >=20 > Traditionally we speak of the machine running gdbserver as=20 > the target, and the machine running gdb as the host. To make=20 > sure we are on the same page -- you are running gdb on an=20 > i686 machine and gdbserver on an x86_64 machine. Correct? >=20 > How is gdb configured? When you start gdb, it should tell=20 > you something like: >=20 > This GDB was configured as "--host=3Di386-pc-linux-gnu=20 > --target=3Dx86_64-linux. >=20 > Your error message may suggest that gdb expects the target to=20 > have 32 bit registers instead of 64. Are you sure you are=20 > not using the native i686 gdb? >=20