libctf: ctf_archive_next should set the parent name consistently
[deliverable/binutils-gdb.git] / libctf / ChangeLog
CommitLineData
eaa2913a
NA
12021-03-02 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-archive.c (ctf_archive_next): Set the name of parents in
4 single-member archives.
5
8255cf42
AM
62021-02-26 Alan Modra <amodra@gmail.com>
7
8 * Makefile.in: Regenerate.
9
93993f67
AM
102021-02-21 Alan Modra <amodra@gmail.com>
11
12 * configure.ac: Invoke AC_CANONICAL_TARGET, AC_CANONICAL_HOST
13 and AC_CANONICAL_BUILD.
14 * configure: Regenerate.
15 * Makefile.in: Regenerate.
16
f4f60336
NA
172021-02-17 Nick Alcock <nick.alcock@oracle.com>
18
19 * ctf-impl.h (ctf_dict_t) <ctf_symhash>: New.
20 <ctf_symhash_latest>: Likewise.
21 (struct ctf_archive_internal) <ctfi_crossdict_cache>: New.
22 <ctfi_symnamedicts>: New.
23 <ctfi_syms>: Remove.
24 (ctf_lookup_symbol_name): Remove.
25 * ctf-lookup.c (ctf_lookup_symbol_name): Propagate errors from
26 parent properly. Make static.
27 (ctf_lookup_symbol_idx): New, linear search for the symbol name,
28 cached in the crossdict cache's ctf_symhash (if available), or
29 this dict's (otherwise).
30 (ctf_try_lookup_indexed): Allow the symname to be passed in.
31 (ctf_lookup_by_symbol): Turn into a wrapper around...
32 (ctf_lookup_by_sym_or_name): ... this, supporting name lookup too,
33 using ctf_lookup_symbol_idx in non-writable dicts. Special-case
34 name lookup in dynamic dicts without reported symbols, which have
35 no symtab or dynsymidx but where name lookup should still work.
36 (ctf_lookup_by_symbol_name): New, another wrapper.
37 * ctf-archive.c (enosym): Note that this is present in
38 ctfi_symnamedicts too.
39 (ctf_arc_close): Adjust for removal of ctfi_syms. Free the
40 ctfi_symnamedicts.
41 (ctf_arc_flush_caches): Likewise.
42 (ctf_dict_open_cached): Memoize the first cached dict in the
43 crossdict cache.
44 (ctf_arc_lookup_symbol): Turn into a wrapper around...
45 (ctf_arc_lookup_sym_or_name): ... this. No longer cache
46 ctf_id_t lookups: just call ctf_lookup_by_symbol as needed (but
47 still cache the dicts those lookups succeed in). Add
48 lookup-by-name support, with dicts of successful lookups cached in
49 ctfi_symnamedicts. Refactor the caching code a bit.
50 (ctf_arc_lookup_symbol_name): New, another wrapper.
51 * ctf-open.c (ctf_dict_close): Free the ctf_symhash.
52 * libctf.ver (LIBCTF_1.2): New version. Add
53 ctf_lookup_by_symbol_name, ctf_arc_lookup_symbol_name.
54 * testsuite/libctf-lookup/enum-symbol.c (main): Use
55 ctf_arc_lookup_symbol rather than looking up the name ourselves.
56 Fish it out repeatedly, to make sure that symbol caching isn't
57 broken.
58 (symidx_64): Remove.
59 (symidx_32): Remove.
60 * testsuite/libctf-lookup/enum-symbol-obj.lk: Test symbol lookup
61 in an unlinked object file (indexed symtypetab sections only).
62 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
63 (try_maybe_reporting): Check symbol types via
64 ctf_lookup_by_symbol_name as well as ctf_symbol_next.
65 * testsuite/libctf-lookup/conflicting-type-syms.*: New test of
66 lookups in a multi-dict archive.
67
c3bf9dc5
AM
682021-02-20 Alan Modra <amodra@gmail.com>
69
70 * testsuite/config/default.exp (ld_L_opt): Define.
71 * testsuite/lib/ctf-lib.exp (load_common_lib): Delete. Instead load
72 ld-lib.exp.
73 (run_host_cmd, run_host_cmd_yesno, check_compiler_available): Delete.
74 (compile_one_cc, check_ctf_available): Delete.
75
758f5907
NA
762021-02-03 Nick Alcock <nick.alcock@oracle.com>
77
78 * configure.ac (ac_cv_libctf_bfd_elf): Include string.h.
79 * configure: Regenerated.
80
cbd8f5bb
NA
812021-02-03 Nick Alcock <nick.alcock@oracle.com>
82
83 * configure.ac (EXPECT): Check for, in order to define...
84 (TCL_TRY): ... this, if Tcl supports try/catch.
85 * Makefile.am (TCL_TRY): Run the testsuite only if set.
86 * configure: Regenerated.
87 * Makefile.in: Likewise.
88
95148614
NA
892021-02-02 Nick Alcock <nick.alcock@oracle.com>
90
91 * configure.ac (CTF_LIBADD): Remove explicit -lintl population in
92 favour of LIBINTL.
93 * Makefile.am (libctf_nobfd_la_LIBADD): No longer explicitly
94 include $(LIBINTL).
95 (check-DEJAGNU): Pass down to tests as well.
96 * configure: Regenerated.
97 * Makefile.in: Likewise.
98
ee87f50b
NA
992021-01-27 Nick Alcock <nick.alcock@oracle.com>
100
101 * ctf-string.c (ctf_str_add): Treat adding a NULL as adding "".
102 (ctf_str_add_ref): Likewise.
103 (ctf_str_add_external): Likewise.
104 * ctf-types.c (ctf_type_name_raw): Always return "" for offset 0.
105 * ctf-dedup.c (ctf_dedup_multiple_input_dicts): Don't armour
106 against NULL name.
107 (ctf_dedup_maybe_synthesize_forward): Likewise.
108
5dacd11d
NA
1092021-01-27 Nick Alcock <nick.alcock@oracle.com>
110
111 * ctf-create.c (ctf_serialize): Fix shadowing.
112
caa17049
NA
1132021-01-27 Nick Alcock <nick.alcock@oracle.com>
114
115 * ctf-create.c (ctf_add_encoded): Add check for non-empty name.
116 (ctf_add_forward): Likewise.
117 (ctf_add_typedef): Likewise.
118
78f28b89
NA
1192021-01-27 Nick Alcock <nick.alcock@oracle.com>
120
121 * ctf-open.c (init_types): Rip out code to check anonymous typedef
122 nodes.
123 * ctf-create.c (ctf_add_reftype): Likewise.
124 * ctf-lookup.c (refresh_pptrtab): Likewise.
125
35a01a04
NA
1262021-01-27 Nick Alcock <nick.alcock@oracle.com>
127
128 * ctf-impl.c (_libctf_nonnull_): Add parameters.
129 (LCTF_LINKING): New flag.
130 (ctf_dict_t) <ctf_link_flags>: Mention it.
131 * ctf-link.c (ctf_link): Keep LCTF_LINKING set across call.
132 (ctf_write): Likewise, including in child dictionaries.
133 (ctf_link_shuffle_syms): Make sure ctf_dynsyms is NULL if there
134 are no reported symbols.
135 * ctf-create.c (symtypetab_delete_nonstatic_vars): Make sure
136 the variable has been reported as a symbol by the linker.
137 (symtypetab_skippable): Mention relationship between SYMFP and the
138 flags.
139 (symtypetab_density): Adjust nonnullity. Exit early if no symbols
140 were reported and force-indexing is off (i.e., we are doing a
141 final link).
142 (ctf_serialize): Handle the !LCTF_LINKING case by writing out an
143 indexed, sorted symtypetab (and allow SYMFP to be NULL in this
144 case). Turn sorting off if this is a non-final link. Only delete
145 nonstatic vars if we are filtering symbols and the linker has
146 reported some.
147 * testsuite/libctf-regression/nonstatic-var-section-ld-r*:
148 New test of variable and symtypetab section population when
149 ld -r is used.
150 * testsuite/libctf-regression/nonstatic-var-section-ld-executable.lk:
151 Likewise, when ld of an executable is used.
152 * testsuite/libctf-regression/nonstatic-var-section-ld.lk:
153 Likewise, when ld -shared alone is used.
154 * testsuite/libctf-regression/nonstatic-var-section-ld*.c:
155 Lookup programs for the above.
156 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.*: New
157 test, testing survival of symbols across ctf_write paths.
158 * testsuite/lib/ctf-lib.exp (run_lookup_test): New option,
159 nonshared, suppressing linking of the SOURCE with -shared.
160
26503e2f
NA
1612021-01-19 Nick Alcock <nick.alcock@oracle.com>
162
163 * ctf-create.c (membadd): Transform ""-named members into
164 NULL-named ones.
165 * testsuite/libctf-regression/type-add-unnamed-struct*: New test.
166
e05a3e5a
NA
1672021-01-19 Nick Alcock <nick.alcock@oracle.com>
168
169 * ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
170 base type if looking up a nonexistent pointer type.
171 * testsuite/libctf-regression/pptrtab*: Test it.
172
5347ed60
AM
1732021-01-13 Alan Modra <amodra@gmail.com>
174
175 * Makefile.in: Regenerate.
176
d546b610
L
1772021-01-12 H.J. Lu <hongjiu.lu@intel.com>
178
179 PR binutils/26792
180 * configure.ac: Use GNU_MAKE_JOBSERVER.
181 * aclocal.m4: Regenerated.
182 * configure: Likewise.
183
83b33c6c
L
1842021-01-11 H.J. Lu <hongjiu.lu@intel.com>
185
186 PR ld/27173
187 * configure: Regenerated.
188
a4966cd9
L
1892021-01-09 H.J. Lu <hongjiu.lu@intel.com>
190
191 * configure: Regenerated.
192
055bc77a
NC
1932021-01-09 Nick Clifton <nickc@redhat.com>
194
195 * 2.36 release branch crated.
196
64307045
AM
1972021-01-09 Alan Modra <amodra@gmail.com>
198
199 * configure: Regenerate.
200
f4782128
ST
2012021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
202
203 * configure: Regenerate.
204
0814dbfb
NA
2052021-01-05 Nick Alcock <nick.alcock@oracle.com>
206
207 * testsuite/libctf-lookup/struct-iteration.c (main):
208 ctf_member_count returns an int.
209
70d3120f
NA
2102021-01-05 Nick Alcock <nick.alcock@oracle.com>
211
212 * Makefile.am (BASEDIR): New.
213 (BFDDIR): Likewise.
214 (check-DEJAGNU): Add development.exp to prerequisites.
215 (development.exp): New.
216 (CONFIG_STATUS_DEPENDENCIES): New.
217 (EXTRA_DEJAGNU_SITE_CONFIG): Likewise.
218 (DISTCLEANFILES): Likewise.
219 * Makefile.in: Regenerated.
220 * testsuite/lib/ctf-lib.exp (check_ctf_available): Return boolean.
221 * testsuite/libctf-lookup/lookup.exp: Call check_ctf_available.
222 * testsuite/libctf-regression/regression.exp: Likewise.
223
b4b6ea46
NA
2242021-01-05 Nick Alcock <nick.alcock@oracle.com>
225
226 * ctf-types.c (ctf_type_aname): Print forwards to unions and enums
227 properly.
228
abe4ca69
NA
2292021-01-05 Nick Alcock <nick.alcock@oracle.com>
230
231 * ctf-impl.h (ctf_dict_t) <ctf_pptrtab>: New.
232 <ctf_pptrtab_len>: New.
233 <ctf_pptrtab_typemax>: New.
234 * ctf-create.c (ctf_serialize): Update accordingly.
235 (ctf_add_reftype): Note that we don't need to update pptrtab here,
236 despite updating ptrtab.
237 * ctf-open.c (ctf_dict_close): Destroy the pptrtab.
238 (ctf_import): Likewise.
239 (ctf_import_unref): Likewise.
240 * ctf-lookup.c (grow_pptrtab): New.
241 (refresh_pptrtab): New, update a pptrtab.
242 (ctf_lookup_by_name): Turn into a wrapper around (and rename to)...
243 (ctf_lookup_by_name_internal): ... this: construct the pptrtab, and
244 use it in addition to the parent's ptrtab when parent dicts are
245 searched.
246 * testsuite/libctf-regression/regression.exp: New testsuite for
247 regression tests.
248 * testsuite/libctf-regression/pptrtab*: New test.
249 * testsuite/libctf-writable/writable.exp: New testsuite for tests of
250 writable CTF dicts.
251 * testsuite/libctf-writable/pptrtab*: New test.
252
8769046e
NA
2532021-01-05 Nick Alcock <nick.alcock@oracle.com>
254
255 * ctf-archive.c (ctf_archive_iter): Remove outdated comment.
256
6c3a3877
NA
2572021-01-05 Nick Alcock <nick.alcock@oracle.com>
258
259 * ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
260 <ctn_next>: ... here.
261 * ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
262 * ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
263 * ctf-types.c (ctf_member_iter): Reimplement in terms of...
264 (ctf_member_next): ... this. Support recursive unnamed member
265 iteration (off by default).
266 (ctf_member_info): Look up members in unnamed sub-structs.
267 * ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
268 (ctf_dedup_emit_struct_members): Likewise.
269 * testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
270 members, and a normal member after the end.
271 * testsuite/libctf-lookup/struct-iteration.c: Verify that
272 ctf_member_count is consistent with the number of successful returns
273 from a non-recursive ctf_member_next.
274 * testsuite/libctf-lookup/struct-iteration-*: New, test iteration
275 over struct members.
276 * testsuite/libctf-lookup/struct-lookup.c: New test.
277 * testsuite/libctf-lookup/struct-lookup.lk: New test.
278
abed0b07
NA
2792021-01-05 Nick Alcock <nick.alcock@oracle.com>
280
281 * ctf-link.c (ctf_link_warn_outdated_inputs): New.
282 (ctf_link_write): Call it.
283
9bc76971
NA
2842021-01-05 Nick Alcock <nick.alcock@oracle.com>
285
286 * testsuite/libctf-lookup/enum-symbol.lk: New symbol-lookup test.
287 * testsuite/libctf-lookup/enum-symbol-ctf.c: New CTF input.
288 * testsuite/libctf-lookup/enum-symbol.c: New lookup test.
289
c59e30ed
NA
2902021-01-05 Nick Alcock <nick.alcock@oracle.com>
291
292 * Makefile.am (EXPECT): New.
293 (RUNTEST): Likewise.
294 (RUNTESTFLAGS): Likewise.
295 (CC_FOR_TARGET): Likewise.
296 (check-DEJAGNU): Likewise.
297 (AUTOMAKE_OPTIONS): Add dejagnu.
298 * Makefile.in: Regenerated.
299 * testsuite/config/default.exp: New.
300 * testsuite/lib/ctf-lib.exp: Likewise.
301 * testsuite/libctf-lookup/enum.lk: New test.
302 * testsuite/libctf-lookup/enum-ctf.c: New CTF input.
303 * testsuite/libctf-lookup/enum.c: New lookup test.
304 * testsuite/libctf-lookup/ambiguous-struct*.c: New test.
305 * testsuite/libctf-lookup/lookup.exp: New.
306
1038406a
NA
3072021-01-05 Nick Alcock <nick.alcock@oracle.com>
308
309 * configure.ac (BFD_LIBADD): Remove.
310 (BFD_DEPENDENCIES): Likewise. Remove associated cases.
311 (SHARED_LIBADD): Rename to...
312 (CTF_LIBADD): ... this. Stick in a suitable libiberty even when
313 linking statically.
314 * Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
315 libctf uses libintl.
316 (libctf_la_LIBADD): Reference libbfd.la directly, not via
317 BFD_LIBADD.
318 (libctf_la_DEPENDENCIES): Remove.
319 * Makefile.in: Regenerate.
320 * configure: Likewise.
321
37002871
NA
3222021-01-05 Nick Alcock <nick.alcock@oracle.com>
323
324 * ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
325 * ctf-types.c (ctf_type_aname): No longer deal with slices here.
326 * ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
327 (CTF_FT_REFS): New.
328 (CTF_FT_BITFIELD): Likewise.
329 (CTF_FT_ID): Likewise.
330 (ctf_dump_member): Do not do indentation here. Migrate the
331 type-printing parts of this into...
332 (ctf_dump_format_type): ... here, to be shared by all type printers.
333 Get the errno value for non-representable types right. Do not print
334 bitfield info for non-bitfields. Improve the format and indentation
335 of other type output. Shuffle spacing around to make all indentation
336 either 'width of column' or 4 chars.
337 (ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
338 (ctf_dump_objts): Likewise. Spacing shuffle.
339 (ctf_dump_var): Likewise.
340 (type_hex_digits): Migrate down in the file, to above its new user.
341 (ctf_dump_type): Indent here instead. Pass CTF_FT_REFS to
342 ctf_dump_format_type. Don't trim off excess linefeeds now we no
343 longer generate them. Dump enumerated types.
344
ffeece6a
NA
3452021-01-05 Nick Alcock <nick.alcock@oracle.com>
346
347 * ctf-types.c (ctf_type_resolve): Improve comment.
348 (ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
349 Emit errors into the right dict.
350 (ctf_type_align): Likewise.
351 * ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
352 when adding a member without explicit offset when this member, or
353 the previous member, is incomplete.
354 * ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
355 forwards.
356 (ctf_dump_member): Do not try to print their alignment.
357
91e7ce2f
NA
3582021-01-05 Nick Alcock <nick.alcock@oracle.com>
359
360 * ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type.
361 (ctf_dump_format_type): Don't emit the size for function objects.
362 Dump the element type of arrays like we dump the pointed-to type of
363 pointers, etc.
364
57f97d0e
NA
3652021-01-05 Nick Alcock <nick.alcock@oracle.com>
366
367 * ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs.
368 (ctf_dump_header): Add 0x to the hex magic number.
369 (ctf_dump_str): Add 0x to the hex string offsets.
370 (ctf_dump_membstate_t) <cdm_toplevel_indent>: New.
371 (ctf_dump_type): Adjust. Free it when we're done.
372 (type_hex_digits): New.
373 (ctf_dump_member): Align output depending on the width of the type
374 ID being generated. Use printf padding, not a loop, to generate
375 indentation.
376
b09ad6ea
NA
3772021-01-05 Nick Alcock <nick.alcock@oracle.com>
378
379 * ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
380
a7c23ac9
NB
3812021-01-04 Nicolas Boulenguez <nicolas@debian.org>
382
383 PR 27117
384 * configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
385 ACLOCAL_AMFLAGS -I dirs.
386 * configure: Regenerate.
387
250d07de
AM
3882021-01-01 Alan Modra <amodra@gmail.com>
389
390 Update year range in copyright notice of all files.
391
c2795844
AM
392For older changes see ChangeLog-2020
393\f
394Copyright (C) 2021 Free Software Foundation, Inc.
60da9d95 395
c2795844
AM
396Copying and distribution of this file, with or without modification,
397are permitted in any medium without royalty provided the copyright
398notice and this notice are preserved.
60da9d95 399
60da9d95
NA
400Local Variables:
401mode: change-log
402left-margin: 8
c2795844 403fill-column: 74
60da9d95
NA
404version-control: never
405End:
This page took 0.123765 seconds and 4 git commands to generate.