From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12380 invoked by alias); 7 Jul 2009 18:00:17 -0000 Received: (qmail 12157 invoked by uid 22791); 7 Jul 2009 18:00:13 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jul 2009 18:00:05 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id n67Hxi5O026100; Tue, 7 Jul 2009 19:59:44 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id n67HxhcF026713; Tue, 7 Jul 2009 19:59:43 +0200 (CEST) Date: Tue, 07 Jul 2009 18:00:00 -0000 Message-Id: <200907071759.n67HxhcF026713@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: uweigand@de.ibm.com CC: jan.kratochvil@redhat.com, drow@false.org, tromey@redhat.com, mark.kettenis@xs4all.nl, gdb-patches@sourceware.org In-reply-to: <200907071624.n67GO6bj015890@d12av02.megacenter.de.ibm.com> (uweigand@de.ibm.com) Subject: Re: [patch] Fix i386 memory-by-register access on amd64 References: <200907071624.n67GO6bj015890@d12av02.megacenter.de.ibm.com> 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/msg00207.txt.bz2 > Date: Tue, 7 Jul 2009 18:24:06 +0200 (CEST) > From: "Ulrich Weigand" > > Jan Kratochvil wrote: > > > Updated the patch to do on 64bit hosts exactly the same what 32bit hosts do. > > 32bit hosts do all the CORE_ADDR calculations 64bit, just the final ptrace > > call strips the width to 32bits. > > Hmm, I'm wondering how this would affect platforms where addresses are > generally treated as signed integers (MIPS ?). Dan, do you know if the > kernel expects the ptrace address argument to be sign-extended on MIPS? Yes, I expect that to be the case for targets that do an ILP32 ABI on a 64-bit CPU where there's a "hole" in the moddle of the 64-bit virtual adddress space. > This should be done inside the TARGET_OBJECT_MEMORY case; there is no reason > why the same truncation should be performed for other object types. But then I don't understand Jan's diff at all. Linux has its own implementation for TARGET_OBJECT_MEMORY in linux-nat.c. Why isn't that one used?