libctf: avoid strndup
[deliverable/binutils-gdb.git] / libctf / ChangeLog
CommitLineData
942d35f7
NA
12019-06-06 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-decls.h: Include <libiberty.h>.
4 * ctf-lookup.c (ctf_lookup_by_name): Call xstrndup(), not strndup().
5
595a4d43
NA
62019-06-06 Nick Alcock <nick.alcock@oracle.com>
7
8 * ctf-dump.c (ctf_dump_format_type): Cast size_t's used in printf()s.
9 (ctf_dump_objts): Likewise.
10 (ctf_dump_funcs): Likewise.
11 (ctf_dump_member): Likewise.
12 (ctf_dump_str): Likewise.
13
f5e73be1
NA
142019-06-06 Nick Alcock <nick.alcock@oracle.com>
15
16 * ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
17 * ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.
18
62d8e3b7
NA
192019-06-05 Nick Alcock <nick.alcock@oracle.com>
20
21 * ctf-archive.c (ctf_arc_write): Eschew %zi format specifier.
22 (ctf_arc_open_by_offset): Likewise.
23 * ctf-create.c (ctf_add_type): Likewise.
24
76fad999
TT
252019-06-04 Tom Tromey <tromey@adacore.com>
26
27 * ctf-create.c (ctf_add_encoded, ctf_add_slice)
28 (ctf_add_member_offset): Use CHAR_BIT, not NBBY.
29
ad118caa
NA
302019-06-04 Nick Alcock <nick.alcock@oracle.com>
31
32 * configure.ac: Check for O_CLOEXEC.
33 * ctf-decls.h (O_CLOEXEC): Define (to 0), if need be.
34 * config.h.in: Regenerate.
35 * configure: Likewise.
36
6b22174f
NA
372019-06-04 Nick Alcock <nick.alcock@oracle.com>
38
39 * qsort_r.c: Rename to...
40 * ctf-qsort_r.c: ... this.
41 (_quicksort): Define to ctf_qsort_r.
42 * ctf-decls.h (qsort_r): Remove.
43 (ctf_qsort_r): Add.
44 (struct ctf_qsort_arg): New, transport the real ARG and COMPAR.
45 (ctf_qsort_compar_thunk): Rearrange the arguments to COMPAR.
46 * Makefile.am (libctf_a_LIBADD): Remove.
47 (libctf_a_SOURCES): New, add ctf-qsort_r.c.
48 * ctf-archive.c (ctf_arc_write): Call ctf_qsort_r, not qsort_r.
49 * ctf-create.c (ctf_update): Likewise.
50 * configure.ac: Check for BSD versus GNU qsort_r signature.
51 * Makefile.in: Regenerate.
52 * config.h.in: Likewise.
53 * configure: Likewise.
54
941accce
NA
552019-06-03 Nick Alcock <nick.alcock@oracle.com>
56
57 * ctf-dump.c (ctf_dump_funcs): Free in the right place.
58
a0486bac
JM
592019-05-29 Nick Alcock <nick.alcock@oracle.com>
60
61 * Makefile.am (ZLIB): New.
62 (ZLIBINC): Likewise.
63 (AM_CFLAGS): Use them.
64 (libctf_a_LIBADD): New, for LIBOBJS.
65 * configure.ac: Check for zlib, endian.h, and qsort_r.
66 * ctf-endian.h: New, providing htole64 and le64toh.
67 * swap.h: Code style fixes.
68 (bswap_identity_64): New.
69 * qsort_r.c: New, from gnulib (with one added #include).
70 * ctf-decls.h: New, providing a conditional qsort_r declaration,
71 and unconditional definitions of MIN and MAX.
72 * ctf-impl.h: Use it. Do not use <sys/errno.h>.
73 (ctf_set_errno): Now returns unsigned long.
74 * ctf-util.c (ctf_set_errno): Adjust here too.
75 * ctf-archive.c: Use ctf-endian.h.
76 (ctf_arc_open_by_offset): Use memset, not bzero. Drop cts_type,
77 cts_flags and cts_offset.
78 (ctf_arc_write): Drop debugging dependent on the size of off_t.
79 * ctf-create.c: Provide a definition of roundup if not defined.
80 (ctf_create): Drop cts_type, cts_flags and cts_offset.
81 (ctf_add_reftype): Do not check if type IDs are below zero.
82 (ctf_add_slice): Likewise.
83 (ctf_add_typedef): Likewise.
84 (ctf_add_member_offset): Cast error-returning ssize_t's to size_t
85 when known error-free. Drop CTF_ERR usage for functions returning
86 int.
87 (ctf_add_member_encoded): Drop CTF_ERR usage for functions returning
88 int.
89 (ctf_add_variable): Likewise.
90 (enumcmp): Likewise.
91 (enumadd): Likewise.
92 (membcmp): Likewise.
93 (ctf_add_type): Likewise. Cast error-returning ssize_t's to size_t
94 when known error-free.
95 * ctf-dump.c (ctf_is_slice): Drop CTF_ERR usage for functions
96 returning int: use CTF_ERR for functions returning ctf_type_id.
97 (ctf_dump_label): Likewise.
98 (ctf_dump_objts): Likewise.
99 * ctf-labels.c (ctf_label_topmost): Likewise.
100 (ctf_label_iter): Likewise.
101 (ctf_label_info): Likewise.
102 * ctf-lookup.c (ctf_func_args): Likewise.
103 * ctf-open.c (upgrade_types): Cast to size_t where appropriate.
104 (ctf_bufopen): Likewise. Use zlib types as needed.
105 * ctf-types.c (ctf_member_iter): Drop CTF_ERR usage for functions
106 returning int.
107 (ctf_enum_iter): Likewise.
108 (ctf_type_size): Likewise.
109 (ctf_type_align): Likewise. Cast to size_t where appropriate.
110 (ctf_type_kind_unsliced): Likewise.
111 (ctf_type_kind): Likewise.
112 (ctf_type_encoding): Likewise.
113 (ctf_member_info): Likewise.
114 (ctf_array_info): Likewise.
115 (ctf_enum_value): Likewise.
116 (ctf_type_rvisit): Likewise.
117 * ctf-open-bfd.c (ctf_bfdopen): Drop cts_type, cts_flags and
118 cts_offset.
119 (ctf_simple_open): Likewise.
120 (ctf_bfdopen_ctfsect): Likewise. Set cts_size properly.
121 * Makefile.in: Regenerate.
122 * aclocal.m4: Likewise.
123 * config.h: Likewise.
124 * configure: Likewise.
125
9698cf9b
NA
1262019-05-28 Nick Alcock <nick.alcock@oracle.com>
127
128 * configure.in: Check for bfd_section_from_elf_index.
129 * configure: Regenerate.
130 * config.h.in [HAVE_BFD_ELF]: Likewise.
131 * libctf/ctf_open_bfd (ctf_bfdopen_ctfsect): Use it.
132 abfd is potentially unused now.
133
0e65dfba
NA
1342019-05-28 Nick Alcock <nick.alcock@oracle.com>
135
136 * Makefile.am: New.
137 * Makefile.in: Regenerated.
138 * config.h.in: Likewise.
139 * aclocal.m4: Likewise.
140 * configure: Likewise.
141
a30b3e18
NA
1422019-05-28 Nick Alcock <nick.alcock@oracle.com>
143
144 * ctf-dump.c: New.
145
6dbf2b73
NA
1462019-05-28 Nick Alcock <nick.alcock@oracle.com>
147
148 * ctf-labels.c: New.
149
6c33b742
NA
1502019-05-28 Nick Alcock <nick.alcock@oracle.com>
151
152 * ctf-impl.h (_libctf_version): New declaration.
153 * ctf-subr.c (_libctf_version): Define it.
154 (ctf_version): New.
155
c499eb68
NA
1562019-05-28 Nick Alcock <nick.alcock@oracle.com>
157
158 * ctf-create.c (enumcmp): New.
159 (enumadd): Likewise.
160 (membcmp): Likewise.
161 (membadd): Likewise.
162 (ctf_add_type): Likewise.
163
b437bfe0
NA
1642019-05-28 Nick Alcock <nick.alcock@oracle.com>
165
166 * ctf-lookup.c (isqualifier): New.
167 (ctf_lookup_by_name): Likewise.
168 (struct ctf_lookup_var_key): Likewise.
169 (ctf_lookup_var): Likewise.
170 (ctf_lookup_variable): Likewise.
171 (ctf_lookup_symbol_name): Likewise.
172 (ctf_lookup_by_symbol): Likewise.
173 (ctf_func_info): Likewise.
174 (ctf_func_args): Likewise.
175
316afdb1
NA
1762019-05-28 Nick Alcock <nick.alcock@oracle.com>
177
178 * ctf-decl.c: New file.
179 * ctf-types.c: Likewise.
180 * ctf-impl.h: New declarations.
181
143dce84
NA
1822019-05-28 Nick Alcock <nick.alcock@oracle.com>
183
184 * ctf-open-bfd.c: New file.
185 * ctf-open.c (ctf_close): New.
186 * ctf-impl.h: Include bfd.h.
187 (ctf_file): New members ctf_data_mmapped, ctf_data_mmapped_len.
188 (ctf_archive_internal): New members ctfi_abfd, ctfi_data,
189 ctfi_bfd_close.
190 (ctf_bfdopen_ctfsect): New declaration.
191 (_CTF_SECTION): likewise.
192
9402cc59
NA
1932019-05-28 Nick Alcock <nick.alcock@oracle.com>
194
195 * ctf-archive.c: New.
196 * ctf-impl.h (ctf_archive_internal): New type.
197 (ctf_arc_open_internal): New declaration.
198 (ctf_arc_bufopen): Likewise.
199 (ctf_arc_close_internal): Likewise.
200
72f33921
NA
2012019-05-28 Nick Alcock <nick.alcock@oracle.com>
202
203 * ctf-open.c: New file.
204 * swap.h: Likewise.
205
47d546f4
NA
2062019-05-28 Nick Alcock <nick.alcock@oracle.com>
207
208 * ctf-create.c: New file.
209 * ctf-lookup.c: New file.
210
a5be9bbe
NA
2112019-05-28 Nick Alcock <nick.alcock@oracle.com>
212
213 * ctf-impl.h: New definitions and declarations for type creation
214 and lookup.
215
c0754cdd
NA
2162019-05-28 Nick Alcock <nick.alcock@oracle.com>
217
218 * ctf-hash.c: New file.
219 * ctf-impl.h: New declarations.
220
479604f4
NA
2212019-05-28 Nick Alcock <nick.alcock@oracle.com>
222
223 * ctf-error.c: New file.
224
94585e7f
NA
2252019-05-28 Nick Alcock <nick.alcock@oracle.com>
226
227 * ctf-util.c: New file.
228 * elf.h: Likewise.
229 * ctf-impl.h: Include it, and add declarations.
230
60da9d95
NA
2312019-05-28 Nick Alcock <nick.alcock@oracle.com>
232
233 * ctf-impl.h: New file.
234 * ctf-subr.c: New file.
235
236\f
237Local Variables:
238mode: change-log
239left-margin: 8
240fill-column: 76
241version-control: never
242End:
This page took 0.045589 seconds and 4 git commands to generate.