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