aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-lang.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-07-12 17:07:11 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-07-12 17:07:11 +0000
commit953ac07ed78d7fa016fe4ef551afc513700aa393 (patch)
treee28f1983643f50e0c2353176c89b595a65d8de6d /gdb/p-lang.c
parentc0e7d30b1e38dd09815e6081fc3d89bf3c478feb (diff)
downloadfsf-binutils-gdb-953ac07ed78d7fa016fe4ef551afc513700aa393.zip
fsf-binutils-gdb-953ac07ed78d7fa016fe4ef551afc513700aa393.tar.gz
fsf-binutils-gdb-953ac07ed78d7fa016fe4ef551afc513700aa393.tar.bz2
gdb/
* dwarf2read.c (read_subrange_type): Call read_subrange_type. * p-lang.c (pascal_printstr): Likewise.
Diffstat (limited to 'gdb/p-lang.c')
-rw-r--r--gdb/p-lang.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index 08738ac..64d2e9f 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -222,7 +222,11 @@ pascal_printstr (struct ui_file *stream, struct type *type,
unsigned int things_printed = 0;
int in_quotes = 0;
int need_comma = 0;
- int width = TYPE_LENGTH (type);
+ int width;
+
+ /* Preserve TYPE's original type, just set its LENGTH. */
+ check_typedef (type);
+ width = TYPE_LENGTH (type);
/* If the string was not truncated due to `set print elements', and
the last byte of it is a null, we don't print that, in traditional C