gdb: fix whitespace issues in ChangeLog
[deliverable/binutils-gdb.git] / libctf / ChangeLog
index f3ac4cc91e7798f921d97a90a592e750d12ec7c1..bbd807dddfd2ae5322fb1bba9fa27fa52a79c8d4 100644 (file)
@@ -1,3 +1,285 @@
+2020-07-26  Eli Zaretskii  <eliz@gnu.org>
+
+       PR binutils/25155:
+       * ctf-create.c (EOVERFLOW): If not defined by system header,
+       redirect to ERANGE as a poor man's substitute.
+       * ctf-subr.c (ENOTSUP): If not defined, use ENOSYS instead.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_dtd_insert): Add uintptr_t casts.
+       (ctf_dtd_delete): Likewise.
+       (ctf_dtd_lookup): Likewise.
+       (ctf_rollback): Likewise.
+       * ctf-hash.c (ctf_hash_lookup_type): Likewise.
+       * ctf-types.c (ctf_lookup_by_rawhash): Likewise.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-lookup.c (ctf_lookup_by_name): Adjust.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-archive.c (ctf_arc_bufopen): Endian-swap the archive magic
+       number if needed.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_list_splice): New.
+       * ctf-util.h (ctf_list_splice): Likewise.
+       * ctf-link.c (link_sort_inputs_cb_arg_t): Likewise.
+       (ctf_link_sort_inputs): Likewise.
+       (ctf_link_deduplicating_count_inputs): Likewise.
+       (ctf_link_deduplicating_open_inputs): Likewise.
+       (ctf_link_deduplicating_close_inputs): Likewise.
+       (ctf_link_deduplicating_variables): Likewise.
+       (ctf_link_deduplicating_per_cu): Likewise.
+       (ctf_link_deduplicating): Likewise.
+       (ctf_link): Call it.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-link.c (ctf_link_one_input_archive_member): Check
+       CTF_LINK_OMIT_VARIABLES_SECTION.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_type_id_key): New, the key in the
+       cd_id_to_file_t.
+       (ctf_dedup): New, core deduplicator state.
+       (ctf_file_t) <ctf_dedup>: New.
+       <ctf_dedup_atoms>: New.
+       <ctf_dedup_atoms_alloc>: New.
+       (ctf_hash_type_id_key): New prototype.
+       (ctf_hash_eq_type_id_key): Likewise.
+       (ctf_dedup_atoms_init): Likewise.
+       * ctf-hash.c (ctf_hash_eq_type_id_key): New.
+       (ctf_dedup_atoms_init): Likewise.
+       * ctf-create.c (ctf_serialize): Adjusted.
+       (ctf_add_encoded): No longer static.
+       (ctf_add_reftype): Likewise.
+       * ctf-open.c (ctf_file_close): Destroy the
+       ctf_dedup_atoms_alloc.
+       * ctf-dedup.c: New file.
+        * ctf-decls.h [!HAVE_DECL_STPCPY]: Add prototype.
+       * configure.ac: Check for stpcpy.
+       * Makefile.am: Add it.
+       * Makefile.in: Regenerate.
+        * config.h.in: Regenerate.
+        * configure: Regenerate.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * configure.ac: Add --enable-libctf-hash-debugging.
+       * aclocal.m4: Pull in enable.m4, for GCC_ENABLE.
+       * Makefile.in: Regenerated.
+       * configure: Likewise.
+       * config.h.in: Likewise.
+       * ctf-impl.h [ENABLE_LIBCTF_HASH_DEBUGGING]
+       (ctf_assert): Define to assert.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-sha1.h: New, inline wrappers around sha1_init_ctx and
+       sha1_process_bytes.
+       * ctf-impl.h: Include it.
+       (ctf_sha1_init): New.
+       (ctf_sha1_add): Likewise.
+       (ctf_sha1_fini): Likewise.
+       * ctf-sha1.c: New, non-inline wrapper around sha1_finish_ctx
+       producing strings.
+       * Makefile.am: Add file.
+       * Makefile.in: Regenerate.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * libctf.ver (ctf_link_set_variable_filter): Add.
+       * ctf-impl.h (ctf_file_t) <ctf_link_variable_filter>: New.
+       <ctf_link_variable_filter_arg>: Likewise.
+       * ctf-create.c (ctf_serialize): Adjust.
+       * ctf-link.c (ctf_link_set_variable_filter): New, set it.
+       (ctf_link_one_variable): Call it if set.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-link.c (ctf_link_one_variable): Check the dst_type for
+       conflicts, not the source type.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_file_t): Improve comments.
+       <ctf_link_cu_mapping>: Split into...
+       <ctf_link_in_cu_mapping>: ... this...
+       <ctf_link_out_cu_mapping>: ... and this.
+       * ctf-create.c (ctf_serialize): Adjust.
+       * ctf-open.c (ctf_file_close): Likewise.
+       * ctf-link.c (ctf_create_per_cu): Look things up in the
+       in_cu_mapping instead of the cu_mapping.
+       (ctf_link_add_cu_mapping): The deduplicating link will define
+       what happens if many FROMs share a TO.
+       (ctf_link_add_cu_mapping): Create in_cu_mapping and
+       out_cu_mapping. Do not create ctf_link_outputs here any more, or
+       create per-CU dicts here: they are already created when needed.
+       (ctf_link_one_variable): Log a debug message if we skip a
+       variable due to its type being concealed in a CU-mapped link.
+       (This is probably too common a case to make into a warning.)
+       (ctf_link): Create empty per-CU dicts if requested.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-link.c (ctf_link_write): Close the fd.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * Makefile.am: Set -DNOBFD=1 in libctf-nobfd, and =0 elsewhere.
+       * Makefile.in: Regenerated.
+       * ctf-impl.h (ctf_link_input_name): New.
+       (ctf_file_t) <ctf_link_flags>: New.
+       * ctf-create.c (ctf_serialize): Adjust accordingly.
+       * ctf-link.c: Define ctf_open as weak when PIC.
+       (ctf_arc_close_thunk): Remove unnecessary thunk.
+       (ctf_file_close_thunk): Likewise.
+       (ctf_link_input_name): New.
+       (ctf_link_input_t): New value of the ctf_file_t.ctf_link_input.
+       (ctf_link_input_close): Adjust accordingly.
+       (ctf_link_add_ctf_internal): New, split from...
+       (ctf_link_add_ctf): ... here.  Return error if lazy loading of
+       CTF is not possible.  Change to just call...
+       (ctf_link_add): ... this new function.
+       (ctf_link_add_cu_mapping): Transition to ctf_err_warn.  Drop the
+       ctf_file_close_thunk.
+       (ctf_link_in_member_cb_arg_t) <file_name> Rename to...
+       <in_file_name>: ... this.
+       <arcname>: Drop.
+       <share_mode>: Likewise (migrated to ctf_link_flags).
+       <done_main_member>: Rename to...
+       <done_parent>: ... this.
+       <main_input_fp>: Rename to...
+       <in_fp_parent>: ... this.
+       <cu_mapped>: New.
+       (ctf_link_one_type): Adjuwt accordingly.  Transition to
+       ctf_err_warn, removing a TODO.
+       (ctf_link_one_variable): Note a case too common to warn about.
+       Report in the debug stream if a cu-mapped link prevents addition
+       of a conflicting variable.
+       (ctf_link_one_input_archive_member): Adjust.
+       (ctf_link_lazy_open): New, open a CTF archive for linking when
+       needed.
+       (ctf_link_close_one_input_archive): New, close it again.
+       (ctf_link_one_input_archive): Adjust for lazy opening, member
+       renames, and ctf_err_warn transition.  Move the
+       empty_link_type_mapping call to...
+       (ctf_link): ... here.  Adjut for renamings and thunk removal.
+       Don't spuriously fail if some input contains no CTF data.
+       (ctf_link_write): ctf_err_warn transition.
+       * libctf.ver: Remove not-yet-stable comment.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_strerror): Delete.
+       * ctf-subr.c (ctf_strerror): Likewise.
+       * ctf-error.c (ctf_errmsg): Stop using ctf_strerror: just use
+       strerror directly.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.c (ctf_file_t) <ctf_parent_unreffed>: New.
+       (ctf_import_unref): New.
+       * ctf-open.c (ctf_file_close) Drop the refcount all the way to
+       zero.  Don't recurse back in if the refcount is already zero.
+       (ctf_import): Check ctf_parent_unreffed before deciding whether
+       to close a pre-existing parent.  Set it to zero.
+       (ctf_import_unreffed): New, as above, setting
+       ctf_parent_unreffed to 1.
+       * ctf-create.c (ctf_serialize): Do not ctf_import into the new
+       child: use direct assignment, and set unreffed on the new and
+       old children.
+       * ctf-link.c (ctf_create_per_cu): Import the parent using
+       ctf_import_unreffed.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_link_type_mapping_key): Rename to...
+       (ctf_link_type_key): ... this, adjusting member prefixes to
+       match.
+       (ctf_hash_type_mapping_key): Rename to...
+       (ctf_hash_type_key): ... this.
+       (ctf_hash_eq_type_mapping_key): Rename to...
+       (ctf_hash_eq_type_key): ... this.
+       * ctf-hash.c (ctf_hash_type_mapping_key): Rename to...
+       (ctf_hash_type_key): ... this, and adjust for member name
+       changes.
+       (ctf_hash_eq_type_mapping_key): Rename to...
+       (ctf_hash_eq_type_key): ... this, and adjust for member name
+       changes.
+       * ctf-link.c (ctf_add_type_mapping): Adjust.  Note the lack of
+       need for out-of-memory checking in this code.
+       (ctf_type_mapping): Adjust.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       configure.ac: Check for vasprintf.
+       configure: Regenerated.
+       config.h.in: Likewise.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-archive.c (ctf_arc_bufopen): Fix message.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (struct ctf_archive_internal) <ctfi_free_strsect>
+       New.
+       * ctf-open-bfd.c (ctf_bfdopen_ctfsect): Explicitly open a strtab
+       if the input has no symtab, rather than dividing by
+       zero. Arrange to free it later via ctfi_free_ctfsect.
+       * ctf-archive.c (ctf_new_archive_internal): Do not
+       ctfi_free_strsect by default.
+       (ctf_arc_close): Possibly free it here.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-dump.c (ctf_is_slice): Delete, unnecessary.
+       (ctf_dump_format_type): improve slice formatting.  Always print
+       the type size, even of slices.
+       (ctf_dump_member): Print slices (-> bitfields) differently from
+       non-slices.  Failure to format a type is not an OOM.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-dump.c (ctf_dump_format_type): Emit a warning.
+       (ctf_dump_label): Swallow errors from ctf_dump_format_type.
+       (ctf_dump_objts): Likewise.
+       (ctf_dump_var): Likewise.
+       (ctf_dump_type): Do not emit a duplicate message.  Move to
+       ctf_err_warning, and swallow all errors.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-decl.c (ctf_decl_fini): Free the cd_buf.
+       (ctf_decl_buf): Once it escapes, don't try to free it later.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-types.c (ctf_type_aname): Print arg types here...
+       * ctf-dump.c (ctf_dump_funcs): ... not here: but do substitute
+       in the type name here.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_assert): New.
+       (ctf_err_warning_t): Likewise.
+       (ctf_file_t) <ctf_errs_warnings>: Likewise.
+       (ctf_err_warn): New prototype.
+       (ctf_assert_fail_internal): Likewise.
+       * ctf-inlines.h (ctf_assert_internal): Likewise.
+       * ctf-open.c (ctf_file_close): Free ctf_errs_warnings.
+       * ctf-create.c (ctf_serialize): Copy it on serialization.
+       * ctf-subr.c (ctf_err_warn): New, add an error/warning.
+       (ctf_errwarning_next): New iterator, free and pass back
+       errors/warnings in succession.
+       * libctf.ver (ctf_errwarning_next): Add.
+
 2020-07-22  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
 
        * ctf-types.c (ctf_variable_iter): Fix error return.
This page took 0.027036 seconds and 4 git commands to generate.