diff options
author | Tom de Vries <tdevries@suse.de> | 2020-06-10 14:46:53 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-06-10 14:46:53 +0200 |
commit | e5f3ece2ab3b14677c87d9694d822c9ee01b36fe (patch) | |
tree | a3d298550febe9d946af4f99b695edf00f538534 /gdb/dwarf2/index-write.c | |
parent | e1b5d517d1c293a64df311d2749bbbbfbe035a4c (diff) | |
download | binutils-e5f3ece2ab3b14677c87d9694d822c9ee01b36fe.zip binutils-e5f3ece2ab3b14677c87d9694d822c9ee01b36fe.tar.gz binutils-e5f3ece2ab3b14677c87d9694d822c9ee01b36fe.tar.bz2 |
[gdb/symtab] Fix name lookup in dw2_map_matching_symbols
In commit 9a0bacfb08 "[gdb/symtab] Handle .gdb_index in ada language mode", a
missing part of dw2_map_matching_symbols was added, containing a call to
dw2_expand_symtabs_matching_symbol.
However, the callback passed to that call has one problem: the callback has an
argument "offset_type namei", which is ignored. Instead, match_name is passed
as argument to dw2_symtab_iter_init, where a name lookup is done, which may or
may not yield the same value as namei.
Fix this by creating a new version of dw2_symtab_iter_init that takes a
"offset_type namei" argument instead of "const char *name", and passing namei.
Tested on x86_64-linux, with native and target board cc-with-gdb-index.
gdb/ChangeLog:
2020-06-10 Tom de Vries <tdevries@suse.de>
* dwarf2/read.c (dw2_symtab_iter_init_common): Factor out of ...
(dw2_symtab_iter_init): ... here. Add variant with "offset_type
namei" instead of "const char *name" argument.
(dw2_map_matching_symbols): Use "offset_type namei" variant of
dw2_symtab_iter_init.
Diffstat (limited to 'gdb/dwarf2/index-write.c')
0 files changed, 0 insertions, 0 deletions