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