From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22737 invoked by alias); 27 Sep 2006 17:51:44 -0000 Received: (qmail 22725 invoked by uid 22791); 27 Sep 2006 17:51:41 -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; Wed, 27 Sep 2006 17:51:38 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GSdZH-0001MI-UY; Wed, 27 Sep 2006 13:51:36 -0400 Date: Wed, 27 Sep 2006 17:51:00 -0000 From: Daniel Jacobowitz To: Mitchell Fang Cc: gdb@sourceware.org Subject: Re: GDB stub - connection from 32 bit GDB or 64 bit GDB Message-ID: <20060927175135.GA4736@nevyn.them.org> Mail-Followup-To: Mitchell Fang , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00164.txt.bz2 It always amazes me how a problem will be known but quiet for a couple of years, and then half a dozen people will look at it at once :-) On Wed, Sep 27, 2006 at 10:34:45AM -0700, Mitchell Fang wrote: > Hi, > > How can the gdb stub know if a 32 bit GDB is connecting to the stub > or a 64 bit GDB is connecting to the stub? Is it even possible? It > doesn't seem possible to me looking at the current gdb remote > commands, but hopefully I overlooked something. It's not possible. > I have tried different combinations with 32-bit and 64-bit GDBs and > gdbservers and it seems like a 32 bit GDB will not work with a 64 bit > gdbserver and vice versa. The stub shouldn't adapt: the GDB client should. This may be of interest: http://sourceware.org/ml/gdb-patches/2006-09/msg00187.html http://sourceware.org/ml/gdb-patches/2006-09/msg00188.html I'm less optimistic I'll have my code out this week, but I'm still trying. What architecture are you using? -- Daniel Jacobowitz CodeSourcery