aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-rs6000.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-10-15 21:52:20 +1030
committerAlan Modra <amodra@gmail.com>2014-10-15 22:55:25 +1030
commitfb167eb272279154dc2502614eb5331b01dc6ea4 (patch)
tree3f1b040a1563d7167a33fed05c5b379459de9d0c /bfd/coff-rs6000.c
parent9c461f7dba0ab17227ec3ada32804ed7f7c1a4d2 (diff)
downloadfsf-binutils-gdb-fb167eb272279154dc2502614eb5331b01dc6ea4.zip
fsf-binutils-gdb-fb167eb272279154dc2502614eb5331b01dc6ea4.tar.gz
fsf-binutils-gdb-fb167eb272279154dc2502614eb5331b01dc6ea4.tar.bz2
Merge bfd_find_nearest_line variants
When bfd_find_nearest_line_discriminator was added, not enough care was taken to ensure all targets had a proper definition of the function. This patch cures that by merging bfd_find_nearest_line_discriminator and bfd_find_nearest_line target implementations. PR 17481 * aoutx.h (NAME (aout, find_nearest_line)): Add "discriminator_ptr" param, group "section" and "offset" params. Zero discriminator. * bfd.c (bfd_find_nearest_line): Implement with new _bfd_find_nearest_line. (bfd_find_nearest_line_discriminator): Likewise. * coff-i386.c (_bfd_generic_find_nearest_line_discriminator): Don't define. * coff-rs6000.c (xcoff_find_nearest_line, xcoff_find_nearest_line_discriminator): Delete. (_bfd_xcoff_find_nearest_line): Don't define. (_bfd_xcoff_find_nearest_line): Define as coff_find_nearest_line. * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator): Don't define. * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Adjust. * coffgen.c (coff_find_nearest_line_with_names): Reorder params, adjust _bfd_dwarf2_find_nearest_line call. (coff_find_nearest_line): Add "discriminator_ptr" param, reorder others. Set discriminator. Adjust call. (coff_find_nearest_line_discriminator): Delete. * dwarf1.c (_bfd_dwarf1_find_nearest_line): Reorder params. * dwarf2.c (find_line): Rename to.. (_bfd_dwarf2_find_nearest_line): ..this, reordering params. Simplify setting of do_line. Delete old function. (_bfd_dwarf2_find_line): Delete. * ecoff.c (_bfd_ecoff_find_nearest_line): Reorder params, add discriminator_ptr and set it. * elf-bfd.h (_bfd_elf_find_nearest_line): Update prototype. (_bfd_elf_find_nearest_line_discriminator): Delete. (_bfd_elf_find_line_discriminator): Delete. (_bfd_generic_find_nearest_line_discriminator): Don't define. * elf.c (elf_find_function): Reorder params. (_bfd_elf_find_nearest_line): Reorder params, add discriminator_ptr. Adjust calls. (_bfd_elf_find_nearest_line_discriminator): Delete. (_bfd_elf_find_line): Adjust call. * elf32-arm.c (arm_elf_find_function): Reorder params. (elf32_arm_find_nearest_line): Reorder params, add discriminator_ptr. Adjust calls. * elf64-alpha.c (elf64_alpha_find_nearest_line): Similarly. * elfnn-aarch64.c (aarch64_elf_find_function): Reorder params. (elfNN_aarch64_find_nearest_line): Reorder params, add discriminator_ptr. Adjust calls. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly. * elfxx-mips.h (_bfd_mips_elf_find_nearest_line): Update prototype. * libaout.h (NAME (aout, find_nearest_line)): Update prototype. * libbfd-in.h (_bfd_nosymbols_find_nearest_line): Update. (_bfd_dwarf1_find_nearest_line): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise. (_bfd_dwarf2_find_line): Delete. (_bfd_generic_find_nearest_line_discriminator): Delete. * libbfd.c (_bfd_generic_find_nearest_line_discriminator): Delete. * libcoff-in.h (coff_find_nearest_line): Update prototype. (coff_find_nearest_line_discriminator): Delete. (coff_find_nearest_line_with_names): Update prototype. * libecoff.h (_bfd_ecoff_find_nearest_line): Update prototype. * mach-o.c (bfd_mach_o_find_nearest_line): Reorder params, add discriminator_ptr. Adjust calls. * mach-o.h (bfd_mach_o_find_nearest_line): Update prototype. * pdp11.c (NAME (aout, find_nearest_line)): Reorder params, add discriminator_ptr and set. * som.c (som_find_nearest_line): Similarly. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Delete entry for _bfd_find_nearest_line_discriminator. (struct bfd_target <_bfd_find_nearest_line>): Adjust prototype. (struct bfd_target <_bfd_find_nearest_line_discriminator>): Delete. * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Rename to.. (_bfd_vms_find_nearest_line): ..this. Reorder params, add "discriminator" and set. (_bfd_vms_find_nearest_line_discriminator): Delete. (_bfd_generic_find_nearest_line_discriminator): Don't define. (alpha_vms_find_nearest_line): Update define. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate.
Diffstat (limited to 'bfd/coff-rs6000.c')
-rw-r--r--bfd/coff-rs6000.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 2cb580c..fea5f3b 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -430,39 +430,6 @@ static const struct dwarf_debug_section xcoff_debug_sections[] =
{ NULL, NULL }, /* .debug_weaknames */
{ NULL, NULL },
};
-
-static bfd_boolean
-xcoff_find_nearest_line (bfd *abfd,
- asection *section,
- asymbol **symbols,
- bfd_vma offset,
- const char **filename_ptr,
- const char **functionname_ptr,
- unsigned int *line_ptr)
-{
- return coff_find_nearest_line_with_names (abfd, xcoff_debug_sections,
- section, symbols, offset,
- filename_ptr, functionname_ptr,
- line_ptr);
-}
-
-static bfd_boolean
-xcoff_find_nearest_line_discriminator (bfd *abfd,
- asection *section,
- asymbol **symbols,
- bfd_vma offset,
- const char **filename_ptr,
- const char **functionname_ptr,
- unsigned int *line_ptr,
- unsigned int *discriminator)
-{
- *discriminator = 0;
- return coff_find_nearest_line_with_names (abfd, xcoff_debug_sections,
- section, symbols, offset,
- filename_ptr, functionname_ptr,
- line_ptr);
-}
-
void
_bfd_xcoff_swap_sym_in (bfd *abfd, void * ext1, void * in1)
@@ -4045,9 +4012,7 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
#define _bfd_xcoff_bfd_is_target_special_symbol \
coff_bfd_is_target_special_symbol
#define _bfd_xcoff_get_lineno coff_get_lineno
-#define _bfd_xcoff_find_nearest_line xcoff_find_nearest_line
-#define _bfd_generic_find_nearest_line_discriminator \
- xcoff_find_nearest_line_discriminator
+#define _bfd_xcoff_find_nearest_line coff_find_nearest_line
#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