libctf: actually close bfds we have opened
[deliverable/binutils-gdb.git] / libctf / ChangeLog
1 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-archive.c (ctf_arc_close): Call ctfi_bfd_close if set.
4 * ctf-open-bfd.c (ctf_bfdclose): Fix comment.
5
6 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
7
8 * ctf-open-bfd.c (ctf_fdopen): Call bfd_set_cacheable.
9
10 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
11
12 * ctf-impl.h (includes): Include <sys/param.h> here.
13
14 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
15
16 * ctf-open.c (flip_lbls): Eschew for-loop initial declarations.
17 (flip_objts): Likewise.
18 (flip_vars): Likewise.
19 (flip_types): Likewise.
20
21 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
22
23 * ctf-hash.c (ctf_hashtab_insert): Pass in the key and value
24 freeing functions: if set, free the key and value if the slot
25 already exists. Always reassign the key.
26 (ctf_dynhash_insert): Adjust call appropriately.
27 (ctf_hash_insert_type): Likewise.
28
29 2019-08-03 Nick Alcock <nick.alcock@oracle.com>
30
31 * ctf-create.c (ctf_add_type): Look up and use the forwarded-to
32 type kind. Allow forwards to unify with pre-existing structs/
33 unions/enums.
34
35 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
36
37 * ctf-impl.h (ctf_file_t) <ctf_link_cu_mappping>: New.
38 <ctf_link_memb_name_changer>: Likewise.
39 <ctf_link_memb_name_changer_arg>: Likewise.
40 * ctf-create.c (ctf_update): Update accordingly.
41 * ctf-open.c (ctf_file_close): Likewise.
42 * ctf-link.c (ctf_create_per_cu): Apply the cu mapping.
43 (ctf_link_add_cu_mapping): New.
44 (ctf_link_set_memb_name_changer): Likewise.
45 (ctf_change_parent_name): New.
46 (ctf_name_list_accum_cb_arg_t) <dynames>: New, storage for names
47 allocated by the caller's ctf_link_memb_name_changer.
48 <ndynames>: Likewise.
49 (ctf_accumulate_archive_names): Call the ctf_link_memb_name_changer.
50 (ctf_link_write): Likewise (for _CTF_SECTION only): also call
51 ctf_change_parent_name. Free any resulting names.
52
53 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
54
55 * ctf-link.c (ctf_create_per_cu): New, refactored out of...
56 (ctf_link_one_type): ... here, with parent-name setting added.
57 (check_variable): New.
58 (ctf_link_one_variable): Likewise.
59 (ctf_link_one_input_archive_member): Call it.
60 * ctf-error.c (_ctf_errlist): Updated with new errors.
61
62 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
63
64 * ctf-impl.h (ctf_file_t): New field ctf_link_type_mapping.
65 (struct ctf_link_type_mapping_key): New.
66 (ctf_hash_type_mapping_key): Likewise.
67 (ctf_hash_eq_type_mapping_key): Likewise.
68 (ctf_add_type_mapping): Likewise.
69 (ctf_type_mapping): Likewise.
70 (ctf_dynhash_empty): Likewise.
71 * ctf-open.c (ctf_file_close): Update accordingly.
72 * ctf-create.c (ctf_update): Likewise.
73 (ctf_add_type): Populate the mapping.
74 * ctf-hash.c (ctf_hash_type_mapping_key): Hash a type mapping key.
75 (ctf_hash_eq_type_mapping_key): Check the key for equality.
76 (ctf_dynhash_insert): Fix comment typo.
77 (ctf_dynhash_empty): New.
78 * ctf-link.c (ctf_add_type_mapping): New.
79 (ctf_type_mapping): Likewise.
80 (empty_link_type_mapping): New.
81 (ctf_link_one_input_archive): Call it.
82
83 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
84
85 * ctf-link.c: New file, linking of the string and type sections.
86 * Makefile.am (libctf_a_SOURCES): Add it.
87 * Makefile.in: Regenerate.
88
89 * ctf-impl.h (ctf_file_t): New fields ctf_link_inputs,
90 ctf_link_outputs.
91 * ctf-create.c (ctf_update): Update accordingly.
92 * ctf-open.c (ctf_file_close): Likewise.
93 * ctf-error.c (_ctf_errlist): Updated with new errors.
94
95 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
96
97 * ctf-dump.c (ctf_dump_funcs): Check the right error value.
98
99 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
100
101 * ctf-dump.c (ctf_dump): Use ctf_type_iter_all to dump types, not
102 ctf_type_iter.
103 (ctf_dump_type): Pass down the flag from ctf_type_iter_all.
104 (ctf_dump_format_type): Add non-root-type { } notation.
105 Add root flag to prototype.
106 (ctf_dump_label): Adjust accordingly.
107 (ctf_dump_objts): Likewise.
108 (ctf_dump_var): Likewise.
109
110 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
111
112 * ctf-create.c (ctf_compress_write): Fix double-free.
113
114 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
115
116 * ctf-archive.c (ctf_arc_write): Split off, and reimplement in terms
117 of...
118 (ctf_arc_write_fd): ... this new function.
119 * ctf-create.c (ctf_write_mem): New.
120
121 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
122
123 * ctf-impl.h (ctf_str_atom_t) <csa_offset>: New field.
124 (ctf_file_t) <ctf_syn_ext_strtab>: Likewise.
125 (ctf_str_add_ref): Name the last arg.
126 (ctf_str_add_external) New.
127 (ctf_str_add_strraw_explicit): Likewise.
128 (ctf_simple_open_internal): Likewise.
129 (ctf_bufopen_internal): Likewise.
130
131 * ctf-string.c (ctf_strraw_explicit): Split from...
132 (ctf_strraw): ... here, with new support for ctf_syn_ext_strtab.
133 (ctf_str_add_ref_internal): Return the atom, not the
134 string.
135 (ctf_str_add): Adjust accordingly.
136 (ctf_str_add_ref): Likewise. Move up in the file.
137 (ctf_str_add_external): New: update the csa_offset.
138 (ctf_str_count_strtab): Only account for strings with no csa_offset
139 in the internal strtab length.
140 (ctf_str_write_strtab): If the csa_offset is set, update the
141 string's refs without writing the string out, and update the
142 ctf_syn_ext_strtab. Make OOM handling less ugly.
143 * ctf-create.c (struct ctf_sort_var_arg_cb): New.
144 (ctf_update): Handle failure to populate the strtab. Pass in the
145 new ctf_sort_var arg. Adjust for ctf_syn_ext_strtab addition.
146 Call ctf_simple_open_internal, not ctf_simple_open.
147 (ctf_sort_var): Call ctf_strraw_explicit rather than looking up
148 strings by hand.
149 * ctf-hash.c (ctf_hash_insert_type): Likewise (but using
150 ctf_strraw). Adjust to diagnose ECTF_STRTAB nonetheless.
151 * ctf-open.c (init_types): No longer filter out ECTF_STRTAB.
152 (ctf_file_close): Destroy the ctf_syn_ext_strtab.
153 (ctf_simple_open): Rename to, and reimplement as a wrapper around...
154 (ctf_simple_open_internal): ... this new function, which calls
155 ctf_bufopen_internal.
156 (ctf_bufopen): Rename to, and reimplement as a wrapper around...
157 (ctf_bufopen_internal): ... this new function, which sets
158 ctf_syn_ext_strtab.
159
160 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
161
162 * ctf_types.c (ctf_type_iter_all): New.
163
164 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
165
166 * ctf-open.c (init_symtab): Check for overflow against the right
167 section.
168 (upgrade_header): Set cth_objtidxoff, cth_funcidxoff to zero-length.
169 (upgrade_types_v1): Note that these sections are not checked.
170 (flip_header): Endian-swap the header fields.
171 (flip_ctf): Endian-swap the sections.
172 (flip_objts): Update comment.
173 (ctf_bufopen): Check header offsets and alignment for validity.
174
175 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
176
177 * ctf-open-bfd.c: Add <assert.h>.
178 (ctf_bfdopen_ctfsect): Open string and symbol tables using
179 techniques borrowed from bfd_elf_sym_name.
180 (ctf_new_archive_internal): Improve comment.
181 * ctf-archive.c (ctf_arc_close): Do not free the ctfi_strsect.
182 * ctf-open.c (ctf_bufopen): Allow opening with a string section but
183 no symbol section, but not vice versa.
184
185 2019-07-08 Nick Alcock <nick.alcock@oracle.com>
186
187 * ctf-impl.h (ctf_file_t): New field ctf_openflags.
188 * ctf-open.c (ctf_bufopen): Set it. No longer dump header offsets.
189 * ctf-dump.c (dump_header): New function, dump the CTF header.
190 (ctf_dump): Call it.
191 (ctf_dump_header_strfield): New function.
192 (ctf_dump_header_sectfield): Likewise.
193
194 2019-07-06 Nick Alcock <nick.alcock@oracle.com>
195
196 * ctf-impl.h (ctf_file_t): New fields ctf_header, ctf_dynbase,
197 ctf_cuname, ctf_dyncuname: ctf_base and ctf_buf are no longer const.
198 * ctf-open.c (ctf_set_base): Preserve the gap between ctf_buf and
199 ctf_base: do not assume that it is always sizeof (ctf_header_t).
200 Print out ctf_cuname: only print out ctf_parname if set.
201 (ctf_free_base): Removed, ctf_base is no longer freed: free
202 ctf_dynbase instead.
203 (ctf_set_version): Fix spacing.
204 (upgrade_header): New, in-place header upgrading.
205 (upgrade_types): Rename to...
206 (upgrade_types_v1): ... this. Free ctf_dynbase, not ctf_base. No
207 longer track old and new headers separately. No longer allow for
208 header sizes explicitly: squeeze the headers out on upgrade (they
209 are preserved in fp->ctf_header). Set ctf_dynbase, ctf_base and
210 ctf_buf explicitly. Use ctf_free, not ctf_free_base.
211 (upgrade_types): New, also handle ctf_parmax updating.
212 (flip_header): Flip ctf_cuname.
213 (flip_types): Flip BUF explicitly rather than deriving BUF from
214 BASE.
215 (ctf_bufopen): Store the header in fp->ctf_header. Correct minimum
216 required alignment of objtoff and funcoff. No longer store it in
217 the ctf_buf unless that buf is derived unmodified from the input.
218 Set ctf_dynbase where ctf_base is dynamically allocated. Drop locals
219 that duplicate fields in ctf_file: move allocation of ctf_file
220 further up instead. Call upgrade_header as needed. Move
221 version-specific ctf_parmax initialization into upgrade_types. More
222 concise error handling.
223 (ctf_file_close): No longer test for null pointers before freeing.
224 Free ctf_dyncuname, ctf_dynbase, and ctf_header. Do not call
225 ctf_free_base.
226 (ctf_cuname): New.
227 (ctf_cuname_set): New.
228 * ctf-create.c (ctf_update): Populate ctf_cuname.
229 (ctf_gzwrite): Write out the header explicitly. Remove obsolescent
230 comment.
231 (ctf_write): Likewise.
232 (ctf_compress_write): Get the header from ctf_header, not ctf_base.
233 Fix the compression length: fp->ctf_size never counted the CTF
234 header. Simplify the compress call accordingly.
235
236 2019-07-11 Hans-Peter Nilsson <hp@bitrange.com>
237
238 * ctf-endian.h: Don't assume htole64 and le64toh are always
239 present if HAVE_ENDIAN_H; also check if htole64 is defined.
240 [!WORDS_BIGENDIAN] (htole64, le64toh): Define as identity,
241 not bswap_identity_64.
242
243 2019-09-18 Alan Modra <amodra@gmail.com>
244
245 * ctf-open-bfd.c: Update throughout for bfd section macro changes.
246
247 2019-09-09 Phil Blundell <pb@pbcl.net>
248
249 binutils 2.33 branch created.
250
251 2019-07-18 Nick Alcock <nick.alcock@oracle.com>
252
253 * ctf-types.c (ctf_type_aname_raw): New.
254 (ctf_func_type_info): Likewise.
255 (ctf_func_type_args): Likewise.
256 * ctf-error.c (_ctf_errlist): Fix description.
257 * ctf-lookup.c: Fix file description.
258
259 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
260
261 * ctf-create.c (ctf_create): Fix off-by-one error.
262
263 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
264
265 * ctf-impl.h: (struct ctf_strs_writable): New, non-const version of
266 struct ctf_strs.
267 (struct ctf_dtdef): Note that dtd_data.ctt_name is unpopulated.
268 (struct ctf_str_atom): New, disambiguated single string.
269 (struct ctf_str_atom_ref): New, points to some other location that
270 references this string's offset.
271 (struct ctf_file): New members ctf_str_atoms and ctf_str_num_refs.
272 Remove member ctf_dtvstrlen: we no longer track the total strlen
273 as we add strings.
274 (ctf_str_create_atoms): Declare new function in ctf-string.c.
275 (ctf_str_free_atoms): Likewise.
276 (ctf_str_add): Likewise.
277 (ctf_str_add_ref): Likewise.
278 (ctf_str_rollback): Likewise.
279 (ctf_str_purge_refs): Likewise.
280 (ctf_str_write_strtab): Likewise.
281 (ctf_realloc): Declare new function in ctf-util.c.
282
283 * ctf-open.c (ctf_bufopen): Create the atoms table.
284 (ctf_file_close): Destroy it.
285 * ctf-create.c (ctf_update): Copy-and-free it on update. No longer
286 special-case the position of the parname string. Construct the
287 strtab by calling ctf_str_add_ref and ctf_str_write_strtab after the
288 rest of each buffer element is constructed, not via open-coding:
289 realloc the CTF buffer and append the strtab to it. No longer
290 maintain ctf_dtvstrlen. Sort the variable entry table later, after
291 strtab construction.
292 (ctf_copy_membnames): Remove: integrated into ctf_copy_{s,l,e}members.
293 (ctf_copy_smembers): Drop the string offset: call ctf_str_add_ref
294 after buffer element construction instead.
295 (ctf_copy_lmembers): Likewise.
296 (ctf_copy_emembers): Likewise.
297 (ctf_create): No longer maintain the ctf_dtvstrlen.
298 (ctf_dtd_delete): Likewise.
299 (ctf_dvd_delete): Likewise.
300 (ctf_add_generic): Likewise.
301 (ctf_add_enumerator): Likewise.
302 (ctf_add_member_offset): Likewise.
303 (ctf_add_variable): Likewise.
304 (membadd): Likewise.
305 * ctf-util.c (ctf_realloc): New, wrapper around realloc that aborts
306 if there are active ctf_str_num_refs.
307 (ctf_strraw): Move to ctf-string.c.
308 (ctf_strptr): Likewise.
309 * ctf-string.c: New file, strtab manipulation.
310
311 * Makefile.am (libctf_a_SOURCES): Add it.
312 * Makefile.in: Regenerate.
313
314 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
315
316 * ctf-impl.h (ctf_hash_iter_f): New.
317 (ctf_dynhash_iter): New declaration.
318 (ctf_dynhash_iter_remove): New declaration.
319 * ctf-hash.c (ctf_dynhash_iter): Define.
320 (ctf_dynhash_iter_remove): Likewise.
321 (ctf_hashtab_traverse): New.
322 (ctf_hashtab_traverse_remove): Likewise.
323 (struct ctf_traverse_cb_arg): Likewise.
324 (struct ctf_traverse_remove_cb_arg): Likewise.
325
326 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
327
328 * ctf-hash.c (ctf_dynhash_remove): Call with a mocked-up element.
329
330 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
331
332 * ctf-dump.c (ctf_dump_format_type): Prefix hex strings with 0x.
333 (ctf_dump_funcs): Likewise.
334
335 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
336
337 * ctf-open-bfd.c: Add swap.h and ctf-endian.h.
338 (ctf_fdopen): Check for endian-swapped raw CTF magic, and
339 little-endian CTF archive magic. Do not check the CTF version:
340 ctf_simple_open does that in endian-safe ways. Do not dereference
341 null pointers on open failure.
342
343 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
344
345 * ctf-open.c (get_vbytes_common): Return the new slice size.
346 (ctf_bufopen): Flip the endianness of the CTF-section header copy.
347 Remember to copy in the CTF data when opening an uncompressed
348 foreign-endian CTF file. Prune useless variable manipulation.
349
350 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
351
352 * ctf-open.c (ctf_types): Fail when unidentified type kinds are
353 seen.
354
355 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
356
357 * ctf-open.c (ctf_bufopen): Dump header offsets into the debugging
358 output.
359
360 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
361
362 * ctf-subr.c (_PAGESIZE): Remove.
363 (ctf_data_alloc): Likewise.
364 (ctf_data_free): Likewise.
365 (ctf_data_protect): Likewise.
366 * ctf-impl.h: Remove declarations.
367 * ctf-create.c (ctf_update): No longer call ctf_data_protect: use
368 ctf_free, not ctf_data_free.
369 (ctf_compress_write): Use ctf_data_alloc, not ctf_alloc. Free
370 the buffer again on compression error.
371 * ctf-open.c (ctf_set_base): No longer track the size: call
372 ctf_free, not ctf_data_free.
373 (upgrade_types): Likewise. Call ctf_alloc, not ctf_data_alloc.
374 (ctf_bufopen): Likewise. No longer call ctf_data_protect.
375
376 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
377
378 * ctf-create.c (ctf_dtd_insert): Pass on error returns from
379 ctf_dynhash_insert.
380 (ctf_dvd_insert): Likewise.
381 (ctf_add_generic): Likewise.
382 (ctf_add_variable): Likewise.
383 * ctf-impl.h: Adjust declarations.
384
385 2019-06-14 Alan Modra <amodra@gmail.com>
386
387 * configure: Regenerate.
388
389 2019-06-06 Nick Alcock <nick.alcock@oracle.com>
390
391 * ctf-decls.h: Include <libiberty.h>.
392 * ctf-lookup.c (ctf_lookup_by_name): Call xstrndup(), not strndup().
393
394 2019-06-06 Nick Alcock <nick.alcock@oracle.com>
395
396 * ctf-dump.c (ctf_dump_format_type): Cast size_t's used in printf()s.
397 (ctf_dump_objts): Likewise.
398 (ctf_dump_funcs): Likewise.
399 (ctf_dump_member): Likewise.
400 (ctf_dump_str): Likewise.
401
402 2019-06-06 Nick Alcock <nick.alcock@oracle.com>
403
404 * ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
405 * ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.
406
407 2019-06-05 Nick Alcock <nick.alcock@oracle.com>
408
409 * ctf-archive.c (ctf_arc_write): Eschew %zi format specifier.
410 (ctf_arc_open_by_offset): Likewise.
411 * ctf-create.c (ctf_add_type): Likewise.
412
413 2019-06-04 Tom Tromey <tromey@adacore.com>
414
415 * ctf-create.c (ctf_add_encoded, ctf_add_slice)
416 (ctf_add_member_offset): Use CHAR_BIT, not NBBY.
417
418 2019-06-04 Nick Alcock <nick.alcock@oracle.com>
419
420 * configure.ac: Check for O_CLOEXEC.
421 * ctf-decls.h (O_CLOEXEC): Define (to 0), if need be.
422 * config.h.in: Regenerate.
423 * configure: Likewise.
424
425 2019-06-04 Nick Alcock <nick.alcock@oracle.com>
426
427 * qsort_r.c: Rename to...
428 * ctf-qsort_r.c: ... this.
429 (_quicksort): Define to ctf_qsort_r.
430 * ctf-decls.h (qsort_r): Remove.
431 (ctf_qsort_r): Add.
432 (struct ctf_qsort_arg): New, transport the real ARG and COMPAR.
433 (ctf_qsort_compar_thunk): Rearrange the arguments to COMPAR.
434 * Makefile.am (libctf_a_LIBADD): Remove.
435 (libctf_a_SOURCES): New, add ctf-qsort_r.c.
436 * ctf-archive.c (ctf_arc_write): Call ctf_qsort_r, not qsort_r.
437 * ctf-create.c (ctf_update): Likewise.
438 * configure.ac: Check for BSD versus GNU qsort_r signature.
439 * Makefile.in: Regenerate.
440 * config.h.in: Likewise.
441 * configure: Likewise.
442
443 2019-06-03 Nick Alcock <nick.alcock@oracle.com>
444
445 * ctf-dump.c (ctf_dump_funcs): Free in the right place.
446
447 2019-05-29 Nick Alcock <nick.alcock@oracle.com>
448
449 * Makefile.am (ZLIB): New.
450 (ZLIBINC): Likewise.
451 (AM_CFLAGS): Use them.
452 (libctf_a_LIBADD): New, for LIBOBJS.
453 * configure.ac: Check for zlib, endian.h, and qsort_r.
454 * ctf-endian.h: New, providing htole64 and le64toh.
455 * swap.h: Code style fixes.
456 (bswap_identity_64): New.
457 * qsort_r.c: New, from gnulib (with one added #include).
458 * ctf-decls.h: New, providing a conditional qsort_r declaration,
459 and unconditional definitions of MIN and MAX.
460 * ctf-impl.h: Use it. Do not use <sys/errno.h>.
461 (ctf_set_errno): Now returns unsigned long.
462 * ctf-util.c (ctf_set_errno): Adjust here too.
463 * ctf-archive.c: Use ctf-endian.h.
464 (ctf_arc_open_by_offset): Use memset, not bzero. Drop cts_type,
465 cts_flags and cts_offset.
466 (ctf_arc_write): Drop debugging dependent on the size of off_t.
467 * ctf-create.c: Provide a definition of roundup if not defined.
468 (ctf_create): Drop cts_type, cts_flags and cts_offset.
469 (ctf_add_reftype): Do not check if type IDs are below zero.
470 (ctf_add_slice): Likewise.
471 (ctf_add_typedef): Likewise.
472 (ctf_add_member_offset): Cast error-returning ssize_t's to size_t
473 when known error-free. Drop CTF_ERR usage for functions returning
474 int.
475 (ctf_add_member_encoded): Drop CTF_ERR usage for functions returning
476 int.
477 (ctf_add_variable): Likewise.
478 (enumcmp): Likewise.
479 (enumadd): Likewise.
480 (membcmp): Likewise.
481 (ctf_add_type): Likewise. Cast error-returning ssize_t's to size_t
482 when known error-free.
483 * ctf-dump.c (ctf_is_slice): Drop CTF_ERR usage for functions
484 returning int: use CTF_ERR for functions returning ctf_type_id.
485 (ctf_dump_label): Likewise.
486 (ctf_dump_objts): Likewise.
487 * ctf-labels.c (ctf_label_topmost): Likewise.
488 (ctf_label_iter): Likewise.
489 (ctf_label_info): Likewise.
490 * ctf-lookup.c (ctf_func_args): Likewise.
491 * ctf-open.c (upgrade_types): Cast to size_t where appropriate.
492 (ctf_bufopen): Likewise. Use zlib types as needed.
493 * ctf-types.c (ctf_member_iter): Drop CTF_ERR usage for functions
494 returning int.
495 (ctf_enum_iter): Likewise.
496 (ctf_type_size): Likewise.
497 (ctf_type_align): Likewise. Cast to size_t where appropriate.
498 (ctf_type_kind_unsliced): Likewise.
499 (ctf_type_kind): Likewise.
500 (ctf_type_encoding): Likewise.
501 (ctf_member_info): Likewise.
502 (ctf_array_info): Likewise.
503 (ctf_enum_value): Likewise.
504 (ctf_type_rvisit): Likewise.
505 * ctf-open-bfd.c (ctf_bfdopen): Drop cts_type, cts_flags and
506 cts_offset.
507 (ctf_simple_open): Likewise.
508 (ctf_bfdopen_ctfsect): Likewise. Set cts_size properly.
509 * Makefile.in: Regenerate.
510 * aclocal.m4: Likewise.
511 * config.h: Likewise.
512 * configure: Likewise.
513
514 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
515
516 * configure.in: Check for bfd_section_from_elf_index.
517 * configure: Regenerate.
518 * config.h.in [HAVE_BFD_ELF]: Likewise.
519 * libctf/ctf_open_bfd (ctf_bfdopen_ctfsect): Use it.
520 abfd is potentially unused now.
521
522 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
523
524 * Makefile.am: New.
525 * Makefile.in: Regenerated.
526 * config.h.in: Likewise.
527 * aclocal.m4: Likewise.
528 * configure: Likewise.
529
530 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
531
532 * ctf-dump.c: New.
533
534 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
535
536 * ctf-labels.c: New.
537
538 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
539
540 * ctf-impl.h (_libctf_version): New declaration.
541 * ctf-subr.c (_libctf_version): Define it.
542 (ctf_version): New.
543
544 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
545
546 * ctf-create.c (enumcmp): New.
547 (enumadd): Likewise.
548 (membcmp): Likewise.
549 (membadd): Likewise.
550 (ctf_add_type): Likewise.
551
552 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
553
554 * ctf-lookup.c (isqualifier): New.
555 (ctf_lookup_by_name): Likewise.
556 (struct ctf_lookup_var_key): Likewise.
557 (ctf_lookup_var): Likewise.
558 (ctf_lookup_variable): Likewise.
559 (ctf_lookup_symbol_name): Likewise.
560 (ctf_lookup_by_symbol): Likewise.
561 (ctf_func_info): Likewise.
562 (ctf_func_args): Likewise.
563
564 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
565
566 * ctf-decl.c: New file.
567 * ctf-types.c: Likewise.
568 * ctf-impl.h: New declarations.
569
570 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
571
572 * ctf-open-bfd.c: New file.
573 * ctf-open.c (ctf_close): New.
574 * ctf-impl.h: Include bfd.h.
575 (ctf_file): New members ctf_data_mmapped, ctf_data_mmapped_len.
576 (ctf_archive_internal): New members ctfi_abfd, ctfi_data,
577 ctfi_bfd_close.
578 (ctf_bfdopen_ctfsect): New declaration.
579 (_CTF_SECTION): likewise.
580
581 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
582
583 * ctf-archive.c: New.
584 * ctf-impl.h (ctf_archive_internal): New type.
585 (ctf_arc_open_internal): New declaration.
586 (ctf_arc_bufopen): Likewise.
587 (ctf_arc_close_internal): Likewise.
588
589 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
590
591 * ctf-open.c: New file.
592 * swap.h: Likewise.
593
594 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
595
596 * ctf-create.c: New file.
597 * ctf-lookup.c: New file.
598
599 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
600
601 * ctf-impl.h: New definitions and declarations for type creation
602 and lookup.
603
604 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
605
606 * ctf-hash.c: New file.
607 * ctf-impl.h: New declarations.
608
609 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
610
611 * ctf-error.c: New file.
612
613 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
614
615 * ctf-util.c: New file.
616 * elf.h: Likewise.
617 * ctf-impl.h: Include it, and add declarations.
618
619 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
620
621 * ctf-impl.h: New file.
622 * ctf-subr.c: New file.
623
624 \f
625 Local Variables:
626 mode: change-log
627 left-margin: 8
628 fill-column: 76
629 version-control: never
630 End:
This page took 0.041299 seconds and 4 git commands to generate.