aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-12-02 15:46:48 +1030
committerAlan Modra <amodra@gmail.com>2015-12-02 23:55:51 +1030
commit923b198a8426f02866f33362b26ed8bbf7a5c5cd (patch)
treed88697dfaa76f5c49207fe729990fa938a2a12e8 /bfd/elf-bfd.h
parent26e3a0c9ba4a8376fdf9f898637919d144d8b1d8 (diff)
downloadgdb-923b198a8426f02866f33362b26ed8bbf7a5c5cd.zip
gdb-923b198a8426f02866f33362b26ed8bbf7a5c5cd.tar.gz
gdb-923b198a8426f02866f33362b26ed8bbf7a5c5cd.tar.bz2
addr2line vs. inlined C functions called from C++
In this case the inlined function doesn't have DW_AT_linkage_name in .debug_info, but the language is C++ so find_nearest_line goes looking in the symbol table. Since the function is inlined the enclosing non-inline function symbol is returned from _bfd_elf_find_function, which is wrong. This patch only uses a symbol if its address matches. PR binutils/19315 * dwarf2.c (_bfd_elf_find_function): Return symbol matched. (_bfd_dwarf2_find_nearest_line): Check symbol returned above against dwarf range. * elf-bfd.h (_bfd_elf_find_function): Update prototype.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 2b05089..70e3327 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1996,7 +1996,7 @@ extern bfd_boolean _bfd_elf_find_line
(bfd *, asymbol **, asymbol *, const char **, unsigned int *);
extern bfd_boolean _bfd_elf_find_inliner_info
(bfd *, const char **, const char **, unsigned int *);
-extern bfd_boolean _bfd_elf_find_function
+extern asymbol *_bfd_elf_find_function
(bfd *, asymbol **, asection *, bfd_vma, const char **, const char **);
#define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol