diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-24 16:51:56 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-24 16:51:56 +0000 |
commit | d413ede70cb8fa9f780f6eadb5c2a42e507cf0e8 (patch) | |
tree | ba37db55fe9756d23aa85b6de5524bb4771a4a1e | |
parent | bc4c522239504bf3927696b78f48bbd043b3d96a (diff) | |
download | gdb-d413ede70cb8fa9f780f6eadb5c2a42e507cf0e8.tar.gz |
* valops.c (value_one): Reimplement broken decimal-float case.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/valops.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fff6bba1b38..95d41e5b47a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com> + * valops.c (value_one): Reimplement broken decimal-float case. + +2009-06-23 Ulrich Weigand <uweigand@de.ibm.com> + * eval.c (evaluate_subexp_standard): Use expression architecture instead of current_gdbarch. diff --git a/gdb/valops.c b/gdb/valops.c index 05585c997af..1d193939aad 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -537,15 +537,12 @@ struct value * value_one (struct type *type, enum lval_type lv) { struct type *type1 = check_typedef (type); - struct value *val = NULL; /* avoid -Wall warning */ + struct value *val; if (TYPE_CODE (type1) == TYPE_CODE_DECFLOAT) { - struct value *int_one = value_from_longest (builtin_type_int32, 1); - struct value *val; gdb_byte v[16]; - - decimal_from_integral (int_one, v, TYPE_LENGTH (builtin_type_int32)); + decimal_from_string (v, TYPE_LENGTH (type), "1"); val = value_from_decfloat (type, v); } else if (TYPE_CODE (type1) == TYPE_CODE_FLT) |