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