aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-02-23 07:30:26 -0700
committerTom Tromey <tromey@adacore.com>2023-03-14 08:16:39 -0600
commit302273ca843fc3ddbe8210e6d30459316bf04f0e (patch)
tree93807817bec50bb5d5700fdfb3f6603b0907ce0e /gdb/valops.c
parentc8a67010d133374dfb3b4ed88da7953702a2091d (diff)
downloadbinutils-302273ca843fc3ddbe8210e6d30459316bf04f0e.zip
binutils-302273ca843fc3ddbe8210e6d30459316bf04f0e.tar.gz
binutils-302273ca843fc3ddbe8210e6d30459316bf04f0e.tar.bz2
Add methods and operators to gdb_mpz
This adds various methods and operators to gdb_mpz, as a step toward hiding the implementation. This only adds the operators that were needed. Many more could be added as required.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 3a1b14c..e0936d4 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -354,7 +354,7 @@ value_to_gdb_mpq (struct value *value)
gdb_mpz vz;
vz.read (value->contents (), type_byte_order (type),
type->is_unsigned ());
- mpq_set_z (result.val, vz.val);
+ result = vz;
if (is_fixed_point_type (type))
mpq_mul (result.val, result.val,