From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14851 invoked by alias); 26 Sep 2006 15:33:37 -0000 Received: (qmail 14843 invoked by uid 22791); 26 Sep 2006 15:33:36 -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; Tue, 26 Sep 2006 15:33:34 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GSEw7-00048E-Lo; Tue, 26 Sep 2006 11:33:31 -0400 Date: Tue, 26 Sep 2006 15:33:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] Suggest fixing your target for gdbserver(1) Message-ID: <20060926153331.GA15759@nevyn.them.org> Mail-Followup-To: Jan Kratochvil , gdb-patches@sourceware.org References: <20060926152715.GA5860@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060926152715.GA5860@host0.dyn.jankratochvil.net> 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-09/txt/msg00188.txt.bz2 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. -- Daniel Jacobowitz CodeSourcery