aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@br.ibm.com>2007-10-25 18:01:58 +0000
committerThiago Jung Bauermann <bauerman@br.ibm.com>2007-10-25 18:01:58 +0000
commit27bc4d809ea2b4a3e4833806494db3a2fee83c64 (patch)
tree828f8e1b2e3e055419d3ce36e1d1cb41742d0a5a /gdb/value.h
parent7678ef8fb055dd4853c7c6b25f739a8d74650899 (diff)
downloadgdb-27bc4d809ea2b4a3e4833806494db3a2fee83c64.zip
gdb-27bc4d809ea2b4a3e4833806494db3a2fee83c64.tar.gz
gdb-27bc4d809ea2b4a3e4833806494db3a2fee83c64.tar.bz2
2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
Thiago Jung Bauermann <bauerman@br.ibm.com> * c-exp.y (YYSTYPE): Add typed_val_decfloat for decimal floating point in YYSTYPE union. (DECFLOAT) Add token and expression element handling code. (parse_number): Parse DFP constants, which end with suffix 'df', 'dd' or 'dl'. Return DECFLOAT. * eval.c (evaluate_subexp_standard): Call value_from_decfloat to handle OP_DECFLOAT. * expression.h (enum exp_opcode): Add an opcode (OP_DECFLOAT) for DFP constants. (union exp_element): Add decfloatconst to represent DFP elements, which is 16 bytes by default. * parse.c (write_exp_elt_decfloatcst): New function to write a decimal float const into the expression. (operator_length_standard): Set operator length for OP_DECFLOAT to 4. * parser-defs.h (write_exp_elt_decfloatcst): Prototype. * valarith.c (value_neg): Add code to handle the negation operation of DFP values. * value.c (value_from_decfloat): New function to get the value from a decimal floating point. * value.h (value_from_decfloat): Prototype.
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 7026466..ada7fc7 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -280,6 +280,9 @@ extern void pack_long (gdb_byte *buf, struct type *type, LONGEST num);
extern struct value *value_from_longest (struct type *type, LONGEST num);
extern struct value *value_from_pointer (struct type *type, CORE_ADDR addr);
extern struct value *value_from_double (struct type *type, DOUBLEST num);
+extern struct value *value_from_decfloat (struct type *expect_type,
+ struct type *type,
+ gdb_byte decbytes[16]);
extern struct value *value_from_string (char *string);
extern struct value *value_at (struct type *type, CORE_ADDR addr);