diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-05-18 14:00:08 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-05-18 14:00:08 +0000 |
commit | dddfab26ac67f22f609b7cd61318a2fca0b319e8 (patch) | |
tree | 02e2d195f3dc5cece2cd0e36d49a80f887f8b07c /gdb | |
parent | 556bdfd450aca2814fa8db1ea6581c46f8f4fe92 (diff) | |
download | gdb-dddfab26ac67f22f609b7cd61318a2fca0b319e8.zip gdb-dddfab26ac67f22f609b7cd61318a2fca0b319e8.tar.gz gdb-dddfab26ac67f22f609b7cd61318a2fca0b319e8.tar.bz2 |
* ada-lang.c (ada_find_any_type): Move check for primitive types ...
(to_fixed_range_type): ... to here.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ada-lang.c | 18 |
2 files changed, 15 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fe83b73..75520fc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com> + * ada-lang.c (ada_find_any_type): Move check for primitive types ... + (to_fixed_range_type): ... to here. + +2009-05-18 Ulrich Weigand <uweigand@de.ibm.com> + * ada-lang.c (desc_data_type): Remove, replace by ... (desc_data_target_type): ... this. (thin_data_pntr): Use desc_data_target_type instead of desc_data_type. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index bf88ac1..4a45a62 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -6481,22 +6481,19 @@ ada_find_any_symbol (const char *name) return sym; } -/* Find a type named NAME. Ignores ambiguity. */ +/* Find a type named NAME. Ignores ambiguity. This routine will look + solely for types defined by debug info, it will not search the GDB + primitive types. */ struct type * ada_find_any_type (const char *name) { struct symbol *sym = ada_find_any_symbol (name); - struct type *type = NULL; if (sym != NULL) - type = SYMBOL_TYPE (sym); + return SYMBOL_TYPE (sym); - if (type == NULL) - type = language_lookup_primitive_type_by_name - (language_def (language_ada), current_gdbarch, name); - - return type; + return NULL; } /* Given NAME and an associated BLOCK, search all symbols for @@ -9451,6 +9448,11 @@ to_fixed_range_type (char *name, struct value *dval, struct objfile *objfile) struct type *base_type; char *subtype_info; + /* Also search primitive types if type symbol could not be found. */ + if (raw_type == NULL) + raw_type = language_lookup_primitive_type_by_name + (language_def (language_ada), current_gdbarch, name); + if (raw_type == NULL) base_type = builtin_type_int32; else if (TYPE_CODE (raw_type) == TYPE_CODE_RANGE) |