libctf: fix __extension__ with non-GNU C compilers
[deliverable/binutils-gdb.git] / libctf / ChangeLog
index 723db81f182f0933e566249441063f90afc30ab2..642ed3f83c1e7c68555d75bf1c6c91faef3408da 100644 (file)
@@ -1,3 +1,325 @@
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h [!__GNUC__] (__extension__): Define to nothing.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-archive.c (ctf_archive_count): New.
+       * libctf.ver: New public function.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-types.c (ctf_member_count): New.
+       * libctf.ver: New public function.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-types.c (ctf_type_kind_forwarded): New.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-types.c (ctf_type_name_raw): New.
+       (ctf_type_aname_raw): Reimplement accordingly.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-subr.c (ctf_dprintf): _libctf_debug is unlikely to be set.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (struct ctf_archive_internal)
+       <ctfi_unmap_on_close>: New.
+       (ctf_new_archive_internal): Adjust.
+       * ctf-archive.c (ctf_new_archive_internal): Likewise.
+       Initialize ctfi_unmap_on_close.  Adjust error path.
+       (ctf_arc_bufopen): Adjust ctf_new_archive_internal call
+       (unmap_on_close is 0).
+       (ctf_arc_close): Only unmap if ctfi_unmap_on_close.
+       * ctf-open-bfd.c (ctf_fdopen): Adjust.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-types.c (ctf_type_aname): Return ECTF_CORRUPT if
+       ints, floats or typedefs have no name.  Fix comment typo.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_add_slice): Support slices of any kind that
+       resolves to an integral type.
+       * ctf-types.c (ctf_type_encoding): Resolve the type before
+       fishing its encoding out.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_create): Mark dirty.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (membcmp)  Skip nameless members.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_add_member_offset): Support names of ""
+       as if they were the null pointer.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-open.c (init_types): Remove typeless CTF_K_FORWARD
+       special-casing.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-types.c (ctf_type_reference): Add support for dynamic slices.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_serialize): Add cast.
+       (ctf_add_slice): Likewise.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_dtdef_t) <dtu_argv>: Fix type.
+       * ctf-create.c (ctf_add_function): Check for unimplemented type
+       and populate at the same time.  Populate one-by-one, not via
+       memcpy.
+       (ctf_serialize): Remove unnecessary cast.
+       * ctf-types.c (ctf_func_type_info): Likewise.
+       (ctf_func_type_args): Likewise.  Fix comment typo.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_add_reftype): Support refs to type zero.
+       (ctf_add_array): Support array contents of type zero.
+       (ctf_add_function): Support arguments and return types of
+       type zero.
+       (ctf_add_typedef): Support typedefs to type zero.
+       (ctf_add_member_offset): Support members of type zero,
+       unless added at unspecified (naturally-aligned) offset.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-error.c: Include <stddef.h>, for offsetof.
+       (_ctf_errlist): Migrate to...
+       (_ctf_errlist_t): ... this.
+       (_ctf_erridx): New, indexes into _ctf_errlist_t.
+       (_ctf_nerr): Remove.
+       (ctf_errmsg): Adjust accordingly.
+       * Makefile.am (BUILT_SOURCES): Note...
+       (ctf-error.h): ... this new rule.
+       * Makefile.in: Regenerate.
+       * mkerrors.sed: New, process ctf-api.h to generate ctf-error.h.
+       * .gitignore: New, ignore ctf-error.h.
+
+2020-07-22  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h: Fix typos in comments.
+
+2020-07-22  Nick Clifton  <nickc@redhat.com>
+
+       * ctf-archive.c (ctf_arc_write): Avoid calling close twice on the
+       same file descriptor.
+
+2020-07-04  Nick Clifton  <nickc@redhat.com>
+
+       Binutils 2.35 branch created.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       * aclocal.m4: Add config/gettext-sister.m4: Shuffle into
+       alphabetical order.
+       * configure.ac: Add ZW_GNU_GETTEXT_SISTER_DIR.
+       * config.h.in: Regenerated.
+       * Makefile.in: Likewise.
+       * configure: Likewise.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c: Include <unistd.h>.
+       * ctf-open-bfd.c: Likewise.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       PR libctf/25120
+       * configure.ac: Check for bswap_16, bswap_32, and bswap_64 decls.
+       * swap.h (bswap_16): Do not assume that presence of <byteswap.h>
+       means this is declared.
+       (bswap_32): Likewise.
+       (bswap_64): Likewise.
+       (bswap_identity_64): Remove, unused.
+       * configure: Regenerated.
+       * config.h.in: Likewise.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       PR libctf/25120
+       * ctf-impl.h (_libctf_printflike_): Add non-GNU-C fallback.
+       (_libctf_unlikely_): Likewise.
+       (_libctf_unused): Likewise.
+       (_libctf_malloc_): Likewise.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       PR libctf/25120
+       * ctf-archive.c (search_nametbl): No longer global: declare...
+       (ctf_arc_open_by_name_internal): ... here. Use bsearch_r.
+       (search_modent_by_name): Take and use ARG for the nametbl.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_new_archive_internal): Declare.
+       (ctf_arc_bufopen): Remove.
+       (ctf_archive_internal) <ctfi_free_symsect>: New.
+       * ctf-archive.c (ctf_arc_close): Use it.
+       (ctf_arc_bufopen): Fuse into...
+       (ctf_new_archive_internal): ... this, moved across from...
+       * ctf-open-bfd.c: ... here.
+       (ctf_bfdopen_ctfsect): Use ctf_arc_bufopen.
+       * libctf.ver: Add it.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_add_forward): Intern in the right namespace.
+       (ctf_dtd_delete): Remove correspondingly.
+       (ctf_rollback): Likewise.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_add_type_internal): Hand back existing types
+       unchanged.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-create.c (ctf_add_forward): Don't add forwards to
+       types that already exist.
+
+2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-open.c (init_types): Only intern root-visible types.
+       * ctf-create.c (ctf_dtd_insert): Likewise.
+       (ctf_dtd_delete): Only remove root-visible types.
+       (ctf_rollback): Likewise.
+       (ctf_add_generic): Adjust.
+       (ctf_add_struct_sized): Adjust comment.
+       (ctf_add_union_sized): Likewise.
+       (ctf_add_enum): Likewise.
+       * ctf-impl.h (ctf_dtd_insert): Adjust prototype.
+
+2020-03-11  John Baldwin  <jhb@FreeBSD.org>
+
+       * swap.h (bswap_identity_64): Make static.
+
+2020-01-18  Nick Clifton  <nickc@redhat.com>
+
+       Binutils 2.34 branch created.
+
+2020-01-05  Joel Brobecker  <brobecker@adacore.com>
+
+       PR binutils/25155:
+       * configure.ac: Add AC_CHECK_DECLS([asprintf]).
+       * configure, config.h.in: Regenerate.
+
+2020-01-01  Alan Modra  <amodra@gmail.com>
+
+       Update year range in copyright notice of all files.
+
+2019-10-16  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * swap.h (bswap_16, bswap_32, bswap_64): Make static.
+
+2019-09-30  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-open.c (ctf_bufopen_internal): Fix tabdamage.
+       * ctf-types.c (ctf_type_lname): Likewise.
+
+2019-09-23  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-open.c (ctf_import): Do not leak a ctf_file_t ref on every
+       ctf_import after the first for a given file.
+
+2019-09-23  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_str_append_noerr): Declare.
+       * ctf-util.c (ctf_str_append_noerr): Define in terms of
+       ctf_str_append.
+       * ctf-dump.c (str_append): New, call it.
+       (ctf_dump_format_type): Use str_append, not ctf_str_append.
+       (ctf_dump_label): Likewise.
+       (ctf_dump_objts): Likewise.
+       (ctf_dump_funcs): Likewise.
+       (ctf_dump_var): Likewise.
+       (ctf_dump_member): Likewise.
+       (ctf_dump_type): Likewise.
+       (ctf_dump): Likewise.
+
+2019-09-23  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_alloc): Remove.
+       (ctf_free): Likewise.
+       (ctf_strdup): Likewise.
+       * ctf-subr.c (ctf_alloc): Remove.
+       (ctf_free): Likewise.
+       * ctf-util.c (ctf_strdup): Remove.
+
+       * ctf-create.c (ctf_serialize): Use malloc, not ctf_alloc; free, not
+       ctf_free; strdup, not ctf_strdup.
+       (ctf_dtd_delete): Likewise.
+       (ctf_dvd_delete): Likewise.
+       (ctf_add_generic): Likewise.
+       (ctf_add_function): Likewise.
+       (ctf_add_enumerator): Likewise.
+       (ctf_add_member_offset): Likewise.
+       (ctf_add_variable): Likewise.
+       (membadd): Likewise.
+       (ctf_compress_write): Likewise.
+       (ctf_write_mem): Likewise.
+       * ctf-decl.c (ctf_decl_push): Likewise.
+       (ctf_decl_fini): Likewise.
+       (ctf_decl_sprintf): Likewise.  Check for OOM.
+       * ctf-dump.c (ctf_dump_append): Use malloc, not ctf_alloc; free, not
+       ctf_free; strdup, not ctf_strdup.
+       (ctf_dump_free): Likewise.
+       (ctf_dump): Likewise.
+       * ctf-open.c (upgrade_types_v1): Likewise.
+       (init_types): Likewise.
+       (ctf_file_close): Likewise.
+       (ctf_bufopen_internal): Likewise.  Check for OOM.
+       (ctf_parent_name_set): Likewise: report the OOM to the caller.
+       (ctf_cuname_set): Likewise.
+       (ctf_import): Likewise.
+       * ctf-string.c (ctf_str_purge_atom_refs): Use malloc, not ctf_alloc;
+       free, not ctf_free; strdup, not ctf_strdup.
+       (ctf_str_free_atom): Likewise.
+       (ctf_str_create_atoms): Likewise.
+       (ctf_str_add_ref_internal): Likewise.
+       (ctf_str_remove_ref): Likewise.
+       (ctf_str_write_strtab): Likewise.
+
+2019-08-09  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-types.c (ctf_type_encoding): Fix the dynamic case to
+       work right for non-int/fps.
+
+2019-08-08  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-types.c (ctf_type_name): Don't strlen a potentially-
+       null pointer.
+
+2019-08-07  Nick Alcock  <nick.alcock@oracle.com>
+
+       * ctf-impl.h (ctf_file_t) <ctf_add_processing>: New.
+       * ctf-open.c (ctf_file_close): Free it.
+       * ctf-create.c (ctf_serialize): Adjust.
+       (membcmp): When reporting a conflict due to an error, report the
+       error.
+       (ctf_add_type): Turn into a ctf_add_processing wrapper.  Rename to...
+       (ctf_add_type_internal): ... this.  Hand back types we are already
+       in the middle of adding immediately.  Hand back structs/unions with
+       the same number of members immediately.  Do not walk the dynamic
+       list.  Call ctf_add_type_internal, not ctf_add_type.  Handle
+       forwards promoted to other types and the inverse case identically.
+       Add structs to the mapping as soon as we intern them, before they
+       gain any members.
+
 2019-08-09  Nick Alcock  <nick.alcock@oracle.com>
 
        * ctf-impl.h (ctf_names_t): New.
This page took 0.025334 seconds and 4 git commands to generate.