diff options
author | Alan Modra <amodra@gmail.com> | 2019-08-14 10:40:20 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-08-14 11:23:18 +0930 |
commit | 9defd221fe3ecffabc90eadd077326b27e898a2b (patch) | |
tree | 2d8df8545bdb384f5b342f39a6762cfb18462f76 /bfd/dwarf2.c | |
parent | 414b84043054e9656aad008e6efb49979ec614e9 (diff) | |
download | gdb-9defd221fe3ecffabc90eadd077326b27e898a2b.zip gdb-9defd221fe3ecffabc90eadd077326b27e898a2b.tar.gz gdb-9defd221fe3ecffabc90eadd077326b27e898a2b.tar.bz2 |
Remove _bfd_dwarf2_find_nearest_line addr_size parameter
This parameter might appear to be used to set up offset_size, but
since git commit 024b2372f5 offset_size is either set from the
debug_info data or is set to 4.
* dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
* libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
* coffgen.c (coff_find_nearest_line_with_names): Adjust
_bfd_dwarf2_find_nearest_line calls.
* elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
* elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
* elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
* mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
* libbfd.h: Regenerate.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r-- | bfd/dwarf2.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index 65c4161..9cbd81d 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -4531,7 +4531,6 @@ _bfd_dwarf2_find_symbol_bias (asymbol ** symbols, void ** pinfo) NULL the FUNCTIONNAME_PTR is also filled in. SYMBOLS contains the symbol table for ABFD. DEBUG_SECTIONS contains the name of the dwarf debug sections. - ADDR_SIZE is the number of bytes in the initial .debug_info length field and in the abbreviation offset, or zero to indicate that the default value should be used. */ @@ -4546,7 +4545,6 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, unsigned int *linenumber_ptr, unsigned int *discriminator_ptr, const struct dwarf_debug_section *debug_sections, - unsigned int addr_size, void **pinfo) { /* Read each compilation unit from the section .debug_info, and check @@ -4727,18 +4725,11 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, } } - /* The DWARF2 spec says that the initial length field, and the - offset of the abbreviation table, should both be 4-byte values. - However, some compilers do things differently. */ - if (addr_size == 0) - addr_size = 4; - BFD_ASSERT (addr_size == 4 || addr_size == 8); - /* Read each remaining comp. units checking each as they are read. */ while (stash->info_ptr < stash->info_ptr_end) { bfd_vma length; - unsigned int offset_size = addr_size; + unsigned int offset_size; bfd_byte *info_ptr_unit = stash->info_ptr; length = read_4_bytes (stash->bfd_ptr, stash->info_ptr, stash->info_ptr_end); @@ -4768,13 +4759,11 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, b) if they do use 64-bit offsets but they are not using the size hints that are tested for above then they are not conforming to the DWARF3 standard anyway. */ - else if (addr_size == 8) + else { offset_size = 4; stash->info_ptr += 4; } - else - stash->info_ptr += 4; if (length > 0) { |