-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.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * ctf-open.c (ctf_bufopen_internal): Diagnose invalid flags.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- ctf-decls.h (ctf_qsort_compar_thunk): Fix arg passing.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * ctf-impl.h (ctf_next_hkv_t): New, kv-pairs passed to
- sorting functions.
- (ctf_next_t) <u.ctn_sorted_hkv>: New, sorted kv-pairs for
- ctf_dynhash_next_sorted.
- <cu.ctn_h>: New, pointer to the dynhash under iteration.
- <cu.ctn_s>: New, pointer to the dynset under iteration.
- (ctf_hash_sort_f): Sorting function passed to...
- (ctf_dynhash_next_sorted): ... this new function.
- (ctf_dynhash_next): New.
- (ctf_dynset_next): New.
- * ctf-inlines.h (ctf_dynhash_cnext_sorted): New.
- (ctf_dynhash_cnext): New.
- (ctf_dynset_cnext): New.
- * ctf-hash.c (ctf_dynhash_next_sorted): New.
- (ctf_dynhash_next): New.
- (ctf_dynset_next): New.
- * ctf-util.c (ctf_next_destroy): Free the u.ctn_sorted_hkv if
- needed.
- (ctf_next_copy): Alloc-and-copy the u.ctn_sorted_hkv if needed.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * ctf-impl.h (ctf_next): New.
- (ctf_get_dict): New prototype.
- * ctf-lookup.c (ctf_get_dict): New, split out of...
- (ctf_lookup_by_id): ... here.
- * ctf-util.c (ctf_next_create): New.
- (ctf_next_destroy): New.
- (ctf_next_copy): New.
- * ctf-types.c (includes): Add <assert.h>.
- (ctf_member_next): New.
- (ctf_enum_next): New.
- (ctf_type_iter): Document the lack of iteration over parent
- types.
- (ctf_type_next): New.
- (ctf_variable_next): New.
- * ctf-archive.c (ctf_archive_next): New.
- * libctf.ver: Add new public functions.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * libctf.ver (ctf_ref): New.
- * ctf-open.c (ctf_ref): Implement it.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * ctf-inlines.h (ctf_forwardable_kind): New.
- * ctf-create.c (ctf_add_forward): Use it.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * ctf-impl.h (ctf_get_ctt_size): Move definition from here...
- * ctf-inlines.h (ctf_get_ctt_size): ... to here.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * ctf-hash.c (ctf_dynset_eq_string): New.
- (ctf_dynset_create): New.
- (DYNSET_EMPTY_ENTRY_REPLACEMENT): New.
- (DYNSET_DELETED_ENTRY_REPLACEMENT): New.
- (key_to_internal): New.
- (internal_to_key): New.
- (ctf_dynset_insert): New.
- (ctf_dynset_remove): New.
- (ctf_dynset_destroy): New.
- (ctf_dynset_lookup): New.
- (ctf_dynset_exists): New.
- (ctf_dynset_lookup_any): New.
- (ctf_hash_insert_type): Coding style.
- (ctf_hash_define_type): Likewise.
- * ctf-impl.h (ctf_dynset_t): New.
- (ctf_dynset_eq_string): New.
- (ctf_dynset_create): New.
- (ctf_dynset_insert): New.
- (ctf_dynset_remove): New.
- (ctf_dynset_destroy): New.
- (ctf_dynset_lookup): New.
- (ctf_dynset_exists): New.
- (ctf_dynset_lookup_any): New.
- * ctf-inlines.h (ctf_dynset_cinsert): New.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * ctf-hash.c (ctf_helem_t) <key_free>: Remove.
- <value_free>: Likewise.
- <owner>: New.
- (ctf_dynhash_item_free): Indirect through the owner.
- (ctf_dynhash_create): Only pass in ctf_dynhash_item_free and
- allocate space for the key_free and value_free fields fields
- if necessary.
- (ctf_hashtab_insert): Likewise. Fix OOM errno value.
- (ctf_dynhash_insert): Only access ctf_hashtab's key_free and
- value_free if they will exist. Set the slot's owner, but only
- if it exists.
- (ctf_dynhash_remove): Adjust.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * ctf-hash.c (ctf_hashtab_insert): Free the key passed in if
- there is a key-freeing function and the key already exists.
-
-2020-07-22 Nick Alcock <nick.alcock@oracle.com>
-
- * ctf-inlines.h: New file.
- * ctf-impl.h: Include it.
- (ctf_hash_iter_find_f): New typedef.
- (ctf_dynhash_elements): New.
- (ctf_dynhash_lookup_kv): New.
- (ctf_dynhash_iter_find): New.
- * ctf-hash.c (ctf_dynhash_lookup_kv): New.
- (ctf_traverse_find_cb_arg_t): New.
- (ctf_hashtab_traverse_find): New.
- (ctf_dynhash_iter_find): New.
- (ctf_dynhash_elements): New.
-
-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>