From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20663 invoked by alias); 13 Jul 2009 17:08:39 -0000 Received: (qmail 20648 invoked by uid 22791); 13 Jul 2009 17:08:39 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jul 2009 17:08:29 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.14.3/8.13.8) with ESMTP id n6DH8BbZ331690 for ; Mon, 13 Jul 2009 17:08:11 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n6DH8Bmk2719888 for ; Mon, 13 Jul 2009 19:08:11 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n6DH8AeR016454 for ; Mon, 13 Jul 2009 19:08:11 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n6DH896H016447; Mon, 13 Jul 2009 19:08:09 +0200 Message-Id: <200907131708.n6DH896H016447@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 13 Jul 2009 19:08:09 +0200 Subject: Re: [patch] Fix i386 memory-by-register access on amd64 To: jan.kratochvil@redhat.com (Jan Kratochvil) Date: Mon, 13 Jul 2009 18:10:00 -0000 From: "Ulrich Weigand" Cc: mark.kettenis@xs4all.nl (Mark Kettenis), drow@false.org, tromey@redhat.com (Tom Tromey), gdb-patches@sourceware.org In-Reply-To: <20090708144136.GA6490@host0.dyn.jankratochvil.net> from "Jan Kratochvil" at Jul 08, 2009 04:41:37 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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-07/txt/msg00361.txt.bz2 Jan Kratochvil wrote: > Therefore fixed linux_xfer_partial. Therefore it no longer needs the fix to > be present also in inf_ptrace_xfer_partial. I do not know how non-Linux OSes > handle the debugging of 32bit inferior on 64bit GDB so I have no opinion > whether the inf_ptrace_xfer_partial patch makes sense, i can drop it. I think at this point it would probably be better to just to the Linux fix. I've looked at a couple of ptrace implementations in the Linux kernel, and it seems this fix should be correct on all bi-arch Linux platforms. I simply do not know enough how ptrace behaves on other OSes -- until we get a specific bug report on some other OS, I think we should leave the behaviour unchanged for now. > 2009-07-08 Jan Kratochvil > > Fix memory access from signed 32bit inferior registers on 64bit GDB. > * inf-ptrace.c (inf_ptrace_xfer_partial ): New > variable addr_bit. Mask OFFSET by the ADDR_BIT width. > * linux-nat.c (linux_xfer_partial ): Likewise. > > 2009-07-08 Jan Kratochvil > > * gdb.arch/amd64-i386-address.exp, gdb.arch/amd64-i386-address.S: New. The linux-nat.c change and the test case are OK. Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com