From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8031 invoked by alias); 23 Jun 2009 17:30:29 -0000 Received: (qmail 8022 invoked by uid 22791); 23 Jun 2009 17:30:28 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Jun 2009 17:30:19 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 0B0621018C; Tue, 23 Jun 2009 17:30:17 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id E413510148; Tue, 23 Jun 2009 17:30:16 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MJ9p2-0007k0-7Q; Tue, 23 Jun 2009 13:30:16 -0400 Date: Tue, 23 Jun 2009 17:30:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: Doug Evans , gdb-patches@sourceware.org Subject: Re: Per-type architecture (Re: [10/15] Basic value access routines) Message-ID: <20090623173016.GA29740@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , Doug Evans , gdb-patches@sourceware.org References: <20090623134938.GA12312@caradoc.them.org> <200906231700.n5NH0Op5017747@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906231700.n5NH0Op5017747@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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-06/txt/msg00621.txt.bz2 On Tue, Jun 23, 2009 at 07:00:24PM +0200, Ulrich Weigand wrote: > We *do* need the architecture to interpret bitfield types; see e.g. the > comment in gdbtypes.h: > > /* Position of this field, counting in bits from start of > containing structure. > For gdbarch_bits_big_endian=1 targets, it is the bit offset to the MSB. > For gdbarch_bits_big_endian=0 targets, it is the bit offset to the LSB. > For a range bound or enum value, this is the value itself. */ > > int bitpos; > > and the various references to gdbarch_bits_big_endian (current_gdbarch) > in unpack_field_as_long, modify_field, etc. There's no way to operate > on a bitfield value without knowledge of this property. You're right, we do - it's a very odd representation where we need the endianness both to set and to use the position, if you ask me, but it does tend to line up with symbol readers. > OK, thanks. I've checked the patch in now. Great. I'll let you know if I have any problems. -- Daniel Jacobowitz CodeSourcery