X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fp-lang.c;h=64d2e9f9be6ab66b742b7ae692ba8e9b20f971bc;hb=790c20f3f358afee041c54335081e4d877924ce3;hp=08738ac28007d63da5506a7450941a9f6bc4c5e9;hpb=ad3bbd48b65047845b258564db3fd2e64e00c7bc;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/p-lang.c b/gdb/p-lang.c index 08738ac280..64d2e9f9be 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