libctf: eliminate dtd_u, part 5: structs / unions
[deliverable/binutils-gdb.git] / libctf / ChangeLog
CommitLineData
08c428af
NA
12021-03-18 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-impl.h (ctf_dtdef_t) <dtu_members>: Remove.
4 <dtd_u>: Likewise.
5 (ctf_dmdef_t): Remove.
6 (struct ctf_next) <u.ctn_dmd>: Remove.
7 * ctf-create.c (INITIAL_VLEN): New, more-or-less arbitrary initial
8 vlen size.
9 (ctf_add_enum): Use it.
10 (ctf_dtd_delete): Do not free the (removed) dmd; remove string
11 refs from the vlen on struct deletion.
12 (ctf_add_struct_sized): Populate the vlen: do it by hand if
13 promoting forwards. Always populate the full-size
14 lsizehi/lsizelo members.
15 (ctf_add_union_sized): Likewise.
16 (ctf_add_member_offset): Set up the vlen rather than the dmd.
17 Expand it as needed, repointing string refs via
18 ctf_str_move_pending. Add the member names as pending strings.
19 Always populate the full-size lsizehi/lsizelo members.
20 (membadd): Remove, folding back into...
21 (ctf_add_type_internal): ... here, adding via an ordinary
22 ctf_add_struct_sized and _next iteration rather than doing
23 everything by hand.
24 * ctf-serialize.c (ctf_copy_smembers): Remove this...
25 (ctf_copy_lmembers): ... and this...
26 (ctf_emit_type_sect): ... folding into here. Figure out if a
27 ctf_stype_t is needed here, not in ctf_add_*_sized.
28 (ctf_type_sect_size): Figure out the ctf_stype_t stuff the same
29 way here.
30 * ctf-types.c (ctf_member_next): Remove the dmd path and always
31 use the vlen. Force large-structure usage for dynamic types.
32 (ctf_type_align): Likewise.
33 (ctf_member_info): Likewise.
34 (ctf_type_rvisit): Likewise.
35 * testsuite/libctf-regression/type-add-unnamed-struct-ctf.c: Add a
36 self-referential type to this test.
37 * testsuite/libctf-regression/type-add-unnamed-struct.c: Adjusted
38 accordingly.
39 * testsuite/libctf-regression/type-add-unnamed-struct.lk: Likewise.
40
77d724a7
NA
412021-03-18 Nick Alcock <nick.alcock@oracle.com>
42
43 * ctf-impl.h (ctf_dtdef_t) <dtd_vlen_alloc>: New.
44 (ctf_str_move_pending): Declare.
45 * ctf-string.c (ctf_str_add_ref_internal): Fix error return.
46 (ctf_str_move_pending): New.
47 * ctf-create.c (ctf_grow_vlen): New.
48 (ctf_dtd_delete): Zero out the vlen_alloc after free. Free the
49 vlen later: iterate over it and free enum name refs first.
50 (ctf_add_generic): Populate dtd_vlen_alloc from vlen.
51 (ctf_add_enum): populate the vlen; do it by hand if promoting
52 forwards.
53 (ctf_add_enumerator): Set up the vlen rather than the dmd. Expand
54 it as needed, repointing string refs via ctf_str_move_pending. Add
55 the enumerand names as pending strings.
56 * ctf-serialize.c (ctf_copy_emembers): Remove.
57 (ctf_emit_type_sect): Copy the vlen into place and ref the
58 strings.
59 * ctf-types.c (ctf_enum_next): The dynamic portion now uses
60 the same code as the non-dynamic.
61 (ctf_enum_name): Likewise.
62 (ctf_enum_value): Likewise.
63 * testsuite/libctf-lookup/enum-many-ctf.c: New test.
64 * testsuite/libctf-lookup/enum-many.lk: New test.
65
986e9e3a
NA
662021-03-18 Nick Alcock <nick.alcock@oracle.com>
67
68 * ctf-hash.c (ctf_dynset_elements): New.
69 * ctf-impl.h (ctf_dynset_elements): Declare it.
70 (ctf_str_add_pending): Likewise.
71 (ctf_dict_t) <ctf_str_pending_ref>: New, set of refs that must be
72 added during serialization.
73 * ctf-string.c (ctf_str_create_atoms): Initialize it.
74 (CTF_STR_ADD_REF): New flag.
75 (CTF_STR_MAKE_PROVISIONAL): Likewise.
76 (CTF_STR_PENDING_REF): Likewise.
77 (ctf_str_add_ref_internal): Take a flags word rather than int
78 params. Populate, and clear out, ctf_str_pending_ref.
79 (ctf_str_add): Adjust accordingly.
80 (ctf_str_add_external): Likewise.
81 (ctf_str_add_pending): New.
82 (ctf_str_remove_ref): Also remove the potential ref if it is a
83 pending ref.
84 * ctf-serialize.c (ctf_serialize): Prohibit addition of strings
85 with ctf_str_add_ref before serialization. Ensure that the
86 ctf_str_pending_ref set is empty before strtab finalization.
87 (ctf_emit_type_sect): Add a ref to the ctt_name.
88 * ctf-create.c (ctf_add_generic): Add the ctt_name as a pending
89 ref.
90 * testsuite/libctf-writable/reserialize-strtab-corruption.*: New test.
91
2a05d50e
NA
922021-03-18 Nick Alcock <nick.alcock@oracle.com>
93
94 * ctf-serialize.c (ctf_serialize): Preserve ctf_typemax across
95 serialization.
96
81982d20
NA
972021-03-18 Nick Alcock <nick.alcock@oracle.com>
98
99 * ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_argv>: Remove.
100 * ctf-create.c (ctf_dtd_delete): No longer free it.
101 (ctf_add_function): Use the dtd_vlen, not dtu_argv. Properly align.
102 * ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
103 * ctf-types.c (ctf_func_type_info): Just use the vlen.
104 (ctf_func_type_args): Likewise.
105
534444b1
NA
1062021-03-18 Nick Alcock <nick.alcock@oracle.com>
107
108 * ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_arr>: Remove.
109 * ctf-create.c (ctf_add_array): Use the dtd_vlen, not dtu_arr.
110 (ctf_set_array): Likewise.
111 * ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
112 * ctf-types.c (ctf_array_info): Just use the vlen.
113
7879dd88
NA
1142021-03-18 Nick Alcock <nick.alcock@oracle.com>
115
116 * ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_enc>: Remove.
117 <dtd_u.dtu_slice>: Likewise.
118 <dtd_vlen>: New.
119 * ctf-create.c (ctf_add_generic): Perhaps allocate it. All
120 callers adjusted.
121 (ctf_dtd_delete): Free it.
122 (ctf_add_slice): Use the dtd_vlen, not dtu_enc.
123 (ctf_add_encoded): Likewise. Assert that this must be an int or
124 float.
125 * ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
126 * ctf-dedup.c (ctf_dedup_rhash_type): Use the dtd_vlen, not
127 dtu_slice.
128 * ctf-types.c (ctf_type_reference): Likewise.
129 (ctf_type_encoding): Remove most dynamic-type-specific code: just
130 get the vlen from the right place. Report failure to look up the
131 underlying type's encoding.
132
eefe721e
NA
1332021-03-18 Nick Alcock <nick.alcock@oracle.com>
134
135 * ctf-archive.c (ctf_archive_next): GNU style fix for do {} while.
136 * ctf-dedup.c (ctf_dedup_rhash_type): Likewise.
137 (ctf_dedup_rwalk_one_output_mapping): Likewise.
138 * ctf-dump.c (ctf_dump_format_type): Likewise.
139 * ctf-lookup.c (ctf_symbol_next): Likewise.
140 * swap.h (swap_thing): Likewise.
141
b9a96431
NA
1422021-03-18 Nick Alcock <nick.alcock@oracle.com>
143
144 * ctf-serialize.c: General reshuffling, and...
145 (emit_symtypetab_state_t): New, migrated from
146 local variables in ctf_serialize.
147 (ctf_serialize): Split out most section sizing and
148 emission.
149 (ctf_symtypetab_sect_sizes): New (split out).
150 (ctf_emit_symtypetab_sects): Likewise.
151 (ctf_type_sect_size): Likewise.
152 (ctf_emit_type_sect): Likewise.
153
01cbfcba
NA
1542021-03-18 Nick Alcock <nick.alcock@oracle.com>
155
156 * ctf-impl.h (ctf_dict_t): Fix comment.
157
bf4c3185
NA
1582021-03-18 Nick Alcock <nick.alcock@oracle.com>
159
160 * ctf-create.c (symtypetab_delete_nonstatic_vars): Move
161 into ctf-serialize.c.
162 (ctf_symtab_skippable): Likewise.
163 (CTF_SYMTYPETAB_EMIT_FUNCTION): Likewise.
164 (CTF_SYMTYPETAB_EMIT_PAD): Likewise.
165 (CTF_SYMTYPETAB_FORCE_INDEXED): Likewise.
166 (symtypetab_density): Likewise.
167 (emit_symtypetab): Likewise.
168 (emit_symtypetab_index): Likewise.
169 (ctf_copy_smembers): Likewise.
170 (ctf_copy_lmembers): Likewise.
171 (ctf_copy_emembers): Likewise.
172 (ctf_sort_var): Likewise.
173 (ctf_serialize): Likewise.
174 (ctf_gzwrite): Likewise.
175 (ctf_compress_write): Likewise.
176 (ctf_write_mem): Likewise.
177 (ctf_write): Likewise.
178 * ctf-serialize.c: New file.
179 * Makefile.am (libctf_nobfd_la_SOURCES): Add it.
180 * Makefile.in: Regenerate.
181
08794526
NA
1822021-03-18 Nick Alcock <nick.alcock@oracle.com>
183
184 * ctf-link.c (ctf_link_lazy_open): Move up in the file, to near
185 ctf_link_add_ctf.
186 * ctf-lookup.c (ctf_lookup_symbol_idx): Repair tabdamage.
187 (ctf_lookup_by_sym_or_name): Likewise.
188 * testsuite/libctf-lookup/struct-iteration.c: Likewise.
189 * testsuite/libctf-regression/type-add-unnamed-struct.c: Likewise.
190
211bcd01
NA
1912021-03-02 Nick Alcock <nick.alcock@oracle.com>
192
193 * ctf-create.c (symtypetab_density): Report the symbol name as
194 well as index in the name != object error; note the likely
195 consequences.
196 * ctf-link.c (ctf_link_shuffle_syms): Report the symbol index
197 as well as name.
198
8e7e4464
NA
1992021-03-02 Nick Alcock <nick.alcock@oracle.com>
200
201 * ctf-link.c (ctf_link_shuffle_syms): Free ctf_dynsyms properly.
202
cf6a0b98
NA
2032021-03-02 Nick Alcock <nick.alcock@oracle.com>
204
205 * ctf-dump.c (ctf_dump_format_type): Fix signed/unsigned confusion.
206
4659554b
NA
2072021-03-02 Nick Alcock <nick.alcock@oracle.com>
208
209 * ctf-dedup.c (ctf_dedup): Pass on errors from ctf_dedup_hash_type.
210 Call ctf_dedup_fini properly on other errors.
211 (ctf_dedup_emit_type): Set the errno on dynhash insertion failure.
212 * ctf-link.c (ctf_link_deduplicating_per_cu): Close outputs beyond
213 output 0 when asserting because >1 output is found.
214 (ctf_link_deduplicating): Likewise, when asserting because the
215 shared output is not the same as the passed-in fp.
216
f5060e56
NA
2172021-03-02 Nick Alcock <nick.alcock@oracle.com>
218
219 * ctf-impl.h (ctf_dict_t) <ctf_link_type_mapping>: No longer used
220 by the nondeduplicating linker.
221 (ctf_add_type_mapping): Removed, now static.
222 (ctf_type_mapping): Likewise.
223 (ctf_dedup_type_mapping): New.
224 (ctf_dedup_t) <cd_input_nums>: New.
225 * ctf-dedup.c (ctf_dedup_init): Populate it.
226 (ctf_dedup_fini): Free it again. Emphasise that this has to be
227 the last thing called.
228 (ctf_dedup): Populate it.
229 (ctf_dedup_populate_type_mapping): Removed.
230 (ctf_dedup_populate_type_mappings): Likewise.
231 (ctf_dedup_emit): No longer call it. No longer call
232 ctf_dedup_fini either.
233 (ctf_dedup_type_mapping): New.
234 * ctf-link.c (ctf_unnamed_cuname): New.
235 (ctf_create_per_cu): Arguments must be non-null now.
236 (ctf_in_member_cb_arg): Removed.
237 (ctf_link): No longer populate it. No longer discard the
238 mapping table.
239 (ctf_link_deduplicating_one_symtypetab): Use
240 ctf_dedup_type_mapping, not ctf_type_mapping. Use
241 ctf_unnamed_cuname.
242 (ctf_link_one_variable): Likewise. Pass in args individually: no
243 longer a ctf_variable_iter callback.
244 (empty_link_type_mapping): Removed.
245 (ctf_link_deduplicating_variables): Use ctf_variable_next, not
246 ctf_variable_iter. No longer pack arguments to
247 ctf_link_one_variable into a struct.
248 (ctf_link_deduplicating_per_cu): Call ctf_dedup_fini once
249 all link phases are done.
250 (ctf_link_deduplicating): Likewise.
251 (ctf_link_intern_extern_string): Improve comment.
252 (ctf_add_type_mapping): Migrate...
253 (ctf_type_mapping): ... these functions...
254 * ctf-create.c (ctf_add_type_mapping): ... here...
255 (ctf_type_mapping): ... and make static, for the sole use of
256 ctf_add_type.
257
478c04a5
NA
2582021-03-02 Nick Alcock <nick.alcock@oracle.com>
259
260 * ctf-link.c (ctf_link_one_variable): Remove reference to
261 "unconflicted link mode".
262
8915c559
NA
2632021-03-02 Nick Alcock <nick.alcock@oracle.com>
264
265 * ctf-link.c (ctf_create_per_cu): Drop FILENAME now that it is
266 always identical to CUNAME.
267 (ctf_link_deduplicating_one_symtypetab): Adjust.
268 (ctf_link_one_type): Remove.
269 (ctf_link_one_input_archive_member): Likewise.
270 (ctf_link_close_one_input_archive): Likewise.
271 (ctf_link_one_input_archive): Likewise.
272 (ctf_link): No longer call it. Drop CTF_LINK_NONDEDUP path.
273 Improve header comment a bit (dicts, not files). Adjust
274 ctf_create_per_cu call.
275 (ctf_link_deduplicating_variables): Simplify.
276 (ctf_link_in_member_cb_arg_t) <cu_name>: Remove.
277 <in_input_cu_file>: Likewise.
278 <in_fp_parent>: Likewise.
279 <done_parent>: Likewise.
280 (ctf_link_one_variable): Turn uses of in_file_name to in_cuname.
281
ac36e134
NA
2822021-03-02 Nick Alcock <nick.alcock@oracle.com>
283
284 * ctf-types.c (ctf_member_iter): Move 'rc' to an inner scope.
285 (ctf_enum_iter): Reimplement in terms of ctf_enum_next.
286 (ctf_type_iter): Reimplement in terms of ctf_type_next.
287 (ctf_type_iter_all): Likewise.
288 (ctf_variable_iter): Reimplement in terms of ctf_variable_next.
289 * ctf-archive.c (ctf_archive_iter_internal): Remove.
290 (ctf_archive_iter): Reimplement in terms of ctf_archive_next.
291
eaa2913a
NA
2922021-03-02 Nick Alcock <nick.alcock@oracle.com>
293
294 * ctf-archive.c (ctf_archive_next): Set the name of parents in
295 single-member archives.
296
8255cf42
AM
2972021-02-26 Alan Modra <amodra@gmail.com>
298
299 * Makefile.in: Regenerate.
300
93993f67
AM
3012021-02-21 Alan Modra <amodra@gmail.com>
302
303 * configure.ac: Invoke AC_CANONICAL_TARGET, AC_CANONICAL_HOST
304 and AC_CANONICAL_BUILD.
305 * configure: Regenerate.
306 * Makefile.in: Regenerate.
307
fd126337 3082021-02-20 Nick Alcock <nick.alcock@oracle.com>
f4f60336
NA
309
310 * ctf-impl.h (ctf_dict_t) <ctf_symhash>: New.
311 <ctf_symhash_latest>: Likewise.
312 (struct ctf_archive_internal) <ctfi_crossdict_cache>: New.
313 <ctfi_symnamedicts>: New.
314 <ctfi_syms>: Remove.
315 (ctf_lookup_symbol_name): Remove.
316 * ctf-lookup.c (ctf_lookup_symbol_name): Propagate errors from
317 parent properly. Make static.
318 (ctf_lookup_symbol_idx): New, linear search for the symbol name,
319 cached in the crossdict cache's ctf_symhash (if available), or
320 this dict's (otherwise).
321 (ctf_try_lookup_indexed): Allow the symname to be passed in.
322 (ctf_lookup_by_symbol): Turn into a wrapper around...
323 (ctf_lookup_by_sym_or_name): ... this, supporting name lookup too,
324 using ctf_lookup_symbol_idx in non-writable dicts. Special-case
325 name lookup in dynamic dicts without reported symbols, which have
326 no symtab or dynsymidx but where name lookup should still work.
327 (ctf_lookup_by_symbol_name): New, another wrapper.
328 * ctf-archive.c (enosym): Note that this is present in
329 ctfi_symnamedicts too.
330 (ctf_arc_close): Adjust for removal of ctfi_syms. Free the
331 ctfi_symnamedicts.
332 (ctf_arc_flush_caches): Likewise.
333 (ctf_dict_open_cached): Memoize the first cached dict in the
334 crossdict cache.
335 (ctf_arc_lookup_symbol): Turn into a wrapper around...
336 (ctf_arc_lookup_sym_or_name): ... this. No longer cache
337 ctf_id_t lookups: just call ctf_lookup_by_symbol as needed (but
338 still cache the dicts those lookups succeed in). Add
339 lookup-by-name support, with dicts of successful lookups cached in
340 ctfi_symnamedicts. Refactor the caching code a bit.
341 (ctf_arc_lookup_symbol_name): New, another wrapper.
342 * ctf-open.c (ctf_dict_close): Free the ctf_symhash.
343 * libctf.ver (LIBCTF_1.2): New version. Add
344 ctf_lookup_by_symbol_name, ctf_arc_lookup_symbol_name.
345 * testsuite/libctf-lookup/enum-symbol.c (main): Use
346 ctf_arc_lookup_symbol rather than looking up the name ourselves.
347 Fish it out repeatedly, to make sure that symbol caching isn't
348 broken.
349 (symidx_64): Remove.
350 (symidx_32): Remove.
351 * testsuite/libctf-lookup/enum-symbol-obj.lk: Test symbol lookup
352 in an unlinked object file (indexed symtypetab sections only).
353 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
354 (try_maybe_reporting): Check symbol types via
355 ctf_lookup_by_symbol_name as well as ctf_symbol_next.
356 * testsuite/libctf-lookup/conflicting-type-syms.*: New test of
357 lookups in a multi-dict archive.
358
c3bf9dc5
AM
3592021-02-20 Alan Modra <amodra@gmail.com>
360
361 * testsuite/config/default.exp (ld_L_opt): Define.
362 * testsuite/lib/ctf-lib.exp (load_common_lib): Delete. Instead load
363 ld-lib.exp.
364 (run_host_cmd, run_host_cmd_yesno, check_compiler_available): Delete.
365 (compile_one_cc, check_ctf_available): Delete.
366
758f5907
NA
3672021-02-03 Nick Alcock <nick.alcock@oracle.com>
368
369 * configure.ac (ac_cv_libctf_bfd_elf): Include string.h.
370 * configure: Regenerated.
371
cbd8f5bb
NA
3722021-02-03 Nick Alcock <nick.alcock@oracle.com>
373
374 * configure.ac (EXPECT): Check for, in order to define...
375 (TCL_TRY): ... this, if Tcl supports try/catch.
376 * Makefile.am (TCL_TRY): Run the testsuite only if set.
377 * configure: Regenerated.
378 * Makefile.in: Likewise.
379
95148614
NA
3802021-02-02 Nick Alcock <nick.alcock@oracle.com>
381
382 * configure.ac (CTF_LIBADD): Remove explicit -lintl population in
383 favour of LIBINTL.
384 * Makefile.am (libctf_nobfd_la_LIBADD): No longer explicitly
385 include $(LIBINTL).
386 (check-DEJAGNU): Pass down to tests as well.
387 * configure: Regenerated.
388 * Makefile.in: Likewise.
389
ee87f50b
NA
3902021-01-27 Nick Alcock <nick.alcock@oracle.com>
391
392 * ctf-string.c (ctf_str_add): Treat adding a NULL as adding "".
393 (ctf_str_add_ref): Likewise.
394 (ctf_str_add_external): Likewise.
395 * ctf-types.c (ctf_type_name_raw): Always return "" for offset 0.
396 * ctf-dedup.c (ctf_dedup_multiple_input_dicts): Don't armour
397 against NULL name.
398 (ctf_dedup_maybe_synthesize_forward): Likewise.
399
5dacd11d
NA
4002021-01-27 Nick Alcock <nick.alcock@oracle.com>
401
402 * ctf-create.c (ctf_serialize): Fix shadowing.
403
caa17049
NA
4042021-01-27 Nick Alcock <nick.alcock@oracle.com>
405
406 * ctf-create.c (ctf_add_encoded): Add check for non-empty name.
407 (ctf_add_forward): Likewise.
408 (ctf_add_typedef): Likewise.
409
78f28b89
NA
4102021-01-27 Nick Alcock <nick.alcock@oracle.com>
411
412 * ctf-open.c (init_types): Rip out code to check anonymous typedef
413 nodes.
414 * ctf-create.c (ctf_add_reftype): Likewise.
415 * ctf-lookup.c (refresh_pptrtab): Likewise.
416
35a01a04
NA
4172021-01-27 Nick Alcock <nick.alcock@oracle.com>
418
419 * ctf-impl.c (_libctf_nonnull_): Add parameters.
420 (LCTF_LINKING): New flag.
421 (ctf_dict_t) <ctf_link_flags>: Mention it.
422 * ctf-link.c (ctf_link): Keep LCTF_LINKING set across call.
423 (ctf_write): Likewise, including in child dictionaries.
424 (ctf_link_shuffle_syms): Make sure ctf_dynsyms is NULL if there
425 are no reported symbols.
426 * ctf-create.c (symtypetab_delete_nonstatic_vars): Make sure
427 the variable has been reported as a symbol by the linker.
428 (symtypetab_skippable): Mention relationship between SYMFP and the
429 flags.
430 (symtypetab_density): Adjust nonnullity. Exit early if no symbols
431 were reported and force-indexing is off (i.e., we are doing a
432 final link).
433 (ctf_serialize): Handle the !LCTF_LINKING case by writing out an
434 indexed, sorted symtypetab (and allow SYMFP to be NULL in this
435 case). Turn sorting off if this is a non-final link. Only delete
436 nonstatic vars if we are filtering symbols and the linker has
437 reported some.
438 * testsuite/libctf-regression/nonstatic-var-section-ld-r*:
439 New test of variable and symtypetab section population when
440 ld -r is used.
441 * testsuite/libctf-regression/nonstatic-var-section-ld-executable.lk:
442 Likewise, when ld of an executable is used.
443 * testsuite/libctf-regression/nonstatic-var-section-ld.lk:
444 Likewise, when ld -shared alone is used.
445 * testsuite/libctf-regression/nonstatic-var-section-ld*.c:
446 Lookup programs for the above.
447 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.*: New
448 test, testing survival of symbols across ctf_write paths.
449 * testsuite/lib/ctf-lib.exp (run_lookup_test): New option,
450 nonshared, suppressing linking of the SOURCE with -shared.
451
26503e2f
NA
4522021-01-19 Nick Alcock <nick.alcock@oracle.com>
453
454 * ctf-create.c (membadd): Transform ""-named members into
455 NULL-named ones.
456 * testsuite/libctf-regression/type-add-unnamed-struct*: New test.
457
e05a3e5a
NA
4582021-01-19 Nick Alcock <nick.alcock@oracle.com>
459
460 * ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
461 base type if looking up a nonexistent pointer type.
462 * testsuite/libctf-regression/pptrtab*: Test it.
463
5347ed60
AM
4642021-01-13 Alan Modra <amodra@gmail.com>
465
466 * Makefile.in: Regenerate.
467
d546b610
L
4682021-01-12 H.J. Lu <hongjiu.lu@intel.com>
469
470 PR binutils/26792
471 * configure.ac: Use GNU_MAKE_JOBSERVER.
472 * aclocal.m4: Regenerated.
473 * configure: Likewise.
474
83b33c6c
L
4752021-01-11 H.J. Lu <hongjiu.lu@intel.com>
476
477 PR ld/27173
478 * configure: Regenerated.
479
a4966cd9
L
4802021-01-09 H.J. Lu <hongjiu.lu@intel.com>
481
482 * configure: Regenerated.
483
055bc77a
NC
4842021-01-09 Nick Clifton <nickc@redhat.com>
485
486 * 2.36 release branch crated.
487
64307045
AM
4882021-01-09 Alan Modra <amodra@gmail.com>
489
490 * configure: Regenerate.
491
f4782128
ST
4922021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
493
494 * configure: Regenerate.
495
0814dbfb
NA
4962021-01-05 Nick Alcock <nick.alcock@oracle.com>
497
498 * testsuite/libctf-lookup/struct-iteration.c (main):
499 ctf_member_count returns an int.
500
70d3120f
NA
5012021-01-05 Nick Alcock <nick.alcock@oracle.com>
502
503 * Makefile.am (BASEDIR): New.
504 (BFDDIR): Likewise.
505 (check-DEJAGNU): Add development.exp to prerequisites.
506 (development.exp): New.
507 (CONFIG_STATUS_DEPENDENCIES): New.
508 (EXTRA_DEJAGNU_SITE_CONFIG): Likewise.
509 (DISTCLEANFILES): Likewise.
510 * Makefile.in: Regenerated.
511 * testsuite/lib/ctf-lib.exp (check_ctf_available): Return boolean.
512 * testsuite/libctf-lookup/lookup.exp: Call check_ctf_available.
513 * testsuite/libctf-regression/regression.exp: Likewise.
514
b4b6ea46
NA
5152021-01-05 Nick Alcock <nick.alcock@oracle.com>
516
517 * ctf-types.c (ctf_type_aname): Print forwards to unions and enums
518 properly.
519
abe4ca69
NA
5202021-01-05 Nick Alcock <nick.alcock@oracle.com>
521
522 * ctf-impl.h (ctf_dict_t) <ctf_pptrtab>: New.
523 <ctf_pptrtab_len>: New.
524 <ctf_pptrtab_typemax>: New.
525 * ctf-create.c (ctf_serialize): Update accordingly.
526 (ctf_add_reftype): Note that we don't need to update pptrtab here,
527 despite updating ptrtab.
528 * ctf-open.c (ctf_dict_close): Destroy the pptrtab.
529 (ctf_import): Likewise.
530 (ctf_import_unref): Likewise.
531 * ctf-lookup.c (grow_pptrtab): New.
532 (refresh_pptrtab): New, update a pptrtab.
533 (ctf_lookup_by_name): Turn into a wrapper around (and rename to)...
534 (ctf_lookup_by_name_internal): ... this: construct the pptrtab, and
535 use it in addition to the parent's ptrtab when parent dicts are
536 searched.
537 * testsuite/libctf-regression/regression.exp: New testsuite for
538 regression tests.
539 * testsuite/libctf-regression/pptrtab*: New test.
540 * testsuite/libctf-writable/writable.exp: New testsuite for tests of
541 writable CTF dicts.
542 * testsuite/libctf-writable/pptrtab*: New test.
543
8769046e
NA
5442021-01-05 Nick Alcock <nick.alcock@oracle.com>
545
546 * ctf-archive.c (ctf_archive_iter): Remove outdated comment.
547
6c3a3877
NA
5482021-01-05 Nick Alcock <nick.alcock@oracle.com>
549
550 * ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
551 <ctn_next>: ... here.
552 * ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
553 * ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
554 * ctf-types.c (ctf_member_iter): Reimplement in terms of...
555 (ctf_member_next): ... this. Support recursive unnamed member
556 iteration (off by default).
557 (ctf_member_info): Look up members in unnamed sub-structs.
558 * ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
559 (ctf_dedup_emit_struct_members): Likewise.
560 * testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
561 members, and a normal member after the end.
562 * testsuite/libctf-lookup/struct-iteration.c: Verify that
563 ctf_member_count is consistent with the number of successful returns
564 from a non-recursive ctf_member_next.
565 * testsuite/libctf-lookup/struct-iteration-*: New, test iteration
566 over struct members.
567 * testsuite/libctf-lookup/struct-lookup.c: New test.
568 * testsuite/libctf-lookup/struct-lookup.lk: New test.
569
abed0b07
NA
5702021-01-05 Nick Alcock <nick.alcock@oracle.com>
571
572 * ctf-link.c (ctf_link_warn_outdated_inputs): New.
573 (ctf_link_write): Call it.
574
9bc76971
NA
5752021-01-05 Nick Alcock <nick.alcock@oracle.com>
576
577 * testsuite/libctf-lookup/enum-symbol.lk: New symbol-lookup test.
578 * testsuite/libctf-lookup/enum-symbol-ctf.c: New CTF input.
579 * testsuite/libctf-lookup/enum-symbol.c: New lookup test.
580
c59e30ed
NA
5812021-01-05 Nick Alcock <nick.alcock@oracle.com>
582
583 * Makefile.am (EXPECT): New.
584 (RUNTEST): Likewise.
585 (RUNTESTFLAGS): Likewise.
586 (CC_FOR_TARGET): Likewise.
587 (check-DEJAGNU): Likewise.
588 (AUTOMAKE_OPTIONS): Add dejagnu.
589 * Makefile.in: Regenerated.
590 * testsuite/config/default.exp: New.
591 * testsuite/lib/ctf-lib.exp: Likewise.
592 * testsuite/libctf-lookup/enum.lk: New test.
593 * testsuite/libctf-lookup/enum-ctf.c: New CTF input.
594 * testsuite/libctf-lookup/enum.c: New lookup test.
595 * testsuite/libctf-lookup/ambiguous-struct*.c: New test.
596 * testsuite/libctf-lookup/lookup.exp: New.
597
1038406a
NA
5982021-01-05 Nick Alcock <nick.alcock@oracle.com>
599
600 * configure.ac (BFD_LIBADD): Remove.
601 (BFD_DEPENDENCIES): Likewise. Remove associated cases.
602 (SHARED_LIBADD): Rename to...
603 (CTF_LIBADD): ... this. Stick in a suitable libiberty even when
604 linking statically.
605 * Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
606 libctf uses libintl.
607 (libctf_la_LIBADD): Reference libbfd.la directly, not via
608 BFD_LIBADD.
609 (libctf_la_DEPENDENCIES): Remove.
610 * Makefile.in: Regenerate.
611 * configure: Likewise.
612
37002871
NA
6132021-01-05 Nick Alcock <nick.alcock@oracle.com>
614
615 * ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
616 * ctf-types.c (ctf_type_aname): No longer deal with slices here.
617 * ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
618 (CTF_FT_REFS): New.
619 (CTF_FT_BITFIELD): Likewise.
620 (CTF_FT_ID): Likewise.
621 (ctf_dump_member): Do not do indentation here. Migrate the
622 type-printing parts of this into...
623 (ctf_dump_format_type): ... here, to be shared by all type printers.
624 Get the errno value for non-representable types right. Do not print
625 bitfield info for non-bitfields. Improve the format and indentation
626 of other type output. Shuffle spacing around to make all indentation
627 either 'width of column' or 4 chars.
628 (ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
629 (ctf_dump_objts): Likewise. Spacing shuffle.
630 (ctf_dump_var): Likewise.
631 (type_hex_digits): Migrate down in the file, to above its new user.
632 (ctf_dump_type): Indent here instead. Pass CTF_FT_REFS to
633 ctf_dump_format_type. Don't trim off excess linefeeds now we no
634 longer generate them. Dump enumerated types.
635
ffeece6a
NA
6362021-01-05 Nick Alcock <nick.alcock@oracle.com>
637
638 * ctf-types.c (ctf_type_resolve): Improve comment.
639 (ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
640 Emit errors into the right dict.
641 (ctf_type_align): Likewise.
642 * ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
643 when adding a member without explicit offset when this member, or
644 the previous member, is incomplete.
645 * ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
646 forwards.
647 (ctf_dump_member): Do not try to print their alignment.
648
91e7ce2f
NA
6492021-01-05 Nick Alcock <nick.alcock@oracle.com>
650
651 * ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type.
652 (ctf_dump_format_type): Don't emit the size for function objects.
653 Dump the element type of arrays like we dump the pointed-to type of
654 pointers, etc.
655
57f97d0e
NA
6562021-01-05 Nick Alcock <nick.alcock@oracle.com>
657
658 * ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs.
659 (ctf_dump_header): Add 0x to the hex magic number.
660 (ctf_dump_str): Add 0x to the hex string offsets.
661 (ctf_dump_membstate_t) <cdm_toplevel_indent>: New.
662 (ctf_dump_type): Adjust. Free it when we're done.
663 (type_hex_digits): New.
664 (ctf_dump_member): Align output depending on the width of the type
665 ID being generated. Use printf padding, not a loop, to generate
666 indentation.
667
b09ad6ea
NA
6682021-01-05 Nick Alcock <nick.alcock@oracle.com>
669
670 * ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
671
a7c23ac9
NB
6722021-01-04 Nicolas Boulenguez <nicolas@debian.org>
673
674 PR 27117
675 * configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
676 ACLOCAL_AMFLAGS -I dirs.
677 * configure: Regenerate.
678
250d07de
AM
6792021-01-01 Alan Modra <amodra@gmail.com>
680
681 Update year range in copyright notice of all files.
682
c2795844
AM
683For older changes see ChangeLog-2020
684\f
685Copyright (C) 2021 Free Software Foundation, Inc.
60da9d95 686
c2795844
AM
687Copying and distribution of this file, with or without modification,
688are permitted in any medium without royalty provided the copyright
689notice and this notice are preserved.
60da9d95 690
60da9d95
NA
691Local Variables:
692mode: change-log
693left-margin: 8
c2795844 694fill-column: 74
60da9d95
NA
695version-control: never
696End:
This page took 0.194949 seconds and 4 git commands to generate.