libctf: require a Tcl capable of try/catch to run tests
[binutils-gdb.git] / libctf / ChangeLog
1 2021-02-03 Nick Alcock <nick.alcock@oracle.com>
2
3 * configure.ac (EXPECT): Check for, in order to define...
4 (TCL_TRY): ... this, if Tcl supports try/catch.
5 * Makefile.am (TCL_TRY): Run the testsuite only if set.
6 * configure: Regenerated.
7 * Makefile.in: Likewise.
8
9 2021-02-02 Nick Alcock <nick.alcock@oracle.com>
10
11 * configure.ac (CTF_LIBADD): Remove explicit -lintl population in
12 favour of LIBINTL.
13 * Makefile.am (libctf_nobfd_la_LIBADD): No longer explicitly
14 include $(LIBINTL).
15 (check-DEJAGNU): Pass down to tests as well.
16 * configure: Regenerated.
17 * Makefile.in: Likewise.
18
19 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
20
21 * ctf-string.c (ctf_str_add): Treat adding a NULL as adding "".
22 (ctf_str_add_ref): Likewise.
23 (ctf_str_add_external): Likewise.
24 * ctf-types.c (ctf_type_name_raw): Always return "" for offset 0.
25 * ctf-dedup.c (ctf_dedup_multiple_input_dicts): Don't armour
26 against NULL name.
27 (ctf_dedup_maybe_synthesize_forward): Likewise.
28
29 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
30
31 * ctf-create.c (ctf_serialize): Fix shadowing.
32
33 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
34
35 * ctf-create.c (ctf_add_encoded): Add check for non-empty name.
36 (ctf_add_forward): Likewise.
37 (ctf_add_typedef): Likewise.
38
39 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
40
41 * ctf-open.c (init_types): Rip out code to check anonymous typedef
42 nodes.
43 * ctf-create.c (ctf_add_reftype): Likewise.
44 * ctf-lookup.c (refresh_pptrtab): Likewise.
45
46 2021-01-27 Nick Alcock <nick.alcock@oracle.com>
47
48 * ctf-impl.c (_libctf_nonnull_): Add parameters.
49 (LCTF_LINKING): New flag.
50 (ctf_dict_t) <ctf_link_flags>: Mention it.
51 * ctf-link.c (ctf_link): Keep LCTF_LINKING set across call.
52 (ctf_write): Likewise, including in child dictionaries.
53 (ctf_link_shuffle_syms): Make sure ctf_dynsyms is NULL if there
54 are no reported symbols.
55 * ctf-create.c (symtypetab_delete_nonstatic_vars): Make sure
56 the variable has been reported as a symbol by the linker.
57 (symtypetab_skippable): Mention relationship between SYMFP and the
58 flags.
59 (symtypetab_density): Adjust nonnullity. Exit early if no symbols
60 were reported and force-indexing is off (i.e., we are doing a
61 final link).
62 (ctf_serialize): Handle the !LCTF_LINKING case by writing out an
63 indexed, sorted symtypetab (and allow SYMFP to be NULL in this
64 case). Turn sorting off if this is a non-final link. Only delete
65 nonstatic vars if we are filtering symbols and the linker has
66 reported some.
67 * testsuite/libctf-regression/nonstatic-var-section-ld-r*:
68 New test of variable and symtypetab section population when
69 ld -r is used.
70 * testsuite/libctf-regression/nonstatic-var-section-ld-executable.lk:
71 Likewise, when ld of an executable is used.
72 * testsuite/libctf-regression/nonstatic-var-section-ld.lk:
73 Likewise, when ld -shared alone is used.
74 * testsuite/libctf-regression/nonstatic-var-section-ld*.c:
75 Lookup programs for the above.
76 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.*: New
77 test, testing survival of symbols across ctf_write paths.
78 * testsuite/lib/ctf-lib.exp (run_lookup_test): New option,
79 nonshared, suppressing linking of the SOURCE with -shared.
80
81 2021-01-19 Nick Alcock <nick.alcock@oracle.com>
82
83 * ctf-create.c (membadd): Transform ""-named members into
84 NULL-named ones.
85 * testsuite/libctf-regression/type-add-unnamed-struct*: New test.
86
87 2021-01-19 Nick Alcock <nick.alcock@oracle.com>
88
89 * ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
90 base type if looking up a nonexistent pointer type.
91 * testsuite/libctf-regression/pptrtab*: Test it.
92
93 2021-01-13 Alan Modra <amodra@gmail.com>
94
95 * Makefile.in: Regenerate.
96
97 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
98
99 PR binutils/26792
100 * configure.ac: Use GNU_MAKE_JOBSERVER.
101 * aclocal.m4: Regenerated.
102 * configure: Likewise.
103
104 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
105
106 PR ld/27173
107 * configure: Regenerated.
108
109 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
110
111 * configure: Regenerated.
112
113 2021-01-09 Nick Clifton <nickc@redhat.com>
114
115 * 2.36 release branch crated.
116
117 2021-01-09 Alan Modra <amodra@gmail.com>
118
119 * configure: Regenerate.
120
121 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
122
123 * configure: Regenerate.
124
125 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
126
127 * testsuite/libctf-lookup/struct-iteration.c (main):
128 ctf_member_count returns an int.
129
130 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
131
132 * Makefile.am (BASEDIR): New.
133 (BFDDIR): Likewise.
134 (check-DEJAGNU): Add development.exp to prerequisites.
135 (development.exp): New.
136 (CONFIG_STATUS_DEPENDENCIES): New.
137 (EXTRA_DEJAGNU_SITE_CONFIG): Likewise.
138 (DISTCLEANFILES): Likewise.
139 * Makefile.in: Regenerated.
140 * testsuite/lib/ctf-lib.exp (check_ctf_available): Return boolean.
141 * testsuite/libctf-lookup/lookup.exp: Call check_ctf_available.
142 * testsuite/libctf-regression/regression.exp: Likewise.
143
144 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
145
146 * ctf-types.c (ctf_type_aname): Print forwards to unions and enums
147 properly.
148
149 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
150
151 * ctf-impl.h (ctf_dict_t) <ctf_pptrtab>: New.
152 <ctf_pptrtab_len>: New.
153 <ctf_pptrtab_typemax>: New.
154 * ctf-create.c (ctf_serialize): Update accordingly.
155 (ctf_add_reftype): Note that we don't need to update pptrtab here,
156 despite updating ptrtab.
157 * ctf-open.c (ctf_dict_close): Destroy the pptrtab.
158 (ctf_import): Likewise.
159 (ctf_import_unref): Likewise.
160 * ctf-lookup.c (grow_pptrtab): New.
161 (refresh_pptrtab): New, update a pptrtab.
162 (ctf_lookup_by_name): Turn into a wrapper around (and rename to)...
163 (ctf_lookup_by_name_internal): ... this: construct the pptrtab, and
164 use it in addition to the parent's ptrtab when parent dicts are
165 searched.
166 * testsuite/libctf-regression/regression.exp: New testsuite for
167 regression tests.
168 * testsuite/libctf-regression/pptrtab*: New test.
169 * testsuite/libctf-writable/writable.exp: New testsuite for tests of
170 writable CTF dicts.
171 * testsuite/libctf-writable/pptrtab*: New test.
172
173 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
174
175 * ctf-archive.c (ctf_archive_iter): Remove outdated comment.
176
177 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
178
179 * ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
180 <ctn_next>: ... here.
181 * ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
182 * ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
183 * ctf-types.c (ctf_member_iter): Reimplement in terms of...
184 (ctf_member_next): ... this. Support recursive unnamed member
185 iteration (off by default).
186 (ctf_member_info): Look up members in unnamed sub-structs.
187 * ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
188 (ctf_dedup_emit_struct_members): Likewise.
189 * testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
190 members, and a normal member after the end.
191 * testsuite/libctf-lookup/struct-iteration.c: Verify that
192 ctf_member_count is consistent with the number of successful returns
193 from a non-recursive ctf_member_next.
194 * testsuite/libctf-lookup/struct-iteration-*: New, test iteration
195 over struct members.
196 * testsuite/libctf-lookup/struct-lookup.c: New test.
197 * testsuite/libctf-lookup/struct-lookup.lk: New test.
198
199 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
200
201 * ctf-link.c (ctf_link_warn_outdated_inputs): New.
202 (ctf_link_write): Call it.
203
204 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
205
206 * testsuite/libctf-lookup/enum-symbol.lk: New symbol-lookup test.
207 * testsuite/libctf-lookup/enum-symbol-ctf.c: New CTF input.
208 * testsuite/libctf-lookup/enum-symbol.c: New lookup test.
209
210 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
211
212 * Makefile.am (EXPECT): New.
213 (RUNTEST): Likewise.
214 (RUNTESTFLAGS): Likewise.
215 (CC_FOR_TARGET): Likewise.
216 (check-DEJAGNU): Likewise.
217 (AUTOMAKE_OPTIONS): Add dejagnu.
218 * Makefile.in: Regenerated.
219 * testsuite/config/default.exp: New.
220 * testsuite/lib/ctf-lib.exp: Likewise.
221 * testsuite/libctf-lookup/enum.lk: New test.
222 * testsuite/libctf-lookup/enum-ctf.c: New CTF input.
223 * testsuite/libctf-lookup/enum.c: New lookup test.
224 * testsuite/libctf-lookup/ambiguous-struct*.c: New test.
225 * testsuite/libctf-lookup/lookup.exp: New.
226
227 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
228
229 * configure.ac (BFD_LIBADD): Remove.
230 (BFD_DEPENDENCIES): Likewise. Remove associated cases.
231 (SHARED_LIBADD): Rename to...
232 (CTF_LIBADD): ... this. Stick in a suitable libiberty even when
233 linking statically.
234 * Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
235 libctf uses libintl.
236 (libctf_la_LIBADD): Reference libbfd.la directly, not via
237 BFD_LIBADD.
238 (libctf_la_DEPENDENCIES): Remove.
239 * Makefile.in: Regenerate.
240 * configure: Likewise.
241
242 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
243
244 * ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
245 * ctf-types.c (ctf_type_aname): No longer deal with slices here.
246 * ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
247 (CTF_FT_REFS): New.
248 (CTF_FT_BITFIELD): Likewise.
249 (CTF_FT_ID): Likewise.
250 (ctf_dump_member): Do not do indentation here. Migrate the
251 type-printing parts of this into...
252 (ctf_dump_format_type): ... here, to be shared by all type printers.
253 Get the errno value for non-representable types right. Do not print
254 bitfield info for non-bitfields. Improve the format and indentation
255 of other type output. Shuffle spacing around to make all indentation
256 either 'width of column' or 4 chars.
257 (ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
258 (ctf_dump_objts): Likewise. Spacing shuffle.
259 (ctf_dump_var): Likewise.
260 (type_hex_digits): Migrate down in the file, to above its new user.
261 (ctf_dump_type): Indent here instead. Pass CTF_FT_REFS to
262 ctf_dump_format_type. Don't trim off excess linefeeds now we no
263 longer generate them. Dump enumerated types.
264
265 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
266
267 * ctf-types.c (ctf_type_resolve): Improve comment.
268 (ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
269 Emit errors into the right dict.
270 (ctf_type_align): Likewise.
271 * ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
272 when adding a member without explicit offset when this member, or
273 the previous member, is incomplete.
274 * ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
275 forwards.
276 (ctf_dump_member): Do not try to print their alignment.
277
278 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
279
280 * ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type.
281 (ctf_dump_format_type): Don't emit the size for function objects.
282 Dump the element type of arrays like we dump the pointed-to type of
283 pointers, etc.
284
285 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
286
287 * ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs.
288 (ctf_dump_header): Add 0x to the hex magic number.
289 (ctf_dump_str): Add 0x to the hex string offsets.
290 (ctf_dump_membstate_t) <cdm_toplevel_indent>: New.
291 (ctf_dump_type): Adjust. Free it when we're done.
292 (type_hex_digits): New.
293 (ctf_dump_member): Align output depending on the width of the type
294 ID being generated. Use printf padding, not a loop, to generate
295 indentation.
296
297 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
298
299 * ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
300
301 2021-01-04 Nicolas Boulenguez <nicolas@debian.org>
302
303 PR 27117
304 * configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
305 ACLOCAL_AMFLAGS -I dirs.
306 * configure: Regenerate.
307
308 2021-01-01 Alan Modra <amodra@gmail.com>
309
310 Update year range in copyright notice of all files.
311
312 For older changes see ChangeLog-2020
313 \f
314 Copyright (C) 2021 Free Software Foundation, Inc.
315
316 Copying and distribution of this file, with or without modification,
317 are permitted in any medium without royalty provided the copyright
318 notice and this notice are preserved.
319
320 Local Variables:
321 mode: change-log
322 left-margin: 8
323 fill-column: 74
324 version-control: never
325 End: