This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Remove BITS_BIG_ENDIAN from defs.h
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: deuling at de dot ibm dot com (Markus Deuling)
- Cc: gdb-patches at sourceware dot org (GDB Patches), eliz at gnu dot org (Eli Zaretskii), drow at false dot org (Daniel Jacobowitz)
- Date: Tue, 15 Jan 2008 22:01:02 +0100 (CET)
- Subject: Re: [patch] Remove BITS_BIG_ENDIAN from defs.h
Markus Deuling wrote:
> @@ -251,6 +252,7 @@ struct gdbarch startup_gdbarch =
> /*per-architecture data-pointers and swap regions */
> 0, NULL, NULL,
> /* Multi-arch values */
> + 0, /* bits_big_endian */
> 8 * sizeof (short), /* short_bit */
> 8 * sizeof (int), /* int_bit */
> 8 * sizeof (long), /* long_bit */
The "static default" of 0 for bits_big_endian is inconsistent
with the static default of BFD_ENDIAN_BIG for byte_order ...
> +# The bit byte-order has to do just with numbering of bits in debugging symbols
> +# and such. Conceptually, it's quite separate from byte/word byte order.
> +v:int:bits_big_endian:::0:(gdbarch->byte_order == BFD_ENDIAN_BIG)::0
... so I guess this should preferably be:
v:int:bits_big_endian:::1:(gdbarch->byte_order == BFD_ENDIAN_BIG)::0
Otherwise, this patch is OK, but please commit only together with ...
>I tested this patch on both Little and Big Endian machine (x86/ppc) without regression.
>If this patch is ok I'll post another one for the documentation. Ok to commit?
... the documentation patch (once that is approved).
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com