From ff952dad10ea2eef915f830c219955fad037ad17 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 21 Sep 2007 16:16:18 +0000 Subject: * Makefile.am (BFD32_LIBS): Add arange-set.lo. (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. --- bfd/Makefile.am | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'bfd/Makefile.am') diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 0ec54b0ca4..5c43f3099c 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -42,7 +42,7 @@ BFD32_LIBS = \ format.lo init.lo libbfd.lo opncls.lo reloc.lo \ section.lo syms.lo targets.lo hash.lo linker.lo \ srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \ - merge.lo dwarf2.lo simple.lo + merge.lo dwarf2.lo simple.lo arange-set.lo BFD64_LIBS = archive64.lo @@ -52,7 +52,7 @@ BFD32_LIBS_CFILES = \ format.c init.c libbfd.c opncls.c reloc.c \ section.c syms.c targets.c hash.c linker.c \ srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \ - merge.c dwarf2.c simple.c + merge.c dwarf2.c simple.c arange-set.c BFD64_LIBS_CFILES = archive64.c @@ -665,8 +665,8 @@ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES) ## This is a list of all .h files which are in the source tree. SOURCE_HFILES = \ - aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \ - elf-bfd.h elf-hppa.h elf32-hppa.h \ + arange-set.h aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \ + ecoffswap.h elf-bfd.h elf-hppa.h elf32-hppa.h \ elf64-hppa.h elfcode.h elfcore.h \ freebsd.h genlink.h go32stub.h \ libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \ @@ -1049,7 +1049,9 @@ merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/dwarf2.h + $(INCDIR)/elf/dwarf2.h arange-set.h +arange-set.lo: arange-set.c arange-set.h $(INCDIR)/libiberty.h \ + $(INCDIR)/splay-tree.h simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ $(INCDIR)/bfdlink.h archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ -- cgit v1.2.1