diff options
author | Tom Tromey <tromey@adacore.com> | 2021-01-07 07:02:46 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2021-01-07 07:06:26 -0700 |
commit | 959d6a673ea5f5d3f057165318cee8cea07fd5fc (patch) | |
tree | 2bd7911a42eb5b6cb530d76979894bed5be2f57b /gdb/ChangeLog | |
parent | dc20061339031e391f974ccccb71137b51730494 (diff) | |
download | gdb-959d6a673ea5f5d3f057165318cee8cea07fd5fc.zip gdb-959d6a673ea5f5d3f057165318cee8cea07fd5fc.tar.gz gdb-959d6a673ea5f5d3f057165318cee8cea07fd5fc.tar.bz2 |
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.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dd8c01b..f3357d5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2021-01-07 Tom Tromey <tromey@adacore.com> + * ada-lang.c (do_full_match): Conditionally skip "_ada_" prefix. + +2021-01-07 Tom Tromey <tromey@adacore.com> + * ada-lang.c (add_component_interval): Start loop using vector's updated size. |