From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13141 invoked by alias); 20 Feb 2010 00:43:08 -0000 Received: (qmail 13133 invoked by uid 22791); 20 Feb 2010 00:43:08 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 20 Feb 2010 00:43:03 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1K0h28i021279 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Feb 2010 19:43:02 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1K0gxhi008635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 19:43:01 -0500 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 o1K0gxaQ015906; Sat, 20 Feb 2010 01:42:59 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o1K0gwmY015905; Sat, 20 Feb 2010 01:42:58 +0100 Date: Sat, 20 Feb 2010 00:43:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [patch] bfd/: bfd_elf_bfd_from_remote_memory 32bit &= 0xffffffff Message-ID: <20100220004258.GA15783@host0.dyn.jankratochvil.net> References: <20100211115730.GA7358@host0.dyn.jankratochvil.net> <20100211124302.GA8435__38068.0548646071$1265892205$gmane$org@host0.dyn.jankratochvil.net> <20100217113400.GA19312@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-08-17) 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: 2010-02/txt/msg00516.txt.bz2 On Wed, 17 Feb 2010 19:50:42 +0100, Tom Tromey wrote: > >>>>> "Jan" == Jan Kratochvil writes: > > Tom> It seems like you could just call the struct CORE_ADDR. > > Jan> I thought it would be good to have different type for _address_ vs. for > Jan> _displacement_. With this difference some math operations are no longer > Jan> valid and I have discovered for example: > > Ok, I see. But in that case wouldn't you still need (or want) to make > CORE_ADDR non-scalar, to avoid hidden errors? Yes but that would be even much larger patch than just converting CORE_ADDRs in use as a displacement into the non-scalar. It is true this "displacement-only-CORE_ADDRs" has missed some usages of CORE_ADDR as a displacement. But it is enough to catch the variable/field declaration over all the use points of it if it would be left as a scalar. Thanks, Jan