diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-29 17:30:12 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-29 17:30:12 +0000 |
commit | 00436b86deaa81e8853604e42277b6ef3e0c9a71 (patch) | |
tree | 4c92214cf6abaeee0d6c998cba3cd479d52c8bfa /gdb/ada-typeprint.c | |
parent | ba02bf41eff6f8ceb3f06028bcb343470c50a841 (diff) | |
download | gdb-00436b86deaa81e8853604e42277b6ef3e0c9a71.tar.gz |
* ada-valprint.c (ada_print_scalar): Accept NULL type argument
to indicate scalar should be printed as default integer.
(print_optional_low_bound): Pass NULL to ada_print_scalar to
indicate default integer output.
* ada-typeprint.c (print_range, print_range_bound): Likewise.
(print_choices): Likewise. Thus, accept NULL as val_type.
* ada-lang.c (ada_variant_discrim_type): Return NULL when failed
to look up controlling discriminant name.
Diffstat (limited to 'gdb/ada-typeprint.c')
-rw-r--r-- | gdb/ada-typeprint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c index f4f925c0874..9fabd68515b 100644 --- a/gdb/ada-typeprint.c +++ b/gdb/ada-typeprint.c @@ -133,7 +133,7 @@ print_range (struct type *type, struct ui_file *stream) case TYPE_CODE_ENUM: break; default: - target_type = builtin_type_int32; + target_type = NULL; break; } @@ -181,12 +181,12 @@ print_range_bound (struct type *type, char *bounds, int *n, be printed as a signed or an unsigned value. This causes the upper bound of the 0 .. -1 range types to be printed as a very large unsigned number instead of -1. - To workaround this stabs deficiency, we replace the TYPE by - builtin_type_int32 when we detect that the bound is negative, + To workaround this stabs deficiency, we replace the TYPE by NULL + to indicate default output when we detect that the bound is negative, and the type is a TYPE_CODE_INT. The bound is negative when 'm' is the last character of the number scanned in BOUNDS. */ if (bounds[*n - 1] == 'm' && TYPE_CODE (type) == TYPE_CODE_INT) - type = builtin_type_int32; + type = NULL; ada_print_scalar (type, B, stream); if (bounds[*n] == '_') *n += 2; @@ -423,7 +423,7 @@ print_array_type (struct type *type, struct ui_file *stream, int show, } /* Print the choices encoded by field FIELD_NUM of variant-part TYPE on - STREAM, assuming the VAL_TYPE is the type of the values. */ + STREAM, assuming that VAL_TYPE (if non-NULL) is the type of the values. */ static void print_choices (struct type *type, int field_num, struct ui_file *stream, |