diff options
author | Alan Modra <amodra@gmail.com> | 2019-11-27 18:00:59 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-11-27 19:10:11 +1030 |
commit | 7f3bf38453acbabf7286dd7f8ce2688282e7b9cd (patch) | |
tree | f8f2436c5e8dc4e5deb7089b7418f76a72aab57f /bfd/elfxx-mips.c | |
parent | e76790600aeba4939225eda32e59642ed2813ac8 (diff) | |
download | gdb-7f3bf38453acbabf7286dd7f8ce2688282e7b9cd.zip gdb-7f3bf38453acbabf7286dd7f8ce2688282e7b9cd.tar.gz gdb-7f3bf38453acbabf7286dd7f8ce2688282e7b9cd.tar.bz2 |
PR23652, Use symbols from debug bfd for _bfd_elf_find_function properly
There were a number of problems with the previous patch. Firstly,
_bfd_dwarf2_stash_syms didn't do anything when the original file had
dynamic symbols, and secondly, info found by the symbol search didn't
make it out of _bfd_elf_find_nearest_line except in the case of DWARF
functions without external linkage.
PR 23652
* dwarf2.c (_bfd_dwarf2_stash_syms): Break out of loop on finding
matching section.
(_bfd_dwarf2_find_nearest_line): Return an int, with value 2 when
returning info from the symbol table. Do the _bfd_elf_find_function
search also when !found. Call _bfd_dwarf2_stash_syms regardless of
symbols.
* elf64-alpha.c (elf64_alpha_find_nearest_line): Accept dwarf2
result of 1 only.
* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
* libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
* libbfd.h: Regenerate.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r-- | bfd/elfxx-mips.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index e9af7ab..b1f83a0 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -13078,7 +13078,8 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols, filename_ptr, functionname_ptr, line_ptr, discriminator_ptr, dwarf_debug_sections, - &elf_tdata (abfd)->dwarf2_find_line_info)) + &elf_tdata (abfd)->dwarf2_find_line_info) + == 1) return TRUE; if (_bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset, |