libctf: introduce ctf_func_type_{info,args}, ctf_type_aname_raw
[deliverable/binutils-gdb.git] / libctf / ChangeLog
1 2019-07-18 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-types.c (ctf_type_aname_raw): New.
4 (ctf_func_type_info): Likewise.
5 (ctf_func_type_args): Likewise.
6 * ctf-error.c (_ctf_errlist): Fix description.
7 * ctf-lookup.c: Fix file description.
8
9 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
10
11 * ctf-create.c (ctf_create): Fix off-by-one error.
12
13 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
14
15 * ctf-impl.h: (struct ctf_strs_writable): New, non-const version of
16 struct ctf_strs.
17 (struct ctf_dtdef): Note that dtd_data.ctt_name is unpopulated.
18 (struct ctf_str_atom): New, disambiguated single string.
19 (struct ctf_str_atom_ref): New, points to some other location that
20 references this string's offset.
21 (struct ctf_file): New members ctf_str_atoms and ctf_str_num_refs.
22 Remove member ctf_dtvstrlen: we no longer track the total strlen
23 as we add strings.
24 (ctf_str_create_atoms): Declare new function in ctf-string.c.
25 (ctf_str_free_atoms): Likewise.
26 (ctf_str_add): Likewise.
27 (ctf_str_add_ref): Likewise.
28 (ctf_str_rollback): Likewise.
29 (ctf_str_purge_refs): Likewise.
30 (ctf_str_write_strtab): Likewise.
31 (ctf_realloc): Declare new function in ctf-util.c.
32
33 * ctf-open.c (ctf_bufopen): Create the atoms table.
34 (ctf_file_close): Destroy it.
35 * ctf-create.c (ctf_update): Copy-and-free it on update. No longer
36 special-case the position of the parname string. Construct the
37 strtab by calling ctf_str_add_ref and ctf_str_write_strtab after the
38 rest of each buffer element is constructed, not via open-coding:
39 realloc the CTF buffer and append the strtab to it. No longer
40 maintain ctf_dtvstrlen. Sort the variable entry table later, after
41 strtab construction.
42 (ctf_copy_membnames): Remove: integrated into ctf_copy_{s,l,e}members.
43 (ctf_copy_smembers): Drop the string offset: call ctf_str_add_ref
44 after buffer element construction instead.
45 (ctf_copy_lmembers): Likewise.
46 (ctf_copy_emembers): Likewise.
47 (ctf_create): No longer maintain the ctf_dtvstrlen.
48 (ctf_dtd_delete): Likewise.
49 (ctf_dvd_delete): Likewise.
50 (ctf_add_generic): Likewise.
51 (ctf_add_enumerator): Likewise.
52 (ctf_add_member_offset): Likewise.
53 (ctf_add_variable): Likewise.
54 (membadd): Likewise.
55 * ctf-util.c (ctf_realloc): New, wrapper around realloc that aborts
56 if there are active ctf_str_num_refs.
57 (ctf_strraw): Move to ctf-string.c.
58 (ctf_strptr): Likewise.
59 * ctf-string.c: New file, strtab manipulation.
60
61 * Makefile.am (libctf_a_SOURCES): Add it.
62 * Makefile.in: Regenerate.
63
64 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
65
66 * ctf-impl.h (ctf_hash_iter_f): New.
67 (ctf_dynhash_iter): New declaration.
68 (ctf_dynhash_iter_remove): New declaration.
69 * ctf-hash.c (ctf_dynhash_iter): Define.
70 (ctf_dynhash_iter_remove): Likewise.
71 (ctf_hashtab_traverse): New.
72 (ctf_hashtab_traverse_remove): Likewise.
73 (struct ctf_traverse_cb_arg): Likewise.
74 (struct ctf_traverse_remove_cb_arg): Likewise.
75
76 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
77
78 * ctf-hash.c (ctf_dynhash_remove): Call with a mocked-up element.
79
80 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
81
82 * ctf-dump.c (ctf_dump_format_type): Prefix hex strings with 0x.
83 (ctf_dump_funcs): Likewise.
84
85 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
86
87 * ctf-open-bfd.c: Add swap.h and ctf-endian.h.
88 (ctf_fdopen): Check for endian-swapped raw CTF magic, and
89 little-endian CTF archive magic. Do not check the CTF version:
90 ctf_simple_open does that in endian-safe ways. Do not dereference
91 null pointers on open failure.
92
93 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
94
95 * ctf-open.c (get_vbytes_common): Return the new slice size.
96 (ctf_bufopen): Flip the endianness of the CTF-section header copy.
97 Remember to copy in the CTF data when opening an uncompressed
98 foreign-endian CTF file. Prune useless variable manipulation.
99
100 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
101
102 * ctf-open.c (ctf_types): Fail when unidentified type kinds are
103 seen.
104
105 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
106
107 * ctf-open.c (ctf_bufopen): Dump header offsets into the debugging
108 output.
109
110 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
111
112 * ctf-subr.c (_PAGESIZE): Remove.
113 (ctf_data_alloc): Likewise.
114 (ctf_data_free): Likewise.
115 (ctf_data_protect): Likewise.
116 * ctf-impl.h: Remove declarations.
117 * ctf-create.c (ctf_update): No longer call ctf_data_protect: use
118 ctf_free, not ctf_data_free.
119 (ctf_compress_write): Use ctf_data_alloc, not ctf_alloc. Free
120 the buffer again on compression error.
121 * ctf-open.c (ctf_set_base): No longer track the size: call
122 ctf_free, not ctf_data_free.
123 (upgrade_types): Likewise. Call ctf_alloc, not ctf_data_alloc.
124 (ctf_bufopen): Likewise. No longer call ctf_data_protect.
125
126 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
127
128 * ctf-create.c (ctf_dtd_insert): Pass on error returns from
129 ctf_dynhash_insert.
130 (ctf_dvd_insert): Likewise.
131 (ctf_add_generic): Likewise.
132 (ctf_add_variable): Likewise.
133 * ctf-impl.h: Adjust declarations.
134
135 2019-06-14 Alan Modra <amodra@gmail.com>
136
137 * configure: Regenerate.
138
139 2019-06-06 Nick Alcock <nick.alcock@oracle.com>
140
141 * ctf-decls.h: Include <libiberty.h>.
142 * ctf-lookup.c (ctf_lookup_by_name): Call xstrndup(), not strndup().
143
144 2019-06-06 Nick Alcock <nick.alcock@oracle.com>
145
146 * ctf-dump.c (ctf_dump_format_type): Cast size_t's used in printf()s.
147 (ctf_dump_objts): Likewise.
148 (ctf_dump_funcs): Likewise.
149 (ctf_dump_member): Likewise.
150 (ctf_dump_str): Likewise.
151
152 2019-06-06 Nick Alcock <nick.alcock@oracle.com>
153
154 * ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
155 * ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.
156
157 2019-06-05 Nick Alcock <nick.alcock@oracle.com>
158
159 * ctf-archive.c (ctf_arc_write): Eschew %zi format specifier.
160 (ctf_arc_open_by_offset): Likewise.
161 * ctf-create.c (ctf_add_type): Likewise.
162
163 2019-06-04 Tom Tromey <tromey@adacore.com>
164
165 * ctf-create.c (ctf_add_encoded, ctf_add_slice)
166 (ctf_add_member_offset): Use CHAR_BIT, not NBBY.
167
168 2019-06-04 Nick Alcock <nick.alcock@oracle.com>
169
170 * configure.ac: Check for O_CLOEXEC.
171 * ctf-decls.h (O_CLOEXEC): Define (to 0), if need be.
172 * config.h.in: Regenerate.
173 * configure: Likewise.
174
175 2019-06-04 Nick Alcock <nick.alcock@oracle.com>
176
177 * qsort_r.c: Rename to...
178 * ctf-qsort_r.c: ... this.
179 (_quicksort): Define to ctf_qsort_r.
180 * ctf-decls.h (qsort_r): Remove.
181 (ctf_qsort_r): Add.
182 (struct ctf_qsort_arg): New, transport the real ARG and COMPAR.
183 (ctf_qsort_compar_thunk): Rearrange the arguments to COMPAR.
184 * Makefile.am (libctf_a_LIBADD): Remove.
185 (libctf_a_SOURCES): New, add ctf-qsort_r.c.
186 * ctf-archive.c (ctf_arc_write): Call ctf_qsort_r, not qsort_r.
187 * ctf-create.c (ctf_update): Likewise.
188 * configure.ac: Check for BSD versus GNU qsort_r signature.
189 * Makefile.in: Regenerate.
190 * config.h.in: Likewise.
191 * configure: Likewise.
192
193 2019-06-03 Nick Alcock <nick.alcock@oracle.com>
194
195 * ctf-dump.c (ctf_dump_funcs): Free in the right place.
196
197 2019-05-29 Nick Alcock <nick.alcock@oracle.com>
198
199 * Makefile.am (ZLIB): New.
200 (ZLIBINC): Likewise.
201 (AM_CFLAGS): Use them.
202 (libctf_a_LIBADD): New, for LIBOBJS.
203 * configure.ac: Check for zlib, endian.h, and qsort_r.
204 * ctf-endian.h: New, providing htole64 and le64toh.
205 * swap.h: Code style fixes.
206 (bswap_identity_64): New.
207 * qsort_r.c: New, from gnulib (with one added #include).
208 * ctf-decls.h: New, providing a conditional qsort_r declaration,
209 and unconditional definitions of MIN and MAX.
210 * ctf-impl.h: Use it. Do not use <sys/errno.h>.
211 (ctf_set_errno): Now returns unsigned long.
212 * ctf-util.c (ctf_set_errno): Adjust here too.
213 * ctf-archive.c: Use ctf-endian.h.
214 (ctf_arc_open_by_offset): Use memset, not bzero. Drop cts_type,
215 cts_flags and cts_offset.
216 (ctf_arc_write): Drop debugging dependent on the size of off_t.
217 * ctf-create.c: Provide a definition of roundup if not defined.
218 (ctf_create): Drop cts_type, cts_flags and cts_offset.
219 (ctf_add_reftype): Do not check if type IDs are below zero.
220 (ctf_add_slice): Likewise.
221 (ctf_add_typedef): Likewise.
222 (ctf_add_member_offset): Cast error-returning ssize_t's to size_t
223 when known error-free. Drop CTF_ERR usage for functions returning
224 int.
225 (ctf_add_member_encoded): Drop CTF_ERR usage for functions returning
226 int.
227 (ctf_add_variable): Likewise.
228 (enumcmp): Likewise.
229 (enumadd): Likewise.
230 (membcmp): Likewise.
231 (ctf_add_type): Likewise. Cast error-returning ssize_t's to size_t
232 when known error-free.
233 * ctf-dump.c (ctf_is_slice): Drop CTF_ERR usage for functions
234 returning int: use CTF_ERR for functions returning ctf_type_id.
235 (ctf_dump_label): Likewise.
236 (ctf_dump_objts): Likewise.
237 * ctf-labels.c (ctf_label_topmost): Likewise.
238 (ctf_label_iter): Likewise.
239 (ctf_label_info): Likewise.
240 * ctf-lookup.c (ctf_func_args): Likewise.
241 * ctf-open.c (upgrade_types): Cast to size_t where appropriate.
242 (ctf_bufopen): Likewise. Use zlib types as needed.
243 * ctf-types.c (ctf_member_iter): Drop CTF_ERR usage for functions
244 returning int.
245 (ctf_enum_iter): Likewise.
246 (ctf_type_size): Likewise.
247 (ctf_type_align): Likewise. Cast to size_t where appropriate.
248 (ctf_type_kind_unsliced): Likewise.
249 (ctf_type_kind): Likewise.
250 (ctf_type_encoding): Likewise.
251 (ctf_member_info): Likewise.
252 (ctf_array_info): Likewise.
253 (ctf_enum_value): Likewise.
254 (ctf_type_rvisit): Likewise.
255 * ctf-open-bfd.c (ctf_bfdopen): Drop cts_type, cts_flags and
256 cts_offset.
257 (ctf_simple_open): Likewise.
258 (ctf_bfdopen_ctfsect): Likewise. Set cts_size properly.
259 * Makefile.in: Regenerate.
260 * aclocal.m4: Likewise.
261 * config.h: Likewise.
262 * configure: Likewise.
263
264 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
265
266 * configure.in: Check for bfd_section_from_elf_index.
267 * configure: Regenerate.
268 * config.h.in [HAVE_BFD_ELF]: Likewise.
269 * libctf/ctf_open_bfd (ctf_bfdopen_ctfsect): Use it.
270 abfd is potentially unused now.
271
272 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
273
274 * Makefile.am: New.
275 * Makefile.in: Regenerated.
276 * config.h.in: Likewise.
277 * aclocal.m4: Likewise.
278 * configure: Likewise.
279
280 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
281
282 * ctf-dump.c: New.
283
284 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
285
286 * ctf-labels.c: New.
287
288 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
289
290 * ctf-impl.h (_libctf_version): New declaration.
291 * ctf-subr.c (_libctf_version): Define it.
292 (ctf_version): New.
293
294 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
295
296 * ctf-create.c (enumcmp): New.
297 (enumadd): Likewise.
298 (membcmp): Likewise.
299 (membadd): Likewise.
300 (ctf_add_type): Likewise.
301
302 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
303
304 * ctf-lookup.c (isqualifier): New.
305 (ctf_lookup_by_name): Likewise.
306 (struct ctf_lookup_var_key): Likewise.
307 (ctf_lookup_var): Likewise.
308 (ctf_lookup_variable): Likewise.
309 (ctf_lookup_symbol_name): Likewise.
310 (ctf_lookup_by_symbol): Likewise.
311 (ctf_func_info): Likewise.
312 (ctf_func_args): Likewise.
313
314 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
315
316 * ctf-decl.c: New file.
317 * ctf-types.c: Likewise.
318 * ctf-impl.h: New declarations.
319
320 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
321
322 * ctf-open-bfd.c: New file.
323 * ctf-open.c (ctf_close): New.
324 * ctf-impl.h: Include bfd.h.
325 (ctf_file): New members ctf_data_mmapped, ctf_data_mmapped_len.
326 (ctf_archive_internal): New members ctfi_abfd, ctfi_data,
327 ctfi_bfd_close.
328 (ctf_bfdopen_ctfsect): New declaration.
329 (_CTF_SECTION): likewise.
330
331 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
332
333 * ctf-archive.c: New.
334 * ctf-impl.h (ctf_archive_internal): New type.
335 (ctf_arc_open_internal): New declaration.
336 (ctf_arc_bufopen): Likewise.
337 (ctf_arc_close_internal): Likewise.
338
339 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
340
341 * ctf-open.c: New file.
342 * swap.h: Likewise.
343
344 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
345
346 * ctf-create.c: New file.
347 * ctf-lookup.c: New file.
348
349 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
350
351 * ctf-impl.h: New definitions and declarations for type creation
352 and lookup.
353
354 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
355
356 * ctf-hash.c: New file.
357 * ctf-impl.h: New declarations.
358
359 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
360
361 * ctf-error.c: New file.
362
363 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
364
365 * ctf-util.c: New file.
366 * elf.h: Likewise.
367 * ctf-impl.h: Include it, and add declarations.
368
369 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
370
371 * ctf-impl.h: New file.
372 * ctf-subr.c: New file.
373
374 \f
375 Local Variables:
376 mode: change-log
377 left-margin: 8
378 fill-column: 76
379 version-control: never
380 End:
This page took 0.053241 seconds and 5 git commands to generate.