libctf: restructure error handling to reduce relocations
[deliverable/binutils-gdb.git] / libctf / ChangeLog
CommitLineData
7eea9d3b
NA
12020-07-22 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-error.c: Include <stddef.h>, for offsetof.
4 (_ctf_errlist): Migrate to...
5 (_ctf_errlist_t): ... this.
6 (_ctf_erridx): New, indexes into _ctf_errlist_t.
7 (_ctf_nerr): Remove.
8 (ctf_errmsg): Adjust accordingly.
9 * Makefile.am (BUILT_SOURCES): Note...
10 (ctf-error.h): ... this new rule.
11 * Makefile.in: Regenerate.
12 * mkerrors.sed: New, process ctf-api.h to generate ctf-error.h.
13 * .gitignore: New, ignore ctf-error.h.
14
b64751cf
NA
152020-07-22 Nick Alcock <nick.alcock@oracle.com>
16
17 * ctf-impl.h: Fix typos in comments.
18
df16e041
NC
192020-07-22 Nick Clifton <nickc@redhat.com>
20
21 * ctf-archive.c (ctf_arc_write): Avoid calling close twice on the
22 same file descriptor.
23
b115b9fd
NC
242020-07-04 Nick Clifton <nickc@redhat.com>
25
26 Binutils 2.35 branch created.
27
8e6635bd
NA
282020-06-26 Nick Alcock <nick.alcock@oracle.com>
29
30 * aclocal.m4: Add config/gettext-sister.m4: Shuffle into
31 alphabetical order.
32 * configure.ac: Add ZW_GNU_GETTEXT_SISTER_DIR.
33 * config.h.in: Regenerated.
34 * Makefile.in: Likewise.
35 * configure: Likewise.
36
c1401ecc
NA
372020-06-26 Nick Alcock <nick.alcock@oracle.com>
38
39 * ctf-create.c: Include <unistd.h>.
40 * ctf-open-bfd.c: Likewise.
41
e755667f
NA
422020-06-26 Nick Alcock <nick.alcock@oracle.com>
43
44 PR libctf/25120
45 * configure.ac: Check for bswap_16, bswap_32, and bswap_64 decls.
46 * swap.h (bswap_16): Do not assume that presence of <byteswap.h>
47 means this is declared.
48 (bswap_32): Likewise.
49 (bswap_64): Likewise.
50 (bswap_identity_64): Remove, unused.
51 * configure: Regenerated.
52 * config.h.in: Likewise.
53
86670658
NA
542020-06-26 Nick Alcock <nick.alcock@oracle.com>
55
56 PR libctf/25120
57 * ctf-impl.h (_libctf_printflike_): Add non-GNU-C fallback.
58 (_libctf_unlikely_): Likewise.
59 (_libctf_unused): Likewise.
60 (_libctf_malloc_): Likewise.
61
2e428e74
NA
622020-06-26 Nick Alcock <nick.alcock@oracle.com>
63
64 PR libctf/25120
65 * ctf-archive.c (search_nametbl): No longer global: declare...
66 (ctf_arc_open_by_name_internal): ... here. Use bsearch_r.
67 (search_modent_by_name): Take and use ARG for the nametbl.
68
2f6ecaed
NA
692020-06-26 Nick Alcock <nick.alcock@oracle.com>
70
71 * ctf-impl.h (ctf_new_archive_internal): Declare.
72 (ctf_arc_bufopen): Remove.
73 (ctf_archive_internal) <ctfi_free_symsect>: New.
74 * ctf-archive.c (ctf_arc_close): Use it.
75 (ctf_arc_bufopen): Fuse into...
76 (ctf_new_archive_internal): ... this, moved across from...
77 * ctf-open-bfd.c: ... here.
78 (ctf_bfdopen_ctfsect): Use ctf_arc_bufopen.
79 * libctf.ver: Add it.
80
8ffcdf18
NA
812020-06-26 Nick Alcock <nick.alcock@oracle.com>
82
83 * ctf-create.c (ctf_add_forward): Intern in the right namespace.
84 (ctf_dtd_delete): Remove correspondingly.
85 (ctf_rollback): Likewise.
86
d04a47ac
NA
872020-06-26 Nick Alcock <nick.alcock@oracle.com>
88
89 * ctf-create.c (ctf_add_type_internal): Hand back existing types
90 unchanged.
91
6bbf9da8
NA
922020-06-26 Nick Alcock <nick.alcock@oracle.com>
93
94 * ctf-create.c (ctf_add_forward): Don't add forwards to
95 types that already exist.
96
fe4c2d55
NA
972020-06-26 Nick Alcock <nick.alcock@oracle.com>
98
99 * ctf-open.c (init_types): Only intern root-visible types.
100 * ctf-create.c (ctf_dtd_insert): Likewise.
101 (ctf_dtd_delete): Only remove root-visible types.
102 (ctf_rollback): Likewise.
103 (ctf_add_generic): Adjust.
104 (ctf_add_struct_sized): Adjust comment.
105 (ctf_add_union_sized): Likewise.
106 (ctf_add_enum): Likewise.
107 * ctf-impl.h (ctf_dtd_insert): Adjust prototype.
108
11978942
JB
1092020-03-11 John Baldwin <jhb@FreeBSD.org>
110
111 * swap.h (bswap_identity_64): Make static.
112
ae774686
NC
1132020-01-18 Nick Clifton <nickc@redhat.com>
114
115 Binutils 2.34 branch created.
116
eb9a7e35 1172020-01-05 Joel Brobecker <brobecker@adacore.com>
3a657c60
EZ
118
119 PR binutils/25155:
120 * configure.ac: Add AC_CHECK_DECLS([asprintf]).
121 * configure, config.h.in: Regenerate.
122
b14ce8bf
AM
1232020-01-01 Alan Modra <amodra@gmail.com>
124
125 Update year range in copyright notice of all files.
126
cbbbc402
SM
1272019-10-16 Simon Marchi <simon.marchi@polymtl.ca>
128
129 * swap.h (bswap_16, bswap_32, bswap_64): Make static.
130
fa56cdcd
NA
1312019-09-30 Nick Alcock <nick.alcock@oracle.com>
132
133 * ctf-open.c (ctf_bufopen_internal): Fix tabdamage.
134 * ctf-types.c (ctf_type_lname): Likewise.
135
ad613f1d
NA
1362019-09-23 Nick Alcock <nick.alcock@oracle.com>
137
138 * ctf-open.c (ctf_import): Do not leak a ctf_file_t ref on every
139 ctf_import after the first for a given file.
140
9323dd86
NA
1412019-09-23 Nick Alcock <nick.alcock@oracle.com>
142
143 * ctf-impl.h (ctf_str_append_noerr): Declare.
144 * ctf-util.c (ctf_str_append_noerr): Define in terms of
145 ctf_str_append.
146 * ctf-dump.c (str_append): New, call it.
147 (ctf_dump_format_type): Use str_append, not ctf_str_append.
148 (ctf_dump_label): Likewise.
149 (ctf_dump_objts): Likewise.
150 (ctf_dump_funcs): Likewise.
151 (ctf_dump_var): Likewise.
152 (ctf_dump_member): Likewise.
153 (ctf_dump_type): Likewise.
154 (ctf_dump): Likewise.
155
de07e349
NA
1562019-09-23 Nick Alcock <nick.alcock@oracle.com>
157
158 * ctf-impl.h (ctf_alloc): Remove.
159 (ctf_free): Likewise.
160 (ctf_strdup): Likewise.
161 * ctf-subr.c (ctf_alloc): Remove.
162 (ctf_free): Likewise.
163 * ctf-util.c (ctf_strdup): Remove.
164
165 * ctf-create.c (ctf_serialize): Use malloc, not ctf_alloc; free, not
166 ctf_free; strdup, not ctf_strdup.
167 (ctf_dtd_delete): Likewise.
168 (ctf_dvd_delete): Likewise.
169 (ctf_add_generic): Likewise.
170 (ctf_add_function): Likewise.
171 (ctf_add_enumerator): Likewise.
172 (ctf_add_member_offset): Likewise.
173 (ctf_add_variable): Likewise.
174 (membadd): Likewise.
175 (ctf_compress_write): Likewise.
176 (ctf_write_mem): Likewise.
177 * ctf-decl.c (ctf_decl_push): Likewise.
178 (ctf_decl_fini): Likewise.
179 (ctf_decl_sprintf): Likewise. Check for OOM.
180 * ctf-dump.c (ctf_dump_append): Use malloc, not ctf_alloc; free, not
181 ctf_free; strdup, not ctf_strdup.
182 (ctf_dump_free): Likewise.
183 (ctf_dump): Likewise.
184 * ctf-open.c (upgrade_types_v1): Likewise.
185 (init_types): Likewise.
186 (ctf_file_close): Likewise.
187 (ctf_bufopen_internal): Likewise. Check for OOM.
188 (ctf_parent_name_set): Likewise: report the OOM to the caller.
189 (ctf_cuname_set): Likewise.
190 (ctf_import): Likewise.
191 * ctf-string.c (ctf_str_purge_atom_refs): Use malloc, not ctf_alloc;
192 free, not ctf_free; strdup, not ctf_strdup.
193 (ctf_str_free_atom): Likewise.
194 (ctf_str_create_atoms): Likewise.
195 (ctf_str_add_ref_internal): Likewise.
196 (ctf_str_remove_ref): Likewise.
197 (ctf_str_write_strtab): Likewise.
198
9c1a2295
NA
1992019-08-09 Nick Alcock <nick.alcock@oracle.com>
200
201 * ctf-types.c (ctf_type_encoding): Fix the dynamic case to
202 work right for non-int/fps.
203
1a6ab13e
NA
2042019-08-08 Nick Alcock <nick.alcock@oracle.com>
205
206 * ctf-types.c (ctf_type_name): Don't strlen a potentially-
207 null pointer.
208
99dc3ebd
NA
2092019-08-07 Nick Alcock <nick.alcock@oracle.com>
210
211 * ctf-impl.h (ctf_file_t) <ctf_add_processing>: New.
212 * ctf-open.c (ctf_file_close): Free it.
213 * ctf-create.c (ctf_serialize): Adjust.
214 (membcmp): When reporting a conflict due to an error, report the
215 error.
216 (ctf_add_type): Turn into a ctf_add_processing wrapper. Rename to...
217 (ctf_add_type_internal): ... this. Hand back types we are already
218 in the middle of adding immediately. Hand back structs/unions with
219 the same number of members immediately. Do not walk the dynamic
220 list. Call ctf_add_type_internal, not ctf_add_type. Handle
221 forwards promoted to other types and the inverse case identically.
222 Add structs to the mapping as soon as we intern them, before they
223 gain any members.
224
676c3ecb
NA
2252019-08-09 Nick Alcock <nick.alcock@oracle.com>
226
227 * ctf-impl.h (ctf_names_t): New.
228 (ctf_lookup_t) <ctf_hash>: Now a ctf_names_t, not a ctf_hash_t.
229 (ctf_file_t) <ctf_structs>: Likewise.
230 <ctf_unions>: Likewise.
231 <ctf_enums>: Likewise.
232 <ctf_names>: Likewise.
233 <ctf_lookups>: Improve comment.
234 <ctf_ptrtab_len>: New.
235 <ctf_prov_strtab>: New.
236 <ctf_str_prov_offset>: New.
237 <ctf_dtbyname>: Remove, redundant to the names hashes.
238 <ctf_dtnextid>: Remove, redundant to ctf_typemax.
239 (ctf_dtdef_t) <dtd_name>: Remove.
240 <dtd_data>: Note that the ctt_name is now populated.
241 (ctf_str_atom_t) <csa_offset>: This is now the strtab
242 offset for internal strings too.
243 <csa_external_offset>: New, the external strtab offset.
244 (CTF_INDEX_TO_TYPEPTR): Handle the LCTF_RDWR case.
245 (ctf_name_table): New declaration.
246 (ctf_lookup_by_rawname): Likewise.
247 (ctf_lookup_by_rawhash): Likewise.
248 (ctf_set_ctl_hashes): Likewise.
249 (ctf_serialize): Likewise.
250 (ctf_dtd_insert): Adjust.
251 (ctf_simple_open_internal): Likewise.
252 (ctf_bufopen_internal): Likewise.
253 (ctf_list_empty_p): Likewise.
254 (ctf_str_remove_ref): Likewise.
255 (ctf_str_add): Returns uint32_t now.
256 (ctf_str_add_ref): Likewise.
257 (ctf_str_add_external): Now returns a boolean (int).
258 * ctf-string.c (ctf_strraw_explicit): Check the ctf_prov_strtab
259 for strings in the appropriate range.
260 (ctf_str_create_atoms): Create the ctf_prov_strtab. Detect OOM
261 when adding the null string to the new strtab.
262 (ctf_str_free_atoms): Destroy the ctf_prov_strtab.
263 (ctf_str_add_ref_internal): Add make_provisional argument. If
264 make_provisional, populate the offset and fill in the
265 ctf_prov_strtab accordingly.
266 (ctf_str_add): Return the offset, not the string.
267 (ctf_str_add_ref): Likewise.
268 (ctf_str_add_external): Return a success integer.
269 (ctf_str_remove_ref): New, remove a single ref.
270 (ctf_str_count_strtab): Do not count the initial null string's
271 length or the existence or length of any unreferenced internal
272 atoms.
273 (ctf_str_populate_sorttab): Skip atoms with no refs.
274 (ctf_str_write_strtab): Populate the nullstr earlier. Add one
275 to the cts_len for the null string, since it is no longer done
276 in ctf_str_count_strtab. Adjust for csa_external_offset rename.
277 Populate the csa_offset for both internal and external cases.
278 Flush the ctf_prov_strtab afterwards, and reset the
279 ctf_str_prov_offset.
280 * ctf-create.c (ctf_grow_ptrtab): New.
281 (ctf_create): Call it. Initialize new fields rather than old
282 ones. Tell ctf_bufopen_internal that this is a writable dictionary.
283 Set the ctl hashes and data model.
284 (ctf_update): Rename to...
285 (ctf_serialize): ... this. Leave a compatibility function behind.
286 Tell ctf_simple_open_internal that this is a writable dictionary.
287 Pass the new fields along from the old dictionary. Drop
288 ctf_dtnextid and ctf_dtbyname. Use ctf_strraw, not dtd_name.
289 Do not zero out the DTD's ctt_name.
290 (ctf_prefixed_name): Rename to...
291 (ctf_name_table): ... this. No longer return a prefixed name: return
292 the applicable name table instead.
293 (ctf_dtd_insert): Use it, and use the right name table. Pass in the
294 kind we're adding. Migrate away from dtd_name.
295 (ctf_dtd_delete): Adjust similarly. Remove the ref to the
296 deleted ctt_name.
297 (ctf_dtd_lookup_type_by_name): Remove.
298 (ctf_dynamic_type): Always return NULL on read-only dictionaries.
299 No longer check ctf_dtnextid: check ctf_typemax instead.
300 (ctf_snapshot): No longer use ctf_dtnextid: use ctf_typemax instead.
301 (ctf_rollback): Likewise. No longer fail with ECTF_OVERROLLBACK. Use
302 ctf_name_table and the right name table, and migrate away from
303 dtd_name as in ctf_dtd_delete.
304 (ctf_add_generic): Pass in the kind explicitly and pass it to
305 ctf_dtd_insert. Use ctf_typemax, not ctf_dtnextid. Migrate away
306 from dtd_name to using ctf_str_add_ref to populate the ctt_name.
307 Grow the ptrtab if needed.
308 (ctf_add_encoded): Pass in the kind.
309 (ctf_add_slice): Likewise.
310 (ctf_add_array): Likewise.
311 (ctf_add_function): Likewise.
312 (ctf_add_typedef): Likewise.
313 (ctf_add_reftype): Likewise. Initialize the ctf_ptrtab, checking
314 ctt_name rather than dtd_name.
315 (ctf_add_struct_sized): Pass in the kind. Use
316 ctf_lookup_by_rawname, not ctf_hash_lookup_type /
317 ctf_dtd_lookup_type_by_name.
318 (ctf_add_union_sized): Likewise.
319 (ctf_add_enum): Likewise.
320 (ctf_add_enum_encoded): Likewise.
321 (ctf_add_forward): Likewise.
322 (ctf_add_type): Likewise.
323 (ctf_compress_write): Call ctf_serialize: adjust for ctf_size not
324 being initialized until after the call.
325 (ctf_write_mem): Likewise.
326 (ctf_write): Likewise.
327 * ctf-archive.c (arc_write_one_ctf): Likewise.
328 * ctf-lookup.c (ctf_lookup_by_name): Use ctf_lookuup_by_rawhash, not
329 ctf_hash_lookup_type.
330 (ctf_lookup_by_id): No longer check the readonly types if the
331 dictionary is writable.
332 * ctf-open.c (init_types): Assert that this dictionary is not
333 writable. Adjust to use the new name hashes, ctf_name_table,
334 and ctf_ptrtab_len. GNU style fix for the final ptrtab scan.
335 (ctf_bufopen_internal): New 'writable' parameter. Flip on LCTF_RDWR
336 if set. Drop out early when dictionary is writable. Split the
337 ctf_lookups initialization into...
338 (ctf_set_cth_hashes): ... this new function.
339 (ctf_simple_open_internal): Adjust. New 'writable' parameter.
340 (ctf_simple_open): Adjust accordingly.
341 (ctf_bufopen): Likewise.
342 (ctf_file_close): Destroy the appropriate name hashes. No longer
343 destroy ctf_dtbyname, which is gone.
344 (ctf_getdatasect): Remove spurious "extern".
345 * ctf-types.c (ctf_lookup_by_rawname): New, look up types in the
346 specified name table, given a kind.
347 (ctf_lookup_by_rawhash): Likewise, given a ctf_names_t *.
348 (ctf_member_iter): Add support for iterating over the
349 dynamic type list.
350 (ctf_enum_iter): Likewise.
351 (ctf_variable_iter): Likewise.
352 (ctf_type_rvisit): Likewise.
353 (ctf_member_info): Add support for types in the dynamic type list.
354 (ctf_enum_name): Likewise.
355 (ctf_enum_value): Likewise.
356 (ctf_func_type_info): Likewise.
357 (ctf_func_type_args): Likewise.
358 * ctf-link.c (ctf_accumulate_archive_names): No longer call
359 ctf_update.
360 (ctf_link_write): Likewise.
361 (ctf_link_intern_extern_string): Adjust for new
362 ctf_str_add_external return value.
363 (ctf_link_add_strtab): Likewise.
364 * ctf-util.c (ctf_list_empty_p): New.
365
791915db
NA
3662019-08-05 Nick Alcock <nick.alcock@oracle.com>
367
368 * ctf-types.c (ctf_type_resolve): Return ECTF_NONREPRESENTABLE on
369 type zero.
370 * ctf-create.c (ctf_add_type): Detect and skip nonrepresentable
371 members and types.
372 (ctf_add_variable): Likewise for variables pointing to them.
373 * ctf-link.c (ctf_link_one_type): Do not warn for nonrepresentable
374 type link failure, but do warn for others.
375 * ctf-dump.c (ctf_dump_format_type): Likewise. Do not assume all
376 errors to be ENOMEM.
377 (ctf_dump_member): Likewise.
378 (ctf_dump_type): Likewise.
379 (ctf_dump_header_strfield): Do not assume all errors to be ENOMEM.
380 (ctf_dump_header_sectfield): Do not assume all errors to be ENOMEM.
381 (ctf_dump_header): Likewise.
382 (ctf_dump_label): likewise.
383 (ctf_dump_objts): likewise.
384 (ctf_dump_funcs): likewise.
385 (ctf_dump_var): likewise.
386 (ctf_dump_str): Likewise.
387
87279e3c
NA
3882019-09-30 Nick Alcock <nick.alcock@oracle.com>
389
390 * configure.ac (AC_DISABLE_SHARED): New, like opcodes/.
391 (LT_INIT): Likewise.
392 (AM_INSTALL_LIBBFD): Likewise.
393 (dlopen): Note why this is necessary in a comment.
394 (SHARED_LIBADD): Initialize for possibly-PIC libiberty: derived from
395 opcodes/.
396 (SHARED_LDFLAGS): Likewise.
397 (BFD_LIBADD): Likewise, for libbfd.
398 (BFD_DEPENDENCIES): Likewise.
399 (VERSION_FLAGS): Initialize, using a version script if ld supports
400 one, or libtool -export-symbols-regex otherwise.
401 (AC_CONFIG_MACRO_DIR): Add ../BFD.
402 * Makefile.am (ACLOCAL_AMFLAGS): Likewise.
403 (INCDIR): New.
404 (AM_CPPFLAGS): Use $(srcdir), not $(top_srcdir).
405 (noinst_LIBRARIES): Replace with...
406 [INSTALL_LIBBFD] (lib_LTLIBRARIES): This, or...
407 [!INSTALL_LIBBFD] (noinst_LTLIBRARIES): ... this, mentioning new
408 libctf-nobfd.la as well.
409 [INSTALL_LIBCTF] (include_HEADERS): Add the CTF headers.
410 [!INSTALL_LIBCTF] (include_HEADERS): New, empty.
411 (libctf_a_SOURCES): Rename to...
412 (libctf_nobfd_la_SOURCES): ... this, all of libctf other than
413 ctf-open-bfd.c.
414 (libctf_la_SOURCES): Now derived from libctf_nobfd_la_SOURCES,
415 with ctf-open-bfd.c added.
416 (libctf_nobfd_la_LIBADD): New, using @SHARED_LIBADD@.
417 (libctf_la_LIBADD): New, using @BFD_LIBADD@ as well.
418 (libctf_la_DEPENDENCIES): New, using @BFD_DEPENDENCIES@.
419 * Makefile.am [INSTALL_LIBCTF]: Use it.
420 * aclocal.m4: Add ../bfd/acinclude.m4, ../config/acx.m4, and the
421 libtool macros.
422 * libctf.ver: New, everything is version LIBCTF_1.0 currently (even
423 the unstable components).
424 * Makefile.in: Regenerated.
425 * config.h.in: Likewise.
426 * configure: Likewise.
427
4282019-07-30 Nick Alcock <nick.alcock@oracle.com>
429
430 * configure.ac (INSTALL_LIBCTF): New, controlled by
431 --enable-install-libctf.
432 [INSTALL_LIBCTF] (lib_LIBRARIES): Add libctf.a.
433 * Makefile.in: Regenerated.
434 * configure: Regenerated.
435
f046147d
NA
4362019-07-30 Nick Alcock <nick.alcock@oracle.com>
437
438 * ctf-archive.c (ctf_arc_close): Call ctfi_bfd_close if set.
439 * ctf-open-bfd.c (ctf_bfdclose): Fix comment.
440
edc8bbe9
NA
4412019-07-30 Nick Alcock <nick.alcock@oracle.com>
442
443 * ctf-open-bfd.c (ctf_fdopen): Call bfd_set_cacheable.
444
7e97445a
NA
4452019-07-13 Nick Alcock <nick.alcock@oracle.com>
446
447 * ctf-impl.h (includes): Include <sys/param.h> here.
448
5ae6af75
NA
4492019-07-30 Nick Alcock <nick.alcock@oracle.com>
450
451 * ctf-open.c (flip_lbls): Eschew for-loop initial declarations.
452 (flip_objts): Likewise.
453 (flip_vars): Likewise.
454 (flip_types): Likewise.
455
1820745a
NA
4562019-07-30 Nick Alcock <nick.alcock@oracle.com>
457
458 * ctf-hash.c (ctf_hashtab_insert): Pass in the key and value
459 freeing functions: if set, free the key and value if the slot
460 already exists. Always reassign the key.
461 (ctf_dynhash_insert): Adjust call appropriately.
462 (ctf_hash_insert_type): Likewise.
463
5de9eada
NA
4642019-08-03 Nick Alcock <nick.alcock@oracle.com>
465
466 * ctf-create.c (ctf_add_type): Look up and use the forwarded-to
467 type kind. Allow forwards to unify with pre-existing structs/
468 unions/enums.
469
49ea9b45
NA
4702019-07-30 Nick Alcock <nick.alcock@oracle.com>
471
472 * ctf-impl.h (ctf_file_t) <ctf_link_cu_mappping>: New.
473 <ctf_link_memb_name_changer>: Likewise.
474 <ctf_link_memb_name_changer_arg>: Likewise.
475 * ctf-create.c (ctf_update): Update accordingly.
476 * ctf-open.c (ctf_file_close): Likewise.
477 * ctf-link.c (ctf_create_per_cu): Apply the cu mapping.
478 (ctf_link_add_cu_mapping): New.
479 (ctf_link_set_memb_name_changer): Likewise.
480 (ctf_change_parent_name): New.
481 (ctf_name_list_accum_cb_arg_t) <dynames>: New, storage for names
482 allocated by the caller's ctf_link_memb_name_changer.
483 <ndynames>: Likewise.
484 (ctf_accumulate_archive_names): Call the ctf_link_memb_name_changer.
485 (ctf_link_write): Likewise (for _CTF_SECTION only): also call
486 ctf_change_parent_name. Free any resulting names.
487
eabb7154
NA
4882019-07-13 Nick Alcock <nick.alcock@oracle.com>
489
490 * ctf-link.c (ctf_create_per_cu): New, refactored out of...
491 (ctf_link_one_type): ... here, with parent-name setting added.
492 (check_variable): New.
493 (ctf_link_one_variable): Likewise.
494 (ctf_link_one_input_archive_member): Call it.
495 * ctf-error.c (_ctf_errlist): Updated with new errors.
496
886453cb
NA
4972019-07-13 Nick Alcock <nick.alcock@oracle.com>
498
499 * ctf-impl.h (ctf_file_t): New field ctf_link_type_mapping.
500 (struct ctf_link_type_mapping_key): New.
501 (ctf_hash_type_mapping_key): Likewise.
502 (ctf_hash_eq_type_mapping_key): Likewise.
503 (ctf_add_type_mapping): Likewise.
504 (ctf_type_mapping): Likewise.
505 (ctf_dynhash_empty): Likewise.
506 * ctf-open.c (ctf_file_close): Update accordingly.
507 * ctf-create.c (ctf_update): Likewise.
508 (ctf_add_type): Populate the mapping.
509 * ctf-hash.c (ctf_hash_type_mapping_key): Hash a type mapping key.
510 (ctf_hash_eq_type_mapping_key): Check the key for equality.
511 (ctf_dynhash_insert): Fix comment typo.
512 (ctf_dynhash_empty): New.
513 * ctf-link.c (ctf_add_type_mapping): New.
514 (ctf_type_mapping): Likewise.
515 (empty_link_type_mapping): New.
516 (ctf_link_one_input_archive): Call it.
517
72c83edd
NA
5182019-07-13 Nick Alcock <nick.alcock@oracle.com>
519
520 * ctf-link.c: New file, linking of the string and type sections.
521 * Makefile.am (libctf_a_SOURCES): Add it.
522 * Makefile.in: Regenerate.
523
524 * ctf-impl.h (ctf_file_t): New fields ctf_link_inputs,
525 ctf_link_outputs.
526 * ctf-create.c (ctf_update): Update accordingly.
527 * ctf-open.c (ctf_file_close): Likewise.
528 * ctf-error.c (_ctf_errlist): Updated with new errors.
529
d18f9f16
NA
5302019-07-13 Nick Alcock <nick.alcock@oracle.com>
531
532 * ctf-dump.c (ctf_dump_funcs): Check the right error value.
533
b4f0e09c
NA
5342019-07-13 Nick Alcock <nick.alcock@oracle.com>
535
536 * ctf-dump.c (ctf_dump): Use ctf_type_iter_all to dump types, not
537 ctf_type_iter.
538 (ctf_dump_type): Pass down the flag from ctf_type_iter_all.
539 (ctf_dump_format_type): Add non-root-type { } notation.
540 Add root flag to prototype.
541 (ctf_dump_label): Adjust accordingly.
542 (ctf_dump_objts): Likewise.
543 (ctf_dump_var): Likewise.
544
3dde2c91
NA
5452019-07-13 Nick Alcock <nick.alcock@oracle.com>
546
547 * ctf-create.c (ctf_compress_write): Fix double-free.
548
5537f9b9
NA
5492019-07-13 Nick Alcock <nick.alcock@oracle.com>
550
551 * ctf-archive.c (ctf_arc_write): Split off, and reimplement in terms
552 of...
553 (ctf_arc_write_fd): ... this new function.
554 * ctf-create.c (ctf_write_mem): New.
555
d851ecd3
NA
5562019-07-13 Nick Alcock <nick.alcock@oracle.com>
557
558 * ctf-impl.h (ctf_str_atom_t) <csa_offset>: New field.
559 (ctf_file_t) <ctf_syn_ext_strtab>: Likewise.
560 (ctf_str_add_ref): Name the last arg.
561 (ctf_str_add_external) New.
562 (ctf_str_add_strraw_explicit): Likewise.
563 (ctf_simple_open_internal): Likewise.
564 (ctf_bufopen_internal): Likewise.
565
566 * ctf-string.c (ctf_strraw_explicit): Split from...
567 (ctf_strraw): ... here, with new support for ctf_syn_ext_strtab.
568 (ctf_str_add_ref_internal): Return the atom, not the
569 string.
570 (ctf_str_add): Adjust accordingly.
571 (ctf_str_add_ref): Likewise. Move up in the file.
572 (ctf_str_add_external): New: update the csa_offset.
573 (ctf_str_count_strtab): Only account for strings with no csa_offset
574 in the internal strtab length.
575 (ctf_str_write_strtab): If the csa_offset is set, update the
576 string's refs without writing the string out, and update the
577 ctf_syn_ext_strtab. Make OOM handling less ugly.
578 * ctf-create.c (struct ctf_sort_var_arg_cb): New.
579 (ctf_update): Handle failure to populate the strtab. Pass in the
580 new ctf_sort_var arg. Adjust for ctf_syn_ext_strtab addition.
581 Call ctf_simple_open_internal, not ctf_simple_open.
582 (ctf_sort_var): Call ctf_strraw_explicit rather than looking up
583 strings by hand.
584 * ctf-hash.c (ctf_hash_insert_type): Likewise (but using
585 ctf_strraw). Adjust to diagnose ECTF_STRTAB nonetheless.
586 * ctf-open.c (init_types): No longer filter out ECTF_STRTAB.
587 (ctf_file_close): Destroy the ctf_syn_ext_strtab.
588 (ctf_simple_open): Rename to, and reimplement as a wrapper around...
589 (ctf_simple_open_internal): ... this new function, which calls
590 ctf_bufopen_internal.
591 (ctf_bufopen): Rename to, and reimplement as a wrapper around...
592 (ctf_bufopen_internal): ... this new function, which sets
593 ctf_syn_ext_strtab.
594
0ac62312
NA
5952019-07-13 Nick Alcock <nick.alcock@oracle.com>
596
597 * ctf_types.c (ctf_type_iter_all): New.
598
2db912ba
NA
5992019-07-13 Nick Alcock <nick.alcock@oracle.com>
600
601 * ctf-open.c (init_symtab): Check for overflow against the right
602 section.
603 (upgrade_header): Set cth_objtidxoff, cth_funcidxoff to zero-length.
604 (upgrade_types_v1): Note that these sections are not checked.
605 (flip_header): Endian-swap the header fields.
606 (flip_ctf): Endian-swap the sections.
607 (flip_objts): Update comment.
608 (ctf_bufopen): Check header offsets and alignment for validity.
609
6d5944fc
NA
6102019-07-13 Nick Alcock <nick.alcock@oracle.com>
611
612 * ctf-open-bfd.c: Add <assert.h>.
613 (ctf_bfdopen_ctfsect): Open string and symbol tables using
614 techniques borrowed from bfd_elf_sym_name.
615 (ctf_new_archive_internal): Improve comment.
616 * ctf-archive.c (ctf_arc_close): Do not free the ctfi_strsect.
617 * ctf-open.c (ctf_bufopen): Allow opening with a string section but
618 no symbol section, but not vice versa.
619
9b32cba4
NA
6202019-07-08 Nick Alcock <nick.alcock@oracle.com>
621
622 * ctf-impl.h (ctf_file_t): New field ctf_openflags.
623 * ctf-open.c (ctf_bufopen): Set it. No longer dump header offsets.
624 * ctf-dump.c (dump_header): New function, dump the CTF header.
625 (ctf_dump): Call it.
626 (ctf_dump_header_strfield): New function.
627 (ctf_dump_header_sectfield): Likewise.
628
fd55eae8
NA
6292019-07-06 Nick Alcock <nick.alcock@oracle.com>
630
631 * ctf-impl.h (ctf_file_t): New fields ctf_header, ctf_dynbase,
632 ctf_cuname, ctf_dyncuname: ctf_base and ctf_buf are no longer const.
633 * ctf-open.c (ctf_set_base): Preserve the gap between ctf_buf and
634 ctf_base: do not assume that it is always sizeof (ctf_header_t).
635 Print out ctf_cuname: only print out ctf_parname if set.
636 (ctf_free_base): Removed, ctf_base is no longer freed: free
637 ctf_dynbase instead.
638 (ctf_set_version): Fix spacing.
639 (upgrade_header): New, in-place header upgrading.
640 (upgrade_types): Rename to...
641 (upgrade_types_v1): ... this. Free ctf_dynbase, not ctf_base. No
642 longer track old and new headers separately. No longer allow for
643 header sizes explicitly: squeeze the headers out on upgrade (they
644 are preserved in fp->ctf_header). Set ctf_dynbase, ctf_base and
645 ctf_buf explicitly. Use ctf_free, not ctf_free_base.
646 (upgrade_types): New, also handle ctf_parmax updating.
647 (flip_header): Flip ctf_cuname.
648 (flip_types): Flip BUF explicitly rather than deriving BUF from
649 BASE.
650 (ctf_bufopen): Store the header in fp->ctf_header. Correct minimum
651 required alignment of objtoff and funcoff. No longer store it in
652 the ctf_buf unless that buf is derived unmodified from the input.
653 Set ctf_dynbase where ctf_base is dynamically allocated. Drop locals
654 that duplicate fields in ctf_file: move allocation of ctf_file
655 further up instead. Call upgrade_header as needed. Move
656 version-specific ctf_parmax initialization into upgrade_types. More
657 concise error handling.
658 (ctf_file_close): No longer test for null pointers before freeing.
659 Free ctf_dyncuname, ctf_dynbase, and ctf_header. Do not call
660 ctf_free_base.
661 (ctf_cuname): New.
662 (ctf_cuname_set): New.
663 * ctf-create.c (ctf_update): Populate ctf_cuname.
664 (ctf_gzwrite): Write out the header explicitly. Remove obsolescent
665 comment.
666 (ctf_write): Likewise.
667 (ctf_compress_write): Get the header from ctf_header, not ctf_base.
668 Fix the compression length: fp->ctf_size never counted the CTF
669 header. Simplify the compress call accordingly.
670
a2230b5e
HPN
6712019-07-11 Hans-Peter Nilsson <hp@bitrange.com>
672
673 * ctf-endian.h: Don't assume htole64 and le64toh are always
674 present if HAVE_ENDIAN_H; also check if htole64 is defined.
675 [!WORDS_BIGENDIAN] (htole64, le64toh): Define as identity,
676 not bswap_identity_64.
677
fd361982
AM
6782019-09-18 Alan Modra <amodra@gmail.com>
679
680 * ctf-open-bfd.c: Update throughout for bfd section macro changes.
681
60391a25
PB
6822019-09-09 Phil Blundell <pb@pbcl.net>
683
684 binutils 2.33 branch created.
685
12a0b67d
NA
6862019-07-18 Nick Alcock <nick.alcock@oracle.com>
687
688 * ctf-types.c (ctf_type_aname_raw): New.
689 (ctf_func_type_info): Likewise.
690 (ctf_func_type_args): Likewise.
691 * ctf-error.c (_ctf_errlist): Fix description.
692 * ctf-lookup.c: Fix file description.
693
083114f8 6942019-06-28 Nick Alcock <nick.alcock@oracle.com>
f57cf0e3
NA
695
696 * ctf-create.c (ctf_create): Fix off-by-one error.
697
083114f8 6982019-06-28 Nick Alcock <nick.alcock@oracle.com>
f5e9c9bd
NA
699
700 * ctf-impl.h: (struct ctf_strs_writable): New, non-const version of
701 struct ctf_strs.
702 (struct ctf_dtdef): Note that dtd_data.ctt_name is unpopulated.
703 (struct ctf_str_atom): New, disambiguated single string.
704 (struct ctf_str_atom_ref): New, points to some other location that
705 references this string's offset.
706 (struct ctf_file): New members ctf_str_atoms and ctf_str_num_refs.
707 Remove member ctf_dtvstrlen: we no longer track the total strlen
708 as we add strings.
709 (ctf_str_create_atoms): Declare new function in ctf-string.c.
710 (ctf_str_free_atoms): Likewise.
711 (ctf_str_add): Likewise.
712 (ctf_str_add_ref): Likewise.
713 (ctf_str_rollback): Likewise.
714 (ctf_str_purge_refs): Likewise.
715 (ctf_str_write_strtab): Likewise.
716 (ctf_realloc): Declare new function in ctf-util.c.
717
718 * ctf-open.c (ctf_bufopen): Create the atoms table.
719 (ctf_file_close): Destroy it.
720 * ctf-create.c (ctf_update): Copy-and-free it on update. No longer
721 special-case the position of the parname string. Construct the
722 strtab by calling ctf_str_add_ref and ctf_str_write_strtab after the
723 rest of each buffer element is constructed, not via open-coding:
724 realloc the CTF buffer and append the strtab to it. No longer
725 maintain ctf_dtvstrlen. Sort the variable entry table later, after
726 strtab construction.
727 (ctf_copy_membnames): Remove: integrated into ctf_copy_{s,l,e}members.
728 (ctf_copy_smembers): Drop the string offset: call ctf_str_add_ref
729 after buffer element construction instead.
730 (ctf_copy_lmembers): Likewise.
731 (ctf_copy_emembers): Likewise.
732 (ctf_create): No longer maintain the ctf_dtvstrlen.
733 (ctf_dtd_delete): Likewise.
734 (ctf_dvd_delete): Likewise.
735 (ctf_add_generic): Likewise.
736 (ctf_add_enumerator): Likewise.
737 (ctf_add_member_offset): Likewise.
738 (ctf_add_variable): Likewise.
739 (membadd): Likewise.
740 * ctf-util.c (ctf_realloc): New, wrapper around realloc that aborts
741 if there are active ctf_str_num_refs.
742 (ctf_strraw): Move to ctf-string.c.
743 (ctf_strptr): Likewise.
744 * ctf-string.c: New file, strtab manipulation.
745
746 * Makefile.am (libctf_a_SOURCES): Add it.
747 * Makefile.in: Regenerate.
748
083114f8 7492019-06-28 Nick Alcock <nick.alcock@oracle.com>
9658dc39
NA
750
751 * ctf-impl.h (ctf_hash_iter_f): New.
752 (ctf_dynhash_iter): New declaration.
753 (ctf_dynhash_iter_remove): New declaration.
754 * ctf-hash.c (ctf_dynhash_iter): Define.
755 (ctf_dynhash_iter_remove): Likewise.
756 (ctf_hashtab_traverse): New.
757 (ctf_hashtab_traverse_remove): Likewise.
758 (struct ctf_traverse_cb_arg): Likewise.
759 (struct ctf_traverse_remove_cb_arg): Likewise.
760
083114f8 7612019-06-28 Nick Alcock <nick.alcock@oracle.com>
3e10cffc
NA
762
763 * ctf-hash.c (ctf_dynhash_remove): Call with a mocked-up element.
764
083114f8 7652019-06-28 Nick Alcock <nick.alcock@oracle.com>
c550e7ba
NA
766
767 * ctf-dump.c (ctf_dump_format_type): Prefix hex strings with 0x.
768 (ctf_dump_funcs): Likewise.
769
083114f8 7702019-06-19 Nick Alcock <nick.alcock@oracle.com>
cf02c44d
NA
771
772 * ctf-open-bfd.c: Add swap.h and ctf-endian.h.
773 (ctf_fdopen): Check for endian-swapped raw CTF magic, and
774 little-endian CTF archive magic. Do not check the CTF version:
775 ctf_simple_open does that in endian-safe ways. Do not dereference
776 null pointers on open failure.
777
083114f8 7782019-06-19 Nick Alcock <nick.alcock@oracle.com>
7cee1826
NA
779
780 * ctf-open.c (get_vbytes_common): Return the new slice size.
781 (ctf_bufopen): Flip the endianness of the CTF-section header copy.
782 Remember to copy in the CTF data when opening an uncompressed
783 foreign-endian CTF file. Prune useless variable manipulation.
784
083114f8 7852019-06-19 Nick Alcock <nick.alcock@oracle.com>
0b4fa56e
NA
786
787 * ctf-open.c (ctf_types): Fail when unidentified type kinds are
788 seen.
789
083114f8 7902019-06-19 Nick Alcock <nick.alcock@oracle.com>
364620bf
NA
791
792 * ctf-open.c (ctf_bufopen): Dump header offsets into the debugging
793 output.
794
083114f8 7952019-06-19 Nick Alcock <nick.alcock@oracle.com>
65365aa8
NA
796
797 * ctf-subr.c (_PAGESIZE): Remove.
798 (ctf_data_alloc): Likewise.
799 (ctf_data_free): Likewise.
800 (ctf_data_protect): Likewise.
801 * ctf-impl.h: Remove declarations.
802 * ctf-create.c (ctf_update): No longer call ctf_data_protect: use
803 ctf_free, not ctf_data_free.
804 (ctf_compress_write): Use ctf_data_alloc, not ctf_alloc. Free
805 the buffer again on compression error.
806 * ctf-open.c (ctf_set_base): No longer track the size: call
807 ctf_free, not ctf_data_free.
808 (upgrade_types): Likewise. Call ctf_alloc, not ctf_data_alloc.
809 (ctf_bufopen): Likewise. No longer call ctf_data_protect.
810
083114f8 8112019-06-19 Nick Alcock <nick.alcock@oracle.com>
24865428
NA
812
813 * ctf-create.c (ctf_dtd_insert): Pass on error returns from
814 ctf_dynhash_insert.
815 (ctf_dvd_insert): Likewise.
816 (ctf_add_generic): Likewise.
817 (ctf_add_variable): Likewise.
818 * ctf-impl.h: Adjust declarations.
819
3a3a077c
AM
8202019-06-14 Alan Modra <amodra@gmail.com>
821
822 * configure: Regenerate.
823
942d35f7
NA
8242019-06-06 Nick Alcock <nick.alcock@oracle.com>
825
826 * ctf-decls.h: Include <libiberty.h>.
827 * ctf-lookup.c (ctf_lookup_by_name): Call xstrndup(), not strndup().
828
595a4d43
NA
8292019-06-06 Nick Alcock <nick.alcock@oracle.com>
830
831 * ctf-dump.c (ctf_dump_format_type): Cast size_t's used in printf()s.
832 (ctf_dump_objts): Likewise.
833 (ctf_dump_funcs): Likewise.
834 (ctf_dump_member): Likewise.
835 (ctf_dump_str): Likewise.
836
f5e73be1
NA
8372019-06-06 Nick Alcock <nick.alcock@oracle.com>
838
839 * ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
840 * ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.
841
62d8e3b7
NA
8422019-06-05 Nick Alcock <nick.alcock@oracle.com>
843
844 * ctf-archive.c (ctf_arc_write): Eschew %zi format specifier.
845 (ctf_arc_open_by_offset): Likewise.
846 * ctf-create.c (ctf_add_type): Likewise.
847
76fad999
TT
8482019-06-04 Tom Tromey <tromey@adacore.com>
849
850 * ctf-create.c (ctf_add_encoded, ctf_add_slice)
851 (ctf_add_member_offset): Use CHAR_BIT, not NBBY.
852
ad118caa
NA
8532019-06-04 Nick Alcock <nick.alcock@oracle.com>
854
855 * configure.ac: Check for O_CLOEXEC.
856 * ctf-decls.h (O_CLOEXEC): Define (to 0), if need be.
857 * config.h.in: Regenerate.
858 * configure: Likewise.
859
6b22174f
NA
8602019-06-04 Nick Alcock <nick.alcock@oracle.com>
861
862 * qsort_r.c: Rename to...
863 * ctf-qsort_r.c: ... this.
864 (_quicksort): Define to ctf_qsort_r.
865 * ctf-decls.h (qsort_r): Remove.
866 (ctf_qsort_r): Add.
867 (struct ctf_qsort_arg): New, transport the real ARG and COMPAR.
868 (ctf_qsort_compar_thunk): Rearrange the arguments to COMPAR.
869 * Makefile.am (libctf_a_LIBADD): Remove.
870 (libctf_a_SOURCES): New, add ctf-qsort_r.c.
871 * ctf-archive.c (ctf_arc_write): Call ctf_qsort_r, not qsort_r.
872 * ctf-create.c (ctf_update): Likewise.
873 * configure.ac: Check for BSD versus GNU qsort_r signature.
874 * Makefile.in: Regenerate.
875 * config.h.in: Likewise.
876 * configure: Likewise.
877
941accce
NA
8782019-06-03 Nick Alcock <nick.alcock@oracle.com>
879
880 * ctf-dump.c (ctf_dump_funcs): Free in the right place.
881
a0486bac
JM
8822019-05-29 Nick Alcock <nick.alcock@oracle.com>
883
884 * Makefile.am (ZLIB): New.
885 (ZLIBINC): Likewise.
886 (AM_CFLAGS): Use them.
887 (libctf_a_LIBADD): New, for LIBOBJS.
888 * configure.ac: Check for zlib, endian.h, and qsort_r.
889 * ctf-endian.h: New, providing htole64 and le64toh.
890 * swap.h: Code style fixes.
891 (bswap_identity_64): New.
892 * qsort_r.c: New, from gnulib (with one added #include).
893 * ctf-decls.h: New, providing a conditional qsort_r declaration,
894 and unconditional definitions of MIN and MAX.
895 * ctf-impl.h: Use it. Do not use <sys/errno.h>.
896 (ctf_set_errno): Now returns unsigned long.
897 * ctf-util.c (ctf_set_errno): Adjust here too.
898 * ctf-archive.c: Use ctf-endian.h.
899 (ctf_arc_open_by_offset): Use memset, not bzero. Drop cts_type,
900 cts_flags and cts_offset.
901 (ctf_arc_write): Drop debugging dependent on the size of off_t.
902 * ctf-create.c: Provide a definition of roundup if not defined.
903 (ctf_create): Drop cts_type, cts_flags and cts_offset.
904 (ctf_add_reftype): Do not check if type IDs are below zero.
905 (ctf_add_slice): Likewise.
906 (ctf_add_typedef): Likewise.
907 (ctf_add_member_offset): Cast error-returning ssize_t's to size_t
908 when known error-free. Drop CTF_ERR usage for functions returning
909 int.
910 (ctf_add_member_encoded): Drop CTF_ERR usage for functions returning
911 int.
912 (ctf_add_variable): Likewise.
913 (enumcmp): Likewise.
914 (enumadd): Likewise.
915 (membcmp): Likewise.
916 (ctf_add_type): Likewise. Cast error-returning ssize_t's to size_t
917 when known error-free.
918 * ctf-dump.c (ctf_is_slice): Drop CTF_ERR usage for functions
919 returning int: use CTF_ERR for functions returning ctf_type_id.
920 (ctf_dump_label): Likewise.
921 (ctf_dump_objts): Likewise.
922 * ctf-labels.c (ctf_label_topmost): Likewise.
923 (ctf_label_iter): Likewise.
924 (ctf_label_info): Likewise.
925 * ctf-lookup.c (ctf_func_args): Likewise.
926 * ctf-open.c (upgrade_types): Cast to size_t where appropriate.
927 (ctf_bufopen): Likewise. Use zlib types as needed.
928 * ctf-types.c (ctf_member_iter): Drop CTF_ERR usage for functions
929 returning int.
930 (ctf_enum_iter): Likewise.
931 (ctf_type_size): Likewise.
932 (ctf_type_align): Likewise. Cast to size_t where appropriate.
933 (ctf_type_kind_unsliced): Likewise.
934 (ctf_type_kind): Likewise.
935 (ctf_type_encoding): Likewise.
936 (ctf_member_info): Likewise.
937 (ctf_array_info): Likewise.
938 (ctf_enum_value): Likewise.
939 (ctf_type_rvisit): Likewise.
940 * ctf-open-bfd.c (ctf_bfdopen): Drop cts_type, cts_flags and
941 cts_offset.
942 (ctf_simple_open): Likewise.
943 (ctf_bfdopen_ctfsect): Likewise. Set cts_size properly.
944 * Makefile.in: Regenerate.
945 * aclocal.m4: Likewise.
946 * config.h: Likewise.
947 * configure: Likewise.
948
9698cf9b
NA
9492019-05-28 Nick Alcock <nick.alcock@oracle.com>
950
951 * configure.in: Check for bfd_section_from_elf_index.
952 * configure: Regenerate.
953 * config.h.in [HAVE_BFD_ELF]: Likewise.
954 * libctf/ctf_open_bfd (ctf_bfdopen_ctfsect): Use it.
955 abfd is potentially unused now.
956
0e65dfba
NA
9572019-05-28 Nick Alcock <nick.alcock@oracle.com>
958
959 * Makefile.am: New.
960 * Makefile.in: Regenerated.
961 * config.h.in: Likewise.
962 * aclocal.m4: Likewise.
963 * configure: Likewise.
964
a30b3e18
NA
9652019-05-28 Nick Alcock <nick.alcock@oracle.com>
966
967 * ctf-dump.c: New.
968
6dbf2b73
NA
9692019-05-28 Nick Alcock <nick.alcock@oracle.com>
970
971 * ctf-labels.c: New.
972
6c33b742
NA
9732019-05-28 Nick Alcock <nick.alcock@oracle.com>
974
975 * ctf-impl.h (_libctf_version): New declaration.
976 * ctf-subr.c (_libctf_version): Define it.
977 (ctf_version): New.
978
c499eb68
NA
9792019-05-28 Nick Alcock <nick.alcock@oracle.com>
980
981 * ctf-create.c (enumcmp): New.
982 (enumadd): Likewise.
983 (membcmp): Likewise.
984 (membadd): Likewise.
985 (ctf_add_type): Likewise.
986
b437bfe0
NA
9872019-05-28 Nick Alcock <nick.alcock@oracle.com>
988
989 * ctf-lookup.c (isqualifier): New.
990 (ctf_lookup_by_name): Likewise.
991 (struct ctf_lookup_var_key): Likewise.
992 (ctf_lookup_var): Likewise.
993 (ctf_lookup_variable): Likewise.
994 (ctf_lookup_symbol_name): Likewise.
995 (ctf_lookup_by_symbol): Likewise.
996 (ctf_func_info): Likewise.
997 (ctf_func_args): Likewise.
998
316afdb1
NA
9992019-05-28 Nick Alcock <nick.alcock@oracle.com>
1000
1001 * ctf-decl.c: New file.
1002 * ctf-types.c: Likewise.
1003 * ctf-impl.h: New declarations.
1004
143dce84
NA
10052019-05-28 Nick Alcock <nick.alcock@oracle.com>
1006
1007 * ctf-open-bfd.c: New file.
1008 * ctf-open.c (ctf_close): New.
1009 * ctf-impl.h: Include bfd.h.
1010 (ctf_file): New members ctf_data_mmapped, ctf_data_mmapped_len.
1011 (ctf_archive_internal): New members ctfi_abfd, ctfi_data,
1012 ctfi_bfd_close.
1013 (ctf_bfdopen_ctfsect): New declaration.
1014 (_CTF_SECTION): likewise.
1015
9402cc59
NA
10162019-05-28 Nick Alcock <nick.alcock@oracle.com>
1017
1018 * ctf-archive.c: New.
1019 * ctf-impl.h (ctf_archive_internal): New type.
1020 (ctf_arc_open_internal): New declaration.
1021 (ctf_arc_bufopen): Likewise.
1022 (ctf_arc_close_internal): Likewise.
1023
72f33921
NA
10242019-05-28 Nick Alcock <nick.alcock@oracle.com>
1025
1026 * ctf-open.c: New file.
1027 * swap.h: Likewise.
1028
47d546f4
NA
10292019-05-28 Nick Alcock <nick.alcock@oracle.com>
1030
1031 * ctf-create.c: New file.
1032 * ctf-lookup.c: New file.
1033
a5be9bbe
NA
10342019-05-28 Nick Alcock <nick.alcock@oracle.com>
1035
1036 * ctf-impl.h: New definitions and declarations for type creation
1037 and lookup.
1038
c0754cdd
NA
10392019-05-28 Nick Alcock <nick.alcock@oracle.com>
1040
1041 * ctf-hash.c: New file.
1042 * ctf-impl.h: New declarations.
1043
479604f4
NA
10442019-05-28 Nick Alcock <nick.alcock@oracle.com>
1045
1046 * ctf-error.c: New file.
1047
94585e7f
NA
10482019-05-28 Nick Alcock <nick.alcock@oracle.com>
1049
1050 * ctf-util.c: New file.
1051 * elf.h: Likewise.
1052 * ctf-impl.h: Include it, and add declarations.
1053
60da9d95
NA
10542019-05-28 Nick Alcock <nick.alcock@oracle.com>
1055
1056 * ctf-impl.h: New file.
1057 * ctf-subr.c: New file.
1058
1059\f
1060Local Variables:
1061mode: change-log
1062left-margin: 8
1063fill-column: 76
1064version-control: never
1065End:
This page took 0.123126 seconds and 4 git commands to generate.