Commit Graph

11 Commits

Author SHA1 Message Date
David Anderson
d02c7b92b5 Some places in the hash functions were not
using DW_TSHASHTYPE. Now they are.
libdwarf/dwarf_alloc.c
libdwarf/dwarf_tied.c
libdwarf/dwarf_tsearchhash.c
2016-02-08 09:11:40 -08:00
David Anderson
cd130546c1 libdwarf:
* dwarf_init_finish.c: Fix indents. remove a trailing space.
    * dwarf_tsearch.h,dwarf_tsearchhash.c: Now DW_TSHASHTYPE (if not defined
      otherwise) defines the type returned by the hash function
      used in tsearchhash.
    * pro_alloc.c: Removed trailing whitespace.

tsearch:
* RUNTEST: the script had a couple of problems (typos). Fixed.
       Added comments about running the tests.
     * dwarf_tsearch.h: Provide a default DW_TSHASHTYPE
       for tsearchhash and use DW_TSHASHTYPE.
     * dwarf_tsearchbal.c,dwarf_tsearchbin.c,dwarf_tsearchepp.c,
       dwarf_tsearchred.c: Use DW_TSHASHTYPE.
     * dwarf_tsearchhash.c: use DW_TSHASHTYPE, add UNUSEDARG use.
       Now the primes list starts at 79, not 5 (the low numbers
       were really only for basic testing). Add UNUSEDARG
       though it is defined as empty here (it is for gcc
       to suppress some warnings).
     * tsearch_tester.c: Use DW_TSHASHTYPE.  Changed one
       error message to help match with input test files.
2016-02-07 13:35:42 -08:00
David Anderson
4945a195c3 Removed trailing whitespace.
dwarfdump/print_die.c
dwarfdump/tag_attr.c
dwarfdump/tag_tree.c

libdwarf/dwarf_elf_access.c
libdwarf/dwarf_original_elf_init.c
libdwarf/dwarf_tsearchhash.c
libdwarf/libdwarfdefs.h
2016-02-06 14:38:13 -08:00
David Anderson
d76395da7d Merge branch 'unattr'
Conflicts:
	libdwarf/ChangeLog
2016-02-06 14:28:35 -08:00
David Anderson
8e1e9c4b5b Now the base hash table size is closer to 100 by default.
The tiny values were only intended to test the table-expansion
logic.
libdwarf/dwarf_tsearchhash.c
2016-02-06 13:49:24 -08:00
David Anderson
e9cf490520 * configure.in: defines HAVE_UNUSED_ATTRIBUTE
if the gcc '__attribute__ ((name))' compiles ok.
    * config.h.in, configure: Regenerated.
    * libdwarfdefs.h: Test HAVE_UNUSED_ATTRIBUTE and define
      UNUSEDARG appropriately.
    * dwarf_alloc.c,dwarf_elf_access.c,dwarf_form.c,dwarf_frame2.c,
      dwarf_gdbindex.c,dwarf_global.c,dwarf_init_finish.c,dwarf_line.c,
      dwarf_line_table_reader_common.c,dwarf_macro5.c,
      dwarf_original_elf_init.c,dwarf_print_lines.c,dwarf_ranges.c,
      dwarf_tsearchhash.c,dwarf_util.c,dwarf_xu_index.c,
      pro_alloc.c,pro_frame.c,pro_init.c,pro_reloc.c,
      pro_reloc_stream.c,pro_section.c: Use UNUSEDARG to suppress
      meaningless unused-parameter warnings from gcc.
2016-02-06 09:20:41 -08:00
David Anderson
d9d40e4d80 Add additional flags to the --enable-wall option.
dwarfdump/configure.in
libdwarf/configure.in

dwarfdump/configure (regenerate)
libdwarf/configure (regenerate)

These fix compiler warnings
dwarfdump/dwarf_tsearchbal.c
dwarfdump/dwarfdump.c
dwarfdump/dwconf.c
dwarfdump/dwconf.h
dwarfdump/esb.c
dwarfdump/globals.h
dwarfdump/print_debugfission.c
dwarfdump/print_die.c
dwarfdump/print_frames.c
dwarfdump/print_sections.c

libdwarf/dwarf_die_deliv.c
libdwarf/dwarf_frame.c
libdwarf/dwarf_frame2.c
libdwarf/dwarf_gdbindex.c
libdwarf/dwarf_gdbindex.h
libdwarf/dwarf_line.c
libdwarf/dwarf_line.h
libdwarf/dwarf_line_table_reader_common.c
libdwarf/dwarf_macro5.c
libdwarf/dwarf_query.c
libdwarf/dwarf_tsearchhash.c
2016-01-21 15:42:58 -08:00
David Anderson
a7f7586018 Somehow was not matching the
output of dwarfdump/print_gdbindex.c.
dwarfdump2/print_gdbindex.cc

Adds dwarfgen: to messages. adds try-catch to better deal
with out-of-malloc-space.
dwarfgen/dwarfgen.cc

Adds a few instances of setting error code correctly.
libdwarf/dwarf_elf_access.c

Found a place where NULL not tested for.
Now it is, so out-of-malloc-space won't
generate instant coredump, but will
return NULL.

libdwarf/dwarf_tsearchhash.c
tsearch/dwarf_tsearchhash.c
tsearch/dwarf_tsearchred.c
2014-12-10 09:32:13 -08:00
David Anderson
0e99ce4e8e Removing accidental C99-isms.
libdwarf/dwarf_query.c
libdwarf/dwarf_tsearchhash.c
libdwarf/dwarf_util.c
tsearch/dwarf_tsearchhash.c
2014-09-10 09:52:22 -07:00
David Anderson
6caed6d274 Here we fix some warnings and get gdbindex
to print better.  And get some section names to
come out exactly right (but not all, yet).
dwarfdump/dwarfdump.1
dwarfdump/dwarfdump.c
dwarfdump/print_gdbindex.c
dwarfdump2/dwarfdump.1
dwarfdump2/dwarfdump.cc
dwarfdump2/print_debugfission.cc
dwarfdump2/print_die.cc
dwarfdump2/print_gdbindex.cc

Here we fix some warnings.
libdwarf/dwarf_alloc.c
libdwarf/dwarf_alloc.h
libdwarf/dwarf_gdbindex.c
libdwarf/dwarf_loc.c
libdwarf/dwarf_query.c
libdwarf/dwarf_sort_line.c

Here we fix some warnings.
libdwarf/dwarf_tsearchhash.c
tsearch/dwarf_tsearchhash.c

Here we fix some warnings
libdwarf/dwarf_util.c
libdwarf/libdwarf.h.in
libdwarf/pro_alloc.c
libdwarf/pro_arange.c
libdwarf/pro_forms.c
libdwarf/pro_reloc.c
libdwarf/pro_types.c
2014-08-04 13:48:31 -07:00
David Anderson
545d698072 Now using tsearch style calls with
dwarf_tsearch implementation.
Fixed a small memory curruption in dwarfdump2/print_pubnames.cc
Added tsearch directory with various sorts of tree searches
(all written from scratch, not copied from anywhere).
2014-01-29 11:41:39 -08:00