Rewrite enum_flags, add unit tests, fix problems
[binutils-gdb.git] / gdbsupport / ChangeLog
1 2020-09-14 Pedro Alves <pedro@palves.net>
2
3 * enum-flags.h: Include "traits.h".
4 (DEF_ENUM_FLAGS_TYPE): Declare a function instead of defining a
5 structure.
6 (enum_underlying_type): Update comment.
7 (namespace enum_flags_detail): New. Move struct zero_type here.
8 (EnumIsUnsigned, EnumIsSigned): New.
9 (class enum_flags): Make most methods constexpr.
10 (operator&=, operator|=, operator^=): Take an enum_flags instead
11 of an enum_type. Make rvalue ref versions deleted.
12 (operator enum_type()): Delete.
13 (operator&, operator|, operator^, operator~): Delete, moved out of
14 class.
15 (raw()): New method.
16 (is_enum_flags_enum_type_t): Declare.
17 (ENUM_FLAGS_GEN_BINOP, ENUM_FLAGS_GEN_COMPOUND_ASSIGN)
18 (ENUM_FLAGS_GEN_COMP): New. Use them to reimplement global
19 operators.
20 (operator~): Now constexpr and reimplemented.
21 (operator<<, operator>>): New deleted functions.
22 * valid-expr.h (CHECK_VALID_EXPR_5, CHECK_VALID_EXPR_6): New.
23
24 2020-09-14 Pedro Alves <pedro@palves.net>
25
26 * traits.h (struct nonesuch, struct detector, detected_or)
27 (detected_or_t, is_detected, detected_t, detected_or)
28 (detected_or_t, is_detected_exact, is_detected_convertible): New.
29 * valid-expr.h (CHECK_VALID_EXPR_INT): Use gdb::is_detected_exact.
30
31 2020-09-10 Kamil Rytarowski <n54@gmx.com>
32
33 * eintr.h: New file.
34
35 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * selftest.h (run_tests): Change parameter to array_view.
38 * selftest.c (run_tests): Change parameter to array_view and use
39 it.
40
41 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
42
43 * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
44 * common.m4 (GDB_AC_COMMON): Use BFD_SYS_PROCFS_H to check for
45 <sys/procfs.h>.
46 * Makefile.in: Regenerate.
47 * configure, config.in: Regenerate.
48
49 2020-07-28 Tom de Vries <tdevries@suse.de>
50
51 PR build/26281
52 * gdb_optional.h (class optional): Add volatile member to union
53 contaning m_dummy and m_item.
54
55 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
56
57 * tdesc.h (struct target_desc_deleter): Moved here
58 from gdb/target-descriptions.h, extend comment.
59 (target_desc_up): Likewise.
60
61 2020-06-30 Tom Tromey <tromey@adacore.com>
62
63 PR build/26183:
64 * gdb_string_view.h (basic_string_view::to_string): Remove.
65 (gdb::to_string): New function.
66
67 2020-06-27 Simon Marchi <simon.marchi@efficios.com>
68
69 * tdesc.h (class print_xml_feature) <add_line>: Add
70 ATTRIBUTE_PRINTF.
71
72 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
73
74 * tdesc.cc (print_xml_feature::visit_pre): Use add_line to add
75 output content, and call indent as needed in all overloaded
76 variants.
77 (print_xml_feature::visit_post): Likewise.
78 (print_xml_feature::visit): Likewise.
79 (print_xml_feature::add_line): Two new overloaded functions.
80 * tdesc.h (print_xml_feature::indent): New member function.
81 (print_xml_feature::add_line): Two new overloaded member
82 functions.
83 (print_xml_feature::m_depth): New member variable.
84
85 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
86
87 * tdesc.cc (print_xml_feature::visit_pre): Print compatible
88 information.
89 * tdesc.h (struct tdesc_compatible_info): Declare new struct.
90 (tdesc_compatible_info_up): New typedef.
91 (tdesc_compatible_info_list): Declare new function.
92 (tdesc_compatible_info_arch_name): Declare new function.
93
94 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
95
96 * common-utils.cc, common-utils.h (stringify_argv): Drop
97 now unused function stringify_argv
98
99 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
100
101 * common-inferior.cc, common-inferior.h (construct_inferior_arguments):
102 Adapt to take a gdb::array_view<char * const> parameter.
103 Adapt call site.
104
105 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
106
107 * common-inferior.cc, common-inferior.h (construct_inferior_arguments):
108 Adapt to handle zero args and return a std::string.
109 Adapt call site.
110
111 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
112
113 * common-inferior.h, common-inferior.cc: (construct_inferior_arguments):
114 Move function here from gdb/infcmd.c, gdb/inferior.h
115
116 2020-05-14 Kevin Buettner <kevinb@redhat.com>
117
118 * btrace-common.h (btrace_cpu_vendor): Add CV_AMD.
119
120 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
121
122 * common-regcache.h (regcache_read_pc_protected): New function
123 declaration.
124
125 2020-04-28 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
126
127 * gdb-sigmask.h: Fix typo (pthead_sigmask -> pthread_sigmask).
128
129 2020-04-27 Simon Marchi <simon.marchi@polymtl.ca>
130
131 * common-defs.h: Include cstdlib.h.
132
133 2020-04-20 Tom Tromey <tromey@adacore.com>
134
135 * scoped_mmap.h (scoped_mmap): Mark move constructor as noexcept.
136 Use initialization style. Don't call destroy.
137 * scoped_fd.h (class scoped_fd): Mark move constructor as
138 noexcept.
139 * gdb_ref_ptr.h (class ref_ptr): Mark move constructor as
140 noexcept.
141
142 2020-04-13 Tom Tromey <tom@tromey.com>
143
144 * event-loop.c: Move comment. Remove obsolete comment.
145
146 2020-04-13 Tom Tromey <tom@tromey.com>
147
148 * event-loop.h: Move from ../gdb/.
149 * event-loop.cc: Move from ../gdb/.
150
151 2020-04-13 Tom Tromey <tom@tromey.com>
152
153 * errors.h (flush_streams): Declare.
154
155 2020-04-13 Tom Tromey <tom@tromey.com>
156
157 * gdb_select.h: Move from ../gdb/.
158
159 2020-04-13 Tom Tromey <tom@tromey.com>
160
161 * config.in, configure: Rebuild.
162 * common.m4 (GDB_AC_COMMON): Check for poll.h, sys/poll.h,
163 sys/select.h, and poll.
164
165 2020-03-31 Tom Tromey <tromey@adacore.com>
166
167 * btrace-common.cc (btrace_data_append): Conditionally call
168 memcpy.
169
170 2020-03-27 Andrew Burgess <andrew.burgess@embecosm.com>
171
172 * create-version.sh: Resolve issues highlighted by shellcheck.
173
174 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
175
176 * config.in: Re-generate.
177 * configure: Re-generate.
178
179 2020-03-17 Kamil Rytarowski <n54@gmx.com>
180
181 * common-defs.h: Include alloca.h if HAVE_ALLOCA_H is defined.
182
183 2020-03-12 Tom Tromey <tom@tromey.com>
184
185 * common-types.h: Remove GDBSERVER code.
186 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Redefine.
187 * common-defs.h: Remove GDBSERVER code.
188
189 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
190
191 * selftest.m4: Moved from gdb/.
192 * acinclude.m4: Update path to selftest.m4.
193
194 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
195
196 * configure.ac: Don't source bfd/development.sh.
197 * common.m4: Source bfd/development.sh.
198 * configure: Re-generate.
199
200 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
201
202 * configure: Re-generate.
203
204 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
205
206 * configure: Re-generate.
207 * warning.m4: Enable -Wmissing-prototypes.
208
209 2020-03-08 Tom Tromey <tom@tromey.com>
210
211 * gdb_binary_search.h: Fix two typos.
212
213 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
214
215 * .dir-locals.el: New file.
216
217 2020-03-05 Vyacheslav Petrishchev <vyachemail@gmail.com>
218
219 * configure.ac: Added call development.sh.
220 * configure: Regenerate.
221
222 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
223
224 * .gitattributes: New file.
225
226 2020-03-03 Simon Marchi <simon.marchi@efficios.com>
227
228 * Makefile.in: Re-generate.
229
230 2020-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
231
232 * gdb-dlfcn.h (gdb_dlopen): Update comment.
233
234 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
235
236 * configure: Regenerate.
237
238 2020-02-14 Tom Tromey <tom@tromey.com>
239
240 * common-defs.h: Change path to gnulib/config.h.
241
242 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
243
244 * Makefile.am: Rename source files from .c to .cc.
245 (CC, CFLAGS): Don't override.
246 (AM_CFLAGS): Rename to ...
247 (AM_CXXFLAGS): ... this.
248 * Makefile.in: Re-generate.
249 * %.c: Rename to %.cc.
250
251 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
252
253 * configure: Re-generate.
254
255 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
256
257 * warning.m4: Add -Wstrict-null-sentinel.
258 * configure: Re-generate.
259
260 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
261
262 * warning.m4: Move here, from gdb/warning.m4.
263 * acinclude.m4: Update warning.m4 path.
264 * Makefile.in: Re-generate.
265
266 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
267
268 * acinclude.m4: Include ../gdb/warning.m4.
269 * configure.ac: Use AM_GDB_WARNINGS.
270 * Makefile.am: Set AM_CFLAGS to WARN_CFLAGS and WERROR_CFLAGS.
271 * Makefile.in: Re-generate.
272 * configure: Re-generate.
273
274 2020-02-10 Tom de Vries <tdevries@suse.de>
275
276 * environ.c (gdb_environ::set): Cast concat NULL sentinel to char *.
277
278 2020-01-24 Christian Biesinger <cbiesinger@google.com>
279
280 * thread-pool.c (set_thread_name): Add an overload for the NetBSD
281 version of pthread_setname_np.
282
283 2020-01-17 Pedro Alves <palves@redhat.com>
284
285 * Makefile.am: Append CXX_DIALECT to CXX.
286 * Makefile.in: Regenerate.
287
288 2020-01-17 Pedro Alves <palves@redhat.com>
289
290 * configure.ac: Generate config.h instead of support-config.h.
291 * common-defs.h: Include <gdbsupport/config.h> instead of
292 <gdbsupport/support-config.h>.
293 * Makefile.in: Regenerate.
294 * configure: Regenerate.
295
296 2020-01-14 Tom Tromey <tom@tromey.com>
297
298 * Makefile.in: Rebuild.
299 * Makefile.am (check-defines): New target.
300 * check-defines.el: New file.
301
302 2020-01-14 Tom Tromey <tom@tromey.com>
303
304 * configure, Makefile.in, aclocal.m4, common.m4, config.in:
305 Rebuild.
306 * common.m4 (GDB_AC_COMMON): Move many checks from
307 gdb/configure.ac.
308 * acinclude.m4: Include bfd.m4, ptrace.m4.
309
310 2020-01-14 Tom Tromey <tom@tromey.com>
311
312 * common-defs.h: Add GDBSERVER case. Update includes.
313 * acinclude.m4, aclocal.m4, config.in, configure, configure.ac,
314 Makefile.am, Makefile.in, README: New files.
315 * Moved from ../gdb/gdbsupport/
316