+2005-05-23 Fred Fish <fnf@specifixinc.com>
+
+ * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
+ (struct funcinfo): Add caller_func, caller_file, caller_line.
+ tag, and nesting_level members.
+ (lookup_address_in_function_table): Change first passed parameter
+ from "struct funcinfo *" to "struct comp_unit *".
+ (lookup_address_in_function_table): Dereference unit to find function
+ table.
+ (lookup_address_in_function_table): Traverse the function list to
+ create a chain of inlined functions back to the first non inlined
+ function.
+ (scan_unit_for_functions): Remember tag and nesting level. Handle
+ DW_AT_call_file and DW_AT_call_line.
+ (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
+ call to pass unit pointer instead of function table pointer. For
+ inlined functions, save pointer to the inliner chain.
+ (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
+ (_bfd_dwarf2_find_inliner_info): New function that returns information
+ from the inliner chain after a call to bfd_find_nearest_line.
+
+ * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
+ * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
+ NAME##_find_inliner_info.
+ (bfd_target): Add _bfd_find_inliner_info.
+ * bfd-in2.h: Regenerate.
+
+ * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
+ macro that always returns bfd_false.
+ (_bfd_dwarf2_find_inliner_info): Declare.
+ * libbfd.h: Regenerate.
+
+ * elf32-arm.c (elf32_arm_find_inliner_info): New function
+ that calls _bfd_dwarf2_find_inliner_info.
+ (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
+
+ * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
+ that calls _bfd_dwarf2_find_inliner_info.
+ * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
+ * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
+ _bfd_mips_elf_find_inliner_info.
+ * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
+ * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
+
+ * elf.c (_bfd_elf_find_inliner_info): New function that calls
+ _bfd_dwarf2_find_inliner_info.
+ * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
+ * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
+ _bfd_elf_find_inliner_info.
+
+ * coffgen.c (coff_find_inliner_info): New function that
+ calls _bfd_dwarf2_find_inliner_info.
+ * libcoff-in.h (coff_find_inliner_info): Declare.
+ * libcoff.h: Regenerate.
+ * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
+ (pmac_xcoff_vec) Ditto.
+ * coff64-rs6000.c (rs6000coff64_vec): Ditto.
+ (aix5coff64_vec): Ditto.
+
+ * aout-target.h (MY_find_inliner_info): Define as
+ _bfd_nosymbols_find_inliner_info.
+ * aout-tic30.c (MY_find_inliner_info): Ditto.
+ * binary.c (binary_find_inliner_info): Ditto.
+ * i386msdos.c (msdos_find_inliner_info): Ditto.
+ * ihex.c (ihex_find_inliner_info): Ditto.
+ * libaout.h (aout_32_find_inliner_info): Ditto.
+ * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
+ * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
+ * mmo.c (mmo_find_inliner_info): Ditto.
+ * nlm-target.h (nlm_find_inliner_info): Ditto.
+ * pef.c (bfd_pef_find_inliner_info): Ditto.
+ * ppcboot.c (ppcboot_find_inliner_info): Ditto.
+ * srec.c (srec_find_inliner_info): Ditto.
+ * tekhex.c (tekhex_find_inliner_info): Ditto.
+ * versados.c (versados_find_inliner_info): Ditto.
+ * xsym.c (bfd_sym_find_inliner_info): Ditto.
+
+ * ieee.c (ieee_find_inliner_info): New function that always
+ returns FALSE.
+ * oasys.c (oasys_find_inliner_info): Ditto.
+ * vms.c (vms_find_inliner_info): Ditto.
+
2005-05-24 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
#ifndef MY_find_nearest_line
#define MY_find_nearest_line NAME (aout, find_nearest_line)
#endif
+#ifndef MY_find_inliner_info
+#define MY_find_inliner_info _bfd_nosymbols_find_inliner_info
+#endif
#ifndef MY_sizeof_headers
#define MY_sizeof_headers NAME (aout, sizeof_headers)
#endif
#ifndef MY_find_nearest_line
#define MY_find_nearest_line NAME (aout, find_nearest_line)
#endif
+#ifndef MY_find_inliner_info
+#define MY_find_inliner_info _bfd_nosymbols_find_inliner_info
+#endif
#ifndef MY_sizeof_headers
#define MY_sizeof_headers NAME (aout, sizeof_headers)
#endif
BFD_SEND (abfd, _bfd_find_nearest_line, \
(abfd, sec, syms, off, file, func, line))
+#define bfd_find_inliner_info(abfd, file, func, line) \
+ BFD_SEND (abfd, _bfd_find_inliner_info, \
+ (abfd, file, func, line))
+
#define bfd_debug_info_start(abfd) \
BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
NAME##_bfd_is_target_special_symbol, \
NAME##_get_lineno, \
NAME##_find_nearest_line, \
+ NAME##_find_inliner_info, \
NAME##_bfd_make_debug_symbol, \
NAME##_read_minisymbols, \
NAME##_minisymbol_to_symbol
bfd_boolean (*_bfd_find_nearest_line)
(bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
const char **, const char **, unsigned int *);
+ bfd_boolean (*_bfd_find_inliner_info)
+ (bfd *, const char **, const char **, unsigned int *);
/* Back-door to allow format-aware applications to create debug symbols
while using BFD for everything else. Currently used by the assembler
when creating COFF files. */
. BFD_SEND (abfd, _bfd_find_nearest_line, \
. (abfd, sec, syms, off, file, func, line))
.
+.#define bfd_find_inliner_info(abfd, file, func, line) \
+. BFD_SEND (abfd, _bfd_find_inliner_info, \
+. (abfd, file, func, line))
+.
.#define bfd_debug_info_start(abfd) \
. BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
.
#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_inliner_info _bfd_nosymbols_find_inliner_info
#define binary_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define binary_read_minisymbols _bfd_generic_read_minisymbols
#define binary_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
coff_bfd_is_target_special_symbol,
coff_get_lineno,
coff_find_nearest_line,
+ coff_find_inliner_info,
coff_bfd_make_debug_symbol,
_bfd_generic_read_minisymbols,
_bfd_generic_minisymbol_to_symbol,
coff_bfd_is_target_special_symbol,
coff_get_lineno,
coff_find_nearest_line,
+ coff_find_inliner_info,
coff_bfd_make_debug_symbol,
_bfd_generic_read_minisymbols,
_bfd_generic_minisymbol_to_symbol,
coff_bfd_is_target_special_symbol,
coff_get_lineno,
coff_find_nearest_line,
+ coff_find_inliner_info,
coff_bfd_make_debug_symbol,
_bfd_generic_read_minisymbols,
_bfd_generic_minisymbol_to_symbol,
coff_bfd_is_target_special_symbol,
coff_get_lineno,
coff_find_nearest_line,
+ coff_find_inliner_info,
coff_bfd_make_debug_symbol,
_bfd_generic_read_minisymbols,
_bfd_generic_minisymbol_to_symbol,
return TRUE;
}
+bfd_boolean
+coff_find_inliner_info (bfd *abfd,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
+{
+ bfd_boolean found;
+
+ found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr,
+ functionname_ptr, line_ptr,
+ &coff_data(abfd)->dwarf2_find_line_info);
+ return (found);
+}
+
int
coff_sizeof_headers (bfd *abfd, bfd_boolean reloc)
{
/* Length of the loaded .debug_ranges section. */
unsigned long dwarf_ranges_size;
+
+ /* If the most recent call to bfd_find_nearest_line was given an
+ address in an inlined function, preserve a pointer into the
+ calling chain for subsequent calls to bfd_find_inliner_info to
+ use. */
+ struct funcinfo *inliner_chain;
};
struct arange
struct line_info* lcl_head; /* local head; used in 'add_line_info' */
};
+/* Remember some information about each function. If the function is
+ inlined (DW_TAG_inlined_subroutine) it may have two additional
+ attributes, DW_AT_call_file and DW_AT_call_line, which specify the
+ source code location where this function was inlined. */
+
struct funcinfo
{
- struct funcinfo *prev_func;
+ struct funcinfo *prev_func; /* Pointer to previous function in list of all functions */
+ struct funcinfo *caller_func; /* Pointer to function one scope higher */
+ char *caller_file; /* Source location file name where caller_func inlines this func */
+ int caller_line; /* Source location line number where caller_func inlines this func */
+ int tag;
+ int nesting_level;
char *name;
struct arange arange;
};
depending upon them being ordered in TABLE by increasing range. */
static bfd_boolean
-lookup_address_in_function_table (struct funcinfo *table,
+lookup_address_in_function_table (struct comp_unit *unit,
bfd_vma addr,
struct funcinfo **function_ptr,
const char **functionname_ptr)
struct funcinfo* best_fit = NULL;
struct arange *arange;
- for (each_func = table;
+ for (each_func = unit->function_table;
each_func;
each_func = each_func->prev_func)
{
if (best_fit)
{
+ struct funcinfo* curr_func = best_fit;
+
*functionname_ptr = best_fit->name;
*function_ptr = best_fit;
+
+ /* If we found a match and it is a function that was inlined,
+ traverse the function list looking for the function at the
+ next higher scope and save a pointer to it for future use.
+ Note that because of the way the DWARF info is generated, and
+ the way we build the function list, the first function at the
+ next higher level is the one we want. */
+
+ for (each_func = best_fit -> prev_func;
+ each_func && (curr_func->tag == DW_TAG_inlined_subroutine);
+ each_func = each_func->prev_func)
+ {
+ if (each_func->nesting_level < curr_func->nesting_level)
+ {
+ curr_func->caller_func = each_func;
+ curr_func = each_func;
+ }
+ }
return TRUE;
}
else
{
bfd_size_type amt = sizeof (struct funcinfo);
func = bfd_zalloc (abfd, amt);
+ func->tag = abbrev->tag;
+ func->nesting_level = nesting_level;
func->prev_func = unit->function_table;
unit->function_table = func;
}
{
switch (attr.name)
{
+ case DW_AT_call_file:
+ func->caller_file = concat_filename (unit->line_table, attr.u.val);
+ break;
+
+ case DW_AT_call_line:
+ func->caller_line = attr.u.val;
+ break;
+
case DW_AT_abstract_origin:
func->name = find_abstract_instance_name (unit, attr.u.val);
break;
}
function = NULL;
- func_p = lookup_address_in_function_table (unit->function_table, addr,
+ func_p = lookup_address_in_function_table (unit, addr,
&function, functionname_ptr);
+ if (func_p && (function->tag == DW_TAG_inlined_subroutine))
+ stash->inliner_chain = function;
line_p = lookup_address_in_line_info_table (unit->line_table, addr,
function, filename_ptr,
linenumber_ptr);
if (! stash->info_ptr)
return FALSE;
+ stash->inliner_chain = NULL;
+
/* Check the previously read comp. units first. */
for (each = stash->all_comp_units; each; each = each->next_unit)
if (comp_unit_contains_address (each, addr))
return FALSE;
}
+bfd_boolean
+_bfd_dwarf2_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *linenumber_ptr,
+ void **pinfo)
+{
+ struct dwarf2_debug *stash;
+
+ stash = *pinfo;
+ if (stash)
+ {
+ struct funcinfo *func = stash->inliner_chain;
+ if (func && func->caller_func)
+ {
+ *filename_ptr = func->caller_file;
+ *functionname_ptr = func->caller_func->name;
+ *linenumber_ptr = func->caller_line;
+ stash->inliner_chain = func->caller_func;
+ return (TRUE);
+ }
+ }
+
+ return (FALSE);
+}
+
void
_bfd_dwarf2_cleanup_debug_info (bfd *abfd)
{
extern bfd_boolean _bfd_elf_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
unsigned int *);
+extern bfd_boolean _bfd_elf_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
#define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
extern int _bfd_elf_sizeof_headers
return TRUE;
}
+/* After a call to bfd_find_nearest_line, successive calls to
+ bfd_find_inliner_info can be used to get source information about
+ each level of function inlining that terminated at the address
+ passed to bfd_find_nearest_line. Currently this is only supported
+ for DWARF2 with appropriate DWARF3 extensions. */
+
+bfd_boolean
+_bfd_elf_find_inliner_info (bfd *abfd,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
+{
+ bfd_boolean found;
+ found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr,
+ functionname_ptr, line_ptr,
+ & elf_tdata (abfd)->dwarf2_find_line_info);
+ return found;
+}
+
int
_bfd_elf_sizeof_headers (bfd *abfd, bfd_boolean reloc)
{
return TRUE;
}
+static bfd_boolean
+elf32_arm_find_inliner_info (bfd * abfd,
+ const char ** filename_ptr,
+ const char ** functionname_ptr,
+ unsigned int * line_ptr)
+{
+ bfd_boolean found;
+ found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr,
+ functionname_ptr, line_ptr,
+ & elf_tdata (abfd)->dwarf2_find_line_info);
+ return found;
+}
+
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
#define bfd_elf32_bfd_link_hash_table_create elf32_arm_link_hash_table_create
#define bfd_elf32_bfd_reloc_type_lookup elf32_arm_reloc_type_lookup
#define bfd_elf32_find_nearest_line elf32_arm_find_nearest_line
+#define bfd_elf32_find_inliner_info elf32_arm_find_inliner_info
#define bfd_elf32_new_section_hook elf32_arm_new_section_hook
#define bfd_elf32_bfd_is_target_special_symbol elf32_arm_is_target_special_symbol
#define bfd_elf32_bfd_is_local_label_name \
mips_elf_is_local_label_name
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
+#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
#define bfd_elf32_bfd_get_relocated_section_contents \
MIPS-specific function only applies to IRIX5, which had no 64-bit
ABI. */
#define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line
+#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
#define bfd_elf64_bfd_get_relocated_section_contents \
#define elf_backend_mips_irix_compat elf_n32_mips_irix_compat
#define elf_backend_mips_rtype_to_howto mips_elf_n32_rtype_to_howto
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
+#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
#define bfd_elf32_bfd_get_relocated_section_contents \
filename_ptr, functionname_ptr,
line_ptr);
}
+
+bfd_boolean
+_bfd_mips_elf_find_inliner_info (bfd *abfd,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *line_ptr)
+{
+ bfd_boolean found;
+ found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr,
+ functionname_ptr, line_ptr,
+ & elf_tdata (abfd)->dwarf2_find_line_info);
+ return found;
+}
+
\f
/* When are writing out the .options or .MIPS.options section,
remember the bytes we are writing out, so that we can install the
extern bfd_boolean _bfd_mips_elf_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *);
+extern bfd_boolean _bfd_mips_elf_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
extern bfd_boolean _bfd_mips_elf_set_section_contents
(bfd *, asection *, const void *, file_ptr, bfd_size_type);
extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents
#ifndef bfd_elfNN_find_nearest_line
#define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line
#endif
+#ifndef bfd_elfNN_find_inliner_info
+#define bfd_elfNN_find_inliner_info _bfd_elf_find_inliner_info
+#endif
#define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols
#define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol
#define bfd_elfNN_get_dynamic_symtab_upper_bound \
#define msdos_print_symbol _bfd_nosymbols_print_symbol
#define msdos_get_symbol_info _bfd_nosymbols_get_symbol_info
#define msdos_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define msdos_find_inliner_info _bfd_nosymbols_find_inliner_info
#define msdos_get_lineno _bfd_nosymbols_get_lineno
#define msdos_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define msdos_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
return FALSE;
}
+static bfd_boolean
+ieee_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
+ const char **filename_ptr ATTRIBUTE_UNUSED,
+ const char **functionname_ptr ATTRIBUTE_UNUSED,
+ unsigned int *line_ptr ATTRIBUTE_UNUSED)
+{
+ return FALSE;
+}
+
static int
ieee_generic_stat_arch_elt (bfd *abfd, struct stat *buf)
{
#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_inliner_info _bfd_nosymbols_find_inliner_info
#define ihex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define ihex_read_minisymbols _bfd_nosymbols_read_minisymbols
#define ihex_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
extern bfd_boolean NAME (aout, bfd_free_cached_info)
(bfd *);
+#define aout_32_find_inliner_info _bfd_nosymbols_find_inliner_info
+#if 0 /* Are these needed? */
+#define aout_16_find_inliner_info _bfd_nosymbols_find_inliner_info
+#define aout_64_find_inliner_info _bfd_nosymbols_find_inliner_info
+#endif
+
/* A.out uses the generic versions of these routines... */
#define aout_16_get_section_contents _bfd_generic_get_section_contents
((bfd_boolean (*) (bfd *, asection *, asymbol **, bfd_vma, const char **, \
const char **, unsigned int *)) \
bfd_false)
+#define _bfd_nosymbols_find_inliner_info \
+ ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \
+ bfd_false)
#define _bfd_nosymbols_bfd_make_debug_symbol \
((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
#define _bfd_nosymbols_read_minisymbols \
(bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
unsigned int *, unsigned int, void **);
+/* Find inliner info after calling bfd_find_nearest_line. */
+extern bfd_boolean _bfd_dwarf2_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *, void **);
+
/* Create a new section entry. */
extern struct bfd_hash_entry *bfd_section_hash_newfunc
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
((bfd_boolean (*) (bfd *, asection *, asymbol **, bfd_vma, const char **, \
const char **, unsigned int *)) \
bfd_false)
+#define _bfd_nosymbols_find_inliner_info \
+ ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \
+ bfd_false)
#define _bfd_nosymbols_bfd_make_debug_symbol \
((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
#define _bfd_nosymbols_read_minisymbols \
(bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
unsigned int *, unsigned int, void **);
+/* Find inliner info after calling bfd_find_nearest_line. */
+extern bfd_boolean _bfd_dwarf2_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *, void **);
+
/* Create a new section entry. */
extern struct bfd_hash_entry *bfd_section_hash_newfunc
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
extern bfd_boolean coff_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *);
+extern bfd_boolean coff_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
extern int coff_sizeof_headers
(bfd *, bfd_boolean);
extern bfd_boolean bfd_coff_reloc16_relax_section
extern bfd_boolean coff_find_nearest_line
(bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *);
+extern bfd_boolean coff_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
extern int coff_sizeof_headers
(bfd *, bfd_boolean);
extern bfd_boolean bfd_coff_reloc16_relax_section
#define _bfd_ecoff_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define _bfd_ecoff_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_ecoff_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
+#define _bfd_ecoff_find_inliner_info _bfd_nosymbols_find_inliner_info
#define _bfd_ecoff_get_reloc_upper_bound coff_get_reloc_upper_bound
extern long _bfd_ecoff_canonicalize_reloc
#define bfd_mach_o_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
#define bfd_mach_o_get_lineno _bfd_nosymbols_get_lineno
#define bfd_mach_o_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define bfd_mach_o_find_inliner_info _bfd_nosymbols_find_inliner_info
#define bfd_mach_o_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define bfd_mach_o_read_minisymbols _bfd_generic_read_minisymbols
#define bfd_mach_o_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
/* 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_inliner_info _bfd_nosymbols_find_inliner_info
#define mmo_make_empty_symbol _bfd_generic_make_empty_symbol
#define mmo_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define mmo_read_minisymbols _bfd_generic_read_minisymbols
#define nlm_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
#define nlm_get_lineno _bfd_nosymbols_get_lineno
#define nlm_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define nlm_find_inliner_info _bfd_nosymbols_find_inliner_info
#define nlm_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define nlm_read_minisymbols _bfd_generic_read_minisymbols
#define nlm_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
return FALSE;
}
+static bfd_boolean
+oasys_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
+ const char **filename_ptr ATTRIBUTE_UNUSED,
+ const char **functionname_ptr ATTRIBUTE_UNUSED,
+ unsigned int *line_ptr ATTRIBUTE_UNUSED)
+{
+ return FALSE;
+}
+
static int
oasys_generic_stat_arch_elt (bfd *abfd, struct stat *buf)
{
#define bfd_pef_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_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_inliner_info _bfd_nosymbols_find_inliner_info
#define bfd_pef_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define bfd_pef_read_minisymbols _bfd_generic_read_minisymbols
#define bfd_pef_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#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_inliner_info _bfd_nosymbols_find_inliner_info
#define ppcboot_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define ppcboot_read_minisymbols _bfd_generic_read_minisymbols
#define ppcboot_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#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_inliner_info _bfd_nosymbols_find_inliner_info
#define srec_make_empty_symbol _bfd_generic_make_empty_symbol
#define srec_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define srec_read_minisymbols _bfd_generic_read_minisymbols
. NAME##_bfd_is_target_special_symbol, \
. NAME##_get_lineno, \
. NAME##_find_nearest_line, \
+. NAME##_find_inliner_info, \
. NAME##_bfd_make_debug_symbol, \
. NAME##_read_minisymbols, \
. NAME##_minisymbol_to_symbol
. bfd_boolean (*_bfd_find_nearest_line)
. (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
. const char **, const char **, unsigned int *);
+. bfd_boolean (*_bfd_find_inliner_info)
+. (bfd *, const char **, const char **, unsigned int *);
. {* Back-door to allow format-aware applications to create debug symbols
. while using BFD for everything else. Currently used by the assembler
. when creating COFF files. *}
#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_inliner_info _bfd_nosymbols_find_inliner_info
#define tekhex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define tekhex_read_minisymbols _bfd_generic_read_minisymbols
#define tekhex_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#define versados_bfd_is_local_label_name bfd_generic_is_local_label_name
#define versados_get_lineno _bfd_nosymbols_get_lineno
#define versados_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define versados_find_inliner_info _bfd_nosymbols_find_inliner_info
#define versados_make_empty_symbol _bfd_generic_make_empty_symbol
#define versados_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define versados_read_minisymbols _bfd_generic_read_minisymbols
return FALSE;
}
+static bfd_boolean
+vms_find_inliner_info (bfd * abfd ATTRIBUTE_UNUSED,
+ const char **file ATTRIBUTE_UNUSED,
+ const char **func ATTRIBUTE_UNUSED,
+ unsigned int *line ATTRIBUTE_UNUSED)
+{
+#if VMS_DEBUG
+ vms_debug (1, "vms_find_inliner_info (%p, <ret>, <ret>, <ret>)\n",
+ abfd);
+#endif
+ return FALSE;
+}
+
/* Back-door to allow format-aware applications to create debug symbols
while using BFD for everything else. Currently used by the assembler
when creating COFF files. */
#define bfd_sym_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_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_inliner_info _bfd_nosymbols_find_inliner_info
#define bfd_sym_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define bfd_sym_read_minisymbols _bfd_generic_read_minisymbols
#define bfd_sym_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol