mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-04-12 14:33:06 +08:00
bfd: Add bfd_find_nearest_line_with_alt
bfd_find_nearest_line_with_alt functions like bfd_find_nearest_line with the addition of a parameter for specifying the filename of a supplementary debug file such as one referenced by .gnu_debugaltlink or .debug_sup. This patch focuses on implementing bfd_find_nearest_line_with_alt support for ELF/DWARF2 .gnu_debugaltlink. For other targets this function simply sets the invalid_operation bfd_error.
This commit is contained in:
parent
cb21dd0c59
commit
6e7a29c7de
@ -1,3 +1,52 @@
|
||||
2022-09-02 Aaron Merey <amerey@redhat.com>
|
||||
|
||||
* aout-target.h (MY_find_nearest_line_with_alt): New macro.
|
||||
* bfd-in2.h: Regenerate.
|
||||
* bfd.c (bfd_find_nearest_line_with_alt): New macro.
|
||||
* binary.c (binary_find_nearest_line_with_alt): New macro.
|
||||
* coff-rs6000.c (_bfd_xcoff_find_nearest_line_with_alt): New macro.
|
||||
(rs6000_xcoff64_vec): Add coff_find_nearest_line_with_alt.
|
||||
* dwarf2.c (_bfd_dwarf2_find_nearest_line): Calls
|
||||
_bfd_dwarf2_find_nearest_line_with_alt.
|
||||
(_bfd_dwarf2_find_nearest_line_with_alt): New function. Implements the
|
||||
former _bfd_dwarf2_find_nearest_line. Adds parameter alt_filename.
|
||||
Attempt to open alt_filename and use it as the .dwz file if not NULL.
|
||||
* elf-bfd.h (_bfd_elf_find_nearest_line_with_alt): New declaration.
|
||||
* elf.c (_bfd_elf_find_nearest_line): Calls
|
||||
_bfd_elf_find_nearest_line_with_alt.
|
||||
(_bfd_elf_find_nearest_line_with_alt): New function. Implements the
|
||||
former _bfd_elf_find_nearest_line. Adds parameter alt_filename.
|
||||
* elf32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro.
|
||||
* elf64-mips.c (bfd_elf64_find_nearest_line_with_alt): New macro.
|
||||
* elfn32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro.
|
||||
* elfxx-mips.h (_bfd_mips_elf_find_nearest_line_with_alt): New macro.
|
||||
* elfxx-target.h (bfd_elfNN_find_nearest_line_with_alt): New macro.
|
||||
* i386mdos.c (msdos_find_nearest_line_with_alt): New macro.
|
||||
* ihex.c (ihex_find_nearest_line_with_alt): New macro.
|
||||
* libbfd-in.h (_bfd_nosymbols_find_nearest_line_with_alt): New
|
||||
declaration.
|
||||
(_bfd_dwarf2_find_nearest_line_with_alt): New declaration.
|
||||
* libbfd.h: Regenerate.
|
||||
* libcoff-in.h (coff_find_nearest_line_with_alt): New macro.
|
||||
* libcoff.h: Regenerate.
|
||||
* libecoff.h (_bfd_ecoff_find_nearest_line_with_alt): New macro.
|
||||
* mach-o.h (bfd_mach_o_find_nearest_line_with_alt): New macro.
|
||||
* mmo.c (mmo_find_nearest_line_with_alt): New macro.
|
||||
* pef.c (bfd_pef_find_nearest_line_with_alt): New macro.
|
||||
* plugin.c (bfd_plugin_find_nearest_line_with_alt): New macro.
|
||||
* ppcboot.c (ppcboot_find_nearest_line_with_alt): New macro.
|
||||
* som.h (som_find_nearest_line_with_alt): New macro.
|
||||
* srec.c (srec_find_nearest_line_with_alt): New macro.
|
||||
* syms.c (_bfd_nosymbols_find_nearest_line_with_alt): New function.
|
||||
* targets.c (BFD_JUMP_TABLE_SYMBOLS): Add symbol for
|
||||
NAME##_find_nearest_line_with_alt.
|
||||
(_bfd_find_nearest_line_with_alt): Add declaration.
|
||||
* tekhex.c (tekhex_find_nearest_line_with_alt): New macro.
|
||||
* verilog.c (verilog_find_nearest_line_with_alt): New macro.
|
||||
* vms-alpha.c (_bfd_vms_find_nearest_line_with_alt): New macro.
|
||||
* wasm-module.c (wasm_find_nearest_line_with_alt): New macro.
|
||||
* xsym.c (bfd_sym_find_nearest_line_with_alt): New macro.
|
||||
|
||||
2022-09-02 Frederic Cambus <fred@statdns.com>
|
||||
|
||||
* config.bfd (arm-*-openbsd*): Restore target.
|
||||
|
@ -475,6 +475,9 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
|
||||
#ifndef MY_find_nearest_line
|
||||
#define MY_find_nearest_line NAME (aout, find_nearest_line)
|
||||
#endif
|
||||
#ifndef MY_find_nearest_line_with_alt
|
||||
#define MY_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#endif
|
||||
#ifndef MY_find_line
|
||||
#define MY_find_line _bfd_nosymbols_find_line
|
||||
#endif
|
||||
|
@ -7162,6 +7162,11 @@ bool bfd_set_private_flags (bfd *abfd, flagword flags);
|
||||
BFD_SEND (abfd, _bfd_find_nearest_line, \
|
||||
(abfd, syms, sec, off, file, func, line, NULL))
|
||||
|
||||
#define bfd_find_nearest_line_with_alt(abfd, alt_filename, sec, syms, off, \
|
||||
file, func, line, disc) \
|
||||
BFD_SEND (abfd, _bfd_find_nearest_line_with_alt, \
|
||||
(abfd, alt_filename, syms, sec, off, file, func, line, disc))
|
||||
|
||||
#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
|
||||
line, disc) \
|
||||
BFD_SEND (abfd, _bfd_find_nearest_line, \
|
||||
@ -7554,6 +7559,7 @@ typedef struct bfd_target
|
||||
NAME##_bfd_is_target_special_symbol, \
|
||||
NAME##_get_lineno, \
|
||||
NAME##_find_nearest_line, \
|
||||
NAME##_find_nearest_line_with_alt, \
|
||||
NAME##_find_line, \
|
||||
NAME##_find_inliner_info, \
|
||||
NAME##_bfd_make_debug_symbol, \
|
||||
@ -7584,6 +7590,11 @@ typedef struct bfd_target
|
||||
struct bfd_section *, bfd_vma,
|
||||
const char **, const char **,
|
||||
unsigned int *, unsigned int *);
|
||||
bool (*_bfd_find_nearest_line_with_alt) (bfd *, const char *,
|
||||
struct bfd_symbol **,
|
||||
struct bfd_section *, bfd_vma,
|
||||
const char **, const char **,
|
||||
unsigned int *, unsigned int *);
|
||||
bool (*_bfd_find_line) (bfd *, struct bfd_symbol **,
|
||||
struct bfd_symbol *, const char **,
|
||||
unsigned int *);
|
||||
|
@ -2050,6 +2050,11 @@ DESCRIPTION
|
||||
. BFD_SEND (abfd, _bfd_find_nearest_line, \
|
||||
. (abfd, syms, sec, off, file, func, line, NULL))
|
||||
.
|
||||
.#define bfd_find_nearest_line_with_alt(abfd, alt_filename, sec, syms, off, \
|
||||
. file, func, line, disc) \
|
||||
. BFD_SEND (abfd, _bfd_find_nearest_line_with_alt, \
|
||||
. (abfd, alt_filename, syms, sec, off, file, func, line, disc))
|
||||
.
|
||||
.#define bfd_find_nearest_line_discriminator(abfd, sec, syms, off, file, func, \
|
||||
. line, disc) \
|
||||
. BFD_SEND (abfd, _bfd_find_nearest_line, \
|
||||
|
@ -206,6 +206,7 @@ binary_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
|
||||
#define binary_bfd_is_local_label_name bfd_generic_is_local_label_name
|
||||
#define binary_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define binary_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define binary_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define binary_find_line _bfd_nosymbols_find_line
|
||||
#define binary_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define binary_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
|
||||
|
@ -4409,6 +4409,8 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
|
||||
coff_bfd_is_target_special_symbol
|
||||
#define _bfd_xcoff_get_lineno coff_get_lineno
|
||||
#define _bfd_xcoff_find_nearest_line coff_find_nearest_line
|
||||
#define _bfd_xcoff_find_nearest_line_with_alt \
|
||||
coff_find_nearest_line_with_alt
|
||||
#define _bfd_xcoff_find_line coff_find_line
|
||||
#define _bfd_xcoff_find_inliner_info coff_find_inliner_info
|
||||
#define _bfd_xcoff_bfd_make_debug_symbol coff_bfd_make_debug_symbol
|
||||
|
@ -2667,6 +2667,7 @@ const bfd_target rs6000_xcoff64_vec =
|
||||
coff_bfd_is_target_special_symbol,
|
||||
coff_get_lineno,
|
||||
coff_find_nearest_line,
|
||||
coff_find_nearest_line_with_alt,
|
||||
coff_find_line,
|
||||
coff_find_inliner_info,
|
||||
coff_bfd_make_debug_symbol,
|
||||
@ -2939,6 +2940,7 @@ const bfd_target rs6000_xcoff64_aix_vec =
|
||||
coff_bfd_is_target_special_symbol,
|
||||
coff_get_lineno,
|
||||
coff_find_nearest_line,
|
||||
coff_find_nearest_line_with_alt,
|
||||
coff_find_line,
|
||||
coff_find_inliner_info,
|
||||
coff_bfd_make_debug_symbol,
|
||||
|
67
bfd/dwarf2.c
67
bfd/dwarf2.c
@ -5699,18 +5699,7 @@ _bfd_dwarf2_find_symbol_bias (asymbol ** symbols, void ** pinfo)
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Find the source code location of SYMBOL. If SYMBOL is NULL
|
||||
then find the nearest source code location corresponding to
|
||||
the address SECTION + OFFSET.
|
||||
Returns 1 if the line is found without error and fills in
|
||||
FILENAME_PTR and LINENUMBER_PTR. In the case where SYMBOL was
|
||||
NULL the FUNCTIONNAME_PTR is also filled in.
|
||||
Returns 2 if partial information from _bfd_elf_find_function is
|
||||
returned (function and maybe file) by looking at symbols. DWARF2
|
||||
info is present but not regarding the requested code location.
|
||||
Returns 0 otherwise.
|
||||
SYMBOLS contains the symbol table for ABFD.
|
||||
DEBUG_SECTIONS contains the name of the dwarf debug sections. */
|
||||
/* See _bfd_dwarf2_find_nearest_line_with_alt. */
|
||||
|
||||
int
|
||||
_bfd_dwarf2_find_nearest_line (bfd *abfd,
|
||||
@ -5724,6 +5713,43 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
|
||||
unsigned int *discriminator_ptr,
|
||||
const struct dwarf_debug_section *debug_sections,
|
||||
void **pinfo)
|
||||
{
|
||||
return _bfd_dwarf2_find_nearest_line_with_alt
|
||||
(abfd, NULL, symbols, symbol, section, offset, filename_ptr,
|
||||
functionname_ptr, linenumber_ptr, discriminator_ptr, debug_sections,
|
||||
pinfo);
|
||||
}
|
||||
|
||||
/* Find the source code location of SYMBOL. If SYMBOL is NULL
|
||||
then find the nearest source code location corresponding to
|
||||
the address SECTION + OFFSET.
|
||||
Returns 1 if the line is found without error and fills in
|
||||
FILENAME_PTR and LINENUMBER_PTR. In the case where SYMBOL was
|
||||
NULL the FUNCTIONNAME_PTR is also filled in.
|
||||
Returns 2 if partial information from _bfd_elf_find_function is
|
||||
returned (function and maybe file) by looking at symbols. DWARF2
|
||||
info is present but not regarding the requested code location.
|
||||
Returns 0 otherwise.
|
||||
SYMBOLS contains the symbol table for ABFD.
|
||||
DEBUG_SECTIONS contains the name of the dwarf debug sections.
|
||||
If ALT_FILENAME is given, attempt to open the file and use it
|
||||
as the .gnu_debugaltlink file. Otherwise this file will be
|
||||
searched for when needed. */
|
||||
|
||||
int
|
||||
_bfd_dwarf2_find_nearest_line_with_alt
|
||||
(bfd *abfd,
|
||||
const char *alt_filename,
|
||||
asymbol **symbols,
|
||||
asymbol *symbol,
|
||||
asection *section,
|
||||
bfd_vma offset,
|
||||
const char **filename_ptr,
|
||||
const char **functionname_ptr,
|
||||
unsigned int *linenumber_ptr,
|
||||
unsigned int *discriminator_ptr,
|
||||
const struct dwarf_debug_section *debug_sections,
|
||||
void **pinfo)
|
||||
{
|
||||
/* Read each compilation unit from the section .debug_info, and check
|
||||
to see if it contains the address we are searching for. If yes,
|
||||
@ -5755,6 +5781,23 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
|
||||
|
||||
stash = (struct dwarf2_debug *) *pinfo;
|
||||
|
||||
if (stash->alt.bfd_ptr == NULL && alt_filename != NULL)
|
||||
{
|
||||
bfd *alt_bfd = bfd_openr (alt_filename, NULL);
|
||||
|
||||
if (alt_bfd == NULL)
|
||||
/* bfd_openr will have set the bfd_error. */
|
||||
return false;
|
||||
if (!bfd_check_format (alt_bfd, bfd_object))
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
bfd_close (alt_bfd);
|
||||
return false;
|
||||
}
|
||||
|
||||
stash->alt.bfd_ptr = alt_bfd;
|
||||
}
|
||||
|
||||
do_line = symbol != NULL;
|
||||
if (do_line)
|
||||
{
|
||||
|
@ -2333,6 +2333,9 @@ extern bool _bfd_elf_set_arch_mach
|
||||
extern bool _bfd_elf_find_nearest_line
|
||||
(bfd *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *);
|
||||
extern bool _bfd_elf_find_nearest_line_with_alt
|
||||
(bfd *, const char *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *);
|
||||
extern bool _bfd_elf_find_line
|
||||
(bfd *, asymbol **, asymbol *, const char **, unsigned int *);
|
||||
extern bool _bfd_elf_find_inliner_info
|
||||
|
32
bfd/elf.c
32
bfd/elf.c
@ -9339,14 +9339,36 @@ _bfd_elf_find_nearest_line (bfd *abfd,
|
||||
const char **functionname_ptr,
|
||||
unsigned int *line_ptr,
|
||||
unsigned int *discriminator_ptr)
|
||||
{
|
||||
return _bfd_elf_find_nearest_line_with_alt (abfd, NULL, symbols, section,
|
||||
offset, filename_ptr,
|
||||
functionname_ptr, line_ptr,
|
||||
discriminator_ptr);
|
||||
}
|
||||
|
||||
/* Find the nearest line to a particular section and offset,
|
||||
for error reporting. ALT_BFD representing a .gnu_debugaltlink file
|
||||
can be optionally specified. */
|
||||
|
||||
bool
|
||||
_bfd_elf_find_nearest_line_with_alt (bfd *abfd,
|
||||
const char *alt_filename,
|
||||
asymbol **symbols,
|
||||
asection *section,
|
||||
bfd_vma offset,
|
||||
const char **filename_ptr,
|
||||
const char **functionname_ptr,
|
||||
unsigned int *line_ptr,
|
||||
unsigned int *discriminator_ptr)
|
||||
{
|
||||
bool found;
|
||||
|
||||
if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset,
|
||||
filename_ptr, functionname_ptr,
|
||||
line_ptr, discriminator_ptr,
|
||||
dwarf_debug_sections,
|
||||
&elf_tdata (abfd)->dwarf2_find_line_info))
|
||||
if (_bfd_dwarf2_find_nearest_line_with_alt (abfd, alt_filename, symbols, NULL,
|
||||
section, offset, filename_ptr,
|
||||
functionname_ptr, line_ptr,
|
||||
discriminator_ptr,
|
||||
dwarf_debug_sections,
|
||||
&elf_tdata (abfd)->dwarf2_find_line_info))
|
||||
return true;
|
||||
|
||||
if (_bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset,
|
||||
|
@ -2573,6 +2573,8 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
|
||||
_bfd_mips_elf_is_target_special_symbol
|
||||
#define bfd_elf32_get_synthetic_symtab _bfd_mips_elf_get_synthetic_symtab
|
||||
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
|
||||
#define bfd_elf32_find_nearest_line_with_alt \
|
||||
_bfd_mips_elf_find_nearest_line_with_alt
|
||||
#define bfd_elf32_find_inliner_info _bfd_mips_elf_find_inliner_info
|
||||
#define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook
|
||||
#define bfd_elf32_set_section_contents _bfd_mips_elf_set_section_contents
|
||||
|
@ -4792,6 +4792,8 @@ const struct elf_size_info mips_elf64_size_info =
|
||||
#define bfd_elf64_bfd_is_target_special_symbol \
|
||||
_bfd_mips_elf_is_target_special_symbol
|
||||
#define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line
|
||||
#define bfd_elf64_find_nearest_line_with_alt \
|
||||
_bfd_mips_elf_find_nearest_line_with_alt
|
||||
#define bfd_elf64_find_inliner_info _bfd_mips_elf_find_inliner_info
|
||||
#define bfd_elf64_new_section_hook _bfd_mips_elf_new_section_hook
|
||||
#define bfd_elf64_set_section_contents _bfd_mips_elf_set_section_contents
|
||||
|
@ -4176,6 +4176,8 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
|
||||
#define bfd_elf32_bfd_is_target_special_symbol \
|
||||
_bfd_mips_elf_is_target_special_symbol
|
||||
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
|
||||
#define bfd_elf32_find_nearest_line_with_alt \
|
||||
_bfd_mips_elf_find_nearest_line_with_alt
|
||||
#define bfd_elf32_find_inliner_info _bfd_mips_elf_find_inliner_info
|
||||
#define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook
|
||||
#define bfd_elf32_set_section_contents _bfd_mips_elf_set_section_contents
|
||||
|
@ -92,6 +92,8 @@ extern bool _bfd_mips_elf_is_target_special_symbol
|
||||
extern bool _bfd_mips_elf_find_nearest_line
|
||||
(bfd *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *);
|
||||
#define _bfd_mips_elf_find_nearest_line_with_alt \
|
||||
_bfd_nosymbols_find_nearest_line_with_alt
|
||||
extern bool _bfd_mips_elf_find_inliner_info
|
||||
(bfd *, const char **, const char **, unsigned int *);
|
||||
extern bool _bfd_mips_elf_set_section_contents
|
||||
|
@ -52,6 +52,10 @@
|
||||
#ifndef bfd_elfNN_find_nearest_line
|
||||
#define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line
|
||||
#endif
|
||||
#ifndef bfd_elfNN_find_nearest_line_with_alt
|
||||
#define bfd_elfNN_find_nearest_line_with_alt \
|
||||
_bfd_elf_find_nearest_line_with_alt
|
||||
#endif
|
||||
#ifndef bfd_elfNN_find_line
|
||||
#define bfd_elfNN_find_line _bfd_elf_find_line
|
||||
#endif
|
||||
|
@ -252,6 +252,7 @@ msdos_set_section_contents (bfd *abfd,
|
||||
#define msdos_get_symbol_version_string \
|
||||
_bfd_nosymbols_get_symbol_version_string
|
||||
#define msdos_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define msdos_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define msdos_find_line _bfd_nosymbols_find_line
|
||||
#define msdos_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define msdos_get_lineno _bfd_nosymbols_get_lineno
|
||||
|
@ -942,6 +942,7 @@ ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
#define ihex_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
|
||||
#define ihex_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define ihex_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define ihex_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define ihex_find_line _bfd_nosymbols_find_line
|
||||
#define ihex_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define ihex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
|
||||
|
@ -451,6 +451,10 @@ extern bool _bfd_nosymbols_find_nearest_line
|
||||
(bfd *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *)
|
||||
ATTRIBUTE_HIDDEN;
|
||||
extern bool _bfd_nosymbols_find_nearest_line_with_alt
|
||||
(bfd *, const char *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *)
|
||||
ATTRIBUTE_HIDDEN;
|
||||
extern bool _bfd_nosymbols_find_line
|
||||
(bfd *, asymbol **, asymbol *, const char **, unsigned int *)
|
||||
ATTRIBUTE_HIDDEN;
|
||||
@ -586,6 +590,13 @@ extern int _bfd_dwarf2_find_nearest_line
|
||||
const char **, const char **, unsigned int *, unsigned int *,
|
||||
const struct dwarf_debug_section *, void **) ATTRIBUTE_HIDDEN;
|
||||
|
||||
/* Find the nearest line using DWARF 2 debugging information, with
|
||||
the option of specifying a .gnu_debugaltlink file. */
|
||||
extern int _bfd_dwarf2_find_nearest_line_with_alt
|
||||
(bfd *, const char *, asymbol **, asymbol *, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *,
|
||||
const struct dwarf_debug_section *, void **) ATTRIBUTE_HIDDEN;
|
||||
|
||||
/* Find the bias between DWARF addresses and real addresses. */
|
||||
extern bfd_signed_vma _bfd_dwarf2_find_symbol_bias
|
||||
(asymbol **, void **) ATTRIBUTE_HIDDEN;
|
||||
|
11
bfd/libbfd.h
11
bfd/libbfd.h
@ -456,6 +456,10 @@ extern bool _bfd_nosymbols_find_nearest_line
|
||||
(bfd *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *)
|
||||
ATTRIBUTE_HIDDEN;
|
||||
extern bool _bfd_nosymbols_find_nearest_line_with_alt
|
||||
(bfd *, const char *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *)
|
||||
ATTRIBUTE_HIDDEN;
|
||||
extern bool _bfd_nosymbols_find_line
|
||||
(bfd *, asymbol **, asymbol *, const char **, unsigned int *)
|
||||
ATTRIBUTE_HIDDEN;
|
||||
@ -591,6 +595,13 @@ extern int _bfd_dwarf2_find_nearest_line
|
||||
const char **, const char **, unsigned int *, unsigned int *,
|
||||
const struct dwarf_debug_section *, void **) ATTRIBUTE_HIDDEN;
|
||||
|
||||
/* Find the nearest line using DWARF 2 debugging information, with
|
||||
the option of specifying a .gnu_debugaltlink file. */
|
||||
extern int _bfd_dwarf2_find_nearest_line_with_alt
|
||||
(bfd *, const char *, asymbol **, asymbol *, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *,
|
||||
const struct dwarf_debug_section *, void **) ATTRIBUTE_HIDDEN;
|
||||
|
||||
/* Find the bias between DWARF addresses and real addresses. */
|
||||
extern bfd_signed_vma _bfd_dwarf2_find_symbol_bias
|
||||
(asymbol **, void **) ATTRIBUTE_HIDDEN;
|
||||
|
@ -358,6 +358,8 @@ extern asymbol *coff_bfd_make_debug_symbol
|
||||
extern bool coff_find_nearest_line
|
||||
(bfd *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *);
|
||||
#define coff_find_nearest_line_with_alt \
|
||||
_bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define coff_find_line _bfd_nosymbols_find_line
|
||||
struct dwarf_debug_section;
|
||||
extern bool coff_find_nearest_line_with_names
|
||||
|
@ -362,6 +362,8 @@ extern asymbol *coff_bfd_make_debug_symbol
|
||||
extern bool coff_find_nearest_line
|
||||
(bfd *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *);
|
||||
#define coff_find_nearest_line_with_alt \
|
||||
_bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define coff_find_line _bfd_nosymbols_find_line
|
||||
struct dwarf_debug_section;
|
||||
extern bool coff_find_nearest_line_with_names
|
||||
|
@ -293,6 +293,8 @@ extern bool _bfd_ecoff_bfd_is_local_label_name
|
||||
extern bool _bfd_ecoff_find_nearest_line
|
||||
(bfd *, asymbol **, asection *, bfd_vma,
|
||||
const char **, const char **, unsigned int *, unsigned int *);
|
||||
#define _bfd_ecoff_find_nearest_line_with_alt \
|
||||
_bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define _bfd_ecoff_find_line _bfd_nosymbols_find_line
|
||||
#define _bfd_ecoff_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
|
||||
#define _bfd_ecoff_read_minisymbols _bfd_generic_read_minisymbols
|
||||
|
@ -729,6 +729,8 @@ bool bfd_mach_o_find_nearest_line (bfd *, asymbol **,
|
||||
asection *, bfd_vma,
|
||||
const char **, const char **,
|
||||
unsigned int *, unsigned int *);
|
||||
#define bfd_mach_o_find_nearest_line_with_alt \
|
||||
_bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define bfd_mach_o_find_line _bfd_nosymbols_find_line
|
||||
bool bfd_mach_o_close_and_cleanup (bfd *);
|
||||
bool bfd_mach_o_free_cached_info (bfd *);
|
||||
|
@ -3316,6 +3316,7 @@ mmo_write_object_contents (bfd *abfd)
|
||||
/* FIXME: We can do better on this one, if we have a dwarf2 .debug_line
|
||||
section or if MMO line numbers are implemented. */
|
||||
#define mmo_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define mmo_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define mmo_find_line _bfd_nosymbols_find_line
|
||||
#define mmo_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define mmo_make_empty_symbol _bfd_generic_make_empty_symbol
|
||||
|
@ -41,6 +41,7 @@
|
||||
#define bfd_pef_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
|
||||
#define bfd_pef_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define bfd_pef_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define bfd_pef_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define bfd_pef_find_line _bfd_nosymbols_find_line
|
||||
#define bfd_pef_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define bfd_pef_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
|
||||
|
@ -83,6 +83,7 @@ dlerror (void)
|
||||
#define bfd_plugin_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
|
||||
#define bfd_plugin_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define bfd_plugin_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define bfd_plugin_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define bfd_plugin_find_line _bfd_nosymbols_find_line
|
||||
#define bfd_plugin_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define bfd_plugin_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
|
||||
|
@ -332,6 +332,7 @@ ppcboot_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
|
||||
#define ppcboot_bfd_is_local_label_name bfd_generic_is_local_label_name
|
||||
#define ppcboot_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define ppcboot_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define ppcboot_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define ppcboot_find_line _bfd_nosymbols_find_line
|
||||
#define ppcboot_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define ppcboot_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
|
||||
|
@ -230,6 +230,9 @@ struct som_section_data_struct
|
||||
#define R_HPPA_BEGIN_TRY R_BEGIN_TRY
|
||||
#define R_HPPA_END_TRY R_END_TRY
|
||||
|
||||
#define som_find_nearest_line_with_alt \
|
||||
_bfd_nosymbols_find_nearest_line_with_alt
|
||||
|
||||
/* Exported functions, mostly for use by GAS. */
|
||||
bool bfd_som_set_section_attributes
|
||||
(asection *, int, int, unsigned int, int);
|
||||
|
@ -1249,6 +1249,7 @@ srec_print_symbol (bfd *abfd,
|
||||
#define srec_bfd_is_local_label_name bfd_generic_is_local_label_name
|
||||
#define srec_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define srec_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define srec_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define srec_find_line _bfd_nosymbols_find_line
|
||||
#define srec_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define srec_make_empty_symbol _bfd_generic_make_empty_symbol
|
||||
|
15
bfd/syms.c
15
bfd/syms.c
@ -1504,6 +1504,21 @@ _bfd_nosymbols_find_nearest_line
|
||||
return _bfd_bool_bfd_false_error (abfd);
|
||||
}
|
||||
|
||||
bool
|
||||
_bfd_nosymbols_find_nearest_line_with_alt
|
||||
(bfd *abfd,
|
||||
const char *alt_filename ATTRIBUTE_UNUSED,
|
||||
asymbol **symbols ATTRIBUTE_UNUSED,
|
||||
asection *section ATTRIBUTE_UNUSED,
|
||||
bfd_vma offset ATTRIBUTE_UNUSED,
|
||||
const char **filename_ptr ATTRIBUTE_UNUSED,
|
||||
const char **functionname_ptr ATTRIBUTE_UNUSED,
|
||||
unsigned int *line_ptr ATTRIBUTE_UNUSED,
|
||||
unsigned int *discriminator_ptr ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return _bfd_bool_bfd_false_error (abfd);
|
||||
}
|
||||
|
||||
bool
|
||||
_bfd_nosymbols_find_line (bfd *abfd,
|
||||
asymbol **symbols ATTRIBUTE_UNUSED,
|
||||
|
@ -377,6 +377,7 @@ BFD_JUMP_TABLE macros.
|
||||
. NAME##_bfd_is_target_special_symbol, \
|
||||
. NAME##_get_lineno, \
|
||||
. NAME##_find_nearest_line, \
|
||||
. NAME##_find_nearest_line_with_alt, \
|
||||
. NAME##_find_line, \
|
||||
. NAME##_find_inliner_info, \
|
||||
. NAME##_bfd_make_debug_symbol, \
|
||||
@ -407,6 +408,11 @@ BFD_JUMP_TABLE macros.
|
||||
. struct bfd_section *, bfd_vma,
|
||||
. const char **, const char **,
|
||||
. unsigned int *, unsigned int *);
|
||||
. bool (*_bfd_find_nearest_line_with_alt) (bfd *, const char *,
|
||||
. struct bfd_symbol **,
|
||||
. struct bfd_section *, bfd_vma,
|
||||
. const char **, const char **,
|
||||
. unsigned int *, unsigned int *);
|
||||
. bool (*_bfd_find_line) (bfd *, struct bfd_symbol **,
|
||||
. struct bfd_symbol *, const char **,
|
||||
. unsigned int *);
|
||||
|
@ -966,6 +966,7 @@ tekhex_print_symbol (bfd *abfd,
|
||||
#define tekhex_bfd_is_local_label_name bfd_generic_is_local_label_name
|
||||
#define tekhex_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define tekhex_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define tekhex_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define tekhex_find_line _bfd_nosymbols_find_line
|
||||
#define tekhex_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define tekhex_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
|
||||
|
@ -370,6 +370,7 @@ verilog_mkobject (bfd *abfd)
|
||||
#define verilog_bfd_is_local_label_name bfd_generic_is_local_label_name
|
||||
#define verilog_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define verilog_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define verilog_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define verilog_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define verilog_make_empty_symbol _bfd_generic_make_empty_symbol
|
||||
#define verilog_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
|
||||
|
@ -9992,6 +9992,8 @@ bfd_vms_get_data (bfd *abfd)
|
||||
#define alpha_vms_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define alpha_vms_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
|
||||
#define alpha_vms_find_nearest_line _bfd_vms_find_nearest_line
|
||||
#define alpha_vms_find_nearest_line_with_alt \
|
||||
_bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define alpha_vms_find_line _bfd_nosymbols_find_line
|
||||
#define alpha_vms_bfd_is_local_label_name vms_bfd_is_local_label_name
|
||||
|
||||
|
@ -784,6 +784,7 @@ wasm_object_p (bfd *abfd)
|
||||
#define wasm_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
|
||||
#define wasm_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define wasm_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define wasm_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define wasm_find_line _bfd_nosymbols_find_line
|
||||
#define wasm_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define wasm_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
|
||||
|
@ -32,6 +32,7 @@
|
||||
#define bfd_sym_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
|
||||
#define bfd_sym_get_lineno _bfd_nosymbols_get_lineno
|
||||
#define bfd_sym_find_nearest_line _bfd_nosymbols_find_nearest_line
|
||||
#define bfd_sym_find_nearest_line_with_alt _bfd_nosymbols_find_nearest_line_with_alt
|
||||
#define bfd_sym_find_line _bfd_nosymbols_find_line
|
||||
#define bfd_sym_find_inliner_info _bfd_nosymbols_find_inliner_info
|
||||
#define bfd_sym_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
|
||||
|
Loading…
x
Reference in New Issue
Block a user