public inbox for
help / color / mirror / Atom feed
* [SCM]  users/jkratoch/index: c7f6411c229d620b21c1ba1a2b2c3e31e0510f87
@ 2017-05-26 18:03 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2017-05-26 18:03 UTC (permalink / raw)
  To: archer-commits

The branch, users/jkratoch/index has been created
        at  c7f6411c229d620b21c1ba1a2b2c3e31e0510f87 (commit)

- Log -----------------------------------------------------------------
commit c7f6411c229d620b21c1ba1a2b2c3e31e0510f87
Author: Jan Kratochvil <>
Date:   Thu May 25 15:48:12 2017 +0200

    DWARF-5: .debug_names index consumer
    it is not regression-free against no-index but it is regression-free against
    .gdb_index.  That is because .gdb_index is not regression-free against
    Some testcases needed to be updated as they were missing .debug_aranges.
    While that does not matter for no-index (as GDB builds the mapping internally
    during dwarf2_build_psymtabs_hard) and neither for .gdb_index (as GDB uses that
    internally built mapping which it stores into .gdb_index) it does matter for
    .debug_names as that simply assumes existing .debug_aranges from GCC.
    I tried some performance checking but the index handling speed is negligible
    compared to the CU expansion associated with it.  .debug_names looked even as
    a bit faster to me than .gdb_index which rather surprised me but I did not
    investigate it more.
    2017-05-26  Jan Kratochvil  <>
    	* defs.h (elf_sym_fns_debug_names): New declaration.
    	* dwarf2read.c (Mapped_debug_names): New.
    	(struct dwarf2_per_objfile): Add debug_names, debug_aranges and
    	(dwarf2_elf_names): Add debug_names and debug_aranges.
    	(struct dwz_file): Add debug_names.
    	(dwarf2_locate_sections): Add debug_names and debug_aranges.
    	(locate_dwz_sections): Add debug_names.
    	(create_addrmap_from_aranges): New.
    	(dwarf2_read_index): Update function comment.
    	(read_debug_names_from_section, create_cus_from_debug_names_list)
    	(create_cus_from_debug_names, dwarf2_read_debug_names): New.
    	(dwarf5_djb_hash): Function renamed from DebugNamesNameTable::djb_hash.
    	(Dw2_debug_names_iterator): New.
    	(read_indirect_string_at_offset): New declaration.
    	(Dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
    	(dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
    	(dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
    	(dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
    	(dwarf2_free_objfile): Delete also debug_names_table;
    	(DebugNamesNameTable::djb_hash): Rename it to dwarf5_djb_hash.
    	(DebugNamesNameTable::build): Update djb_hash caller.
    	* elfread.c (elf_sym_fns_debug_names): New.
    	* psymtab.h (dwarf2_debug_names_functions): New declaration.
    	* symfile.h (struct dwarf2_debug_sections): Add debug_names and
    	* xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
    2017-05-26  Jan Kratochvil  <>
    	* gdb.base/maint.exp (check for .gdb_index): Check also for
    	* gdb.dlang/watch-loc.c (.debug_aranges): New.
    	* gdb.dwarf2/dw2-case-insensitive-debug.S: Likewise.
    	* gdb.dwarf2/gdb-index.exp (check if index present, .gdb_index used)
    	(.gdb_index used after symbol reloading): Support also .debug_names.
    	* gdb.mi/dw2-ref-missing-frame-func.c (.debug_aranges): New.

commit 1543c177a2e69043840e853c1b88e5f5e5daf9cf
Author: Jan Kratochvil <>
Date:   Fri May 26 19:35:41 2017 +0200

    Refactor: Move some generic code out of .gdb_index code
    just for the next patch.
    2017-05-26  Jan Kratochvil  <>
    	* dwarf2read.c (create_cu_from_index_list): New from ...
    	(create_cus_from_index_list): ... this function, use it.
    	(dw2_expand_symtabs_matching_one): New from ...
    	(dw2_expand_symtabs_matching): ... this function, use them.

commit a78a92cb4fa771815767500628596cfaabfceabc
Author: Jan Kratochvil <>
Date:   Thu May 25 23:33:21 2017 +0200

    Code cleanup: dwarf2_initialize_objfile return value
    dwarf2_initialize_objfile was returning boolean whether it is psymtabs or
    .gdb_index while now it needs to return also whether it is .debug_names.
    2017-05-26  Jan Kratochvil  <>
    	* defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
    	declarations from elfread.c.
    	(dwarf2_initialize_objfile): Change return value.
    	* elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
    	declarations to defs.h.
    	(elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
    	* symfile.h (dwarf2_initialize_objfile): Change return type.

commit 4117ad457ff2f226f1d10f00e7d7cce41ac1c771
Author: Jan Kratochvil <>
Date:   Thu May 25 15:47:08 2017 +0200

    DWARF-5: .debug_names index producer
    there are two FIXME lines I do not have a real answer for.
    Also I am not sure if the -dwarf-4 option for former .gdb_index should be named
    that way.  And contrib/ (incl. has no
    commandline option for that -dwarf-4 GDB option.
    2017-05-26  Jan Kratochvil  <>
    	* contrib/ (index): Rename to ...
    	(index4): ... here.
    	(index5, debugstr, debugstrmerge, debugstrerr): New variables.
    	Support also .debug_names and .debug_str.
    	* dwarf2read.c: Include cmath, locale, set, list.
    	(INDEX_SUFFIX): Rename to ...
    	(INDEX4_SUFFIX): ... here.
    	(DataBuf::append_unsigned_leb128, DataBuf::empty)
    	(DataBuf::operator const char *, DebugNamesNameTable, check_dwarf64_offsets): New.
    	(write_gdbindex): New from write_psymtabs_to_index code.
    	(write_debug_names): New.
    	(write_psymtabs_to_index): New parameter is_dwarf5.  Support
    	filename_str and out_file_str.  Move code to write_gdbindex, possibly
    	call write_debug_names.
    	(save_gdb_index_command): New parameter -dwarf-4.
    	(_initialize_dwarf2_read): Document the new parameter -dwarf-4.
    2017-05-26  Jan Kratochvil  <>
    	* gdb.texinfo (Index Files): Document .debug_names and -dwarf-4.
    	(Index Section Format): Mention .debug_names.

commit d5d9b4e3e29fb119a61138a11c93634eae865e68
Author: Jan Kratochvil <>
Date:   Thu May 25 15:46:44 2017 +0200 Use
    currently contrib/ is calling for its -i option objcopy itself
    instead of using contrib/ which does the same.
    With DWARF-5 .debug_names the commands are more complicated (as now also
    .debug_str needs to be modified) and so I have decided to rather reuse
    contrib/ instead of duplicating its code
    in contrib/
    The problem is when no index is produced whether contrib/
    should fail or not.  As originally contrib/ was more quiet
    (=successful) than contrib/ and so after this patch the
    testsuite runs with an index would "regress".  I have tried to keep the
    behavior unchanged.  Some cases still error with:
    	Ada is not currently supported by the index
    But some cases (such as some trivial gdb.dwarf2/ testcases with no DWARF data
    to index) produce no index while the testcases still PASS now instead of:
    	-PASS: gdb.arch/i386-bp_permanent.exp: stack pointer value matches
    	+gdb compile failed, No index was created for /quadgdb/testsuite.unix.-m64/outputs/gdb.arch/i386-bp_permanent/i386-bp_permanent [Was there no debuginfo? Was there already an index?]
    	+UNTESTED: gdb.arch/i386-bp_permanent.exp: failed to compile
    2017-05-26  Jan Kratochvil  <>
    	* contrib/ (t, GDB_ADD_INDEX): New variables.
    	<$want_index>: Call $GDB_ADD_INDEX.

commit 65ca64ea7b6404e263a3a788abc5b3340e26b7a6
Author: Jan Kratochvil <>
Date:   Thu May 25 15:41:04 2017 +0200

    Code cleanup: C++ify .gdb_index producer.
    2017-05-26  Jan Kratochvil  <>
    	Code cleanup: C++ify .gdb_index producer.
    	* common/common-defs.h <c++11> (std::make_unique): New.
    	* dwarf2read.c: Remove include common/gdb_unlinker.h.  Add includes
    	unordered_set and unordered_map.
    	(MAYBE_SWAP): Cast it to offset_type.
    	(struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
    	(create_strtab, add_string): Remove.
    	(file_write, file_write, DataBuf): New.
    	(struct symtab_index_entry): Use std::vector for cu_indices.
    	(struct mapped_symtab): Use std::vector for data.
    	(hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
    	(create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
    	(find_slot): Change return type.  Update it to the new data structures.
    	(hash_expand, add_index_entry): Update it to the new data structures.
    	(offset_type_compare): Remove.
    	(uniquify_cu_indices): Update it to the new data structures.
    	(CstrView, CstrViewHasher, VectorHasher): New.
    	(add_indices_to_cpool): Remove.
    	(write_hash_table): Update it to the new data structures.
    	(struct psymtab_cu_index_map, hash_psymtab_cu_index)
    	(eq_psymtab_cu_index): Remove.
    	(struct addrmap_index_data): Change addr_obstack pointer to DataBuf
    	reference and std::unordered_map for cu_index_htab.
    	(add_address_entry, add_address_entry_worker, write_address_map)
    	(write_psymbols): Update it to the new data structures.
    	(write_obstack): Remove.
    	(struct signatured_type_index_data): Change types_list to a DataBuf
    	reference and psyms_seen to a std::unordered_set reference.
    	(write_one_signatured_type, recursively_write_psymbols)
    	(write_psymtabs_to_index): Update it to the new data structures.

commit 08ea9dc56e39f68f3f0b6ee73e24f8b853e8c6a1
Author: Jan Kratochvil <>
Date:   Thu May 25 15:45:31 2017 +0200


commit 4d073453abaa58cdce67b5f5dccd991190a182fa
Author: Jan Kratochvil <>
Date:   Thu May 25 15:44:50 2017 +0200



Repository for Project Archer.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-26 18:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26 18:03 [SCM] users/jkratoch/index: c7f6411c229d620b21c1ba1a2b2c3e31e0510f87 jkratoch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).