aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@br.ibm.com>2007-10-25 17:57:34 +0000
committerThiago Jung Bauermann <bauerman@br.ibm.com>2007-10-25 17:57:34 +0000
commit7678ef8fb055dd4853c7c6b25f739a8d74650899 (patch)
tree8aeb5e60db77112eebd98380fb03e6d8048a16b4 /gdb/c-lang.c
parent9b913628cfe092b3fdd328de4264def1ec1e94cb (diff)
downloadgdb-7678ef8fb055dd4853c7c6b25f739a8d74650899.zip
gdb-7678ef8fb055dd4853c7c6b25f739a8d74650899.tar.gz
gdb-7678ef8fb055dd4853c7c6b25f739a8d74650899.tar.bz2
2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
Thiago Jung Bauermann <bauerman@br.ibm.com> * c-lang.c (c_create_fundamental_type): Create fundamental types for DFP. * c-typeprint.c (c_type_print_varspec_prefix): Add TYPE_CODE_DECFLOAT to no prefix needed case. (c_type_print_varspec_suffix): Add TYPE_CODE_DECFLOAT to no suffix needed case. * c-valprint.c (c_val_print): Call print_decimal_floating to print DFP values. * dwarf2read.c (read_base_type): Read DW_ATE_decimal_float attribute code and return TYPE_CODE_DECFLOAT. (dwarf_base_type): Set dwarf2_fundamental_type for DFP values. * gdbtypes.c (gdbtypes_post_init): Initialize builtin_decfloat, builtin_decdouble and builtin_declong. * gdbtypes.h (enum type_code): Add TYPE_CODE_DECFLOAT as a type code for DFP. (FT_DECFLOAT, FT_DBL_PREC_DECFLOAT, FT_EXT_PREC_DECFLOAT): New types, for decimal floating point. (FT_NUM_MEMBERS): Increment, new types added. (struct builtin_type): Add builtin_decfloat, builtin_decdouble and builtin_declong. * valprint.c (print_decimal_floating): New function to print DFP values. * value.h (print_decimal_floating): Prototype.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r--gdb/c-lang.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 7855551..9b4d1cd 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -325,6 +325,21 @@ c_create_fundamental_type (struct objfile *objfile, int typeid)
/ TARGET_CHAR_BIT,
0, "long double", objfile);
break;
+ case FT_DECFLOAT:
+ type = init_type (TYPE_CODE_DECFLOAT,
+ 32 / 8,
+ 0, "decimal float", objfile);
+ break;
+ case FT_DBL_PREC_DECFLOAT:
+ type = init_type (TYPE_CODE_DECFLOAT,
+ 64 / 8,
+ 0, "decimal double", objfile);
+ break;
+ case FT_EXT_PREC_DECFLOAT:
+ type = init_type (TYPE_CODE_DECFLOAT,
+ 128 / 8,
+ 0, "decimal long double", objfile);
+ break;
case FT_COMPLEX:
type = init_type (TYPE_CODE_FLT,
2 * gdbarch_float_bit (current_gdbarch)