public inbox for archer-commits@sourceware.org
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 <jan.kratochvil@redhat.com>
Date:   Thu May 25 15:48:12 2017 +0200

    DWARF-5: .debug_names index consumer
    
    Hi,
    
    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
    no-index.
    
    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.
    
    
    Jan
    
    
    gdb/ChangeLog
    2017-05-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* 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
    	debug_names_table.
    	(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_signatured_type_table_from_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.
    	(Mapped_debug_names::namei_to_name)
    	(Dw2_debug_names_iterator::find_vec_in_debug_names)
    	(Dw2_debug_names_iterator::find_vec_in_debug_names)
    	(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):
    	New.
    	(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
    	debug_aranges.
    	* xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
    
    gdb/testsuite/ChangeLog
    2017-05-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* gdb.base/maint.exp (check for .gdb_index): Check also for
    	.debug_names.
    	* 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 <jan.kratochvil@redhat.com>
Date:   Fri May 26 19:35:41 2017 +0200

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

commit a78a92cb4fa771815767500628596cfaabfceabc
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu May 25 23:33:21 2017 +0200

    Code cleanup: dwarf2_initialize_objfile return value
    
    Hi,
    
    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.
    
    
    Jan
    
    
    gdb/ChangeLog
    2017-05-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* 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 <jan.kratochvil@redhat.com>
Date:   Thu May 25 15:47:08 2017 +0200

    DWARF-5: .debug_names index producer
    
    Hi,
    
    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/gdb-add-index.sh (incl. cc-with-tweaks.sh) has no
    commandline option for that -dwarf-4 GDB option.
    
    
    Jan
    
    
    gdb/ChangeLog
    2017-05-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* contrib/gdb-add-index.sh (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.
    	(INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
    	(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.
    
    gdb/doc/ChangeLog
    2017-05-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* gdb.texinfo (Index Files): Document .debug_names and -dwarf-4.
    	(Index Section Format): Mention .debug_names.

commit d5d9b4e3e29fb119a61138a11c93634eae865e68
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu May 25 15:46:44 2017 +0200

    cc-with-tweaks.sh: Use gdb-add-index.sh
    
    Hi,
    
    currently contrib/cc-with-tweaks.sh is calling for its -i option objcopy itself
    instead of using contrib/gdb-add-index.sh 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/gdb-add-index.sh instead of duplicating its code
    in contrib/cc-with-tweaks.sh.
    
    The problem is when no index is produced whether contrib/cc-with-tweaks.sh
    should fail or not.  As originally contrib/cc-with-tweaks.sh was more quiet
    (=successful) than contrib/gdb-add-index.sh 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, gdb-add-index.sh: No index was created for /quadgdb/testsuite.unix.-m64/outputs/gdb.arch/i386-bp_permanent/i386-bp_permanent
    	+gdb-add-index.sh: [Was there no debuginfo? Was there already an index?]
    	+UNTESTED: gdb.arch/i386-bp_permanent.exp: failed to compile
    
    
    Jan
    
    
    gdb/ChangeLog
    2017-05-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* contrib/cc-with-tweaks.sh (t, GDB_ADD_INDEX): New variables.
    	<$want_index>: Call $GDB_ADD_INDEX.

commit 65ca64ea7b6404e263a3a788abc5b3340e26b7a6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu May 25 15:41:04 2017 +0200

    Code cleanup: C++ify .gdb_index producer.
    
    gdb/ChangeLog
    2017-05-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	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):
    	Remove.
    	(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 <jan.kratochvil@redhat.com>
Date:   Thu May 25 15:45:31 2017 +0200

    binutils

commit 4d073453abaa58cdce67b5f5dccd991190a182fa
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu May 25 15:44:50 2017 +0200

    gccidx

-----------------------------------------------------------------------


hooks/post-receive
--
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).