Avoid possible pointer wrap
[binutils-gdb.git] / gdbsupport / ChangeLog
1 2021-05-08 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * Makefile.in: Re-generate.
4 * config.in: Re-generate.
5 * configure: Re-generate.
6
7 2021-05-08 Pedro Alves <pedro@palves.net>
8
9 * common.m4 (personality test): Remove.
10
11 2021-04-30 Tom Tromey <tromey@adacore.com>
12
13 * thread-pool.cc (thread_pool::post_task): Update.
14 * thread-pool.h (class thread_pool) <post_task>: Take rvalue
15 reference to function.
16
17 2021-04-27 Michael Weghorn <m.weghorn@posteo.de>
18 Simon Marchi <simon.marchi@polymtl.ca>
19
20 * observable.h (class observable): Extend to allow specifying
21 dependencies between observers, keep vector holding observers
22 sorted so that dependencies are notified before observers
23 depending on them.
24
25 2021-04-24 Simon Marchi <simon.marchi@polymtl.ca>
26
27 * observable.h (observer_debug_printf,
28 OBSERVER_SCOPED_DEBUG_START_END): New.
29 (class observable) <notify, attach>: Use them.
30
31 2021-04-24 Simon Marchi <simon.marchi@polymtl.ca>
32
33 * common-debug.h (struct scoped_debug_start_end)
34 <scoped_debug_start_end>: Change start_msg/end_msg for
35 start_prefix/end_prefix. Add format string parameter and make
36 variadic.
37 <~scoped_debug_start_end>: Adjust.
38 <m_end_msg>: Rename to...
39 <m_end_prefix>: ... this.
40 <m_with_format>: New.
41 <m_msg>: New.
42 (scoped_debug_start_end): Make variadic.
43 (scoped_debug_enter_exit): Adjust.
44
45 2021-04-24 Simon Marchi <simon.marchi@polymtl.ca>
46
47 * observable.h (class observable) <struct observer> <observer>:
48 Add name parameter.
49 <name>: New field.
50 <attach>: Add name parameter, update all callers.
51
52 2021-04-24 Simon Marchi <simon.marchi@polymtl.ca>
53
54 * observable.h (class observable) <struct observer>: New.
55 <detach, notify>: Update.
56 <m_observers>: Change type to vector of observers.
57
58 2021-04-23 Simon Marchi <simon.marchi@polymtl.ca>
59
60 * observable.h (observer_debug): Change to bool.
61
62 2021-04-23 Simon Marchi <simon.marchi@polymtl.ca>
63
64 * common-debug.h: Include preprocessor.h.
65
66 2021-03-24 Luis Machado <luis.machado@linaro.org>
67
68 * rsp-low.cc (fromhex, hex2bin): Move to ...
69 * common-utils.cc: ... here.
70 (fromhex) Change error message text to not be RSP-specific.
71 * rsp-low.h (fromhex, hex2bin): Move to ...
72 * common-utils.h: ... here.
73
74 2021-03-21 Alan Modra <amodra@gmail.com>
75
76 * common-utils.h (startswith): Delete version now supplied by bfd.h.
77
78 2021-02-05 Paul E. Murphy <murphy@linux.ibm.com>
79
80 * common-defs.h (ATTRIBUTE_PRINTF): Rename
81 _GL_ATTRIBUTE_FORMAT_PRINTF to _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
82 * common-utils.h (xfree): Use GNULIB_NAMESPACE namespace when calling
83 free if this macro is defined.
84
85 2021-01-23 Lancelot SIX <lsix@lancelotsix.com>
86
87 * gdb_tilde_expand.cc (gdb_tilde_expand): Improve
88 implementation.
89 (gdb_tilde_expand_up): Delegate logic to gdb_tilde_expand.
90 * gdb_tilde_expand.h (gdb_tilde_expand): Update description.
91
92 2021-01-22 Simon Marchi <simon.marchi@polymtl.ca>
93
94 * common-debug.h (debug_prefixed_printf_cond_nofunc): New.
95 * common-debug.c (debug_prefixed_vprintf): Handle a nullptr
96 func.
97
98 2021-01-08 Simon Marchi <simon.marchi@polymtl.ca>
99
100 PR gdb/27157
101 * pathstuff.cc (get_standard_cache_dir, get_standard_config_dir,
102 find_gdb_home_config_file): Add empty string check.
103
104 2021-01-06 Mike Frysinger <vapier@gentoo.org>
105
106 * common-utils.h (align_up): Fix typo in header comment.
107
108 2021-01-04 Simon Marchi <simon.marchi@efficios.com>
109
110 * common-debug.h (debug_print_depth): New.
111 (struct scoped_debug_start_end): New.
112 (scoped_debug_start_end): New.
113 (scoped_debug_enter_exit): New.
114 * common-debug.cc (debug_prefixed_vprintf): Print indentation.
115
116 2020-12-11 Andrew Burgess <andrew.burgess@embecosm.com>
117
118 * gdbsupport/common-utils.cc: Change 'ctype.h' include to
119 'safe-ctype.h'.
120 (extract_string_maybe_quoted): Use safe-ctype function versions.
121 (is_digit_in_base): Likewise.
122 (digit_to_int): Likewise.
123 (strtoulst): Likewise.
124 (skip_spaces): Likewise.
125 (skip_to_space): Likewise.
126
127 2020-12-11 Simon Marchi <simon.marchi@polymtl.ca>
128
129 * common-debug.h (debug_prefixed_printf_cond): New.
130 * event-loop.h (event_loop_debug_printf): Use
131 debug_prefixed_printf_cond.
132
133 2020-12-08 Alexander Fedotov <alfedotov@gmail.com>
134
135 * pathstuff.cc (get_standard_cache_dir): Use LOCALAPPDATA environment
136 variable when running on Windows.
137
138 2020-12-01 Andrew Burgess <andrew.burgess@embecosm.com>
139
140 * tdesc.cc (print_xml_feature::visit): Print enum fields using
141 'evalue' syntax.
142
143 2020-12-01 Chungyi Chi <demonic@csie.io>
144
145 * tdesc.cc (print_xml_feature::visit): Print enum size attribute.
146
147 2020-11-20 Tom Tromey <tromey@adacore.com>
148
149 * thread-pool.cc (thread_pool::set_thread_count): Ignore system
150 errors.
151
152 2020-11-10 Tom Tromey <tromey@adacore.com>
153
154 PR build/26848:
155 * pathstuff.h: Move include block here...
156 * pathstuff.cc: ... from here.
157
158 2020-11-02 Tom Tromey <tom@tromey.com>
159
160 * pathstuff.h (get_standard_config_dir): Declare.
161 * pathstuff.cc (get_standard_config_dir): New function.
162
163 2020-11-02 Simon Marchi <simon.marchi@efficios.com>
164
165 * common-exceptions.h: Fix indentation.
166 * event-loop.cc: Fix indentation.
167 * fileio.cc: Fix indentation.
168 * filestuff.cc: Fix indentation.
169 * gdb-dlfcn.cc: Fix indentation.
170 * gdb_string_view.h: Fix indentation.
171 * job-control.cc: Fix indentation.
172 * signals.cc: Fix indentation.
173
174 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
175
176 * common-debug.cc (debug_prefixed_printf): New.
177 * common-debug.h (debug_prefixed_printf): New declaration.
178 * event-loop.cc (event_loop_debug_printf_1): Remove.
179 * event-loop.h (event_loop_debug_printf_1): Remove.
180 (event_loop_debug_printf): Use debug_prefixed_printf.
181 (event_loop_ui_debug_printf): Use debug_prefixed_printf.
182
183 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
184
185 * common.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
186 AC_LANG_PROGRAM.
187 * configure: Re-generate.
188
189 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * common.m4: Replace AC_FUNC_VFORK with AC_FUNC_FORK.
192
193 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
194
195 * configure: Re-generate.
196 * warning.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
197 AC_LANG_PROGRAM.
198
199 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
200
201 * configure: Re-generate.
202 * ptrace.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
203 AC_LANG_PROGRAM.
204
205 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * configure: Re-generate.
208 * ptrace.m4: Re-indent.
209
210 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
211
212 * aclocal.m4: Re-generate.
213 * configure: Re-generate.
214 * configure.ac: Remove AM_PROG_CC_STDC.
215
216 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
217
218 * configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
219 AC_CANONICAL_SYSTEM.
220 * configure: Re-generate.
221
222 2020-10-26 Pedro Alves <pedro@palves.net>
223
224 * eintr.h (handle_eintr): Replace Ret template parameter with
225 ErrorValType. Use it as type of the failure value. Deduce the
226 function's return type using decltype. Use lowercase for function
227 parameter names.
228
229 2020-10-25 Simon Marchi <simon.marchi@polymtl.ca>
230
231 * Makefile.in: Re-generate.
232 * acinclude.m4: Update ptrace.m4 path.
233 * ptrace.m4: Move here.
234
235 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
236
237 * tdesc.h (allocate_target_description): Update return type.
238
239 2020-10-07 Tom Tromey <tromey@adacore.com>
240
241 * Makefile.in: Rebuild.
242 * Makefile.am (libgdbsupport_a_SOURCES): Add search.cc.
243 * search.h: New file.
244 * search.cc: New file.
245
246 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
247
248 * event-loop.h (debug_event_loop): New variable declaration.
249 (event_loop_debug_printf_1): New function declaration.
250 (event_loop_debug_printf): New macro.
251 * event-loop.cc (debug_event_loop): New variable.
252 (handle_file_event): Add debug print.
253 (event_loop_debug_printf_1): New function.
254
255 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
256
257 * common-debug.cc (debug_prefixed_vprintf): Move here.
258 * common-debug.h (debug_prefixed_vprintf): Move here.
259
260 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
261
262 * event-loop.h (add_file_handler): Add "name" parameter.
263 * event-loop.cc (struct file_handler) <name>: New field.
264 (create_file_handler): Add "name" parameter, assign it to file
265 handler.
266 (add_file_handler): Add "name" parameter.
267
268 2020-10-01 Kamil Rytarowski <n54@gmx.com>
269
270 * agent.cc (gdb_connect_sync_socket): Preinitialize addr with zeros.
271
272 2020-09-29 Pedro Alves <pedro@palves.net>
273
274 * valid-expr.h (CHECK_VALID_EXPR_INT): Make archetype a template
275 class instead of an alias template and adjust static_assert.
276
277 2020-09-24 Simon Marchi <simon.marchi@efficios.com>
278
279 * event-loop.c (struct file_handler): Remove typedef, re-format.
280
281 2020-09-16 John Baldwin <jhb@FreeBSD.org>
282
283 * common.m4 (GDB_AC_COMMON): Refactor checks for kinfo_getfile().
284 * configure, config.in: Regenerate.
285
286 2020-09-14 Pedro Alves <pedro@palves.net>
287
288 * enum-flags.h: Include "traits.h".
289 (DEF_ENUM_FLAGS_TYPE): Declare a function instead of defining a
290 structure.
291 (enum_underlying_type): Update comment.
292 (namespace enum_flags_detail): New. Move struct zero_type here.
293 (EnumIsUnsigned, EnumIsSigned): New.
294 (class enum_flags): Make most methods constexpr.
295 (operator&=, operator|=, operator^=): Take an enum_flags instead
296 of an enum_type. Make rvalue ref versions deleted.
297 (operator enum_type()): Delete.
298 (operator&, operator|, operator^, operator~): Delete, moved out of
299 class.
300 (raw()): New method.
301 (is_enum_flags_enum_type_t): Declare.
302 (ENUM_FLAGS_GEN_BINOP, ENUM_FLAGS_GEN_COMPOUND_ASSIGN)
303 (ENUM_FLAGS_GEN_COMP): New. Use them to reimplement global
304 operators.
305 (operator~): Now constexpr and reimplemented.
306 (operator<<, operator>>): New deleted functions.
307 * valid-expr.h (CHECK_VALID_EXPR_5, CHECK_VALID_EXPR_6): New.
308
309 2020-09-14 Pedro Alves <pedro@palves.net>
310
311 * traits.h (struct nonesuch, struct detector, detected_or)
312 (detected_or_t, is_detected, detected_t, detected_or)
313 (detected_or_t, is_detected_exact, is_detected_convertible): New.
314 * valid-expr.h (CHECK_VALID_EXPR_INT): Use gdb::is_detected_exact.
315
316 2020-09-10 Kamil Rytarowski <n54@gmx.com>
317
318 * eintr.h: New file.
319
320 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
321
322 * selftest.h (run_tests): Change parameter to array_view.
323 * selftest.c (run_tests): Change parameter to array_view and use
324 it.
325
326 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
327
328 * Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
329 * common.m4 (GDB_AC_COMMON): Use BFD_SYS_PROCFS_H to check for
330 <sys/procfs.h>.
331 * Makefile.in: Regenerate.
332 * configure, config.in: Regenerate.
333
334 2020-07-28 Tom de Vries <tdevries@suse.de>
335
336 PR build/26281
337 * gdb_optional.h (class optional): Add volatile member to union
338 contaning m_dummy and m_item.
339
340 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
341
342 * tdesc.h (struct target_desc_deleter): Moved here
343 from gdb/target-descriptions.h, extend comment.
344 (target_desc_up): Likewise.
345
346 2020-06-30 Tom Tromey <tromey@adacore.com>
347
348 PR build/26183:
349 * gdb_string_view.h (basic_string_view::to_string): Remove.
350 (gdb::to_string): New function.
351
352 2020-06-27 Simon Marchi <simon.marchi@efficios.com>
353
354 * tdesc.h (class print_xml_feature) <add_line>: Add
355 ATTRIBUTE_PRINTF.
356
357 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
358
359 * tdesc.cc (print_xml_feature::visit_pre): Use add_line to add
360 output content, and call indent as needed in all overloaded
361 variants.
362 (print_xml_feature::visit_post): Likewise.
363 (print_xml_feature::visit): Likewise.
364 (print_xml_feature::add_line): Two new overloaded functions.
365 * tdesc.h (print_xml_feature::indent): New member function.
366 (print_xml_feature::add_line): Two new overloaded member
367 functions.
368 (print_xml_feature::m_depth): New member variable.
369
370 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
371
372 * tdesc.cc (print_xml_feature::visit_pre): Print compatible
373 information.
374 * tdesc.h (struct tdesc_compatible_info): Declare new struct.
375 (tdesc_compatible_info_up): New typedef.
376 (tdesc_compatible_info_list): Declare new function.
377 (tdesc_compatible_info_arch_name): Declare new function.
378
379 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
380
381 * common-utils.cc, common-utils.h (stringify_argv): Drop
382 now unused function stringify_argv
383
384 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
385
386 * common-inferior.cc, common-inferior.h (construct_inferior_arguments):
387 Adapt to take a gdb::array_view<char * const> parameter.
388 Adapt call site.
389
390 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
391
392 * common-inferior.cc, common-inferior.h (construct_inferior_arguments):
393 Adapt to handle zero args and return a std::string.
394 Adapt call site.
395
396 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
397
398 * common-inferior.h, common-inferior.cc: (construct_inferior_arguments):
399 Move function here from gdb/infcmd.c, gdb/inferior.h
400
401 2020-05-14 Kevin Buettner <kevinb@redhat.com>
402
403 * btrace-common.h (btrace_cpu_vendor): Add CV_AMD.
404
405 2020-05-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
406
407 * common-regcache.h (regcache_read_pc_protected): New function
408 declaration.
409
410 2020-04-28 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
411
412 * gdb-sigmask.h: Fix typo (pthead_sigmask -> pthread_sigmask).
413
414 2020-04-27 Simon Marchi <simon.marchi@polymtl.ca>
415
416 * common-defs.h: Include cstdlib.h.
417
418 2020-04-20 Tom Tromey <tromey@adacore.com>
419
420 * scoped_mmap.h (scoped_mmap): Mark move constructor as noexcept.
421 Use initialization style. Don't call destroy.
422 * scoped_fd.h (class scoped_fd): Mark move constructor as
423 noexcept.
424 * gdb_ref_ptr.h (class ref_ptr): Mark move constructor as
425 noexcept.
426
427 2020-04-13 Tom Tromey <tom@tromey.com>
428
429 * event-loop.c: Move comment. Remove obsolete comment.
430
431 2020-04-13 Tom Tromey <tom@tromey.com>
432
433 * event-loop.h: Move from ../gdb/.
434 * event-loop.cc: Move from ../gdb/.
435
436 2020-04-13 Tom Tromey <tom@tromey.com>
437
438 * errors.h (flush_streams): Declare.
439
440 2020-04-13 Tom Tromey <tom@tromey.com>
441
442 * gdb_select.h: Move from ../gdb/.
443
444 2020-04-13 Tom Tromey <tom@tromey.com>
445
446 * config.in, configure: Rebuild.
447 * common.m4 (GDB_AC_COMMON): Check for poll.h, sys/poll.h,
448 sys/select.h, and poll.
449
450 2020-03-31 Tom Tromey <tromey@adacore.com>
451
452 * btrace-common.cc (btrace_data_append): Conditionally call
453 memcpy.
454
455 2020-03-27 Andrew Burgess <andrew.burgess@embecosm.com>
456
457 * create-version.sh: Resolve issues highlighted by shellcheck.
458
459 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
460
461 * config.in: Re-generate.
462 * configure: Re-generate.
463
464 2020-03-17 Kamil Rytarowski <n54@gmx.com>
465
466 * common-defs.h: Include alloca.h if HAVE_ALLOCA_H is defined.
467
468 2020-03-12 Tom Tromey <tom@tromey.com>
469
470 * common-types.h: Remove GDBSERVER code.
471 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Redefine.
472 * common-defs.h: Remove GDBSERVER code.
473
474 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
475
476 * selftest.m4: Moved from gdb/.
477 * acinclude.m4: Update path to selftest.m4.
478
479 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
480
481 * configure.ac: Don't source bfd/development.sh.
482 * common.m4: Source bfd/development.sh.
483 * configure: Re-generate.
484
485 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
486
487 * configure: Re-generate.
488
489 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
490
491 * configure: Re-generate.
492 * warning.m4: Enable -Wmissing-prototypes.
493
494 2020-03-08 Tom Tromey <tom@tromey.com>
495
496 * gdb_binary_search.h: Fix two typos.
497
498 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
499
500 * .dir-locals.el: New file.
501
502 2020-03-05 Vyacheslav Petrishchev <vyachemail@gmail.com>
503
504 * configure.ac: Added call development.sh.
505 * configure: Regenerate.
506
507 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
508
509 * .gitattributes: New file.
510
511 2020-03-03 Simon Marchi <simon.marchi@efficios.com>
512
513 * Makefile.in: Re-generate.
514
515 2020-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
516
517 * gdb-dlfcn.h (gdb_dlopen): Update comment.
518
519 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
520
521 * configure: Regenerate.
522
523 2020-02-14 Tom Tromey <tom@tromey.com>
524
525 * common-defs.h: Change path to gnulib/config.h.
526
527 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
528
529 * Makefile.am: Rename source files from .c to .cc.
530 (CC, CFLAGS): Don't override.
531 (AM_CFLAGS): Rename to ...
532 (AM_CXXFLAGS): ... this.
533 * Makefile.in: Re-generate.
534 * %.c: Rename to %.cc.
535
536 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
537
538 * configure: Re-generate.
539
540 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
541
542 * warning.m4: Add -Wstrict-null-sentinel.
543 * configure: Re-generate.
544
545 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
546
547 * warning.m4: Move here, from gdb/warning.m4.
548 * acinclude.m4: Update warning.m4 path.
549 * Makefile.in: Re-generate.
550
551 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
552
553 * acinclude.m4: Include ../gdb/warning.m4.
554 * configure.ac: Use AM_GDB_WARNINGS.
555 * Makefile.am: Set AM_CFLAGS to WARN_CFLAGS and WERROR_CFLAGS.
556 * Makefile.in: Re-generate.
557 * configure: Re-generate.
558
559 2020-02-10 Tom de Vries <tdevries@suse.de>
560
561 * environ.c (gdb_environ::set): Cast concat NULL sentinel to char *.
562
563 2020-01-24 Christian Biesinger <cbiesinger@google.com>
564
565 * thread-pool.c (set_thread_name): Add an overload for the NetBSD
566 version of pthread_setname_np.
567
568 2020-01-17 Pedro Alves <palves@redhat.com>
569
570 * Makefile.am: Append CXX_DIALECT to CXX.
571 * Makefile.in: Regenerate.
572
573 2020-01-17 Pedro Alves <palves@redhat.com>
574
575 * configure.ac: Generate config.h instead of support-config.h.
576 * common-defs.h: Include <gdbsupport/config.h> instead of
577 <gdbsupport/support-config.h>.
578 * Makefile.in: Regenerate.
579 * configure: Regenerate.
580
581 2020-01-14 Tom Tromey <tom@tromey.com>
582
583 * Makefile.in: Rebuild.
584 * Makefile.am (check-defines): New target.
585 * check-defines.el: New file.
586
587 2020-01-14 Tom Tromey <tom@tromey.com>
588
589 * configure, Makefile.in, aclocal.m4, common.m4, config.in:
590 Rebuild.
591 * common.m4 (GDB_AC_COMMON): Move many checks from
592 gdb/configure.ac.
593 * acinclude.m4: Include bfd.m4, ptrace.m4.
594
595 2020-01-14 Tom Tromey <tom@tromey.com>
596
597 * common-defs.h: Add GDBSERVER case. Update includes.
598 * acinclude.m4, aclocal.m4, config.in, configure, configure.ac,
599 Makefile.am, Makefile.in, README: New files.
600 * Moved from ../gdb/gdbsupport/