Age | Commit message (Collapse) | Author | Files | Lines |
|
* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
which reads DWARF2 and stores in stash from find_line.
(find_line) Call _bfd_dwarf2_slurp_debug_info.
* libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
* libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
* mach-o.c (dsym_subdir): The name of subdir where debug
information may be stored.
(bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
type is UUID.
(bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
corresponding to the executable.
(bfd_mach_o_find_dsym): New. Find a debug information BFD in the
specified binary file.
(bfd_mach_o_follow_dsym): New. Find a debug information BFD for
the original BFD.
(bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
executables, dylibs, and bundles.
(bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
* mach-o.h (dsym_bfd): The BFD of the dSYM file.
|
|
* dwarf2.c (bfd_dwarf2_cleanup_debug_info): Accept stash as an
argument like other functions to support formats other than ELF.
* elf-bfd.h (bfd_dwarf2_cleanup_debug_info): Move to bfd-in.h.
* elf.c (_bfd_elf_close_and_cleanup): Pass dwarf2_find_line_info
in tdata as a parameter.
* libbfd-in.h (bfd_dwarf2_cleanup_debug_info): Move from
elf-bfd.h.
* libbfd.h (bfd_dwarf2_cleanup_debug_info): Regenerate.
* mach-o-target.c (bfd_mach_o_close_and_cleanup): Remove the
fallback macro.
(bfd_mach_o_find_nearest_line): Likewise.
* mach-o.c (bfd_mach_o_find_nearest_line): Add the definition
which calls _bfd_dwarf2_find_nearest_line.
(bfd_mach_o_close_and_cleanup): Likewise.
* mach-o.h (mach_o_data_struct): Add dwarf2_find_line_info.
(bfd_mach_o_find_nearest_line): Add declaration.
(bfd_mach_o_close_and_cleanup): Add declaration.
|
|
* dwarf2.c (struct dwarf2_debug): Add field debug_sections.
(read_section): Add sec argument. Adjust the code to get section
names from it.
(read_indirect_string): Adjust call to read_section.
(read_abbrevs): Ditto.
(decode_line_info): Ditto.
(read_debug_ranges): Ditto.
(DWARF2_DEBUG_INFO, DWARF2_COMPRESSED_DEBUG_INFO): Remove.
(find_debug_info): Add debug_sections parameter. Use it instead
the above macros.
(place_sections): Get section names from stash.
(find_line): Add debug_sections argument. Initialize
debug_sections field of stash from it.
Adjust calls to find_debug_info.
(_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
Adjust call to find_line.
(_bfd_dwarf2_find_line): Adjust call to find_line.
* libcoff-in.h (struct dwarf_debug_section): New declaration.
(coff_find_nearest_line_with_names): Likewise.
* libcoff.h: Regenerate.
* libbfd-in.h (struct dwarf_debug_section): Move declaration.
(dwarf_debug_sections): Likewise.
(_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
* libbfd.h: Regenerate.
* elf.c (_bfd_elf_find_nearest_line): Adjust call to
_bfd_dwarf2_find_nearest_line.
* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Ditto.
* elf64-alpha.c (elf64_alpha_find_nearest_line): Ditto.
* elf32-arm.c (elf32_arm_find_nearest_line): Ditto.
* coffgen.c (coff_find_nearest_line_with_names): New function.
(coff_find_nearest_line): Calls coff_find_nearest_line_with_names.
* coff-rs6000.c (xcoff_debug_sections): New constant.
(xcoff_find_nearest_line): New function.
(rs6000coff_vec): Use xcoff_find_nearest_line.
(pmac_xcoff_vec): Ditto.
|
|
and .zdebug_macro entry.
(dwarf_debug_section_enum): Add debug_macro.
* NEWS: Mention .debug_macro support.
* dwarf.c (read_and_display_attr_value): Don't print a tab
if attribute is 0.
(get_AT_name): Handle DW_AT_GNU_macros.
(get_line_filename_and_dirname, display_debug_macro): New
functions.
(debug_displays): Add an entry for .debug_macro and .zdebug_macro.
* readelf.c (process_section_headers): With do_debug_macinfo
handle also .debug_macro sections.
* dwarf.h (dwarf_section_display_enum): Add macro.
|
|
|
|
|
|
* dwarf2.c (scan_unit_for_symbols): Stop memory leak.
|
|
bfd/
2010-10-29 H.J. Lu <hongjiu.lu@intel.com>
Cary Coutant <ccoutant@google.com>
* archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS
and BFD_DECOMPRESS.
* bfd.c (BFD_COMPRESS): New.
(BFD_DECOMPRESS): Likewise.
(BFD_FLAGS_SAVED): Likewise.
(bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED.
* compress.c (bfd_uncompress_section_contents): Removed.
(get_uncompressed_size): New.
(decompress_contents): Likewise.
(bfd_compress_section_contents): Likewise.
(bfd_get_full_section_contents): Likewise.
(bfd_is_section_compressed): Likewise.
(bfd_init_section_decompress_status): Likewise.
(bfd_init_section_compress_status): Likewise.
* dwarf2.c (dwarf_debug_sections): New.
(dwarf_debug_section_enum): Likewise.
(read_section): Remove section_name and compressed_section_name.
Add dwarf_debug_section_enum. Try compressed debug section.
(read_indirect_string): Updated.
(read_abbrevs): Likewise.
(decode_line_info): Likewise.
(read_debug_ranges): Likewise.
(find_line): Updated.
* ecoff.c (bfd_debug_section): Add compress_status and
compressed_size.
* elf.c (_bfd_elf_make_section_from_shdr): Call
bfd_is_section_compressed to check if a DWARF debug section is
compressed. Call bfd_init_section_compress_status or
bfd_init_section_decompress_status if needed.
* elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents
with bfd_get_full_section_contents.
* merge.c (_bfd_add_merge_section): Likewise.
* reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
* simple.c (bfd_simple_get_relocated_section_contents): Likewise.
* elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and
BFD_DECOMPRESS.
(TARGET_LITTLE_SYM): Likewise.
* libbfd-in.h (dwarf_debug_section): New.
(dwarf_debug_sections): Likewise.
* libbfd.c (_bfd_generic_get_section_contents): Issue an error
when getting contents on compressed/decompressed section.
* section.c (COMPRESS_SECTION_NONE): New.
(COMPRESS_SECTION_DONE): Likewise.
(DECOMPRESS_SECTION_SIZED): Likewise.
(BFD_FAKE_SECTION): Add compress_status and compressed_size.
(bfd_malloc_and_get_section): Replace bfd_get_section_contents
with bfd_get_full_section_contents.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.
binutils/
2010-10-29 H.J. Lu <hongjiu.lu@intel.com>
* addr2line.c (process_file): Set BFD_DECOMPRESS.
* objcopy.c (do_debug_sections): New.
(OPTION_COMPRESS_DEBUG_SECTIONS): New.
(OPTION_DECOMPRESS_DEBUG_SECTIONS): Likewise.
(copy_options): Add OPTION_COMPRESS_DEBUG_SECTIONS and
OPTION_DECOMPRESS_DEBUG_SECTIONS.
(copy_usage): Add --compress-debug-sections and
--decompress-debug-sections.
(copy_file): Set BFD_COMPRESS or BFD_DECOMPRESS.
(copy_section): Replace bfd_get_section_contents with
bfd_get_full_section_contents.
(copy_main): Handle OPTION_COMPRESS_DEBUG_SECTIONS and
OPTION_DECOMPRESS_DEBUG_SECTIONS. Check do_debug_sections to
rename DWARF debug sections.
* objdump.c (load_specific_debug_section): Replace
bfd_get_section_contents with bfd_get_full_section_contents.
Remove bfd_uncompress_section_contents.
(dump_section): Replace bfd_get_section_contents with
bfd_get_full_section_contents.
(display_file): Set BFD_DECOMPRESS if needed.
* readelf.c (uncompress_section_contents): Set buffer to NULL
to indiate decompression failure.
(load_specific_debug_section): Always call
uncompress_section_contents.
* doc/binutils.texi: Document --compress-debug-sections and
--decompress-debug-sections.
binutils/testsuite/
2010-10-29 H.J. Lu <hongjiu.lu@intel.com>
* binutils-all/compress.exp: New.
* binutils-all/dw2-1.S: Likewise.
* binutils-all/dw2-2.S: Likewise.
* binutils-all/libdw2-compressed.out: Likewise.
* binutils-all/libdw2.out: Likewise.
gas/
2010-10-29 H.J. Lu <hongjiu.lu@intel.com>
* write.c (compress_debug): Optimize section flags check.
gas/testsuite/
2010-10-29 H.J. Lu <hongjiu.lu@intel.com>
* elf/dwarf2-1.s: Replace .zdebug_abbrev section with
.debug_abbrev section.
* elf/dwarf2-2.3: Likewise.
* elf/dwarf2-1.d: Pass --compress-debug-sections to assembler.
Updated.
* elf/dwarf2-2.d: Likewise.
* gas/i386/i386.exp: Remove xfail on dw2-compress-2 and
x86-64-dw2-compress-2.
ld/
2010-10-29 H.J. Lu <hongjiu.lu@intel.com>
* ldfile.c (ldfile_try_open_bfd): Set BFD_DECOMPRESS after
bfd_openr returns.
* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Likewise.
* scripttempl/elf.sc: Include compressed DWARF debug sections.
ld/testsuite/
2010-10-29 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/compress.exp: New.
* ld-elf/compress1.s: Likewise.
* ld-elf/compress1a.d: Likewise.
* ld-elf/compress1b.d: Likewise.
* ld-elf/compress1c.d: Likewise.
|
|
* dwarf2.c (read_section): Revert patch for compressed debug sections.
(find_line): Likewise.
(read_and_uncompress_section): Remove.
|
|
2010-07-06 H.J. Lu <hongjiu.lu@intel.com>
* dwarf2.c (add_line_info): Initialize prev_line.
|
|
* compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED.
* dwarf2.c (read_and_uncompress_section): New function.
(read_section): Call it.
(find_line): Likewise.
binutils/ChangeLog:
* objdump.c (load_specific_debug_section): Decompress section contents
before applying relocations.
* readelf.c (load_specific_debug_section): Update section size after
decompression.
gas/ChangeLog:
* Makefile.am: Add compress-debug.c and compress-debug.h.
* Makefile.in: Regenerate.
* config.in: Add HAVE_ZLIB_H.
* configure.in: Check for zlib.h.
* configure: Regenerate.
* as.c (parse_args): Add --compress-debug-sections and
--nocompress-debug-sections.
* as.h (flag_compress_debug): New variable.
* compress-debug.c: New file.
* compress-debug.h: New file.
* write.c: Include compress-debug.h.
(compress_frag): New function.
(compress_debug): New function.
(write_object_file): Compress debug sections if requested.
|
|
DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
|
|
* dwarf2.h (DWARF2_Internal_LineInfo): Add li_max_ops_per_insn
field.
bfd/
* dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
(struct line_info): Add op_index field, change end_sequence type to
unsigned char.
(new_line_sorts_after): For the same address compare op_index.
(add_line_info): Add op_index argument, store it into the structure.
(decode_line_info): Complain about unknown versions of .debug_line.
Initialize maximum_ops_per_insn. Add op_index state register and
track it.
binutils/
* dwarf.c (struct State_Machine_Registers): Add op_index field,
change end_sequence type to unsigned char.
(reset_state_machine): Clear op_index.
(process_extended_line_op): For DW_LNE_set_address clear op_index.
(display_debug_lines_raw): Initialize li_max_ops_per_insn.
Track op_index state machine register and print it if
li_max_ops_per_insn is != 1.
(display_debug_lines_decoded): Likewise.
|
|
for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
and DW_FORM_flag_present. For unknown form value return NULL.
(scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
like DW_FORM_block.
(parse_comp_unit): Allow CU version 4.
|
|
* dwarf2.c (read_abbrevs): Return NULL on alloc failures.
(read_attribute_value, decode_line_info): Likewise.
(add_line_info, read_rangelist): Return FALSE on alloc failures.
(arange_add, sort_line_sequences): Likewise.
(find_abstract_instance_name): Handle failures from called funcs.
(scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
(find_line): Realloc to a temp, and handle alloc fail.
|
|
|
|
|
|
* dwarf2.c (struct comp_unit): Add sec_info_ptr.
(find_abstract_instance_name): Use it.
(parse_comp_unit): Set it.
|
|
* dwarf2.c (concat_filename): Rename dirname with dir_name
to void shadowing the dirname function.
Rename subdirname with subdir_name to stay consistent with
the new dir_name variable name.
|
|
(struct line_info_table): Add num_sequences, remove last_line,
add sequences.
(add_line_info): Add new sequences as necessary.
(compare_sequences): New function.
(sort_line_sequences): New function.
(decode_line_info): Initialize new fields in line table.
Call sort_line_sequences.
(lookup_address_in_line_info_table): Binary search for proper
sequence.
|
|
Fix up all warnings generated by the addition of this switch.
|
|
* dwarf2.c (lookup_address_in_line_info_table): Remove workaround
for invalid location lists generated by gcc-2.95 and Intel 6.0 C++.
Remove "function" parm, adjust caller.
|
|
* bfd/aoutx.h: Add casts.
* bfd/archive.c: Add casts.
* bfd/archive64.c: Add casts.
* bfd/archures.c: Add casts.
* bfd/bfd-in2.h: Regenerated.
* bfd/bfd.c: Add casts. (enum bfd_direction): Move out to top
level.
* bfd/bfdio.c: Add casts.
* bfd/binary.c: Add casts.
* bfd/cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
parameter to use enum value instead of int.
* bfd/coffcode.h: Add casts.
* bfd/coffgen.c: Add casts.
* bfd/cofflink.c: Add casts.
* bfd/compress.c: Add casts.
* bfd/dwarf1.c: Add casts.
* bfd/dwarf2.c: Add casts. (struct dwarf2_debug): Rename member
bfd to bfd_ptr. Update code to use new name.
* bfd/elf-attrs.c: Add casts.
* bfd/elf-bfd.h (elf_link_virtual_table_entry): Gives name to
anonymous struct. (union gotplt_union, struct
elf_link_virtual_table_entry): Move to top level.
* bfd/elf-eh-frame.c: Add casts.
* bfd/elf-strtab.c: Add casts.
* bfd/elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
argument name from typename to type_name.
* bfd/elf32-i386.c: Add casts.
* bfd/elf64-x86-64.c: Add casts.
* bfd/elfcode.h: Add casts.
* bfd/elfcore.h: Add casts.
* bfd/elflink.c: Add casts.
* bfd/format.c: Add casts.
* bfd/hash.c: Add casts.
* bfd/ihex.c: Add casts.
* bfd/libaout.h (enum aout_subformat, enum aout_magic): Move to
top level.
* bfd/libbfd.c: Add casts.
* bfd/linker.c: Add casts.
* bfd/merge.c: Add casts.
* bfd/opncls.c: Add casts.
* bfd/peXXigen.c: Add casts.
* bfd/peicode.h: Add casts.
* bfd/reloc.c: Add casts.
* bfd/section.c: Add casts.
* bfd/simple.c: Add casts.
* bfd/srec.c: Add casts.
* bfd/stabs.c: Add casts.
* bfd/syms.c: Add casts.
* bfd/targets.c: Add casts.
* bfd/tekhex.c: Add casts.
* bfd/verilog.c: Add casts.
* include/bfdlink.h (struct bfd_link_hash_common_entry): Move to
top level.
|
|
* Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
(elf-eh-frame.lo): Likewise.
(elf32-bfin.lo): Likewise.
(elf32-frv.lo): Likewise.
(elf32-xc16x.lo): Likewise.
* Makefile.in: Rebuild.
* dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
* elf-eh-frame.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-frv.c: Likewise.
* elf32-xc16x.c: Likewise.
binutils
* Makefile.am (dwarf.o): Refer to dwarf2.h, not elf/dwarf2.h.
* Makefile.in: Rebuild.
* dwarf.c: Include dwarf2.h, not elf/dwarf2.h.
gas
* Makefile.am (DEPTC_alpha_ecoff): Refer to dwarf2.h, not
elf/dwarf2.h.
(DEPTC_alpha_elf): Likewise.
(DEPTC_alpha_evax): Likewise.
(DEPTC_arm_elf): Likewise.
(DEPTC_hppa_elf): Likewise.
(DEPTC_i386_aout): Likewise.
(DEPTC_i386_coff): Likewise.
(DEPTC_i386_elf): Likewise.
(DEPTC_m68k_aout): Likewise.
(DEPTC_m68k_coff): Likewise.
(DEPTC_m68k_elf): Likewise.
(DEPTC_mips_coff): Likewise.
(DEPTC_mips_ecoff): Likewise.
(DEPTC_mips_elf): Likewise.
(DEPTC_ppc_coff): Likewise.
(DEPTC_ppc_elf): Likewise.
(DEPTC_s390_elf): Likewise.
(DEPTC_sh_coff): Likewise.
(DEPTC_sh_elf): Likewise.
(DEPTC_sh64_elf): Likewise.
(DEPTC_sparc_aout): Likewise.
(DEPTC_sparc_coff): Likewise.
(DEPTC_sparc_elf): Likewise.
(as.o): Likewise.
(dwarf2dbg.o): Likewise.
(dw2gencfi.o): Likewise.
(ehopt.o): Likewise.
(read.o): Likewise.
* Makefile.in: Rebuild.
* dw2gencfi.h: Include dwarf2.h, not elf/dwarf2.h.
* dwarf2dbg.c: Likewise.
* ehopt.c: Likewise.
gdb
* dwarf2-frame.c: Include dwarf2.h, not elf/dwarf2.h.
* dwarf2expr.c: Likewise.
* dwarf2loc.c: Likewise.
* dwarf2read.c: Likewise.
* sh-tdep.c: Likewise.
* xtensa-tdep.c: Likewise.
include
* dwarf2.h: New file, moved from elf/.
include/elf
* dwarf2.h: Move to `..'.
|
|
* dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
|
|
* dwarf2.c (read_section): Always use rawsize, if available.
|
|
* dwarf2.c (read_section): Always check the offset, even when the
section has been read before.
|
|
high_pc in order to properly sign-extend VMAs.
|
|
* dwarf2.c (find_line): Don't update stash->sec_info_ptr until
after comp_unit_find_line call.
|
|
(read_n_bytes): Remove unhelpful comment.
(read_indirect_string): Pass symbol table to read_section in case
the .debug_str section needs relocating.
PR 7037
* elf32-cr16.c (cr16_elf_howto_table): Zero the src_mask field of
the reloc descriptions.
|
|
* dwarf2.c (find_line): Don't keep stale pointers into realloc'd
memory. Return on errors. Fix memory leak.
(_bfd_dwarf2_cleanup_debug_info): Free dwarf_str_buffer.
|
|
* dwarf2.c (struct adjusted_section): Renamed from struct
loadable_section.
(struct dwarf2_debug): Adjust for renaming. Add version field.
(read_attribute_value): Correctly handle DW_FORM_ref_addr for
DWARF3.
(find_abstract_instance_name): Pass a pointer to
attribute instead of offset. For DW_FORM_ref_addr, get the
entry at the offset from the .debug_info section.
(scan_unit_for_symbols): Update.
(parse_comp_unit): Allow DWARF3. Save the version.
(unset_sections): Update for renaming.
(place_sections): Likewise. Set new VMAs for DWARF sections
also.
|
|
|
|
|
|
* dwarf2.c (struct dwarf2_debug): New variable info_ptr_memory.
(find_line): Use info_ptr_memory instead of sec_info_ptr.
(_bfd_dwarf2_cleanup_debug_info): Likewise.
|
|
of unsigned long as last parameter.
(struct dwarf2_debug): Define dwarf_abbrev_size, dwarf_line_size,
dwarf_str_size and dwarf_ranges_size as bfd_size_type instead of
unsigned long.
|
|
* Makefile.am (BFD32_LIBS): Add compress.lo.
(BFD32_LIBS_CFILES): Add compress.c.
(BFD_H_FILES): Likewise.
* Makefile.in: Regenerate.
* bfd-in2.h: Regenerate.
* config.in: Add HAVE_ZLIB_H
* configure.in: Add test for libz and zlib.h
* configure: Regenerate.
* dwarf2.c (read_section): New function.
(read_indirect_string): Call new function read_section.
(read_abbrevs): Likewise.
(decode_line_info): Likewise.
(read_debug_ranges): Likewise.
(find_line): Call new function read_section when just one
.zdebug_info section is found, otherwise read and compress
multiple sections.
(_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr.
* elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix.
(special_sections_z): New struct.
(special_sections): Refer to special_sections_z.
* elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize
sections named .zdebug_*.
(_bfd_mips_elf_fake_sections): Likewise.
* compress.c: New file.
(bfd_uncompress_section_contents): New function.
bfd/doc/
* Makefile.am (BFD_H_DEP): Add ../compress.c.
* Makefile.in: Regenerate.
binutils/
* config.in: Add HAVE_ZLIB_H
* configure.in: Add test for libz and zlib.h
* configure: Regenerate.
* dwarf.c (debug_displays): Add .zdebug_* strings.
* dwarf.h (struct dwarf_section): Add fields uncompressed_namd
and compressed_name.
* objdump.c (load_debug_section): Call
bfd_uncompress_section_contents when loading a compressed
section.
(dump_dwarf_section): Recognize compressed section name.
(mach_o_dwarf_sections): Rename as
mach_o_uncompressed_dwarf_sections.
(mach_o_compressed_dwarf_sections): New variable.
(generic_dwarf_section): Rename as
generic_uncompressed_dwarf_sections.
(generic_compressed_dwarf_sections): New variable.
(check_mach_o_dwarf): Save and restore
mach_o_compressed_dwarf_sections.
* readelf.c: Add #include for config.h and zlib.h
(process_section_headers): Recognize compressed section name.
(uncompress_section_contents): New function.
(load_debug_section): Call uncompress_section_contents when
loading a compressed section.
(display_debug_section): Recognize compressed section name.
binutils/testsuite:
* binutils-all/objdump.exp: Add test for objdump -s on a file
with a compressed debug section. Add test for objdump -W on a
file that contains a compressed debug section.
* binutils-all/readelf.exp: Call readelf_compressed_wa_test.
(readelf_compressed_wa_test): New function.
* binutils-all/dw2-compressed.S: New file.
* binutils-all/objdump.W: New file.
* binutils-all/objdump.s: New file.
* binutils-all/readelf.wa: New file.
|
|
* dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free memory allocated
for filenames in function tables and variable tables.
|
|
*dwarf2.c: Revert previous patch. All of the allocate memory is
on an obstack which will be freed at some other time.
|
|
* libbfd.c (bfd_realloc_or_free): New function. Performs like
bfd_realloc, but if the (re)allocation fails, the pointer is
freed.
* libbfd-in.h: Prototype.
* libbfd.h: Regenerate.
* bfdio.c (bfd_bwrite): Use the new function.
(bfd_seek): Likewise.
* bfdwin.c:(bfd_get_file_window): Likewise.
* elf-strtab.c (_bfd_elf_strtab_add): Likewise.
* elf32-ppc.c (ppc_elf_relax_section): Likewise.
* elf32-xtensa.c (vsprintf_msg): Likewise.
* mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
* stabs.c (_bfd_link_seciton_stabs): Likewise.
* vms-misc.c (_bfd_vms_get_record): Likewise.
* vms-tir.c (check_section): Likewise.
* vms.c (vms_new_section_hook): Likewise.
* elf32-arm.c (elf32_arm_section_map_add): Check that the
allocation of sec_data->map succeeded before using it.
* elflink.c (elf_link_output_sym): Do not overwrite finfo->
symshndxbuf until it is known that the reallocation succeeded.
|
|
* dwarf2.c (read_abbrevs): Free the abbreviation table if we run
out of memory.
(decode_line_info): Free the line_info_table before returning a
failure result.
(_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
Free the line table. Free the function table. Free the variable
table.
|
|
unparseable compilation unit.
|
|
* arange-set.c: Delete.
* arange-set.h: Delete.
* dwarf2.c: Revert 2007-09-21 changes.
* Makefile.am: Likewise.
* Makefile.in: Regenerate.
* po/SRC-POTFILES.in: Regenerate.
|
|
(BFD32_LIBS_CFILES): Add arange-set.c.
(SOURCE_HFILES): Add arange-set.h
(dwarf2.lo): Add dependency upon arange-set.h.
(arange-set.lo): New target.
* Makefile.in: Regenerate.
* arange-set.c: New file.
* arange-set.h: New file.
* dwarf2.c: Include arange-set.h.
(struct dwarf2_debug) Add new fields comp_unit_count and comp_unit_arange_set.
(struct comp_unit) Replace field arange with a new field arange_set.
(dwarf2_arange_set_allocate, dwarf2_arange_set_deallocate,
(dwarf2_combine_arange_value, dwarf2_arange_set_new,
(dwarf2_arange_set_with_value_new, dwarf2_comp_unit_arange_add): New
functions to utilize arange set in dwarf2.c.
(arange_add): Formatting change for a line longer than 80 characters.
(decode_line_info): Replace call target arange_add with
(dwarf2_comp_unit_arange_add.
(read_rangelist_insert_arange_list,
(read_rangelist_comp_unit_arange_add): New functions used as callbacks
for read_rangelist.
(read_rangelist): Change interface to accept a callback and data to
allow caller to select the action peformed on a new range list read.
(scan_unit_for_symbols): Use new interface of read_rangelist.
(parse_comp_unit): Create an arange set for each new comp unit. Use new
interface of read_rangelist. Replace call to arange_add with that to
dwarf2_comp_unit_arange_add.
(comp_unit_contains_address): Replace sequential search with a call to
arange_set_lookup_address, which can handles large set efficiently.
(stash_copy_local_aranges, stash_maybe_enable_arange_set,
(stash_find_nearest_line_fast): New functions maintaining and using a
valued global arange set for all compilation units to speed up
bfd_dwarf2_find_nearest_line.
(find_line): Use global arange set. Replace sequential search over all
compilation units with a call to stash_find_nearest_line_fast. Add
book keeping to count number of compilation units. Replace empty
arange list test with a call to arange_set_empty_p.
|
|
2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4986
* dwarf2.c (new_line_sorts_after): Undo the last change.
(add_line_info): Only keep the last entry with the same address
and end sequence.
ld/testsuite/
2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4986
* ld-ia64/line.exp: New.
* ld-ia64/undefined.s: Likewise.
* ld-x86-64/line.exp: Don't check CC.
|
|
2007-08-31 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4986
* dwarf2.c (new_line_sorts_after): Also compare line number.
ld/testsuite/
2007-08-31 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4986
* ld-x86-64/line.exp: New
* ld-x86-64/undefined.s: Likewise.
|
|
* dwarf2.c (struct dwarf2_debug): Add new fields to support function and variable info hash tables. Add last_comp_unit, info_hash_count, funcinfo_hash_table, varinfo_hash_table, hash_units_head.
(struct comp_unit): Add prev_unit, cached.
(struct info_list_node, struct info_hash_entry, struct info_hash_table): New.
(info_hash_table_newfunc, create_info_hash_table, insert_info_hash_table, lookup_info_hash_table): New functions implementing function and variable info hash tables.
(scan_unit_for_symbols): Add checks to make sure hash tables are consistent with compilation units.
(comp_unit_maybe_decode_line_info): New function.
(comp_unit_find_line): Use comp_unit_maybe_decode_line_info.
(reverse_funcinfo_list, reverse_varinfo_list, comp_unit_hash_info, info_hash_lookup_funcinfo, info_hash_lookup_varinfo, stash_maybe_update_info_hash_table, stash_verify_info_hash_table, stash_maybe_enable_info_hash_tables, stash_find_line_fast): New functions. Make use of info hash tables to speed up bfd_dwarf2_find_line.
(find_line): Use hash table for faster lookup if it is turned on.
Also add code to maintain bi-directional link in comp units.
|
|
* dwarf2.c: (find_line) Do not dereference functionname_ptr if do_line is true.
|
|
|
|
(_bfd_dwarf2_find_nearest_line): Use it.
(_bfd_dwarf2_find_line): Use it.
|