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