1 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
3 * ctf-hash.c (ctf_dynset_elements): New.
4 * ctf-impl.h (ctf_dynset_elements): Declare it.
5 (ctf_str_add_pending): Likewise.
6 (ctf_dict_t) <ctf_str_pending_ref>: New, set of refs that must be
7 added during serialization.
8 * ctf-string.c (ctf_str_create_atoms): Initialize it.
9 (CTF_STR_ADD_REF): New flag.
10 (CTF_STR_MAKE_PROVISIONAL): Likewise.
11 (CTF_STR_PENDING_REF): Likewise.
12 (ctf_str_add_ref_internal): Take a flags word rather than int
13 params. Populate, and clear out, ctf_str_pending_ref.
14 (ctf_str_add): Adjust accordingly.
15 (ctf_str_add_external): Likewise.
16 (ctf_str_add_pending): New.
17 (ctf_str_remove_ref): Also remove the potential ref if it is a
19 * ctf-serialize.c (ctf_serialize): Prohibit addition of strings
20 with ctf_str_add_ref before serialization. Ensure that the
21 ctf_str_pending_ref set is empty before strtab finalization.
22 (ctf_emit_type_sect): Add a ref to the ctt_name.
23 * ctf-create.c (ctf_add_generic): Add the ctt_name as a pending
25 * testsuite/libctf-writable/reserialize-strtab-corruption.*: New test.
27 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
29 * ctf-serialize.c (ctf_serialize): Preserve ctf_typemax across
32 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
34 * ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_argv>: Remove.
35 * ctf-create.c (ctf_dtd_delete): No longer free it.
36 (ctf_add_function): Use the dtd_vlen, not dtu_argv. Properly align.
37 * ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
38 * ctf-types.c (ctf_func_type_info): Just use the vlen.
39 (ctf_func_type_args): Likewise.
41 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
43 * ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_arr>: Remove.
44 * ctf-create.c (ctf_add_array): Use the dtd_vlen, not dtu_arr.
45 (ctf_set_array): Likewise.
46 * ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
47 * ctf-types.c (ctf_array_info): Just use the vlen.
49 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
51 * ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_enc>: Remove.
52 <dtd_u.dtu_slice>: Likewise.
54 * ctf-create.c (ctf_add_generic): Perhaps allocate it. All
56 (ctf_dtd_delete): Free it.
57 (ctf_add_slice): Use the dtd_vlen, not dtu_enc.
58 (ctf_add_encoded): Likewise. Assert that this must be an int or
60 * ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
61 * ctf-dedup.c (ctf_dedup_rhash_type): Use the dtd_vlen, not
63 * ctf-types.c (ctf_type_reference): Likewise.
64 (ctf_type_encoding): Remove most dynamic-type-specific code: just
65 get the vlen from the right place. Report failure to look up the
66 underlying type's encoding.
68 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
70 * ctf-archive.c (ctf_archive_next): GNU style fix for do {} while.
71 * ctf-dedup.c (ctf_dedup_rhash_type): Likewise.
72 (ctf_dedup_rwalk_one_output_mapping): Likewise.
73 * ctf-dump.c (ctf_dump_format_type): Likewise.
74 * ctf-lookup.c (ctf_symbol_next): Likewise.
75 * swap.h (swap_thing): Likewise.
77 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
79 * ctf-serialize.c: General reshuffling, and...
80 (emit_symtypetab_state_t): New, migrated from
81 local variables in ctf_serialize.
82 (ctf_serialize): Split out most section sizing and
84 (ctf_symtypetab_sect_sizes): New (split out).
85 (ctf_emit_symtypetab_sects): Likewise.
86 (ctf_type_sect_size): Likewise.
87 (ctf_emit_type_sect): Likewise.
89 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
91 * ctf-impl.h (ctf_dict_t): Fix comment.
93 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
95 * ctf-create.c (symtypetab_delete_nonstatic_vars): Move
97 (ctf_symtab_skippable): Likewise.
98 (CTF_SYMTYPETAB_EMIT_FUNCTION): Likewise.
99 (CTF_SYMTYPETAB_EMIT_PAD): Likewise.
100 (CTF_SYMTYPETAB_FORCE_INDEXED): Likewise.
101 (symtypetab_density): Likewise.
102 (emit_symtypetab): Likewise.
103 (emit_symtypetab_index): Likewise.
104 (ctf_copy_smembers): Likewise.
105 (ctf_copy_lmembers): Likewise.
106 (ctf_copy_emembers): Likewise.
107 (ctf_sort_var): Likewise.
108 (ctf_serialize): Likewise.
109 (ctf_gzwrite): Likewise.
110 (ctf_compress_write): Likewise.
111 (ctf_write_mem): Likewise.
112 (ctf_write): Likewise.
113 * ctf-serialize.c: New file.
114 * Makefile.am (libctf_nobfd_la_SOURCES): Add it.
115 * Makefile.in: Regenerate.
117 2021-03-18 Nick Alcock <nick.alcock@oracle.com>
119 * ctf-link.c (ctf_link_lazy_open): Move up in the file, to near
121 * ctf-lookup.c (ctf_lookup_symbol_idx): Repair tabdamage.
122 (ctf_lookup_by_sym_or_name): Likewise.
123 * testsuite/libctf-lookup/struct-iteration.c: Likewise.
124 * testsuite/libctf-regression/type-add-unnamed-struct.c: Likewise.
126 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
128 * ctf-create.c (symtypetab_density): Report the symbol name as
129 well as index in the name != object error; note the likely
131 * ctf-link.c (ctf_link_shuffle_syms): Report the symbol index
134 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
136 * ctf-link.c (ctf_link_shuffle_syms): Free ctf_dynsyms properly.
138 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
140 * ctf-dump.c (ctf_dump_format_type): Fix signed/unsigned confusion.
142 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
144 * ctf-dedup.c (ctf_dedup): Pass on errors from ctf_dedup_hash_type.
145 Call ctf_dedup_fini properly on other errors.
146 (ctf_dedup_emit_type): Set the errno on dynhash insertion failure.
147 * ctf-link.c (ctf_link_deduplicating_per_cu): Close outputs beyond
148 output 0 when asserting because >1 output is found.
149 (ctf_link_deduplicating): Likewise, when asserting because the
150 shared output is not the same as the passed-in fp.
152 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
154 * ctf-impl.h (ctf_dict_t) <ctf_link_type_mapping>: No longer used
155 by the nondeduplicating linker.
156 (ctf_add_type_mapping): Removed, now static.
157 (ctf_type_mapping): Likewise.
158 (ctf_dedup_type_mapping): New.
159 (ctf_dedup_t) <cd_input_nums>: New.
160 * ctf-dedup.c (ctf_dedup_init): Populate it.
161 (ctf_dedup_fini): Free it again. Emphasise that this has to be
162 the last thing called.
163 (ctf_dedup): Populate it.
164 (ctf_dedup_populate_type_mapping): Removed.
165 (ctf_dedup_populate_type_mappings): Likewise.
166 (ctf_dedup_emit): No longer call it. No longer call
167 ctf_dedup_fini either.
168 (ctf_dedup_type_mapping): New.
169 * ctf-link.c (ctf_unnamed_cuname): New.
170 (ctf_create_per_cu): Arguments must be non-null now.
171 (ctf_in_member_cb_arg): Removed.
172 (ctf_link): No longer populate it. No longer discard the
174 (ctf_link_deduplicating_one_symtypetab): Use
175 ctf_dedup_type_mapping, not ctf_type_mapping. Use
177 (ctf_link_one_variable): Likewise. Pass in args individually: no
178 longer a ctf_variable_iter callback.
179 (empty_link_type_mapping): Removed.
180 (ctf_link_deduplicating_variables): Use ctf_variable_next, not
181 ctf_variable_iter. No longer pack arguments to
182 ctf_link_one_variable into a struct.
183 (ctf_link_deduplicating_per_cu): Call ctf_dedup_fini once
184 all link phases are done.
185 (ctf_link_deduplicating): Likewise.
186 (ctf_link_intern_extern_string): Improve comment.
187 (ctf_add_type_mapping): Migrate...
188 (ctf_type_mapping): ... these functions...
189 * ctf-create.c (ctf_add_type_mapping): ... here...
190 (ctf_type_mapping): ... and make static, for the sole use of
193 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
195 * ctf-link.c (ctf_link_one_variable): Remove reference to
196 "unconflicted link mode".
198 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
200 * ctf-link.c (ctf_create_per_cu): Drop FILENAME now that it is
201 always identical to CUNAME.
202 (ctf_link_deduplicating_one_symtypetab): Adjust.
203 (ctf_link_one_type): Remove.
204 (ctf_link_one_input_archive_member): Likewise.
205 (ctf_link_close_one_input_archive): Likewise.
206 (ctf_link_one_input_archive): Likewise.
207 (ctf_link): No longer call it. Drop CTF_LINK_NONDEDUP path.
208 Improve header comment a bit (dicts, not files). Adjust
209 ctf_create_per_cu call.
210 (ctf_link_deduplicating_variables): Simplify.
211 (ctf_link_in_member_cb_arg_t) <cu_name>: Remove.
212 <in_input_cu_file>: Likewise.
213 <in_fp_parent>: Likewise.
214 <done_parent>: Likewise.
215 (ctf_link_one_variable): Turn uses of in_file_name to in_cuname.
217 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
219 * ctf-types.c (ctf_member_iter): Move 'rc' to an inner scope.
220 (ctf_enum_iter): Reimplement in terms of ctf_enum_next.
221 (ctf_type_iter): Reimplement in terms of ctf_type_next.
222 (ctf_type_iter_all): Likewise.
223 (ctf_variable_iter): Reimplement in terms of ctf_variable_next.
224 * ctf-archive.c (ctf_archive_iter_internal): Remove.
225 (ctf_archive_iter): Reimplement in terms of ctf_archive_next.
227 2021-03-02 Nick Alcock <nick.alcock@oracle.com>
229 * ctf-archive.c (ctf_archive_next): Set the name of parents in
230 single-member archives.
232 2021-02-26 Alan Modra <amodra@gmail.com>
234 * Makefile.in: Regenerate.
236 2021-02-21 Alan Modra <amodra@gmail.com>
238 * configure.ac: Invoke AC_CANONICAL_TARGET, AC_CANONICAL_HOST
239 and AC_CANONICAL_BUILD.
240 * configure: Regenerate.
241 * Makefile.in: Regenerate.
243 2021-02-20 Nick Alcock <nick.alcock@oracle.com>
245 * ctf-impl.h (ctf_dict_t) <ctf_symhash>: New.
246 <ctf_symhash_latest>: Likewise.
247 (struct ctf_archive_internal) <ctfi_crossdict_cache>: New.
248 <ctfi_symnamedicts>: New.
250 (ctf_lookup_symbol_name): Remove.
251 * ctf-lookup.c (ctf_lookup_symbol_name): Propagate errors from
252 parent properly. Make static.
253 (ctf_lookup_symbol_idx): New, linear search for the symbol name,
254 cached in the crossdict cache's ctf_symhash (if available), or
255 this dict's (otherwise).
256 (ctf_try_lookup_indexed): Allow the symname to be passed in.
257 (ctf_lookup_by_symbol): Turn into a wrapper around...
258 (ctf_lookup_by_sym_or_name): ... this, supporting name lookup too,
259 using ctf_lookup_symbol_idx in non-writable dicts. Special-case
260 name lookup in dynamic dicts without reported symbols, which have
261 no symtab or dynsymidx but where name lookup should still work.
262 (ctf_lookup_by_symbol_name): New, another wrapper.
263 * ctf-archive.c (enosym): Note that this is present in
264 ctfi_symnamedicts too.
265 (ctf_arc_close): Adjust for removal of ctfi_syms. Free the
267 (ctf_arc_flush_caches): Likewise.
268 (ctf_dict_open_cached): Memoize the first cached dict in the
270 (ctf_arc_lookup_symbol): Turn into a wrapper around...
271 (ctf_arc_lookup_sym_or_name): ... this. No longer cache
272 ctf_id_t lookups: just call ctf_lookup_by_symbol as needed (but
273 still cache the dicts those lookups succeed in). Add
274 lookup-by-name support, with dicts of successful lookups cached in
275 ctfi_symnamedicts. Refactor the caching code a bit.
276 (ctf_arc_lookup_symbol_name): New, another wrapper.
277 * ctf-open.c (ctf_dict_close): Free the ctf_symhash.
278 * libctf.ver (LIBCTF_1.2): New version. Add
279 ctf_lookup_by_symbol_name, ctf_arc_lookup_symbol_name.
280 * testsuite/libctf-lookup/enum-symbol.c (main): Use
281 ctf_arc_lookup_symbol rather than looking up the name ourselves.
282 Fish it out repeatedly, to make sure that symbol caching isn't
286 * testsuite/libctf-lookup/enum-symbol-obj.lk: Test symbol lookup
287 in an unlinked object file (indexed symtypetab sections only).
288 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
289 (try_maybe_reporting): Check symbol types via
290 ctf_lookup_by_symbol_name as well as ctf_symbol_next.
291 * testsuite/libctf-lookup/conflicting-type-syms.*: New test of
292 lookups in a multi-dict archive.
294 2021-02-20 Alan Modra <amodra@gmail.com>
296 * testsuite/config/default.exp (ld_L_opt): Define.
297 * testsuite/lib/ctf-lib.exp (load_common_lib): Delete. Instead load
299 (run_host_cmd, run_host_cmd_yesno, check_compiler_available): Delete.
300 (compile_one_cc, check_ctf_available): Delete.
302 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
304 * configure.ac (ac_cv_libctf_bfd_elf): Include string.h.
305 * configure: Regenerated.
307 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
309 * configure.ac (EXPECT): Check for, in order to define...
310 (TCL_TRY): ... this, if Tcl supports try/catch.
311 * Makefile.am (TCL_TRY): Run the testsuite only if set.
312 * configure: Regenerated.
313 * Makefile.in: Likewise.
315 2021-02-02 Nick Alcock <nick.alcock@oracle.com>
317 * configure.ac (CTF_LIBADD): Remove explicit -lintl population in
319 * Makefile.am (libctf_nobfd_la_LIBADD): No longer explicitly
321 (check-DEJAGNU): Pass down to tests as well.
322 * configure: Regenerated.
323 * Makefile.in: Likewise.
325 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
327 * ctf-string.c (ctf_str_add): Treat adding a NULL as adding "".
328 (ctf_str_add_ref): Likewise.
329 (ctf_str_add_external): Likewise.
330 * ctf-types.c (ctf_type_name_raw): Always return "" for offset 0.
331 * ctf-dedup.c (ctf_dedup_multiple_input_dicts): Don't armour
333 (ctf_dedup_maybe_synthesize_forward): Likewise.
335 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
337 * ctf-create.c (ctf_serialize): Fix shadowing.
339 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
341 * ctf-create.c (ctf_add_encoded): Add check for non-empty name.
342 (ctf_add_forward): Likewise.
343 (ctf_add_typedef): Likewise.
345 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
347 * ctf-open.c (init_types): Rip out code to check anonymous typedef
349 * ctf-create.c (ctf_add_reftype): Likewise.
350 * ctf-lookup.c (refresh_pptrtab): Likewise.
352 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
354 * ctf-impl.c (_libctf_nonnull_): Add parameters.
355 (LCTF_LINKING): New flag.
356 (ctf_dict_t) <ctf_link_flags>: Mention it.
357 * ctf-link.c (ctf_link): Keep LCTF_LINKING set across call.
358 (ctf_write): Likewise, including in child dictionaries.
359 (ctf_link_shuffle_syms): Make sure ctf_dynsyms is NULL if there
360 are no reported symbols.
361 * ctf-create.c (symtypetab_delete_nonstatic_vars): Make sure
362 the variable has been reported as a symbol by the linker.
363 (symtypetab_skippable): Mention relationship between SYMFP and the
365 (symtypetab_density): Adjust nonnullity. Exit early if no symbols
366 were reported and force-indexing is off (i.e., we are doing a
368 (ctf_serialize): Handle the !LCTF_LINKING case by writing out an
369 indexed, sorted symtypetab (and allow SYMFP to be NULL in this
370 case). Turn sorting off if this is a non-final link. Only delete
371 nonstatic vars if we are filtering symbols and the linker has
373 * testsuite/libctf-regression/nonstatic-var-section-ld-r*:
374 New test of variable and symtypetab section population when
376 * testsuite/libctf-regression/nonstatic-var-section-ld-executable.lk:
377 Likewise, when ld of an executable is used.
378 * testsuite/libctf-regression/nonstatic-var-section-ld.lk:
379 Likewise, when ld -shared alone is used.
380 * testsuite/libctf-regression/nonstatic-var-section-ld*.c:
381 Lookup programs for the above.
382 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.*: New
383 test, testing survival of symbols across ctf_write paths.
384 * testsuite/lib/ctf-lib.exp (run_lookup_test): New option,
385 nonshared, suppressing linking of the SOURCE with -shared.
387 2021-01-19 Nick Alcock <nick.alcock@oracle.com>
389 * ctf-create.c (membadd): Transform ""-named members into
391 * testsuite/libctf-regression/type-add-unnamed-struct*: New test.
393 2021-01-19 Nick Alcock <nick.alcock@oracle.com>
395 * ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
396 base type if looking up a nonexistent pointer type.
397 * testsuite/libctf-regression/pptrtab*: Test it.
399 2021-01-13 Alan Modra <amodra@gmail.com>
401 * Makefile.in: Regenerate.
403 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
406 * configure.ac: Use GNU_MAKE_JOBSERVER.
407 * aclocal.m4: Regenerated.
408 * configure: Likewise.
410 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
413 * configure: Regenerated.
415 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
417 * configure: Regenerated.
419 2021-01-09 Nick Clifton <nickc@redhat.com>
421 * 2.36 release branch crated.
423 2021-01-09 Alan Modra <amodra@gmail.com>
425 * configure: Regenerate.
427 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
429 * configure: Regenerate.
431 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
433 * testsuite/libctf-lookup/struct-iteration.c (main):
434 ctf_member_count returns an int.
436 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
438 * Makefile.am (BASEDIR): New.
440 (check-DEJAGNU): Add development.exp to prerequisites.
441 (development.exp): New.
442 (CONFIG_STATUS_DEPENDENCIES): New.
443 (EXTRA_DEJAGNU_SITE_CONFIG): Likewise.
444 (DISTCLEANFILES): Likewise.
445 * Makefile.in: Regenerated.
446 * testsuite/lib/ctf-lib.exp (check_ctf_available): Return boolean.
447 * testsuite/libctf-lookup/lookup.exp: Call check_ctf_available.
448 * testsuite/libctf-regression/regression.exp: Likewise.
450 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
452 * ctf-types.c (ctf_type_aname): Print forwards to unions and enums
455 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
457 * ctf-impl.h (ctf_dict_t) <ctf_pptrtab>: New.
458 <ctf_pptrtab_len>: New.
459 <ctf_pptrtab_typemax>: New.
460 * ctf-create.c (ctf_serialize): Update accordingly.
461 (ctf_add_reftype): Note that we don't need to update pptrtab here,
462 despite updating ptrtab.
463 * ctf-open.c (ctf_dict_close): Destroy the pptrtab.
464 (ctf_import): Likewise.
465 (ctf_import_unref): Likewise.
466 * ctf-lookup.c (grow_pptrtab): New.
467 (refresh_pptrtab): New, update a pptrtab.
468 (ctf_lookup_by_name): Turn into a wrapper around (and rename to)...
469 (ctf_lookup_by_name_internal): ... this: construct the pptrtab, and
470 use it in addition to the parent's ptrtab when parent dicts are
472 * testsuite/libctf-regression/regression.exp: New testsuite for
474 * testsuite/libctf-regression/pptrtab*: New test.
475 * testsuite/libctf-writable/writable.exp: New testsuite for tests of
477 * testsuite/libctf-writable/pptrtab*: New test.
479 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
481 * ctf-archive.c (ctf_archive_iter): Remove outdated comment.
483 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
485 * ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
486 <ctn_next>: ... here.
487 * ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
488 * ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
489 * ctf-types.c (ctf_member_iter): Reimplement in terms of...
490 (ctf_member_next): ... this. Support recursive unnamed member
491 iteration (off by default).
492 (ctf_member_info): Look up members in unnamed sub-structs.
493 * ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
494 (ctf_dedup_emit_struct_members): Likewise.
495 * testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
496 members, and a normal member after the end.
497 * testsuite/libctf-lookup/struct-iteration.c: Verify that
498 ctf_member_count is consistent with the number of successful returns
499 from a non-recursive ctf_member_next.
500 * testsuite/libctf-lookup/struct-iteration-*: New, test iteration
502 * testsuite/libctf-lookup/struct-lookup.c: New test.
503 * testsuite/libctf-lookup/struct-lookup.lk: New test.
505 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
507 * ctf-link.c (ctf_link_warn_outdated_inputs): New.
508 (ctf_link_write): Call it.
510 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
512 * testsuite/libctf-lookup/enum-symbol.lk: New symbol-lookup test.
513 * testsuite/libctf-lookup/enum-symbol-ctf.c: New CTF input.
514 * testsuite/libctf-lookup/enum-symbol.c: New lookup test.
516 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
518 * Makefile.am (EXPECT): New.
520 (RUNTESTFLAGS): Likewise.
521 (CC_FOR_TARGET): Likewise.
522 (check-DEJAGNU): Likewise.
523 (AUTOMAKE_OPTIONS): Add dejagnu.
524 * Makefile.in: Regenerated.
525 * testsuite/config/default.exp: New.
526 * testsuite/lib/ctf-lib.exp: Likewise.
527 * testsuite/libctf-lookup/enum.lk: New test.
528 * testsuite/libctf-lookup/enum-ctf.c: New CTF input.
529 * testsuite/libctf-lookup/enum.c: New lookup test.
530 * testsuite/libctf-lookup/ambiguous-struct*.c: New test.
531 * testsuite/libctf-lookup/lookup.exp: New.
533 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
535 * configure.ac (BFD_LIBADD): Remove.
536 (BFD_DEPENDENCIES): Likewise. Remove associated cases.
537 (SHARED_LIBADD): Rename to...
538 (CTF_LIBADD): ... this. Stick in a suitable libiberty even when
540 * Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
542 (libctf_la_LIBADD): Reference libbfd.la directly, not via
544 (libctf_la_DEPENDENCIES): Remove.
545 * Makefile.in: Regenerate.
546 * configure: Likewise.
548 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
550 * ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
551 * ctf-types.c (ctf_type_aname): No longer deal with slices here.
552 * ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
554 (CTF_FT_BITFIELD): Likewise.
555 (CTF_FT_ID): Likewise.
556 (ctf_dump_member): Do not do indentation here. Migrate the
557 type-printing parts of this into...
558 (ctf_dump_format_type): ... here, to be shared by all type printers.
559 Get the errno value for non-representable types right. Do not print
560 bitfield info for non-bitfields. Improve the format and indentation
561 of other type output. Shuffle spacing around to make all indentation
562 either 'width of column' or 4 chars.
563 (ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
564 (ctf_dump_objts): Likewise. Spacing shuffle.
565 (ctf_dump_var): Likewise.
566 (type_hex_digits): Migrate down in the file, to above its new user.
567 (ctf_dump_type): Indent here instead. Pass CTF_FT_REFS to
568 ctf_dump_format_type. Don't trim off excess linefeeds now we no
569 longer generate them. Dump enumerated types.
571 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
573 * ctf-types.c (ctf_type_resolve): Improve comment.
574 (ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
575 Emit errors into the right dict.
576 (ctf_type_align): Likewise.
577 * ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
578 when adding a member without explicit offset when this member, or
579 the previous member, is incomplete.
580 * ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
582 (ctf_dump_member): Do not try to print their alignment.
584 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
586 * ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type.
587 (ctf_dump_format_type): Don't emit the size for function objects.
588 Dump the element type of arrays like we dump the pointed-to type of
591 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
593 * ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs.
594 (ctf_dump_header): Add 0x to the hex magic number.
595 (ctf_dump_str): Add 0x to the hex string offsets.
596 (ctf_dump_membstate_t) <cdm_toplevel_indent>: New.
597 (ctf_dump_type): Adjust. Free it when we're done.
598 (type_hex_digits): New.
599 (ctf_dump_member): Align output depending on the width of the type
600 ID being generated. Use printf padding, not a loop, to generate
603 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
605 * ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
607 2021-01-04 Nicolas Boulenguez <nicolas@debian.org>
610 * configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
611 ACLOCAL_AMFLAGS -I dirs.
612 * configure: Regenerate.
614 2021-01-01 Alan Modra <amodra@gmail.com>
616 Update year range in copyright notice of all files.
618 For older changes see ChangeLog-2020
620 Copyright (C) 2021 Free Software Foundation, Inc.
622 Copying and distribution of this file, with or without modification,
623 are permitted in any medium without royalty provided the copyright
624 notice and this notice are preserved.
630 version-control: never