Fix TARGET_CHAR_BIT/HOST_CHAR_BIT confusion in gmp-utils.c
authorJoel Brobecker <brobecker@adacore.com>
Sat, 5 Dec 2020 08:03:48 +0000 (03:03 -0500)
committerJoel Brobecker <brobecker@adacore.com>
Sat, 5 Dec 2020 08:03:48 +0000 (03:03 -0500)
commit3c7ba803ac3fbf2b3d7960c14867844238029d55
treef8385120746722df4ada0e3a27ba362ce13e8873
parent7e45e7a9ab38ee904ca62ed9934e933fdb1d6e9c
Fix TARGET_CHAR_BIT/HOST_CHAR_BIT confusion in gmp-utils.c

In a couple of gdb_mpz methods, we are computing the number of
bits in a gdb::array_view of gdb_byte. Since gdb_byte is defined
using a host-side type (see common-types.h), the number of bits
in a gdb_byte should be HOST_CHAR_BIT, not TARGET_CHAR_BIT.

gdb/ChangeLog:

        * gmp-utils.c (gdb_mpz::read): Use HOST_CHAR_BIT instead of
        TARGET_CHAR_BIT.
        (gdb_mpz::write): Likewise.
gdb/ChangeLog
gdb/gmp-utils.c
This page took 0.024483 seconds and 4 git commands to generate.