From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4575 invoked by alias); 29 Apr 2009 20:45:55 -0000 Received: (qmail 4565 invoked by uid 22791); 29 Apr 2009 20:45:52 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Apr 2009 20:45:48 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3TKjhD3030647 for ; Wed, 29 Apr 2009 16:45:43 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3TKjhXQ023901 for ; Wed, 29 Apr 2009 16:45:43 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3TKjffi010825 for ; Wed, 29 Apr 2009 16:45:42 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n3TKjeVt026300; Wed, 29 Apr 2009 22:45:41 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id n3TKjehj026297; Wed, 29 Apr 2009 22:45:40 +0200 Date: Wed, 29 Apr 2009 20:45:00 -0000 From: Jan Kratochvil To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix i386 memory-by-register access on amd64 Message-ID: <20090429204539.GA26161@host0.dyn.jankratochvil.net> References: <20090429102719.GA10117@host0.dyn.jankratochvil.net> <200904291904.n3TJ4X7m000790@brahms.sibelius.xs4all.nl> <20090429202916.GA21831@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090429202916.GA21831@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.19 (2009-01-05) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00797.txt.bz2 On Wed, 29 Apr 2009 22:29:16 +0200, Jan Kratochvil wrote: > On Wed, 29 Apr 2009 21:04:33 +0200, Mark Kettenis wrote: > > I'm not sure this is the right solution. On 64-bit machines where > > addresses are signed I think we actually want the sign extension to > > happen. > > While not trying to judge what is right or wrong: > > I believe gdb.x86_64 debugging gdb.i386 inferior should behave exactly as > gdb.i386 debugging gdb.i386 inferior. > > As gdb.i386 already has sizeof (CORE_ADDR) == 4 I find right that gdb.x86_64 > with i386 inferior should cut CORE_ADDR whenever possible. That's not true, even gdb.i386 has sizeof (CORE_ADDR) == 8. But the behavior is as described. > Otherwise we should fix gdb.i386 to also error on this (current behavior) case: > (gdb) x/x 0xfffffffff7ffcfc4 > 0xf7ffcfc4: 0x00020efc Sorry, Jan