libctf: unidentified type kinds on open are a sign of file corruption
[deliverable/binutils-gdb.git] / libctf / ChangeLog
CommitLineData
0b4fa56e
NA
12019-06-19 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-open.c (ctf_types): Fail when unidentified type kinds are
4 seen.
5
364620bf
NA
62019-06-19 Nick Alcock <nick.alcock@oracle.com>
7
8 * ctf-open.c (ctf_bufopen): Dump header offsets into the debugging
9 output.
10
65365aa8
NA
112019-06-19 Nick Alcock <nick.alcock@oracle.com>
12
13 * ctf-subr.c (_PAGESIZE): Remove.
14 (ctf_data_alloc): Likewise.
15 (ctf_data_free): Likewise.
16 (ctf_data_protect): Likewise.
17 * ctf-impl.h: Remove declarations.
18 * ctf-create.c (ctf_update): No longer call ctf_data_protect: use
19 ctf_free, not ctf_data_free.
20 (ctf_compress_write): Use ctf_data_alloc, not ctf_alloc. Free
21 the buffer again on compression error.
22 * ctf-open.c (ctf_set_base): No longer track the size: call
23 ctf_free, not ctf_data_free.
24 (upgrade_types): Likewise. Call ctf_alloc, not ctf_data_alloc.
25 (ctf_bufopen): Likewise. No longer call ctf_data_protect.
26
24865428
NA
272019-06-19 Nick Alcock <nick.alcock@oracle.com>
28
29 * ctf-create.c (ctf_dtd_insert): Pass on error returns from
30 ctf_dynhash_insert.
31 (ctf_dvd_insert): Likewise.
32 (ctf_add_generic): Likewise.
33 (ctf_add_variable): Likewise.
34 * ctf-impl.h: Adjust declarations.
35
3a3a077c
AM
362019-06-14 Alan Modra <amodra@gmail.com>
37
38 * configure: Regenerate.
39
942d35f7
NA
402019-06-06 Nick Alcock <nick.alcock@oracle.com>
41
42 * ctf-decls.h: Include <libiberty.h>.
43 * ctf-lookup.c (ctf_lookup_by_name): Call xstrndup(), not strndup().
44
595a4d43
NA
452019-06-06 Nick Alcock <nick.alcock@oracle.com>
46
47 * ctf-dump.c (ctf_dump_format_type): Cast size_t's used in printf()s.
48 (ctf_dump_objts): Likewise.
49 (ctf_dump_funcs): Likewise.
50 (ctf_dump_member): Likewise.
51 (ctf_dump_str): Likewise.
52
f5e73be1
NA
532019-06-06 Nick Alcock <nick.alcock@oracle.com>
54
55 * ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
56 * ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.
57
62d8e3b7
NA
582019-06-05 Nick Alcock <nick.alcock@oracle.com>
59
60 * ctf-archive.c (ctf_arc_write): Eschew %zi format specifier.
61 (ctf_arc_open_by_offset): Likewise.
62 * ctf-create.c (ctf_add_type): Likewise.
63
76fad999
TT
642019-06-04 Tom Tromey <tromey@adacore.com>
65
66 * ctf-create.c (ctf_add_encoded, ctf_add_slice)
67 (ctf_add_member_offset): Use CHAR_BIT, not NBBY.
68
ad118caa
NA
692019-06-04 Nick Alcock <nick.alcock@oracle.com>
70
71 * configure.ac: Check for O_CLOEXEC.
72 * ctf-decls.h (O_CLOEXEC): Define (to 0), if need be.
73 * config.h.in: Regenerate.
74 * configure: Likewise.
75
6b22174f
NA
762019-06-04 Nick Alcock <nick.alcock@oracle.com>
77
78 * qsort_r.c: Rename to...
79 * ctf-qsort_r.c: ... this.
80 (_quicksort): Define to ctf_qsort_r.
81 * ctf-decls.h (qsort_r): Remove.
82 (ctf_qsort_r): Add.
83 (struct ctf_qsort_arg): New, transport the real ARG and COMPAR.
84 (ctf_qsort_compar_thunk): Rearrange the arguments to COMPAR.
85 * Makefile.am (libctf_a_LIBADD): Remove.
86 (libctf_a_SOURCES): New, add ctf-qsort_r.c.
87 * ctf-archive.c (ctf_arc_write): Call ctf_qsort_r, not qsort_r.
88 * ctf-create.c (ctf_update): Likewise.
89 * configure.ac: Check for BSD versus GNU qsort_r signature.
90 * Makefile.in: Regenerate.
91 * config.h.in: Likewise.
92 * configure: Likewise.
93
941accce
NA
942019-06-03 Nick Alcock <nick.alcock@oracle.com>
95
96 * ctf-dump.c (ctf_dump_funcs): Free in the right place.
97
a0486bac
JM
982019-05-29 Nick Alcock <nick.alcock@oracle.com>
99
100 * Makefile.am (ZLIB): New.
101 (ZLIBINC): Likewise.
102 (AM_CFLAGS): Use them.
103 (libctf_a_LIBADD): New, for LIBOBJS.
104 * configure.ac: Check for zlib, endian.h, and qsort_r.
105 * ctf-endian.h: New, providing htole64 and le64toh.
106 * swap.h: Code style fixes.
107 (bswap_identity_64): New.
108 * qsort_r.c: New, from gnulib (with one added #include).
109 * ctf-decls.h: New, providing a conditional qsort_r declaration,
110 and unconditional definitions of MIN and MAX.
111 * ctf-impl.h: Use it. Do not use <sys/errno.h>.
112 (ctf_set_errno): Now returns unsigned long.
113 * ctf-util.c (ctf_set_errno): Adjust here too.
114 * ctf-archive.c: Use ctf-endian.h.
115 (ctf_arc_open_by_offset): Use memset, not bzero. Drop cts_type,
116 cts_flags and cts_offset.
117 (ctf_arc_write): Drop debugging dependent on the size of off_t.
118 * ctf-create.c: Provide a definition of roundup if not defined.
119 (ctf_create): Drop cts_type, cts_flags and cts_offset.
120 (ctf_add_reftype): Do not check if type IDs are below zero.
121 (ctf_add_slice): Likewise.
122 (ctf_add_typedef): Likewise.
123 (ctf_add_member_offset): Cast error-returning ssize_t's to size_t
124 when known error-free. Drop CTF_ERR usage for functions returning
125 int.
126 (ctf_add_member_encoded): Drop CTF_ERR usage for functions returning
127 int.
128 (ctf_add_variable): Likewise.
129 (enumcmp): Likewise.
130 (enumadd): Likewise.
131 (membcmp): Likewise.
132 (ctf_add_type): Likewise. Cast error-returning ssize_t's to size_t
133 when known error-free.
134 * ctf-dump.c (ctf_is_slice): Drop CTF_ERR usage for functions
135 returning int: use CTF_ERR for functions returning ctf_type_id.
136 (ctf_dump_label): Likewise.
137 (ctf_dump_objts): Likewise.
138 * ctf-labels.c (ctf_label_topmost): Likewise.
139 (ctf_label_iter): Likewise.
140 (ctf_label_info): Likewise.
141 * ctf-lookup.c (ctf_func_args): Likewise.
142 * ctf-open.c (upgrade_types): Cast to size_t where appropriate.
143 (ctf_bufopen): Likewise. Use zlib types as needed.
144 * ctf-types.c (ctf_member_iter): Drop CTF_ERR usage for functions
145 returning int.
146 (ctf_enum_iter): Likewise.
147 (ctf_type_size): Likewise.
148 (ctf_type_align): Likewise. Cast to size_t where appropriate.
149 (ctf_type_kind_unsliced): Likewise.
150 (ctf_type_kind): Likewise.
151 (ctf_type_encoding): Likewise.
152 (ctf_member_info): Likewise.
153 (ctf_array_info): Likewise.
154 (ctf_enum_value): Likewise.
155 (ctf_type_rvisit): Likewise.
156 * ctf-open-bfd.c (ctf_bfdopen): Drop cts_type, cts_flags and
157 cts_offset.
158 (ctf_simple_open): Likewise.
159 (ctf_bfdopen_ctfsect): Likewise. Set cts_size properly.
160 * Makefile.in: Regenerate.
161 * aclocal.m4: Likewise.
162 * config.h: Likewise.
163 * configure: Likewise.
164
9698cf9b
NA
1652019-05-28 Nick Alcock <nick.alcock@oracle.com>
166
167 * configure.in: Check for bfd_section_from_elf_index.
168 * configure: Regenerate.
169 * config.h.in [HAVE_BFD_ELF]: Likewise.
170 * libctf/ctf_open_bfd (ctf_bfdopen_ctfsect): Use it.
171 abfd is potentially unused now.
172
0e65dfba
NA
1732019-05-28 Nick Alcock <nick.alcock@oracle.com>
174
175 * Makefile.am: New.
176 * Makefile.in: Regenerated.
177 * config.h.in: Likewise.
178 * aclocal.m4: Likewise.
179 * configure: Likewise.
180
a30b3e18
NA
1812019-05-28 Nick Alcock <nick.alcock@oracle.com>
182
183 * ctf-dump.c: New.
184
6dbf2b73
NA
1852019-05-28 Nick Alcock <nick.alcock@oracle.com>
186
187 * ctf-labels.c: New.
188
6c33b742
NA
1892019-05-28 Nick Alcock <nick.alcock@oracle.com>
190
191 * ctf-impl.h (_libctf_version): New declaration.
192 * ctf-subr.c (_libctf_version): Define it.
193 (ctf_version): New.
194
c499eb68
NA
1952019-05-28 Nick Alcock <nick.alcock@oracle.com>
196
197 * ctf-create.c (enumcmp): New.
198 (enumadd): Likewise.
199 (membcmp): Likewise.
200 (membadd): Likewise.
201 (ctf_add_type): Likewise.
202
b437bfe0
NA
2032019-05-28 Nick Alcock <nick.alcock@oracle.com>
204
205 * ctf-lookup.c (isqualifier): New.
206 (ctf_lookup_by_name): Likewise.
207 (struct ctf_lookup_var_key): Likewise.
208 (ctf_lookup_var): Likewise.
209 (ctf_lookup_variable): Likewise.
210 (ctf_lookup_symbol_name): Likewise.
211 (ctf_lookup_by_symbol): Likewise.
212 (ctf_func_info): Likewise.
213 (ctf_func_args): Likewise.
214
316afdb1
NA
2152019-05-28 Nick Alcock <nick.alcock@oracle.com>
216
217 * ctf-decl.c: New file.
218 * ctf-types.c: Likewise.
219 * ctf-impl.h: New declarations.
220
143dce84
NA
2212019-05-28 Nick Alcock <nick.alcock@oracle.com>
222
223 * ctf-open-bfd.c: New file.
224 * ctf-open.c (ctf_close): New.
225 * ctf-impl.h: Include bfd.h.
226 (ctf_file): New members ctf_data_mmapped, ctf_data_mmapped_len.
227 (ctf_archive_internal): New members ctfi_abfd, ctfi_data,
228 ctfi_bfd_close.
229 (ctf_bfdopen_ctfsect): New declaration.
230 (_CTF_SECTION): likewise.
231
9402cc59
NA
2322019-05-28 Nick Alcock <nick.alcock@oracle.com>
233
234 * ctf-archive.c: New.
235 * ctf-impl.h (ctf_archive_internal): New type.
236 (ctf_arc_open_internal): New declaration.
237 (ctf_arc_bufopen): Likewise.
238 (ctf_arc_close_internal): Likewise.
239
72f33921
NA
2402019-05-28 Nick Alcock <nick.alcock@oracle.com>
241
242 * ctf-open.c: New file.
243 * swap.h: Likewise.
244
47d546f4
NA
2452019-05-28 Nick Alcock <nick.alcock@oracle.com>
246
247 * ctf-create.c: New file.
248 * ctf-lookup.c: New file.
249
a5be9bbe
NA
2502019-05-28 Nick Alcock <nick.alcock@oracle.com>
251
252 * ctf-impl.h: New definitions and declarations for type creation
253 and lookup.
254
c0754cdd
NA
2552019-05-28 Nick Alcock <nick.alcock@oracle.com>
256
257 * ctf-hash.c: New file.
258 * ctf-impl.h: New declarations.
259
479604f4
NA
2602019-05-28 Nick Alcock <nick.alcock@oracle.com>
261
262 * ctf-error.c: New file.
263
94585e7f
NA
2642019-05-28 Nick Alcock <nick.alcock@oracle.com>
265
266 * ctf-util.c: New file.
267 * elf.h: Likewise.
268 * ctf-impl.h: Include it, and add declarations.
269
60da9d95
NA
2702019-05-28 Nick Alcock <nick.alcock@oracle.com>
271
272 * ctf-impl.h: New file.
273 * ctf-subr.c: New file.
274
275\f
276Local Variables:
277mode: change-log
278left-margin: 8
279fill-column: 76
280version-control: never
281End:
This page took 0.039416 seconds and 4 git commands to generate.