+2020-12-05 Joel Brobecker <brobecker@adacore.com>
+
+ * gmp-utils.c (gdb_mpz::read): Use HOST_CHAR_BIT instead of
+ TARGET_CHAR_BIT.
+ (gdb_mpz::write): Likewise.
+
2020-12-04 Simon Marchi <simon.marchi@efficios.com>
* amd64-linux-tdep.c (amd64_linux_init_abi): Pass 2 as the
was in fact negative, we need to adjust VAL accordingly. */
gdb_mpz max;
- mpz_ui_pow_ui (max.val, 2, buf.size () * TARGET_CHAR_BIT - 1);
+ mpz_ui_pow_ui (max.val, 2, buf.size () * HOST_CHAR_BIT - 1);
if (mpz_cmp (val, max.val) >= 0)
mpz_submul_ui (val, max.val, 2);
}
would be the same as our negative value. */
gdb_mpz neg_offset;
- mpz_ui_pow_ui (neg_offset.val, 2, buf.size () * TARGET_CHAR_BIT);
+ mpz_ui_pow_ui (neg_offset.val, 2, buf.size () * HOST_CHAR_BIT);
mpz_add (exported_val.val, exported_val.val, neg_offset.val);
}