summaryrefslogtreecommitdiff
path: root/gdb/ch-typeprint.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1993-01-19 23:00:19 +0000
committerFred Fish <fnf@specifix.com>1993-01-19 23:00:19 +0000
commitec16f7015b91a7324011b41f6a13dfab0fd5d21a (patch)
treee7f4babdb56207372200a6e11c3f46b4bbcacb97 /gdb/ch-typeprint.c
parentfa2b89f1032989451742a5a75bcdec34736f903a (diff)
downloadbinutils-gdb-ec16f7015b91a7324011b41f6a13dfab0fd5d21a.tar.gz
* c-exp.y (exp): Add production to support direct creation
of array constants using the obvious syntax. * c-valprint.c (c_val_print): Set printed string length. * dwarfread.c (read_tag_string_type): New prototype and function that handles TAG_string_type DIEs. * dwarfread.c (process_dies): Add case for TAG_string_type that calls new read_tag_string_type function. * expprint.c (print_subexp): Add support for OP_ARRAY. * gdbtypes.c (create_range_type, create_array_type): Inherit objfile from the index type. **** start-sanitize-chill **** * ch-typeprint.c (chill_print_type): Add case for TYPE_CODE_STRING. * ch-valprint.c (chill_val_print): Fix case for TYPE_CODE_STRING. **** end-sanitize-chill ****
Diffstat (limited to 'gdb/ch-typeprint.c')
-rw-r--r--gdb/ch-typeprint.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ch-typeprint.c b/gdb/ch-typeprint.c
index cd3dd367d4a..f4119ca149a 100644
--- a/gdb/ch-typeprint.c
+++ b/gdb/ch-typeprint.c
@@ -70,6 +70,16 @@ chill_print_type (type, varstring, stream, show, level)
fputs_filtered (") ", stream);
chill_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level);
break;
+
+ case TYPE_CODE_STRING:
+ range_type = TYPE_FIELD_TYPE (type, 0);
+ index_type = TYPE_TARGET_TYPE (range_type);
+ high_bound = TYPE_FIELD_BITPOS (range_type, 1);
+ fputs_filtered ("char (", stream);
+ print_type_scalar (index_type, high_bound + 1, stream);
+ fputs_filtered (") ", stream);
+ break;
+
default:
chill_print_type_base (type, stream, show, level);
break;