diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ada-lang.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c13c1d4..5f58e6c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2014-11-19 Joel Brobecker <brobecker@adacore.com> + * ada-lang.c (ada_unqualified_name): Return DECODED_NAME if + it starts with '<'. + +2014-11-19 Joel Brobecker <brobecker@adacore.com> + * ada-lang.c (ada_is_redundant_range_encoding): New function. (ada_is_redundant_index_type_desc): New function. (to_fixed_array_type): Ignore parallel XA type if redundant. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 077c29a..e46ad8e 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -523,8 +523,16 @@ ada_typedef_target_type (struct type *type) static const char * ada_unqualified_name (const char *decoded_name) { - const char *result = strrchr (decoded_name, '.'); + const char *result; + + /* If the decoded name starts with '<', it means that the encoded + name does not follow standard naming conventions, and thus that + it is not your typical Ada symbol name. Trying to unqualify it + is therefore pointless and possibly erroneous. */ + if (decoded_name[0] == '<') + return decoded_name; + result = strrchr (decoded_name, '.'); if (result != NULL) result++; /* Skip the dot... */ else |