From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2710 invoked by alias); 2 Oct 2006 15:55:53 -0000 Received: (qmail 2701 invoked by uid 22791); 2 Oct 2006 15:55:52 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 02 Oct 2006 15:55:46 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GUQ8r-0001WP-HH; Mon, 02 Oct 2006 11:55:41 -0400 Date: Mon, 02 Oct 2006 15:55:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Cc: Jan Kratochvil Subject: Re: [patch] Suggest fixing your target for gdbserver(1) Message-ID: <20061002155541.GA5816@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org, Jan Kratochvil References: <20060926152715.GA5860@host0.dyn.jankratochvil.net> <20060926153331.GA15759@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060926153331.GA15759@nevyn.them.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00005.txt.bz2 On Tue, Sep 26, 2006 at 11:33:31AM -0400, Daniel Jacobowitz wrote: > On Tue, Sep 26, 2006 at 05:27:15PM +0200, Jan Kratochvil wrote: > > Hi, > > > > x86_64 defaults (by bfd matching) to target "i386" instead of its native > > "i386:x86_64". Therefore if you connect to gdbserver(1) without any `file' or > > `set architecture' command before the communication will crash on a different > > expected register sizes. > > > > As implementing architecture negotiation is complicated due to gdbserver(1) not > > being aware of bfd-compatible name of its target and also it may be also > > unclear to automatically change the target while working remotely it is just > > suggesting to double-check which architecture you are using. > > As a matter of fact I'm implementing automatic detection of 32-bit vs > 64-bit targets based on the size of register responses right now. > I hope to have it done later in the week, though it will be tricky > to break it apart from the rest of my patches for merging. Just to keep you updated: I got this working on Saturday. I'm still trying to figure out how to merge it without dragging in all the rest of this source tree. I'll post some more about that later today. -- Daniel Jacobowitz CodeSourcery