Fix regression in Ada do_full_match
An earlier patch to ada-lang.c:do_full_match introduced a subtle
change to the semantics. The previous code did:
- if (strncmp (sym_name, search_name, search_name_len) == 0
- && is_name_suffix (sym_name + search_name_len))
- return true;
-
- if (startswith (sym_name, "_ada_")
whereas the new code unconditionally skips a leading "_ada_".
The difference occurs if the lookup name itself starts with "_ada_".
In this case, the symbol won't match.
Normally this doesn't seem to be a problem. However, it caused a
regression on one particular (internal) test case on one particular
platform.
This patch changes the code to handle this case. I don't know how to
write a reliable test case for this, so no test is included.
2021-01-07 Tom Tromey <tromey@adacore.com>
* ada-lang.c (do_full_match): Conditionally skip "_ada_" prefix.