diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-07-12 17:07:11 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-07-12 17:07:11 +0000 |
commit | 953ac07ed78d7fa016fe4ef551afc513700aa393 (patch) | |
tree | e28f1983643f50e0c2353176c89b595a65d8de6d | |
parent | c0e7d30b1e38dd09815e6081fc3d89bf3c478feb (diff) | |
download | gdb-953ac07ed78d7fa016fe4ef551afc513700aa393.zip gdb-953ac07ed78d7fa016fe4ef551afc513700aa393.tar.gz gdb-953ac07ed78d7fa016fe4ef551afc513700aa393.tar.bz2 |
gdb/
* dwarf2read.c (read_subrange_type): Call read_subrange_type.
* p-lang.c (pascal_printstr): Likewise.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 2 | ||||
-rw-r--r-- | gdb/p-lang.c | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d1964c1..9ebaaf9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-07-12 Jan Kratochvil <jan.kratochvil@redhat.com> + + * dwarf2read.c (read_subrange_type): Call read_subrange_type. + * p-lang.c (pascal_printstr): Likewise. + 2010-07-09 Tom Tromey <tromey@redhat.com> * python/py-prettyprint.c (gdbpy_get_display_hint): Don't use diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index e4ab034..d128312 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -6332,6 +6332,8 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) LONGEST negative_mask; base_type = die_type (die, cu); + /* Preserve BASE_TYPE's original type, just set its LENGTH. */ + check_typedef (base_type); /* The die_type call above may have already set the type for this DIE. */ range_type = get_die_type (die, cu); 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 |