From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24348 invoked by alias); 14 Jan 2008 18:11:42 -0000 Received: (qmail 24339 invoked by uid 22791); 14 Jan 2008 18:11:41 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate3.de.ibm.com (HELO mtagate3.de.ibm.com) (195.212.29.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 14 Jan 2008 18:11:18 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.8/8.13.8) with ESMTP id m0EIBFim019780 for ; Mon, 14 Jan 2008 18:11:15 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 v8.7) with ESMTP id m0EIBEtJ2904304 for ; Mon, 14 Jan 2008 19:11:14 +0100 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 m0EIBEt3007405 for ; Mon, 14 Jan 2008 19:11:14 +0100 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 m0EIBEFw007402; Mon, 14 Jan 2008 19:11:14 +0100 Message-Id: <200801141811.m0EIBEFw007402@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 14 Jan 2008 19:11:14 +0100 Subject: Re: [patch] Remove BITS_BIG_ENDIAN from defs.h To: deuling@de.ibm.com (Markus Deuling) Date: Mon, 14 Jan 2008 18:11:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (GDB Patches), eliz@gnu.org (Eli Zaretskii) In-Reply-To: <4787B2E1.9060809@de.ibm.com> from "Markus Deuling" at Jan 11, 2008 07:18:09 PM X-Mailer: ELM [version 2.5 PL2] 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: 2008-01/txt/msg00330.txt.bz2 Markus Deuling wrote: > this patch removes BITS_BIG_ENDIAN from defs.h by replacing it with > its expression. The way to recognize endianess of a target is > gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG which is > widely used by most files. So this macro is unnecessary. As Dan and Eli pointed out, there *is* a difference between the two: - gdbarch_byte_order says whether in a multi-byte value, the least or most significant *byte* comes first - BITS_BIG_ENDIAN is intended to say whether in a bitfield, the least of most significant *bit* comes first Looking at GCC, there are targets with big endian byte order but little endian bit order (or vice versa), even though those are not supported in GDB today (or maybe they are but bitfields simply do not work correctly). Thus I think we should introduce a new gdbarch property to allow to set the bit order. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com