From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31368 invoked by alias); 2 Apr 2007 22:26:00 -0000 Received: (qmail 31358 invoked by uid 22791); 2 Apr 2007 22:25:59 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.palmsource.com (HELO mx1.palmsource.com) (12.7.175.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 02 Apr 2007 23:25:55 +0100 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id 8AEA05E2FB; Mon, 2 Apr 2007 15:25:54 -0700 (PDT) Received: from mx1.palmsource.com ([127.0.0.1]) by localhost (mx1.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29995-02-9; Mon, 2 Apr 2007 15:25:53 -0700 (PDT) Received: from ussunex03.svl.access-company.com (ussunm001.palmsource.com [192.168.101.12]) by mx1.palmsource.com (Postfix) with ESMTP id 531765B487; Mon, 2 Apr 2007 15:25:53 -0700 (PDT) Received: from 192.168.92.56 ([192.168.92.56]) by ussunex03.svl.access-company.com ([192.168.101.12]) via Exchange Front-End Server owa.access-company.com ([10.0.20.19]) with Microsoft Exchange Server HTTP-DAV ; Mon, 2 Apr 2007 22:27:12 +0000 Received: from svmsnyderlnx by owa.access-company.com; 02 Apr 2007 15:25:54 -0700 Subject: Re: crosstool gdb6.6 from i686 to x86_64 From: Michael Snyder To: "Sri Dharmasanam (sdharmas)" Cc: gdb@sourceware.org In-Reply-To: <0D48315C0192E64BA0767F616E5A3B6601CF9425@xmb-sjc-236.amer.cisco.com> References: <0D48315C0192E64BA0767F616E5A3B6601CF9425@xmb-sjc-236.amer.cisco.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 02 Apr 2007 22:26:00 -0000 Message-Id: <1175552753.9195.30.camel@svmsnyderlnx.palmsource.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 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/msg00015.txt.bz2 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 > > host is a typical linux i686 system and the target is x86_64 smp linux > 2.6.10. > > The compiler version is 4.1.1 and binutils 2.16. > > on the target, when I try remote debug: > > %target% (gdb) target remote tcp:target_ipaddr:12312 > Remote debugging using tcp:target_ipaddr:12312 > Remote register badly formatted: > T0506:b0f3ffbf7f000000;07:f0f2ffbf7f000000;10:358170962a000000; > here: f000000;07:f0f2ffbf7f000000;10:358170962a000000; > > > on the host, I get: > ./gdbserver hostipaddr:12312 --attach 2826 > Attached; pid = 2826 > Listening on port 12312 > Remote debugging from host ipaddr > readchar: Got EOF > Remote side has terminated connection. GDBserver will reopen the > connection. > Listening on port 12312 > > > Any ideas what's wrong with my setup? Traditionally we speak of the machine running gdbserver as the target, and the machine running gdb as the host. To make sure we are on the same page -- you are running gdb on an i686 machine and gdbserver on an x86_64 machine. Correct? How is gdb configured? When you start gdb, it should tell you something like: This GDB was configured as "--host=i386-pc-linux-gnu --target=x86_64-linux. Your error message may suggest that gdb expects the target to have 32 bit registers instead of 64. Are you sure you are not using the native i686 gdb?