Constify add_com_suppress_notification
[external/binutils.git] / gdb / ChangeLog
1 2017-11-07  Tom Tromey  <tom@tromey.com>
2
3         * stack.c (select_frame_command): Constify.
4         * cli/cli-decode.c (add_com_suppress_notification): Constify.
5         * command.h (add_com_suppress_notification): Constify.
6
7 2017-11-07  Tom Tromey  <tom@tromey.com>
8
9         * breakpoint.c (stop_command): Constify.
10         * cli/cli-decode.c (struct cmd_list_element): Constify.
11         * command.h (add_abbrev_prefix_cmd): Constify.
12
13 2017-11-07  Pedro Alves  <palves@redhat.com>
14
15         * breakpoint.c (extract_bp_kind): New enum.
16         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
17         factored out from ...
18         (extract_bp_number_and_location): ... here.
19         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
20
21 2017-11-07  Pedro Alves  <palves@redhat.com>
22
23         * breakpoint.c (extract_bp_number_and_location): Change return
24         type to void.  Throw error instead of warning.
25         (enable_disable_command): Adjust.
26
27 2017-11-07  Xavier Roirand  <roirand@adacore.com>
28             Pedro Alves  <palves@redhat.com>
29
30         * breakpoint.c (map_breakpoint_number_range): New, factored out
31         from ...
32         (map_breakpoint_numbers): ... here.
33         (find_location_by_number): Change parameters from string to
34         breakpoint number and location.
35         (extract_bp_number_and_location): New function.
36         (enable_disable_bp_num_loc)
37         (enable_disable_breakpoint_location_range)
38         (enable_disable_command): New functions, factored out ...
39         (enable_command, disable_command): ... these functions, and
40         adjusted to support ranges.
41         * NEWS: Document enable/disable breakpoint location range feature.
42
43 2017-11-06  Luis Machado  <luis.machado@linaro.org>
44
45         * MAINTAINERS (Write After Approval): Update my e-mail address.
46
47 2017-11-06  Pedro Alves  <palves@redhat.com>
48
49         * gnu-nat.c (gnu_terminal_init): Delete.
50         (gnu_target): Don't install gnu_terminal_init.
51         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
52         (child_terminal_init): ... this function.
53
54 2017-11-06  Pedro Alves  <palves@redhat.com>
55
56         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
57         sgtty.h.
58         * config.in, configure: Regenerate.
59
60 2017-11-06  Pedro Alves  <palves@redhat.com>
61
62         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
63         (async_init_signals): Adjust.
64         (handle_stop_sig): Rename to ...
65         (handle_sigtstp): ... this.
66         (async_stop_sig): Rename to ...
67         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
68         SIGTSTP path.
69         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
70         instead of STOP_SIGNAL thoughout.
71         (handle_stop_sig): Rename to ...
72         (handle_sigtstp): ... this.
73         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
74
75 2017-11-06  Pedro Alves  <palves@redhat.com>
76
77         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
78         longer set flags twice in row.
79
80 2017-11-06  Pedro Alves  <palves@redhat.com>
81
82         * Makefile.in (SER_HARDWIRE): Update comment.
83         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
84         * common/gdb_termios.h: Delete file.
85         * common/job-control.c: Include termios.h and unistd.h instead of
86         gdb_termios.h.
87         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
88         check.
89         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
90         Remove sgtty code.
91         * configure.ac: No longer check for termio.h and sgtty.h.
92         * configure: Regenerate.
93         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
94         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
95         Replace PROCESS_GROUP_TYPE references with pid_t references
96         throughout.
97         (gdb_getpgrp): Delete.
98         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
99         (child_terminal_inferior): Remove comment.  Remove sgtty code.
100         (child_terminal_ours_1): Use tcgetpgrp directly instead of
101         gdb_getpgrp.  Use serial_set_tty_state instead aof
102         serial_noflush_set_tty_state.  Remove sgtty code.
103         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
104         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
105         (inferior_process_group): Now returns pid_t.
106         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
107         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
108         * ser-event.c (serial_event_ops): Update.
109         * ser-go32.c (dos_noflush_set_tty_state): Delete.
110         (dos_ops): Update.
111         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
112         * ser-pipe.c (pipe_ops): Update.
113         * ser-tcp.c (tcp_ops): Update.
114         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
115         HAVE_TERMIOS checks.
116         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
117         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
118         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
119         assume termios.
120         (hardwire_noflush_set_tty_state): Delete.
121         (hardwire_print_tty_state, hardwire_drain_output)
122         (hardwire_flush_output, hardwire_flush_input)
123         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
124         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
125         code, and assume termios.
126         (hardwire_ops): Update.
127         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
128         * serial.c (serial_noflush_set_tty_state): Delete.
129         * serial.h (serial_noflush_set_tty_state): Delete.
130         (serial_ops::noflush_set_tty_state): Delete.
131
132 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
133
134         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
135         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
136         (COMMON_OBS): Remove doublest.o and dfp.o.
137         Do not build target-float.c (instead of doublest.c)
138         with -Wformat-nonliteral.
139
140         * doublest.c: Remove file.
141         * doublest.h: Remove file.
142         * dfp.c: Remove file.
143         * dfp.h: Remove file.
144
145         * target-float.c: Do not include "doublest.h" and "dfp.h".
146         (DOUBLEST): Move here from doublest.h.
147         (enum float_kind): Likewise.
148         (FLOATFORMAT_CHAR_BIT): Likewise.
149         (FLOATFORMAT_LARGEST_BYTES): Likewise.
150         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
151         (floatformat_precision): Likewise.
152         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
153         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
154         Likewise.
155         (host_float_format, host_double_format, host_long_double_format):
156         Likewise.
157         (floatformat_to_string, floatformat_from_string): Likewise.
158         (floatformat_to_doublest): Likewise.  Also, inline the original
159         convert_floatformat_to_doublest.
160         (floatformat_from_doublest): Likewise.  Also, inline the original
161         convert_floatformat_from_doublest.
162
163         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
164         (MAX_DECIMAL_STRING): Move here from dfp.c.
165         (match_endianness): Likewise.
166         (set_decnumber_context, decimal_check_errors): Likewise.
167         (decimal_from_number, decimal_to_number): Likewise.
168         (decimal_to_string, decimal_from_string): Likewise.  Make static.
169         (decimal_from_longest, decimal_from_ulongest): Likewise.
170         (decimal_to_longest): Likewise.
171         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
172         (decimal_convert): Likewise.
173
174 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
175
176         * doublest.c: Do not include "gdbtypes.h".
177         (extract_typed_floating): Remove.
178         (store_typed_floating): Remove.
179         (convert_typed_floating): Remove.
180         * doublest.h (struct type): Remove.
181         (DOUBLEST_PRINT_FORMAT): Remove.
182         (DOUBLEST_SCAN_FORMAT): Remove.
183         (extract_typed_floating): Remove.
184         (store_typed_floating): Remove.
185         (convert_typed_floating): Remove.
186
187         * dfp.c (decimal_from_doublest): Remove.
188         (decimal_to_doublest): Remove.
189         * dfp.h: Do not include "doublest.h".
190         (decimal_from_doublest): Remove.
191         (decimal_to_doublest): Remove.
192
193         * value.c: Do not include "doublest.h" and "dfp.h".
194         (value_as_double): Remove.
195         (unpack_double): Remove.
196         (value_from_double): Remove.
197         (value_from_decfloat): Remove.
198         * value.h: Do not include "doublest.h".
199         (value_as_double): Remove.
200         (unpack_double): Remove.
201         (value_from_double): Remove.
202         (value_from_decfloat): Remove.
203
204 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
205
206         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
207         (i386_extract_return_value): Use target_float_convert.
208         (i386_store_return_value): Likewise.
209         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
210         (i387_value_to_register): Likewise.
211         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
212         (ia64_register_to_value): Use target_float_convert.
213         (ia64_value_to_register): Likewise.
214         (ia64_extract_return_value): Likewise.
215         (ia64_store_return_value): Likewise.
216         (ia64_push_dummy_call): Likewise.
217         * m68k-tdep.c: Include "target-float.h".
218         (m68k_register_to_value): Use target_float_convert.
219         (m68k_value_to_register): Likewise.
220         (m68k_svr4_extract_return_value): Likewise.
221         (m68k_svr4_store_return_value): Likewise.
222         * ppc-sysv-tdep.c: Include "target-float.h".
223         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
224         (do_ppc_sysv_return_value): Likewise.
225         (ppc64_sysv_abi_push_freg): Likewise.
226         (ppc64_sysv_abi_return_value_base): Likewise.
227         * rs6000-aix-tdep.c: Include "target-float.h".
228         (rs6000_push_dummy_call): Use target_float_convert.
229         (rs6000_return_value): Likewise.
230         * rs6000-lynx178-tdep.c: Include "target-float.h".
231         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
232         (rs6000_lynx178_return_value): Likewise.
233         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
234         (rs6000_register_to_value): Use target_float_convert.
235         (rs6000_value_to_register): Likewise.
236         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
237         (arm_extract_return_value): Use target_float_convert.
238         (arm_store_return_value): Likewise.
239         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
240         (sh_register_convert_to_virtual): Use target_float_convert.
241         (sh_register_convert_to_raw): Likewise.
242         * sh64-tdep.c: Include "target-float.h".
243         (sh64_extract_return_value): Use target_float_convert.
244         (sh64_register_convert_to_virtual): Likewise.
245         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
246
247 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
248
249         * target-float.c (floatformat_to_host_double): New function.
250         (floatformat_from_host_double): Likewise.
251         (target_float_to_host_double): Likewise.
252         (target_float_from_host_double): Likewise.
253         * target-float.h (target_float_to_host_double): Add prototype.
254         (target_float_from_host_double): Likewise.
255
256         * guile/scm-value.c: Include "target-float.h".
257         (gdbscm_value_to_real): Use target_float_to_host_double.
258         Handle integer source values via value_as_long.
259         * guile/scm-math.c: Include "target-float.h".  Do not include
260         "doublest.h", "dfp.h", and "expression.h".
261         (vlscm_convert_typed_number): Use target_float_from_host_double.
262         (vlscm_convert_number): Likewise.
263
264         * python/py-value.c (valpy_float): Use target_float_to_host_double.
265         (convert_value_from_python): Use target_float_from_host_double.
266
267 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
268
269         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
270         (cast_from_fixed): Likewise.
271         (ada_scaling_type): New function.
272         (ada_delta): Return value instead of DOUBLEST.  Perform target
273         arithmetic instead of host arithmetic.
274         (scaling_factor): Rename to ...
275         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
276         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
277         (ada_fixed_to_float): Remove.
278         (ada_float_to_fixed): Remove.
279         * ada-lang.h (ada_fixed_to_float): Remove.
280         (ada_float_to_fixed): Remove.
281         (ada_delta): Return value instead of DOUBLEST.
282         (ada_scaling_factor): Add prototype.
283
284         * ada-typeprint.c: Include "target-float.h".
285         (print_fixed_point_type): Perform target arithmetic instead of
286         host arithmetic.
287         * ada-valprint.c: Include "target-float.h".
288         (ada_val_print_num): Perform target arithmetic instead of
289         host arithmetic for fixed-point types.
290
291 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
292
293         * target-float.c: Include <math.h>.
294         (floatformat_binop): New function.
295         (floatformat_compare): Likewise.
296         (target_float_binop): Likewise.
297         (target_float_compare): Likewise.
298         * target-float.h: Include "expression.h".
299         (target_float_binop): Add prototype.
300         (target_float_compare): Likewise.
301
302         * valarith.c: Do not include "doublest.h" and "dfp.h".
303         Include "common/byte-vector.h".
304         (value_args_as_decimal): Remove, replace by ...
305         (value_args_as_target_float): ... this function.  Handle both
306         binary and decimal target floating-point formats.
307         (scalar_binop): Handle both binary and decimal FP using
308         value_args_as_target_float and target_float_binop.
309         (value_equal): Handle both binary and decimal FP using
310         value_args_as_target_float and target_float_compare.
311         (value_less): Likewise.
312         (value_pos): Handle all scalar types as simple copy.
313         (value_neg): Handle all scalar types via BINOP_SUB from 0.
314         * dfp.c (decimal_binop): Throw error instead of internal_error
315         when called with an unsupported operation code.
316
317 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
318
319         * target-float.c (target_float_to_string): New function.
320         (target_float_from_string): New function.
321         * target-float.h (target_float_to_string): Add prototype.
322         (target_float_from_string): Add prototype.
323
324         * valprint.c: Include "target-float.h".  Do not include
325         "doublest.h" and "dfp.h".
326         (print_floating): Use target_float_to_string.
327         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
328         (printf_floating): Use target_float_to_string.
329         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
330         (print_i387_value): Use target_float_to_string.
331         * mips-tdep.c: Include "target-float.h".
332         (mips_print_fp_register): Use target_float_to_string.
333         * sh64-tdep.c: Include "target-float.h".
334         (sh64_do_fp_register): Use target_float_to_string.
335
336         * parse.c: Include "target-float.h".  Do not include
337         "doublest.h" and "dfp.h".
338         (parse_float): Use target_float_from_string.
339         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
340         (define_symbol): Use target_float_from_string.
341         * gdbarch-selftests.c: Include "target-float.h".
342         (register_to_value_test): Use target_float_from_string.
343
344 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
345
346         * Makefile.c (SFILES): Add target-float.c.
347         (HFILES_NO_SRCDIR): Add target-float.h.
348         (COMMON_OBS): Add target-float.o.
349         * target-float.h: New file.
350         * target-float.c: New file.
351
352         * doublest.c (floatformat_classify): Fix detection of float_zero.
353
354         * gdbtypes.c (is_floating_type): New function.
355         * gdbtypes.h (is_floating_type): Add prototype.
356
357         * value.c: Do not include "floatformat.h".
358         (unpack_double): Use target_float_is_valid.
359         (is_floating_value): New function.
360         * value.h (is_floating_value): Add prototype-
361
362         * valarith.c: Include "target-float.h".
363         (value_logical_not): Use target_float_is_zero.
364
365         * python/py-value.c: Include "target-float.h".
366         (valpy_nonzero): Use target_float_is_zero.
367
368 2017-11-04  Tom Tromey  <tom@tromey.com>
369
370         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
371
372 2017-11-04  Tom Tromey  <tom@tromey.com>
373
374         * breakpoint.c (set_momentary_breakpoint): Return
375         breakpoint_up.
376         (until_break_command): Update.
377         (new_until_break_fsm): Change argument types to
378         breakpoint_up.
379         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
380         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
381         Remove.
382         * infcmd.c (finish_forward): Update.
383         * breakpoint.h (set_momentary_breakpoint)
384         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
385         (make_cleanup_delete_breakpoint): Remove.
386         (struct breakpoint_deleter): New.
387         (breakpoint_up): New typedef.
388         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
389         (insert_exception_resume_breakpoint): Update.
390         (insert_exception_resume_from_probe): Update.
391         (insert_longjmp_resume_breakpoint): Update.
392         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
393         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
394         * infcall.c (call_function_by_hand_dummy): Update
395
396 2017-11-04  Tom Tromey  <tom@tromey.com>
397
398         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
399
400 2017-11-04  Tom Tromey  <tom@tromey.com>
401
402         * linux-tdep.c (linux_core_info_proc_mappings): Use
403         gdb::def_vector.
404         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
405         "size" argument.
406         (linux_corefile_thread): Update.
407         (linux_make_corefile_notes): Remove unused variable.
408
409 2017-11-04  Tom Tromey  <tom@tromey.com>
410
411         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
412         gdb::byte_vector.
413
414 2017-11-04  Tom Tromey  <tom@tromey.com>
415
416         * objfiles.c (do_free_objfile_cleanup): Remove.
417         * compile/compile-object-load.c (compile_object_load): Update.
418         * objfiles.h (make_cleanup_free_objfile): Remove.
419
420 2017-11-04  Tom Tromey  <tom@tromey.com>
421
422         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
423         (adi_read_versions): Change "tags" to "gdb_byte *".
424         (adi_print_versions): Likewise.
425
426 2017-11-04  Tom Tromey  <tom@tromey.com>
427
428         * breakpoint.c
429         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
430         from start_rbreak_breakpoints.
431         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
432         * breakpoint.h (class scoped_rbreak_breakpoints): New.
433         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
434         * symtab.c (do_end_rbreak_breakpoints): Remove.
435         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
436
437 2017-11-04  Tom Tromey  <tom@tromey.com>
438
439         * cp-namespace.c (reset_directive_searched): Remove.
440         (cp_lookup_symbol_via_imports): Use scoped_restore.
441         * cp-support.c (reset_directive_searched): Remove.
442         (make_symbol_overload_list_using): Use scoped_restore.
443         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
444         (reset_directive_searched): Remove.
445
446 2017-11-04  Tom Tromey  <tom@tromey.com>
447
448         * symfile.c (find_separate_debug_file_by_debuglink): Use
449         unique_xmalloc_ptr.
450
451 2017-11-04  Tom Tromey  <tom@tromey.com>
452
453         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
454         type of "info".
455         (compute_stack_depth): Likewise.
456         (do_compile_dwarf_expr_to_c): Use std::vector.
457
458 2017-11-04  Tom Tromey  <tom@tromey.com>
459
460         * compile/compile-object-load.c (link_callbacks_einfo): Use
461         std::string.
462
463 2017-11-04  Tom Tromey  <tom@tromey.com>
464
465         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
466         Use scoped_free_pendings.
467         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
468         scoped_free_pendings.
469         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
470         (xcoff_initial_scan): Likewise.
471         * buildsym.c (reset_symtab_globals): Update comment.
472         (scoped_free_pendings): Rename from really_free_pendings.
473         (prepare_for_building): Update comment.
474         (buildsym_init): Likewise.
475         * buildsym.h (class scoped_free_pendings): New class.
476         (really_free_pendings): Don't declare.
477
478 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
479
480         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
481         output when converting a zero value to a special byteorder format.
482
483 2017-11-02  Yao Qi  <yao.qi@linaro.org>
484
485         * frame.c (do_frame_register_read): Remove aspace.
486         * jit.c (jit_frame_sniffer): Likwise.
487         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
488         * regcache.c (regcache::regcache): Pass nullptr.
489         (regcache_print): Caller updated.
490         * regcache.h (regcache::regcache): Remove one constructor
491         parameter aspace.
492
493 2017-11-02  Yao Qi  <yao.qi@linaro.org>
494
495         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
496
497 2017-11-02  Yao Qi  <yao.qi@linaro.org>
498
499         * breakpoint.c (insert_single_step_breakpoints): Update.
500         * frame.c (struct frame_info) <aspace>: Add const.
501         (frame_save_as_regcache): Add const.
502         (get_frame_address_space): Return const address_space *.
503         * frame.h (get_frame_address_space): Update declaration.
504         * infrun.c (struct step_over_info) <aspace>: Add const.
505         (set_step_over_info): Make aspace const.
506         (displaced_step_prepare_throw): Change variable const.
507         (resume): Likewise.
508         (proceed): Likewise.
509         (adjust_pc_after_break): Likewise.
510         (save_waitstatus): Likewise.
511         (handle_signal_stop): Likewise.
512         (keep_going_pass_signal): Likewise.
513         * jit.c (jit_frame_sniffer): Add const.
514         * mips-tdep.c (mips_single_step_through_delay): Likewise.
515         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
516         * record-full.c (record_full_wait_1): Likewise.
517         * regcache.c (regcache::regcache): Change parameter to const.
518         * regcache.h (regcache::regcache): Likewise.
519         (regcache::aspace): Return const address_space *.
520         (regcache) <m_aspace>: Add const.
521
522 2017-11-02  Yao Qi  <yao.qi@linaro.org>
523
524         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
525         * frame.c (create_sentinel_frame): Likewise.
526         * infrun.c (displaced_step_prepare_throw): Likewise.
527         (resume): Likewise.
528         (thread_still_needs_step_over_bp): Likewise.
529         (proceed): Likewise.
530         (do_target_wait): Likewise.
531         (adjust_pc_after_break): Likewise.
532         (handle_syscall_event): Likewise.
533         (save_waitstatus): Likewise.
534         (handle_inferior_event_1): Likewise.
535         (handle_signal_stop): Likewise.
536         (keep_going_pass_signal): Likewise.
537         * linux-nat.c (status_callback): Likewise.
538         (save_stop_reason): Likewise.
539         (resume_stopped_resumed_lwps): Likewise.
540         * record-full.c (record_full_exec_insn): Likewise.
541         (record_full_wait_1): Likewise.
542         * regcache.c (get_regcache_aspace): Remove.
543         * regcache.h (get_regcache_aspace): Remove.
544
545 2017-11-02  Yao Qi  <yao.qi@linaro.org>
546
547         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
548         (init_regcache_descr): Use gdbarch_num_regs.
549         (regcache::regcache): Likewise.
550         (regcache::get_register_status): Likewise.
551         (regcache::assert_raw_regnum): Likewise.
552         (regcache::cooked_read): Likewise.
553         (regcache::cooked_read_value): Likewise.
554         (regcache::cooked_write): Likewise.
555         (regcache::dump): Likewise.
556         (regcache::num_raw_registers): New method.
557         * regcache.h (class regcache) <num_raw_registers>: New.
558
559 2017-11-02  Yao Qi  <yao.qi@linaro.org>
560
561         * regcache.c (regcache::assert_regnum): New method.
562         (regcache::invalidate): Call assert_regnum.
563         (regcache::raw_update): Likewise.
564         (regcache::raw_write): Likewise.
565         (regcache::raw_read_part): Likewise.
566         (regcache::raw_write_part): Likewise.
567         (regcache::raw_supply): Likewise.
568         (regcache::raw_supply_integer): Likewise.
569         (regcache::raw_supply_zeroed): Likewise.
570         (regcache::raw_collect): Likewise.
571         (regcache::raw_collect_integer): Likewise.
572         * regcache.h (regcache::assert_regnum): Declare.
573
574 2017-11-02  Yao Qi  <yao.qi@linaro.org>
575
576         * regcache.c (regcache::dump): Remove code.
577
578 2017-11-02  Yao Qi  <yao.qi@linaro.org>
579
580         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
581         Remove.
582         <sizeof_cooked_register_status>: Remove.
583         (init_regcache_descr): Update.
584         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
585         (regcache::save): Likewise.
586         (regcache::dump): Likewise.
587
588 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
589
590         * ft32-tdep.c (ft32_fetch_instruction): New function.
591         (ft32_analyze_prologue): Use ft32_fetch_instruction().
592
593 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
594
595         * cli/cli-script.c (execute_control_command): Rename to ...
596         (execute_control_command_1): ... this.
597         (execute_control_command): New function.
598
599 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
600
601         * tracepoint.c (tfind_command): Remove const_cast.
602
603 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
604
605         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
606
607 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
608
609         * common/common-utils.h (in_inclusive_range): New function.
610         * arm-tdep.c (arm_record_extension_space): Use
611         in_inclusive_range.
612         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
613         * cris-tdep.c (cris_spec_reg_applicable): Use
614         in_inclusive_range.
615
616 2017-10-30  Pedro Alves  <palves@redhat.com>
617             Simon Marchi <simon.marchi@ericsson.com>
618
619         * remote.c (remote_set_syscall_catchpoint): Build a std::string
620         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
621
622 2017-10-30  Pedro Alves  <palves@redhat.com>
623
624         * common/common-utils.c (string_appendf, string_vappendf): New
625         functions.
626         * common/common-utils.h (string_appendf, string_vappendf): New
627         declarations.
628         * unittests/common-utils-selftests.c (string_appendf_func)
629         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
630         (string_vappendf_tests): New functions.
631         (_initialize_common_utils_selftests): Register "string_appendf" and
632         "string_vappendf tests".
633
634 2017-10-30  Pedro Alves  <palves@redhat.com>
635
636         * unittests/common-utils-selftests.c (format_func): New typedef.
637         (string_printf_tests, string_vprintf_tests): Tests factored out
638         and merged to ...
639         (test_format_func): ... this new function.
640         (string_printf_tests, string_vprintf_tests): Reimplement on top of
641         test_format_func.
642
643 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
644
645         * darwin-nat.c: Remove include of gdb.h.
646
647 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
648
649         * xtensa-xtregs.c: Fix formatting issues.
650
651 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
652
653         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
654
655 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
656
657         PR python/21213
658         * python/py-infthread.c (thpy_get_inferior): Increment reference
659         of inferior before returning it.
660
661 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
662
663         * unittests/common-utils-selftests.c (format): Add
664         ATTRIBUTE_PRINTF.
665
666 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
667
668         * xml-syscall.c (struct syscall_desc): Add constructor.
669         <name>: Change type to std::string.
670         (syscall_desc_up): New typedef.
671         (syscall_desc_p): Remove typeder.
672         (DEF_VEC_P(syscall_desc_p)): Remove.
673         (struct syscall_group_desc): Add constructor.
674         <name>: Change type to std::string.
675         <syscalls>: Change type to std::vector.
676         (syscall_group_desc_up): New typedef.
677         (syscall_group_desc_p): Remove typedef.
678         (DEF_VEC_P(syscall_group_desc_p)): Remove.
679         (struct syscalls_info) <syscalls>: Change type to std::vector of
680         unique_ptr.
681         <groups>: Likewise.
682         <my_gdb_datadir>: Change type to std::string.
683         (syscalls_info_up): New typedef.
684         (allocate_syscalls_info): Remove.
685         (syscalls_info_free_syscalls_desc): Remove.
686         (syscalls_info_free_syscall_group_desc): Remove.
687         (free_syscalls_info): Remove.
688         (make_cleanup_free_syscalls_info): Remove.
689         (syscall_group_create_syscall_group_desc): Adjust.
690         (syscall_group_add_syscall): Adjust.
691         (syscall_create_syscall_desc): Adjust.
692         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
693         (init_syscalls_info): Adjust.
694         (syscall_group_get_group_by_name): Adjust.
695         (xml_get_syscall_number): Adjust.
696         (xml_get_syscall_name): Adjust.
697         (xml_list_of_syscalls): Adjust.
698         (xml_list_syscalls_by_group): Adjust.
699         (xml_list_of_groups): Adjust.
700
701 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
702
703         * probe.h: Don't include gdb_vecs.h.
704         (DEF_VEC_P (probe_p)): Remove.
705         (find_probes_in_objfile): Return an std::vector.
706         * probe.c (find_probes_in_objfile): Likewise.
707         * breakpoint.c (breakpoint_objfile_data)
708         <longjmp_probes>: Change type to std::vector.
709         <exception_probes>: Likewise.
710         (free_breakpoint_probes): Don't manually free vectors.
711         (create_longjmp_master_breakpoint): Adjust.
712         (create_exception_master_breakpoint): Adjust.
713         * solib-svr4.c (svr4_create_probe_breakpoints): Change
714         parameter type, adjust.
715         (svr4_create_solib_event_breakpoints): Adjust.
716
717 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
718
719         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
720         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
721         with new.
722         (free_breakpoint_probes): Rename to ...
723         (free_breakpoint_objfile_data): ... this, and call delete on
724         bp_objfile_data..
725
726 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
727
728         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
729         (loaded_script_ptr): Remove typedef.
730         (DEF_VEC_P (loaded_script_ptr)): Remove.
731         (struct collect_matching_scripts_data): Add constructor.
732         <scripts_p>: Change type to (pointer to) std::vector.
733         (collect_matching_scripts_data): Adjust.
734         (sort_scripts_by_name): Make suitable for std::sort.
735         (print_scripts): Don't sort vector, adjust to std::vector.
736         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
737
738 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
739
740         * symfile.c (filename_language): Make struct, not typedef.  Add
741         constructor.
742         <ext>: Change type to std::string.
743         (DEF_VEC_O (filename_language)): Remove.
744         (filename_language_table): Change type to std::vector.
745         (add_filename_language): Adjust.
746         (set_ext_lang_command): Adjust.
747         (info_ext_lang_command): Adjust.
748         (deduce_language_from_filename): Adjust.
749         (class scoped_restore_filename_language_table): Remove.
750         (test_filename_language): Use scoped_restore.
751         (test_set_ext_lang_command): Use scoped_restore, adjust to
752         std::vector change.
753
754 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
755
756         * symfile.c: Include selftest.h.
757         (class scoped_restore_filename_language_table): New.
758         (test_filename_language): New test.
759         (test_set_ext_lang_command): New test.
760         (_initialize_symfile): Register tests.
761
762 2017-10-27  Keith Seitz  <keiths@redhat.com>
763
764         * breakpoint.c (print_breakpoint_location): Use the symbol saved
765         in the bp_location, falling back to find_pc_sect_function when
766         needed.
767         (add_location_to_breakpoint): Save sal->symbol.
768         * breakpoint.h (struct bp_location) <symbol>: New field.
769         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
770         * symtab.h (struct symtab_and_line) <symbol>: New field.
771
772 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
773
774         PR gdb/13669
775         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
776         to rewind obstack.
777
778 2017-10-26  Pedro Alves  <palves@redhat.com>
779
780         * remote.c (remote_async_terminal_ours_p): Delete.
781         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
782         Remove references to 'remote_async_terminal_ours_p'.
783
784 2017-10-26  Yao Qi  <yao.qi@linaro.org>
785
786         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
787
788 2017-10-26  Yao Qi  <yao.qi@linaro.org>
789
790         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
791         aspace const.
792         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
793         Likewise.
794         * breakpoint.c (bpstat_check_location): Remove cast.
795         (breakpoint_hit_catch_fork): Make aspce const.
796         (breakpoint_hit_catch_solib): Likewise.
797         (breakpoint_hit_catch_exec): Likewise.
798         (breakpoint_hit_ranged_breakpoint): Likewise.
799         (breakpoint_hit_watchpoint): Likewise.
800         (base_breakpoint_breakpoint_hit): Likewise.
801         (bkpt_breakpoint_hit): Likewise.
802         (dprintf_breakpoint_hit): Likewise.
803         (tracepoint_breakpoint_hit): Likewise.
804         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
805
806 2017-10-26  Yao Qi  <yao.qi@linaro.org>
807
808         * breakpoint.c (breakpoint_location_address_match): Change
809         "struct address_space *" to "const address_space".
810         (breakpoint_location_address_range_overlap): Likewise.
811         (breakpoint_here_p): Likewise.
812         (breakpoint_in_range_p): Likewise.
813         (moribund_breakpoint_here_p): Likewise.
814         (bp_location_inserted_here_p): Likewise.
815         (software_breakpoint_inserted_here_p): Likewise.
816         (hardware_breakpoint_inserted_here_p): Likewise.
817         (hardware_watchpoint_inserted_in_range): Likewise.
818         (bpstat_check_location): Likewise.
819         (bpstat_stop_status): Likewise.
820         (breakpoint_address_match): Likewise.
821         (breakpoint_address_match_range): Likewise.
822         (breakpoint_location_address_match): Likewise.
823         (breakpoint_location_address_range_overlap): Likewise.
824         (insert_single_step_breakpoint): Likewise.
825         (breakpoint_has_location_inserted_here): Likewise.
826         (single_step_breakpoint_inserted_here_p): Likewise.
827         (pc_at_non_inline_function): Likewise.
828         * breakpoint.h (bpstat_stop_status): Update declaration.
829         (breakpoint_here_p): Likewise.
830         (breakpoint_in_range_p): Likewise.
831         (moribund_breakpoint_here_p): Likewise.
832         (breakpoint_inserted_here_p): Likewise.
833         (software_breakpoint_inserted_here_p): Likewise.
834         (hardware_breakpoint_inserted_here_p): Likewise.
835         (breakpoint_has_location_inserted_here): Likewise.
836         (single_step_breakpoint_inserted_here_p): Likewise.
837         (hardware_watchpoint_inserted_in_range): Likewise.
838         (breakpoint_address_match): Likewise.
839         (insert_single_step_breakpoint): Likewise.
840         (pc_at_non_inline_function): Likewise.
841         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
842         * record.c (record_check_stopped_by_breakpoint): Likewise.
843         * record.h (record_check_stopped_by_breakpoint): Likewise.
844         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
845
846 2017-10-25  Yao Qi  <yao.qi@linaro.org>
847
848         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
849         regcache->arch () instead get_regcache_arch.
850         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
851         Likewise.
852         (aarch64_fbsd_store_inferior_registers): Likewise.
853         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
854         (store_gregs_to_thread): Likewise.
855         (fetch_fpregs_from_thread): Likewise.
856         (store_fpregs_to_thread): Likewise.
857         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
858         (aarch64_store_return_value): Likewise.
859         (aarch64_software_single_step): Likewise.
860         * aix-thread.c (aix_thread_wait): Likewise.
861         (supply_reg32): Likewise.
862         (supply_sprs64): Likewise.
863         (supply_sprs32): Likewise.
864         (fill_gprs64): Likewise.
865         (fill_gprs32): Likewise.
866         (fill_sprs64): Likewise.
867         (fill_sprs32): Likewise.
868         (store_regs_user_thread): Likewise.
869         (store_regs_kernel_thread): Likewise.
870         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
871         (alphabsd_store_inferior_registers): Likewise.
872         * alpha-tdep.c (alpha_extract_return_value): Likewise.
873         (alpha_store_return_value): Likewise.
874         (alpha_deal_with_atomic_sequence): Likewise.
875         (alpha_next_pc): Likewise.
876         (alpha_software_single_step): Likewise.
877         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
878         (amd64bsd_store_inferior_registers): Likewise.
879         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
880         Likewise.
881         (amd64_linux_store_inferior_registers): Likewise.
882         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
883         (amd64_collect_native_gregset): Likewise.
884         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
885         (amd64obsd_collect_uthread): Likewise.
886         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
887         (amd64_collect_fpregset): Likewise.
888         (amd64_supply_fxsave): Likewise.
889         (amd64_supply_xsave): Likewise.
890         (amd64_collect_fxsave): Likewise.
891         (amd64_collect_xsave): Likewise.
892         * arc-tdep.c (arc_write_pc): Likewise.
893         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
894         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
895         (arm_fbsd_store_inferior_registers): Likewise.
896         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
897         (store_vfp_regs): Likewise.
898         (arm_linux_fetch_inferior_registers): Likewise.
899         (arm_linux_store_inferior_registers): Likewise.
900         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
901         (arm_linux_sigreturn_next_pc): Likewise.
902         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
903         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
904         (fetch_register): Likewise.
905         (store_register): Likewise.
906         * arm-tdep.c (arm_is_thumb): Likewise.
907         (displaced_in_arm_mode): Likewise.
908         (bx_write_pc): Likewise.
909         (arm_get_next_pcs_addr_bits_remove): Likewise.
910         (arm_software_single_step): Likewise.
911         (arm_extract_return_value): Likewise.
912         (arm_store_return_value): Likewise.
913         (arm_write_pc): Likewise.
914         * bfin-tdep.c (bfin_extract_return_value): Likewise.
915         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
916         (bsd_uthread_store_registers): Likewise.
917         * core-regset.c (fetch_core_registers): Likewise.
918         * corelow.c (get_core_registers): Likewise.
919         * cris-tdep.c (cris_store_return_value): Likewise.
920         (cris_extract_return_value): Likewise.
921         (find_step_target): Likewise.
922         (find_step_target): Likewise.
923         (cris_software_single_step): Likewise.
924         * ctf.c (ctf_fetch_registers): Likewise.
925         * darwin-nat.c (cancel_breakpoint): Likewise.
926         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
927         * frv-tdep.c (frv_extract_return_value): Likewise.
928         * ft32-tdep.c (ft32_store_return_value): Likewise.
929         (ft32_extract_return_value): Likewise.
930         * go32-nat.c (fetch_register): Likewise.
931         (go32_fetch_registers): Likewise.
932         (go32_store_registers): Likewise.
933         (store_register): Likewise.
934         * h8300-tdep.c (h8300_extract_return_value): Likewise.
935         (h8300_store_return_value): Likewise.
936         * hppa-linux-nat.c (fetch_register): Likewise.
937         (store_register): Likewise.
938         (hppa_linux_fetch_inferior_registers): Likewise.
939         (hppa_linux_store_inferior_registers): Likewise.
940         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
941         (i386_darwin_store_inferior_registers): Likewise.
942         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
943         (gnu_store_registers): Likewise.
944         * i386-linux-nat.c (fetch_register): Likewise.
945         (store_register): Likewise.
946         (supply_gregset): Likewise.
947         (fill_gregset): Likewise.
948         (i386_linux_fetch_inferior_registers): Likewise.
949         (i386_linux_store_inferior_registers): Likewise.
950         (i386_linux_resume): Likewise.
951         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
952         Likewise.
953         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
954         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
955         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
956         (i386obsd_collect_uthread): Likewise.
957         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
958         (i386_supply_gregset): Likewise.
959         (i386_collect_gregset): Likewise.
960         (i386_supply_fpregset): Likewise.
961         (i386_collect_fpregset): Likewise.
962         (i386_mpx_bd_base): Likewise.
963         * i386-v4-nat.c (supply_fpregset): Likewise.
964         (fill_fpregset): Likewise.
965         * i387-tdep.c (i387_supply_fsave): Likewise.
966         (i387_collect_fsave): Likewise.
967         (i387_supply_fxsave): Likewise.
968         (i387_collect_fxsave): Likewise.
969         (i387_supply_xsave): Likewise.
970         (i387_collect_xsave): Likewise.
971         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
972         (ia64_linux_store_registers): Likewise.
973         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
974         (ia64_extract_return_value): Likewise.
975         (ia64_store_return_value): Likewise.
976         (find_func_descr): Likewise.
977         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
978         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
979         (inf_ptrace_store_registers): Likewise.
980         * infrun.c (use_displaced_stepping): Likewise.
981         (displaced_step_prepare_throw): Likewise.
982         (resume): Likewise.
983         (proceed): Likewise.
984         (do_target_wait): Likewise.
985         (adjust_pc_after_break): Likewise.
986         (handle_inferior_event_1): Likewise.
987         (handle_signal_stop): Likewise.
988         (save_infcall_suspend_state): Likewise.
989         (restore_infcall_suspend_state): Likewise.
990         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
991         * jit.c (jit_frame_prev_register): Likewise.
992         * linux-nat.c (save_stop_reason): Likewise.
993         (linux_nat_wait_1): Likewise.
994         (resume_stopped_resumed_lwps): Likewise.
995         * linux-record.c (record_linux_sockaddr): Likewise.
996         (record_linux_msghdr): Likewise.
997         (record_linux_system_call): Likewise.
998         * linux-tdep.c (linux_collect_thread_registers): Likewise.
999         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1000         (lm32_store_return_value): Likewise.
1001         * m32c-tdep.c (m32c_read_flg): Likewise.
1002         (m32c_pseudo_register_read): Likewise.
1003         (m32c_pseudo_register_write): Likewise.
1004         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1005         (m32r_linux_collect_gregset): Likewise.
1006         * m32r-tdep.c (m32r_store_return_value): Likewise.
1007         (m32r_extract_return_value): Likewise.
1008         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1009         (m68kbsd_collect_fpregset): Likewise.
1010         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1011         * m68k-linux-nat.c (fetch_register): Likewise.
1012         (old_fetch_inferior_registers): Likewise.
1013         (old_store_inferior_registers): Likewise.
1014         (store_regs): Likewise.
1015         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1016         (m68k_svr4_store_return_value): Likewise.
1017         * m88k-tdep.c (m88k_store_arguments): Likewise.
1018         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1019         (mi_cmd_data_write_register_values): Likewise.
1020         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1021         (mips_fbsd_store_inferior_registers): Likewise.
1022         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1023         (mips_fbsd_supply_gregs): Likewise.
1024         (mips_fbsd_collect_fpregs): Likewise.
1025         (mips_fbsd_collect_gregs): Likewise.
1026         (mips_fbsd_supply_fpregset): Likewise.
1027         (mips_fbsd_collect_fpregset): Likewise.
1028         (mips_fbsd_supply_gregset): Likewise.
1029         (mips_fbsd_collect_gregset): Likewise.
1030         * mips-linux-nat.c (supply_gregset): Likewise.
1031         (fill_gregset): Likewise.
1032         (supply_fpregset): Likewise.
1033         (fill_fpregset): Likewise.
1034         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1035         (mips_fill_gregset): Likewise.
1036         (mips_supply_fpregset): Likewise.
1037         (mips_fill_fpregset): Likewise.
1038         (mips64_supply_gregset): Likewise.
1039         (micromips_linux_sigframe_validate): Likewise.
1040         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1041         (mipsnbsd_fetch_inferior_registers): Likewise.
1042         (mipsnbsd_store_inferior_registers): Likewise.
1043         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1044         (mipsnbsd_supply_gregset): Likewise.
1045         (mipsnbsd_iterate_over_regset_sections): Likewise.
1046         (mipsnbsd_supply_reg): Likewise.
1047         (mipsnbsd_supply_fpreg): Likewise.
1048         * mips-tdep.c (mips_in_frame_stub): Likewise.
1049         (mips_dummy_id): Likewise.
1050         (is_octeon_bbit_op): Likewise.
1051         (micromips_bc1_pc): Likewise.
1052         (extended_mips16_next_pc): Likewise.
1053         (mips16_next_pc): Likewise.
1054         (deal_with_atomic_sequence): Likewise.
1055         * moxie-tdep.c (moxie_process_readu): Likewise.
1056         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1057         * nto-procfs.c (procfs_store_registers): Likewise.
1058         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1059         (ppcfbsd_store_inferior_registers): Likewise.
1060         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1061         (fetch_altivec_register): Likewise.
1062         (get_spe_registers): Likewise.
1063         (fetch_spe_register): Likewise.
1064         (fetch_altivec_registers): Likewise.
1065         (fetch_all_gp_regs): Likewise.
1066         (fetch_all_fp_regs): Likewise.
1067         (store_vsx_register): Likewise.
1068         (store_altivec_register): Likewise.
1069         (set_spe_registers): Likewise.
1070         (store_spe_register): Likewise.
1071         (store_altivec_registers): Likewise.
1072         (store_all_gp_regs): Likewise.
1073         (store_all_fp_regs): Likewise.
1074         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1075         (ppc_linux_collect_gregset): Likewise.
1076         (ppc_canonicalize_syscall): Likewise.
1077         (ppc_linux_record_signal): Likewise.
1078         (ppu2spu_prev_register): Likewise.
1079         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1080         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1081         (ppcobsd_store_registers): Likewise.
1082         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1083         Likewise.
1084         (ppc_ravenscar_generic_store_registers): Likewise.
1085         * procfs.c (procfs_fetch_registers): Likewise.
1086         (procfs_store_registers): Likewise.
1087         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1088         (ravenscar_store_registers): Likewise.
1089         (ravenscar_prepare_to_store): Likewise.
1090         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1091         * record-full.c (record_full_wait_1): Likewise.
1092         (record_full_registers_change): Likewise.
1093         (record_full_store_registers): Likewise.
1094         (record_full_core_fetch_registers): Likewise.
1095         (record_full_save): Likewise.
1096         (record_full_goto_insn): Likewise.
1097         * regcache.c (regcache_register_size): Likewise.
1098         (get_regcache_arch): Remove.
1099         (regcache_read_pc): Likewise.
1100         * regcache.h (get_regcache_arch): Remove.
1101         * remote-sim.c (gdbsim_fetch_register): Likewise.
1102         (gdbsim_store_register): Likewise.
1103         * remote.c (fetch_register_using_p): Likewise.
1104         (send_g_packet): Likewise.
1105         (remote_prepare_to_store): Likewise.
1106         (store_registers_using_G): Likewise.
1107         * reverse.c (save_bookmark_command): Likewise.
1108         (goto_bookmark_command): Likewise.
1109         * rs6000-aix-tdep.c (branch_dest): Likewise.
1110         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1111         (fetch_register): Likewise.
1112         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1113         (ppc_collect_reg): Likewise.
1114         (ppc_collect_gregset): Likewise.
1115         (ppc_collect_fpregset): Likewise.
1116         (ppc_collect_vsxregset): Likewise.
1117         (ppc_collect_vrregset): Likewise.
1118         (ppc_displaced_step_hw_singlestep): Likewise.
1119         (rs6000_pseudo_register_read): Likewise.
1120         (rs6000_pseudo_register_write): Likewise.
1121         * s390-linux-nat.c (supply_gregset): Likewise.
1122         (fill_gregset): Likewise.
1123         (s390_linux_fetch_inferior_registers): Likewise.
1124         * s390-linux-tdep.c (s390_write_pc): Likewise.
1125         (s390_software_single_step): Likewise.
1126         (s390_all_but_pc_registers_record): Likewise.
1127         (s390_linux_syscall_record): Likewise.
1128         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1129         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1130         (shnbsd_store_inferior_registers): Likewise.
1131         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1132         (sh_extract_return_value_fpu): Likewise.
1133         (sh_store_return_value_nofpu): Likewise.
1134         (sh_corefile_supply_regset): Likewise.
1135         (sh_corefile_collect_regset): Likewise.
1136         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1137         (sh64_store_return_value): Likewise.
1138         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1139         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1140         (sparc_store_inferior_registers): Likewise.
1141         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1142         (sparc_ravenscar_prepare_to_store): Likewise.
1143         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1144         (sparc_analyze_control_transfer): Likewise.
1145         (sparc_step_trap): Likewise.
1146         (sparc_software_single_step): Likewise.
1147         (sparc32_gdbarch_init): Likewise.
1148         (sparc_supply_rwindow): Likewise.
1149         (sparc_collect_rwindow): Likewise.
1150         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1151         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1152         (sparc64nbsd_collect_gregset): Likewise.
1153         (sparc64nbsd_supply_fpregset): Likewise.
1154         (sparc64nbsd_collect_fpregset): Likewise.
1155         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1156         (sparc64_supply_gregset): Likewise.
1157         (sparc64_collect_gregset): Likewise.
1158         (sparc64_supply_fpregset): Likewise.
1159         (sparc64_collect_fpregset): Likewise.
1160         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1161         * spu-tdep.c (spu_unwind_sp): Likewise.
1162         (spu2ppu_prev_register): Likewise.
1163         (spu_memory_remove_breakpoint): Likewise.
1164         * stack.c (return_command): Likewise.
1165         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1166         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1167         * tracefile.c (trace_save_ctf): Likewise.
1168         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1169         (do_windows_store_inferior_registers): Likewise.
1170         (windows_resume): Likewise.
1171         * xtensa-linux-nat.c (fill_gregset): Likewise.
1172         (supply_gregset_reg): Likewise.
1173         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1174         (xtensa_register_read_masked): Likewise.
1175         (xtensa_supply_gregset): Likewise.
1176         (xtensa_extract_return_value): Likewise.
1177         (xtensa_store_return_value): Likewise.
1178
1179 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1180
1181         * doublest.c (floatformat_from_string): New function.
1182         * doublest.h (floatformat_from_string): Add prototype.
1183
1184         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1185         (OP_FLOAT): ... this.
1186         * expression.h: Do not include "doublest.h".
1187         (union exp_element): Replace doubleconst and decfloatconst by
1188         new element floatconst.
1189         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1190         (ada_evaluate_subexp): Likewise.
1191         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1192         OP_DOUBLE and OP_DECFLOAT.
1193         * expprint.c (print_subexp_standard): Likewise.
1194         (dump_subexp_body_standard): Likewise.
1195         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1196
1197         * parse.c: Include "dfp.h".
1198         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1199         (write_exp_elt_floatcst): New function.
1200         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1201         and OP_DECFLOAT.
1202         (operator_check_standard): Likewise.
1203         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1204         Return target format buffer instead of host DOUBLEST.
1205         Use floatformat_from_string and decimal_from_string to parse
1206         either binary or decimal floating-point types.
1207         (parse_c_float): Remove.
1208         * parser-defs.h: Do not include "doublest.h".
1209         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1210         (write_exp_elt_floatcst): Add prototype.
1211         (parse_float): Update prototype.
1212         (parse_c_float): Remove.
1213
1214         * c-exp.y: Do not include "dfp.h".
1215         (typed_val_float): Use byte buffer instead of DOUBLEST.
1216         (typed_val_decfloat): Remove.
1217         (DECFLOAT): Remove.
1218         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1219         (parse_number): Update to new parse_float interface.
1220         Parse suffixes and determine type before calling parse_float.
1221         Handle decimal and binary FP types the same way.
1222
1223         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1224         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1225         (parse_number): Update to new parse_float interface.
1226         Parse suffixes and determine type before calling parse_float.
1227
1228         * f-exp.y: Replace dval by typed_val_float.
1229         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1230         (parse_number): Use parse_float instead of atof.
1231
1232         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1233         (parse_go_float): Remove.
1234         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1235         (parse_number): Call parse_float instead of parse_go_float.
1236         Parse suffixes and determine type before calling parse_float.
1237
1238         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1239         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1240         (parse_number): Update to new parse_float interface.
1241         Parse suffixes and determine type before calling parse_float.
1242
1243         * m2-exp.y: Replace dval by byte buffer val.
1244         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1245         (parse_number): Call parse_float instead of atof.
1246
1247         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1248         (lex_number): Call parse_float instead of strtod.
1249         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1250         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1251         Use write_exp_elt_floatcst.
1252         (unit_testing): Remove static variable.
1253         (rust_type): Do not check unit_testing.
1254         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1255
1256         * ada-exp.y (type_float, type_double): Remove.
1257         (typed_val_float): Use byte buffer instead of DOUBLEST.
1258         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1259         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1260
1261 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1262
1263         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1264         * arch/aarch64.h: New file.
1265
1266 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1267
1268         * dfp.h (decimal_from_string): Use const reference for argument.
1269         * dfp.c (decimal_from_string): Likewise.
1270
1271 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1272
1273         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1274         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1275         * mips-tdep.c (mips_print_fp_register): Likewise.
1276
1277 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1278
1279         * common/format.h (enum argclass): Replace decfloat_arg by
1280         dec32float_arg, dec64float_arg, and dec128float_arg.
1281         * common/format.c (parse_format_string): Update to return
1282         new decimal float argument classes.
1283
1284         * printcmd.c (printf_decfloat): Rename to ...
1285         (printf_floating): ... this.  Add argclass argument, and use it
1286         instead of parsing the format string again.  Add support for
1287         binary floating-point values, using floatformat_to_string.
1288         Convert value to the target format if it doesn't already match.
1289         (ui_printf): Call printf_floating instead of printf_decfloat,
1290         also for double_arg / long_double_arg.  Pass argclass.
1291
1292         * dfp.c (decimal_to_string): Add format string argument.
1293         * dfp.h (decimal_to_string): Likewise.
1294
1295         * doublest.c (floatformat_to_string): Add format string argument.
1296         * doublest.h (floatformat_to_string): Likewise.
1297
1298 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1299
1300         * doublest.c (floatformat_precision): New routine.
1301         (floatformat_to_string): Likewise.
1302         * doublest.c (floatformat_to_string): Add prototype.
1303
1304         * printcmd.c (print_scalar_formatted): Only call print_floating
1305         on floating-point types.
1306         * valprint.c: Do not include "floatformat.h".
1307         (generic_val_print_decfloat): Remove.
1308         (generic_val_print): Call generic_val_print_float for both
1309         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1310         (print_floating): Use floatformat_to_string.  Handle decimal float.
1311         (print_decimal_floating): Remove, merge into floatformat_to_string.
1312         * value.h (print_decimal_floating): Remove.
1313
1314         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1315
1316 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1317
1318         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1319
1320 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1321
1322         * memattr.h: Don't include vec.h.
1323         (struct mem_attrib): Initialize fields.
1324         <unknown>: New static method.
1325         (struct mem_region): Add constructors, operator<, initialize
1326         fields.
1327         * memattr.c: Include algorithm.
1328         (default_mem_attrib, unknown_mem_attrib): Remove.
1329         (user_mem_region_list): New global.
1330         (target_mem_region_list, mem_region_list): Change type to
1331         std::vector<mem_region>.
1332         (mem_use_target): Now a function.
1333         (target_mem_regions_valid): Change type to bool.
1334         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1335         (require_user_regions): Adjust.
1336         (require_target_regions): Adjust.
1337         (create_mem_region): Adjust.
1338         (lookup_mem_region): Adjust.
1339         (invalidate_target_mem_regions): Adjust.
1340         (mem_clear): Rename to...
1341         (user_mem_clear): ... this, and adjust.
1342         (mem_command): Adjust.
1343         (info_mem_command): Adjust.
1344         (mem_enable, enable_mem_command, mem_disable,
1345         disable_mem_command): Adjust.
1346         (mem_delete): Adjust.
1347         (delete_mem_command): Adjust.
1348         * memory-map.h (parse_memory_map): Return an std::vector.
1349         * memory-map.c (parse_memory_map): Likewise.
1350         (struct memory_map_parsing_data): Add constructor.
1351         <memory_map>: Point to std::vector.
1352         (memory_map_start_memory): Adjust.
1353         (memory_map_end_memory): Adjust.
1354         (memory_map_end_property): Adjust.
1355         (clear_result): Remove.
1356         * remote.c (remote_memory_map): Return an std::vector.
1357         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1358         Remove.
1359         (target_debug_print_mem_region_vector): New.
1360         * target-delegates.c: Regenerate.
1361         * target.h (mem_region_vector): New typedef.
1362         (to_memory_map): Return mem_region_vector.
1363         (target_memory_map): Return an std::vector.
1364         * target.c (target_memory_map): Return an std::vector.
1365         (flash_erase_command): Adjust.
1366
1367 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1368
1369         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1370         Change type to std::string.
1371         (memory_map_start_property): Adjust.
1372         (memory_map_end_property): Adjust.
1373
1374 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1375
1376         * infrun.h: Include common/byte-vector.h.
1377         (struct displaced_step_closure): New struct.
1378         (struct buf_displaced_step_closure): New struct.
1379         * infrun.c (displaced_step_closure::~displaced_step_closure):
1380         Provide default implementation.
1381         (displaced_step_clear): Deallocate step closure with delete.
1382         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1383         (aarch64_displaced_step_closure): ... this, extend
1384         displaced_step_closure.
1385         (aarch64_displaced_step_data) <dsc>: Change type to
1386         aarch64_displaced_step_closure.
1387         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1388         unique_ptr.
1389         (aarch64_displaced_step_fixup): Add cast for displaced step
1390         closure.
1391         * amd64-tdep.c (displaced_step_closure): Rename to ...
1392         (amd64_displaced_step_closure): ... this, extend
1393         displaced_step_closure.
1394         <insn_buf>: Change type to std::vector<gdb_byte>.
1395         <max_len>: Remove.
1396         (fixup_riprel): Change type of DSC parameter, adjust to type
1397         change of insn_buf.
1398         (fixup_displaced_copy): Change type of DSC parameter.
1399         (amd64_displaced_step_copy_insn): Instantiate
1400         amd64_displaced_step_closure.
1401         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1402         to type change of insn_buf.
1403         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1404         parameter DSC.
1405         (arm_linux_copy_svc): Likewise.
1406         (cleanup_kernel_helper_return): Likewise.
1407         (arm_catch_kernel_helper_return): Likewise.
1408         (arm_linux_displaced_step_copy_insn): Instantiate
1409         arm_displaced_step_closure.
1410         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1411         (displaced_read_reg): Change type of parameter DSC.
1412         (branch_write_pc): Likewise.
1413         (load_write_pc): Likewise.
1414         (alu_write_pc): Likewise.
1415         (displaced_write_reg): Likewise.
1416         (arm_copy_unmodified): Likewise.
1417         (thumb_copy_unmodified_32bit): Likewise.
1418         (thumb_copy_unmodified_16bit): Likewise.
1419         (cleanup_preload): Likewise.
1420         (install_preload): Likewise.
1421         (arm_copy_preload): Likewise.
1422         (thumb2_copy_preload): Likewise.
1423         (install_preload_reg): Likewise.
1424         (arm_copy_preload_reg): Likewise.
1425         (cleanup_copro_load_store): Likewise.
1426         (install_copro_load_store): Likewise.
1427         (arm_copy_copro_load_store) Likewise.
1428         (thumb2_copy_copro_load_store): Likewise.
1429         (cleanup_branch): Likewise.
1430         (install_b_bl_blx): Likewise.
1431         (arm_copy_b_bl_blx): Likewise.
1432         (thumb2_copy_b_bl_blx): Likewise.
1433         (thumb_copy_b): Likewise.
1434         (install_bx_blx_reg): Likewise.
1435         (arm_copy_bx_blx_reg): Likewise.
1436         (thumb_copy_bx_blx_reg): Likewise.
1437         (cleanup_alu_imm): Likewise.
1438         (arm_copy_alu_imm): Likewise.
1439         (thumb2_copy_alu_imm): Likewise.
1440         (cleanup_alu_reg): Likewise.
1441         (install_alu_reg): Likewise.
1442         (arm_copy_alu_reg): Likewise.
1443         (thumb_copy_alu_reg): Likewise.
1444         (cleanup_alu_shifted_reg): Likewise.
1445         (install_alu_shifted_reg): Likewise.
1446         (arm_copy_alu_shifted_reg): Likewise.
1447         (cleanup_load): Likewise.
1448         (cleanup_store): Likewise.
1449         (arm_copy_extra_ld_st): Likewise.
1450         (install_load_store): Likewise.
1451         (thumb2_copy_load_literal): Likewise.
1452         (thumb2_copy_load_reg_imm): Likewise.
1453         (arm_copy_ldr_str_ldrb_strb): Likewise.
1454         (cleanup_block_load_all): Likewise.
1455         (cleanup_block_store_pc): Likewise.
1456         (cleanup_block_load_pc): Likewise.
1457         (arm_copy_block_xfer): Likewise.
1458         (thumb2_copy_block_xfer): Likewise.
1459         (cleanup_svc): Likewise.
1460         (install_svc): Likewise.
1461         (arm_copy_svc): Likewise.
1462         (thumb_copy_svc): Likewise.
1463         (arm_copy_undef): Likewise.
1464         (thumb_32bit_copy_undef): Likewise.
1465         (arm_copy_unpred): Likewise.
1466         (arm_decode_misc_memhint_neon): Likewise.
1467         (arm_decode_unconditional): Likewise.
1468         (arm_decode_miscellaneous): Likewise.
1469         (arm_decode_dp_misc): Likewise.
1470         (arm_decode_ld_st_word_ubyte): Likewise.
1471         (arm_decode_media): Likewise.
1472         (arm_decode_b_bl_ldmstm): Likewise.
1473         (arm_decode_ext_reg_ld_st): Likewise.
1474         (thumb2_decode_dp_shift_reg): Likewise.
1475         (thumb2_decode_ext_reg_ld_st): Likewise.
1476         (arm_decode_svc_copro): Likewise.
1477         (thumb2_decode_svc_copro): Likewise.
1478         (install_pc_relative): Likewise.
1479         (thumb_copy_pc_relative_16bit): Likewise.
1480         (thumb_decode_pc_relative_16bit): Likewise.
1481         (thumb_copy_pc_relative_32bit): Likewise.
1482         (thumb_copy_16bit_ldr_literal): Likewise.
1483         (thumb_copy_cbnz_cbz): Likewise.
1484         (thumb2_copy_table_branch): Likewise.
1485         (cleanup_pop_pc_16bit_all): Likewise.
1486         (thumb_copy_pop_pc_16bit): Likewise.
1487         (thumb_process_displaced_16bit_insn): Likewise.
1488         (decode_thumb_32bit_ld_mem_hints): Likewise.
1489         (thumb_process_displaced_32bit_insn): Likewise.
1490         (thumb_process_displaced_insn): Likewise.
1491         (arm_process_displaced_insn): Likewise.
1492         (arm_displaced_init_closure): Likewise.
1493         (arm_displaced_step_fixup): Add cast for closure.
1494         * arm-tdep.h: Include infrun.h.
1495         (displaced_step_closure): Rename to ...
1496         (arm_displaced_step_closure): ... this, extend
1497         displaced_step_closure.
1498         <u::svc::copy_svc_os>: Change type of parameter DSC.
1499         <cleanup>: Likewise.
1500         (arm_process_displaced_insn): Likewise.
1501         (arm_displaced_init_closure): Likewise.
1502         (displaced_read_reg): Likewise.
1503         (displaced_write_reg): Likewise.
1504         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1505         Adjust.
1506         * i386-tdep.h: Include infrun.h.
1507         (i386_displaced_step_closure): New typedef.
1508         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1509         i386_displaced_step_closure.
1510         (i386_displaced_step_fixup): Adjust.
1511         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1512         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1513         and unique_ptr.
1514         (ppc_displaced_step_fixup): Adjust.
1515         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1516         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1517         and unique_ptr.
1518         (s390_displaced_step_fixup): Adjust.
1519
1520 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1521
1522         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1523         Remove declarations.
1524
1525 2017-10-20  Tom Tromey  <tom@tromey.com>
1526
1527         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1528         std::vector.
1529         (gdb_bfd_record_inclusion): Update.
1530         (bfdp): Remove typedef.
1531
1532 2017-10-20  Tom Tromey  <tom@tromey.com>
1533
1534         * gdb_bfd.c (gdb_bfd_ref): Use new.
1535         (struct gdb_bfd_data): Add constructor, destructor, and member
1536         initializers.
1537         (gdb_bfd_unref): Use delete.
1538
1539 2017-10-20  Tom Tromey  <tom@tromey.com>
1540
1541         * exec.c (exec_file_attach): Use new_bfd_ref.
1542         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1543         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1544         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1545         new_bfd_ref.
1546         * gdb_bfd.h (new_bfd_ref): New function.
1547
1548 2017-10-20  Pedro Alves  <palves@redhat.com>
1549
1550         * main.c (captured_command_loop): Add attribute noinline.
1551
1552 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1553
1554         * interps.c (struct interp_factory): Add constructor.
1555         (interp_factory_p): Remove typedef.
1556         (DEF_VEC_P(interp_factory_p)): Remove.
1557         (interpreter_factories): Change type to std::vector.
1558         (interp_factory_register): Adjust.
1559         (interp_lookup): Adjust.
1560         (interpreter_completer): Adjust.
1561
1562 2017-10-19  Tom Tromey  <tom@tromey.com>
1563
1564         * break-catch-syscall.c (catch_syscall_completer): Use
1565         std::string, gdb::unique_xmalloc_ptr.
1566
1567 2017-10-19  Tom Tromey  <tom@tromey.com>
1568
1569         * infcall.c (call_function_by_hand_dummy): Use std::string.
1570
1571 2017-10-19  Tom Tromey  <tom@tromey.com>
1572
1573         * mi/mi-main.c (mi_cmd_execute): Update.
1574         * top.h (prepare_execute_command): Return scoped_value_mark.
1575         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1576         Add move constructor.
1577         * top.c (prepare_execute_command): Return scoped_value_mark.
1578         (execute_command): Update.
1579
1580 2017-10-19  Pedro Alves  <palves@redhat.com>
1581
1582         * xml-support.c (xml_fetch_content_from_file): Check fread's
1583         return.
1584
1585 2017-10-19  Pedro Alves  <palves@redhat.com>
1586
1587         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1588         async.
1589         (handle_error_fd): New function.
1590         (ser_base_async): Add/delete an event loop file handler for
1591         error_fd.
1592
1593 2017-10-19  Pedro Alves  <palves@redhat.com>
1594
1595         * xml-support.c (xml_fetch_content_from_file): Don't read in
1596         chunks.  Instead use fseek to determine the file's size, and read
1597         it in one go.
1598
1599 2017-11-18  Keith Seitz  <keiths@redhat.com>
1600
1601         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1602         types.
1603         Add whitespace to front of type name.
1604
1605 2017-10-18  Keith Seitz  <keiths@redhat.com>
1606
1607         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1608         DW_AT_accessibility.
1609
1610 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1611
1612         * features/tic6x-c62x-linux.c: Remove.
1613
1614 2017-10-17  Tom Tromey  <tom@tromey.com>
1615
1616         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1617         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1618         (do_mixed_source_and_assembly): Likewise.
1619
1620 2017-10-17  Tom Tromey  <tom@tromey.com>
1621
1622         * regcache.c (regcache::xfer_part): Remove assertion.
1623
1624 2017-10-17  Pedro Alves  <palves@redhat.com>
1625
1626         * xml-support.c (xml_fetch_content_from_file): Call
1627         unique_ptr::release() instead unique_ptr::get() when passing
1628         through xrealloc.
1629
1630 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1631
1632         * regcache.c (regcache::xfer_part): Remove parameters read and
1633         write, add parameter is_raw.  All callers are updated.
1634
1635 2017-10-16  Keith Seitz  <keiths@redhat.com>
1636
1637         * c-typeprint.c (enum access_specifier): Moved here from
1638         c_type_print_base.
1639         (output_access_specifier): New function.
1640         (c_type_print_base): Consider typedefs when assessing
1641         whether access labels are needed.
1642         Use output_access_specifier as needed.
1643         Output access specifier for typedefs, if needed.
1644         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1645         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1646         fields.
1647         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1648         accessor macros.
1649
1650 2017-10-16  Tom Tromey  <tom@tromey.com>
1651
1652         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1653         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1654         * target.c (target_fileio_read_stralloc): Update.
1655         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1656         * target.h (target_fileio_read_stralloc): Return
1657         unique_xmalloc_ptr.
1658
1659 2017-10-16  Tom Tromey  <tom@tromey.com>
1660
1661         * xml-syscall.c (xml_init_syscalls_info): Update.
1662         * xml-support.c (xinclude_start_include): Update.
1663         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1664         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1665         (xml_fetch_content_from_file): Likewise.
1666         * osdata.c (get_osdata): Update.
1667         * target.h (target_read_stralloc, target_get_osdata): Return
1668         unique_xmalloc_ptr.
1669         * solib-aix.c (solib_aix_get_library_list): Update.
1670         * solib-target.c (solib_target_current_sos): Update.
1671         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1672         * xml-tdesc.c (fetch_available_features_from_target): Update.
1673         (target_fetch_description_xml): Update.
1674         (file_read_description_xml): Update.
1675         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1676         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1677         (remote_pid_to_exec_file): Update.
1678         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1679         (target_get_osdata): Likewise.
1680
1681 2017-10-16  Tom Tromey  <tom@tromey.com>
1682
1683         * remote.c (remote_register_number_and_offset): Use std::vector.
1684         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1685         (putpkt_binary): Use gdb::def_vector.
1686         (compare_sections_command): Use gdb::byte_vector.
1687
1688 2017-10-16  Tom Tromey  <tom@tromey.com>
1689
1690         * ppc-linux-nat.c (hwdebug_insert_point): Use
1691         gdb::unique_xmalloc_ptr, XDUP.
1692
1693 2017-10-16  Tom Tromey  <tom@tromey.com>
1694
1695         * probe.c (parse_probes): Use std::string.
1696         (info_probes_for_ops, enable_probes_command)
1697         (disable_probes_command): Remove cleanups.
1698
1699 2017-10-16  Tom Tromey  <tom@tromey.com>
1700
1701         * buildsym.c (block_compar): Remove.
1702         (end_symtab_get_static_block): Use std::vector.
1703
1704 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1705
1706         * memrange.h (struct mem_range): Define operator< and operator==.
1707         (mem_range_s): Remove.
1708         (DEF_VEC_O (mem_range_s)): Remove.
1709         (normalize_mem_ranges): Change parameter type to std::vector.
1710         * memrange.c (compare_mem_ranges): Remove.
1711         (normalize_mem_ranges): Change parameter type to std::vector,
1712         adjust to vector change.
1713         * exec.c (section_table_available_memory): Return vector, remove
1714         parameter.
1715         (section_table_read_available_memory): Adjust to std::vector
1716         change.
1717         * remote.c (remote_read_bytes): Adjust to std::vector
1718         change.
1719         * tracepoint.h (traceframe_available_memory): Change parameter
1720         type to std::vector.
1721         * tracepoint.c (traceframe_available_memory): Change parameter
1722         type to std::vector, adjust.
1723         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1724         std::vector change.
1725         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1726         unittests/memrange-selftests.c.
1727         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1728         * gdb/unittests/memrange-selftests.c: New file.
1729
1730 2017-10-16  Pedro Alves  <palves@redhat.com>
1731
1732         * elfread.c (probe_key_free): Rename range-for variable.
1733         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1734         (find_probe_by_pc, collect_probes): Rename range-for variable.
1735
1736 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1737
1738         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1739         * features/tic6x-c62x.c: Remove.
1740         * features/tic6x-c64x-linux.c: Remove.
1741         * features/tic6x-c64x.c: Remove.
1742         * features/tic6x-c64xp-linux.c: Remove.
1743         * features/tic6x-c64xp.c: Remove.
1744         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1745         initialize_tdesc_tic6x_*_linux functions.
1746         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1747         initialize_tdesc_tic6x_* functions.
1748
1749 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1750
1751         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1752         tic6x-c62x.
1753         * regformats/tic6x-c62x.dat: Remove.
1754         * regformats/tic6x-c64x.dat: Remove.
1755         * regformats/tic6x-c64xp.dat: Remove.
1756
1757 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1758
1759         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1760         (the !HAVE_LIBEXPAT version).
1761
1762 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1763
1764         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1765         const.
1766
1767 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1768
1769         * target.h: Include tracepoint.h.
1770         (enum trace_find_type): Move to tracepoint.h.
1771         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1772         * tracepoint.h: Don't include target.h
1773         (enum trace_find_type): Move from target.h.
1774         (parse_traceframe_info): Return a unique ptr.
1775         * tracepoint.c (current_traceframe_info): Change type to unique
1776         ptr.
1777         (free_traceframe_info): Remove.
1778         (clear_traceframe_info): Don't manually free
1779         current_traceframe_info.
1780         (free_result): Remove.
1781         (parse_traceframe_info): Return a unique ptr.
1782         (get_traceframe_info): Adjust to unique ptr.
1783         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1784         * remote.c (remote_traceframe_info): Return a unique ptr.
1785         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1786         ptr.
1787         * target-debug.h (target_debug_print_traceframe_info_up): New
1788         macro.
1789         * target-delegates.c: Regenerate.
1790
1791 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1792
1793         * memrange.h (struct mem_range): Add constructors.
1794         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1795         std::vector<mem_range>.
1796         * tracepoint.c (free_traceframe_info): Don't manually free
1797         vector.
1798         (traceframe_info_start_memory): Adjust to vector change.
1799         (traceframe_available_memory): Likewise.
1800         * tracefile-tfile.c (build_traceframe_info): Likewise.
1801         * ctf.c (ctf_traceframe_info): Likewise.
1802
1803 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1804
1805         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1806         std::vector<int>.
1807         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1808         (traceframe_info_start_tvar): Adjust to vector change.
1809         (parse_traceframe_info): Allocate with new.
1810         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1811         vector change.
1812         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1813         change.
1814         tfile_traceframe_info): Allocate with new.
1815         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1816         change.
1817
1818 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1819
1820         * tracepoint.c (traceframe_info): Rename to...
1821         (current_traceframe_info): ...this.
1822         (clear_traceframe_info): Adjust.
1823         (get_traceframe_info): Adjust.
1824
1825 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1826
1827         * nat/linux-osdata.c: Include algorithm.
1828         (compare_processes): Remove.
1829         (struct pid_pgid_entry): New struct.
1830         (linux_xfer_osdata_processgroups): Use std::vector instead of
1831         XNEWVEC.
1832
1833 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1834
1835         * objfiles.h: Don't include symfile.h.
1836         (struct partial_symbol): Remove forward-declaration.
1837         (struct objfile) <global_psymbols, static_psymbols>: Change type
1838         to std::vector<partial_symbol *>.
1839         * objfiles.c (objfile::objfile): Don't memset those fields.
1840         (objfile::~objfile): Don't free those fields.
1841         * psympriv.h (struct psymbol_allocation_list): Remove
1842         forward-declaration.
1843         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1844         to std::vector.
1845         (start_psymtab_common): Change parameters to std::vector.
1846         * psymtab.c: Include algorithm.
1847         (require_partial_symbols): Call shrink_to_fit.
1848         (find_pc_sect_psymbol): Adjust to vector change.
1849         (match_partial_symbol): Likewise.
1850         (lookup_partial_symbol): Likewise.
1851         (psym_relocate): Likewise.
1852         (dump_psymtab): Likewise.
1853         (recursively_search_psymtabs): Likewise.
1854         (compare_psymbols): Remove.
1855         (sort_pst_symbols): Adjust to vector change.
1856         (start_psymtab_common): Likewise.
1857         (end_psymtab_common): Likewise.
1858         (psymbol_bcache_full): De-constify return value.
1859         (add_psymbol_to_bcache): Likewise.
1860         (extend_psymbol_list): Remove.
1861         (append_psymbol_to_list): Adjust to vector change.
1862         (add_psymbol_to_list): Likewise.
1863         (init_psymbol_list): Likewise.
1864         (maintenance_info_psymtabs): Likewise.
1865         (maintenance_check_psymtabs): Likewise.
1866         * symfile.h (struct psymbol_allocation_list): Remove.
1867         * symfile.c (reread_symbols): Adjust to vector change.
1868         * dbxread.c (start_psymtab): Change type of parameters.
1869         (dbx_symfile_read): Adjust to vector change.
1870         (read_dbx_symtab): Likewise.
1871         (start_psymtab): Change type of parameters.
1872         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1873         (create_partial_symtab): Likewise.
1874         (add_partial_symbol): Likewise.
1875         (write_one_signatured_type): Likewise.
1876         (recursively_write_psymbols): Likewise.
1877         * mdebugread.c (parse_partial_symbols): Likewise.
1878         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1879         (scan_xcoff_symtab): Adjust to vector change.
1880         (xcoff_initial_scan): Likewise.
1881
1882 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1883
1884         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1885
1886 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1887
1888         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1889         Remove s390x-*-expedite, add s390x-expedite.
1890
1891 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1892
1893         * features/s390-gs-linux64.c: Regenerated.
1894         * features/s390x-gs-linux64.c: Regenerated.
1895
1896 2017-10-13  Tom Tromey  <tom@tromey.com>
1897
1898         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1899         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1900         delete.
1901         * symfile.c (symbol_file_add_with_addrs): Use new.
1902         (symbol_file_add_separate): Update comment.
1903         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1904         * jit.c (jit_object_close_impl): Use new.
1905         (jit_unregister_code): Use delete.
1906         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1907         (~objfile): Rename from free_objfile.
1908         (free_objfile_separate_debug, do_free_objfile_cleanup)
1909         (free_all_objfiles, objfile_purge_solibs): Use delete.
1910         * objfiles.h (struct objfile): Add constructor and destructor.
1911         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1912         (allocate_objfile, free_objfile): Don't declare.
1913         (struct objstats): Add initializers.
1914
1915 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1916
1917         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1918         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1919         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1920         * gdbarch.h: Regenerate.
1921         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1922         Adjust comment.
1923         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1924         (i386_displaced_step_fixup): Adjust comment.
1925         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1926
1927 2017-10-12  Tom Tromey  <tom@tromey.com>
1928
1929         * prologue-value.h (pv_area::store_would_trash): Return bool.
1930         (pv_area::find_reg): Likewise.
1931         * prologue-value.c (pv_area::store_would_trash): Return bool.
1932         (pv_area::find_reg): Likewise.
1933
1934 2017-10-12  Tom Tromey  <tom@tromey.com>
1935
1936         * s390-linux-tdep.c (s390_store, s390_load)
1937         (s390_check_for_saved, s390_analyze_prologue): Update.
1938         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1939         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1940         * prologue-value.h (class pv_area): Move from prologue-value.c.
1941         Change names of members.  Add constructor, destructor, member
1942         functions.
1943         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1944         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1945         (pv_area_fetch, pv_area_scan): Don't declare.
1946         * prologue-value.c (struct pv_area::area_entry): Now member of
1947         pv_area.
1948         (struct pv_area): Move to prologue-value.h.
1949         (pv_area::pv_area): Rename from make_pv_area.
1950         (pv_area::~pv_area): Rename from free_pv_area.
1951         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1952         (clear_entries, find_entry, overlaps, store_would_trash, store)
1953         (fetch, find_reg, scan): Now member of pv_area.
1954         Remove "area" argument.  Update.
1955         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1956         Update.
1957         * mn10300-tdep.c (push_reg, check_for_saved)
1958         (mn10300_analyze_prologue): Update.
1959         * mep-tdep.c (is_arg_spill, check_for_saved)
1960         (mep_analyze_prologue): Update.
1961         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1962         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1963         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1964         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1965         Update.
1966         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1967         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1968
1969 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1970
1971         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1972         * linux-nat.c (linux_nat_delete_thread): New variable.
1973         (lwp_free): Invoke linux_nat_delete_thread if set.
1974         (linux_nat_set_delete_thread): New function.
1975         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1976         thread delete callback.
1977         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1978         (_initialize_arm_linux_nat): Assign thread delete callback.
1979         * s390-linux-nat.c (s390_delete_thread): New function.
1980         (_initialize_s390_nat): Assign thread delete callback.
1981         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1982         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1983         function.
1984         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1985         declaration.
1986         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1987         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1988
1989 2017-10-09  Tom Tromey  <tom@tromey.com>
1990
1991         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1992         std::string.
1993         * tui/tui-layout.c (enum tui_status): Use std::string.
1994
1995 2017-10-11  Tom Tromey  <tom@tromey.com>
1996
1997         * gdbthread.h (thread_command): Constify.
1998         * inferior.h (detach_command): Constify.
1999         * top.h (set_history, show_history): Constify.
2000         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2001         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2002         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2003         * printcmd.c (set_command): Constify.
2004         (non_const_set_command): New function.
2005         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2006         * breakpoint.c (enable_command, disable_command, delete_command)
2007         (catch_command, tcatch_command, set_breakpoint_cmd)
2008         (show_breakpoint_cmd): Constify.
2009         * macrocmd.c (macro_command): Constify.
2010         * infcmd.c (unset_command, kill_command, detach_command)
2011         (info_proc_cmd): Constify.
2012         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2013         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2014         (info_auto_load_cmd): Constify.
2015         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2016         (unset_tdesc_cmd): Constify.
2017         * ada-lang.c (set_ada_command, show_ada_command)
2018         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2019         * guile/guile.c (set_guile_command, show_guile_command)
2020         (info_guile_command): Constify.
2021         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2022         Constify.
2023         * skip.c (skip_command): Constify.
2024         * compile/compile.c (_initialize_compile): Constify.
2025         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2026         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2027         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2028         (maint_btrace_pt_show_cmd): Constify.
2029         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2030         Constify.
2031         * python/python.c (user_show_python, user_set_python): Constify.
2032         * mips-tdep.c (set_mips_command, show_mips_command)
2033         (set_mipsfpu_command): Constify.
2034         * record-btrace.c (cmd_record_btrace_start)
2035         (cmd_set_record_btrace, cmd_show_record_btrace)
2036         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2037         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2038         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2039         Constify.
2040         * symfile.c (overlay_command): Constify.
2041         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2042         * cli/cli-logging.c (set_logging_command, show_logging_command):
2043         Constify.
2044         * cli/cli-dump.c (dump_command, append_command)
2045         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2046         (tekhex_dump_command, binary_dump_command)
2047         (binary_append_command): Constify.
2048         * cli/cli-decode.c (struct cmd_list_element): Change type of
2049         "fun".
2050         * cli/cli-cmds.c (info_command, show_command, set_debug)
2051         (show_debug): Constify.
2052         (show_command): Add non-const overload.
2053         * top.c (set_history, show_history): Constify.
2054         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2055         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2056         * target.c (target_command): Constify.
2057         * sparc64-tdep.c (info_adi_command): Constify.
2058         * record-full.c (cmd_record_full_start): Constify.
2059         (set_record_full_command): Constify.  Fix typo.
2060         (show_record_full_command): Constify.
2061         * thread.c (thread_command, thread_apply_command): Constify.
2062         * memattr.c (dummy_cmd): Constify.
2063         * value.c (function_command): Constify.
2064         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2065         * probe.c (info_probes_command): Constify.
2066         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2067         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2068         (show_thread_cmd, set_thread_default_cmd)
2069         (show_thread_default_cmd): Constify.
2070         (check_empty): Constify.
2071         * tracepoint.c (tfind_command): Constify.
2072         * cp-support.c (maint_cplus_command): Constify.
2073         * windows-tdep.c (info_w32_command): Constify.
2074         * record.c (cmd_record_start, set_record_command)
2075         (show_record_command, info_record_command, cmd_record_goto):
2076         Constify.
2077         * ravenscar-thread.c (set_ravenscar_command)
2078         (show_ravenscar_command): Constify.
2079         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2080         Constify.
2081         (add_internal_problem_command): Remove casts.
2082         * arc-tdep.c (maintenance_print_arc_command): Constify.
2083         * valprint.c (set_print, show_print, set_print_raw)
2084         (show_print_raw): Constify.
2085         * maint.c (maintenance_command, maintenance_info_command)
2086         (maintenance_print_command, maintenance_set_cmd)
2087         (maintenance_show_cmd, set_per_command_cmd)
2088         (show_per_command_cmd, maintenance_check_command): Constify.
2089         * language.c (set_check, show_check): Constify.
2090         * typeprint.c (show_print_type, set_print_type): Constify.
2091         * go32-nat.c (go32_info_dos_command): Constify.
2092
2093 2017-10-11  Tom Tromey  <tom@tromey.com>
2094
2095         * breakpoint.c (prepare_re_set_context): Remove.
2096         (breakpoint_re_set_one): Update.  Don't use cleanups.
2097         (breakpoint_re_set): Use scoped_restore, std::string, and
2098         scoped_restore_current_language.
2099
2100 2017-10-11  Tom Tromey  <tom@tromey.com>
2101
2102         * breakpoint.c (commands_command_1): Use std::string.
2103         (cleanup_executing_breakpoints): Remove.
2104         (bpstat_do_actions_1): Use scoped_restore.
2105         (bpstat_check_watchpoint): Use std::string.
2106         (decode_static_tracepoint_spec): Likewise.
2107         (break_range_command): Likewise.
2108         (watch_command_1): Likewise.
2109         (compare_breakpoints): Change argument types.
2110         (clear_command): Use std::vector.
2111         (cleanup_executing_breakpoints): Remove.
2112         (update_global_location_list): Use unique_xmalloc_ptr.
2113         (strace_command): Remove unused declaration.
2114
2115 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2116
2117         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2118         * NEWS: Mention new FreeBSD/arm native configuration.
2119         * configure.host: Add arm*-*-freebsd*.
2120         * configure.nat: Likewise.
2121         * arm-fbsd-nat.c: New file.
2122
2123 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2124
2125         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2126         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2127         * NEWS: Mention new FreeBSD/arm target.
2128         * configure.tgt: Add arm*-*-freebsd*.
2129         * arm-fbsd-tdep.c: New file.
2130         * arm-fbsd-tdep.h: New file.
2131
2132 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2133
2134         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2135         `gdbarch_elfcore_write_linux_prpsinfo'.
2136         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2137         method.
2138         (elf_internal_linux_prpsinfo): Remove declaration.
2139         * gdbarch.h: Regenerate.
2140         * gdbarch.c: Regenerate.
2141
2142 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2143
2144         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2145         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2146
2147 2017-10-11  Pedro Alves  <palves@redhat.com>
2148
2149         * breakpoint.c (reattach_breakpoints): Delete.
2150         * breakpoint.h (reattach_breakpoints): Delete.
2151
2152 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2153
2154         * symfile.c (registered_sym_fns): Make struct, not typedef.
2155         (DEF_VEC_O (registered_sym_fns)): Remove.
2156         (symtab_fns): Change type to std::vector.
2157         (add_symtab_fns): Adjust.
2158         (find_sym_fns): Adjust.
2159
2160 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2161
2162         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2163         * arc-tdep.h (arc_arch_is_em): New function.
2164         (arc_arch_is_hs): Likewise.
2165
2166 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2167
2168         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2169         parentheses in the declaration.
2170         (macro_lookup_inclusion): Likewise.
2171         (macro_lookup_definition): Likewise.
2172         * p-lang.h (pascal_builtin_types): Likewise.
2173         * tui/tui-data.c (tui_win_list): Likewise.
2174         * tui/tui-data.h (tui_win_list): Likewise.
2175         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2176
2177 2017-10-11  Mark Rages  <markrages@gmail.com>
2178
2179         * target-memory.c (block_boundaries): Fix for block address not
2180         aligned on block size.
2181
2182 2017-10-10  Pedro Alves <palves@redhat.com>
2183             Tom Tromey  <tom@tromey.com>
2184
2185         * breakpoint.c (struct captured_breakpoint_query_args)
2186         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2187         (print_breakpoint): New.
2188         * breakpoint.h (print_breakpoint): Declare.
2189         * common/common-exceptions.h (enum return_reason): Remove
2190         references to catch_exceptions.
2191         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2192         Delete.
2193         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2194         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2195         * gdb.h: Delete.
2196         * gdbthread.h (thread_select): Declare.
2197         * mi/mi-cmd-break.c: Don't include gdb.h.
2198         (breakpoint_notify): Use print_breakpoint.
2199         * mi/mi-cmd-catch.c: Don't include gdb.h.
2200         * mi/mi-interp.c: Don't include gdb.h.
2201         (mi_print_breakpoint_for_event): New.
2202         (mi_breakpoint_created, mi_breakpoint_modified): Use
2203         mi_print_breakpoint_for_event.
2204         * mi/mi-main.c: Don't include gdb.h.
2205         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2206         thread_select instead of gdb_thread_select.
2207         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2208         of using gdb_list_thread_ids.
2209         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2210         FILEIO_ENOSYS here.
2211         (remote_fileio_request): Use TRY/CATCH instead of
2212         catch_exceptions.
2213         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2214         (symbol_file_add_from_memory_wrapper): Delete.
2215         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2216         * thread.c: Don't include gdb.h.
2217         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2218         (thread_alive): Use thread_select.
2219         (do_captured_thread_select): Delete, parts salvaged as ...
2220         (thread_select): ... this new function.
2221         (gdb_thread_select): Delete.
2222
2223 2017-10-10  Pedro Alves  <palves@redhat.com>
2224             Tom Tromey  <tom@tromey.com>
2225
2226         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2227         and reverse logic.
2228         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2229         No longer macros.  Instead ...
2230         (enum wp_check_result): They're now values of this new
2231         enumeration.
2232         (watchpoint_check): Change return type to wp_check_result and
2233         parameter type to bpstat.
2234         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2235         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2236         catch_errors.  Reverse logic of watchpoint_check call.
2237         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2238         pointer as parameter.
2239         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2240         * common/common-exceptions.c (throw_exception_sjlj): Update
2241         comments to avoid mentioning catch_errors.
2242         * exceptions.c (catch_errors): Delete.
2243         * exceptions.h: Update comments to avoid mentioning catch_errors.
2244         (catch_errors_ftype, catch_errors): Delete.
2245         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2246         (hook_stop_stub): Delete.
2247         (restore_selected_frame): Change return type to void, and
2248         parameter type to const frame_id &.
2249         (restore_infcall_control_state): Use TRY/CATCH instead of
2250         catch_errors.
2251         * main.c (captured_command_loop): Return void and remove
2252         parameter.  Remove references to catch_errors.
2253         (captured_main): Use TRY/CATCH instead of catch_errors.
2254         * objc-lang.c (objc_submethod_helper_data)
2255         (find_objc_msgcall_submethod_helper): Delete.
2256         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2257         catch_errors.
2258         * record-full.c (record_full_message): Return void.
2259         (record_full_message_args, record_full_message_wrapper): Delete.
2260         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2261         instead of catch_errors.
2262         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2263         parameter type to int.
2264         * solib-darwin.c (open_symbol_file_object): Ditto.
2265         * solib-dsbt.c (open_symbol_file_object): Ditto.
2266         * solib-frv.c (open_symbol_file_object): Ditto.
2267         * solib-svr4.c (open_symbol_file_object): Ditto.
2268         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2269         * solib.c (update_solib_list): Use TRY/CATCH instead of
2270         catch_errors.
2271         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2272         Change type.
2273         * symmisc.c (struct print_symbol_args): Remove.
2274         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2275         (print_symbol): Change type.
2276         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2277         and remove parameters.
2278         (catch_errors): New.
2279         (get_windows_debug_event): Adjust.
2280
2281 2017-10-09  Tom Tromey  <tom@tromey.com>
2282
2283         * mi/mi-main.c (free_splay_tree): Remove.
2284         (list_available_thread_groups): Use splay_tree_up.
2285         * common/gdb_splay_tree.h: New file.
2286
2287 2017-10-09  Tom Tromey  <tom@tromey.com>
2288
2289         * mi/mi-main.c (do_nothing): Remove.
2290         (list_available_thread_groups): Update.
2291
2292 2017-10-09  Pedro Alves  <palves@redhat.com>
2293
2294         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2295         reading registers when switching context.
2296
2297 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2298
2299         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2300         (fbsd_convert_siginfo): Likewise.
2301         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2302
2303 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2304
2305         * configure.ac (try_guile_versions): Remove guile-2.2.
2306         * configure: Regenerate.
2307
2308 2017-10-09  Tom Tromey  <tom@tromey.com>
2309
2310         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2311         (COMPILE.pre): Use $(CXX).
2312
2313 2017-10-09  Pedro Alves  <palves@redhat.com>
2314
2315         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2316         Use bool.
2317         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2318         * cp-support.h (cp_remove_params): Now returns a
2319         gdb::unique_xmalloc_ptr.
2320         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2321         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2322         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2323         returning a gdb::unique_xmalloc_ptr.
2324         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2325         * stack.c (find_frame_funname): Adjust to cp_remove_params
2326         returning a gdb::unique_xmalloc_ptr.
2327
2328 2017-10-08  Tom Tromey  <tom@tromey.com>
2329
2330         * dwarf2read.c (dwarf2_get_dwz_file): Use
2331         gdb::unique_xmalloc_ptr.
2332         (find_slot_in_mapped_hash): Likewise.
2333         (dwarf2_physname): Likewise.
2334         (create_dwo_unit_in_dwp_v1): Use std::string.
2335         (create_dwo_unit_in_dwp_v2): Likewise.
2336         (lookup_dwo_cutu): Likewise.
2337         (inherit_abstract_dies): Use std::vector.
2338         (read_array_type): Likewise.
2339         (dwarf_decode_macros): Remove unused declaration.
2340         (unsigned_int_compar): Remove.
2341         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2342         (psymtabs_addrmap_cleanup): Remove.
2343
2344 2017-10-08  Tom Tromey  <tom@tromey.com>
2345
2346         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2347         * frame.h (frame_cleanup_after_sniffer): Declare.
2348         (frame_prepare_for_sniffer): Return void.
2349         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2350         type of argument.
2351         (frame_prepare_for_sniffer): Return void.
2352
2353 2017-10-08  Tom Tromey  <tom@tromey.com>
2354
2355         * utils.h (make_cleanup_value_free): Remove.
2356         * utils.c (do_value_free, struct cleanup): Remove.
2357         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2358         Use gdb_value_up.
2359         * value.h (struct value_deleter): New.
2360         (gdb_value_up): New typedef.
2361
2362 2017-10-08  Tom Tromey  <tom@tromey.com>
2363
2364         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2365         (make_cleanup_free_search_symbols): Remove.
2366         (search_symbols): Return std::vector.
2367         (symbol_search::compare_search_syms): Now member of
2368         symbol_search.  Change arguments.
2369         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2370         (symtab_symbol_info, rbreak_command): Update.
2371         * symtab.h (struct symbol_search) <next>: Remove.
2372         Add constructors.
2373         (symbol_search::operator<): New function.
2374         (symbol_search::operator==): New function.
2375         (search_symbols): Remove std::vector.
2376         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2377         (symbol_search::compare_search_syms): Declare.
2378
2379 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2380
2381         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2382         arch/aarch64-insn.o.
2383         Remove one rule.
2384         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2385
2386 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2387
2388         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2389         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2390         arch/arm-linux.o respectively.
2391         * configure.tgt: Likewise.
2392
2393 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2394
2395         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2396         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2397
2398 2017-10-06  Pedro Alves  <palves@redhat.com>
2399
2400         * windows-nat.c: Include <algorithm>.
2401
2402 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2403
2404         * configure.tgt (i386_tobjs): New variable.
2405         (amd64_tobjs): New variable.
2406         Set $cpu_obs and $os_obs.
2407
2408 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2409
2410         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2411         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2412         (clean): Remove object files and dependency files.
2413         (distclean): Remove the directory.
2414         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2415         * configure: Re-generated.
2416         * configure.tgt: Replace amd64.o with arch/amd64.o.
2417
2418 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2419
2420         PR build/22188
2421         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2422         and SETEND.
2423
2424 2017-10-05  Pedro Alves  <palves@redhat.com>
2425
2426         * linux-nat.c (linux_child_follow_fork): When following the parent
2427         and detaching the child, consult the parent thread's architecture
2428         instead of the child's.
2429
2430 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2431
2432         * ax.h: Do not include "doublest.h".
2433         (union agent_val): Remove.
2434
2435 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2436
2437         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2438         (decimal_to_string): Return std::string object.
2439         (decimal_from_string): Accept std::string object.  Return bool.
2440         (decimal_from_integral, decimal_from_doublest): Remove.
2441         (decimal_from_longest): Add prototype.
2442         (decimal_from_ulongest): Likewise.
2443         (decimal_to_longest): Likewise.
2444         (decimal_from_doublest): Likewise.
2445         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2446         (MAX_DECIMAL_STRING): Move here.
2447         (decimal_to_string): Return std::string object.
2448         (decimal_from_string): Accept std::string object.  Return bool.
2449         (decimal_from_integral): Remove, replace by ...
2450         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2451         (decimal_to_longest): New function.
2452         (decimal_from_floating): Remove, replace by ...
2453         (decimal_from_doublest): ... this new function.
2454         (decimal_to_doublest): Update to new decimal_to_string interface.
2455
2456         * value.c (unpack_long): Use decimal_to_longest.
2457         * valops.c (value_cast): Use decimal_from_doublest instead of
2458         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2459         decimal_from_integral.
2460         * valarith.c (value_args_as_decimal): Likewise.
2461         * valprint.c (print_decimal_floating): Update to new
2462         decimal_to_string interface.
2463         * printcmd.c (printf_decfloat): Likewise.
2464         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2465
2466 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2467
2468         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2469         * gdbtypes.c: Include "floatformat.h".
2470         * value.c: Likewise.
2471         * m68k-tdep.c: Likewise.
2472
2473         * findvar.c: Do not include "floatformat.h".
2474         * amd64-darwin-tdep.c: Likewise.
2475         * arm-linux-tdep.c: Likewise.
2476         * i386-darwin-tdep.c: Likewise.
2477         * i387-tdep.c: Likewise.
2478         * m68k-linux-tdep.c: Likewise.
2479         * mep-tdep.c: Likewise.
2480         * mips-tdep.c: Likewise.
2481         * nios2-tdep.c: Likewise.
2482         * s390-linux-tdep.c: Likewise.
2483         * sparc-obsd-tdep.c: Likewise.
2484         * sparc-tdep.c: Likewise.
2485         * sparc64-tdep.c: Likewise.
2486         * spu-tdep.c: Likewise.
2487         * tic6x-tdep.c: Likewise.
2488         * tilegx-tdep.c: Likewise.
2489         * vax-tdep.c: Likewise.
2490         * xstormy16-tdep.c: Likewise.
2491         * xtensa-tdep.c: Likewise.
2492
2493         * top.c: Do not include "doublest.h".
2494         * aarch64-tdep.c: Likewise.
2495         * alpha-tdep.c: Likewise.
2496         * arm-linux-tdep.c: Likewise.
2497         * m68k-linux-tdep.c: Likewise.
2498         * tilegx-tdep.c: Likewise.
2499         * xstormy16-tdep.c: Likewise.
2500
2501 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2502
2503         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2504         (mipsn32_fbsd_sigframe): Define.
2505         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2506         for FreeBSD/mipsn32.
2507
2508 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2509
2510         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2511         AT_HWCAP.
2512
2513 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2514
2515         * MAINTAINERS (Misc): Update my email address.
2516
2517 2017-10-04  Pedro Alves  <palves@redhat.com>
2518
2519         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2520         it instead of target_gdbarch.
2521         (get_remote_state, get_remote_packet_size): Adjust
2522         get_remote_arch_state calls, passing down target_gdbarch
2523         explicitly.
2524         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2525         'gdbarch' and use it instead of target_gdbarch.
2526         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2527         passing down target_gdbarch explicitly.
2528         (struct stop_reply) <arch>: New field.
2529         (remote_parse_stop_reply): Use the stopped thread's architecture,
2530         not the current inferior's.  Save the architecture in the
2531         stop_reply.
2532         (process_stop_reply): Use the stop reply's architecture.
2533         (process_g_packet, remote_fetch_registers)
2534         (remote_prepare_to_store, store_registers_using_G)
2535         (remote_store_registers): Adjust get_remote_arch_state calls,
2536         using the regcache's architecture.
2537         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2538         passing down target_gdbarch explicitly.
2539         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2540         beneath instead of calling target_gdbarch.
2541         * target.c (default_thread_architecture): Use the specified
2542         inferior's architecture, instead of the current inferior's
2543         architecture (via target_gdbarch).
2544
2545 2017-10-04  Pedro Alves  <palves@redhat.com>
2546
2547         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2548         case.
2549         (regcache_print): Handle !target_has_registers here instead.
2550
2551 2017-10-04  Pedro Alves  <palves@redhat.com>
2552
2553         * frame.c (create_test_frame): Delete.
2554         * frame.h (create_test_frame): Delete.
2555         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2556         (class regcache_test): Delete.
2557         (test_target_has_registers, test_target_has_stack)
2558         (test_target_has_memory, test_target_prepare_to_store)
2559         (test_target_store_registers): New functions.
2560         (test_target_ops): New class.
2561         (register_to_value_test): Error out if there's already a
2562         process_stratum (or higher) target pushed.  Create a fuller mock
2563         environment, with mock target_ops, inferior, address space, thread
2564         and inferior_ptid.
2565         * progspace.c (struct address_space): Move to ...
2566         * progspace.h (struct address_space): ... here.
2567         * regcache.h (regcache::~regcache, regcache::raw_write)
2568         [GDB_SELF_TEST]: No longer virtual.
2569
2570 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2571
2572         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2573
2574 2017-10-04  Pedro Alves  <palves@redhat.com>
2575
2576         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2577         out of 'between TRY and CATCH'.
2578
2579 2017-10-04  Pedro Alves  <palves@redhat.com>
2580
2581         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2582         * common/common-exceptions.h (TRY): Open an outermost scope.
2583         Expand intro comment.
2584         (CATCH): Reindent.
2585         (END_CATCH): Close the outermost scope.
2586         * completer.c (complete_line_internal): Add missing END_CATCH.
2587
2588 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2589
2590         * NEWS (Changes since GDB 8.0): Add entry about new
2591         'set-cwd-on-gdbserver' feature.
2592         (New remote packets): Add entry for QSetWorkingDir.
2593         * common/common-inferior.h (set_inferior_cwd): New prototype.
2594         * infcmd.c (set_inferior_cwd): Remove "static".
2595         (show_cwd_command): Expand text to include remote debugging.
2596         * remote.c: Add PACKET_QSetWorkingDir.
2597         (remote_protocol_features) <QSetWorkingDir>: New entry for
2598         PACKET_QSetWorkingDir.
2599         (extended_remote_set_inferior_cwd): New function.
2600         (extended_remote_create_inferior): Call
2601         "extended_remote_set_inferior_cwd".
2602         (_initialize_remote): Call "add_packet_config_cmd" for
2603         QSetWorkingDir.
2604
2605 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2606
2607         * NEWS (New commands): Mention "set/show cwd".
2608         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2609         "cd" command's help text.
2610         * common/common-inferior.h (get_inferior_cwd): New prototype.
2611         * infcmd.c (inferior_cwd_scratch): New global variable.
2612         (set_inferior_cwd): New function.
2613         (get_inferior_cwd): Likewise.
2614         (set_cwd_command): Likewise.
2615         (show_cwd_command): Likewise.
2616         (_initialize_infcmd): Add "set/show cwd" commands.
2617         * inferior.h (class inferior) <cwd>: New field.
2618         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2619         (fork_inferior): Change inferior's cwd before its execution.
2620         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2621         to CreateProcess.
2622
2623 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2624
2625         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2626         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2627         (COMMON_OBS): Add gdb_tilde_expand.o.
2628         * common/gdb_tilde_expand.c: New file.
2629         * common/gdb_tilde_expand.h: Likewise.
2630
2631 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2632
2633         * gdbarch.sh (objfile): Remove duplicate declaration.
2634         * gdbarch.h: Regenerate.
2635
2636 2017-10-03  Tom Tromey  <tom@tromey.com>
2637
2638         * utils.c (internal_vproblem): Use string_vprintf.
2639
2640 2017-10-03  Tom Tromey  <tom@tromey.com>
2641
2642         * printcmd.c (info_symbol_command): Use std::string.
2643
2644 2017-10-03  Tom Tromey  <tom@tromey.com>
2645
2646         * top.c (gdb_safe_append_history): Use std::string.
2647
2648 2017-10-03  Tom Tromey  <tom@tromey.com>
2649
2650         * event-top.c (stdin_event_handler): Update.
2651         * main.c (captured_main_1): Update.
2652         * top.h (make_delete_ui_cleanup): Remove.
2653         (struct ui): Add constructor and destructor.
2654         (new_ui, delete_ui): Remove.
2655         * top.c (make_delete_ui_cleanup): Remove.
2656         (new_ui_command): Use std::unique_ptr.
2657         (delete_ui_cleanup): Remove.
2658         (ui::ui): Rename from new_ui.  Update.
2659         (free_ui): Remove.
2660         (ui::~ui): Rename from delete_ui.  Update.
2661
2662 2017-10-03  Tom Tromey  <tom@tromey.com>
2663
2664         * symfile.c (load_progress): Use gdb::byte_vector.
2665
2666 2017-10-03  Tom Tromey  <tom@tromey.com>
2667
2668         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2669         declaration.
2670         * printcmd.c (x_command): Remove unused declaration.
2671         * symfile.c (symbol_file_command): Remove unused declaration.
2672
2673 2017-10-03  Tom Tromey  <tom@tromey.com>
2674
2675         * utils.c (internal_vproblem): Use std::string.
2676         (defaulted_query): Likewise.
2677
2678 2017-10-03  Tom Tromey  <tom@tromey.com>
2679
2680         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2681         * top.c (execute_command_to_string): Update.
2682         * utils.c (make_cleanup_restore_page_info): Remove.
2683         (do_restore_page_info_cleanup): Remove.
2684         (set_batch_flag_and_restore_page_info):
2685         New.
2686         (make_cleanup_restore_page_info): Remove.
2687         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2688         (~set_batch_flag_and_restore_page_info): New
2689         (make_cleanup_restore_uinteger): Remove.
2690         (make_cleanup_restore_integer): Remove.
2691         (struct restore_integer_closure): Remove.
2692         (restore_integer): Remove.
2693         * utils.h (struct set_batch_flag_and_restore_page_info): New
2694         class.
2695         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2696         (make_cleanup_restore_page_info): Remove.
2697         (make_cleanup_restore_uinteger) Remove.
2698         (make_cleanup_restore_integer) Remove.
2699
2700 2017-10-03  Tom Tromey  <tom@tromey.com>
2701
2702         * record-full.h (record_full_gdb_operation_disable_set): Return
2703         scoped_restore_tmpl<int>.
2704         * infrun.c (adjust_pc_after_break): Update.
2705         (handle_signal_stop): Update.
2706         * record-full.c (record_full_gdb_operation_disable_set): Return
2707         scoped_restore_tmpl<int>.
2708         (record_full_wait_1, record_full_insert_breakpoint)
2709         (record_full_remove_breakpoint, record_full_save)
2710         (record_full_goto_insn): Update.
2711
2712 2017-10-02  Tom Tromey  <tom@tromey.com>
2713
2714         PR rust/22236:
2715         * rust-lang.c (rust_val_print_str): New function.
2716         (val_print_struct): Call it.
2717         (rust_subscript): Preserve name of slice type.
2718
2719 2017-10-02  Tom Tromey  <tom@tromey.com>
2720
2721         * rust-lang.c (rust_subscript): Handle slices in
2722         EVAL_AVOID_SIDE_EFFECTS case.
2723
2724 2017-10-02  Tom Tromey  <tom@tromey.com>
2725
2726         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2727
2728 2017-10-02  Tom Tromey  <tom@tromey.com>
2729
2730         * rust-lang.h (rust_slice_type): Add "extern".
2731
2732 2017-10-02  Tom Tromey  <tom@tromey.com>
2733             Pedro Alves  <palves@redhat.com>
2734
2735         * ada-lang.h (ada_exc_info::operator<): Make const.
2736         (ada_exc_info::operator==): Make const.
2737         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2738         Make const.
2739
2740 2017-09-29  Tom Tromey  <tom@tromey.com>
2741
2742         * target.c (read_whatever_is_readable): Change type of "result".
2743         Update.
2744         (free_memory_read_result_vector): Remove.
2745         (read_memory_robust): Change return type.  Update.
2746         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2747         bin2hex, std::string.
2748         * target.h (memory_read_result_s): Remove typedef.
2749         (free_memory_read_result_vector): Remove.
2750         (read_memory_robust): Return std::vector.
2751
2752 2017-09-29  Tom Tromey  <tom@tromey.com>
2753
2754         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2755
2756 2017-09-29  Tom Tromey  <tom@tromey.com>
2757
2758         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2759         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2760         operator< and operator==.
2761         (ada_exceptions_list): Return a std::vector.
2762         * ada-lang.c (ada_exc_info::operator<): Rename from
2763         compare_ada_exception_info.
2764         (ada_exc_info::operator==): New.
2765         (sort_remove_dups_ada_exceptions_list): Change type of
2766         "exceptions".
2767         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2768         (ada_add_global_exceptions): Likewise.
2769         (ada_exceptions_list_1): Return a std::vector.
2770         (ada_exceptions_list): Likewise.
2771
2772 2017-09-29  Tom Tromey  <tom@tromey.com>
2773
2774         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2775         'std::set *'.
2776         (print_one_inferior): Update.
2777         (free_vector_of_ints): Remove.
2778         (list_available_thread_groups): Change "ids" to std::set.
2779         (mi_cmd_list_thread_groups): Update.
2780         (struct collect_cores_data) <core>: Now a std::set.
2781         (collect_cores): Update.
2782         (unique): Remove.
2783         (print_one_inferior): Update.
2784
2785 2017-09-29  Tom Tromey  <tom@tromey.com>
2786
2787         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2788         (mi_execute_async_cli_command): Likewise.
2789         (mi_cmd_trace_frame_collected): Use field_fmt.
2790
2791 2017-09-29  Tom Tromey  <tom@tromey.com>
2792
2793         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2794         gdb::byte_vector.
2795
2796 2017-09-29  Tom Tromey  <tom@tromey.com>
2797
2798         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2799
2800 2017-09-29  Tom Tromey  <tom@tromey.com>
2801
2802         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2803
2804 2017-09-29  Tom Tromey  <tom@tromey.com>
2805
2806         * varobj.h (varobj_gen_name): Return std::string.
2807         * varobj.c (varobj_gen_name): Return std::string.
2808         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2809         (mi_cmd_var_delete): Don't copy "name".
2810
2811 2017-09-29  Tom Tromey  <tom@tromey.com>
2812
2813         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2814         (mi_cmd_break_insert_1): Update.
2815
2816 2017-09-29  Tom Tromey  <tom@tromey.com>
2817
2818         * target.h (make_scoped_defer_target_commit_resume): Update.
2819         * target.c (make_scoped_defer_target_commit_resume): Rename from
2820         make_cleanup_defer_target_commit_resume.  Return a
2821         scoped_restore.
2822         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2823
2824 2017-09-29  Tom Tromey  <tom@tromey.com>
2825
2826         * main.c (captured_main_1): Remove unused declaration.
2827         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2828
2829 2017-09-29  Tom Tromey  <tom@tromey.com>
2830
2831         * symtab.c (search_symbols): Remove unused outer cleanup.
2832         (make_source_files_completion_list): Remove unused declaration.
2833
2834 2017-09-29  Tom Tromey  <tom@tromey.com>
2835
2836         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2837
2838 2017-09-29  Tom Tromey  <tom@tromey.com>
2839
2840         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2841         gdb::byte_vector.
2842
2843 2017-09-29  Tom Tromey  <tom@tromey.com>
2844
2845         * complaints.c (vcomplaint): Use std::string.
2846
2847 2017-09-29  Tom Tromey  <tom@tromey.com>
2848
2849         * tracepoint.c (trace_variable_command): Use std::string.
2850         (encode_actions_1): Remove unused declarations.
2851         (create_tsv_from_upload): Use std::string.
2852
2853 2017-09-29  Tom Tromey  <tom@tromey.com>
2854
2855         * cp-support.c (gdb_demangle): Use std::string.
2856
2857 2017-09-29  Tom Tromey  <tom@tromey.com>
2858
2859         * stack.c (parse_frame_specification): Use std::string
2860         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2861
2862 2017-09-29  Tom Tromey  <tom@tromey.com>
2863
2864         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2865
2866 2017-09-29  Tom Tromey  <tom@tromey.com>
2867
2868         * utils.c (vfprintf_maybe_filtered): Use std::string.
2869         (vfprintf_unfiltered): Likewise.
2870
2871 2017-09-29  Tom Tromey  <tom@tromey.com>
2872
2873         * event-top.c (top_level_prompt): Return std::string.
2874         (display_gdb_prompt): Update.
2875
2876 2017-09-29  Tom Tromey  <tom@tromey.com>
2877
2878         * unittests/common-utils-selftests.c (format): New function.
2879         (string_vprintf_tests): New function.
2880         (_initialize_common_utils_selftests): Register new tests.
2881         * common/common-utils.c (string_vprintf): New function.
2882         * common/common-utils.h (string_vprintf): Declare.
2883
2884 2017-09-29  Pedro Alves  <palves@redhat.com>
2885
2886         * common/rsp-low.c (unpack_varlen_hex): Constify.
2887         * common/rsp-low.h (unpack_varlen_hex): Constify.
2888         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2889         Constify.
2890         * remote.c (remote_set_permissions, read_ptid)
2891         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2892         (remote_static_tracepoint_marker_at)
2893         (remote_static_tracepoint_markers_by_strid)
2894         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2895         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2896         (parse_tracepoint_definition, parse_tsv_definition)
2897         (parse_static_tracepoint_marker_definition): Constify.
2898         * tracepoint.h (parse_static_tracepoint_marker_definition)
2899         (parse_trace_status, parse_tracepoint_status)
2900         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2901
2902 2017-09-29  Pedro Alves  <palves@redhat.com>
2903
2904         * remote.c (target_buf, target_buf_size): Delete.
2905         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2906         Use the connection's packet buffer instead.
2907         All callers adjusted.
2908         (_initialize_remote): Remove references to target_buf and
2909         target_buf_size.
2910
2911 2017-09-28  Pedro Alves  <palves@redhat.com>
2912
2913         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2914         unittests/common-utils-selftests.c.
2915         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2916         (COMMON_OBS): Remove utils-selftests.o.
2917         * utils-selftests.c: Move to ...
2918         * unittests/common-utils-selftests.c: ... here and rename self
2919         test to "string_printf".
2920
2921 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2922
2923         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2924         having NULL cus or tus.
2925
2926 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2927
2928         * arm-tdep.c: (convert_from_extended): Remove.
2929         (convert_to_extended): Likewise.
2930         (arm_extract_return_value): Use convert_typed_floating.
2931         (arm_store_return_value): Likewise.
2932
2933         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2934         * sh-tdep.c: Do not include "floatformat.h".
2935         (sh_littlebyte_bigword_type): New function.
2936         (sh_register_convert_to_virtual): Use convert_typed_floating.
2937         (sh_register_convert_to_raw): Likewise.
2938         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2939         (sh64_littlebyte_bigword_type): New function.
2940         (sh64_extract_return_value): Use convert_typed_floating.
2941         (sh64_register_convert_to_virtual): Likewise.
2942         (sh64_register_convert_to_raw): Likewise.
2943
2944 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2945
2946         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2947         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2948
2949         * gdbtypes.h (union type_specific): Make field floatformat hold
2950         just a single struct floatformat, not an array.
2951         (floatformat_from_type): Move here.
2952         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2953         changed TYPE_FLOATFORMAT definition.
2954         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2955         (recursive_dump_type): Likewise.
2956         (init_float_type): Install correct floatformat for byte order.
2957         (arch_float_type): Likewise.
2958
2959 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2960
2961         * gdbtypes.c (init_type): Change incoming argument from
2962         length-in-bytes to length-in-bits.  Assert length is a
2963         multiple of TARGET_CHAR_BITS.
2964         (arch_type, arch_flags_type): Likewise.
2965         (init_integer_type): Update call to init_type.
2966         (init_character_type): Likewise.
2967         (init_boolean_type): Likewise.
2968         (init_float_type): Likewise.
2969         (init_decfloat_type): Likewise.
2970         (init_complex_type): Likewise.
2971         (init_pointer_type): Likewise.
2972         (objfile_type): Likewise.
2973         (arch_integer_type): Update call to arch_type.
2974         (arch_character_type): Likewise.
2975         (arch_boolean_type): Likewise.
2976         (arch_float_type): Likewise.
2977         (arch_decfloat_type): Likewise.
2978         (arch_complex_type): Likewise.
2979         (arch_pointer_type): Likewise.
2980         (gdbtypes_post_init): Likewise.
2981
2982         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2983         (read_base_type): Likewise.
2984         * mdebugread.c (basic_type): Likewise.
2985         * stabsread.c (dbx_init_float_type): Likewise.
2986         (rs6000_builtin_type): Likewise.
2987         (read_range_type): Likewise.  Also, fix call to init_integer_type
2988         with erroneous length argument.
2989
2990         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2991         * d-lang.c (build_d_types): Likewise.
2992         * f-lang.c (build_fortran_types): Likewise.
2993         * go-lang.c (build_go_types): Likewise.
2994         * opencl-lang.c (build_opencl_types): Likewise.
2995         * jit.c (finalize_symtab): Likewise.
2996         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2997         (build_std_type_info_type): Likewise.
2998         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2999         update call to arch_flags_type.
3000
3001         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3002         arch_type.
3003         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3004         * windows-tdep.c (windows_get_tlb_type): Likewise.
3005
3006         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3007         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3008         * m32c-tdep.c (make_types): Likewise.
3009         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3010         (rl78_psw_type): Update call to arch_flags_type.
3011         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3012         * rx-tdep.c (rx_psw_type): Likewise.
3013         (rx_fpsw_type): Likewise.
3014         * sparc-tdep.c (sparc_psr_type): Likewise.
3015         (sparc_fsr_type): Likewise.
3016         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3017         (sparc64_ccr_type): Likewise.
3018         (sparc64_fsr_type): Likewise.
3019         (sparc64_fprs_type): Likewise.
3020
3021 2017-09-27  Tom Tromey  <tom@tromey.com>
3022
3023         * findcmd.c (find_command): Constify.
3024
3025 2017-09-27  Tom Tromey  <tom@tromey.com>
3026
3027         * ada-tasks.c (task_command_1, task_command): Constify.
3028
3029 2017-09-27  Tom Tromey  <tom@tromey.com>
3030
3031         * symtab.c (maintenance_print_symbol_cache)
3032         (maintenance_flush_symbol_cache)
3033         (maintenance_print_symbol_cache_statistics): Constify.
3034
3035 2017-09-27  Tom Tromey  <tom@tromey.com>
3036
3037         * inferior.c (detach_inferior_command, kill_inferior_command)
3038         (inferior_command): Constify.
3039
3040 2017-09-27  Tom Tromey  <tom@tromey.com>
3041
3042         * regcache.c (regcache_print, maintenance_print_registers)
3043         (maintenance_print_raw_registers)
3044         (maintenance_print_cooked_registers)
3045         (maintenance_print_register_groups)
3046         (maintenance_print_remote_registers): Constify.
3047
3048 2017-09-27  Tom Tromey  <tom@tromey.com>
3049
3050         * printcmd.c (map_display_numbers, undisplay_command)
3051         (enable_disable_display_command, enable_display_command)
3052         (disable_display_command): Constify.
3053
3054 2017-09-27  Tom Tromey  <tom@tromey.com>
3055
3056         * breakpoint.h (delete_command): Don't declare.
3057         * breakpoint.c (delete_command, enable_once_command)
3058         (enable_count_command, enable_delete_command, breakpoint_1)
3059         (maintenance_info_breakpoints, stopin_command, stopat_command)
3060         (delete_command, delete_trace_command, save_breakpoints)
3061         (save_breakpoints_command, save_tracepoints_command): Constify.
3062
3063 2017-09-27  Tom Tromey  <tom@tromey.com>
3064
3065         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3066         (skip_ws, extract_identifier, macro_define_command)
3067         (macro_undef_command, macro_list_command): Constify.
3068
3069 2017-09-27  Tom Tromey  <tom@tromey.com>
3070
3071         * infcmd.c (environment_info, set_environment_command)
3072         (unset_environment_command, path_info, info_proc_cmd_1)
3073         (info_proc_cmd_mappings, info_proc_cmd_stat)
3074         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3075         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3076
3077 2017-09-27  Tom Tromey  <tom@tromey.com>
3078
3079         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3080         Constify.
3081
3082 2017-09-27  Tom Tromey  <tom@tromey.com>
3083
3084         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3085
3086 2017-09-27  Tom Tromey  <tom@tromey.com>
3087
3088         * demangle.c (demangle_command): Constify.
3089
3090 2017-09-27  Tom Tromey  <tom@tromey.com>
3091
3092         * progspace.c (maintenance_info_program_spaces_command):
3093         Constify.
3094
3095 2017-09-27  Tom Tromey  <tom@tromey.com>
3096
3097         * compile/compile.c (check_raw_argument, compile_file_command)
3098         (compile_code_command, compile_print_command): Constify.
3099
3100 2017-09-27  Tom Tromey  <tom@tromey.com>
3101
3102         * reggroups.c (maintenance_print_reggroups): Constify.
3103
3104 2017-09-27  Tom Tromey  <tom@tromey.com>
3105
3106         * dwarf2read.c (save_gdb_index_command): Constify.
3107
3108 2017-09-27  Tom Tromey  <tom@tromey.com>
3109
3110         * stap-probe.c (info_probes_stap_command): Constify.
3111
3112 2017-09-27  Tom Tromey  <tom@tromey.com>
3113
3114         * fork-child.c (unset_exec_wrapper_command): Constify.
3115
3116 2017-09-27  Tom Tromey  <tom@tromey.com>
3117
3118         * btrace.c (get_uint, get_context_size, no_chunk)
3119         (maint_btrace_packet_history_cmd)
3120         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3121         (maint_info_btrace_cmd): Constify.
3122
3123 2017-09-27  Tom Tromey  <tom@tromey.com>
3124
3125         * reverse.c (delete_bookmark_command): Constify.
3126
3127 2017-09-27  Tom Tromey  <tom@tromey.com>
3128
3129         * remote.c (set_memory_packet_size)
3130         (set_memory_write_packet_size, show_memory_write_packet_size)
3131         (set_memory_read_packet_size, show_memory_read_packet_size)
3132         (compare_sections_command, packet_command, remote_put_command)
3133         (remote_get_command, remote_delete_command): Constify.
3134
3135 2017-09-27  Tom Tromey  <tom@tromey.com>
3136
3137         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3138         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3139         (set_mipsfpu_auto_command): Constify.
3140
3141 2017-09-27  Tom Tromey  <tom@tromey.com>
3142
3143         * cli/cli-cmds.h (cd_command): Constify.
3144         * cli/cli-cmds.c (cd_command): Constify.
3145
3146 2017-09-27  Tom Tromey  <tom@tromey.com>
3147
3148         * thread.c (thread_name_command, thread_find_command): Constify.
3149
3150 2017-09-27  Tom Tromey  <tom@tromey.com>
3151
3152         * probe.c (enable_probes_command, disable_probes_command):
3153         Constify.
3154
3155 2017-09-27  Tom Tromey  <tom@tromey.com>
3156
3157         * symfile.c (symbol_file_command): Constify.
3158         * gdbcore.h (deprecated_file_changed_hook): Constify.
3159         * exec.c (deprecated_file_changed_hook, exec_file_command)
3160         (file_command): Constify.
3161         * defs.h (symbol_file_command): Constify.
3162
3163 2017-09-27  Tom Tromey  <tom@tromey.com>
3164
3165         * remote-fileio.c (set_system_call_allowed)
3166         (show_system_call_allowed): Constify.
3167
3168 2017-09-27  Tom Tromey  <tom@tromey.com>
3169
3170         * tracepoint.c (delete_trace_variable_command)
3171         (tfind_end_command, tfind_start_command, tfind_pc_command)
3172         (tfind_tracepoint_command, tfind_line_command)
3173         (tfind_range_command, tfind_outside_command): Constify.
3174
3175 2017-09-27  Tom Tromey  <tom@tromey.com>
3176
3177         * ax-gdb.c (maint_agent_printf_command, agent_command)
3178         (agent_eval_command): Constify.
3179
3180 2017-09-27  Tom Tromey  <tom@tromey.com>
3181
3182         * tracepoint.c (info_scope_command): Constify.
3183         * python/python.c (gdbpy_decode_line): Constify.
3184         * python/py-breakpoint.c (bppy_init): Constify.
3185         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3186         * location.h: (new_linespec_location)
3187         (string_to_event_location_basic, string_to_event_location):
3188         Constify.
3189         * location.c (new_linespec_location)
3190         (string_to_event_location_basic, string_to_event_location):
3191         Constify.
3192         * linespec.h (decode_line_with_current_source)
3193         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3194         * linespec.c (linespec_lex_to_end)
3195         (decode_line_with_current_source)
3196         (decode_line_with_last_displayed): Constify.
3197         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3198         Constify.
3199         * cli/cli-cmds.c (edit_command, list_command): Constify.
3200         * breakpoint.h (until_break_command, watch_command_wrapper)
3201         (awatch_command_wrapper, rwatch_command_wrapper)
3202         (init_ada_exception_breakpoint): Constify.
3203         * breakpoint.c (break_command_1, dprintf_command)
3204         (break_range_command, watch_command_wrapper)
3205         (rwatch_command_wrapper, awatch_command_wrapper)
3206         (until_break_command, init_ada_exception_breakpoint)
3207         (strace_marker_create_sals_from_location, trace_command)
3208         (ftrace_command, strace_command, struct tracepoint): Constify.
3209         * ax-gdb.c (agent_command_1): Constify.
3210         * ada-lang.c (ada_exception_sal): Constify.
3211
3212 2017-09-27  Tom Tromey  <tom@tromey.com>
3213
3214         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3215         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3216         (get_context_size, no_chunk, get_insn_history_modifiers)
3217         (cmd_record_insn_history, get_call_history_modifiers)
3218         (cmd_record_call_history): Constify.
3219
3220 2017-09-27  Tom Tromey  <tom@tromey.com>
3221
3222         * source.c (show_substitute_path_command)
3223         (unset_substitute_path_command, set_substitute_path_command):
3224         Constify.
3225
3226 2017-09-27  Tom Tromey  <tom@tromey.com>
3227
3228         * typeprint.c (maintenance_print_type): Constify.
3229         * maint.c (maintenance_dump_me, maintenance_demangle)
3230         (maintenance_time_display, maintenance_info_sections)
3231         (maintenance_print_statistics, maintenance_deprecate)
3232         (maintenance_undeprecate): Constify.
3233         (maintenance_do_deprecate): Constify.  Use std::string.
3234         (maintenance_selftest): Constify.
3235         * gdbtypes.h (maintenance_print_type): Constify.
3236
3237 2017-09-27  Tom Tromey  <tom@tromey.com>
3238
3239         * hppa-tdep.c (unwind_command): Constify.
3240
3241 2017-09-27  Tom Tromey  <tom@tromey.com>
3242
3243         * target-descriptions.c (unset_tdesc_filename_cmd)
3244         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3245         Constify.
3246
3247 2017-09-27  Tom Tromey  <tom@tromey.com>
3248
3249         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3250
3251 2017-09-27  Tom Tromey  <tom@tromey.com>
3252
3253         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3254
3255 2017-09-27  Tom Tromey  <tom@tromey.com>
3256
3257         * tui/tui-regs.c (tui_reg_command): Constify.
3258
3259 2017-09-27  Tom Tromey  <tom@tromey.com>
3260
3261         * skip.c (skip_file_command, skip_function_command)
3262         (skip_enable_command, skip_disable_command, skip_delete_command):
3263         Constify.
3264
3265 2017-09-27  Tom Tromey  <tom@tromey.com>
3266
3267         * record-btrace.c (cmd_record_btrace_bts_start)
3268         (cmd_record_btrace_pt_start): Constify.
3269
3270 2017-09-27  Tom Tromey  <tom@tromey.com>
3271
3272         * symmisc.c (maintenance_print_symbols)
3273         (maintenance_print_msymbols, maintenance_print_objfiles)
3274         (maintenance_info_symtabs, maintenance_check_symtabs)
3275         (maintenance_expand_symtabs, maintenance_info_line_tables):
3276         Constify.
3277
3278 2017-09-27  Tom Tromey  <tom@tromey.com>
3279
3280         * top.c (new_ui_command): Constify.
3281
3282 2017-09-27  Tom Tromey  <tom@tromey.com>
3283
3284         * symfile.c (add_symbol_file_command)
3285         (remove_symbol_file_command, list_overlays_command)
3286         (map_overlay_command, unmap_overlay_command)
3287         (overlay_auto_command, overlay_manual_command)
3288         (overlay_off_command, overlay_load_command): Constify.
3289
3290 2017-09-27  Tom Tromey  <tom@tromey.com>
3291
3292         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3293         (info_spu_mailbox_command, info_spu_dma_command)
3294         (info_spu_proxydma_command): Constify.
3295
3296 2017-09-27  Tom Tromey  <tom@tromey.com>
3297
3298         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3299
3300 2017-09-27  Tom Tromey  <tom@tromey.com>
3301
3302         * cli/cli-script.c (user_defined_command): Constify.
3303
3304 2017-09-27  Tom Tromey  <tom@tromey.com>
3305
3306         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3307         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3308         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3309         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3310         (dump_binary_value, append_binary_memory, append_binary_value):
3311         Constify.
3312         (struct dump_context) <func>: Constify.
3313         (add_dump_command): Update.
3314
3315 2017-09-27  Tom Tromey  <tom@tromey.com>
3316
3317         * cli/cli-cmds.c (show_version, show_configuration)
3318         (source_command, show_user): Constify.
3319
3320 2017-09-27  Tom Tromey  <tom@tromey.com>
3321
3322         * target.c (maintenance_print_target_stack): Constify.
3323
3324 2017-09-27  Tom Tromey  <tom@tromey.com>
3325
3326         * interps.c (interpreter_exec_cmd): Constify.
3327
3328 2017-09-27  Tom Tromey  <tom@tromey.com>
3329
3330         * record-full.c (cmd_record_full_restore): Constify.
3331
3332 2017-09-27  Tom Tromey  <tom@tromey.com>
3333
3334         * memattr.c (enable_mem_command, disable_mem_command)
3335         (delete_mem_command): Constify.
3336
3337 2017-09-27  Tom Tromey  <tom@tromey.com>
3338
3339         * value.c (show_convenience): Constify.
3340
3341 2017-09-27  Tom Tromey  <tom@tromey.com>
3342
3343         * gdbcore.h (core_file_command): Update.
3344         * corefile.c (core_file_command): Constify.
3345
3346 2017-09-27  Tom Tromey  <tom@tromey.com>
3347
3348         * user-regs.c (maintenance_print_user_registers): Constify.
3349
3350 2017-09-27  Tom Tromey  <tom@tromey.com>
3351
3352         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3353
3354 2017-09-27  Tom Tromey  <tom@tromey.com>
3355
3356         * cp-support.c (first_component_command): Constify.
3357
3358 2017-09-27  Tom Tromey  <tom@tromey.com>
3359
3360         * psymtab.c (maintenance_print_psymbols)
3361         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3362         Constify.
3363
3364 2017-09-27  Tom Tromey  <tom@tromey.com>
3365
3366         * windows-tdep.c (display_tib): Constify.
3367
3368 2017-09-27  Tom Tromey  <tom@tromey.com>
3369
3370         * linux-fork.c (delete_checkpoint_command)
3371         (detach_checkpoint_command): Constify.
3372
3373 2017-09-27  Tom Tromey  <tom@tromey.com>
3374
3375         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3376
3377 2017-09-27  Tom Tromey  <tom@tromey.com>
3378
3379         * arc-tdep.c (dump_arc_instruction_command): Constify.
3380
3381 2017-09-27  Tom Tromey  <tom@tromey.com>
3382
3383         * valprint.c (set_radix, show_radix): Constify.
3384
3385 2017-09-27  Tom Tromey  <tom@tromey.com>
3386
3387         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3388
3389 2017-09-27  Tom Tromey  <tom@tromey.com>
3390
3391         * command.h (not_just_help_class_command): Update.
3392         * cli/cli-decode.h (not_just_help_class_command): Update.
3393         * cli/cli-decode.c (not_just_help_class_command): Constify.
3394
3395 2017-09-27  Tom Tromey  <tom@tromey.com>
3396
3397         * gdb_bfd.c (maintenance_info_bfds): Constify.
3398
3399 2017-09-27  Tom Tromey  <tom@tromey.com>
3400
3401         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3402         overloads.
3403         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3404         (do_const_cfunc): New function.
3405         (cmd_cfunc_eq): New overload.
3406         (cli_user_command_p): Check do_const_cfunc.
3407         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3408         const_cfunc.
3409         * command.h (add_cmd): Add const overload and no-function
3410         overload.
3411         (set_cmd_cfunc): Add const overload.
3412         (cmd_const_cfunc_ftype): Declare.
3413         (cmd_cfunc_eq): Add const overload.
3414         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3415         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3416         overload.
3417
3418 2017-09-27  Tom Tromey  <tom@tromey.com>
3419
3420         * macroexp.c (get_next_token_for_substitution): New function.
3421         (substitute_args): Call it.  Check for __VA_OPT__.
3422
3423 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3424             Pedro Alves <palves@redhat.com>
3425
3426         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3427         producer_is_icc_lt_14.
3428         (producer_is_icc_lt_14): New function.
3429         (check_producer): Add code for checking version of ICC.
3430         (producer_is_icc): Move to producer.c.
3431         (read_structure_type): Restrict ICC workaround to ICC<14.
3432         * producer.c: Include selftest.h.
3433         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3434         New functions.
3435         * producer.h (producer_is_icc): New declaration.
3436
3437 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3438
3439         * Makefile.in (SFILES): Add producer.c.
3440         (COMMON_OBS): Add producer.o
3441         * amd64-tdep.c (producer.h): Add new include.
3442         * dwarf2read.c (producer.h): Add new include.
3443         * producer.c: New file.
3444         * producer.h: New file.
3445         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3446         producer.c.
3447         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3448         producer.h.
3449
3450 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3451
3452         * configure.ac: Search ncursesw before ncurses.
3453         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3454         * gdb_curses.h: Include <ncursesw/ncurses.h>
3455         * config.in, configure: Regenerate.
3456
3457 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3458
3459         PR gdb/22185
3460         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3461         obsolete.
3462         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3463         Remove i386sol2 support.
3464         * configure.nat <i386sol2>: Remove.
3465         <sol2-64>: Fold into ...
3466         <sol2>: ... this.
3467         Move common settings to default section.
3468         Add sol-thread.o.
3469         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3470         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3471         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3472         <i[34567]86-*-solaris*>: Remove.
3473         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3474
3475         * configure.ac: Remove wctype in libw check.
3476         (_MSE_INT_H): Don't define on Solaris 7-9.
3477         <solaris*>: Remove libthread_db.so.1 check.
3478         * configure: Regenerate.
3479         * config.in: Regenerate.
3480
3481         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3482         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3483         (gdb_ps_size_t): Remove.
3484         Use base types in users.
3485         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3486
3487         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3488
3489 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3490
3491         PR build/22206
3492         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3493         (adi_is_addr_mapped): Likewise.
3494         (PSR_ICC): Don't redefine.
3495         (PSR_IMPL): Likewise.
3496
3497 2017-09-25  Tom Tromey  <tom@tromey.com>
3498
3499         * regcache.c (regcache::dump): Use string_printf.
3500
3501 2017-09-25  Tom Tromey  <tom@tromey.com>
3502
3503         * regcache.c (class regcache_invalidator): New.
3504         (struct register_to_invalidate): Remove.
3505         (make_cleanup_regcache_invalidate): Remove.
3506         (regcache::raw_write): Use regcache_invalidator.
3507
3508 2017-09-25  Tom Tromey  <tom@tromey.com>
3509
3510         * spu-tdep.c (spu2ppu_sniffer): Update.
3511         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3512         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3513         Remove.
3514         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3515         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3516         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3517         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3518         (frame_pop): Update.
3519
3520 2017-09-25  Tom Tromey  <tom@tromey.com>
3521
3522         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3523         * regcache.h (regcache_xfree): Don't declare.
3524         * regcache.c (regcache_xfree): Remove.
3525         (do_regcache_xfree): Use delete.
3526         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3527         * linux-fork.c (free_fork): Use delete.
3528         (fork_save_infrun_state): Likewise.
3529         * jit.c (jit_dealloc_cache): Use delete.
3530         * infrun.c (discard_infcall_suspend_state): Use delete.
3531
3532 2017-09-25  Tom Tromey  <tom@tromey.com>
3533
3534         * regcache.h (regcache_xmalloc): Don't declare.
3535         (regcache_raw_set_cached_value): Update comment.
3536         * regcache.c (regcache_xmalloc): Remove.
3537         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3538         * jit.c (jit_frame_sniffer): Use new.
3539         * frame.c (frame_save_as_regcache): Use new.
3540
3541 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3542
3543         * NEWS: Advertise support for guarded-storage registers on IBM z.
3544
3545 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3546
3547         * s390-linux-nat.c (have_regset_gs): New static variable.
3548         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3549         control block and guarded-storage broadcast control regsets.
3550         (s390_read_description): Detect whether the target has
3551         guarded-storage support, return appropriate tdesc.
3552         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3553         (features/s390x-gs-linux64.c): Likewise.
3554         (struct gdbarch_tdep) <have_gs>: New field.
3555         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3556         (s390_gsbc_regset): New variables.
3557         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3558         and s390_gsbc_regset, if applicable.
3559         (s390_core_read_description): Check whether core file was from a
3560         target with guarded-storage support; include appropriate regsets.
3561         (s390_gdbarch_init): Add registers for guarded-storage support.
3562         (_initialize_s390_tdep): Initialize new target descriptions that
3563         include registers for guarded-storage support.
3564         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3565         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3566         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3567         (S390_NUM_REGS): Adjust macro definition.
3568         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3569         (tdesc_s390x_gs_linux64): New declarations.
3570
3571 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3572
3573         * features/s390-gs-linux64.xml: New file.
3574         * features/s390-gs.xml: New file.
3575         * features/s390-gsbc.xml: New file.
3576         * features/s390x-gs-linux64.xml: New file.
3577         * features/Makefile (WHICH): Add s390-gs-linux64 and
3578         s390x-gs-linux64.
3579         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3580         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3581         * features/s390-gs-linux64.c: New generated file.
3582         * features/s390x-gs-linux64.c: New file.
3583         * regformats/s390-gs-linux64.dat: New file.
3584         * regformats/s390x-gs-linux64.dat: New file.
3585
3586 2017-09-23  Tom Tromey  <tom@tromey.com>
3587
3588         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3589
3590 2017-09-22  Tom Tromey  <tom@tromey.com>
3591
3592         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3593         type to scoped_restore_tmpl.
3594         <scoped_input_handler>: Initialize m_quit_handler directly.
3595
3596 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3597
3598         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3599         (cd_command): Likewise.  Free "current_directory" before
3600         assigning to it.
3601         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3602         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3603         * top.c (gdb_dirbuf): Remove global declaration.
3604         * top.h (gdb_dirbuf): Likewise.
3605
3606 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3607
3608         * gnulib/aclocal.m4: Regenerate.
3609         * gnulib/config.in: Regenerate.
3610         * gnulib/configure: Regenerate.
3611         * gnulib/import/Makefile.am: Regenerate.
3612         * gnulib/import/Makefile.in: Regenerate.
3613         * gnulib/import/assure.h: New file.
3614         * gnulib/import/at-func.c: Likewise
3615         * gnulib/import/chdir-long.c: New file.
3616         * gnulib/import/chdir-long.h: New file.
3617         * gnulib/import/cloexec.c: New file.
3618         * gnulib/import/cloexec.h: New file.
3619         * gnulib/import/close.c: New file.
3620         * gnulib/import/closedir.c: New file.
3621         * gnulib/import/dirent-private.h: New file.
3622         * gnulib/import/dup-safer.c: New file.
3623         * gnulib/import/dup.c: New file.
3624         * gnulib/import/dup2.c: New file.
3625         * gnulib/import/error.c: New file.
3626         * gnulib/import/error.h: New file.
3627         * gnulib/import/exitfail.c: New file.
3628         * gnulib/import/exitfail.h: New file.
3629         * gnulib/import/fchdir.c: New file.
3630         * gnulib/import/fcntl.c: New file.
3631         * gnulib/import/fcntl.in.h: New file.
3632         * gnulib/import/fd-hook.c: New file.
3633         * gnulib/import/fd-hook.h: New file.
3634         * gnulib/import/fd-safer.c: New file.
3635         * gnulib/import/fdopendir.c: New file.
3636         * gnulib/import/filename.h: New file.
3637         * gnulib/import/filenamecat-lgpl.c: New file.
3638         * gnulib/import/filenamecat.h: New file.
3639         * gnulib/import/fstat.c: New file.
3640         * gnulib/import/fstatat.c: New file.
3641         * gnulib/import/getcwd-lgpl.c: New file.
3642         * gnulib/import/getcwd.c: New file.
3643         * gnulib/import/getdtablesize.c: New file.
3644         * gnulib/import/getlogin_r.c: New file.
3645         * gnulib/import/getprogname.c: New file.
3646         * gnulib/import/getprogname.h: New file.
3647         * gnulib/import/gettext.h: New file.
3648         * gnulib/import/glob-libc.h: New file.
3649         * gnulib/import/glob.c: New file.
3650         * gnulib/import/glob.in.h: New file.
3651         * gnulib/import/intprops.h: New file.
3652         * gnulib/import/m4/chdir-long.m4: New file.
3653         * gnulib/import/m4/close.m4: New file.
3654         * gnulib/import/m4/closedir.m4: New file.
3655         * gnulib/import/m4/d-ino.m4: New file.
3656         * gnulib/import/m4/d-type.m4: New file.
3657         * gnulib/import/m4/dup.m4: New file.
3658         * gnulib/import/m4/dup2.m4: New file.
3659         * gnulib/import/m4/error.m4: New file.
3660         * gnulib/import/m4/fchdir.m4: New file.
3661         * gnulib/import/m4/fcntl.m4: New file.
3662         * gnulib/import/m4/fcntl_h.m4: New file.
3663         * gnulib/import/m4/fdopendir.m4: New file.
3664         * gnulib/import/m4/filenamecat.m4: New file.
3665         * gnulib/import/m4/fstat.m4: New file.
3666         * gnulib/import/m4/fstatat.m4: New file.
3667         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3668         * gnulib/import/m4/getcwd-path-max.m4: New file.
3669         * gnulib/import/m4/getcwd.m4: New file.
3670         * gnulib/import/m4/getdtablesize.m4: New file.
3671         * gnulib/import/m4/getlogin_r.m4: New file.
3672         * gnulib/import/m4/getprogname.m4: New file.
3673         * gnulib/import/m4/glob.m4: New file.
3674         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3675         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3676         * gnulib/import/m4/mempcpy.m4: New file.
3677         * gnulib/import/m4/memrchr.m4: New file.
3678         * gnulib/import/m4/mode_t.m4: New file.
3679         * gnulib/import/m4/msvc-inval.m4: New file.
3680         * gnulib/import/m4/msvc-nothrow.m4: New file.
3681         * gnulib/import/m4/open.m4: New file.
3682         * gnulib/import/m4/openat.m4: New file.
3683         * gnulib/import/m4/opendir.m4: New file.
3684         * gnulib/import/m4/readdir.m4: New file.
3685         * gnulib/import/m4/realloc.m4: New file.
3686         * gnulib/import/m4/rewinddir.m4: New file.
3687         * gnulib/import/m4/save-cwd.m4: New file.
3688         * gnulib/import/m4/strdup.m4: New file.
3689         * gnulib/import/m4/strerror.m4: New file.
3690         * gnulib/import/m4/unistd-safer.m4: New file.
3691         * gnulib/import/mempcpy.c: New file.
3692         * gnulib/import/memrchr.c: New file.
3693         * gnulib/import/msvc-inval.c: New file.
3694         * gnulib/import/msvc-inval.h: New file.
3695         * gnulib/import/msvc-nothrow.c: New file.
3696         * gnulib/import/msvc-nothrow.h: New file.
3697         * gnulib/import/open.c: New file.
3698         * gnulib/import/openat-die.c: New file.
3699         * gnulib/import/openat-priv.h: New file.
3700         * gnulib/import/openat-proc.c: New file.
3701         * gnulib/import/openat.c: New file.
3702         * gnulib/import/openat.h: New file.
3703         * gnulib/import/opendir.c: New file.
3704         * gnulib/import/pipe-safer.c: New file.
3705         * gnulib/import/readdir.c: New file.
3706         * gnulib/import/realloc.c: New file.
3707         * gnulib/import/rewinddir.c: New file.
3708         * gnulib/import/save-cwd.c: New file.
3709         * gnulib/import/save-cwd.h: New file.
3710         * gnulib/import/strdup.c: New file.
3711         * gnulib/import/strerror-override.c: New file.
3712         * gnulib/import/strerror-override.h: New file.
3713         * gnulib/import/strerror.c: New file.
3714         * gnulib/import/unistd--.h: New file.
3715         * gnulib/import/unistd-safer.h: New file.
3716         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3717         "getcwd" and "glob".
3718         * ser-tcp.c: Undefine "close" before redefining it.
3719
3720 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3721
3722         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3723         get rid of res_val.
3724
3725 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3726
3727         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3728         <sol2,sparc>: Likewise.
3729         <sol2-64,i386>: Likewise.
3730
3731         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3732         -Wdeprecated-declarations on *-*-solaris*.
3733         * configure: Regenerate.
3734
3735         * procfs.c: Include "nat/inferior.h".
3736         (procfs_info_proc): Fix typo.
3737
3738 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3739
3740         * remote.c (vector): Include.
3741         (struct private_thread_info): Add field, thread_handle.
3742         (free_private_thread_info): Deallocate storage associated with
3743         thread handle.
3744         (get_private_info_thread): Initialize `thread_handle' field.
3745         (struct thread_item): Add field, thread_handle.
3746         (clear_threads_listing_context): Deallocate storage associated
3747         with thread handle.
3748         (start_thread): Add support for "handle" attribute.
3749         (thread_attributes): Add "handle".
3750         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3751         field.
3752         (remote_update_thread_list): Update thread_handle.
3753         (remote_thread_handle_to_thread_info): New function.
3754         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3755
3756 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3757
3758         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3759         function.
3760         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3761         * python/python-internal.h (thread_object_type): Declare.
3762
3763 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3764
3765         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3766         (target_thread_handle_to_thread_info): Declare.
3767         * target.c (target_thread_handle_to_thread_info): New function.
3768         * target-delegates.c: Regenerate.
3769         * gdbthread.h (find_thread_by_handle): Declare.
3770         * thread.c (find_thread_by_handle): New function.
3771         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3772         function.
3773         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3774
3775 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3776
3777         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3778
3779 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3780
3781         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3782
3783 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3784
3785         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3786         to gdb_target_obs.
3787
3788 2017-09-20  Tom Tromey  <tom@tromey.com>
3789
3790         * breakpoint.c (struct counted_command_line): Remove.
3791         (breakpoint_commands): Update.
3792         (alloc_counted_command_line, incref_counted_command_line)
3793         (decref_counted_command_line, do_cleanup_counted_command_line)
3794         (make_cleanup_decref_counted_command_line): Remove.
3795         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3796         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3797         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3798         (save_breakpoints): Update.
3799         * breakpoint.h (counted_command_line): Now a typedef to
3800         shared_ptr.
3801         (struct breakpoint) <commands>: Now a counted_command_line.
3802         (struct bpstats) <command>: Likewise.
3803
3804 2017-09-20  Tom Tromey  <tom@tromey.com>
3805
3806         * breakpoint.c (struct commands_info, do_map_commands_command):
3807         Remove.
3808         (commands_command_1): Update.
3809         (iterate_over_related_breakpoints): Take a function_view.
3810         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3811         (delete_command): Update.
3812         (map_breakpoint_numbers): Take a function_view.
3813         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3814         (disable_command): Update.
3815         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3816         (enable_command): Update.
3817         (struct disp_data, do_enable_breakpoint_disp)
3818         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3819         (do_map_enable_delete_breakpoint): Remove.
3820         (enable_once_command, enable_count_command, enable_delete_command)
3821         (delete_trace_variable_command): Update.
3822
3823 2017-09-20  Tom Tromey  <tom@tromey.com>
3824
3825         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3826         (bpstat_clear): Use delete.
3827         (bpstats): New constructors.
3828         (bpstat_copy, bpstat_stop_status): Use new.
3829         (dprintf_after_condition_true): Update.
3830         * breakpoint.h (bpstats::bpstats): Add constructors.
3831         (bpstats::~bpstats): Add destructor.
3832
3833 2017-09-20  Pedro Alves  <palves@redhat.com>
3834
3835         * eval.c (make_params): Delete, refactored as ...
3836         (class fake_method): ... this new type's ctor.
3837         (fake_method::~fake_method): New.
3838         (evaluate_subexp_standard): Use 'fake_method'.
3839
3840 2017-09-20  Tom Tromey  <tom@tromey.com>
3841
3842         * windows-nat.c (get_windows_debug_event, windows_wait)
3843         (do_initial_windows_stuff, windows_attach): Update.
3844         * utils.c (vwarning, internal_vproblem): Update.
3845         (ui_unregister_input_event_handler_cleanup)
3846         (prepare_to_handle_input): Remove.
3847         (class scoped_input_handler): New.
3848         (defaulted_query, prompt_for_continue): Update.
3849         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3850         Update.
3851         * top.c (undo_terminal_modifications_before_exit): Update.
3852         * target/target.h (target_terminal_init, target_terminal_inferior)
3853         (target_terminal_ours): Don't declare.
3854         (class target_terminal): New.
3855         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3856         (target_terminal_ours_for_output)
3857         (make_cleanup_restore_target_terminal): Don't declare.
3858         (target_terminal_info): Remove.
3859         * target.c (enum terminal_state, terminal_state): Remove.
3860         (target_terminal::terminal_state): Define.
3861         (target_terminal::init): Rename from target_terminal_init.
3862         (target_terminal::inferior): Rename from
3863         target_terminal_inferior.
3864         (target_terminal::ours): Rename from target_terminal_ours.
3865         (target_terminal::ours_for_output): Rename from
3866         target_terminal_ours_for_output.
3867         (target_terminal::info): New method.
3868         (cleanup_restore_target_terminal)
3869         (make_cleanup_restore_target_terminal): Remove.
3870         * solib.c (handle_solib_event): Update.
3871         * remote.c (remote_serial_quit_handler): Update.
3872         (remote_terminal_inferior, remote_wait_as): Update.
3873         * record-full.c (record_full_wait_1): Update.
3874         * nto-procfs.c (procfs_create_inferior): Update.
3875         * nat/fork-inferior.c (startup_inferior): Update.
3876         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3877         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3878         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3879         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3880         (mi_breakpoint_created, mi_breakpoint_deleted)
3881         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3882         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3883         (mi_user_selected_context_changed, report_initial_inferior):
3884         Update.
3885         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3886         (linux_nat_terminal_inferior): Update.
3887         * infrun.c (follow_fork_inferior)
3888         (handle_vfork_child_exec_or_exit, do_target_resume)
3889         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3890         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3891         Update.
3892         * inflow.c (child_terminal_init, info_terminal_command): Update.
3893         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3894         (attach_command): Update.
3895         * infcall.c (call_thread_fsm_should_stop): Update.
3896         * gnu-nat.c (gnu_attach): Update.
3897         * extension.c (struct active_ext_lang_state)
3898         (restore_active_ext_lang): Update.
3899         * exceptions.c (print_flush): Update.
3900         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3901         (struct quit_handler_cleanup_data, restore_quit_handler)
3902         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3903         Remove.
3904         * cp-support.c (gdb_demangle): Update.
3905         * breakpoint.c (update_inserted_breakpoint_locations)
3906         (insert_breakpoint_locations, handle_jit_event)
3907         (disable_breakpoints_in_unloaded_shlib): Update.
3908         * annotate.c (annotate_breakpoints_invalid)
3909         (annotate_frames_invalid): Update.
3910
3911 2017-09-20  Tom Tromey  <tom@tromey.com>
3912
3913         * main.c (catch_command_errors): Rename from
3914         catch_command_errors_const.
3915         (captured_main_1): Update.
3916
3917 2017-09-20  Pedro Alves  <palves@redhat.com>
3918
3919         * cli/cli-cmds.c (list_command): Use print_sal_location.
3920         (print_sal_location): New function.
3921         (ambiguous_line_spec): Use print_sal_location.
3922         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3923         * symtab.c (find_function_start_sal): Likewise.
3924         * symtab.h (symtab_and_line::symbol): New field.
3925
3926 2017-09-20  Pedro Alves  <palves@redhat.com>
3927
3928         * linespec.c (minsym_found): Handle non-text minsyms.
3929         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3930
3931 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3932
3933         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3934         backslash.
3935
3936 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3937
3938         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3939         vmovups instead vmovaps.
3940         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3941
3942 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3943
3944         * NEWS (Changes since GDB 8.0): Add starti.
3945         * infcmd.c (enum run_break): New.
3946         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3947         case.
3948         (run_command): Use enum run_how.
3949         (start_command): Likewise.
3950         (starti_command): New function.
3951         (RUN_ARGS_HELP): New macro.
3952         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3953         commands.  Add starti command.
3954
3955 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3956
3957         * Makefile.in (monitor.o): Remove the rule.
3958
3959 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3960
3961         * annotate.h (struct annotate_arg_emitter): Use
3962         DISABLE_COPY_AND_ASSIGN.
3963         * common/refcounted-object.h (refcounted_object): Likewise.
3964         * completer.h (struct completion_result): Likewise.
3965         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3966         * filename-seen-cache.h (filename_seen_cache): Likewise.
3967         * gdbcore.h (thread_section_name): Likewise.
3968         * gdb_regex.h (compiled_regex): Likewise.
3969         * gdbthread.h (scoped_restore_current_thread): Likewise.
3970         * inferior.h (scoped_restore_current_inferior): Likewise.
3971         * jit.c (jit_reader): Likewise.
3972         * linespec.h (struct linespec_result): Likewise.
3973         * mi/mi-parse.h (struct mi_parse): Likewise.
3974         * nat/fork-inferior.c (execv_argv): Likewise.
3975         * progspace.h (scoped_restore_current_program_space): Likewise.
3976         * python/python-internal.h (class gdbpy_enter): Likewise.
3977         * regcache.h (regcache): Likewise.
3978         * target-descriptions.c (struct tdesc_reg): Likewise.
3979         (struct tdesc_type): Likewise.
3980         (struct tdesc_feature): Likewise.
3981         * ui-out.h (ui_out_emit_type): Likewise.
3982
3983 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3984
3985         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3986         label abort_expression.
3987
3988 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3989
3990         * common/buffer.c (buffer_xml_printf): Adjust.
3991         * common/xml-utils.c (xml_escape_text): Change return type to
3992         std::string, update code accordingly.
3993         * common/xml-utils.h (xml_escape_text): Change return type to
3994         std::string.
3995         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3996         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3997         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3998         Adjust.
3999
4000 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4001
4002         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4003         (SUBDIR_UNITTESTS_OBS): Add new object file.
4004         * unittests/xml-utils-selftests.c: New file.
4005
4006 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4007
4008         * common/selftest.h (selftest): New struct/interface.
4009         (register_test): Add name parameter, add new overload.
4010         (run_tests): Add filter parameter.
4011         (for_each_selftest_ftype): New typedef.
4012         (for_each_selftest): New declaration.
4013         * common/selftest.c (tests): Change type to
4014         map<string, unique_ptr<selftest>>.
4015         (simple_selftest): New struct.
4016         (register_test): New function.
4017         (register_test): Add name parameter and use it.
4018         (run_tests): Add filter parameter and use it.  Add prints.
4019         Adjust to vector -> map change.
4020         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4021         registering selftests.
4022         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4023         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4024         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4025         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4026         * findvar.c (_initialize_findvar): Likewise.
4027         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4028         * maint.c (maintenance_selftest): Update call to run_tests.
4029         (maintenance_info_selftests): New function.
4030         (_initialize_maint_cmds): Register "maintenance info selftests"
4031         command.  Update "maintenance selftest" doc.
4032         * regcache.c (_initialize_regcache): Add names when registering
4033         selftests.
4034         * rust-exp.y (_initialize_rust_exp): Likewise.
4035         * selftest-arch.c (gdbarch_selftest): New struct.
4036         (gdbarch_tests): Remove.
4037         (register_test_foreach_arch): Add name parameter.  Call
4038         register_test.
4039         (tests_with_arch): Remove, move most content to
4040         gdbarch_selftest::operator().
4041         (_initialize_selftests_foreach_arch): Remove.
4042         * selftest-arch.h (register_test_foreach_arch): Add name
4043         parameter.
4044         (run_tests_with_arch): New declaration.
4045         * utils-selftests.c (_initialize_utils_selftests): Add names
4046         when registering selftests.
4047         * utils.c (_initialize_utils): Likewise.
4048         * unittests/array-view-selftests.c
4049         (_initialize_array_view_selftests): Likewise.
4050         * unittests/environ-selftests.c (_initialize_environ_selftests):
4051         Likewise.
4052         * unittests/function-view-selftests.c
4053         (_initialize_function_view_selftests): Likewise.
4054         * unittests/offset-type-selftests.c
4055         (_initialize_offset_type_selftests): Likewise.
4056         * unittests/optional-selftests.c
4057         (_initialize_optional_selftests): Likewise.
4058         * unittests/scoped_restore-selftests.c
4059         (_initialize_scoped_restore_selftests): Likewise.
4060         * NEWS: Document "maintenance selftest" and "maint info
4061         selftests".
4062
4063 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4064
4065         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4066         scoped_restore.
4067
4068 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4069
4070         * mi/mi-main.c (mi_load_progress): Make uiout variable
4071         a unique_ptr.
4072
4073 2017-09-15  Pedro Alves  <palves@redhat.com>
4074
4075         * compile/compile-c-types.c (convert_enum, convert_int)
4076         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4077
4078 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4079
4080         * dwarf2read.c (copy_string): Remove.
4081         (parse_macro_definition): Replace copy_string with savestring.
4082
4083 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4084
4085         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4086         gdb_target_obs.
4087         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4088         Likewise.
4089         (i[34567]86-*-linux*): Likewise.
4090
4091 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4092
4093         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4094         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4095         <stack>: Change type to std::vector.
4096         <stack_len, stack_allocated>: Remove.
4097         <grow_stack>: Remove.
4098         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4099         (dwarf_expr_context::~dwarf_expr_context): Remove.
4100         (dwarf_expr_context::grow_stack): Remove.
4101         (dwarf_expr_context::push): Adjust.
4102         (dwarf_expr_context::pop): Adjust.
4103         (dwarf_expr_context::fetch): Adjust.
4104         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4105         (dwarf_expr_context::stack_empty_p): Adjust.
4106         (dwarf_expr_context::execute_stack_op): Adjust.
4107
4108 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4109
4110         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4111         return type to bool.
4112         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4113
4114 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4115
4116         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4117         Change type to bool.
4118         (dwarf_stack_value) <in_stack_memory>: Likewise.
4119         (dwarf_expr_context) <push_address>: Change parameter type to
4120         bool.
4121         <fetch_in_stack_memory>: Change return type to bool.
4122         <push>: Change parameter type to bool.
4123         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4124         to bool.
4125         (dwarf_expr_context::push_address): Likewise.
4126         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4127         to bool.
4128         (dwarf_expr_context::execute_stack_op): Adjust.
4129         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4130
4131 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4132
4133         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4134         (struct dwarf_expr_context) <n_pieces>: Remove.
4135         <pieces>: Change type to std::vector.
4136         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4137         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4138         pieces.
4139         (dwarf_expr_context::add_piece): Adjust.
4140         * dwarf2loc.c (struct piece_closure): Initialize fields.
4141         <n_pieces>: Remove.
4142         <pieces>: Change type to std::vector.
4143         (allocate_piece_closure): Adjust, change parameter to
4144         std::vector rvalue and std::move it to piece_closure.
4145         (rw_pieced_value): Adjust.
4146         (check_pieced_synthetic_pointer): Adjust.
4147         (indirect_synthetic_pointer): Adjust.
4148         (coerce_pieced_ref): Adjust.
4149         (free_pieced_value_closure):  Adjust.  Use delete to free
4150         piece_closure.
4151         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4152         to allocate_piece_closure.
4153         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4154
4155 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4156
4157         * probe.h (probe_ops_cp): Remove typedef.
4158         (DEF_VEC_P (probe_ops_cp)): Remove.
4159         (all_probe_ops): Change type to std::vector.
4160         * probe.c (info_probes_for_ops): Adjust to vector change.
4161         (probe_linespec_to_ops): Likewise.
4162         (all_probe_ops): Change type to std::vector.
4163         (_initialize_probe): Adjust to vector change.
4164         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4165         * elfread.c (elf_get_probes): Likewise.
4166         * stap-probe.c (_initialize_stap_probe): Likewise.
4167
4168 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4169
4170         * probe.h (struct bound_probe): Define constructors.
4171         * probe.c (bound_probe_s): Remove typedef.
4172         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4173         (collect_probes): Change return type to std::vector, remove
4174         cleanup.
4175         (compare_probes): Return bool, change parameter type.  Change
4176         semantic to "less than".
4177         (gen_ui_out_table_header_info): Change parameter to std::vector
4178         and update.
4179         (exists_probe_with_pops): Likewise.
4180         (info_probes_for_ops): Update to std::vector change.
4181         (enable_probes_command): Likewise.
4182         (disable_probes_command): Likewise.
4183
4184 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4185
4186         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4187         vec to std::vector.
4188         * probe.c (parse_probes_in_pspace): Update.
4189         (find_probes_in_objfile): Update.
4190         (find_probe_by_pc): Update.
4191         (collect_probes): Update.
4192         (probe_any_get_probes): Update.
4193         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4194         return type to reference to std::vector.
4195         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4196         std::vector and update.
4197         (dtrace_process_dof): Likewise.
4198         (dtrace_get_probes): Likewise.
4199         * elfread.c (elf_get_probes): Change return type to std::vector,
4200         store an std::vector in bfd_data.
4201         (probe_key_free): Update to std::vector.
4202         * stap-probe.c (handle_stap_probe): Change parameter to
4203         std::vector and update.
4204         (stap_get_probes): Likewise.
4205         * symfile-debug.c (debug_sym_get_probes): Change return type to
4206         std::vector and update.
4207
4208 2017-09-11  Tom Tromey  <tom@tromey.com>
4209
4210         * breakpoint.c (program_breakpoint_here_p): Update.
4211         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4212         from make_show_memory_breakpoints_cleanup.  Return a
4213         scoped_restore_tmpl<int>.
4214         (restore_show_memory_breakpoints): Remove.
4215         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4216         * mem-break.c (memory_validate_breakpoint): Update.
4217         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4218         (ia64_memory_remove_breakpoint): Update.
4219         (ia64_breakpoint_from_pc): Update.
4220         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4221         from make_show_memory_breakpoints_cleanup.
4222
4223 2017-09-11  Tom Tromey  <tom@tromey.com>
4224
4225         * d-namespace.c (d_lookup_symbol): Use std::string.
4226         (find_symbol_in_baseclass): Likewise.
4227
4228 2017-09-11  Tom Tromey  <tom@tromey.com>
4229
4230         * ctf.c (ctf_start): Use std::string.
4231
4232 2017-09-11  Tom Tromey  <tom@tromey.com>
4233
4234         * ada-lang.c (is_known_support_routine): Update.
4235         (ada_unhandled_exception_name_addr_from_raise): Update.
4236         * guile/scm-frame.c (gdbscm_frame_name): Update.
4237         * python/py-frame.c (frapy_name): Update.
4238         (frapy_function): Update.
4239         * stack.h (find_frame_funname): Update.
4240         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4241         (print_frame): Update.
4242
4243 2017-09-11  Tom Tromey  <tom@tromey.com>
4244
4245         * findcmd.c (put_bits): Take a gdb::byte_vector.
4246         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4247         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4248         cleanups.
4249         (find_command): Update.
4250
4251 2017-09-11  Tom Tromey  <tom@tromey.com>
4252
4253         * cli/cli-script.c (class scoped_restore_hook_in): New.
4254         (clear_hook_in_cleanup): Remove.
4255         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4256         scoped_restore_hook_in.
4257
4258 2017-09-11  Tom Tromey  <tom@tromey.com>
4259
4260         * cli/cli-script.c (restore_interp): Remove.
4261         (read_command_lines): Use scoped_restore_interp.
4262         * interps.c (scoped_restore_interp::set_temp): Rename from
4263         interp_set_temp.
4264         * interps.h (class scoped_restore_interp): New.
4265         (interp_set_temp): Remove.
4266
4267 2017-09-11  Tom Tromey  <tom@tromey.com>
4268
4269         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4270         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4271         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4272         scoped_restore.
4273         (mi_cmd_break_insert_1): Update.
4274         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4275         scoped_restore.
4276
4277 2017-09-11  Tom Tromey  <tom@tromey.com>
4278
4279         * demangle.c (demangle_command): Update.
4280         * breakpoint.c (disable_command): Update.
4281         (enable_command): Update.
4282         (find_location_by_number): Make "number" const.  Use
4283         get_number_trailer.
4284         * cli/cli-utils.c (extract_arg): Return std::string.
4285         * probe.c (parse_probe_linespec): Update.  Change types.
4286         (collect_probes): Take string arguments.
4287         (parse_probe_linespec): Likewise.
4288         (info_probes_for_ops): Update.
4289         (enable_probes_command): Update.
4290         (disable_probes_command): Update.
4291         * break-catch-sig.c (catch_signal_split_args): Update.
4292         * mi/mi-parse.c (mi_parse): Update.
4293
4294 2017-09-11  Tom Tromey  <tom@tromey.com>
4295
4296         * language.h (language_enum): Make argument const.
4297         * language.c (language_enum): Make argument const.
4298
4299 2017-09-11  Tom Tromey  <tom@tromey.com>
4300
4301         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4302         as function.
4303         (skip_to_space): Rename from skip_to_space_const.
4304         * common/common-utils.c (skip_to_space): New function.
4305         (skip_to_space): Rename from skip_to_space_const.
4306         * cli/cli-utils.h (get_number): Rename from get_number_const.
4307         (extract_arg): Rename from extract_arg_const.
4308         * cli/cli-utils.c (get_number): Rename from get_number_const.
4309         (extract_arg): Rename from extract_arg_const.
4310         (number_or_range_parser::get_number): Use ::get_number.
4311         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4312         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4313         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4314         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4315         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4316         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4317         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4318         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4319
4320 2017-09-11  Tom Tromey  <tom@tromey.com>
4321
4322         * python/python.c (do_start_initialization): Use
4323         py-event-types.def to initialize types.
4324         Define all object type structures.
4325         * python/python-internal.h: Don't declare event initialization
4326         functions.
4327         * python/py-threadevent.c (thread_event_object_type): Don't
4328         define.
4329         * python/py-stopevent.c (stop_event_object_type): Don't define.
4330         * python/py-signalevent.c (signal_event_object_type): Don't
4331         declare or define.
4332         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4333         (clear_objfiles_event_object_type): Don't declare or define.
4334         * python/py-infevents.c (inferior_call_pre_event_object_type)
4335         (inferior_call_post_event_object_type)
4336         (register_changed_event_object_type)
4337         (memory_changed_event_object_type): Don't declare or define.
4338         * python/py-inferior.c (new_thread_event_object_type)
4339         (new_inferior_event_object_type)
4340         (inferior_deleted_event_object_type): Don't declare or define.
4341         * python/py-exitedevent.c (exited_event_object_type): Don't
4342         declare or define.
4343         * python/py-evts.c (gdbpy_initialize_py_events): Use
4344         py-all-events.def.
4345         * python/py-events.h (thread_event_object_type): Don't declare.
4346         (events_object): Use py-all-events.def.
4347         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4348         py-event-types.def.
4349         * python/py-event-types.def: New file.
4350         * python/py-continueevent.c (create_continue_event_object): Don't
4351         declare or define.
4352         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4353         declare or define.
4354         * python/py-all-events.def: New file.
4355
4356 2017-09-11  Tom Tromey  <tom@tromey.com>
4357
4358         * python/py-threadevent.c (create_thread_event_object): Return
4359         gdbpy_ref.
4360         * python/py-stopevent.h (create_stop_event_object)
4361         (create_breakpoint_event_object, create_signal_event_object):
4362         Update.
4363         * python/py-stopevent.c (create_stop_event_object): Return
4364         gdbpy_ref.
4365         (emit_stop_event): Update.
4366         * python/py-signalevent.c (create_signal_event_object): Return
4367         gdbpy_ref.
4368         * python/py-infevents.c (create_inferior_call_event_object):
4369         Update.
4370         * python/py-event.h (create_event_object)
4371         (create_thread_event_object): Update.
4372         * python/py-event.c (create_event_object): Return gdbpy_ref.
4373         * python/py-continueevent.c: Return gdbpy_ref.
4374         * python/py-bpevent.c (create_breakpoint_event_object): Return
4375         gdbpy_ref.
4376
4377 2017-09-11  Tom Tromey  <tom@tromey.com>
4378
4379         PR python/15622:
4380         * NEWS: Add entry.
4381         * python/python.c (do_start_initialization): Initialize new event
4382         types.
4383         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4384         (gdbpy_initialize_inferior_deleted_event)
4385         (gdbpy_initialize_new_thread_event): Declare.
4386         * python/py-threadevent.c (create_thread_event_object): Add option
4387         "thread" parameter.
4388         * python/py-inferior.c (new_thread_event_object_type)
4389         (new_inferior_event_object_type)
4390         (inferior_deleted_event_object_type): Declare.
4391         (python_new_inferior, python_inferior_deleted): New functions.
4392         (add_thread_object): Emit new_thread event.
4393         (gdbpy_initialize_inferior): Attach new functions to corresponding
4394         observers.
4395         (new_thread, new_inferior, inferior_deleted): Define new event
4396         types.
4397         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4398         registries.
4399         * python/py-events.h (events_object) <new_inferior,
4400         inferior_deleted, new_thread>: New fields.
4401         * python/py-event.h (create_thread_event_breakpoint): Add optional
4402         "thread" parameter.
4403
4404 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4405
4406         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4407         check current_ui instead.
4408         (internal_vproblem): Likewise.
4409
4410 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4411
4412         * thread.c (print_thread_info_1): Remove unnecessary calls to
4413         uiout->is_mi_like_p.
4414
4415 2017-09-09  Tom Tromey  <tom@tromey.com>
4416
4417         * namespace.h (add_using_directive): Update.
4418         * namespace.c (add_using_directive): Change type of excludes to
4419         std::vector.
4420         * dwarf2read.c (read_import_statement): Use std::vector.
4421         (read_namespace): Update.
4422         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4423
4424 2017-09-09  Tom Tromey  <tom@tromey.com>
4425
4426         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4427
4428 2017-09-09  Tom Tromey  <tom@tromey.com>
4429
4430         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4431
4432 2017-09-09  Tom Tromey  <tom@tromey.com>
4433
4434         * stack.c (func_command): Use gdb::def_vector.
4435
4436 2017-09-09  Tom Tromey  <tom@tromey.com>
4437
4438         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4439         ui_out_emit_list, ui_out_emit_tuple.
4440         (mi_cmd_var_update): Likewise.
4441
4442 2017-09-09  Tom Tromey  <tom@tromey.com>
4443
4444         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4445         ui_out_redirect_pop.
4446         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4447         ui_out_redirect_pop.
4448         * utils.c (do_ui_out_redirect_pop)
4449         (make_cleanup_ui_out_redirect_pop): Remove.
4450         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4451         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4452         * ui-out.h (ui_out_redirect_pop): New class.
4453
4454 2017-09-09  Tom Tromey  <tom@tromey.com>
4455
4456         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4457         (list_available_thread_groups, mi_cmd_list_thread_groups)
4458         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4459         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4460         Likewise.
4461
4462 2017-09-09  Tom Tromey  <tom@tromey.com>
4463
4464         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4465         ui_out_emit_tuple.
4466
4467 2017-09-09  Tom Tromey  <tom@tromey.com>
4468
4469         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4470         * stack.c (print_frame): Use ui_out_emit_tuple.
4471         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4472         (info_spu_mailbox_command, info_spu_dma_command)
4473         (info_spu_proxydma_command): Likewise.
4474         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4475         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4476         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4477         ui_out_emit_tuple.
4478         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4479
4480 2017-09-09  Tom Tromey  <tom@tromey.com>
4481
4482         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4483         (class ui_out_emit_table): Update comment.
4484         * ui-out.c (do_cleanup_table_end)
4485         (make_cleanup_ui_out_table_begin_end): Remove.
4486         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4487         (info_spu_dma_cmdlist): Likewise.
4488         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4489         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4490         ui_out_emit_table.
4491
4492 2017-09-09  Tom Tromey  <tom@tromey.com>
4493
4494         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4495         ui_out_emit_list, gdb::optional.
4496
4497 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4498
4499         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4500         prototype.
4501         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4502         prototype.
4503         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4504         prototype.
4505         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4506         * ada-exp.y: Remove _initialize_ada_exp prototype.
4507         * ada-lang.c: Remove _initialize_ada_language prototype.
4508         * ada-tasks.c: Remove _initialize_tasks prototype.
4509         * addrmap.c: Remove _initialize_addrmap prototype.
4510         * agent.c: Remove _initialize_agent prototype.
4511         * aix-thread.c: Remove _initialize_aix_thread prototype.
4512         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4513         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4514         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4515         prototype.
4516         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4517         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4518         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4519         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4520         prototype.
4521         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4522         prototype.
4523         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4524         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4525         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4526         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4527         prototype.
4528         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4529         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4530         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4531         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4532         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4533         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4534         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4535         prototype.
4536         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4537         prototype.
4538         * annotate.c: Remove _initialize_annotate prototype.
4539         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4540         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4541         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4542         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4543         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4544         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4545         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4546         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4547         prototype.
4548         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4549         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4550         * auto-load.c: Remove _initialize_auto_load prototype.
4551         * auxv.c: Remove _initialize_auxv prototype.
4552         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4553         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4554         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4555         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4556         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4557         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4558         prototype.
4559         * break-catch-throw.c: Remove _initialize_break_catch_throw
4560         prototype.
4561         * breakpoint.c: Remove _initialize_breakpoint prototype.
4562         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4563         * btrace.c: Remove _initialize_btrace prototype.
4564         * charset.c: Remove _initialize_charset prototype.
4565         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4566         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4567         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4568         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4569         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4570         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4571         * coffread.c: Remove _initialize_coffread prototype.
4572         * compile/compile.c: Remove _initialize_compile prototype.
4573         * complaints.c: Remove _initialize_complaints prototype.
4574         * completer.c: Remove _initialize_completer prototype.
4575         * copying.awk: Remove _initialize_copying prototype.
4576         * copying.c: Regenerate.
4577         * core-regset.c: Remove _initialize_core_regset prototype.
4578         * corefile.c: Remove _initialize_core prototype.
4579         * corelow.c: Remove _initialize_corelow prototype.
4580         * cp-abi.c: Remove _initialize_cp_abi prototype.
4581         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4582         * cp-support.c: Remove _initialize_cp_support prototype.
4583         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4584         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4585         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4586         * ctf.c: Remove _initialize_ctf prototype.
4587         * d-lang.c: Remove _initialize_d_language prototype.
4588         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4589         prototype.
4590         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4591         * dbxread.c: Remove _initialize_dbxread prototype.
4592         * dcache.c: Remove _initialize_dcache prototype.
4593         * demangle.c: Remove _initialize_demangler prototype.
4594         * disasm-selftests.c: Remove _initialize_disasm_selftests
4595         prototype.
4596         * disasm.c: Remove _initialize_disasm prototype.
4597         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4598         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4599         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4600         prototype.
4601         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4602         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4603         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4604         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4605         * elfread.c: Remove _initialize_elfread prototype.
4606         * exec.c: Remove _initialize_exec prototype.
4607         * extension.c: Remove _initialize_extension prototype.
4608         * f-lang.c: Remove _initialize_f_language prototype.
4609         * f-valprint.c: Remove _initialize_f_valprint prototype.
4610         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4611         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4612         * filesystem.c: Remove _initialize_filesystem prototype.
4613         * findcmd.c: Remove _initialize_mem_search prototype.
4614         * fork-child.c: Remove _initialize_fork_child prototype.
4615         * frame-base.c: Remove _initialize_frame_base prototype.
4616         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4617         * frame.c: Remove _initialize_frame prototype.
4618         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4619         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4620         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4621         * gcore.c: Remove _initialize_gcore prototype.
4622         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4623         * gdbarch.c: Regenerate.
4624         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4625         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4626         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4627         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4628         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4629         * go-lang.c: Remove _initialize_go_language prototype.
4630         * go32-nat.c: Remove _initialize_go32_nat prototype.
4631         * guile/guile.c: Remove _initialize_guile prototype.
4632         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4633         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4634         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4635         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4636         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4637         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4638         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4639         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4640         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4641         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4642         prototype.
4643         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4644         prototype.
4645         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4646         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4647         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4648         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4649         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4650         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4651         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4652         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4653         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4654         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4655         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4656         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4657         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4658         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4659         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4660         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4661         prototype.
4662         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4663         prototype.
4664         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4665         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4666         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4667         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4668         * infcall.c: Remove _initialize_infcall prototype.
4669         * infcmd.c: Remove _initialize_infcmd prototype.
4670         * inferior.c: Remove _initialize_inferiors prototype.
4671         * inflow.c: Remove _initialize_inflow prototype.
4672         * infrun.c: Remove _initialize_infrun prototype.
4673         * interps.c: Remove _initialize_interpreter prototype.
4674         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4675         * jit.c: Remove _initialize_jit prototype.
4676         * language.c: Remove _initialize_language prototype.
4677         * linux-fork.c: Remove _initialize_linux_fork prototype.
4678         * linux-nat.c: Remove _initialize_linux_nat prototype.
4679         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4680         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4681         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4682         * m2-lang.c: Remove _initialize_m2_language prototype.
4683         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4684         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4685         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4686         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4687         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4688         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4689         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4690         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4691         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4692         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4693         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4694         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4695         * machoread.c: Remove _initialize_machoread prototype.
4696         * macrocmd.c: Remove _initialize_macrocmd prototype.
4697         * macroscope.c: Remove _initialize_macroscope prototype.
4698         * maint.c: Remove _initialize_maint_cmds prototype.
4699         * mdebugread.c: Remove _initialize_mdebugread prototype.
4700         * memattr.c: Remove _initialize_mem prototype.
4701         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4702         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4703         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4704         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4705         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4706         * microblaze-linux-tdep.c: Remove
4707         _initialize_microblaze_linux_tdep prototype.
4708         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4709         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4710         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4711         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4712         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4713         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4714         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4715         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4716         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4717         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4718         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4719         prototype.
4720         * mipsread.c: Remove _initialize_mipsread prototype.
4721         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4722         prototype.
4723         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4724         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4725         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4726         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4727         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4728         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4729         prototype.
4730         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4731         * nto-procfs.c: Remove _initialize_procfs prototype.
4732         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4733         * objc-lang.c: Remove _initialize_objc_language prototype.
4734         * objfiles.c: Remove _initialize_objfiles prototype.
4735         * observer.c: Remove observer_test_first_notification_function,
4736         observer_test_second_notification_function,
4737         observer_test_third_notification_function, and
4738         _initialize_observer prototypes.
4739         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4740         * osabi.c: Remove _initialize_gdb_osabi prototype.
4741         * osdata.c: Remove _initialize_osdata prototype.
4742         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4743         * parse.c: Remove _initialize_parse prototype.
4744         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4745         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4746         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4747         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4748         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4749         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4750         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4751         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4752         * printcmd.c: Remove _initialize_printcmd prototype.
4753         * probe.c: Remove _initialize_probe prototype.
4754         * proc-api.c: Remove _initialize_proc_api prototype.
4755         * proc-events.c: Remove _initialize_proc_events prototype.
4756         * proc-service.c: Remove _initialize_proc_service prototype.
4757         * procfs.c: Remove _initialize_procfs prototype.
4758         * psymtab.c: Remove _initialize_psymtab prototype.
4759         * python/python.c: Remove _initialize_python prototype.
4760         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4761         * record-btrace.c: Remove _initialize_record_btrace prototype.
4762         * record-full.c: Remove _initialize_record_full prototype.
4763         * record.c: Remove _initialize_record prototype.
4764         * regcache.c: Remove _initialize_regcache prototype.
4765         * reggroups.c: Remove _initialize_reggroup prototype.
4766         * remote-notif.c: Remove _initialize_notif prototype.
4767         * remote-sim.c: Remove _initialize_remote_sim prototype.
4768         * remote.c: Remove _initialize_remote prototype.
4769         * reverse.c: Remove _initialize_reverse prototype.
4770         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4771         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4772         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4773         prototype.
4774         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4775         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4776         * rust-exp.y: Remove _initialize_rust_exp prototype.
4777         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4778         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4779         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4780         * score-tdep.c: Remove _initialize_score_tdep prototype.
4781         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4782         prototype.
4783         * ser-go32.c: Remove _initialize_ser_dos prototype.
4784         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4785         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4786         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4787         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4788         * serial.c: Remove _initialize_serial prototype.
4789         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4790         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4791         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4792         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4793         * skip.c: Remove _initialize_step_skip prototype.
4794         * sol-thread.c: Remove _initialize_sol_thread prototype.
4795         * solib-aix.c: Remove _initialize_solib_aix prototype.
4796         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4797         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4798         * solib-frv.c: Remove _initialize_frv_solib prototype.
4799         * solib-spu.c: Remove _initialize_spu_solib prototype.
4800         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4801         * solib-target.c: Remove _initialize_solib_target prototype.
4802         * solib.c: Remove _initialize_solib prototype.
4803         * source.c: Remove _initialize_source prototype.
4804         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4805         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4806         prototype.
4807         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4808         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4809         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4810         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4811         prototype.
4812         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4813         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4814         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4815         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4816         prototype.
4817         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4818         prototype.
4819         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4820         prototype.
4821         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4822         prototype.
4823         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4824         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4825         prototype.
4826         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4827         prototype.
4828         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4829         prototype.
4830         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4831         prototype.
4832         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4833         prototype.
4834         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4835         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4836         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4837         * stabsread.c: Remove _initialize_stabsread prototype.
4838         * stack.c: Remove _initialize_stack prototype.
4839         * stap-probe.c: Remove _initialize_stap_probe prototype.
4840         * std-regs.c: Remove _initialize_frame_reg prototype.
4841         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4842         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4843         * symfile.c: Remove _initialize_symfile prototype.
4844         * symmisc.c: Remove _initialize_symmisc prototype.
4845         * symtab.c: Remove _initialize_symtab prototype.
4846         * target-dcache.c: Remove _initialize_target_dcache prototype.
4847         * target-descriptions.c: Remove _initialize_target_descriptions
4848         prototype.
4849         * thread.c: Remove _initialize_thread prototype.
4850         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4851         prototype.
4852         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4853         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4854         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4855         prototype.
4856         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4857         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4858         * tracefile.c: Remove _initialize_tracefile prototype.
4859         * tracepoint.c: Remove _initialize_tracepoint prototype.
4860         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4861         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4862         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4863         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4864         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4865         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4866         * tui/tui.c: Remove _initialize_tui prototype.
4867         * typeprint.c: Remove _initialize_typeprint prototype.
4868         * user-regs.c: Remove _initialize_user_regs prototype.
4869         * utils.c: Remove _initialize_utils prototype.
4870         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4871         * valarith.c: Remove _initialize_valarith prototype.
4872         * valops.c: Remove _initialize_valops prototype.
4873         * valprint.c: Remove _initialize_valprint prototype.
4874         * value.c: Remove _initialize_values prototype.
4875         * varobj.c: Remove _initialize_varobj prototype.
4876         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4877         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4878         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4879         * windows-nat.c: Remove _initialize_windows_nat,
4880         _initialize_check_for_gdb_ini, and _initialize_loadable
4881         prototypes.
4882         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4883         * xcoffread.c: Remove _initialize_xcoffread prototype.
4884         * xml-support.c: Remove _initialize_xml_support prototype.
4885         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4886         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4887         prototype.
4888         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4889         prototype.
4890         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4891
4892 2017-09-08  Keith Seitz  <keiths@redhat.com>
4893
4894         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4895         field.
4896
4897 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4898
4899         * f-valprint.c (f_val_print): Remove check for one byte
4900         sized integers. Remove printing of character type.
4901
4902 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4903             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4904             Bernhard Heckel  <bernhard.heckel@intel.com>
4905
4906         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4907         to maintain proper indentation when printing pointers/refs.
4908
4909 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4910
4911         GDB 8.0.1 released.
4912
4913 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4914
4915         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4916
4917 2017-09-05  Tom Tromey  <tom@tromey.com>
4918
4919         * parse.c (funcall_chain): Now a std::vector.
4920         (start_arglist, end_arglist): Simplify.
4921         (free_funcalls): Remove.
4922         (parse_exp_in_context_1): Remove cleanup.
4923
4924 2017-09-05  Tom Tromey  <tom@tromey.com>
4925
4926         * go-exp.y (go_parse): Don't create a cleanup.
4927
4928 2017-09-05  Tom Tromey  <tom@tromey.com>
4929
4930         * d-exp.y (PrimaryExpression): Use std::string.
4931         (d_parse): Don't create a cleanup.
4932
4933 2017-09-05  Tom Tromey  <tom@tromey.com>
4934
4935         * utils.c (do_clear_parser_state): Remove.
4936         (make_cleanup_clear_parser_state): Remove.
4937         * p-exp.y (pascal_parse): Use scoped_restore.
4938         * m2-exp.y (m2_parse): Use scoped_restore.
4939         * f-exp.y (f_parse): Use scoped_restore.
4940         * d-exp.y (d_parse): Use scoped_restore.
4941         * c-exp.y (c_parse): Use scoped_restore.
4942         * ada-exp.y (ada_parse): Use scoped_restore.
4943         * utils.h (make_cleanup_clear_parser_state): Remove.
4944
4945 2017-09-06  Keith Seitz  <keiths@redhat.com>
4946
4947         * dwarf2read.c (dw2_linkage_name_attr): New function.
4948         (dw2_linkage_name): New function.
4949         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4950         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4951         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4952
4953 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4954
4955         * config/djgpp/djconfig.sh: Correct shell portability issue.
4956
4957 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4958
4959         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4960
4961 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4962
4963         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4964         * NEWS: Mention new FreeBSD/mips native configuration.
4965         * configure.host: Add aarch64*-*-freebsd*.
4966         * configure.nat: Likewise.
4967         * aarch64-fbsd-nat.c: New file.
4968
4969 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4970
4971         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4972         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4973         * NEWS: Mention new FreeBSD/aarch64 target.
4974         * configure.tgt: Add aarch64*-*-freebsd*.
4975         * aarch64-fbsd-tdep.c: New file.
4976         * aarch64-fbsd-tdep.h: New file.
4977
4978 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4979
4980         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4981
4982 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4983
4984         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4985         of TLS symbols.
4986
4987 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4988
4989         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4990         call.
4991
4992 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4993
4994         * infrun.c (follow_exec): Call add_thread after
4995         target_find_description.
4996
4997 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4998
4999         * infrun.c (handle_inferior_event_1): When exec'ing, read
5000         stop_pc after follow_exec.
5001
5002 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5003
5004         * remote.c (process_g_packet): Update error message.
5005
5006 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5007
5008         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5009         targets.
5010
5011 2017-09-05  Pedro Alves  <palves@redhat.com>
5012
5013         * eval.c (eval_call, evaluate_funcall): New functions, factored
5014         out from ...
5015         (evaluate_subexp_standard): ... this.
5016
5017 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5018
5019         * amd64-tdep.c (amd64_target_description): Create target
5020         descriptions.
5021         (_initialize_amd64_tdep): Don't call functions
5022         initialize_tdesc_amd64_*.  Add self tests.
5023         * arch/amd64.c (amd64_create_target_description): Add parameter
5024         is_linux.  Call set_tdesc_osabi if is_linux is true.
5025         * arch/amd64.h (amd64_create_target_description): Update the
5026         declaration.
5027         * arch/i386.c (i386_create_target_description): Add parameter
5028         is_linux.  Call set_tdesc_osabi if is_linux is true.
5029         * arch/i386.h (i386_create_target_description): Update
5030         declaration.
5031         * configure.tgt: Add i386.o to gdb_target_obs.
5032         * features/Makefile (XMLTOC): Remove i386/*.xml.
5033         * features/i386/amd64-avx-avx512.c: Remove.
5034         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5035         * features/i386/amd64-avx-mpx.c: Remove.
5036         * features/i386/amd64-avx.c: Remove.
5037         * features/i386/amd64-mpx.c: Remove.
5038         * features/i386/amd64.c: Remove.
5039         * features/i386/i386-avx-avx512.c: Remove.
5040         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5041         * features/i386/i386-avx-mpx.c: Remove.
5042         * features/i386/i386-avx.c: Remove.
5043         * features/i386/i386-mmx.c: Remove.
5044         * features/i386/i386-mpx.c: Remove.
5045         * features/i386/i386.c: Remove.
5046         * i386-tdep.c: Don't include features/i386/i386*.c., include
5047         target-descriptions.h and arch/i386.h.
5048         (i386_target_description): Create target descriptions.
5049         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5050         functions.  Do self tests.
5051
5052 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5053
5054         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5055         * features/i386/amd64-avx-avx512-linux.c: Removed.
5056         * features/i386/amd64-avx-linux.c: Removed.
5057         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5058         * features/i386/amd64-avx-mpx-linux.c: Removed.
5059         * features/i386/amd64-linux.c: Removed.
5060         * features/i386/amd64-mpx-linux.c: Removed.
5061         * features/i386/x32-avx-avx512-linux.c: Removed.
5062         * features/i386/x32-avx-linux.c: Removed.
5063         * features/i386/x32-linux.c: Removed.
5064
5065 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5066
5067         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5068         features/i386/*.c.
5069         (amd64_linux_read_description): Call
5070         amd64_create_target_description.
5071         * arch/amd64.c: New file.
5072         * arch/amd64.h: New file.
5073         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5074         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5075
5076 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5077
5078         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5079         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5080         (amd64_linux_read_description): Create target descriptions.
5081         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5082         functions.  Add unit tests.
5083         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5084         x32-core.xml.
5085         * features/i386/64bit-avx.c: Generated.
5086         * features/i386/64bit-avx512.c: Generated.
5087         * features/i386/64bit-core.c: Generated.
5088         * features/i386/64bit-linux.c: Generated.
5089         * features/i386/64bit-mpx.c: Generated.
5090         * features/i386/64bit-pkeys.c: Generated.
5091         * features/i386/64bit-segments.c: Generated.
5092         * features/i386/64bit-sse.c: Generated.
5093         * features/i386/x32-core.c: Generated.
5094         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5095         c files for amd64-linux and x32-linux.
5096
5097 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5098
5099         * amd64-linux-tdep.c (amd64_linux_read_description): New
5100         function.
5101         (amd64_linux_core_read_description): Call
5102         amd64_linux_read_description.
5103         (amd64_linux_init_abi): Likewise.
5104         (amd64_x32_linux_init_abi): Likewise.
5105         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5106         * x86-linux-nat.c (x86_linux_read_description): Call
5107         amd64_linux_read_description.
5108
5109 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5110
5111         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5112         comments.
5113
5114 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5115
5116         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5117         * features/i386/i386-avx-avx512-linux.c: Remove.
5118         * features/i386/i386-avx-linux.c: Remove.
5119         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5120         * features/i386/i386-avx-mpx-linux.c: Remove.
5121         * features/i386/i386-linux.c: Remove.
5122         * features/i386/i386-mmx-linux.c: Remove.
5123         * features/i386/i386-mpx-linux.c: Remove.
5124
5125 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5126
5127         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5128         (SFILES): Add arch/i386.c.
5129         (HFILES_NO_SRCDIR): Add arch/i386.h.
5130         * arch/i386.c: New file.
5131         * arch/i386.h: New file.
5132         * arch/tdesc.h (allocate_target_description): Declare.
5133         (set_tdesc_architecture): Declare.
5134         (set_tdesc_osabi): Declare.
5135         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5136         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5137         include arch/i386.h.
5138         (i386_linux_read_description): Remove code and call
5139         i386_create_target_description.
5140         (set_tdesc_architecture): New function.
5141         (set_tdesc_osabi): New function.
5142         * target-descriptions.h (allocate_target_description): Remove.
5143
5144 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5145
5146         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5147         * target-descriptions.c (tdesc_create_feature): Likewise, and
5148         adjust code.
5149         * features/i386/32bit-avx.c: Re-generated.
5150         * features/i386/32bit-avx512.c: Re-generated.
5151         * features/i386/32bit-core.c: Re-generated.
5152         * features/i386/32bit-linux.c: Re-generated.
5153         * features/i386/32bit-mpx.c: Re-generated.
5154         * features/i386/32bit-pkeys.c: Re-generated.
5155         * features/i386/32bit-sse.c: Re-generated.
5156
5157 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5158
5159         * regformats/regdef.h (struct reg): Override operator == and !=.
5160
5161 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5162
5163         * arch/tdesc.h: New file.
5164         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5165         * target-descriptions.c: Update comments.
5166         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5167         declarations.
5168         * features/i386/32bit-avx.c: Re-generated.
5169         * features/i386/32bit-avx512.c: Re-generated.
5170         * features/i386/32bit-core.c: Re-generated.
5171         * features/i386/32bit-linux.c: Re-generated.
5172         * features/i386/32bit-mpx.c: Re-generated.
5173         * features/i386/32bit-pkeys.c: Re-generated.
5174         * features/i386/32bit-sse.c: Re-generated.
5175
5176 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5177
5178         * regformats/regdat.sh: Update generated code.
5179
5180 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5181
5182         * regformats/regdat.sh: Adjust code order.
5183
5184 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5185
5186         * expprint.c (dump_subexp_body_standard): Use constant format
5187         string in fprintf_filtered call.
5188
5189 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5190
5191         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5192         NetBSD/i386.
5193         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5194
5195 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5196
5197         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5198
5199 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5200
5201         * bsd-kvm.o: Define _KMEMUSER.
5202         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5203         * configure: Regenerate.
5204
5205 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5206
5207         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5208         * i386-fbsd-nat.c: Likewise.
5209
5210 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5211
5212         * unittests/array-view-selftests.c: Add include of <array>.
5213
5214 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5215
5216         * spu-tdep.c (flush_ea_cache): Add missing argument to
5217         call_function_by_hand.
5218
5219 2017-09-04  Pedro Alves  <palves@redhat.com>
5220
5221         * NEWS (Safer support for debugging with no debug info): New.
5222
5223 2017-09-04  Pedro Alves  <palves@redhat.com>
5224
5225         * c-exp.y (function_method, function_method_void): Add current
5226         instance flags to TYPE_INSTANCE.
5227         * dwarf2read.c (check_modifier): New.
5228         (compute_delayed_physnames): Assert that only C++ adds delayed
5229         physnames.  Mark fn_fields as const/volatile depending on
5230         physname.
5231         * eval.c (make_params): New type_instance_flags parameter.  Use
5232         it as the new type's instance flags.
5233         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5234         flags element and pass it to make_params.
5235         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5236         instance flags element.
5237         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5238         * gdbtypes.h: Include "enum-flags.h".
5239         (type_instance_flags): New enum-flags type.
5240         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5241         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5242         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5243         (follow_type_instance_flags): New function.
5244         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5245         * parser-defs.h (follow_type_instance_flags): Declare.
5246         * valops.c (value_struct_elt_for_reference): const/volatile must
5247         match too.
5248
5249 2017-09-04  Pedro Alves  <palves@redhat.com>
5250
5251         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5252         function/method scopes; lookup the nested name as a function local
5253         static variable.
5254
5255 2017-09-04  Pedro Alves  <palves@redhat.com>
5256
5257         (%type <voidval>): Add function_method.
5258         * c-exp.y (exp): New production for calls with no arguments.
5259         (function_method, function_method_void_or_typelist): New
5260         productions.
5261         (exp): New production for "method()::static_var".
5262         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5263         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5264         Handle OP_FUNC_STATIC_VAR.
5265         * parse.c (operator_length_standard):
5266         Handle OP_FUNC_STATIC_VAR.
5267
5268 2017-09-04  Pedro Alves  <palves@redhat.com>
5269
5270         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5271         handling.
5272         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5273         Ditto.
5274         * parse.c (operator_length_standard, operator_check_standard):
5275         Ditto.
5276         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5277
5278 2017-09-04  Pedro Alves  <palves@redhat.com>
5279
5280         * ax-gdb.c: Include "typeprint.h".
5281         (gen_expr_for_cast): New function.
5282         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5283         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5284         type is unknown.
5285         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5286         nodebug_data_symbol.
5287         * eval.c: Include "typeprint.h".
5288         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5289         Error out if symbol has unknown type.
5290         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5291         evaluate_subexp_for_cast.
5292         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5293         OP_VAR_MSYM_VALUE.
5294         (evaluate_subexp_for_cast): New function.
5295         * gdbtypes.c (init_nodebug_var_type): New function.
5296         (objfile_type): Use it to initialize types of variables with no
5297         debug info.
5298         * typeprint.c (error_unknown_type): New.
5299         * typeprint.h (error_unknown_type): New declaration.
5300         * compile/compile-c-types.c (convert_type_basic): Handle
5301         TYPE_CODE_ERROR; warn and fallback to int for variables with
5302         unknown type.
5303
5304 2017-09-04  Pedro Alves  <palves@redhat.com>
5305
5306         * eval.c (evaluate_var_value): New function, factored out from ...
5307         (evaluate_subexp_standard): ... here.
5308
5309 2017-09-04  Pedro Alves  <palves@redhat.com>
5310
5311         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5312         Remove useless assignments to 'op'.
5313
5314 2017-09-04  Pedro Alves  <palves@redhat.com>
5315
5316         * eval.c (eval_skip_value): New function.
5317         (evaluate_subexp_standard): Use it.
5318
5319 2017-09-04  Pedro Alves  <palves@redhat.com>
5320
5321         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5322         function name from symbol/minsym and pass it to
5323         error_call_unknown_return_type.
5324
5325 2017-09-04  Pedro Alves  <palves@redhat.com>
5326
5327         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5328         * ax-gdb.c (gen_msym_var_ref): New function.
5329         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5330         * eval.c (evaluate_var_msym_value): New function.
5331         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5332         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5333         to call_function_by_hand.
5334         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5335         Handle OP_VAR_MSYM_VALUE.
5336         (union exp_element) <msymbol>: New field.
5337         * minsyms.h (struct type): Forward declare.
5338         (find_minsym_type_and_address): Declare.
5339         * parse.c (write_exp_elt_msym): New function.
5340         (write_exp_msymbol): Delete, refactored as ...
5341         (find_minsym_type_and_address): ... this new function.
5342         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5343         (operator_length_standard, operator_check_standard): Handle
5344         OP_VAR_MSYM_VALUE.
5345         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5346
5347 2017-09-04  Pedro Alves  <palves@redhat.com>
5348
5349         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5350         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5351         unknown.
5352         * ada-typeprint.c (print_func_type): Handle functions with unknown
5353         return type.
5354         * c-typeprint.c (c_type_print_base): Handle functions and methods
5355         with unknown return type.
5356         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5357         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5358         * compile/compile-c-types.c: Include "objfiles.h".
5359         (convert_func): For functions with unknown return type, warn and
5360         default to int.
5361         * compile/compile-object-run.c (compile_object_run): Adjust call
5362         to call_function_by_hand_dummy.
5363         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5364         call_function_by_hand.
5365         * eval.c (evaluate_subexp_standard): Adjust calls to
5366         call_function_by_hand.  Handle functions and methods with unknown
5367         return type.  Pass expect_type to call_function_by_hand.
5368         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5369         return type.
5370         * gcore.c (call_target_sbrk): Adjust call to
5371         call_function_by_hand.
5372         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5373         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5374         an integer address type instead of nodebug.
5375         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5376         call_function_by_hand.
5377         * infcall.c (error_call_unknown_return_type): New function.
5378         (call_function_by_hand): New "default_return_type" parameter.
5379         Pass it down.
5380         (call_function_by_hand_dummy): New "default_return_type"
5381         parameter.  Use it instead of defaulting to int.  If there's no
5382         default and the return type is unknown, throw an error.  If
5383         there's a default return type, and the called function has no
5384         debug info, then assume the function is prototyped.
5385         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5386         New "default_return_type" parameter.
5387         (error_call_unknown_return_type): New declaration.
5388         * linux-fork.c (call_lseek): Cast return type of lseek.
5389         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5390         call_function_by_hand.
5391         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5392         calls to call_function_by_hand.
5393         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5394         return type.
5395         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5396         (value_nsstring, print_object_command): Adjust calls to
5397         call_function_by_hand.
5398         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5399         functions with unknown return type.
5400         (pascal_type_print_func_varspec_suffix): New function.
5401         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5402         TYPE_CODE_METHOD>: Use it.
5403         * python/py-value.c (valpy_call): Adjust call to
5404         call_function_by_hand.
5405         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5406         call_function_by_hand.
5407         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5408         call_function_by_hand.
5409         * valops.c (value_allocate_space_in_inferior): Adjust call to
5410         call_function_by_hand.
5411         * typeprint.c (type_print_unknown_return_type): New function.
5412         * typeprint.h (type_print_unknown_return_type): New declaration.
5413
5414 2017-09-04  Pedro Alves  <palves@redhat.com>
5415
5416         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5417         types with more than one parameter as prototyped.
5418
5419 2017-09-04  Pedro Alves  <palves@redhat.com>
5420
5421         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5422         (disassemble_command): Use gdb_disassembly_flags instead of bare
5423         int.
5424         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5425         (dump_insns, do_mixed_source_and_assembly_deprecated)
5426         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5427         Use gdb_disassembly_flags instead of bare int.
5428         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5429         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5430         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5431         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5432         (enum gdb_disassembly_flag): ... values of this new enumeration.
5433         (gdb_disassembly_flags): Define.
5434         (gdb_disassembly)
5435         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5436         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5437         gdb_disassembly_flags instead of bare int.
5438         * record-btrace.c (btrace_insn_history)
5439         (record_btrace_insn_history, record_btrace_insn_history_range)
5440         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5441         instead of bare int.
5442         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5443         Use gdb_disassembly_flags instead of bare int.
5444         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5445         Define.
5446         * target-delegates.c: Regenerate.
5447         * target.c (target_insn_history, target_insn_history_from)
5448         (target_insn_history_range): Use gdb_disassembly_flags instead of
5449         bare int.
5450         * target.h: Include "disasm.h".
5451         (struct target_ops) <to_insn_history, to_insn_history_from,
5452         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5453         int.
5454         (target_insn_history, target_insn_history_from)
5455         (target_insn_history_range): Use gdb_disassembly_flags instead of
5456         bare int.
5457
5458 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5459
5460         * cli/cli-script.c (build_command_line): For if/while commands,
5461         check whether args is empty.
5462
5463 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5464
5465         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5466         (enum command_control_type): Likewise.
5467         (struct command_line): Likewise.
5468         (free_command_lines): Likewise.
5469         (struct command_lines_deleter): Likewise.
5470         (command_line_up): Likewise.
5471         (read_command_lines): Likewise.
5472         (read_command_lines_1): Likewise.
5473         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5474         (enum command_control_type): Likewise.
5475         (struct command_line): Likewise.
5476         (free_command_lines): Likewise.
5477         (struct command_lines_deleter): Likewise.
5478         (command_line_up): Likewise.
5479         (read_command_lines): Likewise.
5480         (read_command_lines_1): Likewise.
5481         * breakpoint.h: Include cli/cli-script.h.
5482         * extension-priv.h: Likewise.
5483         * gdbcmd.h: Likewise.
5484
5485 2017-09-04  Pedro Alves  <palves@redhat.com>
5486
5487         * ada-lang.c (is_known_support_routine): Move sal declaration to
5488         where it is initialized.
5489         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5490         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5491         (clear_command, update_static_tracepoint): Remove init_sal
5492         references.  Move declarations closer to initializations.
5493         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5494         initializations.
5495         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5496         references.  Move sal declarations closer to initializations.
5497         * frame.c (find_frame_sal): Return a symtab_and_line via function
5498         return instead of output parameter.  Remove init_sal references.
5499         * frame.h (find_frame_sal): Return a symtab_and_line via function
5500         return instead of output parameter.
5501         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5502         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5503         instead of memset.
5504         (gdbscm_find_pc_line): Remove init_sal reference.
5505         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5506         references.  Move declarations closer to initializations.
5507         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5508         initializations.
5509         (finish_backward): Remove init_sal references.  Move declarations
5510         closer to initializations.
5511         * infrun.c (process_event_stop_test, handle_step_into_function)
5512         (insert_hp_step_resume_breakpoint_at_frame)
5513         (insert_step_resume_breakpoint_at_caller): Likewise.
5514         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5515         (symbol_to_sal): Likewise.
5516         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5517         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5518         to its initialization.
5519         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5520         init_sal references.  Move declarations closer to initializations.
5521         * source.c (get_current_source_symtab_and_line): Remove brace
5522         initialization.
5523         (set_current_source_symtab_and_line): Now takes the sal by const
5524         reference.  Remove brace initialization.
5525         (line_info): Remove init_sal reference.
5526         * source.h (set_current_source_symtab_and_line): Now takes a
5527         symtab_and_line via const reference.
5528         * stack.c (set_current_sal_from_frame): Adjust.
5529         (print_frame_info): Adjust.
5530         (get_last_displayed_sal): Return the sal via function return
5531         instead of via output parameter.  Simplify.
5532         (frame_info): Adjust.
5533         * stack.h (get_last_displayed_sal): Return the sal via function
5534         return instead of via output parameter.
5535         * symtab.c (init_sal): Delete.
5536         (find_pc_sect_line): Remove init_sal references.  Move
5537         declarations closer to initializations.
5538         (find_function_start_sal): Remove init_sal references.  Move
5539         declarations closer to initializations.
5540         * symtab.h (struct symtab_and_line): In-class initialize all
5541         fields.
5542         * tracepoint.c (set_traceframe_context)
5543         (print_one_static_tracepoint_marker): Remove init_sal references.
5544         Move declarations closer to initializations.
5545         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5546         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5547         declarations closer to initializations.
5548         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5549         init_sal references.  Adjust.
5550
5551 2017-09-04  Pedro Alves  <palves@redhat.com>
5552
5553         * ax-gdb.c (agent_command_1): Use range-for.
5554         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5555         * breakpoint.c: Include "common/array-view.h".
5556         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5557         parameter from struct symtabs_and_lines to
5558         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5559         (breakpoint_sals_to_pc): Change sals parameter from struct
5560         symtabs_and_lines to std::vector reference.
5561         (check_fast_tracepoint_sals): Change sals parameter from struct
5562         symtabs_and_lines to std::array_view.  Use range-for.
5563         (decode_static_tracepoint_spec): Return a std::vector instead of
5564         symtabs_and_lines.  Update.
5565         (create_breakpoint): Update.
5566         (break_range_command, until_break_command, clear_command): Update.
5567         (base_breakpoint_decode_location, bkpt_decode_location)
5568         (bkpt_probe_create_sals_from_location)
5569         (bkpt_probe_decode_location, tracepoint_decode_location)
5570         (tracepoint_probe_decode_location)
5571         (strace_marker_create_sals_from_location): Return a std::vector
5572         instead of symtabs_and_lines.
5573         (strace_marker_create_breakpoints_sal): Update.
5574         (strace_marker_decode_location): Return a std::vector instead of
5575         symtabs_and_lines.  Update.
5576         (update_breakpoint_locations): Change struct symtabs_and_lines
5577         parameters to gdb::array_view.  Adjust.
5578         (location_to_sals): Return a std::vector instead of
5579         symtabs_and_lines.  Update.
5580         (breakpoint_re_set_default): Use std::vector instead of struct
5581         symtabs_and_lines.
5582         (decode_location_default): Return a std::vector instead of
5583         symtabs_and_lines.  Update.
5584         * breakpoint.h: Include "common/array-view.h".
5585         (struct breakpoint_ops) <decode_location>: Now returns a
5586         std::vector instead of returning a symtabs_and_lines via output
5587         parameter.
5588         (update_breakpoint_locations): Change sals parameters to use
5589         gdb::array_view.
5590         * cli/cli-cmds.c (edit_command, list_command): Update to use
5591         std::vector and gdb::array_view.
5592         (ambiguous_line_spec): Adjust to use gdb::array_view and
5593         range-for.
5594         (compare_symtabs): Rename to ...
5595         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5596         const reference and adjust.
5597         (filter_sals): Rewrite using std::vector and standard algorithms.
5598         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5599         (jump_command): Update to use std::vector.
5600         * linespec.c (struct linespec_state) <canonical_names>: Update
5601         comment.
5602         (add_sal_to_sals_basic): Delete.
5603         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5604         (decode_line_2, create_sals_line_offset)
5605         (convert_address_location_to_sals, convert_linespec_to_sals)
5606         (convert_explicit_location_to_sals, parse_linespec)
5607         (event_location_to_sals, decode_line_full, decode_line_1)
5608         (decode_line_with_current_source)
5609         (decode_line_with_last_displayed, decode_objc)
5610         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5611         (linespec_result::~linespec_result): Adjust to use std::vector
5612         instead of symtabs_and_lines.
5613         * linespec.h (linespec_sals::sals): Now a std::vector.
5614         (struct linespec_result): Use std::vector, bool, and in-class
5615         initialization.
5616         (decode_line_1, decode_line_with_current_source)
5617         (decode_line_with_last_displayed): Return std::vector.
5618         * macrocmd.c (info_macros_command): Use std::vector.
5619         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5620         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5621         std::vector.
5622         * probe.h (parse_probes): Return a std::vector.
5623         * python/python.c (gdbpy_decode_line): Use std::vector and
5624         gdb::array_view.
5625         * source.c (select_source_symtab, line_info): Use std::vector.
5626         * stack.c (func_command): Use std::vector.
5627         * symtab.h (struct symtabs_and_lines): Delete.
5628         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5629
5630 2017-09-04  Pedro Alves  <palves@redhat.com>
5631
5632         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5633         unittests/array-view-selftests.c.
5634         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5635         * common/array-view.h: New file.
5636         * unittests/array-view-selftests.c: New file.
5637
5638 2017-09-04  Pedro Alves  <palves@redhat.com>
5639
5640         * cli/cli-cmds.c (edit_command): Pass message to
5641         ambiguous_line_spec.
5642         (list_command): Pass message to ambiguous_line_spec.  Say
5643         "first"/"last" instead of "start" and "end" to be consistent with
5644         the manual.
5645         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5646         them to print formatted message.
5647
5648 2017-09-04  Pedro Alves  <palves@redhat.com>
5649
5650         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5651         ftrace_update_insns by reference instead of pointer.
5652
5653 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5654
5655         * i386-go32-tdep.c: Include x86-xstate.h.
5656         (i386_go32_init_abi): Call i386_target_description.
5657         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5658         if xcr0 is X86_XSTATE_X87_MASK.
5659         * i386-tdep.h (tdesc_i386): Remove the declaration.
5660         (tdesc_i386_mmx): Likewise.
5661
5662 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5663
5664         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5665         X86_XSTATE_SSE_MASK instead of 0.
5666
5667 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5668
5669         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5670         i386_target_description.
5671         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5672         i386_target_description.
5673         * i386-tdep.c (i386_gdbarch_init): Likewise.
5674
5675 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5676
5677         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5678         (x86_darwin_init_abi_64): Call amd64_target_description.
5679         * amd64-dicos-tdep.c: Likewise.
5680         * amd64-fbsd-nat.c: Likewise.
5681         * amd64-fbsd-tdep.c: Likewise.
5682         * amd64-nbsd-tdep.c: Likewise.
5683         * amd64-obsd-tdep.c: Likewise.
5684         * amd64-sol2-tdep.c: Likewise.
5685         * amd64-windows-tdep.c: Likewise.
5686         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5687
5688 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5689
5690         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5691         (btrace_function) <insn>: Change type to use std::vector.
5692         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5693         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5694         ftrace_update_insns, ftrace_compute_global_level_offset,
5695         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5696         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5697         change to std::vector.
5698         (ftrace_update_insns): Adjust to change to std::vector, change
5699         type of INSN parameter.
5700         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5701         * record-btrace.c (btrace_call_history_insn_range,
5702         btrace_compute_src_line_range,
5703         record_btrace_frame_prev_register): Adjust to change to
5704         std::vector.
5705         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5706         to change to std::vector.
5707
5708 2017-09-03  Tom Tromey  <tom@tromey.com>
5709
5710         * corefile.c (reopen_exec_file): Use std::string.
5711
5712 2017-09-03  Tom Tromey  <tom@tromey.com>
5713
5714         * compile/compile.c (compile_register_name_mangled): Return
5715         std::string.
5716         * compile/compile-loc2c.c (pushf_register_address): Update.
5717         (pushf_register): Update.
5718         * compile/compile-c-types.c (convert_array): Update.
5719         * compile/compile-c-symbols.c (generate_vla_size): Update.
5720         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5721         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5722         (convert_one_symbol): Update.
5723         (generate_c_for_for_one_variable): Update.
5724         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5725         std::string.
5726         (generate_register_struct): Update.
5727         * compile/compile-internal.h (c_get_range_decl_name): Return a
5728         std::string.
5729         (compile_register_name_mangled): Return std::string.
5730
5731 2017-09-03  Tom Tromey  <tom@tromey.com>
5732
5733         * utils.c (perror_string): Return a std::string.
5734         (throw_perror_with_name, perror_warning_with_name): Update.
5735
5736 2017-09-03  Tom Tromey  <tom@tromey.com>
5737
5738         * demangle.c (demangle_command): Use std::string,
5739         unique_xmalloc_ptr.
5740
5741 2017-09-03  Tom Tromey  <tom@tromey.com>
5742
5743         * cli/cli-setshow.c (do_set_command): Use std::string.
5744
5745 2017-09-03  Tom Tromey  <tom@tromey.com>
5746
5747         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5748
5749 2017-09-03  Tom Tromey  <tom@tromey.com>
5750
5751         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5752
5753 2017-09-03  Tom Tromey  <tom@tromey.com>
5754
5755         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5756         gdb::unique_xmalloc_ptr.
5757
5758 2017-09-03  Tom Tromey  <tom@tromey.com>
5759
5760         * thread.c (print_thread_info_1): Use string_printf.
5761         (thread_apply_command, thread_apply_all_command): Use
5762         std::string.
5763
5764 2017-09-03  Tom Tromey  <tom@tromey.com>
5765
5766         * valprint.c (val_print_string): Update.
5767         * gdbcore.h (memory_error_message): Return std::string.
5768         * corefile.c (memory_error_message): Return std::string.
5769         (memory_error): Update.
5770         * breakpoint.c (insert_bp_location): Update.
5771
5772 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5773
5774         * target/waitstatus.h (target_waitstatus_to_string): Change
5775         return type to std::string.
5776         * target/waitstatus.c (target_waitstatus_to_string): Return
5777         std::string.
5778         * target.h (target_waitstatus_to_string): Remove declaration.
5779         * infrun.c (resume, clear_proceed_status_thread,
5780         print_target_wait_results, do_target_wait, save_waitstatus,
5781         stop_all_threads): Adjust.
5782         * record-btrace.c (record_btrace_wait): Adjust.
5783         * target-debug.h
5784         (target_debug_print_struct_target_waitstatus_p): Adjust.
5785
5786 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5787
5788         PR gdb/22046
5789         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5790         detection.
5791
5792 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5793
5794         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5795         for setting/unsetting environment variables on the remote target.
5796         (New remote packets): Add entries for QEnvironmentHexEncoded,
5797         QEnvironmentUnset and QEnvironmentReset.
5798         * common/environ.c (gdb_environ::operator=): Extend method to
5799         handle m_user_set_env_list and m_user_unset_env_list.
5800         (gdb_environ::clear): Likewise.
5801         (match_var_in_string): Change type of first parameter from 'char
5802         *' to 'const char *'.
5803         (gdb_environ::set): Extend method to handle
5804         m_user_set_env_list and m_user_unset_env_list.
5805         (gdb_environ::unset): Likewise.
5806         (gdb_environ::clear_user_set_env): New method.
5807         (gdb_environ::user_set_envp): Likewise.
5808         (gdb_environ::user_unset_envp): Likewise.
5809         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5810         m_user_unset_env_list on move constructor/assignment.
5811         (unset): Add new default parameter 'update_unset_list = true'.
5812         (clear_user_set_env): New method.
5813         (user_set_envp): Likewise.
5814         (user_unset_envp): Likewise.
5815         (m_user_set_env_list): New std::set.
5816         (m_user_unset_env_list): Likewise.
5817         * common/rsp-low.c (hex2str): New function.
5818         (bin2hex): New overload for bin2hex function.
5819         * common/rsp-low.c (hex2str): New prototype.
5820         (str2hex): New overload prototype.
5821         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5822         QEnvironmentUnset and QEnvironmentReset.
5823         (remote_protocol_features): Add QEnvironmentHexEncoded,
5824         QEnvironmentUnset and QEnvironmentReset packets.
5825         (send_environment_packet): New function.
5826         (extended_remote_environment_support): Likewise.
5827         (extended_remote_create_inferior): Call
5828         extended_remote_environment_support.
5829         (_initialize_remote): Add QEnvironmentHexEncoded,
5830         QEnvironmentUnset and QEnvironmentReset packet configs.
5831         * unittests/environ-selftests.c (gdb_selftest_env_var):
5832         New variable.
5833         (test_vector_initialization): New function.
5834         (test_init_from_host_environ): Likewise.
5835         (test_reinit_from_host_environ): Likewise.
5836         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5837         Likewise.
5838         (test_unset_set_empty_vector): Likewise.
5839         (test_vector_clear): Likewise.
5840         (test_std_move): Likewise.
5841         (test_move_constructor):
5842         (test_self_move): Likewise.
5843         (test_set_unset_reset): Likewise.
5844         (run_tests): Rewrite in terms of the functions above.
5845
5846 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5847
5848         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5849         (adi_available): Use a temp variable of type CORE_ADDR as argument
5850         3 when calling target_auxv_search.
5851         (adi_normalize_address): Use masks and xor operators to calculate
5852         normalized address.
5853         (adi_read_versions, adi_write_versions, adi_print_versions)
5854         (do_examine, do_assign): Use paddress.
5855
5856 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5857
5858         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5859         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5860         out of loop and add supply of FIR.
5861         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5862         add collect of FIR.
5863
5864 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5865
5866         PR gdb/21827
5867         * cli/cli-script.c (define_command): Don't convert command name
5868         to lower case.
5869
5870 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5871
5872         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5873         Update all callers accordingly. Remove all code blocks handling
5874         the case where DISPP is not NULL.
5875
5876 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5877
5878         PR symtab/22003
5879         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5880         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5881         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5882
5883 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5884
5885         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5886         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5887         (read_comp_units_from_section): New parameter abbrev_section, use
5888         read_and_check_comp_unit_head, allocate signatured_type if needed.
5889         (create_all_comp_units): Update read_comp_units_from_section caller.
5890
5891 2017-08-23  Pedro Alves  <palves@redhat.com>
5892
5893         PR remote/21852
5894         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5895         to null_ptid and switch to thread without reading the registers
5896         after adding the inferior.
5897
5898 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5899
5900         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5901         compile-gcc.
5902         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5903         (compile_to_object): Implement compile_gcc.
5904         (_initialize_compile): Install "set compile-gcc".  Initialize
5905         compile_gcc.
5906
5907 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5908
5909         * compile/compile.c (compile_to_object): Conditionally call
5910         set_verbose.  Conditionally call compile or compile_v0.
5911
5912 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5913
5914         * sparc64-tdep.h: (adi_normalize_address): New export.
5915         * sparc-nat.h: (open_adi_tag_fd): New export.
5916         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5917         * sparc64-linux-tdep.c:
5918         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5919         (sparc64_linux_handle_segmentation_fault): New function.
5920         (sparc64_linux_init_abi): Register
5921         sparc64_linux_handle_segmentation_fault
5922         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5923         (sparc64_addr_bits_remove): New function.
5924         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5925         (MAX_PROC_NAME_SIZE): New macro.
5926         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5927         (sparc64adilist): New variable.
5928         (adi_proc_list): New variable.
5929         (find_adi_info): New function.
5930         (add_adi_info): New function.
5931         (get_adi_info_proc): New function.
5932         (get_adi_info): New function.
5933         (info_adi_command): New function.
5934         (read_maps_entry): New function.
5935         (adi_available): New function.
5936         (adi_normalize_address): New function.
5937         (adi_align_address): New function.
5938         (adi_convert_byte_count): New function.
5939         (adi_tag_fd): New function.
5940         (adi_is_addr_mapped): New function.
5941         (adi_read_versions): New function.
5942         (adi_write_versions): New function.
5943         (adi_print_versions): New function.
5944         (do_examine): New function.
5945         (do_assign): New function.
5946         (adi_examine_command): New function.
5947         (adi_assign_command): New function.
5948         (_initialize_sparc64_adi_tdep): New function.
5949
5950 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5951
5952         * breakpoint.c (breakpoints_info): Rename to ...
5953         (info_breakpoints_command): ... this.
5954         (watchpoints_info): Rename to ...
5955         (info_watchpoints_command): ... this.
5956         (tracepoints_info): Rename to ...
5957         (info_tracepoints_command): ... this.
5958         (_initialize_breakpoint): Adjust.
5959         * dcache.c (dcache_info): Rename to ...
5960         (info_display_command): ... this.
5961         (_initialize_dcache): Adjust.
5962         * frame.h (args_info): Rename to ...
5963         (info_args_command): ... this.
5964         (locals_info): Rename to ...
5965         (info_locals_command): ... this.
5966         * infcmd.c (nofp_registers_info): Rename to ...
5967         (info_registers_command): ... this.
5968         (float_info): Rename to ...
5969         (info_float_command): ... this.
5970         (program_info): Rename to ...
5971         (info_program_command): ... this.
5972         (all_registers_info): Rename to ...
5973         (info_all_registers_command): ... this.
5974         (vector_info): Rename to ...
5975         (info_vector_command): ... this.
5976         (float_info): Rename to ...
5977         (info_float_command): ... this.
5978         (_initialize_infcmd): Adjust.
5979         * inferior.h (term_info): Rename to ...
5980         (info_terminal_command): ... this.
5981         * inflow.c (term_info): Rename to ...
5982         (info_terminal_command): ... this.
5983         (_initialize_inflow): Adjust.
5984         * infrun.c (signals_info): Rename to ...
5985         (info_signals_command): ... this.
5986         (_initialize_infrun): Adjust.
5987         * objc-lang.c (classes_info): Rename to ...
5988         (info_classes_command): ... this.
5989         (selectors_info): Rename to ...
5990         (info_selectors_command): ... this.
5991         (_initialize_objc_language): Adjust.
5992         * printcmd.c (sym_info): Rename to ...
5993         (info_symbol_command): ... this.
5994         (address_info): Rename to ...
5995         (info_address_command): ... this.
5996         (display_info): Rename to ...
5997         (info_display_command): ... this.
5998         (_initialize_printcmd): Adjust.
5999         * reverse.c (bookmarks_info): Rename to ...
6000         (info_breakpoints_command): ... this.
6001         (_initialize_reverse): Adjust.
6002         * ser-go32.c (dos_info): Rename to ...
6003         (info_serial_command): ... this.
6004         (_initialize_ser_dos): Adjust.
6005         * skip.c (skip_info): Rename to ...
6006         (info_skip_command): ... this.
6007         (_initialize_step_skip): Adjust.
6008         * source.c (line_info): Rename to ...
6009         (info_line_command): ... this.
6010         (source_info): Rename to ...
6011         (info_source_command)
6012         * stack.c (frame_info): Rename to ...
6013         (info_frame_command): ... this.
6014         (locals_info): Rename to ...
6015         (info_locals_command): ... this.
6016         (args_info): Rename to ...
6017         (info_args_command): ... this.
6018         (_initialize_stack): Adjust.
6019         * symtab.c (sources_info): Rename to ...
6020         (info_sources_command): ... this.
6021         (variables_info): Rename to ...
6022         (info_variables_command): ... this.
6023         (functions_info): Rename to ...
6024         (info_functions_command): ... this.
6025         (types_info): Rename to ...
6026         (info_types_command): ... this.
6027         (_initialize_symtab): Adjust.
6028         * target.c (target_info): Rename to ...
6029         (info_target_command): ... this.
6030         (initialize_targets): Adjust.
6031         * tracepoint.c (tvariables_info): Rename to ...
6032         (info_tvariables_command): ... this.
6033         (scope_info): Rename to ...
6034         (info_scope_command): ... this.
6035         (trace_dump_actions): Adjust.
6036         (_initialize_tracepoint): Adjust.
6037
6038 2017-08-22  Tom Tromey  <tom@tromey.com>
6039
6040         * breakpoint.h (install_breakpoint): Update.
6041         * breakpoint.c (add_solib_catchpoint): Update.
6042         (install_breakpoint): Change argument to a std::unique_ptr.
6043         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6044         (create_breakpoint_sal, create_breakpoint): Update.
6045         (watch_command_1, catch_exec_command_1)
6046         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6047         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6048         Return the breakpoint.
6049         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6050         (new_single_step_breakpoint): Update.
6051         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6052         std::unique_ptr.
6053         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6054         std::unique_ptr.
6055         * break-catch-sig.c (create_signal_catchpoint): Use
6056         std::unique_ptr.
6057         * ada-lang.c (create_ada_exception_catchpoint): Use
6058         std::unique_ptr.
6059
6060 2017-08-22  Tom Tromey  <tom@tromey.com>
6061
6062         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6063
6064 2017-08-22  Tom Tromey  <tom@tromey.com>
6065
6066         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6067         (lookup_partial_symbol): Update.
6068
6069 2017-08-22  Tom Tromey  <tom@tromey.com>
6070
6071         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6072         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6073         (find_and_open_source, symtab_to_fullname): Update.
6074         * psymtab.c (psymtab_to_fullname): Update.
6075
6076 2017-08-22  Tom Tromey  <tom@tromey.com>
6077
6078         * exec.c (exec_file_attach): Update.
6079         * linux-thread-db.c (try_thread_db_load): Update.
6080         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6081         * utils.c (gdb_realpath): Change return type.
6082         (gdb_realpath_keepfile): Update.
6083         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6084         (_initialize_utils): Register the new self test.
6085         * source.c (openp): Update.
6086         (find_and_open_source): Update.
6087         * nto-tdep.c (nto_find_and_open_solib): Update.
6088         * main.c (set_gdb_data_directory): Update.
6089         (captured_main_1): Update.
6090         * dwarf2read.c (dwarf2_get_dwz_file): Update
6091         (dw2_map_symbol_filenames): Update.
6092         * auto-load.c (auto_load_safe_path_vec_update): Update.
6093         (filename_is_in_auto_load_safe_path_vec): Change type of
6094         "filename_realp".
6095         (auto_load_objfile_script): Update.
6096         (file_is_auto_load_safe): Update.  Use std::string.
6097         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6098
6099 2017-08-22  Tom Tromey  <tom@tromey.com>
6100
6101         * utils.c (gdb_realpath_keepfile): Return a
6102         gdb::unique_xmalloc_ptr.
6103         * exec.c (exec_file_attach): Update.
6104         * utils.h (gdb_realpath_keepfile): Return a
6105         gdb::unique_xmalloc_ptr.
6106
6107 2017-08-22  Tom Tromey  <tom@tromey.com>
6108
6109         * compile/compile.c (compile_file_command): Use
6110         gdb::unique_xmalloc_ptr, std::string.
6111         * utils.c (gdb_abspath): Change return type.
6112         * source.c (openp): Update.
6113         * objfiles.c (allocate_objfile): Update.
6114         * main.c (set_gdb_data_directory): Update.
6115         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6116
6117 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6118
6119         * cli-cmds.c (list_commands): List actual code around more than
6120         one location.
6121
6122 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6123
6124         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6125
6126 2017-08-21  Pedro Alves  <palves@redhat.com>
6127
6128         PR gdb/19487
6129         * c-exp.y (variable production): Handle function aliases.
6130         * minsyms.c (msymbol_is_text): New function.
6131         * minsyms.h (msymbol_is_text): Declare.
6132         * symtab.c (find_function_alias_target): New function.
6133         * symtab.h (find_function_alias_target): Declare.
6134
6135 2017-08-21  Pedro Alves  <palves@redhat.com>
6136
6137         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6138         typedefs.
6139         * typeprint.c (whatis_exp): If handling "whatis", and expression
6140         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6141         typedefs here.
6142         * valops.c (value_cast): Save "to" type before resolving
6143         stubs/typedefs.  Use that type as resulting value's type.
6144
6145 2017-08-18  Tom Tromey  <tom@tromey.com>
6146             Pedro Alves  <palves@redhat.com>
6147
6148         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6149         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6150         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6151         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6152         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6153         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6154         (linux_get_siginfo_data): Add "thread" argument.  Use
6155         scoped_restore.
6156         * linux-nat.c (linux_child_follow_fork)
6157         (check_stopped_by_watchpoint): Use scoped_restore.
6158         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6159         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6160         (restore_inferior_ptid, save_inferior_ptid): Remove.
6161         * btrace.c (btrace_fetch): Use scoped_restore.
6162         * bsd-uthread.c (bsd_uthread_fetch_registers)
6163         (bsd_uthread_store_registers): Use scoped_restore.
6164         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6165         scoped_restore.
6166         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6167         (aix_thread_xfer_partial): Use scoped_restore.
6168         * inferior.h (save_inferior_ptid): Remove.
6169
6170 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6171
6172         PR tdep/21818
6173         * arm-tdep.c (gdb_print_insn_arm): Mark
6174         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6175
6176 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6177
6178         * NEWS: Mention GDBserver's new option "--selftest".
6179         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6180         * selftest.c: Move it to common/selftest.c.
6181         * selftest.h: Move it to common/selftest.h.
6182         * selftest-arch.c (reset): New function.
6183         (tests_with_arch): Call reset.
6184
6185 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6186
6187         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6188         instead of exception_fprintf and printf_filtered.
6189
6190 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6191
6192         * selftest.c (register_self_test): Rename it to
6193         selftests::register_test.
6194         (run_self_tests): selftest::run_tests.
6195         * selftest.h: Update declarations.
6196         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6197         selftests::register_test_foreach_arch.
6198         * selftest-arch.h: Update declaration.
6199         * aarch64-tdep.c: Update.
6200         * arm-tdep.c: Likewise.
6201         * disasm-selftests.c: Likewise.
6202         * dwarf2loc.c: Likewise.
6203         * dwarf2-frame.c: Likewise.
6204         * findvar.c: Likewise.
6205         * gdbarch-selftests.c: Likewise.
6206         * maint.c (maintenance_selftest): Likewise.
6207         * regcache.c: Likewise.
6208         * rust-exp.y: Likewise.
6209         * selftest-arch.c: Likewise.
6210         * unittests/environ-selftests.c: Likewise.
6211         * unittests/function-view-selftests.c: Likewise.
6212         * unittests/offset-type-selftests.c: Likewise.
6213         * unittests/optional-selftests.c: Likewise.
6214         * unittests/scoped_restore-selftests.c: Likewise.
6215         * utils-selftests.c: Likewise.
6216
6217 2017-08-17  Pedro Alves  <palves@redhat.com>
6218
6219         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6220         local.
6221
6222 2017-08-17  Pedro Alves  <palves@redhat.com>
6223
6224         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6225         field.
6226         (reset_die_in_process): Delete, replaced by ...
6227         (process_die_scope): ... this new class.  Make it responsible for
6228         freeing cu->line_header too.
6229         (process_die): Use process_die_scope.
6230         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6231         cu->line_header_die_owner.  Don't release the line header if it's
6232         owned by the CU.
6233         (setup_type_unit_groups): Make the CU/DIE own the line header.
6234         Don't release the line header here.
6235
6236 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6237
6238         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6239
6240 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6241
6242         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6243         Single-Key mode
6244
6245 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6246
6247         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6248         mode command list.
6249
6250 2017-08-15  Stafford Horne  <shorne@gmail.com>
6251
6252         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6253
6254 2017-08-15  Stafford Horne  <shorne@gmail.com>
6255
6256         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6257
6258 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6259
6260         PR gdb/21954
6261         * infcmd.c (unset_environment_command): Use the 'clear' method on
6262         the environment instead of resetting it.
6263
6264 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6265
6266         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6267         platforms.
6268
6269 2017-08-14  Tom Tromey  <tom@tromey.com>
6270
6271         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6272         (print_binary_chars): Likewise.
6273         (BITS_IN_BYTES): Remove.
6274
6275 2017-08-14  Tom Tromey  <tom@tromey.com>
6276
6277         PR gdb/21675
6278         * valprint.c (LOW_ZERO): Change value to 034.
6279         (print_octal_chars): Add static_asserts for octal constants.
6280         * printcmd.c (print_scalar_formatted): Add 'd' case.
6281
6282 2017-08-11  Tom Tromey  <tom@tromey.com>
6283
6284         * symfile.c (add_symbol_file_command): Use std::vector.
6285
6286 2017-08-14  Tom Tromey  <tom@tromey.com>
6287
6288         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6289         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6290         std::move.
6291         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6292
6293 2017-08-11  Pedro Alves  <palves@redhat.com>
6294
6295         * infrun.c (process_event_stop_test): Adjust
6296         function_name_is_marked_for_skip call.
6297         * skip.c: Include <list>.
6298         (skiplist_entry): Make it a class with private fields, and
6299         getters/setters.
6300         (skiplist_entry_chain): Delete.
6301         (skiplist_entries): New.
6302         (skiplist_entry_count): Delete.
6303         (highest_skiplist_entry_num): New.
6304         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6305         (add_skiplist_entry): Delete.
6306         (skiplist_entry::skiplist_entry): New.
6307         (skiplist_entry::add_entry): New.
6308         (skip_file_command, skip_function): Adjust.
6309         (compile_skip_regexp): Delete.
6310         (skip_command): Don't compile regexp here.  Adjust to use
6311         skiplist_entry::add_entry.
6312         (skip_info): Adjust to use range-for and getters.
6313         (skip_enable_command, skip_disable_command): Adjust to use
6314         range-for and setters.
6315         (skip_delete_command): Adjust to use std::list.
6316         (add_skiplist_entry): Delete.
6317         (skip_file_p): Delete, refactored as ...
6318         (skiplist_entry::do_skip_file_p): ... this new method.
6319         (skip_gfile_p): Delete, refactored as ...
6320         (skiplist_entry::do_gskip_file_p): ... this new method.
6321         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6322         (skiplist_entry::skip_function_p): ... this new method.
6323         (function_name_is_marked_for_skip): Now returns bool, and takes
6324         the function sal by const reference.  Adjust to use range-for and
6325         skiplist_entry methods.
6326         (_initialize_step_skip): Remove references to
6327         skiplist_entry_chain, skiplist_entry_count.
6328         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6329         takes the function sal by const reference.
6330
6331 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6332
6333         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6334         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6335         (dwarf2_frame_cache):
6336         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6337         RETURN_MASK_ALL and set *this_case to NULL.
6338         * frame-unwind.h: Update comments.
6339
6340 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6341
6342         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6343         (dwarf2_frame_state_copy_regs): Remove.
6344         (dwarf2_frame_state_free_regs): Remove.
6345         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6346         (dwarf2_restore_rule): Call method .alloc_regs instead of
6347         dwarf2_frame_state_alloc_regs.
6348         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6349         constructor.  Call std::move.
6350         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6351         (dwarf2_frame_cache): Likewise.
6352
6353         [GDB_SELF_TEST]: Include selftest.h and
6354         selftest-arch.h.
6355         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6356         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6357         execute_cfa_program_test.
6358
6359         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6360         copy ctor, assignment operator, move assignment.
6361         <alloc_regs>: New method.
6362         <swap>: New method.
6363         (struct dwarf2_frame_state): Delete dtor.
6364         (dwarf2_frame_state_alloc_regs): Remove declaration.
6365         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6366         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6367
6368 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6369
6370         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6371         (dwarf2_frame_state::dwarf2_frame_state): New.
6372         (dwarf2_frame_state::~dwarf2_frame_state): New.
6373         (dwarf2_fetch_cfa_info): Update.
6374         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6375         rather than a pointer.  Update code.
6376         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6377         dtor.
6378         <data_align, code_align, retaddr_column>: Change them to const.
6379         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6380         to bool.
6381
6382 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6383
6384         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6385         <loc.exp>: New field.
6386         * dwarf2-frame.c (execute_cfa_program): Update.
6387         (dwarf2_frame_prev_register): Update.
6388
6389 2017-08-10  Pedro Alves  <palves@redhat.com>
6390
6391         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6392
6393 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6394
6395         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6396         (fbsd_pending_children): Use std::list.
6397         (fbsd_remember_child): Likewise.
6398         (fbsd_is_child_pending): Likewise.
6399         (fbsd_pending_vfork_done): Use std::forward_list.
6400         (fbsd_add_vfork_done): Likewise.
6401         (fbsd_is_vfork_done_pending): Likewise.
6402         (fbsd_next_vfork_done): Likewise.
6403
6404 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6405
6406         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6407         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6408         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6409         for `mapfilename'.
6410         (fbsd_xfer_partial): Use gdb::byte_vector.
6411         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6412
6413 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6414
6415         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6416         "filestuff.h".
6417         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6418
6419 2017-08-09  Tom Tromey  <tom@tromey.com>
6420
6421         * skip.c (skiplist_entry): New constructor.
6422         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6423         (skiplist_entry::file_is_glob): Now bool.
6424         (skiplist_entry::file, skiplist_entry::function): Now
6425         std::string.
6426         (make_skip_entry): Return a unique_ptr.  Use new.
6427         (free_skiplist_entry, free_skiplist_entry_cleanup)
6428         (make_free_skiplist_entry_cleanup): Remove.
6429         (skip_command, skip_disable_command, add_skiplist_entry)
6430         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6431         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6432         (function_name_is_marked_for_skip): Update.
6433         (skip_delete_command): Update.  Use delete.
6434
6435 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6436
6437         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6438         (aarch64_linux_core_read_description): New function.
6439         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6440
6441 2017-08-09  Pedro Alves  <palves@redhat.com>
6442
6443         * cp-name-parser.y (cp_comp_to_string): Return a
6444         gdb::unique_xmalloc_ptr<char>.
6445         * cp-support.c (replace_typedefs_qualified_name)
6446         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6447         (cp_canonicalize_string_full): Use op= instead of explicit
6448         convertion.
6449         (cp_class_name_from_physname, method_name_from_physname)
6450         (cp_func_name, cp_remove_params): Adjust to use
6451         gdb::unique_xmalloc_ptr<char>.
6452         * cp-support.h (cp_comp_to_string): Return a
6453         gdb::unique_xmalloc_ptr<char>.
6454         * python/py-type.c (typy_lookup_type): Adjust to use
6455         gdb::unique_xmalloc_ptr<char>.
6456
6457 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6458
6459         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6460
6461 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6462             Yao Qi  <yao.qi@linaro.org>
6463
6464         * cp-support.c (cp_canonicalize_string_full): Use
6465         gdb::unique_xmalloc_ptr<char>.
6466         (cp_canonicalize_string): Likewise.
6467
6468 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6469
6470         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6471         * regformats/i386/amd64-avx-avx512.dat: Remove.
6472         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6473         * regformats/i386/amd64-avx-mpx.dat:Remove.
6474         * regformats/i386/amd64-avx.dat: Remove.
6475         * regformats/i386/amd64-mpx.dat: Remove.
6476         * regformats/i386/i386-avx-avx512.dat: Remove.
6477         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6478         * regformats/i386/i386-avx-mpx.dat: Remove.
6479         * regformats/i386/i386-mmx.dat: Remove.
6480         * regformats/i386/i386-mpx.dat: Remove.
6481
6482 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6483
6484         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6485         * amd64-tdep.c: Don't include features/i386/x32*.c.
6486         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6487         functions.
6488         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6489         and i386/x32-avx-avx512.
6490         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6491         and i386/x32.xml.
6492         * features/i386/x32-avx-avx512.c: Removed.
6493         * features/i386/x32-avx-avx512.xml: Removed.
6494         * features/i386/x32-avx.c: Removed.
6495         * features/i386/x32-avx.xml: Removed.
6496         * features/i386/x32.c: Removed.
6497         * features/i386/x32.xml: Removed.
6498         * regformats/i386/x32-avx-avx512.dat: Removed.
6499         * regformats/i386/x32-avx.dat: Removed.
6500         * regformats/i386/x32.dat: Removed.
6501
6502 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6503
6504         PR breakpoints/21886
6505         * mem-break.c (default_memory_insert_breakpoint): Use
6506         `->placed_address' rather than `->reqstd_address' for the
6507         breakpoint location.
6508
6509 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6510
6511         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6512         assertions.
6513
6514 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6515
6516         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6517         a union of `tdep_info', `tdesc_data' and `id'.
6518         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6519         rather than `info.tdep_info'.
6520         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6521         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6522         * i386-tdep.c (i386_gdbarch_init): Likewise.
6523         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6524         * mips-tdep.c (mips_gdbarch_init): Likewise.
6525         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6526         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6527         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6528         `info.tdep_info'.
6529         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6530         `info.tdep_info'.
6531         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6532         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6533         `info.tdep_info'.
6534         * spu-tdep.c (spu_gdbarch_init): Likewise.
6535         * gdbarch.h: Regenerate.
6536
6537 2017-08-07  Leszek Swirski  <leszeks@google.com>
6538
6539         PR symtab/20899
6540         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6541
6542 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6543
6544         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6545         (gdbsim_open): Rename gdb_argv args object to argv.
6546
6547 2017-08-05  Tom Tromey  <tom@tromey.com>
6548
6549         * compile/compile-object-load.c (compile_object_load): Use
6550         gdb::unique_xmalloc_ptr.
6551         * cli/cli-dump.c (scan_filename): Rename from
6552         scan_filename_with_cleanup.  Change return type.
6553         (scan_expression): Rename from scan_expression_with_cleanup.
6554         Change return type.
6555         (dump_memory_to_file, dump_value_to_file, restore_command):
6556         Use gdb::unique_xmalloc_ptr.  Update.
6557         * cli/cli-cmds.c (find_and_open_script): Use
6558         gdb::unique_xmalloc_ptr.
6559         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6560         * symmisc.c (maintenance_print_symbols)
6561         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6562         * symfile.c (symfile_bfd_open, generic_load)
6563         (add_symbol_file_command, remove_symbol_file_command): Use
6564         gdb::unique_xmalloc_ptr.
6565         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6566         * psymtab.c (maintenance_print_psymbols): Use
6567         gdb::unique_xmalloc_ptr.
6568         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6569         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6570         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6571         (reload_shared_libraries_1): Likewise.
6572
6573 2017-08-05  Tom Tromey  <tom@tromey.com>
6574
6575         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6576         (rust_op_vector, rust_set_vector): New typedefs.
6577         (current_parser): New global.
6578         (work_obstack): Change to pointer type.  Update all users.
6579         (rust_ast, pstate): Remove globals.
6580         (struct rust_parser): New.
6581         (%union) <params, field_inits>: Change type.
6582         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6583         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6584         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6585         (convert_params_to_types, convert_params_to_expression): Change
6586         type of "params".
6587         (ast_string): Change type of "fields".
6588         (rust_parse): Make a rust_parser.  Remove cleanups.
6589         (rust_lex_tests): Make and install an auto_obstack.
6590
6591 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6592
6593         * configure.srv (ipa_x32_linux_regobj): New.
6594         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6595         instead of X86_TDESC_AVX512.
6596         (initialize_low_tracepoint): Call
6597         init_registers_x32_avx_avx512_linux.
6598
6599 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6600
6601         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6602
6603 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6604
6605         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6606
6607 2017-08-03  Tom Tromey  <tom@tromey.com>
6608
6609         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6610         Remove.
6611         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6612
6613 2017-08-03  Tom Tromey  <tom@tromey.com>
6614
6615         * python/py-param.c (compute_enum_values): Use gdb_argv.
6616
6617 2017-08-03  Tom Tromey  <tom@tromey.com>
6618
6619         * utils.h (struct gdb_argv_deleter): New.
6620         (gdb_argv): New class.
6621         * utils.c (gdb_argv::reset): New method.
6622         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6623         * tracefile.c (tsave_command): Use gdb_argv.
6624         * top.c (new_ui_command): Use gdb_argv.
6625         * symmisc.c (maintenance_print_symbols)
6626         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6627         * symfile.c (symbol_file_command, generic_load)
6628         (remove_symbol_file_command): Use gdb_argv.
6629         * stack.c (backtrace_command): Use gdb_argv.
6630         * source.c (add_path, show_substitute_path_command)
6631         (unset_substitute_path_command, set_substitute_path_command):
6632         Use gdb_argv.
6633         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6634         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6635         * remote.c (extended_remote_run, remote_put_command)
6636         (remote_get_command, remote_delete_command): Use gdb_argv.
6637         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6638         (gdbsim_open): Use gdb_argv.
6639         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6640         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6641         * procfs.c (procfs_info_proc): Use gdb_argv.
6642         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6643         * infrun.c (handle_command): Use gdb_argv.
6644         * inferior.c (add_inferior_command, clone_inferior_command):
6645         Use gdb_argv.
6646         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6647         * exec.c (exec_file_command): Use gdb_argv.
6648         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6649         * compile/compile.c (build_argc_argv): Use gdb_argv.
6650
6651 2017-08-03  Tom Tromey  <tom@tromey.com>
6652
6653         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6654
6655 2017-08-03  Tom Tromey  <tom@tromey.com>
6656
6657         * python/python.c (compute_python_string): Return std::string.
6658         (gdbpy_eval_from_control_command): Update.
6659         (do_start_initialization): Use std::string.
6660         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6661         xstrprintf.
6662         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6663         xstrprintf.
6664
6665 2017-08-03  Tom Tromey  <tom@tromey.com>
6666
6667         * top.h (do_restore_instream_cleanup): Remove.
6668         * top.c (do_restore_instream_cleanup): Remove.
6669         (read_command_file): Use scoped_restore.
6670         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6671
6672 2017-08-03  Tom Tromey  <tom@tromey.com>
6673
6674         * cli/cli-script.c (execute_user_command)
6675         (execute_control_command): Use scoped_restore.
6676
6677 2017-08-03  Tom Tromey  <tom@tromey.com>
6678
6679         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6680         (execute_user_command): Remove user_call_depth; use
6681         user_args_stack's size instead.
6682
6683 2017-08-03  Tom Tromey  <tom@tromey.com>
6684
6685         * top.h (in_user_command): Remove.
6686         * top.c (in_user_command): Remove.
6687         * cli/cli-script.c (do_restore_user_call_depth)
6688         (execute_user_command): Update.
6689
6690 2017-08-03  Tom Tromey  <tom@tromey.com>
6691
6692         * valops.c (search_struct_method): Use gdb::byte_vector.
6693         * valarith.c (value_concat): Use std::vector.
6694         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6695         (simple_search_memory): Likewise.
6696         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6697         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6698         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6699         * elfread.c (elf_rel_plt_read): Use std::string.
6700         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6701         * cli/cli-dump.c (restore_section_callback): Use
6702         gdb::byte_vector.
6703
6704 2017-08-03  Tom Tromey  <tom@tromey.com>
6705
6706         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6707
6708 2017-08-03  Tom Tromey  <tom@tromey.com>
6709
6710         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6711         (tui_register_format): Use scoped_restore.
6712
6713 2017-08-03  Tom Tromey  <tom@tromey.com>
6714
6715         * reverse.c (exec_direction_default): Remove.
6716         (exec_reverse_once): Use scoped_restore.
6717         * remote.c (restore_remote_timeout): Remove.
6718         (remote_flash_erase, remote_flash_write, remote_flash_done)
6719         (readchar, remote_serial_write): Use scoped_restore.
6720         * cli/cli-script.c (struct source_cleanup_lines_args)
6721         (source_cleanup_lines): Remove.
6722         (script_from_file): Use scoped_restore.
6723         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6724         (source_command): Use scoped_restore.
6725
6726 2017-08-03  Tom Tromey  <tom@tromey.com>
6727
6728         * utils.h (make_cleanup_free_so): Remove.
6729         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6730         * solist.h (struct so_deleter): New.
6731         (so_list_up): New typedef.
6732         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6733
6734 2017-08-03  Tom Tromey  <tom@tromey.com>
6735
6736         * utils.h (make_cleanup_restore_current_language): Remove.
6737         * utils.c (do_restore_current_language)
6738         (make_cleanup_restore_current_language): Remove.
6739         * parse.c (parse_exp_in_context_1)
6740         (parse_expression_with_language): Use
6741         scoped_restore_current_language.
6742         * mi/mi-main.c (mi_cmd_execute): Use
6743         scoped_restore_current_language.
6744         * language.h (scoped_restore_current_language): New class.
6745
6746 2017-08-03  Tom Tromey  <tom@tromey.com>
6747
6748         * compile/compile.c (cleanup_unlink_file): Remove.
6749         (compile_to_object): Use gdb::unlinker.
6750         (eval_compile_command): Likewise.
6751
6752 2017-08-03  Tom Tromey  <tom@tromey.com>
6753
6754         * utils.h (make_cleanup_fclose): Remove.
6755         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6756
6757 2017-08-03  Tom Tromey  <tom@tromey.com>
6758
6759         * top.c (open_terminal_stream): Return gdb_file_up.
6760         (new_ui_command): Update.
6761
6762 2017-08-03  Tom Tromey  <tom@tromey.com>
6763
6764         * source.c (print_source_lines_base, forward_search_command)
6765         (reverse_search_command): Use gdb_file_up.
6766
6767 2017-08-03  Tom Tromey  <tom@tromey.com>
6768
6769         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6770
6771 2017-08-03  Tom Tromey  <tom@tromey.com>
6772
6773         * cli/cli-cmds.c (find_and_open_script): Change return type.
6774         Remove "streamp" and "full_path" parameters.
6775         (source_script_with_search): Update.
6776         * auto-load.c (source_script_file): Update.
6777         * cli/cli-cmds.h (find_and_open_script): Change type.
6778         (open_script): New struct.
6779
6780 2017-08-03  Tom Tromey  <tom@tromey.com>
6781
6782         * xml-support.c (xml_fetch_content_from_file): Update.
6783         * ui-file.c (stdio_file::open): Update.
6784         * tracefile-tfile.c (tfile_start): Update.
6785         * remote.c (remote_file_put, remote_file_get): Update.
6786         * nat/linux-procfs.c (linux_proc_get_int)
6787         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6788         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6789         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6790         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6791         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6792         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6793         * linux-nat.c (linux_proc_pending_signals): Update.
6794         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6795         (file_closer): Remove.
6796         * compile/compile.c (compile_to_object): Update.
6797         * common/filestuff.h (struct gdb_file_deleter): New.
6798         (gdb_file_up): New typedef.
6799         (gdb_fopen_cloexec): Change return type.
6800         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6801         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6802         (dump_binary_file, restore_binary_file): Update.
6803         * auto-load.c (auto_load_objfile_script_1): Update.
6804
6805 2017-08-03  Tom Tromey  <tom@tromey.com>
6806
6807         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6808         (info_static_tracepoint_markers_command): Likewise.
6809         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6810         * skip.c (skip_info): Use ui_out_emit_table.
6811         * progspace.c (print_program_space): Use ui_out_emit_table.
6812         * osdata.c (info_osdata): Use ui_out_emit_table.
6813         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6814         ui_out_emit_table.
6815         * linux-thread-db.c (info_auto_load_libthread_db): Use
6816         ui_out_emit_table.
6817         * inferior.c (print_inferior): Use ui_out_emit_table.
6818         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6819         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6820         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6821         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6822         * ui-out.h (class ui_out_emit_table): New.
6823
6824 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6825
6826         * mips-tdep.c (mips_fpu_type_str): New function.
6827         (mips_dump_tdep): Call it.
6828
6829 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6830
6831         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6832         `->mips_fpu_type'.
6833
6834 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6835
6836         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6837
6838 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6839
6840         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6841
6842 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6843
6844         * cli/cli-cmds.c (maintenancechecklist): New variable.
6845         * gdbcmd.h (maintenancechecklist): Declare it.
6846         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6847         Call i386_linux_read_description with different masks.
6848         * maint.c (maintenance_check_command): New function.
6849         (_initialize_maint_cmds): Call add_prefix_cmd.
6850         * target-descriptions.c (tdesc_reg): override operator != and ==.
6851         (tdesc_type): Likewise.
6852         (tdesc_feature): Likewise.
6853         (target_desc): Likewise.
6854         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6855         (maintenance_check_xml_descriptions): New function.
6856         (_initialize_target_descriptions) Add command "xml-descriptions".
6857         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6858
6859 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6860
6861         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6862         Include features/i386/32bit-*.c.
6863         (i386_linux_read_description): Generate target description if it
6864         doesn't exist.
6865         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6866         functions.
6867         * features/i386/32bit-linux.c: Re-generated.
6868         * features/i386/32bit-sse.c: Likewise.
6869         * target-descriptions.c (print_c_feature::visit): Print code to
6870         set register number if needed.
6871         (print_c_feature) <m_next_regnum>: New field.
6872
6873 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6874
6875         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6876         (FEATURE_XMLFILES): New.
6877         (FEATURE_CFILES): New.
6878         New rules.
6879         (clean-cfiles): Remove generated c files.
6880         * features/i386/32bit-avx.c: Generated.
6881         * features/i386/32bit-avx512.c: Generated.
6882         * features/i386/32bit-core.c: Generated.
6883         * features/i386/32bit-linux.c: Generated.
6884         * features/i386/32bit-mpx.c: Generated.
6885         * features/i386/32bit-pkeys.c: Generated.
6886         * features/i386/32bit-sse.c: Generated.
6887         * target-descriptions.c: Include algorithm.
6888         (tdesc_element_visitor): Add method visit_end.
6889         (print_c_tdesc): Implement visit_end.
6890         (print_c_tdesc:: m_filename_after_features): Move it to
6891         protected.
6892         (print_c_feature): New class.
6893         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6894         name starts with "i386/32bit-".
6895
6896 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6897
6898         * target-descriptions.c (tdesc_element_visitor): New class.
6899         (tdesc_element): New class.
6900         (tdesc_reg): Inherit from tdesc_element.
6901         (tdesc_reg::accept): New function.
6902         (tdesc_type): Inherit from tdesc_element.
6903         (tdesc_type::accept): New function.
6904         (tdesc_feature): Inherit from tdesc_element.
6905         (tdesc_feature::accept): New function.
6906         (target_desc): Inherit from tdesc_element.
6907         (target_desc::target_desc): New.
6908         (target_desc::~target_desc): New.
6909         (target_desc::accept): New.
6910         (allocate_target_description): Use new.
6911         (free_target_description): Use delete.
6912         (print_c_tdesc): New class.
6913         (maint_print_c_tdesc_cmd): Adjust.
6914
6915         * features/aarch64.c: Re-generated.
6916         * features/arc-arcompact.c: Re-generated.
6917         * features/arc-v2.c: Re-generated.
6918         * features/arm/arm-with-iwmmxt.c: Re-generated.
6919         * features/arm/arm-with-m.c: Re-generated.
6920         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6921         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6922         * features/arm/arm-with-neon.c: Re-generated.
6923         * features/arm/arm-with-vfpv2.c: Re-generated.
6924         * features/arm/arm-with-vfpv3.c: Re-generated.
6925         * features/i386/amd64-avx-avx512.c: Re-generated.
6926         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6927         * features/i386/amd64-avx.c: Re-generated.
6928         * features/i386/amd64-avx-linux.c: Re-generated.
6929         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6930         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6931         * features/i386/amd64-avx-mpx.c: Re-generated.
6932         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6933         * features/i386/amd64.c: Re-generated.
6934         * features/i386/amd64-linux.c: Re-generated.
6935         * features/i386/amd64-mpx.c: Re-generated.
6936         * features/i386/amd64-mpx-linux.c: Re-generated.
6937         * features/i386/i386-avx-avx512.c: Re-generated.
6938         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6939         * features/i386/i386-avx.c: Re-generated.
6940         * features/i386/i386-avx-linux.c: Re-generated.
6941         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6942         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6943         * features/i386/i386-avx-mpx.c: Re-generated.
6944         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6945         * features/i386/i386.c: Re-generated.
6946         * features/i386/i386-linux.c: Re-generated.
6947         * features/i386/i386-mmx.c: Re-generated.
6948         * features/i386/i386-mmx-linux.c: Re-generated.
6949         * features/i386/i386-mpx.c: Re-generated.
6950         * features/i386/i386-mpx-linux.c: Re-generated.
6951         * features/i386/x32-avx-avx512.c: Re-generated.
6952         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6953         * features/i386/x32-avx.c: Re-generated.
6954         * features/i386/x32-avx-linux.c: Re-generated.
6955         * features/i386/x32.c: Re-generated.
6956         * features/i386/x32-linux.c: Re-generated.
6957         * features/microblaze.c: Re-generated.
6958         * features/microblaze-with-stack-protect.c: Re-generated.
6959         * features/mips64-dsp-linux.c: Re-generated.
6960         * features/mips64-linux.c: Re-generated.
6961         * features/mips-dsp-linux.c: Re-generated.
6962         * features/mips-linux.c: Re-generated.
6963         * features/nds32.c: Re-generated.
6964         * features/nios2.c: Re-generated.
6965         * features/nios2-linux.c: Re-generated.
6966         * features/rs6000/powerpc-32.c: Re-generated.
6967         * features/rs6000/powerpc-32l.c: Re-generated.
6968         * features/rs6000/powerpc-403.c: Re-generated.
6969         * features/rs6000/powerpc-403gc.c : Re-generated.
6970         * features/rs6000/powerpc-405.c: Re-generated.
6971         * features/rs6000/powerpc-505.c: Re-generated.
6972         * features/rs6000/powerpc-601.c: Re-generated.
6973         * features/rs6000/powerpc-602.c: Re-generated.
6974         * features/rs6000/powerpc-603.c: Re-generated.
6975         * features/rs6000/powerpc-604.c: Re-generated.
6976         * features/rs6000/powerpc-64.c: Re-generated.
6977         * features/rs6000/powerpc-64l.c: Re-generated.
6978         * features/rs6000/powerpc-7400.c: Re-generated.
6979         * features/rs6000/powerpc-750.c: Re-generated.
6980         * features/rs6000/powerpc-860.c: Re-generated.
6981         * features/rs6000/powerpc-altivec32.c: Re-generated.
6982         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6983         * features/rs6000/powerpc-altivec64.c: Re-generated.
6984         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6985         * features/rs6000/powerpc-cell32l.c: Re-generated.
6986         * features/rs6000/powerpc-cell64l.c: Re-generated.
6987         * features/rs6000/powerpc-e500.c: Re-generated.
6988         * features/rs6000/powerpc-e500l.c: Re-generated.
6989         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6990         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6991         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6992         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6993         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6994         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6995         * features/rs6000/powerpc-vsx32.c: Re-generated.
6996         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6997         * features/rs6000/powerpc-vsx64.c: Re-generated.
6998         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6999         * features/rs6000/rs6000.c: Re-generated.
7000         * features/s390-linux32.c: Re-generated.
7001         * features/s390-linux32v1.c: Re-generated.
7002         * features/s390-linux32v2.c: Re-generated.
7003         * features/s390-linux64.c: Re-generated.
7004         * features/s390-linux64v1.c: Re-generated.
7005         * features/s390-linux64v2.c: Re-generated.
7006         * features/s390-te-linux64.c: Re-generated.
7007         * features/s390-tevx-linux64.c: Re-generated.
7008         * features/s390-vx-linux64.c: Re-generated.
7009         * features/s390x-linux64.c: Re-generated.
7010         * features/s390x-linux64v1.c: Re-generated.
7011         * features/s390x-linux64v2.c: Re-generated.
7012         * features/s390x-te-linux64.c: Re-generated.
7013         * features/s390x-tevx-linux64.c: Re-generated.
7014         * features/s390x-vx-linux64.c: Re-generated.
7015         * features/sparc/sparc32-solaris.c: Re-generated.
7016         * features/sparc/sparc64-solaris.c: Re-generated.
7017         * features/tic6x-c62x.c: Re-generated.
7018         * features/tic6x-c62x-linux.c: Re-generated.
7019         * features/tic6x-c64x.c: Re-generated.
7020         * features/tic6x-c64x-linux.c: Re-generated.
7021         * features/tic6x-c64xp.c: Re-generated.
7022         * features/tic6x-c64xp-linux.c: Re-generated.
7023
7024 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7025
7026         * i386-linux-tdep.c (i386_linux_read_description): New function.
7027         (i386_linux_core_read_description): Call
7028         i386_linux_read_description.
7029         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7030         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7031         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7032         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7033         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7034         * x86-linux-nat.c (x86_linux_read_description): Call
7035         i386_linux_read_description.
7036
7037 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7038
7039         * NEWS: Mention it.
7040         * features/Makefile (%.c: %.xml): Pass the xml file name to
7041         command "maint print c-tdesc".
7042         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7043         name from 'arg'.
7044
7045 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7046
7047         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7048         in-class initialization.
7049         (tdesc_create_feature): Call new instead of XCNEW.
7050         (free_target_description): Ue delete.
7051
7052 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7053
7054         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7055
7056 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7057
7058         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7059         constant.
7060         (amd64_x32_init_abi): Likewise.
7061         * amd64-tdep.h (amd64_init_abi): Update declaration.
7062         (amd64_x32_init_abi): Likewise.
7063
7064 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7065
7066         PR tdep/21717
7067         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7068         condition for FPSCR.
7069         (arm_linux_store_inferior_registers): Likewise.
7070
7071 2017-07-22  Tom Tromey  <tom@tromey.com>
7072
7073         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7074         <syscalls_counts>: Now a std::vector.
7075         (get_catch_syscall_inferior_data): Use "new".
7076         (catch_syscall_inferior_data_cleanup): Use "delete".
7077         (insert_catch_syscall, remove_catch_syscall)
7078         (clear_syscall_counts): Update.
7079
7080 2017-07-22  Tom Tromey  <tom@tromey.com>
7081
7082         * break-catch-syscall.c (syscall_catchpoint)
7083         <syscalls_to_be_caught>: Now a std::vector<int>
7084         (~syscall_catchpoint): Remove.
7085         (insert_catch_syscall, remove_catch_syscall)
7086         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7087         (print_mention_catch_syscall, print_recreate_catch_syscall):
7088         Update.
7089         (create_syscall_event_catchpoint): Change type of "filter"
7090         parameter.
7091         (catch_syscall_split_args): Return a std::vector.
7092         (catch_syscall_command_1, catching_syscall_number_1): Update.
7093
7094 2017-07-22  Tom Tromey  <tom@tromey.com>
7095
7096         * break-catch-throw.c (struct exception_catchpoint)
7097         <exception_rx>: Now a std::string.
7098         (~exception_catchpoint): Remove.
7099         (print_one_detail_exception_catchpoint): Update.
7100         (handle_gnu_v3_exceptions): Change type of except_rx.
7101         (extract_exception_regexp): Return a std::string.
7102         (catch_exception_command_1): Update.
7103
7104 2017-07-22  Tom Tromey  <tom@tromey.com>
7105
7106         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7107         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7108         std::vector.
7109         <catch_all>: Now a bool.
7110         (~signal_catchpoint): Remove.
7111         (signal_catchpoint_insert_location)
7112         (signal_catchpoint_remove_location)
7113         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7114         (signal_catchpoint_print_mention)
7115         (signal_catchpoint_print_recreate)
7116         (signal_catchpoint_explains_signal): Update.
7117         (create_signal_catchpoint): Change type of "filter" and
7118         "catch_all".
7119         (catch_signal_split_args): Return a std::vector.  Change type of
7120         "catch_all".
7121         (catch_signal_command): Update.
7122
7123 2017-07-20  Pedro Alves  <palves@redhat.com>
7124
7125         * ada-lang.c (ada_language_defn): Make extern.
7126         (_initialize_ada_language): Remove add_language call.
7127         * c-lang.c (c_language_defn, cplus_language_defn)
7128         (asm_language_defn, minimal_language_defn): Make extern.
7129         (_initialize_c_language): Delete.
7130         * completer.c (compare_cstrings): Delete, moved to utils.h.
7131         * d-lang.c (d_language_defn): Make extern.
7132         (_initialize_d_language): Remove add_language calls.
7133         * defs.h (enum language): Add comment.
7134         * f-lang.c (f_language_defn): Make extern.
7135         (_initialize_f_language): Remove add_language call.
7136         * go-lang.c (go_language_defn): Make extern.
7137         (_initialize_go_language): Remove add_language call.
7138         * language.c: Include <algorithm>.
7139         (languages): Redefine as const array.
7140         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7141         (set_language_command): Handle "local".  Use for-range loop.
7142         (set_language): Remove loop.
7143         (language_enum): Rewrite.
7144         (language_def, language_str): Remove loops.
7145         (add_language): Delete.
7146         (add_set_language_command): New, based on add_languages.
7147         (skip_language_trampoline): Adjust.
7148         (local_language_defn): Delete.
7149         (language_gdbarch_post_init): Adjust.
7150         (_initialize_language): Remove add_language calls.  Call
7151         add_set_language_command.
7152         * language.h (add_language): Delete.
7153         (auto_language_defn)
7154         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7155         (asm_language_defn, c_language_defn, cplus_language_defn)
7156         (d_language_defn, f_language_defn, go_language_defn)
7157         (m2_language_defn, objc_language_defn, opencl_language_defn)
7158         (pascal_language_defn, rust_language_defn): Declare.
7159         * m2-lang.c (m2_language_defn): Make extern.
7160         (_initialize_m2_language): Remove add_language call.
7161         * objc-lang.c (objc_language_defn): Make extern.
7162         (_initialize_objc_language): Remove add_language call.
7163         * opencl-lang.c (opencl_language_defn): Make extern.
7164         (_initialize_opencl_language): Remove add_language call.
7165         * p-lang.c (pascal_language_defn): Make extern.
7166         (_initialize_pascal_language): Delete.
7167         * rust-lang.c (rust_language_defn): Make extern.
7168         (_initialize_rust_language): Delete.
7169         * utils.h (compare_cstrings): New static inline function.
7170
7171 2017-07-20  Pedro Alves  <palves@redhat.com>
7172
7173         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7174         (get_var_value): Constify parameters.
7175         (get_int_var_value): Change prototype.
7176         (to_fixed_range_type): Adjust.
7177         * ada-lang.h (get_int_var_value): Change prototype.
7178
7179 2017-07-20  Pedro Alves  <palves@redhat.com>
7180
7181         * dwarf2read.c (dw2_lookup_symbol): Use
7182         SYMBOL_MATCHES_SEARCH_NAME.
7183         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7184
7185 2017-07-20  Pedro Alves  <palves@redhat.com>
7186
7187         * block.c (block_iter_name_step, block_iter_name_first)
7188         (block_iter_name_next): Delete.
7189         (block_lookup_symbol_primary): Adjust to use
7190         dict_iter_match_first/dict_iter_match_next.
7191         * block.h (block_iter_name_first, block_iter_name_next): Delete
7192         declarations.
7193         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7194         dict_iter_match_first/dict_iter_match_next.
7195
7196 2017-07-20  Pedro Alves  <palves@redhat.com>
7197
7198         * cp-support.c (cp_find_first_component_aux): Add missing case for
7199         end of string.
7200
7201 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7202
7203         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7204         of dwo_cu's dwo_file.
7205
7206 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7207
7208         * remote.c (store_registers_using_G): Remove one line comment.
7209
7210 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7211
7212         * regcache.c (regcache_cpy): Simplify it.
7213         (regcache::cpy_no_passthrough): Remove it.
7214         * regcache.h (cpy_no_passthrough): Remove it.
7215         (regcache_dup, regcache_cpy): Update comments.
7216
7217 2017-07-18  Pedro Alves  <palves@redhat.com>
7218
7219         * remote-sim.c (sim_command_completer): Adjust to work with a
7220         completion_tracker instead of a VEC.
7221
7222 2017-07-17  Pedro Alves  <palves@redhat.com>
7223
7224         * completer.c (complete_source_filenames): New function.
7225         (complete_address_and_linespec_locations): New function.
7226         (location_completer): Use complete_address_and_linespec_locations.
7227         (completion_tracker::build_completion_result): Honor the tracker's
7228         request to suppress append.
7229         * completer.h (completion_tracker::suppress_append_ws)
7230         (completion_tracker::set_suppress_append_ws): New methods.
7231         (completion_tracker::m_suppress_append_ws): New field.
7232         (complete_source_filenames): New declaration.
7233         * linespec.c (linespec_complete_what): New.
7234         (struct ls_parser) <complete_what, completion_word,
7235         completion_quote_char, completion_quote_end, completion_tracker>:
7236         New fields.
7237         (string_find_incomplete_keyword_at_end): New.
7238         (linespec_lexer_lex_string): Record quote char.  If in completion
7239         mode, don't throw.
7240         (linespec_lexer_consume_token): Advance the completion word point.
7241         (linespec_lexer_peek_token): Save/restore completion info.
7242         (save_stream_and_consume_token): New.
7243         (set_completion_after_number): New.
7244         (linespec_parse_basic): Set what to complete next depending on
7245         token.  Handle function and label completions specially.
7246         (parse_linespec): Disable objc shortcut in completion mode.  Set
7247         what to complete next depending on token type.  Skip keyword if in
7248         completion mode.
7249         (complete_linespec_component, linespec_complete): New.
7250         * linespec.h (linespec_complete): Declare.
7251
7252 2017-07-17  Pedro Alves  <palves@redhat.com>
7253
7254         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7255         Handle 'operator<' / 'operator<<'.
7256
7257 2017-07-17  Pedro Alves  <palves@redhat.com>
7258
7259         * completer.c (collect_explicit_location_matches): Handle
7260         MATCH_LABEL.
7261         (convert_explicit_location_to_linespec): New, factored out from
7262         ...
7263         (convert_explicit_location_to_sals): ... this.
7264         (complete_label): New.
7265         (linespec_complete_label, find_label_symbols_in_block): New.
7266         (find_label_symbols): Add completion_mode parameter and adjust to
7267         call find_label_symbols_in_block.
7268         * linespec.h (linespec_complete_label): Declare.
7269
7270 2017-07-17  Pedro Alves  <palves@redhat.com>
7271
7272         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7273         complete_symbol_mode parameter.
7274         * cli/cli-cmds.c (complete_command): Get the completion result out
7275         of the handle_brkchars tracker if used a custom word point.
7276         * completer.c: Include "linespec.h".
7277         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7278         (advance_to_expression_complete_word_point): New.
7279         (completion_tracker::completes_to_completion_word): New.
7280         (complete_files_symbols): Pass down
7281         complete_symbol_mode::EXPRESSION.
7282         (explicit_options, probe_options): New.
7283         (collect_explicit_location_matches): Complete on the
7284         explictit_loc->foo instead of word.  Use
7285         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7286         keyword and options completions.
7287         (backup_text_ptr): Delete.
7288         (skip_keyword): New.
7289         (complete_explicit_location): Remove 'word' parameter.  Add
7290         language, quoted_arg_start and quoted_arg_end parameters.
7291         Rewrite, parsing left to right.
7292         (location_completer): Rewrite.
7293         (location_completer_handle_brkchars): New function.
7294         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7295         (enum complete_line_internal_reason): Adjust comments.
7296         (completion_tracker::discard_completions): New.
7297         (completer_handle_brkchars_func_for_completer): Handle
7298         location_completer.
7299         (gdb_custom_word_point_brkchars)
7300         (gdb_org_rl_basic_quote_characters): New.
7301         (gdb_completion_word_break_characters_throw)
7302         (completion_find_completion_word): Handle trackers that use a
7303         custom word point.
7304         (completion_tracker::advance_custom_word_point_by): New.
7305         (completion_tracker::build_completion_result): Don't rely on
7306         readline appending the quote char.
7307         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7308         use a custom word point.
7309         (gdb_rl_attempted_completion_function): Restore
7310         rl_basic_quote_characters.
7311         * completer.h (class completion_tracker): Extend intro comment.
7312         (completion_tracker::set_quote_char)
7313         (completion_tracker::quote_char)
7314         (completion_tracker::set_use_custom_word_point)
7315         (completion_tracker::use_custom_word_point)
7316         (completion_tracker::custom_word_point)
7317         (completion_tracker::set_custom_word_point)
7318         (completion_tracker::advance_custom_word_point_by)
7319         (completion_tracker::completes_to_completion_word)
7320         (completion_tracker::discard_completions): New methods.
7321         (completion_tracker::m_quote_char)
7322         (completion_tracker::m_use_custom_word_point)
7323         (completion_tracker::m_custom_word_point): New fields.
7324         (advance_to_expression_complete_word_point): Declare.
7325         * f-lang.c (f_collect_symbol_completion_matches): Add
7326         complete_symbol_mode parameter.
7327         * language.h (struct language_defn)
7328         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7329         parameter.
7330         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7331         (linespec_complete_function): New function.
7332         (linespec_lexer_lex_keyword): Adjust.
7333         * linespec.h (linespec_keywords, linespec_complete_function): New
7334         declarations.
7335         * location.c (find_end_quote): New function.
7336         (explicit_location_lex_one): Add explicit_completion_info
7337         parameter.  Save quoting info.  Don't throw if being called for
7338         completion.  Don't handle Ada operators here.
7339         (is_cp_operator, skip_op_false_positives, first_of)
7340         (explicit_location_lex_one_function): New function.
7341         (string_to_explicit_location): Replace 'dont_throw' parameter with
7342         an explicit_completion_info pointer parameter.  Handle it.  Don't
7343         use explicit_location_lex_one to lex function names.  Use
7344         explicit_location_lex_one_function instead.
7345         * location.h (struct explicit_completion_info): New.
7346         (string_to_explicit_location): Replace 'dont_throw' parameter with
7347         an explicit_completion_info pointer parameter.
7348         * symtab.c (default_collect_symbol_completion_matches_break_on):
7349         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7350         (default_collect_symbol_completion_matches)
7351         (collect_symbol_completion_matches): Add complete_symbol_mode
7352         parameter.
7353         (collect_symbol_completion_matches_type): Pass down
7354         complete_symbol_mode::EXPRESSION.
7355         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7356         parameter.  Handle LINESPEC mode.
7357         * symtab.h (complete_symbol_mode): New.
7358         (default_collect_symbol_completion_matches_break_on)
7359         (default_collect_symbol_completion_matches)
7360         (collect_symbol_completion_matches)
7361         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7362         parameter.
7363
7364 2017-07-17  Pedro Alves  <palves@redhat.com>
7365
7366         * utils.c (enum class strncmp_iw_mode): New.
7367         (strcmp_iw): Rename to ...
7368         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7369         parameters.  Handle them.
7370         (strncmp_iw): New.
7371         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7372         * utils.h (strncmp_iw): Declare.
7373         (strcmp_iw): Move describing comments here.
7374
7375 2017-07-17  Pedro Alves  <palves@redhat.com>
7376
7377         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7378         CP_OPERATOR_STR.
7379         * c-typeprint.c (is_type_conversion_operator): Use
7380         CP_OPERATOR_STR.
7381         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7382         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7383         CP_OPERATOR_LEN.
7384         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7385         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7386         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7387         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7388         CP_OPERATOR_STR.
7389         * location.c: Include "cp-support.h".
7390         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7391         CP_OPERATOR_STR.
7392         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7393         CP_OPERATOR_LEN.
7394
7395 2017-07-17  Pedro Alves  <palves@redhat.com>
7396
7397         * cli/cli-cmds.c (complete_command): Use a completion tracker
7398         along with completion_find_completion_word for handle_brkchars
7399         phase.
7400         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7401         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7402         (struct gdb_rl_completion_word_info): New.
7403         (gdb_rl_find_completion_word): New.
7404         (completion_find_completion_word): New.
7405         * completer.h (completion_find_completion_word): Declare.
7406
7407 2017-07-17  Pedro Alves  <palves@redhat.com>
7408
7409         * ada-lang.c (symbol_completion_match): Adjust comments.
7410         (symbol_completion_add): Replace vector parameter with
7411         completion_tracker parameter.  Use it.
7412         (ada_make_symbol_completion_list): Rename to...
7413         (ada_collect_symbol_completion_matches): ... this.  Add
7414         completion_tracker parameter and use it.
7415         (ada_language_defn): Adjust.
7416         * break-catch-syscall.c (catch_syscall_completer): Adjust
7417         prototype and work with completion_tracker instead of VEC.
7418         * breakpoint.c (condition_completer): Adjust prototype and work
7419         with completion_tracker instead of VEC.
7420         * c-lang.c (c_language_defn, cplus_language_defn)
7421         (asm_language_defn, minimal_language_defn): Adjust to renames.
7422         * cli/cli-cmds.c (complete_command): Rework using
7423         completion_tracker.  Catch exceptions when completing.
7424         * cli/cli-decode.c (integer_unlimited_completer)
7425         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7426         with completion_tracker instead of VEC.
7427         * command.h (struct completion_tracker): Forward declare.
7428         (completer_ftype, completer_handle_brkchars_ftype): Change
7429         types.
7430         (complete_on_cmdlist, complete_on_enum): Adjust.
7431         * completer.c: Include <algorithm>.
7432         (struct gdb_completer_state): New.
7433         (current_completion): New global.
7434         (readline_line_completion_function): Delete.
7435         (noop_completer, filename_completer)
7436         (filename_completer_handle_brkchars, complete_files_symbols)
7437         (linespec_location_completer): Adjust to work with a
7438         completion_tracker instead of a VEC.
7439         (string_or_empty): New.
7440         (collect_explicit_location_matches): Adjust to work with a
7441         completion_tracker instead of a VEC.
7442         (explicit_location_completer): Rename to ...
7443         (complete_explicit_location): ... this and adjust to work with a
7444         completion_tracker instead of a VEC.
7445         (location_completer): Adjust to work with a completion_tracker
7446         instead of a VEC.
7447         (add_struct_fields): Adjust to work with a completion_list instead
7448         of VEC.
7449         (expression_completer): Rename to ...
7450         (complete_expression): ... this and adjust to work with a
7451         completion_tracker instead of a VEC.  Use complete_files_symbols.
7452         (expression_completer): Reimplement on top of complete_expression.
7453         (symbol_completer): Adjust to work with a completion_tracker
7454         instead of a VEC.
7455         (enum complete_line_internal_reason): Add describing comments.
7456         (complete_line_internal_normal_command): Adjust to work with a
7457         completion_tracker instead of a VEC.
7458         (complete_line_internal): Rename to ...
7459         (complete_line_internal_1): ... this and adjust to work with a
7460         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7461         handle_brkchars phase.
7462         (new_completion_tracker): Delete.
7463         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7464         complete_line_internal_1.
7465         (free_completion_tracker): Delete.
7466         (INITIAL_COMPLETION_HTAB_SIZE): New.
7467         (completion_tracker::completion_tracker)
7468         (completion_tracker::~completion_tracker): New.
7469         (maybe_add_completion): Delete.
7470         (completion_tracker::maybe_add_completion)
7471         (completion_tracker::add_completion)
7472         (completion_tracker::add_completions): New.
7473         (throw_max_completions_reached_error): Delete.
7474         (complete_line): Adjust to work with a completion_tracker instead
7475         of a VEC.  Don't create a completion_tracker_t or check for max
7476         completions here.
7477         (command_completer, command_completer_handle_brkchars)
7478         (signal_completer, reg_or_group_completer_1)
7479         (reg_or_group_completer, default_completer_handle_brkchars):
7480         Adjust to work with a completion_tracker.
7481         (gdb_completion_word_break_characters_throw): New.
7482         (gdb_completion_word_break_characters): Reimplement.
7483         (line_completion_function): Delete.
7484         (completion_tracker::recompute_lowest_common_denominator)
7485         (expand_preserving_ws)
7486         (completion_tracker::build_completion_result)
7487         (completion_result::completion_result)
7488         (completion_result::completion_result)
7489         (completion_result::~completion_result)
7490         (completion_result::completion_result)
7491         (completion_result::release_match_list, compare_cstrings)
7492         (completion_result::sort_match_list)
7493         (completion_result::reset_match_list)
7494         (gdb_rl_attempted_completion_function_throw)
7495         (gdb_rl_attempted_completion_function): New.
7496         * completer.h (completion_list, struct completion_result)
7497         (class completion_tracker): New.
7498         (complete_line): Add completion_tracker parameter.
7499         (readline_line_completion_function): Delete.
7500         (gdb_rl_attempted_completion_function): New.
7501         (noop_completer, filename_completer, expression_completer)
7502         (location_completer, symbol_completer, command_completer)
7503         (signal_completer, reg_or_group_completer): Update prototypes.
7504         (completion_tracker_t, new_completion_tracker)
7505         (make_cleanup_free_completion_tracker): Delete.
7506         (enum maybe_add_completion_enum): Delete.
7507         (maybe_add_completion): Delete.
7508         (throw_max_completions_reached_error): Delete.
7509         * corefile.c (complete_set_gnutarget): Adjust to work with a
7510         completion_tracker instead of a VEC.
7511         * cp-abi.c (cp_abi_completer): Adjust to work with a
7512         completion_tracker instead of a VEC.
7513         * d-lang.c (d_language_defn): Adjust.
7514         * disasm.c (disassembler_options_completer): Adjust to work with a
7515         completion_tracker instead of a VEC.
7516         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7517         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7518         with a completion_tracker instead of a VEC.
7519         (f_language_defn): Adjust.
7520         * go-lang.c (go_language_defn): Adjust.
7521         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7522         Adjust to work with a completion_tracker instead of a VEC.
7523         * infrun.c (handle_completer): Likewise.
7524         * interps.c (interpreter_completer): Likewise.
7525         * interps.h (interpreter_completer): Likewise.
7526         * language.c (unknown_language_defn, auto_language_defn)
7527         (local_language_defn): Adjust.
7528         * language.h (language_defn::la_make_symbol_completion_list):
7529         Rename to ...
7530         (language_defn::la_collect_symbol_completion_matches): ... this
7531         and adjust to work with a completion_tracker instead of a VEC.
7532         * m2-lang.c (m2_language_defn): Adjust.
7533         * objc-lang.c (objc_language_defn): Adjust.
7534         * opencl-lang.c (opencl_language_defn): Adjust.
7535         * p-lang.c (pascal_language_defn): Adjust.
7536         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7537         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7538         with a completion_tracker.
7539         * rust-lang.c (rust_language_defn): Adjust.
7540         * symtab.c (free_completion_list, do_free_completion_list)
7541         (return_val, completion_tracker): Delete.
7542         (completion_list_add_name, completion_list_add_symbol)
7543         (completion_list_add_msymbol, completion_list_objc_symbol)
7544         (completion_list_add_fields, add_symtab_completions): Add
7545         completion_tracker parameter and use it.
7546         (default_make_symbol_completion_list_break_on_1): Rename to...
7547         (default_collect_symbol_completion_matches_break_on): ... this.
7548         Add completion_tracker parameter and use it instead of allocating
7549         a completion tracker here.
7550         (default_make_symbol_completion_list_break_on): Delete old
7551         implementation.
7552         (default_make_symbol_completion_list): Delete.
7553         (default_collect_symbol_completion_matches): New.
7554         (make_symbol_completion_list): Delete.
7555         (collect_symbol_completion_matches): New.
7556         (make_symbol_completion_type): Rename to ...
7557         (collect_symbol_completion_matches_type): ... this.  Add
7558         completion_tracker parameter and use it instead of VEC.
7559         (make_file_symbol_completion_list_1): Rename to...
7560         (collect_file_symbol_completion_matches): ... this.  Add
7561         completion_tracker parameter and use it instead of VEC.
7562         (make_file_symbol_completion_list): Delete.
7563         (add_filename_to_list): Use completion_list instead of a VEC.
7564         (add_partial_filename_data::list): Now a completion_list.
7565         (make_source_files_completion_list): Work with a completion_list
7566         instead of a VEC.
7567         * symtab.h: Include "completer.h".
7568         (default_make_symbol_completion_list_break_on)
7569         (default_make_symbol_completion_list, make_symbol_completion_list)
7570         (make_symbol_completion_type, make_file_symbol_completion_list)
7571         (make_source_files_completion_list): Delete.
7572         (default_collect_symbol_completion_matches_break_on)
7573         (default_collect_symbol_completion_matches)
7574         (collect_symbol_completion_matches)
7575         (collect_symbol_completion_matches_type)
7576         (collect_file_symbol_completion_matches)
7577         (make_source_files_completion_list): New.
7578         * top.c (init_main): Don't install a rl_completion_entry_function
7579         hook.  Install a rl_attempted_completion_function hook instead.
7580         * tui/tui-layout.c (layout_completer): Adjust to work with a
7581         completion_tracker.
7582         * tui/tui-regs.c (tui_reggroup_completer):
7583         * tui/tui-win.c (window_name_completer, focus_completer)
7584         (winheight_completer): Adjust to work with a completion_tracker.
7585         * value.c: Include "completer.h".
7586         (complete_internalvar): Adjust to work with a completion_tracker.
7587         * value.h (complete_internalvar): Likewise.
7588
7589 2017-07-17  Pedro Alves  <palves@redhat.com>
7590
7591         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7592         renames.
7593         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7594         comments to completer_ftype's declaration.
7595         <completer_handle_brkchars>: Change type to
7596         completer_handle_brkchars_ftype.
7597         * command.h (completer_ftype): Add describing comment and give
7598         names to parameters.
7599         (completer_ftype_void): Rename to ...
7600         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7601         (set_cmd_completer_handle_brkchars): Adjust.
7602         * completer.c (filename_completer_handle_brkchars): New function.
7603         (complete_line_internal_normal_command): New function, factored
7604         out from ...
7605         (complete_line_internal): ... here.
7606         (command_completer_handle_brkchars)
7607         (default_completer_handle_brkchars)
7608         (completer_handle_brkchars_func_for_completer): New functions.
7609         * completer.h (set_gdb_completion_word_break_characters): Delete
7610         declaration.
7611         (completer_handle_brkchars_func_for_completer): New declaration.
7612         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7613         completer_handle_brkchars_func_for_completer.
7614
7615 2017-07-17  Pedro Alves  <palves@redhat.com>
7616
7617         * completer.c (symbol_completer): New function, based on
7618         make_symbol_completion_list_fn.
7619         * completer.h (symbol_completer): New declaration.
7620         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7621         * python/py-cmd.c (completers): Adjust.
7622         * symtab.c (make_symbol_completion_list_fn): Delete.
7623         * symtab.h (make_symbol_completion_list_fn): Delete.
7624         * cli/cli-decode.c (add_cmd): Adjust.
7625
7626 2017-07-17  Pedro Alves  <palves@redhat.com>
7627
7628         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7629         * dwarf2read.c: Include "filename-seen-cache.h".
7630         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7631         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7632         * filename-seen-cache.c: New file.
7633         * filename-seen-cache.h: New file.
7634         * symtab.c: Include "filename-seen-cache.h".
7635         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7636         (create_filename_seen_cache, clear_filename_seen_cache)
7637         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7638         to filename-seen-cache.h/filename-seen-cache.c.
7639         (output_source_filename, sources_info)
7640         (maybe_add_partial_symtab_filename)
7641         (make_source_files_completion_list): Adjust to use
7642         filename_seen_cache.
7643
7644 2017-07-17  Pedro Alves  <palves@redhat.com>
7645
7646         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7647         fields.
7648         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7649         dwarf2_debug_sections*)): New.
7650         (dwarf2_per_objfile::dwarf2_per_objfile(const
7651         dwarf2_per_objfile&)): Declare as deleted.
7652         (dwarf2_per_objfile::operator=): Declare as deleted.
7653         (dwarf2_per_objfile::dwarf2_per_objfile)
7654         (dwarf2_per_objfile::~dwarf2_per_objfile)
7655         (dwarf2_per_objfile::free_cached_comp_units): New.
7656         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7657         ctor.  Call dwarf2_per_objfile's ctor manually.
7658         (dwarf2_locate_sections): Deleted/refactored as ...
7659         (dwarf2_per_objfile::locate_sections): ... this new method.
7660         (free_cached_comp_units): Defer to
7661         dwarf2_per_objfile::free_cached_comp_units.
7662         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7663
7664 2017-07-14  Tom Tromey  <tom@tromey.com>
7665
7666         PR rust/21764:
7667         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7668         parameter.
7669         <UNOP_SIZEOF>: Split into separate case.
7670         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7671
7672 2017-07-14  Tom Tromey  <tom@tromey.com>
7673
7674         PR rust/21763:
7675         * symtab.c (symbol_matches_domain): Add language_rust to special
7676         case.
7677         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7678         treat LOC_TYPEDEF symbols as variables.
7679
7680 2017-07-14  Pedro Alves  <palves@redhat.com>
7681
7682         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7683         symtabs matching all symtabs with SRCFILE as file name instead of
7684         only considering the first hit, with lookup_symtab.
7685
7686 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7687
7688         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7689         operator_name parameters.
7690         (gen_expr): Update function call.
7691
7692 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7693
7694         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7695         parameter.
7696         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7697         Likewise.
7698         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7699         parameter, use agent_expr::gdbarch instead, update function
7700         calls.
7701         (locexpr_tracepoint_var_ref): Likewise.
7702         (loclist_tracepoint_var_ref): Likewise.
7703         * ax-gdb.c (gen_trace_static_fields): Likewise.
7704         (gen_traced_pop): Likewise.
7705         (gen_frame_args_address): Likewise.
7706         (gen_frame_locals_address): Likewise.
7707         (gen_var_ref): Likewise.
7708         (gen_struct_ref_recursive): Likewise.
7709         (gen_static_field): Likewise.
7710         (gen_maybe_namespace_elt): Likewise.
7711         (gen_expr): Likewise.
7712         (gen_trace_for_var): Likewise.
7713         (gen_trace_for_expr): Likewise.
7714         (gen_trace_for_return_address): Likewise.
7715
7716 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7717
7718         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7719         parameter.
7720         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7721
7722 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7723
7724         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7725         from ax, update calls.
7726         (gen_usual_arithmetic): Likewise.
7727         (gen_integral_promotions): Likewise.
7728         (gen_bitfield_ref): Likewise.
7729         (gen_primitive_field): Likewise.
7730         (gen_struct_ref_recursive): Likewise.
7731         (gen_struct_ref): Likewise.
7732         (gen_maybe_namespace_elt): Likewise.
7733         (gen_struct_elt_for_reference): Likewise.
7734         (gen_namespace_elt): Likewise.
7735         (gen_aggregate_elt_ref): Likewise.
7736         (gen_expr): Get gdbarch from ax, update calls.
7737         (gen_expr_binop_rest): Likewise.
7738
7739 2017-07-13  Pedro Alves  <palves@redhat.com>
7740
7741         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7742         as default tdesc.
7743         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7744         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7745         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7746         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7747         tdep.
7748         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7749         Get final tdesc from the tdep.
7750         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7751         default tdesc.
7752         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7753         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7754         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7755         Use it as default tdesc.
7756         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7757         down to amd_init_abi.  No longer handle fallback tdesc here.
7758         * amd64-tdep.h (tdesc_x32): Declare.
7759         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7760         parameter.
7761         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7762         as default tdesc.
7763
7764 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7765
7766         * s390-linux-tdep.c (s390_process_record): Add support for
7767         instructions new in arch12.
7768
7769 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7770
7771         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7772         PT_GETFSBASE and PT_GETGSBASE.
7773         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7774         PT_SETGSBASE.
7775
7776 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7777
7778         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7779         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7780         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7781         those rules.
7782         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7783         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7784         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7785         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7786         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7787         * features/i386/amd64.xml: Add 64bit-segments.xml.
7788         * features/i386/amd64-avx-avx512.c: Regenerated.
7789         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7790         * features/i386/amd64-avx-mpx.c: Regenerated.
7791         * features/i386/amd64-avx.c: Regenerated.
7792         * features/i386/amd64-mpx.c: Regenerated.
7793         * features/i386/amd64.c: Regenerated.
7794         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7795         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7796         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7797         * regformats/i386/amd64-avx.dat: Regenerated.
7798         * regformats/i386/amd64-mpx.dat: Regenerated.
7799         * regformats/i386/amd64.dat: Regenerated.
7800
7801 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7802
7803         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7804         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7805
7806 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7807
7808         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7809         unsetenv.
7810         * gnulib/aclocal.m4: Regenerate.
7811         * gnulib/config.in: Regenerate.
7812         * gnulib/configure: Regenerate.
7813         * gnulib/import/Makefile.am: Regenerate.
7814         * gnulib/import/Makefile.in: Regenerate.
7815         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7816         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7817         * gnulib/import/m4/environ.m4: New file.
7818         * gnulib/import/m4/setenv.m4: New file.
7819         * gnulib/import/setenv.c: New file.
7820         * gnulib/import/unsetenv.c: New file.
7821
7822 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7823
7824         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7825         address when op is DW_OP_addr.
7826
7827 2017-07-09  Tom Tromey  <tom@tromey.com>
7828
7829         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7830         check and apply to outer type.
7831
7832 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7833
7834         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7835         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7836         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7837         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7838
7839 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7840
7841         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7842
7843 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7844
7845         * corelow.c (get_core_siginfo): Remove.
7846         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7847         instead of get_core_siginfo.
7848         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7849         * gdbarch.h: Re-generate.
7850         * gdbarch.c: Re-generate.
7851         * linux-tdep.c (linux_core_xfer_siginfo): New.
7852         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7853
7854 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7855
7856         * corelow.c (thread_section_name): Move to ...
7857         * gdbcore.h (thread_section_name): ... here.
7858
7859 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7860
7861         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7862         (struct siginfo32): New.
7863         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7864         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7865         via ptrace(PT_LWPINFO).
7866
7867 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7868
7869         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7870         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7871         (fbsd_get_siginfo_type): New.
7872         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7873         (_initialize_fbsd_tdep): New.
7874
7875 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7876
7877         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7878         a singular dwo_unit*) to support multiple CUs in the same way that
7879         multiple TUs are supported.
7880         (create_cus_hash_table): Replace create_dwo_cu with a function for
7881         parsing multiple CUs from a DWO file.
7882         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7883         create_dwo_cu.
7884         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7885         htab_find, rather than comparing the signature to a singleton CU in
7886         the dwo_file.
7887
7888 2017-07-06  Pedro Alves  <palves@redhat.com>
7889
7890         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7891
7892 2017-07-04  Pedro Alves  <palves@redhat.com>
7893
7894         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7895         * gdbtypes.h (TYPE_STATIC): Delete.
7896         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7897         is_synchronized, is_native>: Delete.
7898         <dummy>: Bump.
7899         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7900         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7901         (TYPE_FN_FIELD_ABSTRACT): Delete.
7902
7903 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7904
7905         * buffer.h (buffer_finish): Fix spelling mistakes.
7906
7907 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7908
7909         * .dir-locals.el: Automatically switch to C-style comments in
7910         versions of Emacs that support the feature.
7911
7912 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7913             Pedro Alves  <palves@redhat.com>
7914
7915         PR cli/21688
7916         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7917         (process_next_line): New variable 'inline_cmd'.
7918         Adjust 'if' clauses for "python", "compile" and "guile" to use
7919         'command_name_equals' and check for '!inline_cmd'.
7920
7921 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7922
7923         PR cli/21688
7924         * cli/cli-script.c (command_name_equals_not_inline): New function.
7925         (process_next_line): Adjust 'if' clauses for "python", "compile"
7926         and "guile" to use command_name_equals_not_inline.
7927
7928 2017-06-29  Pedro Alves  <palves@redhat.com>
7929
7930         * completer.c (expression_completer): Call
7931         linespec_location_completer instead of location_completer.
7932
7933 2017-06-29  Pedro Alves  <palves@redhat.com>
7934
7935         * completer.c (expression_completer): Remove code that recomputes
7936         'text' from 'word'.
7937
7938 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7939
7940         * regformats/regdat.sh: Generate code with
7941         "ifndef IN_PROCESS_AGENT".
7942
7943 2017-06-28  Pedro Alves  <palves@redhat.com>
7944
7945         * command.h: Include "common/scoped_restore.h".
7946
7947 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7948
7949         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7950         instead of obstack_grow.
7951
7952 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7953
7954         PR gdb/21337
7955         * symfile.c (reread_symbols): Call objfiles_changed just before
7956         read_symbols.
7957
7958 2017-06-27  Pedro Alves  <palves@redhat.com>
7959
7960         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7961         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7962         (completion_list_add_symbol, completion_list_add_msymbol):
7963         ... these new functions.
7964         (add_symtab_completions)
7965         (default_make_symbol_completion_list_break_on_1): Adjust.
7966
7967 2017-06-27  Pedro Alves  <palves@redhat.com>
7968
7969         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7970         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7971         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7972         dtor.
7973         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7974         'storage_obstack' field an auto_obstack.  In-class initialize all
7975         non-bitfield fields.  Make minsyms_read bool.
7976         * symfile.c (read_symbols): Adjust.
7977
7978 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7979
7980         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7981         (gdbsim_store_register): Likewise.
7982
7983 2017-06-27  Pedro Alves  <palves@redhat.com>
7984
7985         * c-exp.y (name_obstack): Now an auto_obstack.
7986         (yylex): Use auto_obstack::clear.
7987         (c_parse): Use auto_obstack::clear instead of reinitializing and
7988         freeing the obstack.
7989         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7990         * d-exp.y (name_obstack): Now an auto_obstack.
7991         (yylex): Use auto_obstack::clear.
7992         (d_parse): Use auto_obstack::clear instead of reinitializing and
7993         freeing the obstack.
7994         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7995         auto_obstack.
7996         * dwarf2read.c (create_addrmap_from_index)
7997         (dwarf2_build_psymtabs_hard)
7998         (update_enumeration_type_from_children): Likewise.
7999         * gdb_obstack.h (auto_obstack): New type.
8000         * go-exp.y (name_obstack): Now an auto_obstack.
8001         (build_packaged_name): Use auto_obstack::clear.
8002         (go_parse): Use auto_obstack::clear instead of reinitializing and
8003         freeing the obstack.
8004         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8005         auto_obstack.
8006         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8007         * rust-exp.y (work_obstack): Now an auto_obstack.
8008         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8009         reinitializing and freeing the obstack.
8010         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8011         (host_char_to_target): Use auto_obstack.
8012         * utils.h (make_cleanup_obstack_free): Delete declaration.
8013         * valprint.c (generic_emit_char, generic_printstr): Use
8014         auto_obstack.
8015
8016 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8017
8018         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8019         thread.
8020         (darwin_init_thread_list): Don't update dummy thread.
8021         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8022
8023 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8024
8025         * record-full.c (netorder16): Remove.
8026
8027 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8028
8029         * common/diagnostics.h: Define macros for GCC.
8030         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8031         * common/vec.h: Include diagnostics.h.
8032         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8033         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8034         warning.
8035
8036 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8037
8038         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8039         New macro.
8040         * ada-lex.l: Ignore deprecated register warnings.
8041
8042 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8043
8044         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8045         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8046
8047 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8048
8049         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8050         its own line.
8051
8052 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8053
8054         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8055
8056 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8057
8058         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8059         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8060         (xtensa_register_read_masked): Likewise.
8061
8062 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8063
8064         * common/environ.c (gdb_environ::unset): Update comment.
8065
8066 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8067
8068         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8069         registers.
8070
8071 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8072
8073         * record-full.c (record_full_exec_insn): Use byte_vector.
8074
8075 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8076
8077         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8078         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8079
8080 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8081
8082         * remote.c (cached_reg): Move from here...
8083         * regcache.h (cached_reg): ...to here.
8084         * python/py-unwind.c (struct reg_info): Remove.
8085         (cached_frame_info): Use cached_reg_t.
8086         (pyuw_prev_register): Likewise.
8087         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8088         (pyuw_dealloc_cache): Free all registers.
8089
8090 2017-06-22  Pedro Alves  <palves@redhat.com>
8091             Simon Marchi  <simon.marchi@ericsson.com>
8092
8093         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8094         warning.
8095         * common/diagnostics.h: New file.
8096
8097 2017-06-22  Pedro Alves  <palves@redhat.com>
8098
8099         * common/agent.h: Add include guards.
8100
8101 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8102
8103         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8104         talk about addressable units instead of bytes.
8105
8106 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8107
8108         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8109         of '::const_iterator'.
8110
8111 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8112
8113         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8114         'unittests/environ-selftests.c'.
8115         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8116         * charset.c (find_charset_names): Declare object 'iconv_env'.
8117         Update code to use 'iconv_env' object.  Remove call to
8118         'free_environ'.
8119         * common/environ.c: Include <utility>.
8120         (make_environ): Delete function.
8121         (free_environ): Delete function.
8122         (gdb_environ::clear): New function.
8123         (gdb_environ::operator=): New function.
8124         (gdb_environ::get): Likewise.
8125         (environ_vector): Delete function.
8126         (set_in_environ): Delete function.
8127         (gdb_environ::set): New function.
8128         (unset_in_environ): Delete function.
8129         (gdb_environ::unset): New function.
8130         (gdb_environ::envp): Likewise.
8131         * common/environ.h: Include <vector>.
8132         (struct gdb_environ): Delete; transform into...
8133         (class gdb_environ): ... this class.
8134         (free_environ): Delete prototype.
8135         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8136         environ_vector): Likewise.
8137         * infcmd.c (run_command_1): Update code to call
8138         'envp' from 'gdb_environ' class.
8139         (environment_info): Update code to call methods from 'gdb_environ'
8140         class.
8141         (unset_environment_command): Likewise.
8142         (path_info): Likewise.
8143         (path_command): Likewise.
8144         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8145         (inferior::inferior): Initialize 'environment' using the host's
8146         information.
8147         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8148         Include "environ.h".
8149         (class inferior) <environment>: Change type from 'struct
8150         gdb_environ' to 'gdb_environ'.
8151         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8152         methods from 'gdb_environ' class.
8153         * solib.c (solib_find_1): Likewise
8154         * unittests/environ-selftests.c: New file.
8155
8156 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8157
8158         * features/i386/i386-linux.xml: Exchange the order of including
8159         32bit-linux.xml and 32bit-sse.xml.
8160         * features/i386/i386-linux.c: Regenerated.
8161
8162 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8163
8164         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8165         Delete copy ctor and assignment operator.
8166         (tdesc_type): Likewise.
8167         (tdesc_feature): Likewise.
8168         (tdesc_free_reg): Remove.
8169         (tdesc_create_reg): Use new.
8170         (tdesc_free_type): Remove.
8171         (tdesc_create_vector): Use new.
8172         (tdesc_create_union): Likewise.
8173         (tdesc_create_flags): Likewise.
8174         (tdesc_create_enum): Likewise.
8175         (tdesc_free_feature): Delete.
8176         (free_target_description): Use delete.
8177
8178 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8179
8180         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8181         registers.
8182
8183 2017-06-19  Pedro Alves  <palves@redhat.com>
8184
8185         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8186         after gdb::unlinker.
8187
8188 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8189
8190         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8191         gdb_environ to access an environment variable.
8192
8193 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8194
8195         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8196         gdb_byte*.
8197
8198 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8199
8200         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8201
8202 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8203
8204         * configure: Re-generate.
8205         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8206
8207 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8208
8209         * configure: Re-generate.
8210         * warning.m4: Pass -Werror to compiler when checking for
8211         supported warning flags.
8212
8213 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8214
8215         * Makefile.in (COMPILE.pre): Add "-x c++".
8216
8217 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8218             Pedro Alves  <palves@redhat.com>
8219             Yao Qi  <yao.qi@linaro.org>
8220
8221         * defs.h (RequireLongest): New.
8222         (extract_integer): Declare function template.
8223         (extract_signed_integer): Remove the declaration, but define it
8224         static inline.
8225         (extract_unsigned_integer): Likewise.
8226         (store_integer): Declare function template.
8227         (store_signed_integer): Remove the declaration, but define it
8228         static inline.
8229         (store_unsigned_integer): Likewise.
8230         * findvar.c (extract_integer): New function template.
8231         (extract_signed_integer): Remove.
8232         (extract_unsigned_integer): Remove.
8233         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8234         instantiations.
8235         (store_integer): New function template.
8236         (store_signed_integer): Remove.
8237         (store_unsigned_integer): Remove.
8238         (store_integer): Explicit instantiations.
8239         * regcache.c (regcache_raw_read_signed): Update.
8240         (regcache::raw_read): New function.
8241         (regcache::raw_read_signed): Remove.
8242         (regcache::raw_read_unsigned): Remove.
8243         (regcache_raw_read_unsigned): Update.
8244         (regcache_raw_write_unsigned): Update.
8245         (regcache::raw_write_signed): Remove.
8246         (regcache::raw_write): New function.
8247         (regcache_cooked_read_signed): Update.
8248         (regcache::raw_write_unsigned): Remove.
8249         (regcache::cooked_read_signed): Remove.
8250         (regcache_cooked_read_unsigned): Update.
8251         (regcache::cooked_read_unsigned): Remove.
8252         (regcache_cooked_write_signed): Update.
8253         (regcache_cooked_write_unsigned): Update.
8254         * regcache.h (regcache) <raw_read_signed>: Remove.
8255         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8256         <raw_read, raw_write>: New.
8257         <cooked_read_signed, cooked_write_signed>: Remove.
8258         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8259         <cooked_read, cooked_write>: New.
8260         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8261         (sh64_pseudo_register_write): Update.
8262
8263 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8264
8265         * arc-tdep.c (arc_disassembler_options): New variable.
8266         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8267         of default_print_insn.
8268         (arc_delayed_print_insn): Set info->section when needed,
8269         use default_print_insn to retrieve a disassembler.
8270
8271 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8272
8273         PR gdb/21574
8274         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8275         to mention $SHELL and startup-with-shell.
8276
8277 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8278
8279         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8280
8281 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8282
8283         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8284         default_print_insn instead of print_insn_aarch64.
8285         * arm-tdep.c (gdb_print_insn_arm): Call
8286         default_print_insn instead of print_insn_big_arm
8287         and print_insn_little_arm.
8288         * i386-tdep.c (i386_print_insn): Call default_print_insn
8289         instead of print_insn_i386.
8290         * ia64-tdep.c (ia64_print_insn): Call
8291         default_print_insn instead of print_insn_ia64.
8292         * mips-tdep.c (gdb_print_insn_mips): Call
8293         default_print_insn instead of print_insn_big_mips
8294         and print_insn_little_mips.
8295         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8296         instead of print_insn_spu.
8297
8298 2017-06-14  Pedro Alves  <palves@redhat.com>
8299
8300         * ada-lang.c: Include "common/byte-vector.h".
8301         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8302         * charset.c (wchar_iterator::iterate): Resize the vector instead
8303         of reserving it.
8304         * common/byte-vector.h: Include "common/def-vector.h".
8305         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8306         * cli/cli-dump.c: Include "common/byte-vector.h".
8307         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8308         * common/byte-vector.h: New file.
8309         * common/def-vector.h: New file.
8310         * common/default-init-alloc.h: New file.
8311         * dwarf2loc.c: Include "common/byte-vector.h".
8312         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8313         instead of reserving it.
8314         * dwarf2read.c: Include "common/byte-vector.h".
8315         (data_buf::m_vec): Now a gdb::byte_vector.
8316         * gdb_regex.c: Include "common/def-vector.h".
8317         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8318         * mi/mi-main.c: Include "common/byte-vector.h".
8319         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8320         * printcmd.c: Include "common/byte-vector.h".
8321         (print_scalar_formatted): Use gdb::byte_vector.
8322         * valprint.c: Include "common/byte-vector.h".
8323         (maybe_negate_by_bytes, print_decimal_chars): Use
8324         gdb::byte_vector.
8325
8326 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8327
8328         * darwin-nat.c: Include "nat/fork-inferior.h".
8329
8330 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8331
8332         * configure.nat: Factor out Darwin bits that are not
8333         architecture-specific.  Add fork-inferior.o.
8334
8335 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8336
8337         * configure.nat: Factor out AIX bits that are not
8338         architecture-specific.  Add fork-inferior.o.
8339
8340 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8341
8342         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8343         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8344         wrappers that just call rw_pieced_value.
8345
8346 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8347
8348         * dwarf2loc.c (write_pieced_value): When writing the data for a
8349         memory piece, use write_memory_with_notification instead of
8350         write_memory.
8351
8352 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8353
8354         * valops.c (read_value_memory): Change embedded_offset to
8355         represent a bit offset instead of a byte offset.
8356         * value.h (read_value_memory): Adjust comment.
8357
8358 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8359
8360         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8361         dest_offset_bits and source_offset_bits.
8362         (write_pieced_value): Likewise.
8363
8364 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8365
8366         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8367         given by DW_OP_bit_piece.
8368         (write_pieced_value): Likewise.
8369
8370 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8371
8372         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8373         some other preparations to the places where sufficient information
8374         is available.
8375         (write_pieced_value): Likewise.
8376
8377 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8378
8379         * dwarf2loc.c (bits_to_bytes): New function.
8380         (read_pieced_value): Fix offset calculations for register pieces
8381         on big-endian targets.
8382         (write_pieced_value): Likewise.
8383
8384 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8385
8386         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8387         (write_pieced_value): Likewise.
8388
8389 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8390
8391         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8392         transfer the source value's least significant bits, instead of its
8393         lowest-addressed ones.  Rename type_len to max_offset.
8394         (read_pieced_value): Mirror above changes to write_pieced_value as
8395         applicable.
8396
8397 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8398
8399         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8400         truncate full bytes from dest_offset_bits before using it as an
8401         offset into the buffer.
8402
8403 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8404
8405         * dwarf2loc.c (write_pieced_value): Include transfer size in
8406         byte-wise check.
8407
8408 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8409
8410         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8411         calculation of this_size.
8412
8413 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8414
8415         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8416         when targeting a bit-field.
8417         (write_pieced_value): Likewise.
8418
8419 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8420
8421         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8422         (allocate_piece_closure): Drop addr_size parameter.
8423         (dwarf2_evaluate_loc_desc_full): Adjust call to
8424         allocate_piece_closure.
8425
8426 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8427
8428         PR gdb/21226
8429         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8430         the LSB end, independent of endianness.
8431
8432 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8433
8434         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8435         size capping.
8436
8437 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8438
8439         * mips-linux-nat.c: Move include features/mips*-linux.c to
8440         mips-linux-tdep.c.
8441         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8442         to mips-linux-tdep.c.
8443         * mips-linux-tdep.c: Include features/mips*-linux.c
8444         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8445         functions.
8446         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8447         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8448         (tdesc_mips64_dsp_linux): Declare.
8449
8450 2017-06-12  Tom Tromey  <tom@tromey.com>
8451
8452         * valprint.h (val_print_type_code_int): Remove.
8453         * valprint.c (generic_val_print_int): Always call
8454         val_print_scalar_formatted.
8455         (val_print_type_code_int): Remove.
8456         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8457         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8458         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8459         * ada-valprint.c (ada_val_print_num): Use
8460         val_print_scalar_formatted.
8461
8462 2017-06-12  Tom Tromey  <tom@tromey.com>
8463
8464         * printcmd.c (print_scalar_formatted): Unify the two switches.
8465         Don't convert scalars to LONGEST.
8466
8467 2017-06-12  Tom Tromey  <tom@tromey.com>
8468
8469         PR exp/16225:
8470         * valprint.h (print_decimal_chars): Update.
8471         * valprint.c (maybe_negate_by_bytes): New function.
8472         (print_decimal_chars): Add "is_signed" argument.
8473         * printcmd.c (print_scalar_formatted): Update.
8474
8475 2017-06-12  Tom Tromey  <tom@tromey.com>
8476
8477         PR exp/16225:
8478         * valprint.h (print_binary_chars, print_hex_chars): Update.
8479         * valprint.c (val_print_type_code_int): Update.
8480         (print_binary_chars): Add "zero_pad" argument.
8481         (emit_octal_digit): New function.
8482         (print_octal_chars): Don't zero-pad.
8483         (print_decimal_chars): Likewise.
8484         (print_hex_chars): Add "zero_pad" argument.
8485         * sh64-tdep.c (sh64_do_fp_register): Update.
8486         * regcache.c (regcache::dump): Update.
8487         * printcmd.c (print_scalar_formatted): Update.
8488         * infcmd.c (default_print_one_register_info): Update.
8489
8490 2017-06-12  Pedro Alves  <palves@redhat.com>
8491             Alan Hayward  <alan.hayward@arm.com>
8492
8493         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8494         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8495         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8496         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8497         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8498
8499 2017-06-12  Pedro Alves  <palves@redhat.com>
8500
8501         * dwarf2read.c (mapped_symtab::data): Now a vector of
8502         symtab_index_entry instead of vector of
8503         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8504         whether an element's name is NULL instead of checking whether the
8505         element itself is NULL.
8506         (find_slot): Change return type.  Adjust.
8507         (hash_expand, , add_index_entry, uniquify_cu_indices)
8508         (write_hash_table): Adjust.
8509
8510 2017-06-12  Pedro Alves  <palves@redhat.com>
8511
8512         * dwarf2read.c (recursively_count_psymbols): New function.
8513         (write_psymtabs_to_index): Call it to compute number of psyms and
8514         pass estimate size of psyms_seen to unordered_set's ctor.
8515
8516 2017-06-12  Pedro Alves  <palves@redhat.com>
8517
8518         * dwarf2read.c (write_hash_table): Check if key already exists
8519         before emplacing.
8520
8521 2017-06-12  Pedro Alves  <palves@redhat.com>
8522
8523         * dwarf2read.c (data_buf::append_space): Rename to...
8524         (data_buf::grow): ... this, and make private.  Adjust all callers.
8525         (data_buf::append_uint): New method.
8526         (add_address_entry, write_one_signatured_type)
8527         (write_psymtabs_to_index): Use it.
8528
8529 2017-06-12  Pedro Alves  <palves@redhat.com>
8530
8531         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8532         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8533         (data_buf::file_write): Call ::fwrite directly.
8534
8535 2017-06-12  Pedro Alves  <palves@redhat.com>
8536
8537         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8538         std::vector::erase.
8539
8540 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8541
8542         Code cleanup: C++ify .gdb_index producer.
8543         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8544         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8545         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8546         (create_strtab, add_string): Remove.
8547         (file_write, data_buf): New.
8548         (struct symtab_index_entry): Use std::vector for cu_indices.
8549         (struct mapped_symtab): Use std::vector for data.
8550         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8551         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8552         Remove.
8553         (find_slot): Change return type.  Update it to the new data structures.
8554         (hash_expand, add_index_entry): Update it to the new data structures.
8555         (offset_type_compare): Remove.
8556         (uniquify_cu_indices): Update it to the new data structures.
8557         (c_str_view, c_str_view_hasher, vector_hasher): New.
8558         (add_indices_to_cpool): Remove.
8559         (write_hash_table): Update it to the new data structures.
8560         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8561         (eq_psymtab_cu_index): Remove.
8562         (psym_index_map): New typedef.
8563         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8564         reference and std::unordered_map for cu_index_htab.
8565         (add_address_entry, add_address_entry_worker, write_address_map)
8566         (write_psymbols): Update it to the new data structures.
8567         (write_obstack): Remove.
8568         (struct signatured_type_index_data): Change types_list to a data_buf
8569         reference and psyms_seen to a std::unordered_set reference.
8570         (write_one_signatured_type, recursively_write_psymbols)
8571         (write_psymtabs_to_index): Update it to the new data structures.
8572
8573 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8574
8575         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8576         separate-debug-file commands.
8577         * symfile.h (separate_debug_file_debug): New global.
8578         * symfile.c (separate_debug_file_debug): New global.
8579         (separate_debug_file_exists, find_separate_debug_file): Add
8580         debug output.
8581         (_initialize_symfile): Add "set debug separate-debug-file"
8582         command.
8583         * build-id.c (build_id_to_debug_bfd,
8584         find_separate_debug_file_by_buildid): Add debug output.
8585
8586 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8587
8588         * gdbarch.sh (displaced_step_free_closure): Remove.
8589         * gdbarch.h, gdbarch.c: Re-generate.
8590         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8591         displaced_step_free_closure.
8592         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8593         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8594         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8595         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8596         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8597         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8598         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8599         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8600         * infrun.c (displaced_step_clear): Call xfree instead of
8601         gdbarch_displaced_step_free_closure.
8602
8603 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8604
8605         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8606         NULL".
8607
8608 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8609
8610         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8611         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8612         (mn10300_push_dummy_call): Likewise.
8613
8614 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8615
8616         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8617
8618 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8619
8620         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8621
8622 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8623
8624         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8625         able to start inferiors using a shell.
8626         (New remote packets): Announce new packet "QStartupWithShell".
8627         * remote.c: Add PACKET_QStartupWithShell.
8628         (extended_remote_create_inferior): Handle new
8629         PACKET_QStartupWithShell.
8630         (remote_protocol_features) <QStartupWithShell>: New entry for
8631         PACKET_QStartupWithShell.
8632         (_initialize_remote): Call "add_packet_config_cmd" for
8633         QStartupShell.
8634
8635 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8636             Pedro Alves  <palves@redhat.com>
8637
8638         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8639         and "nat/fork-inferior.h".
8640         * common/common-inferior.h: New file, with contents from
8641         "gdb/inferior.h".
8642         * commom/common-utils.c: Include "common-utils.h".
8643         (stringify_argv): New function.
8644         * common/common-utils.h (stringify_argv): New prototype.
8645         * configure.nat: Add "fork-inferior.o" as a dependency for
8646         "*linux*", "fbsd*" and "nbsd*" hosts.
8647         * corefile.c (get_exec_file): Update comment.
8648         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8649         instead of "startup_inferior".
8650         (darwin_create_inferior): Call "add_thread_silent" after
8651         "fork_inferior".
8652         * fork-child.c: Cleanup unnecessary includes.
8653         (SHELL_FILE): Move to "common/common-fork-child.c".
8654         (environ): Likewise.
8655         (exec_wrapper): Initialize.
8656         (get_exec_wrapper): New function.
8657         (breakup_args): Move to "common/common-fork-child.c"; rename to
8658         "breakup_args_for_exec".
8659         (escape_bang_in_quoted_argument): Move to
8660         "common/common-fork-child.c".
8661         (saved_ui): New variable.
8662         (prefork_hook): New function.
8663         (postfork_hook): Likewise.
8664         (postfork_child_hook): Likewise.
8665         (gdb_startup_inferior): Likewise.
8666         (fork_inferior): Move to "common/common-fork-child.c".  Update
8667         function to support gdbserver.
8668         (startup_inferior): Likewise.
8669         * gdbcore.h (get_exec_file): Remove declaration.
8670         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8671         instead of "startup_inferior".  Call "add_thread_silent" after
8672         "fork_inferior".
8673         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8674         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8675         instead of "startup_inferior".  Call "add_thread_silent" after
8676         "fork_inferior".
8677         * inferior.h: Include "common-inferior.h".
8678         (trace_start_error): Move to "common/common-utils.h".
8679         (trace_start_error_with_name): Likewise.
8680         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8681         (startup_inferior): Likewise.
8682         (gdb_startup_inferior): New prototype.
8683         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8684         * nat/fork-inferior.h: New file.
8685         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8686         instead of "startup_inferior".  Call "add_thread_silent" after
8687         "fork_inferior".
8688         * target.h (target_terminal_init): Move prototype to
8689         "target/target.h".
8690         (target_terminal_inferior): Likewise.
8691         (target_terminal_ours): Likewise.
8692         * target/target.h (target_terminal_init): New prototype, moved
8693         from "target.h".
8694         (target_terminal_inferior): Likewise.
8695         (target_terminal_ours): Likewise.
8696         * utils.c (gdb_flush_out_err): New function.
8697
8698 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8699
8700         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8701         * common/common-gdbthread.h: New file, with parts from
8702         "gdb/gdbthread.h".
8703         * gdbthread.h: Include "common-gdbthread.h".
8704         (switch_to_thread): Moved to "common/common-gdbthread.h".
8705
8706 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8707
8708         * Makefile.in (SFILES): Add "common/job-control.c".
8709         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8710         (COMMON_OBS): Add "job-control.o".
8711         * common/job-control.c: New file, with contents from
8712         "gdb/inflow.c".
8713         * common/job-control.h: New file, with contents from "terminal.h".
8714         * fork-child.c: Include "job-control.h".
8715         * inflow.c: Include "job-control.h".
8716         (gdb_setpgid): Move to "common/common-inflow.c".
8717         (_initialize_inflow): Move setting of "job_control" to
8718         "handle_job_control".
8719         * terminal.h (job_control): Moved to "common/common-terminal.h".
8720         (gdb_setpgid): Likewise.
8721         * top.c: Include "job_control.h".
8722         * utils.c: Likewise.
8723         (job_control): Moved to "job-control.c".
8724
8725 2017-06-07  Pedro Alves  <palves@redhat.com>
8726
8727         * Makefile.in (SFILES): Add gdb_regex.c.
8728         (COMMON_OBS): Add gdb_regex.o.
8729         * ada-lang.c (ada_add_standard_exceptions)
8730         (ada_add_exceptions_from_frame, name_matches_regex)
8731         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8732         parameter type to compiled_regex.  Adjust.
8733         (ada_exceptions_list): Use compiled_regex.
8734         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8735         std::unique_ptr<compiled_regex>.
8736         (exception_catchpoint::~exception_catchpoint): Remove regfree
8737         call.
8738         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8739         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8740         * breakpoint.c (solib_catchpoint::compiled): Now a
8741         std::unique_ptr<compiled_regex>.
8742         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8743         (check_status_catch_solib): Adjust to use compiled_regex.
8744         (add_solib_catchpoint): Adjust to use compiled_regex.
8745         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8746         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8747         compiled_regex reference.  Adjust to use it.
8748         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8749         declaration.  Include "gdb_regex.h".
8750         (apropos_cmd): Change regex parameter to compiled_regex reference.
8751         * gdb_regex.c: New file.
8752         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8753         declarations.
8754         (class compiled_regex): New.
8755         * linux-tdep.c: Include "common/gdb_optional.h".
8756         (struct mapping_regexes): New, factored out from
8757         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8758         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8759         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8760         * probe.c: Include "common/gdb_optional.h".
8761         (collect_probes): Use compiled_regex and gdb::optional and remove
8762         cleanups.
8763         * skip.c: Include "common/gdb_optional.h".
8764         (skiplist_entry::compiled_function_regexp): Now a
8765         gdb::optional<compiled_regex>.
8766         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8767         (free_skiplist_entry): Remove regfree call.
8768         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8769         compiled_regex and gdb::optional.
8770         * symtab.c: Include "common/gdb_optional.h".
8771         (search_symbols): Use compiled_regex and gdb::optional.
8772         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8773         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8774         to gdb_regex.c.
8775
8776 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8777
8778         * regcache.c (regcache::save): Avoid buffer use.
8779         (regcache::dump): Likewise.
8780
8781 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8782
8783         * sh-tdep.c (sh_pseudo_register_read): Remove
8784         MAX_REGISTER_SIZE.
8785         (sh_pseudo_register_write): Likewise.
8786         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8787         (sh64_pseudo_register_write): Likewise
8788
8789 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8790
8791         * aarch64-tdep.c (aarch64_store_return_value): Use
8792         V_REGISTER_SIZE.
8793         (aarch64_pseudo_read_value): Likewise.
8794         (aarch64_pseudo_write): Likewise.
8795
8796 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8797
8798         * regformats/regdef.h (set_register_cache): Remove the
8799         declaration.
8800
8801 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8802
8803         * frame.c (frame_unwind_register_signed): Use
8804         frame_unwind_register_value.
8805
8806 2017-06-06  Pedro Alves  <palves@redhat.com>
8807
8808         PR breakpoints/21553
8809         * breakpoint.c (create_breakpoints_sal_default)
8810         (init_breakpoint_sal, create_breakpoint_sal): Use
8811         gdb::unique_xmalloc_ptr for string parameters.
8812         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8813         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8814         (base_breakpoint_create_breakpoints_sal)
8815         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8816         (strace_marker_create_breakpoints_sal)
8817         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8818         string parameters.
8819         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8820         gdb::unique_xmalloc_ptr for string parameters.
8821         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8822         parameters.
8823
8824 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8825
8826         * alpha-tdep.c (alpha_register_to_value): Use
8827         get_frame_register_value.
8828         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8829
8830 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8831
8832         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8833         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8834         (ia64_value_to_register): Likewise.
8835         (ia64_extract_return_value): Likewise.
8836         (ia64_store_return_value): Likewise.
8837         (ia64_push_dummy_call): Likewise.
8838
8839 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8840
8841         GDB 8.0 released.
8842
8843 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8844
8845         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8846
8847 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8848
8849         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8850         parameter.
8851         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8852
8853 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8854
8855         * event-loop.c (poll_timers): Unallocate timer using delete
8856         instead of xfree.
8857
8858 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8859
8860         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8861         (struct breakpoint) <~breakpoint>: New.
8862         (struct watchpoint): Inherit from breakpoint.
8863         <~watchpoint>: New.
8864         <base>: Remove.
8865         (struct tracepoint): Inherit from breakpoint.
8866         <base>: Remove.
8867         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8868         (struct longjmp_breakpoint): Inherit from breakpoint.
8869         <~longjmp_breakpoint>: New.
8870         <base>: Remove.
8871         (new_breakpoint_from_type): Remove casts.
8872         (watchpoint_in_thread_scope): Remove reference to base field.
8873         (watchpoint_del_at_next_stop): Likewise.
8874         (update_watchpoint): Likewise.
8875         (watchpoint_check): Likewise.
8876         (bpstat_check_watchpoint): Likewise.
8877         (set_longjmp_breakpoint): Likewise.
8878         (struct fork_catchpoint): Inherit from breakpoint.
8879         <base>: Remove.
8880         (struct solib_catchpoint): Inherit from breakpoint.
8881         <~solib_catchpoint>: New.
8882         <base>: Remove.
8883         (dtor_catch_solib): Change to ...
8884         (solib_catchpoint::~solib_catchpoint): ... this.
8885         (breakpoint_hit_catch_solib): Remove reference to base field.
8886         (add_solib_catchpoint): Likewise.
8887         (create_fork_vfork_event_catchpoint): Likewise.
8888         (struct exec_catchpoint): Inherit from breakpoint.
8889         <~exec_catchpoint>: New.
8890         <base>: Remove.
8891         (dtor_catch_exec): Change to ...
8892         (exec_catchpoint::~exec_catchpoint): ... this.
8893         (dtor_watchpoint): Change to ...
8894         (watchpoint::~watchpoint): ... this.
8895         (watch_command_1): Remove reference to base field.
8896         (catch_exec_command_1): Likewise.
8897         (base_breakpoint_dtor): Change to ...
8898         (breakpoint::~breakpoint): ... this.
8899         (base_breakpoint_ops): Remove dtor field value.
8900         (longjmp_bkpt_dtor): Change to ...
8901         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8902         (strace_marker_create_breakpoints_sal): Remove reference to base
8903         field.
8904         (delete_breakpoint): Don't manually call breakpoint destructor.
8905         (create_tracepoint_from_upload): Remove reference to base field.
8906         (trace_pass_set_count): Likewise.
8907         (initialize_breakpoint_ops): Don't initialize
8908         momentary_breakpoint_ops, don't set dtors.
8909         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8910         <~ada_catchpoint>: New.
8911         <base>: Remove.
8912         (create_excep_cond_exprs): Remove reference to base field.
8913         (dtor_exception): Change to ...
8914         (ada_catchpoint::~ada_catchpoint): ... this.
8915         (dtor_catch_exception): Remove.
8916         (dtor_catch_exception_unhandled): Remove.
8917         (dtor_catch_assert): Remove.
8918         (create_ada_exception_catchpoint): Remove reference to base
8919         field.
8920         (initialize_ada_catchpoint_ops): Don't set dtors.
8921         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8922         breakpoint.
8923         <~signal_catchpoint>: New.
8924         <base>: Remove.
8925         (signal_catchpoint_dtor): Change to ...
8926         (signal_catchpoint::~signal_catchpoint): ... this.
8927         (create_signal_catchpoint): Remove reference to base field.
8928         (initialize_signal_catchpoint_ops): Don't set dtor.
8929         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8930         from breakpoint.
8931         <~syscall_catchpoint>: New.
8932         <base>: Remove.
8933         (dtor_catch_syscall): Change to ...
8934         (syscall_catchpoint::~syscall_catchpoint): ... this.
8935         (create_syscall_event_catchpoint): Remove reference to base
8936         field.
8937         (initialize_syscall_catchpoint_ops): Don't set dtor.
8938         * break-catch-throw.c (struct exception_catchpoint): Inherit
8939         from breakpoint.
8940         <~exception_catchpoint>: New.
8941         <base>: Remove.
8942         (dtor_exception_catchpoint): Change to ...
8943         (exception_catchpoint::~exception_catchpoint): ... this.
8944         (handle_gnu_v3_exceptions): Remove reference to base field.
8945         (initialize_throw_catchpoint_ops): Don't set dtor.
8946         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8947         field.
8948         * remote.c (remote_get_tracepoint_status): Likewise.
8949         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8950         * tracefile.c (tracefile_fetch_registers): Likewise.
8951         * tracepoint.c (actions_command): Likewise.
8952         (validate_actionline): Likewise.
8953         (tfind_1): Likewise.
8954         (get_traceframe_location): Likewise.
8955         (find_matching_tracepoint_location): Likewise.
8956         (parse_tracepoint_status): Likewise.
8957         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8958
8959 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8960
8961         * breakpoint.c (struct longjmp_breakpoint): New struct.
8962         (is_tracepoint_type): Change return type to bool.
8963         (is_longjmp_type): New function.
8964         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8965         (set_raw_breakpoint_without_location): Use
8966         new_breakpoint_from_type.
8967         (set_raw_breakpoint): Likewise.
8968
8969 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8970
8971         * breakpoint.c (new_breakpoint_from_type): New function.
8972         (create_breakpoint_sal): Use new_breakpoint_from_type and
8973         unique_ptr.
8974         (create_breakpoint): Likewise.
8975
8976 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8977
8978         * memattr.c (mem_info_command): Rename to ...
8979         (info_mem_command): ... this.
8980         (mem_enable_command): Rename to ...
8981         (enable_mem_command): ... this.
8982         (mem_disable_command): Rename to ...
8983         (disable_mem_command): ... this.
8984         (mem_delete_command): Rename to ...
8985         (delete_mem_command): ... this.
8986         (_initialize_mem): Adjust function names.
8987
8988 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8989
8990         * btrace.c (handle_pt_insn_events): New.
8991         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8992         STATUS.  Split into this and ...
8993         (handle_pt_insn_event_flags): ... this.
8994
8995 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8996
8997         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8998         and struct pt_insn.resynced.
8999         * configure: Regenerated.
9000         * config.in: Regenerated.
9001
9002 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9003
9004         * btrace.c (ftrace_find_call_by_number): New function.
9005         (ftrace_new_function): Store objects, not pointers.
9006         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9007         ftrace_new_gap, ftrace_update_function,
9008         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9009         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9010         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9011         btrace_ends_with_single_insn, btrace_call_get): Account for
9012         btrace_thread_info::functions now storing objects.
9013         * btrace.h (struct btrace_thread_info): Add constructor.
9014         (struct btrace_thread_info) <functions>: Make std::vector.
9015         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9016         Initialize with default values.
9017         * record-btrace.c (record_btrace_frame_sniffer): Account for
9018         btrace_thread_info::functions now storing objects.
9019
9020 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9021
9022         * btrace.c: Remove typedef bfun_s.
9023         (ftrace_new_gap): Directly add gaps to the list of gaps.
9024         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9025         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9026         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9027         instead of gdb VEC.
9028
9029 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9030
9031         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9032         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9033         with btrace_thread_info::next_segment and
9034         btrace_thread_info::prev_segment.
9035         * btrace.h: Remove struct btrace_func_link.
9036         (struct btrace_function): Replace pair of function segment pointers
9037         with pair of indices.
9038         * python/py-record-btrace.c (btpy_call_prev_sibling,
9039         btpy_call_next_sibling): Replace references to
9040         btrace_thread_info::segment with btrace_thread_info::next_segment and
9041         btrace_thread_info::prev_segment.
9042         * record-btrace.c (record_btrace_frame_this_id): Use
9043         btrace_find_call_by_number.
9044
9045 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9046
9047         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9048         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9049         btrace_insn_next, btrace_insn_prev): Remove references to
9050         btrace_thread_info::flow.
9051         * btrace.h (struct btrace_function): Remove FLOW.
9052
9053 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9054
9055         * btrace.c (ftrace_find_call_by_number): New function.
9056         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9057         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9058         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9059         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9060         index.
9061         * btrace.h (struct btrace_function): Turn UP into an index.
9062         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9063         as an index.
9064         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9065         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9066         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9067
9068 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9069
9070         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9071         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9072         ftrace_update_function, ftrace_compute_global_level_offset,
9073         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9074         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9075         btrace_insn_end, btrace_is_empty): Remove references to
9076         btrace_thread_info::begin and btrace_thread_info::end.
9077         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9078         (struct btrace_thread_info) <functions>: Adjust comment.
9079         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9080         btrace_thread_info::begin.
9081
9082 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9083
9084         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9085         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9086         ftrace_update_function): Remove arguments that implicitly were always
9087         BTINFO->END.
9088         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9089         Don't pass BTINFO->END.
9090
9091 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9092
9093         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9094         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9095         btrace_find_insn_by_number): Replace function segment pointer with
9096         index.
9097         (btrace_insn_cmp): Simplify.
9098         * btrace.h: (struct btrace_insn_iterator) Rename index to
9099         insn_index.  Replace function segment pointer with index into function
9100         segment vector.
9101         * record-btrace.c (record_btrace_call_history): Replace function
9102         segment pointer use with index.
9103         (record_btrace_frame_sniffer): Retrieve function call segment through
9104         vector.
9105         (record_btrace_set_replay): Remove defunc't safety check.
9106
9107 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9108
9109         * btrace.c (btrace_ends_with_single_insn): New function.
9110         (btrace_call_get, btrace_call_number, btrace_call_begin,
9111         btrace_call_end, btrace_call_next, btrace_call_prev,
9112         btrace_find_call_by_number): Use index into call segment vector
9113         instead of pointer.
9114         (btrace_call_cmp): Simplify.
9115         * btrace.h (struct btrace_call_iterator): Replace function call segment
9116         pointer with index into vector.
9117         * record-btrace.c (record_btrace_call_history): Use index instead of
9118         pointer.
9119
9120 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9121
9122         * btrace.c (btrace_insn_begin, btrace_insn_end,
9123         btrace_find_insn_by_number): Add btinfo to iterator.
9124         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9125
9126 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9127
9128         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9129         and save pointers directly.
9130         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9131         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9132         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9133         changed signature of functions.
9134         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9135         (btrace_fetch): Remove code that adds btrace_function pointers to
9136         vector of btrace_functions.
9137         (btrace_clear): Simplify freeing vector of btrace_functions.
9138
9139 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9140
9141         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9142         Replace VEC_* with std::vector functions.
9143         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9144         (struct btrace_thread_info)<functions>: Change type to std::vector.
9145
9146 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9147
9148         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9149         "Removed targets and native configurations" up.  Merge duplicate
9150         "New commands" sub-sections.  Add "New options" sub-sections.
9151
9152 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9153
9154         * defs.h (copy_integer_to_size): New declaration.
9155         * findvar.c (copy_integer_to_size): New function.
9156         (do_cint_test): New selftest function.
9157         (copy_integer_to_size_test): Likewise.
9158         (_initialize_findvar): Likewise.
9159         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9160         (mips_fbsd_collect_reg): Use raw_collect_integer.
9161         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9162         (mips64_fill_gregset): Use raw_collect_integer
9163         (mips64_fill_fpregset): Use raw_supply_integer.
9164         * regcache.c (regcache::raw_supply_integer): New function.
9165         (regcache::raw_collect_integer): Likewise.
9166         * regcache.h: (regcache::raw_supply_integer): New declaration.
9167         (regcache::raw_collect_integer): Likewise.
9168
9169 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9170
9171         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9172         (COMMON_OBS): Add gdbarch-selftests.o.
9173         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9174         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9175         * gdbarch-selftests.c: New file.
9176         * regcache.h (regcache) <~regcache>: Mark it virtual if
9177         GDB_SELF_TEST.
9178         <raw_write>: Likewise.
9179
9180 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9181
9182         * regcache.c (current_regcache): Change it to
9183         regcache::current_regcache.
9184         (regcache_observer_target_changed): Update.
9185         (regcache_thread_ptid_changed): Make it a regcache static
9186         method.
9187         (regcache_thread_ptid_changed): Update.
9188         (class regcache_access): New.
9189         (current_regcache_test): Update.
9190         (_initialize_regcache): Update.
9191         * regcache.h: Include forward_list.
9192         (regcache): Declare regcache_thread_ptid_changed and declare
9193         registers_changed_ptid as friend.
9194
9195 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9196
9197         * i387-tdep.c (i387_register_to_value): Use register_size
9198         instead of TYPE_LENGTH.
9199         * m68k-tdep.c (m68k_register_to_value): Likewise.
9200
9201 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9202
9203         * i387-tdep.c (i387_convert_register_p): Return false if type
9204         code isn't TYPE_CODE_FLT.
9205
9206 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9207
9208         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9209         length is 4.
9210         (alpha_register_to_value): Remove type length check.
9211         (alpha_value_to_register): Likewise.
9212
9213 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9214
9215         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9216         TYPE_CODE_FLT.
9217
9218 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9219
9220         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9221         TYPE_CODE_FLT or not.
9222
9223 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9224
9225         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9226         * avr-tdep.c (avr_gdbarch_init): Likewise.
9227         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9228         * cris-tdep.c (cris_gdbarch_init): Likewise.
9229         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9230         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9231         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9232         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9233         * mep-tdep.c (mep_gdbarch_init): Likewise.
9234         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9235         * mips-tdep.c (mips_gdbarch_init): Likewise.
9236         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9237         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9238         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9239         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9240         * v850-tdep.c (v850_gdbarch_init): Likewise.
9241
9242 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9243
9244         * selftest-arch.c (tests_with_arch): Call registers_changed
9245         and reinit_frame_cache.
9246         * selftest.c (run_self_tests): Likewise.
9247
9248 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9249
9250         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9251         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9252
9253 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9254
9255         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9256         set_gdbarch_print_insn.
9257
9258 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9259
9260         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9261         set_gdbarch_print_insn.
9262
9263 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9264
9265         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9266         set_gdbarch_print_insn.
9267         * arc-tdep.c (arc_gdbarch_init): Likewise.
9268         * arch-utils.c: include dis-asm.h.
9269         (default_print_insn): New function.
9270         * arch-utils.h (default_print_insn): Declare.
9271         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9272         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9273         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9274         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9275         * frv-tdep.c (frv_gdbarch_init): Likewise.
9276         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9277         * gdbarch.sh (print_insn): Use default_print_insn.
9278         * gdbarch.c: Regenerated.
9279         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9280         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9281         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9282         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9283         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9284         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9285         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9286         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9287         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9288         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9289         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9290         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9291         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9292         * mt-tdep.c (mt_gdbarch_init): Likewise.
9293         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9294         * nios2-tdep.c (nios2_print_insn): Remove.
9295         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9296         * rx-tdep.c (rx_gdbarch_init): Likewise.
9297         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9298         * score-tdep.c (score_print_insn): Remove.
9299         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9300         * sh-tdep.c (sh_gdbarch_init): Likewise.
9301         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9302         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9303         * tic6x-tdep.c (tic6x_print_insn): Remove.
9304         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9305         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9306         * v850-tdep.c (v850_gdbarch_init): Likewise.
9307         * vax-tdep.c (vax_gdbarch_init): Likewise.
9308         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9309         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9310
9311 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9312
9313         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9314         (MIPS_FP0_REGNUM): Remove.
9315         (MIPS_FSR_REGNUM): Remove.
9316         (mips_fbsd_supply_fpregs): Use mips_regnum.
9317         (mips_fbsd_supply_gregs): Likewise.
9318         (mips_fbsd_collect_fpregs): Likewise.
9319         (mips_fbsd_collect_gregs): Likewise.
9320
9321 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9322
9323         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9324         (getpfpregs_supplies): New function.
9325         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9326         getfpregs_supplies.
9327         (mips_fbsd_store_inferior_registers): Likewise.
9328
9329 2017-05-22  Pedro Alves <palves@redhat.com>
9330
9331         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9332         maintainer.
9333
9334 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9335
9336         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9337         (store_register): Likewise.
9338         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9339         (get_decimal_float_return_value): Likewise.
9340         (do_ppc_sysv_return_value): Likewise.
9341         (ppc64_sysv_abi_push_integer): Likewise.
9342         (ppc64_sysv_abi_push_freg): Likewise.
9343         (ppc64_sysv_abi_return_value_base): Likewise.
9344         (ppc64_sysv_abi_return_value): Likewise.
9345         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9346         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9347         * rs6000-nat.c: Likewise.
9348         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9349         (rs6000_value_to_register): Likewise.
9350         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9351
9352 2017-05-21  Tom Tromey  <tom@tromey.com>
9353
9354         PR rust/21466:
9355         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9356         arrays as "[T]", not "[T; ]".
9357
9358 2017-05-19  Tom Tromey  <tom@tromey.com>
9359
9360         PR rust/21484:
9361         * rust-lang.c (exp_descriptor_rust): New function.
9362         (rust_language_defn): Use it.
9363         * p-lang.c (pascal_language_defn): Update.
9364         * opencl-lang.c (opencl_language_defn): Update.
9365         * objc-lang.c (objc_language_defn): Update.
9366         * m2-lang.c (m2_language_defn): Update.
9367         * language.h (struct language_defn)
9368         <la_watch_location_expression>: New member.
9369         * language.c (unknown_language_defn, auto_language_defn)
9370         (local_language_defn): Update.
9371         * go-lang.c (go_language_defn): Update.
9372         * f-lang.c (f_language_defn): Update.
9373         * d-lang.c (d_language_defn): Update.
9374         * c-lang.h (c_watch_location_expression): Declare.
9375         * c-lang.c (c_watch_location_expression): New function.
9376         (c_language_defn, cplus_language_defn, asm_language_defn)
9377         (minimal_language_defn): Use it.
9378         * breakpoint.c (watch_command_1): Call
9379         la_watch_location_expression.
9380         * ada-lang.c (ada_language_defn): Update.
9381
9382 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9383
9384         PR tui/21482
9385         * gdb_curses.h (NOMACROS): Define.
9386         (NCURSES_NOMACROS): Define.
9387
9388 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9389
9390         PR tui/21482
9391         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9392         arg to char *.
9393         * tui/tui-wingeneral.c (box_win): Likewise.
9394         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9395         (tui_show_source_line): Likewise.
9396         (tui_show_exec_info_content): Likewise.
9397
9398 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9399
9400         * sparc-tdep.c (sparc_structure_return_p)
9401         (sparc_arg_on_registers_p): New functions.
9402         (sparc32_store_arguments): Use them.
9403         * sparc64-tdep.c (sparc64_16_byte_align_p)
9404         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9405         Handle TYPE_CODE_ARRAY.
9406
9407 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9408
9409         * cli/cli-decode.c (add_alias_cmd): New function.
9410         * command.h (add_alias_cmd): Declare.
9411         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9412         instead call add_alias_cmd.
9413
9414 2017-05-17  Pedro Alves  <palves@redhat.com>
9415
9416         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9417         (nat_makefile_frag): ... this.  All references updated.
9418         * configure.ac: Likewise.
9419         * configure.nat: Likewise.  Enhance comments.
9420         * configure: Regenerate.
9421
9422 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9423
9424         * procfs.c (procfs_create_inferior): Change prototype to match
9425         definition.
9426
9427 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9428
9429         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9430         C++ compiler warning.
9431
9432 2017-05-12  Tom Tromey  <tom@tromey.com>
9433
9434         PR rust/21483:
9435         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9436         recurse, just call value_struct_elt directly.
9437
9438 2017-05-12  Tom Tromey  <tom@tromey.com>
9439
9440         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9441         OP_RUST_ARRAY>: Fix.
9442
9443 2017-05-12  Tom Tromey  <tom@tromey.com>
9444
9445         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9446
9447 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9448
9449         * regcache.c: Include <forward_list>.
9450         (struct regcache_list): Remove.
9451         (current_regcache): Update.
9452         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9453         (regcache_thread_ptid_changed): Likewise.
9454         (registers_changed_ptid): Likewise.
9455         (current_regcache_size): Likewise.
9456
9457 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9458
9459         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9460         (current_regcache_size): New function.
9461         (current_regcache_test): New function.
9462         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9463
9464 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9465
9466         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9467         (print_gp_register_row): Use get_frame_register_value.
9468
9469 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9470
9471         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9472         (mips_supply_fpregset): Likewise.
9473         (mips64_supply_gregset): Likewise.
9474
9475 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9476
9477         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9478         regcache->raw_supply_zeroed.
9479
9480 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9481
9482         * configure.nat: Rearrange 'case' statements to match
9483         host before cpu.
9484
9485 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9486
9487         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9488         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9489         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9490         "@nat_extra_makefile_frag@".
9491         (Makefile): Remove dependency on "@frags@".
9492         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9493         (data-directory/Makefile): Likewise.
9494         * config/aarch64/linux.mh: Deleted; moved contents to
9495         "gdb/configure.nat".
9496         * config/alpha/alpha-linux.mh: Likewise.
9497         * config/alpha/nbsd.mh: Likewise.
9498         * config/arm/linux.mh: Likewise.
9499         * config/arm/nbsdelf.mh: Likewise.
9500         * config/i386/cygwin.mh: Likewise.
9501         * config/i386/cygwin64.mh: Likewise.
9502         * config/i386/darwin.mh: Likewise.
9503         * config/i386/fbsd.mh: Likewise.
9504         * config/i386/fbsd64.mh: Likewise.
9505         * config/i386/go32.mh: Likewise.
9506         * config/i386/i386gnu.mh: Likewise.
9507         * config/i386/i386sol2.mh: Likewise.
9508         * config/i386/linux.mh: Likewise.
9509         * config/i386/linux64.mh: Likewise.
9510         * config/i386/mingw.mh: Likewise.
9511         * config/i386/mingw64.mh: Likewise.
9512         * config/i386/nbsd64.mh: Likewise.
9513         * config/i386/nbsdelf.mh: Likewise.
9514         * config/i386/nto.mh: Likewise.
9515         * config/i386/obsd.mh: Likewise.
9516         * config/i386/obsd64.mh: Likewise.
9517         * config/i386/sol2-64.mh: Likewise.
9518         * config/ia64/linux.mh: Likewise.
9519         * config/m32r/linux.mh: Likewise.
9520         * config/m68k/linux.mh: Likewise.
9521         * config/m68k/nbsdelf.mh: Likewise.
9522         * config/m68k/obsd.mh: Likewise.
9523         * config/m88k/obsd.mh: Likewise.
9524         * config/mips/fbsd.mh: Likewise.
9525         * config/mips/linux.mh: Likewise.
9526         * config/mips/nbsd.mh: Likewise.
9527         * config/mips/obsd64.mh: Likewise.
9528         * config/pa/linux.mh: Likewise.
9529         * config/pa/nbsd.mh: Likewise.
9530         * config/pa/obsd.mh: Likewise.
9531         * config/powerpc/aix.mh: Likewise.
9532         * config/powerpc/fbsd.mh: Likewise.
9533         * config/powerpc/linux.mh: Likewise.
9534         * config/powerpc/nbsd.mh: Likewise.
9535         * config/powerpc/obsd.mh: Likewise.
9536         * config/powerpc/ppc64-linux.mh: Likewise.
9537         * config/powerpc/spu-linux.mh: Likewise.
9538         * config/s390/linux.mh: Likewise.
9539         * config/sh/nbsd.mh: Likewise.
9540         * config/sparc/fbsd.mh: Likewise.
9541         * config/sparc/linux.mh: Likewise.
9542         * config/sparc/linux64.mh: Likewise.
9543         * config/sparc/nbsd64.mh: Likewise.
9544         * config/sparc/nbsdelf.mh: Likewise.
9545         * config/sparc/obsd64.mh: Likewise.
9546         * config/sparc/sol2.mh: Likewise.
9547         * config/tilegx/linux.mh: Likewise.
9548         * config/vax/nbsdelf.mh: Likewise.
9549         * config/vax/obsd.mh: Likewise.
9550         * config/xtensa/linux.mh: Likewise.
9551         * config/i386/i386gnu.mn: New file, with excerpts from
9552         "config/i386/i386gnu.mh".
9553         * configure: Regenerate.
9554         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9555         *.mh files under "gdb/config".
9556         * configure.nat: New file, with contents from the
9557         "gdb/config/*/*.mh" files.
9558
9559 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9560
9561         * btrace.c (btrace_clear): Free insn vector.
9562
9563 2017-05-05  Pedro Alves  <palves@redhat.com>
9564
9565         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9566         * configure: Regenerate.
9567
9568 2017-05-04  Pedro Alves  <palves@redhat.com>
9569
9570         * Makefile.in (SFILES): Add progspace-and-thread.c.
9571         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9572         (COMMON_OBS): Add progspace-and-thread.o.
9573         * breakpoint.c: Include "progspace-and-thread.h".
9574         (update_inserted_breakpoint_locations)
9575         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9576         Use scoped_restore_current_pspace_and_thread.
9577         (create_std_terminate_master_breakpoint): Use
9578         scoped_restore_current_program_space.
9579         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9580         (print_breakpoint_location): Use
9581         scoped_restore_current_program_space.
9582         (bp_loc_is_permanent): Use
9583         scoped_restore_current_pspace_and_thread.
9584         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9585         (download_tracepoint_locations): Use
9586         scoped_restore_current_pspace_and_thread.
9587         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9588         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9589         (enum step_over_calls_kind): Moved from inferior.h.
9590         (class scoped_restore_current_thread): New class.
9591         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9592         declaration.
9593         (scoped_restore_current_thread): New class.
9594         * infcmd.c: Include "common/gdb_optional.h".
9595         (continue_1, proceed_after_attach): Use
9596         scoped_restore_current_thread.
9597         (notice_new_inferior): Use scoped_restore_current_thread.
9598         * inferior.c: Include "progspace-and-thread.h".
9599         (restore_inferior, save_current_inferior): Delete.
9600         (add_inferior_command, clone_inferior_command): Use
9601         scoped_restore_current_pspace_and_thread.
9602         * inferior.h (scoped_restore_current_inferior): New class.
9603         * infrun.c: Include "progspace-and-thread.h" and
9604         "common/gdb_optional.h".
9605         (follow_fork_inferior): Use
9606         scoped_restore_current_pspace_and_thread.
9607         (scoped_restore_exited_inferior): New class.
9608         (handle_vfork_child_exec_or_exit): Use
9609         scoped_restore_exited_inferior,
9610         scoped_restore_current_pspace_and_thread,
9611         scoped_restore_current_thread and scoped_restore.
9612         (fetch_inferior_event): Use scoped_restore_current_thread.
9613         * linespec.c (decode_line_full, decode_line_1): Use
9614         scoped_restore_current_program_space.
9615         * mi/mi-main.c: Include "progspace-and-thread.h".
9616         (exec_continue): Use scoped_restore_current_thread.
9617         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9618         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9619         * proc-service.c (ps_pglobal_lookup): Use
9620         scoped_restore_current_program_space.
9621         * progspace-and-thread.c: New file.
9622         * progspace-and-thread.h: New file.
9623         * progspace.c (release_program_space, clone_program_space): Use
9624         scoped_restore_current_program_space.
9625         (restore_program_space, save_current_program_space)
9626         (save_current_space_and_thread): Delete.
9627         (switch_to_program_space_and_thread): Moved to
9628         progspace-and-thread.c.
9629         * progspace.h (save_current_program_space)
9630         (save_current_space_and_thread): Delete declarations.
9631         (scoped_restore_current_program_space): New class.
9632         * remote.c (remote_btrace_maybe_reopen): Use
9633         scoped_restore_current_thread.
9634         * symtab.c: Include "progspace-and-thread.h".
9635         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9636         * thread.c (print_thread_info_1): Use
9637         scoped_restore_current_thread.
9638         (struct current_thread_cleanup): Delete.
9639         (do_restore_current_thread_cleanup)
9640         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9641         (scoped_restore_current_thread::~scoped_restore_current_thread):
9642         ... this new dtor.
9643         (make_cleanup_restore_current_thread): Rename/convert to ...
9644         (scoped_restore_current_thread::scoped_restore_current_thread):
9645         ... this new ctor.
9646         (thread_apply_all_command): Use scoped_restore_current_thread.
9647         (thread_apply_command): Use scoped_restore_current_thread.
9648         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9649         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9650
9651 2017-05-04  Pedro Alves  <palves@redhat.com>
9652
9653         * thread.c (make_cleanup_restore_current_thread): Move
9654         find_thread_ptid call before the is_stopped call.  Assert that the
9655         thread is found.  Replace is_stopped call by checking the thread's
9656         state directly.  Remove unnecessary NULL-thread check.
9657
9658 2017-05-04  Pedro Alves  <palves@redhat.com>
9659
9660         * corelow.c (thread_section_name): New class.
9661         (get_core_register_section, get_core_siginfo): Use it.
9662
9663 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9664
9665         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9666         (get_core_register_section): Remove xfree of NULL pointer.
9667
9668 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9669
9670         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9671         * regcache.c (regcache::raw_supply_zeroed): New function.
9672         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9673
9674 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9675
9676         * gdbarch.sh: Remove commented out definition of
9677         TARGET_CHAR_BIT.
9678         * gdbarch.h: Re-generate.
9679
9680 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9681
9682         * configure: Regenerate.
9683
9684 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9685
9686         * solib-target.c (solib_target_relocate_section_addresses):
9687         Remove num_section_bases, num_bases, segment_bases variables.
9688
9689 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9690
9691         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9692
9693 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9694
9695         * solib-target.c: Include <vector>
9696         (struct lm_info_target) <~lm_info_target>: Remove.
9697         <segment_bases, section_bases>: Change type to
9698         std::vector<CORE_ADDR>.
9699         (library_list_start_segment, library_list_start_section,
9700         library_list_end_library,
9701         solib_target_relocate_section_addresses): Adjust.
9702
9703 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9704
9705         * gdbarch.sh (software_single_step): Change return type to
9706         std::vector<CORE_ADDR>.
9707         * gdbarch.c, gdbarch.h: Re-generate.
9708         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9709         Adjust.
9710         (arm_deal_with_atomic_sequence_raw): Adjust.
9711         (thumb_get_next_pcs_raw): Adjust.
9712         (arm_get_next_pcs_raw): Adjust.
9713         (arm_get_next_pcs): Adjust.
9714         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9715         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9716         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9717         (alpha_software_single_step): Adjust.
9718         * alpha-tdep.h (alpha_software_single_step): Adjust.
9719         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9720         * arm-tdep.c (arm_software_single_step): Adjust.
9721         (arm_breakpoint_kind_from_current_state): Adjust.
9722         * arm-tdep.h (arm_software_single_step): Adjust.
9723         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9724         * cris-tdep.c (cris_software_single_step): Adjust.
9725         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9726         (micromips_deal_with_atomic_sequence): Adjust.
9727         (deal_with_atomic_sequence): Adjust.
9728         (mips_software_single_step): Adjust.
9729         * mips-tdep.h (mips_software_single_step): Adjust.
9730         * moxie-tdep.c (moxie_software_single_step): Adjust.
9731         * nios2-tdep.c (nios2_software_single_step): Adjust.
9732         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9733         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9734         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9735         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9736         * sparc-tdep.c (sparc_software_single_step): Adjust.
9737         * spu-tdep.c (spu_software_single_step): Adjust.
9738         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9739
9740 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9741
9742         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9743         * gdbarch.h: Re-generate.
9744
9745 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9746
9747         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9748         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9749         * python/py-instruction.c, python/py-instruction.h: New file.
9750         * python/py-record.c: Add py-instruction.h include.
9751         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9752         gdb.RecordInstruction.
9753         * python/python-internal.h: Add gdbpy_initialize_instruction
9754         declaration.
9755         * python/python.c (do_start_initialization): Add
9756         gdbpy_initialize_instruction.
9757
9758 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9759
9760         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9761         Remove.
9762         (btrace_func_from_recpy_func): New function.
9763         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9764         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9765         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9766         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9767         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9768         Also, use new helper functions.
9769         (btpy_list_item): Use new helper functions.
9770         (recpy_bt_function_call_history): Use new type name.
9771         (btpy_call_getset): Remove.
9772         (gdbpy_initialize_btrace): Remove code to initialize
9773         gdb.BtraceFunctionCall.
9774         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9775         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9776         recpy_bt_func_prev, recpy_bt_func_next): New export.
9777         * python/py-record.c (recpy_func_type): New static object.
9778         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9779         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9780         recpy_func_next): New function.
9781         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9782         (recpy_func_getset): New static object.
9783         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9784         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9785
9786 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9787
9788         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9789         (btpy_object, btpy_insn_type, btpy_new): Remove.
9790         (btpy_list_object): Use gdb.RecordInstruction type instead of
9791         gdb.BtraceInstruction type.
9792         (btrace_insn_from_recpy_insn): New function.
9793         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9794         btpy_new.
9795         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9796         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9797         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9798         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9799         instead of btpy_object.
9800         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9801         btpy_insn_data, btpy_insn_decode): Rename to ...
9802         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9803         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9804         recpy_bt_insn_decode): This.  Also, use new helper functions.
9805         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9806         recpy_insn_type.
9807         (btpy_insn_getset): Remove.
9808         (gdbpy_initialize_btrace): Remove code to initialize
9809         gdb.BtraceInstruction.  Use recpy_element_object.
9810         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9811         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9812         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9813         * python/py-record.c (recpy_insn_type): New static object.
9814         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9815         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9816         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9817         New function.
9818         (recpy_insn_getset): New static object.
9819         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9820         * python/py-record.h (recpy_element_object): New typedef.
9821         (recpy_insn_type, recpy_insn_new): New export.
9822
9823 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9824
9825         * py-record-btrace.c (btpy_insn_new): Removed.
9826         (btpy_insn_or_gap_new): New function.
9827         (btpy_insn_error): Removed.
9828         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9829         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9830         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9831         btpy_insn_or_gap_new instead of btpy_insn_new.
9832         (btpy_insn_getset): Remove btpy_insn_error.
9833         * py-record.c (recpy_gap_type): New static object.
9834         (recpy_gap_object): New typedef.
9835         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9836         recpy_gap_reason_string): New function.
9837         (recpy_gap_getset): New static object.
9838         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9839         * py-record.h (recpy_gap_new): New export.
9840
9841 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9842
9843         * python/py-record.c (recpy_ptid): Remove.
9844         (recpy_record_getset): Remove recpy_ptid.
9845
9846 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9847
9848         * btrace.c (btrace_fetch): Set inferior_ptid.
9849         * python/py-record-btrace.c: Add "py-record.h" include.
9850         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9851         recpy_bt_end, recpy_bt_instruction_history,
9852         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9853         in gdb.Record object instead of current ptid.
9854         * python/py-record.c: Include new "py-record.h" file.
9855         (recpy_record_object): Moved to py-record.h.
9856         * python/py-record.h: New file.
9857
9858 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9859
9860         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9861         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9862         indentation.
9863
9864 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9865
9866         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9867         the past maintainers section.
9868
9869 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9870
9871         * infcmd.c (get_return_value): Use regcache ctor, and remove
9872         cleanup.
9873
9874 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9875             Pedro Alves  <palves@redhat.com>
9876
9877         * regcache.c (regcache::regcache): New tag dispatch ctor.
9878         (do_cooked_read): Moved above.
9879         (regcache_dup): Use the tag dispatch ctor..
9880         * regcache.h (regcache): Declare ctor, delete copy ctor and
9881         assignment operator, remove friend regcache_dup.
9882
9883 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9884
9885         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9886         call method save instead of regcache_cpy.
9887         * regcache.h (struct regcache): Make regcache_dup a friend.
9888
9889 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9890
9891         * regcache.c (struct regcache): Move to regcache.h
9892         (regcache::arch): New method.
9893         (regcache_get_ptid): Update.
9894         (get_regcache_arch): Call arch method.
9895         (get_regcache_aspace): Call method aspace.
9896         (register_buffer): Change it to method.
9897         (regcache_save): Change it to regcache::save.
9898         (regcache_restore): Likewise.
9899         (regcache_cpy_no_passthrough): Remove the declaration.
9900         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9901         (regcache_cpy_no_passthrough): Change it to method
9902         cpy_no_passthrough.
9903         (regcache_register_status): Change it to method
9904         get_register_status.
9905         (regcache_invalidate): Change it to method invalidate.
9906         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9907         (regcache_raw_update): Change it to method raw_update.
9908         (regcache_raw_read): Likewise.
9909         (regcache_raw_read_signed): Likewise.
9910         (regcache_raw_read_unsigned): Likewise.
9911         (regcache_raw_write_signed): Likewise.
9912         (regcache_raw_write_unsigned): Likewise.
9913         (regcache_cooked_read): Likewise.
9914         (regcache_cooked_read_value): Likewise.
9915         (regcache_cooked_read_signed): Likewise.
9916         (regcache_cooked_read_unsigned): Likewise.
9917         (regcache_cooked_write_signed): Likewise.
9918         (regcache_cooked_write_unsigned): Likewise.
9919         (regcache_raw_set_cached_value): Likewise.
9920         (regcache_raw_write): Likewise.
9921         (regcache_cooked_write): Likewise.
9922         (regcache_xfer_part): Likewise.
9923         (regcache_raw_read_part): Likewise.
9924         (regcache_raw_write_part): Likewise.
9925         (regcache_cooked_read_part): Likewise.
9926         (regcache_cooked_write_part): Likewise.
9927         (regcache_raw_supply): Likewise.
9928         (regcache_raw_collect): Likewise.
9929         (regcache_transfer_regset): Likewise.
9930         (regcache_supply_regset): Likewise.
9931         (regcache_collect_regset): Likewise.
9932         (regcache_debug_print_register): Likewise.
9933         (enum regcache_dump_what): Move it to regcache.h.
9934         (regcache_dump): Change it to method dump.
9935         * regcache.h (enum regcache_dump_what): New.
9936         (class regcache): New.
9937         * target.c (target_fetch_registers): Call method
9938         debug_print_register.
9939         (target_store_registers): Likewise.
9940
9941 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9942
9943         * windows-nat.c (struct lm_info_windows): Initialize field.
9944         (windows_make_so): Allocate lm_info_windows with new.
9945         (windows_free_so): Free lm_info_windows with delete.
9946
9947 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9948
9949         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9950         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9951         cleanup.
9952         (darwin_free_so): Free lm_info_darwin with delete.
9953
9954 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9955
9956         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9957         <l_addr_p>: Change type to bool.
9958         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9959         (svr4_free_so): Free lm_info_svr4 with delete.
9960         (svr4_copy_library_list): Replace memcpy with call to copy
9961         constructor.
9962         (library_list_start_library, svr4_default_sos): Allocate
9963         lm_info_svr4 with new.
9964
9965 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9966
9967         * solib-target.c (struct lm_info_target): Add destructor,
9968         initialize fields.
9969         <name>: Change type to std::string.
9970         (library_list_start_library): Allocate lm_info_target with new.
9971         (solib_target_free_library_list): Free lm_info_target with
9972         delete.
9973         (solib_target_current_sos): Adapt to std::string.
9974         (solib_target_free_so): Free lm_info_target with delete.
9975
9976 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9977
9978         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9979         fields.
9980         (frv_current_sos): Allocate lm_info_frv with new.
9981         (frv_relocate_main_executable): Free lm_info_frv with delete,
9982         allocate with new.
9983         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9984
9985 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9986
9987         * solib-frv.c (struct lm_info_frv): Fix indentation.
9988
9989 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9990
9991         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9992         map field.
9993         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9994         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9995         and allocate with new.
9996         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9997
9998 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9999
10000         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10001         <filename, member_name>: Change type to std::string.
10002         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10003         (library_list_start_library): Allocate lm_info_aix with new.
10004         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10005         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10006         with copy constructor.
10007
10008 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10009
10010         * solist.h (struct lm_info): Remove.
10011         (struct lm_info_base): New class.
10012         (struct so_list) <lm_info>: Change type to lm_info_base *.
10013         * nto-tdep.c (struct lm_info): Remove.
10014         (lm_addr): Adjust.
10015         * solib-aix.c (struct lm_info): Rename to ...
10016         (struct lm_info_aix): ... this.  Extend lm_info_base.
10017         (lm_info_p): Rename to ...
10018         (lm_info_aix_p): ... this, and adjust.
10019         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10020         solib_aix_parse_libraries, library_list_start_library,
10021         solib_aix_free_library_list, solib_aix_parse_libraries,
10022         solib_aix_get_library_list,
10023         solib_aix_relocate_section_addresses, solib_aix_free_so,
10024         solib_aix_get_section_offsets,
10025         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10026         Adjust.
10027         (struct solib_aix_inferior_data) <library_list>: Adjust.
10028         * solib-darwin.c (struct lm_info): Rename to ...
10029         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10030         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10031         * solib-dsbt.c (struct lm_info): Rename to ...
10032         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10033         (struct dsbt_info) <main_executable_lm_info): Adjust.
10034         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10035         dsbt_relocate_section_addresses): Adjust.
10036         * solib-frv.c (struct lm_info): Rename to ...
10037         (struct lm_info_frv): ... this.  Extend lm_info_base.
10038         (main_executable_lm_info): Adjust.
10039         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10040         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10041         find_canonical_descriptor_in_load_object,
10042         frv_fdpic_find_canonical_descriptor): Adjust.
10043         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10044         to lm_info_svr4.
10045         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10046         svr4_clear_so, svr4_copy_library_list,
10047         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10048         svr4_current_sos, svr4_fetch_objfile_link_map,
10049         solist_update_incremental): Adjust.
10050         * solib-svr4.h (struct lm_info_svr4): Move here from
10051         solib-svr4.c.
10052         * solib-target.c (struct lm_info): Rename to ...
10053         (struct lm_info_target): ... this.  Extend lm_info_base.
10054         (lm_info_p): Rename to ...
10055         (lm_info_target_p): ... this.
10056         (solib_target_parse_libraries, library_list_start_segment,
10057         library_list_start_section, library_list_start_library,
10058         library_list_end_library, solib_target_free_library_list,
10059         solib_target_current_sos, solib_target_free_so,
10060         solib_target_relocate_section_addresses): Adjust.
10061         * windows-nat.c (struct lm_info): Rename to ...
10062         (struct lm_info_windows): ... this.  Extend lm_info_base.
10063         (windows_make_so, handle_load_dll, handle_unload_dll,
10064         windows_xfer_shared_libraries): Adjust.
10065
10066 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10067
10068         * solib-darwin.c (struct darwin_so_list): Remove.
10069         (darwin_current_sos): Allocate an so_list object instead of a
10070         darwin_so_list, separately allocate an lm_info object.
10071         (darwin_free_so): Free lm_info.
10072
10073 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10074
10075         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10076         with fprintf_filtered.
10077
10078 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10079
10080         * regcache.c (regcache::regcache): New function.
10081         (regcache::~regcache): New function.
10082         (regcache_xmalloc_1): Remove.
10083         (regcache_xmalloc): Call new regcache.
10084         (regcache_xfree): Call delete regcache.
10085         (get_thread_arch_aspace_regcache): Call new regcache.
10086
10087 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10088
10089         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10090         lwp instead of ptid_get_lwp.
10091
10092 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10093
10094         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10095         lwp_info instead of getting from inferior_ptid.
10096
10097 2017-04-27  Keith Seitz  <keiths@redhat.com>
10098
10099         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10100         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10101         (CV_CONVERSION_BADNESS): Define.
10102         (rank_one_type): Remove overly restrictive rvalue reference
10103         rank checks.
10104         Add cv-qualifier checks and subranks for type equality.
10105         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10106         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10107         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10108
10109 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10110
10111         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10112         count when creating the object.
10113
10114 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10115             Ulrich Weigand  <uweigand@de.ibm.com>
10116
10117         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10118         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10119         is used in AIX.
10120         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10121         (process_xcoff_symbol): Likewise.
10122         (scan_xcoff_symtab): Likewise.
10123
10124 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10125
10126         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10127         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10128         (ia64_access_reg): Use get_frame_register_unsigned.
10129         (ia64_access_rse_reg): Likewise.
10130         (ia64_libunwind_frame_prev_register): Likewise.
10131
10132 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10133
10134         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10135         * gdbarch.c: Regenerated.
10136         * gdbarch.h: Regenerated.
10137         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10138         visibility external.
10139         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10140         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10141         (enum cfa_how_kind): Move to ...
10142         (struct dwarf2_frame_state_reg_info): Likewise.
10143         (struct dwarf2_frame_state): Likewise.
10144         * dwarf2-frame.h: ... here.
10145         (dwarf2_frame_state_alloc_regs): New declaration.
10146         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10147         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10148
10149 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10150
10151         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10152         regcache_raw_read_unsigned.
10153         (xtensa_pseudo_register_write): Likewise.
10154
10155 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10156
10157         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10158         (nds32_pseudo_register_write): Likewise.
10159
10160 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10161
10162         * regcache.c (struct regcache) <readonly_p>: Change its type
10163         to bool.
10164         (regcache_xmalloc_1): Update parameter type and callers update.
10165
10166 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10167
10168         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10169         set_gdbarch_wchar_bit.
10170         * arm-tdep.c (arm_gdbarch_init): Likewise.
10171
10172 2017-04-25  Pedro Alves  <palves@redhat.com>
10173
10174         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10175         (BothAreRelocatable, memcopy, memmove): Don't define.
10176         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10177         macros.
10178
10179 2017-04-25  Pedro Alves  <palves@redhat.com>
10180
10181         * common/common-defs.h: Include "common/poison.h".
10182         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10183         and adjust.
10184         * common/poison.h: New file.
10185         * common/traits.h: Include <type_traits>.
10186         (Not, Or, Requires): New, moved from common/function-view.h.
10187
10188 2017-04-25  Pedro Alves  <palves@redhat.com>
10189
10190         * breakpoint.h (struct breakpoint): In-class initialize all
10191         fields.  Make boolean fields "bool".
10192         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10193         memset call and initializations no longer necessary.
10194
10195 2017-04-25  Pedro Alves  <palves@redhat.com>
10196
10197         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10198         reference.
10199         (pt_btrace_insn): New function.
10200         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10201
10202 2017-04-25  Pedro Alves  <palves@redhat.com>
10203
10204         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10205         "base" field and inherit from "bp_location" instead.  Add
10206         non-default ctor.
10207         (allocate_location_exception): Use new non-default ctor.
10208         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10209         (init_bp_location): Convert to ...
10210         (bp_location::bp_location): ... this new ctor, and remove memset
10211         call.
10212         (base_breakpoint_allocate_location): Use the new non-default ctor.
10213         * breakpoint.h (bp_location): Now a class.  Declare default and
10214         non-default ctors.  In-class initialize all members.
10215         (init_bp_location): Remove declaration.
10216
10217 2017-04-25  Pedro Alves  <palves@redhat.com>
10218
10219         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10220         assignment operator.
10221
10222 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10223
10224         * doublest.c (convert_doublest_to_floatformat): Call
10225         floatformat_totalsize_bytes.
10226
10227 2017-04-22  Tom Tromey  <tom@tromey.com>
10228
10229         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10230         ui_out_emit_list.
10231         * stack.c (print_frame): Use ui_out_emit_list.
10232         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10233         ui_out_emit_list.
10234         * mi/mi-main.c (print_one_inferior)
10235         (mi_cmd_data_list_register_names)
10236         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10237         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10238         ui_out_emit_list.
10239         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10240         (mi_output_solib_attribs): Use ui_out_emit_list,
10241         ui_out_emit_tuple.
10242         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10243         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10244         (mi_cmd_stack_list_args, list_args_or_locals): Use
10245         ui_out_emit_list.
10246         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10247         * breakpoint.c (print_solib_event, output_thread_groups): Use
10248         ui_out_emit_list.
10249
10250 2017-04-22  Tom Tromey  <tom@tromey.com>
10251
10252         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10253         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10254         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10255
10256 2017-04-22  Tom Tromey  <tom@tromey.com>
10257
10258         * tracepoint.c (tvariables_info_1)
10259         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10260
10261 2017-04-22  Tom Tromey  <tom@tromey.com>
10262
10263         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10264         annotate_arg_emitter.
10265         * breakpoint.c (print_mention_watchpoint)
10266         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10267         * annotate.h (struct annotate_arg_emitter): New.
10268
10269 2017-04-22  Tom Tromey  <tom@tromey.com>
10270
10271         * record-btrace.c (record_btrace_insn_history)
10272         (record_btrace_insn_history_range, record_btrace_call_history)
10273         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10274         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10275         ui_out_emit_tuple.
10276         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10277         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10278         * skip.c (skip_info): Use ui_out_emit_tuple.
10279         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10280         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10281         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10282         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10283         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10284         ui_out_emit_tuple.
10285         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10286         (output_register, mi_cmd_data_read_memory)
10287         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10288         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10289         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10290         Use ui_out_emit_tuple.
10291         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10292         ui_out_emit_tuple.
10293         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10294         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10295         * linux-thread-db.c (info_auto_load_libthread_db): Use
10296         ui_out_emit_tuple.
10297         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10298         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10299         * disasm.c (do_mixed_source_and_assembly_deprecated)
10300         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10301         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10302         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10303         * breakpoint.c (print_one_breakpoint_location)
10304         (print_one_breakpoint): Use ui_out_emit_tuple.
10305         * auto-load.c (print_script, info_auto_load_cmd): Use
10306         ui_out_emit_tuple.
10307         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10308
10309 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10310
10311         * thread.c (print_thread_info_1): Remove dead code.
10312
10313 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10314
10315         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10316         GDB_SELF_TEST.
10317         * arm-tdep.c (selftests::arm_record_test): Likewise.
10318
10319 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10320
10321         * regcache.c (regcache_restore): Remove argument 2.  Replace
10322         argument 3 with regcache.  Get register status from
10323         src->register_status and get register contents from
10324         register_buffer (src, regnum).
10325         (regcache_cpy): Update.
10326
10327 2017-04-19  Pedro Alves  <palves@redhat.com>
10328
10329         * gdbthread.h (thread): Add missing closing parenthesis in
10330         comment.
10331
10332 2017-04-19  Pedro Alves  <palves@redhat.com>
10333
10334         * common/refcounted-object.h: New file.
10335         * gdbthread.h: Include "common/refcounted-object.h".
10336         (thread_info): Inherit from refcounted_object and add comments.
10337         (thread_info::incref, thread_info::decref)
10338         (thread_info::m_refcount): Delete.
10339         (thread_info::deletable): Use the refcounted_object::refcount()
10340         method.
10341         * inferior.c (current_inferior_): Add comment.
10342         (set_current_inferior): Increment/decrement refcounts.
10343         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10344         not-deletable instead of comparing with the current inferior.
10345         (initialize_inferiors): Increment the initial inferior's refcount.
10346         * inferior.h (struct inferior): Forward declare.
10347         Include "common/refcounted-object.h".
10348         (current_inferior, set_current_inferior): Move declaration to
10349         before struct inferior's definition, and fix comment.
10350         (inferior): Inherit from refcounted_object.  Add comments.
10351         * thread.c (switch_to_thread_no_regs): Reference the thread's
10352         inferior pointer directly instead of doing a ptid lookup.
10353         (switch_to_no_thread): New function.
10354         (switch_to_thread(thread_info *)): New function, factored out
10355         from ...
10356         (switch_to_thread(ptid_t)): ... this.
10357         (restore_current_thread): Delete.
10358         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10359         fields, and add 'inf' field.
10360         (do_restore_current_thread_cleanup): Check whether old->inf is
10361         alive instead of looking up an inferior by ptid.  Use
10362         switch_to_thread and switch_to_no_thread.
10363         (restore_current_thread_cleanup_dtor): Use old->inf directly
10364         instead of lookup up an inferior by id.  Decref the inferior.
10365         Don't restore 'removable'.
10366         (make_cleanup_restore_current_thread): Same the inferior pointer
10367         in old, instead of the inferior number.  Incref the inferior.
10368         Don't save/clear 'removable'.
10369
10370 2017-04-19  Pedro Alves  <palves@redhat.com>
10371
10372         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10373         unittests/scoped_restore-selftests.c.
10374         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10375         * common/scoped_restore.h (scoped_restore_base): Make "class".
10376         (scoped_restore_base::release): New public method.
10377         (scoped_restore_base::scoped_restore_base): New protected ctor.
10378         (scoped_restore_base::m_saved_var): New protected field.
10379         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10380         scoped_restore_base base class instead of m_saved_var directly.
10381         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10382         (scoped_restore_tmpl::scoped_restore_tmpl(const
10383         scoped_restore_tmpl<T>&)): Likewise.
10384         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10385         method.
10386         (scoped_restore_tmpl::saved_var): New method.
10387         (scoped_restore_tmpl::m_saved_var): Delete.
10388         * inferior.h (inferior::detaching): Now a bool.
10389         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10390         cleanup.
10391         * unittests/scoped_restore-selftests.c: New file.
10392
10393 2017-04-19  Pedro Alves  <palves@redhat.com>
10394
10395         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10396         Re-sort in alphabetic order.
10397
10398 2017-04-18  Pedro Alves  <palves@redhat.com>
10399
10400         * xml-support.c (obstack_xml_printf): Delete.
10401         * xml-support.h (obstack_xml_printf): Delete.
10402
10403 2017-04-18  Pedro Alves  <palves@redhat.com>
10404
10405         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10406         vdebug, verror, body_text, start_element, end_element, name,
10407         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10408         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10409         is_xinclude>: Make private and add m_ prefix.
10410         (gdb_xml_parser::body_text): New method, based on ...
10411         (gdb_xml_body_text): ... this.  Adjust.
10412         (gdb_xml_parser::vdebug): New method, based on ...
10413         (gdb_xml_debug): ... this.  Adjust.
10414         (gdb_xml_parser::verror): New method, based on ...
10415         (gdb_xml_error): ... this.  Adjust.
10416         (gdb_xml_parser::start_element): New method, based on ...
10417         (gdb_xml_start_element): ... this.  Adjust.
10418         (gdb_xml_start_element_wrapper): Defer to
10419         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10420         (gdb_xml_parser::end_element): New method, based on ...
10421         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10422         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10423         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10424         (gdb_xml_parser::use_dtd): New method, based on ...
10425         (gdb_xml_use_dtd): ... this.  Adjust.
10426         (gdb_xml_parser::parse): New method, based on ...
10427         (gdb_xml_parse): ... this.  Adjust.
10428         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10429         (xinclude_start_include): Adjust to call the parser's name method.
10430         (xml_xinclude_default, xml_xinclude_start_doctype)
10431         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10432         method.
10433         (xml_process_xincludes): Adjust to call parser methods.
10434         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10435         declarations.
10436
10437 2017-04-18  Pedro Alves  <palves@redhat.com>
10438
10439         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10440         gdb::optional<std::string>.
10441         * xml-support.c: Include <string>.
10442         (scope_level::scope_level(scope_level &&))
10443         (scope_level::~scope_level): Delete.
10444         (scope_level::body): Now a std::string.
10445         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10446         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10447         parameter.
10448         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10449         (xinclude_parsing_data::output): Now a std::string reference.
10450         (xinclude_start_include): Adjust.
10451         (xml_xinclude_default): Adjust.
10452         (xml_process_xincludes): Add 'output' parameter, and return bool.
10453         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10454         and return bool.
10455         * xml-tdesc.c: Include <unordered_map> and <string>.
10456         (tdesc_xml_cache): Delete.
10457         (tdesc_xml_cache_s): Delete.
10458         (xml_cache): Now an std::unordered_map.
10459         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10460         (target_fetch_description_xml): Change return type to
10461         gdb::optional<std::string>, and adjust.
10462         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10463         (target_fetch_description_xml): Change return type to
10464         gdb::optional<std::string>.
10465
10466 2017-04-18  Pedro Alves  <palves@redhat.com>
10467
10468         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10469         unittests/optional-selftests.c.
10470         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10471         * unittests/optional-selftests.c: New file.
10472         * unittests/optional/assignment/1.cc: New file.
10473         * unittests/optional/assignment/2.cc: New file.
10474         * unittests/optional/assignment/3.cc: New file.
10475         * unittests/optional/assignment/4.cc: New file.
10476         * unittests/optional/assignment/5.cc: New file.
10477         * unittests/optional/assignment/6.cc: New file.
10478         * unittests/optional/assignment/7.cc: New file.
10479         * unittests/optional/cons/copy.cc: New file.
10480         * unittests/optional/cons/default.cc: New file.
10481         * unittests/optional/cons/move.cc: New file.
10482         * unittests/optional/cons/value.cc: New file.
10483         * unittests/optional/in_place.cc: New file.
10484         * unittests/optional/observers/1.cc: New file.
10485         * unittests/optional/observers/2.cc: New file.
10486
10487 2017-04-18  Pedro Alves  <palves@redhat.com>
10488
10489         * common/gdb_optional.h: Include common/traits.h.
10490         (in_place_t): New type.
10491         (in_place): New constexpr variable.
10492         (optional::optional): Remove member initialization of
10493         m_instantiated.
10494         (optional::optional(in_place_t...)): New constructor.
10495         (optional::~optional): Use reset.
10496         (optional::optional(const optional&)): New.
10497         (optional::optional(const optional&&)): New.
10498         (optional::optional(T &)): New.
10499         (optional::optional(T &&)): New.
10500         (operator::operator=(const optional &)): New.
10501         (operator::operator=(optional &&)): New.
10502         (operator::operator= (const T &))
10503         (operator::operator= (T &&))
10504         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10505         (operator::reset): New.
10506         (operator::m_instantiated):: Add in-class initializer.
10507         * common/traits.h: Include <type_traits>.
10508         (struct And): New types.
10509
10510 2017-04-18  Pedro Alves  <palves@redhat.com>
10511
10512         * xml-support.c: Include <vector>.
10513         (scope_level::scope_level(const gdb_xml_element *))
10514         (scope_level::scope_level(scope_level&&)): New.
10515         (scope_level::~scope_level): New.
10516         (scope_level_s): Delete.
10517         (gdb_xml_parser::scopes): Now a std::vector.
10518         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10519         Use std::vector.
10520         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10521         scope cleanup code.
10522         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10523         of the scopes member.  Use std::vector::emplace_back.
10524
10525 2017-04-18  Pedro Alves  <palves@redhat.com>
10526
10527         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10528         a bool.
10529         (gdb_xml_end_element): Change type of first parameter.
10530         (gdb_xml_cleanup): Rename to ...
10531         (gdb_xml_parser::~gdb_xml_parser): ... this.
10532         (gdb_xml_create_parser_and_cleanup): Delete with ...
10533         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10534         to this new ctor.
10535         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10536         using gdb_xml_create_parser_and_cleanup.
10537         (xinclude_parsing_data): Add ctor/dtor.
10538         (xml_xinclude_cleanup): Delete.
10539         (xml_process_xincludes): Create a local xinclude_parsing_data
10540         instead of heap-allocating one.  Create a local gdb_xml_parser
10541         instead of heap-allocating one with
10542         gdb_xml_create_parser_and_cleanup.
10543
10544 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10545
10546         PR threads/20743
10547         * fbsd-nat.c (resume_one_thread_cb): Remove.
10548         (resume_all_threads_cb): Remove.
10549         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10550         iterate_over_threads.
10551
10552 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10553
10554         * NEWS: Create a new section for the next release branch.
10555         Rename the section of the current branch, now that it has
10556         been cut.
10557
10558 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10559
10560         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10561         * version.in: Bump version to 8.0.50.DATE-git.
10562
10563 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10564
10565         PR gdb/21385
10566         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10567         independently of the host, and fix build breakage on Cygwin.
10568
10569 2017-04-13  Pedro Alves  <palves@redhat.com>
10570
10571         * inferior.c (free_inferior): Convert to ...
10572         (inferior::~inferior): ... this dtor.
10573         (inferior::inferior): New ctor, factored out from ...
10574         (add_inferior_silent): ... here.  Allocate the inferior with a new
10575         expression.
10576         (delete_inferior): Call delete instead of free_inferior.
10577         * inferior.h (gdb_environ, continuation): Forward declare.
10578         (inferior): Now a class.  Add in-class initialization to all
10579         members.  Make boolean fields bool, except 'detaching'.
10580         (inferior::inferior): New explicit ctor.
10581         (inferior::~inferior): New.
10582
10583 2017-04-13  Pedro Alves  <palves@redhat.com>
10584
10585         * inferior.c (init_inferior_list): Delete.
10586         * inferior.h (init_inferior_list): Delete.
10587
10588 2017-04-13  Pedro Alves  <palves@redhat.com>
10589
10590         PR threads/13217
10591         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10592         (top level): Call it twice, with different thread sets.
10593
10594 2017-04-13  Pedro Alves  <palves@redhat.com>
10595
10596         * thread.c: Include <algorithm>.
10597         (thread_array_cleanup): Delete.
10598         (scoped_inc_dec_ref): New class.
10599         (live_threads_count): New function.
10600         (set_thread_refcount): Delete.
10601         (tp_array_compar_ascending): Now a bool.
10602         (tp_array_compar): Convert to a std::sort comparison function.
10603         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10604         and live_threads_count.
10605
10606 2017-04-13  Pedro Alves  <palves@redhat.com>
10607
10608         * infrun.c (follow_fork_inferior): Also switch the current
10609         inferior.
10610
10611 2017-04-13  Pedro Alves  <palves@redhat.com>
10612
10613         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10614         before calling create_internal_breakpoint.
10615
10616 2017-04-13  Pedro Alves  <palves@redhat.com>
10617
10618         * fork-child.c (execv_argv): New class.
10619         (breakup_args): Refactored as ...
10620         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10621         Copy arguments to storage and replace separators with NULL
10622         terminators in place.
10623         (escape_bang_in_quoted_argument): Adjust to return bool.
10624         (execv_argv::execv_argv): New ctor.
10625         (execv_argv::init_for_shell): New method, factored out from
10626         fork_inferior.  Don't strdup strings into the vector.
10627         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10628         Remove free_vector_argv call.
10629
10630 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10631
10632         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10633         tdep->rx_psw_type.
10634
10635 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10636
10637         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10638         * rx-tdep.c (rx_gdbarch_init): Likewise.
10639
10640 2017-04-13  Pedro Alves  <palves@redhat.com>
10641
10642         * breakpoint.h (struct breakpoint): Reindent.
10643
10644 2017-04-13  Pedro Alves  <palves@redhat.com>
10645
10646         * breakpoint.c (bp_location): Rename to ...
10647         (bp_locations): ... this.  All references updated.
10648         (bp_location_count): Rename to ...
10649         (bp_locations_count): ... this.  All references updated.
10650         (bp_location_placed_address_before_address_max): Rename to ...
10651         (bp_locations_placed_address_before_address_max): ... this.  All
10652         references updated.
10653         (bp_location_shadow_len_after_address_max): Rename to ...
10654         (bp_locations_shadow_len_after_address_max): ... this.  All
10655         references updated.
10656         (bp_location_compare_addrs): Rename to ...
10657         (bp_locations_compare_addrs): ... this.  All references updated.
10658         (bp_location_compare):Rename to ...
10659         (bp_locations_compare): ... this.  All references updated.
10660         (bp_location_target_extensions_update): Rename to ...
10661         (bp_locations_target_extensions_update): ... this.  All references
10662         updated.
10663
10664 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10665
10666         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10667         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10668         'sgtty.h'.
10669         * common/gdb_termios.h: New file, with parts of "terminal.h".
10670         * inflow.c: Include "gdb_termios.h".
10671         * ser-unix.c: Include "gdb_termios.h".
10672         * terminal.h: Move terminal-related defines to
10673         "common/gdb_termios.h".
10674
10675 2017-04-12  Tom Tromey  <tom@tromey.com>
10676
10677         * probe.c (parse_probes): Update.
10678         * location.h (delete_event_location): Don't declare.
10679         (event_location_deleter::operator()): Update.
10680         * location.c (event_location_deleter::operator()): Rename from
10681         delete_event_location.
10682         * linespec.h (linespec_result) <location>: Change type to
10683         event_location_up.
10684         * linespec.c (canonicalize_linespec, event_location_to_sals)
10685         (decode_objc): Update.
10686         (linespec_result): Don't call delete_event_location.
10687         * breakpoint.c (create_breakpoints_sal)
10688         (bkpt_probe_create_sals_from_location)
10689         (strace_marker_create_sals_from_location): Update.
10690
10691 2017-04-12  Tom Tromey  <tom@tromey.com>
10692
10693         * linespec.h (struct linespec_result): Add constructor and
10694         destructor.
10695         (init_linespec_result, destroy_linespec_result)
10696         (make_cleanup_destroy_linespec_result): Don't declare.
10697         * linespec.c (init_linespec_result): Remove.
10698         (linespec_result::~linespec_result): Rename from
10699         destroy_linespec_result.  Update.
10700         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10701         Remove.
10702         * breakpoint.c (create_breakpoint, break_range_command)
10703         (decode_location_default): Update.
10704         * ax-gdb.c (agent_command_1): Update.
10705
10706 2017-04-12  Tom Tromey  <tom@tromey.com>
10707
10708         * remote.c (remote_download_tracepoint): Update.
10709         * python/py-breakpoint.c (bppy_get_location): Update.
10710         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10711         (gdbscm_breakpoint_location): Update.
10712         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10713         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10714         Change type to event_location_up.
10715         * breakpoint.c (create_overlay_event_breakpoint)
10716         (create_longjmp_master_breakpoint)
10717         (create_std_terminate_master_breakpoint)
10718         (create_exception_master_breakpoint)
10719         (breakpoint_event_location_empty_p, print_breakpoint_location)
10720         (print_one_breakpoint_location, create_thread_event_breakpoint)
10721         (init_breakpoint_sal, create_breakpoint)
10722         (print_recreate_ranged_breakpoint, break_range_command)
10723         (init_ada_exception_breakpoint, say_where): Update.
10724         (base_breakpoint_dtor): Don't call delete_event_location.
10725         (bkpt_print_recreate, tracepoint_print_recreate)
10726         (dprintf_print_recreate, update_static_tracepoint)
10727         (breakpoint_re_set_default): Update.
10728
10729 2017-04-12  Tom Tromey  <tom@tromey.com>
10730
10731         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10732         type of "to_do".  Update.
10733         (compute_stack_depth): Use std::vector.
10734
10735 2017-04-12  Tom Tromey  <tom@tromey.com>
10736
10737         * printcmd.c (find_instruction_backward): Use std::vector.
10738
10739 2017-04-12  Tom Tromey  <tom@tromey.com>
10740
10741         * symfile.c (objfilep): Remove typedef.
10742         (reread_symbols): Use a std::vector.
10743
10744 2017-04-12  Tom Tromey  <tom@tromey.com>
10745
10746         * mi/mi-main.c (exec_direction_forward): Remove.
10747         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10748         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10749         scoped_restore.
10750         * guile/guile.c (guile_repl_command, guile_command)
10751         (gdbscm_execute_gdb_command): Use scoped_restore.
10752         * go-exp.y (go_parse): Use scoped_restore.
10753         * d-exp.y (d_parse): Use scoped_restore.
10754         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10755         * c-exp.y (c_parse): Use scoped_restore.
10756
10757 2017-04-12  Tom Tromey  <tom@tromey.com>
10758
10759         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10760         (mi_parse): Update return type.
10761         (mi_parse_free): Remove.
10762         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10763         (mi_parse::~mi_parse): Rename from mi_parse_free.
10764         (mi_parse_cleanup): Remove.
10765         (mi_parse): Return a unique_ptr.  Use new.
10766         * mi/mi-main.c (mi_execute_command): Update.
10767
10768 2017-04-12  Tom Tromey  <tom@tromey.com>
10769
10770         * location.c (explicit_location_lex_one): Return a
10771         unique_xmalloc_ptr.
10772         (string_to_explicit_location): Update.  Remove cleanups.
10773
10774 2017-04-12  Tom Tromey  <tom@tromey.com>
10775
10776         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10777         (compare_value_and_voffset): Change type.  Update.
10778         (compute_vtable_size): Change type of "offset_vec".
10779         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10780         (gnuv3_get_typeid): Remove extraneous declaration.
10781
10782 2017-04-12  Tom Tromey  <tom@tromey.com>
10783
10784         * charset.h (wchar_iterator): Fix comment.
10785
10786 2017-04-12  Tom Tromey  <tom@tromey.com>
10787
10788         * charset.c (iconv_wrapper): New class.
10789         (cleanup_iconv): Remove.
10790         (convert_between_encodings): Use it.
10791
10792 2017-04-12  Tom Tromey  <tom@tromey.com>
10793
10794         * symfile.h (increment_reading_symtab): Update type.
10795         * symfile.c (decrement_reading_symtab): Remove.
10796         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10797         * psymtab.c (psymtab_to_symtab): Update.
10798         * dwarf2read.c (dw2_instantiate_symtab): Update.
10799
10800 2017-04-12  Tom Tromey  <tom@tromey.com>
10801
10802         * jit.c (struct jit_reader): Declare separately.  Add constructor
10803         and destructor.  Change type of "handle".
10804         (loaded_jit_reader): Define separately.
10805         (jit_reader_load): Update.  New "new".
10806         (jit_reader_unload_command): Use "delete".
10807         * gdb-dlfcn.h (struct dlclose_deleter): New.
10808         (gdb_dlhandle_up): New typedef.
10809         (gdb_dlopen, gdb_dlsym): Update types.
10810         (gdb_dlclose): Remove.
10811         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10812         (gdb_dlsym): Change type of "handle".
10813         (make_cleanup_dlclose): Remove.
10814         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10815         * compile/compile-c-support.c (load_libcc): Update.
10816
10817 2017-04-12  Tom Tromey  <tom@tromey.com>
10818
10819         * symtab.h (find_pcs_for_symtab_line): Change return type.
10820         * symtab.c (find_pcs_for_symtab_line): Change return type.
10821         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10822         type of "vec".  Update.
10823         (ltpy_get_pcs_for_line): Update.
10824         * linespec.c (decode_digits_ordinary): Update.
10825
10826 2017-04-12  Tom Tromey  <tom@tromey.com>
10827
10828         * tracepoint.c (actions_command): Update.
10829         * python/python.c (python_command, python_interactive_command):
10830         Update.
10831         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10832         * guile/guile.c (guile_command): Update.
10833         * defs.h (read_command_lines, read_command_lines_1): Return
10834         command_line_up.
10835         (command_lines_deleter): New struct.
10836         (command_line_up): New typedef.
10837         * compile/compile.c (compile_code_command)
10838         (compile_print_command): Update.
10839         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10840         command_line_up.
10841         (make_cleanup_free_command_lines): Remove.
10842         * cli/cli-script.c (get_command_line, read_command_lines_1)
10843         (copy_command_lines): Return command_line_up.
10844         (while_command, if_command, read_command_lines, define_command)
10845         (document_command): Update.
10846         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10847         Remove.
10848         * breakpoint.h (breakpoint_set_commands): Change type of
10849         "commands".
10850         * breakpoint.c (breakpoint_set_commands): Change type of
10851         "commands".  Update.
10852         (do_map_commands_command, update_dprintf_command_list)
10853         (create_tracepoint_from_upload): Update.
10854
10855 2017-04-12  Tom Tromey  <tom@tromey.com>
10856
10857         * tracepoint.c (scope_info): Update.
10858         * spu-tdep.c (spu_catch_start): Update.
10859         * python/python.c (gdbpy_decode_line): Update.
10860         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10861         * python/py-breakpoint.c (bppy_init): Update.
10862         * probe.c (parse_probes): Update.
10863         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10864         * location.h (event_location_deleter): New struct.
10865         (event_location_up): New typedef.
10866         (new_linespec_location, new_address_location, new_probe_location)
10867         (new_explicit_location, copy_event_location)
10868         (string_to_event_location, string_to_event_location_basic)
10869         (string_to_explicit_location): Update return type.
10870         (make_cleanup_delete_event_location): Remove.
10871         * location.c (new_linespec_location, new_address_location)
10872         (new_probe_location, new_explicit_location, copy_event_location):
10873         Return event_location_up.
10874         (delete_event_location_cleanup)
10875         (make_cleanup_delete_event_location): Remove.
10876         (string_to_explicit_location, string_to_event_location_basic)
10877         (string_to_event_location): Return event_location_up.
10878         * linespec.c (canonicalize_linespec, event_location_to_sals)
10879         (decode_line_with_current_source)
10880         (decode_line_with_last_displayed, decode_objc): Update.
10881         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10882         * completer.c (location_completer): Update.
10883         * cli/cli-cmds.c (edit_command, list_command): Update.
10884         * breakpoint.c (create_overlay_event_breakpoint)
10885         (create_longjmp_master_breakpoint)
10886         (create_std_terminate_master_breakpoint)
10887         (create_exception_master_breakpoint)
10888         (create_thread_event_breakpoint): Update.
10889         (init_breakpoint_sal): Update.  Remove some dead code.
10890         (create_breakpoint_sal): Change type of "location".  Update.
10891         (create_breakpoints_sal, create_breakpoint, break_command_1)
10892         (dprintf_command, break_range_command, until_break_command)
10893         (init_ada_exception_breakpoint)
10894         (strace_marker_create_sals_from_location)
10895         (update_static_tracepoint, trace_command, ftrace_command)
10896         (strace_command, create_tracepoint_from_upload): Update.
10897         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10898         * ax-gdb.c (agent_command_1): Update.
10899
10900 2017-04-12  Pedro Alves  <palves@redhat.com>
10901
10902         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10903         * configure.tgt: Handle i[34567]86-*-go32* and
10904         i[34567]86-*-msdosdjgpp*.
10905         * i386-tdep.c (i386_svr4_reg_to_regnum):
10906         Make extern.
10907         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10908         i386-go32-tdep.c.
10909         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10910         * i386-go32-tdep.c: New file.
10911         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10912         declarations.
10913
10914 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10915
10916         * aix-thread.c (pd_status2str): Change return type to const char *.
10917
10918 2017-04-12  Pedro Alves  <palves@redhat.com>
10919
10920         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10921         calls to set_gdbarch_gnu_triplet_regexp.
10922
10923 2017-04-12  Pedro Alves  <palves@redhat.com>
10924
10925         PR gdb/21323
10926         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10927         New enum value.
10928         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10929         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10930         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10931         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10932         * gdbarch.h, gdbarch.c: Regenerate.
10933         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10934         gdbarch_wchar_bit and gdbarch_wchar_signed.
10935         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10936         * arm-tdep.c (arm_gdbarch_init): Likewise.
10937         * avr-tdep.c (avr_gdbarch_init): Likewise.
10938         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10939         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10940         * i386-tdep.c (i386_go32_init_abi): Likewise.
10941         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10942         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10943         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10944         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10945         * sh-tdep.c (sh_gdbarch_init): Likewise.
10946         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10947         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10948         * windows-tdep.c (windows_init_abi): Likewise.
10949         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10950
10951 2017-04-12  Pedro Alves  <palves@redhat.com>
10952
10953         PR c++/21323
10954         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10955         cplus_primitive_type_char32_t>: New enum values.
10956         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10957         and cplus_primitive_type_char32_t.
10958         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10959         32, use the archtecture's built-in type for char16_t and char32_t,
10960         respectively.  Otherwise, fallback to init_integer_type as before,
10961         but make the type unsigned, and issue a complaint.
10962         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10963
10964 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10965
10966         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10967         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10968
10969 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10970
10971         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10972         'const char *'.
10973
10974 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10975
10976         * common/common-utils.c (free_vector_argv): New function.
10977         * common/common-utils.h: Include <vector>.
10978         (free_vector_argv): New prototype.
10979         * darwin-nat.c (darwin_create_inferior): Rewrite function
10980         prototype in order to constify "exec_file" and accept a
10981         "std::string" for "allargs".
10982         * fork-child.c: Include <vector>.
10983         (breakup_args): Rewrite function, using C++.
10984         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10985         and accept "std::string" for "allargs".  Update the code to
10986         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10987         and "execvp".
10988         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10989         order to constify "exec_file" and accept a "std::string" for
10990         "allargs".
10991         * go32-nat.c (go32_create_inferior): Likewise.
10992         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10993         * infcmd.c (run_command_1): Constify "exec_file".  Use
10994         "std::string" for inferior arguments.
10995         * inferior.h (fork_inferior): Update prototype.
10996         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10997         prototype in order to constify "exec_file" and accept a
10998         "std::string" for "allargs".
10999         * nto-procfs.c (procfs_create_inferior): Likewise.
11000         * procfs.c (procfs_create_inferior): Likewise.
11001         * remote-sim.c (gdbsim_create_inferior): Likewise.
11002         * remote.c (extended_remote_run): Update code to accept
11003         "std::string" as argument.
11004         (extended_remote_create_inferior): Rewrite function prototype in
11005         order to constify "exec_file" and accept a "std::string" for
11006         "allargs".
11007         * rs6000-nat.c (super_create_inferior): Likewise.
11008         (rs6000_create_inferior): Likewise.
11009         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11010         * windows-nat.c (windows_create_inferior): Likewise.
11011
11012 2017-04-11  Pedro Alves  <palves@redhat.com>
11013
11014         * thread.c: Fix whitespace throughout.
11015
11016 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11017
11018         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11019
11020 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11021
11022         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11023
11024 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11025
11026         PR gdb/21364
11027         * osdata.c (info_osdata): Check if 'type' is an empty string
11028         instead of NULL.
11029
11030 2017-04-10  Pedro Alves  <palves@redhat.com>
11031
11032         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11033         (ptid_to_global_thread_id, in_thread_list)
11034         (do_captured_list_thread_ids, set_resumed, set_running)
11035         (set_executing, set_stop_requested, finish_thread_state)
11036         (validate_registers_access, can_access_registers_ptid)
11037         (print_thread_info_1, switch_to_thread)
11038         (do_restore_current_thread_cleanup)
11039         (make_cleanup_restore_current_thread, thread_command)
11040         (thread_name_command): Use operator== instead of ptid_equal.
11041
11042 2017-04-10  Pedro Alves  <palves@redhat.com>
11043
11044         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11045         (current_thread_cleanup_chain): Delete.
11046         (restore_current_thread_cleanup_dtor)
11047         (make_cleanup_restore_current_thread): Remove references to
11048         current_thread_cleanup_chain.
11049
11050 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11051
11052         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11053         REG_UNKNOWN.
11054
11055 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11056
11057         PR gdb/19942
11058         * gdbthread.h (thread_info::deletable): New method.
11059         (thread_info::incref): New method.
11060         (thread_info::decref): New method.
11061         (thread_info::refcount): Move it to private.
11062         * infrun.c (save_stop_context): Call inc_refcount.
11063         (release_stop_context_cleanup): Likewise.
11064         * thread.c (set_thread_exited): New function.
11065         (init_thread_list): Delete "tp" only it is deletable, otherwise
11066         call set_thread_exited.
11067         (delete_thread_1): Call set_thread_exited.
11068         (current_thread_cleanup) <inferior_pid>: Remove.
11069         <thread>: New field.
11070         (restore_current_thread_ptid_changed): Removed.
11071         (do_restore_current_thread_cleanup): Adjust.
11072         (restore_current_thread_cleanup_dtor): Don't call
11073         find_thread_ptid.
11074         (set_thread_refcount): Use dec_refcount.
11075         (make_cleanup_restore_current_thread): Adjust.
11076         (thread_apply_all_command): Call inc_refcount.
11077         (_initialize_thread): Don't call
11078         observer_attach_thread_ptid_changed.
11079
11080 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11081
11082         * thread.c (delete_thread_1): Hoist code on marking thread as
11083         exited.
11084
11085 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11086
11087         * windows-nat.c (windows_detach): Initialize ptid with
11088         minus_one_ptid.
11089
11090 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11091
11092         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11093
11094 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11095
11096         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11097         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11098         (bfin_pseudo_register_write): Likewise
11099
11100 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11101
11102         * common/ptid.h (struct ptid): Change to...
11103         (class ptid_t): ... this.
11104         <ptid_t>: New constructors.
11105         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11106         matches>: New methods.
11107         <make_null, make_minus_one>: New static methods.
11108         <pid>: Rename to...
11109         <m_pid>: ...this.
11110         <lwp>: Rename to...
11111         <m_lwp>: ...this.
11112         <tid>: Rename to...
11113         <m_tid>: ...this.
11114         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11115         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11116         as references, move comment to class ptid_t.
11117         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11118         ptid_t static methods.
11119         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11120         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11121         Take ptid arguments as references, implement using ptid_t methods.
11122         * unittests/ptid-selftests.c: New file.
11123         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11124         unittests/ptid-selftests.c.
11125         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11126
11127 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11128
11129         * python/python.c (python_run_simple_file): Cast mode literal to
11130         non-const char pointer as expected by PyFile_FromString.
11131
11132 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11133
11134         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11135         minus_one_ptid and null_ptid.
11136
11137 2017-04-05  Pedro Alves  <palves@redhat.com>
11138
11139         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11140         * configure: Regenerate.
11141
11142 2017-04-05  Pedro Alves  <palves@redhat.com>
11143
11144         * ada-exp.y (yyerror): Constify.
11145         * ada-lang.c (bound_name, get_selections)
11146         (ada_variant_discrim_type)
11147         (ada_variant_discrim_name, ada_value_struct_elt)
11148         (ada_lookup_struct_elt_type, is_unchecked_variant)
11149         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11150         (catch_ada_exception_command_split)
11151         (catch_ada_assert_command_split, catch_assert_command)
11152         (ada_op_name): Constify.
11153         * ada-lang.h (ada_yyerror, get_selections)
11154         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11155         * arc-tdep.c (arc_print_frame_cache): Constify.
11156         * arm-tdep.c (arm_skip_stub): Constify.
11157         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11158         (gen_aggregate_elt_ref): Constify.
11159         * bcache.c (print_bcache_statistics): Constify.
11160         * bcache.h (print_bcache_statistics): Constify.
11161         * break-catch-throw.c (catch_exception_command_1):
11162         * breakpoint.c (struct ep_type_description::description):
11163         Constify.
11164         (add_solib_catchpoint): Constify.
11165         (catch_fork_command_1): Add cast.
11166         (add_catch_command): Constify.
11167         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11168         Constify.
11169         * bsd-uthread.c (bsd_uthread_state): Constify.
11170         * buildsym.c (patch_subfile_names): Constify.
11171         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11172         Constify.
11173         * c-exp.y (yyerror): Constify.
11174         (token::oper): Constify.
11175         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11176         * c-varobj.c (cplus_describe_child): Constify.
11177         * charset.c (find_charset_names): Add cast.
11178         (find_charset_names): Constify array and add const_cast.
11179         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11180         (edit_command): Constify.
11181         * cli/cli-decode.c (lookup_cmd): Constify.
11182         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11183         Constify.
11184         (struct dump_context): Constify.
11185         (add_dump_command, restore_command): Constify.
11186         * cli/cli-script.c (get_command_line): Constify.
11187         * cli/cli-script.h (get_command_line): Constify.
11188         * cli/cli-utils.c (check_for_argument): Constify.
11189         * cli/cli-utils.h (check_for_argument): Constify.
11190         * coff-pe-read.c (struct read_pe_section_data): Constify.
11191         * command.h (lookup_cmd): Constify.
11192         * common/print-utils.c (decimal2str): Constify.
11193         * completer.c (gdb_print_filename): Constify.
11194         * corefile.c (set_gnutarget): Constify.
11195         * cp-name-parser.y (yyerror): Constify.
11196         * cp-valprint.c (cp_print_class_member): Constify.
11197         * cris-tdep.c (cris_register_name, crisv32_register_name):
11198         Constify.
11199         * d-exp.y (yyerror): Constify.
11200         (struct token::oper): Constify.
11201         * d-lang.h (d_yyerror): Constify.
11202         * dbxread.c (struct header_file_location::name): Constify.
11203         (add_old_header_file, add_new_header_file, last_function_name)
11204         (dbx_next_symbol_text, add_bincl_to_list)
11205         (find_corresponding_bincl_psymtab, set_namestring)
11206         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11207         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11208         * defs.h (command_line_input, print_address_symbolic)
11209         (deprecated_readline_begin_hook): Constify.
11210         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11211         Constify.
11212         * event-top.c (handle_line_of_input): Constify and add cast.
11213         * exceptions.c (catch_errors): Constify.
11214         * exceptions.h (catch_errors): Constify.
11215         * expprint.c (print_subexp_standard, op_string, op_name)
11216         (op_name_standard, dump_raw_expression, dump_raw_expression):
11217         * expression.h (op_name, op_string, dump_raw_expression):
11218         Constify.
11219         * f-exp.y (yyerror): Constify.
11220         (struct token::oper): Constify.
11221         (struct f77_boolean_val::name): Constify.
11222         * f-lang.c (f_word_break_characters): Constify.
11223         * f-lang.h (f_yyerror): Constify.
11224         * fork-child.c (fork_inferior): Add cast.
11225         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11226         (new_variant): Constify.
11227         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11228         * gdbarch.c: Regenerate.
11229         * gdbcore.h (set_gnutarget): Constify.
11230         * go-exp.y (yyerror): Constify.
11231         (token::oper): Constify.
11232         * go-lang.h (go_yyerror): Constify.
11233         * go32-nat.c (go32_sysinfo): Constify.
11234         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11235         * guile/scm-cmd.c (cmdscm_function): Constify.
11236         * guile/scm-param.c (pascm_param_value): Constify.
11237         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11238         (h8300sx_register_name): Constify.
11239         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11240         Constify.
11241         * ia64-tdep.c (ia64_register_names): Constify.
11242         * infcmd.c (construct_inferior_arguments): Constify.
11243         (path_command, attach_post_wait): Constify.
11244         * language.c (show_range_command, show_case_command)
11245         (unk_lang_error): Constify.
11246         * language.h (language_defn::la_error)
11247         (language_defn::la_name_of_this): Constify.
11248         * linespec.c (decode_line_2): Constify.
11249         * linux-thread-db.c (thread_db_err_str): Constify.
11250         * lm32-tdep.c (lm32_register_name): Constify.
11251         * m2-exp.y (yyerror): Constify.
11252         * m2-lang.h (m2_yyerror): Constify.
11253         * m32r-tdep.c (m32r_register_names): Constify and make static.
11254         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11255         * m88k-tdep.c (m88k_register_name): Constify.
11256         * macroexp.c (appendmem): Constify.
11257         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11258         (upgrade_type, parse_external, parse_partial_symbols)
11259         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11260         (new_symbol): Constify.
11261         * memattr.c (mem_info_command): Constify.
11262         * mep-tdep.c (register_name_from_keyword): Constify.
11263         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11264         Constify.
11265         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11266         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11267         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11268         cast.
11269         (mi_execute_async_cli_command): Constify.
11270         * mips-tdep.c (mips_register_name): Constify.
11271         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11272         (am33_register_name, am33_2_register_name)
11273         * moxie-tdep.c (moxie_register_names): Constify.
11274         * nat/linux-osdata.c (osdata_type): Constify fields.
11275         * nto-tdep.c (nto_parse_redirection): Constify.
11276         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11277         (lookup_child_selector): Constify.
11278         (objc_methcall::name): Constify.
11279         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11280         (lookup_struct_typedef): Constify.
11281         * objfiles.c (pc_in_section): Constify.
11282         * objfiles.h (pc_in_section): Constify.
11283         * p-exp.y (struct token::oper): Constify.
11284         (yyerror): Constify.
11285         * p-lang.h (pascal_yyerror): Constify.
11286         * parser-defs.h (op_name_standard): Constify.
11287         (op_print::string): Constify.
11288         (exp_descriptor::op_name): Constify.
11289         * printcmd.c (print_address_symbolic): Constify.
11290         * psymtab.c (print_partial_symbols): Constify.
11291         * python/py-breakpoint.c (stop_func): Constify.
11292         (bppy_get_expression): Constify.
11293         * python/py-cmd.c (cmdpy_completer::name): Constify.
11294         (cmdpy_function): Constify.
11295         * python/py-event.c (evpy_add_attribute)
11296         (gdbpy_initialize_event_generic): Constify.
11297         * python/py-event.h (evpy_add_attribute)
11298         (gdbpy_initialize_event_generic): Constify.
11299         * python/py-evts.c (add_new_registry): Constify.
11300         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11301         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11302         * python/py-inferior.c (get_buffer): Add cast.
11303         * python/py-param.c (parm_constant::name): Constify.
11304         * python/py-unwind.c (fprint_frame_id): Constify.
11305         * python/python.c (gdbpy_parameter_value): Constify.
11306         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11307         * remote.c (memory_packet_config::name): Constify.
11308         (show_packet_config_cmd, remote_write_bytes)
11309         (remote_buffer_add_string):
11310         * reverse.c (exec_reverse_once): Constify.
11311         * rs6000-tdep.c (variant::name, variant::description): Constify.
11312         * rust-exp.y (rustyyerror): Constify.
11313         * rust-lang.c (rust_op_name): Constify.
11314         * rust-lang.h (rustyyerror): Constify.
11315         * serial.h (serial_ops::name): Constify.
11316         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11317         (sh_sh3e_register_name, sh_sh2e_register_name)
11318         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11319         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11320         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11321         (sh_sh4al_dsp_register_name): Constify.
11322         * sh64-tdep.c (sh64_register_name): Constify.
11323         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11324         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11325         * stabsread.c (patch_block_stabs, read_type_number)
11326         (ref_map::stabs, ref_add, process_reference)
11327         (symbol_reference_defined, define_symbol, define_symbol)
11328         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11329         (read_one_struct_field, read_struct_fields, read_baseclasses)
11330         (read_tilde_fields, read_struct_type, read_array_type)
11331         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11332         (read_huge_number, read_range_type, read_args, common_block_start)
11333         (find_name_end): Constify.
11334         * stabsread.h (common_block_start, define_symbol)
11335         (process_one_symbol, symbol_reference_defined, ref_add):
11336         * symfile.c (get_section_index, add_symbol_file_command):
11337         * symfile.h (get_section_index): Constify.
11338         * target-descriptions.c (tdesc_type::name): Constify.
11339         (tdesc_free_type): Add cast.
11340         * target.c (find_default_run_target):
11341         (add_deprecated_target_alias, find_default_run_target)
11342         (target_announce_detach): Constify.
11343         (do_option): Constify.
11344         * target.h (add_deprecated_target_alias): Constify.
11345         * thread.c (print_thread_info_1): Constify.
11346         * top.c (deprecated_readline_begin_hook, command_line_input):
11347         Constify.
11348         (init_main): Add casts.
11349         * top.h (handle_line_of_input): Constify.
11350         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11351         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11352         (tfind_command): Rename to ...
11353         (tfind_command_1): ... this and constify.
11354         (tfind_command): New function.
11355         (tfind_end_command, tfind_start_command): Adjust.
11356         (encode_source_string): Constify.
11357         * tracepoint.h (encode_source_string): Constify.
11358         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11359         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11360         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11361         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11362         * tui/tui-win.c (parse_scrolling_args): Constify.
11363         * tui/tui-windata.c (tui_erase_data_content): Constify.
11364         * tui/tui-windata.h (tui_erase_data_content): Constify.
11365         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11366         * tui/tui.c (tui_enable): Add cast.
11367         * utils.c (defaulted_query): Constify.
11368         (init_page_info): Add cast.
11369         (puts_debug, subset_compare): Constify.
11370         * utils.h (subset_compare): Constify.
11371         * varobj.c (varobj_format_string): Constify.
11372         * varobj.h (varobj_format_string): Constify.
11373         * vax-tdep.c (vax_register_name): Constify.
11374         * windows-nat.c (windows_detach): Constify.
11375         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11376         * xml-support.c (gdb_xml_end_element): Constify.
11377         * xml-tdesc.c (tdesc_start_reg): Constify.
11378         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11379         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11380         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11381
11382 2017-04-05  Pedro Alves  <palves@redhat.com>
11383
11384         * proc-api.c (struct trans): Constify.
11385         (procfs_note): Constify.
11386         * proc-events.c (struct trans, syscall_table):
11387         * proc-flags.c (struct trans): Constify.
11388         * proc-utils.h (procfs_note): Constify.
11389         * proc-why.c (struct trans): Constify.
11390         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11391         (procfs_detach): Constify.
11392         * sol-thread.c (struct string_map): Constify.
11393         (td_err_string, td_state_string): Constify.
11394
11395 2017-04-05  Pedro Alves  <palves@redhat.com>
11396
11397         * proc-api.c (procfs_filename): Don't initialize
11398         procfs_filename.
11399         (prepare_to_trace): Assume procfs_filename is non-NULL.
11400         (_initialize_proc_api): Give procfs_filename a default value here.
11401
11402 2017-04-05  Pedro Alves  <palves@redhat.com>
11403
11404         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11405         'cond_string' parameter.
11406         (extract_exception_regexp): Constify 'string' parameter.
11407         (catch_exception_command_1): Constify.
11408         * breakpoint.c (init_catchpoint)
11409         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11410         parameter.
11411         (ep_parse_optional_if_clause, catch_fork_command_1)
11412         (catch_exec_command_1): Constify.
11413         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11414         parameter.
11415         (ep_parse_optional_if_clause): Constify.
11416         * cli/cli-utils.c (remove_trailing_whitespace)
11417         (check_for_argument): Constify.
11418         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11419         non-const overload.
11420         (check_for_argument): Likewise.
11421
11422 2017-04-05  Pedro Alves  <palves@redhat.com>
11423
11424         * event-top.c (command_line_handler): Add cast to execute_command
11425         call.
11426         * record-btrace.c (cmd_record_btrace_bts_start)
11427         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11428         (cmd_record_btrace_start): Add cast to execute_command call.
11429         * record-full.c (record_full_goto_insn):
11430         * record.c (record_start, record_stop): Add cast to
11431         execute_command_to_string calls.
11432         (cmd_record_start): Add cast to execute_command calls.
11433
11434 2017-04-05  Pedro Alves  <palves@redhat.com>
11435
11436         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11437         static inline function.
11438         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11439         array and use gdb_PyArg_ParseTupleAndKeywords.
11440         * python/py-cmd.c (cmdpy_init): Likewise.
11441         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11442         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11443         (infpy_search_memory): Likewise.
11444         * python/py-objfile.c (objfpy_add_separate_debug_file)
11445         (gdbpy_lookup_objfile): Likewise.
11446         * python/py-symbol.c (gdbpy_lookup_symbol)
11447         (gdbpy_lookup_global_symbol): Likewise.
11448         * python/py-type.c (gdbpy_lookup_type): Likewise.
11449         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11450         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11451         Likewise.
11452
11453 2017-04-05  Pedro Alves  <palves@redhat.com>
11454
11455         * python/python-internal.h (gdb_PyGetSetDef): New type.
11456         * python/py-block.c (block_object_getset)
11457         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11458         * python/py-event.c (event_object_getset)
11459         (finish_breakpoint_object_getset): Likewise.
11460         * python/py-inferior.c (inferior_object_getset): Likewise.
11461         * python/py-infthread.c (thread_object_getset): Likewise.
11462         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11463         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11464         * python/py-objfile.c (objfile_getset): Likewise.
11465         * python/py-progspace.c (pspace_getset): Likewise.
11466         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11467         Likewise.
11468         * python/py-record.c (recpy_record_getset): Likewise.
11469         * python/py-symbol.c (symbol_object_getset): Likewise.
11470         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11471         Likewise.
11472         * python/py-type.c (type_object_getset, field_object_getset):
11473         Likewise.
11474         * python/py-value.c (value_object_getset): Likewise.
11475
11476 2017-04-05  Pedro Alves  <palves@redhat.com>
11477
11478         * python/python-internal.h (gdb_PyObject_CallMethod)
11479         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11480         New functions.
11481         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11482         (PySys_GetObject, PySys_SetPath): New macros.
11483
11484 2017-04-05  Pedro Alves  <palves@redhat.com>
11485
11486         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11487         info_osdata_command.
11488         * osdata.c (info_osdata_command): Rename to ...
11489         (info_osdata): ... this.  Constify 'type' parameter, and remove
11490         the 'from_tty' parameter.  Accept NULL TYPE.
11491         (info_osdata_command): New function.
11492         * osdata.h (info_osdata_command): Remove declaration.
11493         (info_osdata): New declaration.
11494
11495 2017-04-05  Pedro Alves  <palves@redhat.com>
11496
11497         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11498         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11499         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11500         parameter.
11501         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11502         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11503         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11504         parameter.
11505         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11506         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11507         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11508         (mi_cmd_file_list_exec_source_files)
11509         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11510         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11511         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11512         parameter.
11513         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11514         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11515         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11516         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11517         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11518         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11519         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11520         'command' parameter.
11521         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11522         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11523         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11524         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11525         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11526         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11527         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11528         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11529         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11530         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11531         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11532         parameter.
11533         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11534         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11535         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11536         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11537         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11538         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11539         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11540         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11541         (mi_cmd_data_list_changed_registers)
11542         (mi_cmd_data_write_register_values)
11543         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11544         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11545         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11546         (mi_cmd_list_features, mi_cmd_list_target_features)
11547         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11548         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11549         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11550         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11551         (mi_cmd_trace_frame_collected): Constify 'command'
11552         parameter.
11553         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11554         'command' parameter.
11555
11556 2017-04-05  Pedro Alves  <palves@redhat.com>
11557
11558         * ada-lang.c (ada_completer_word_break_characters): Now a const
11559         array.
11560         (ada_get_gdb_completer_word_break_characters): Constify.
11561         * completer.c (gdb_completer_command_word_break_characters)
11562         (gdb_completer_file_name_break_characters)
11563         (gdb_completer_quote_characters): Now const arrays.
11564         (get_gdb_completer_quote_characters): Constify.
11565         (set_rl_completer_word_break_characters): New function.
11566         (set_gdb_completion_word_break_characters)
11567         (complete_line_internal): Use it.
11568         * completer.h (get_gdb_completer_quote_characters): Constify.
11569         (set_rl_completer_word_break_characters): Declare.
11570         * f-lang.c (f_word_break_characters): Constify.
11571         * language.c (default_word_break_characters): Constify.
11572         * language.h (language_defn::la_word_break_characters): Constify.
11573         (default_word_break_characters): Constify.
11574         * top.c (init_main): Use set_rl_completer_word_break_characters.
11575
11576 2017-04-05  Pedro Alves  <palves@redhat.com>
11577
11578         * aix-thread.c (aix_thread_pid_to_str)
11579         (aix_thread_extra_thread_info): Constify.
11580         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11581         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11582         (bsd_uthread_pid_to_str): Constify.
11583         * corelow.c (core_pid_to_str): Constify.
11584         * darwin-nat.c (darwin_pid_to_str): Constify.
11585         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11586         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11587         Constify.
11588         * gnu-nat.c (gnu_pid_to_str): Constify.
11589         * go32-nat.c (go32_pid_to_str): Constify.
11590         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11591         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11592         * inferior.c (inferior_pid_to_str): Constify.
11593         * linux-nat.c (linux_nat_pid_to_str): Constify.
11594         * linux-tdep.c (linux_core_pid_to_str): Constify.
11595         * linux-thread-db.c (thread_db_pid_to_str)
11596         (thread_db_extra_thread_info): Constify.
11597         * nto-tdep.c (nto_extra_thread_info): Constify.
11598         * nto-tdep.h (nto_extra_thread_info): Constify.
11599         * obsd-nat.c (obsd_pid_to_str): Constify.
11600         * procfs.c (procfs_pid_to_str): Constify.
11601         * ravenscar-thread.c (ravenscar_extra_thread_info)
11602         (ravenscar_pid_to_str): Constify.
11603         * remote-sim.c (gdbsim_pid_to_str): Constify.
11604         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11605         Constify.
11606         * sol-thread.c (solaris_pid_to_str): Constify.
11607         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11608         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11609         * target.c (default_pid_to_str, target_pid_to_str)
11610         (normal_pid_to_str, default_pid_to_str): Constify.
11611         * target.h (target_ops::to_pid_to_str)
11612         (target_ops::to_extra_thread_info): Constify.
11613         (target_pid_to_str, normal_pid_to_str): Constify.
11614         * windows-nat.c (windows_pid_to_str): Constify.
11615         * gdbarch.sh (core_pid_to_str): Constify.
11616         * target-delegates.c: Regenerate.
11617         * gdbarch.h, gdbarch.c: Regenerate.
11618
11619 2017-04-05  Pedro Alves  <palves@redhat.com>
11620
11621         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11622         the memory of the temporary warning_pre_print override.
11623         * utils.c (warning_pre_print): Constify.
11624         * utils.h (warning_pre_print): Constify.
11625
11626 2017-04-05  Pedro Alves  <palves@redhat.com>
11627
11628         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11629         (shell_command): New function.
11630         (make_command): Use std::string.
11631         (init_cli_cmds): Register shell_command instead of shell_escape.
11632
11633 2017-04-05  Pedro Alves  <palves@redhat.com>
11634
11635         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11636         * tracepoint.c (default_collect): Don't initialize.
11637
11638 2017-04-05  Pedro Alves  <palves@redhat.com>
11639
11640         * macroexp.c (macro_buffer::shared): Now a bool.
11641         (init_buffer): Update.
11642         (init_shared_buffer): Constify 'addr' parameter.
11643         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11644         casts.
11645
11646 2017-04-05  Pedro Alves  <palves@redhat.com>
11647
11648         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11649         * disasm.c (set_disassembler_options): Constify local.
11650         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11651
11652 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11653
11654         PR gdb/21352
11655         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11656         option.
11657
11658 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11659
11660         * frame.c (frame_unwind_register_unsigned): Call
11661         frame_unwind_register_value.
11662
11663 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11664
11665         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11666         Use gdb_test_multiple, and don't match anchor.
11667
11668 2017-04-05  Pedro Alves  <palves@redhat.com>
11669
11670         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11671         (Write After Approval): Remove Simon Marchi.
11672
11673 2017-04-05  Pedro Alves  <palves@redhat.com>
11674
11675         * common/gdb_optional.h (optional::optional): Make constexpr and
11676         initialize m_dummy.
11677
11678 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11679
11680         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11681         (amd64fbsd_jmp_buf_reg_offset): Remove.
11682         (amd64fbsd_supply_uthread): Remove function.
11683         (amd64fbsd_collect_uthread): Remove function.
11684         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11685         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11686         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11687         (fbsd-nat.c): Update comment.
11688         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11689         (i386fbsd_jmp_buf_reg_offset): Remove.
11690         (i386fbsd_supply_uthread): Remove function.
11691         (i386fbsd_collect_uthread): Remove function.
11692         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11693
11694 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11695
11696         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11697         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11698         * NEWS: Mention that support for FreeBSD/alpha was removed.
11699         * alpha-fbsd-tdep.c: Delete file.
11700         * config/alpha/fbsd.mh: Delete file.
11701         * configure.host: Delete alpha*-*-freebsd* and
11702         alpha*-*-kfreebsd*-gnu.
11703         * configure.tgt: Delete alpha*-*-freebsd* and
11704         alpha*-*-kfreebsd*-gnu.
11705
11706 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11707
11708         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11709         amd64bsd_store_inferior_registers): Use ptid from regcache.
11710
11711 2017-04-04  Pedro Alves  <palves@redhat.com>
11712
11713         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11714         data fields, make them private and add "m_" prefixes.
11715         (lnp_state_machine::lnp_state_machine): New ctor.
11716         (record_line, check_line_address, handle_set_discriminator)
11717         (handle_set_address, handle_advance_pc, handle_special_opcode)
11718         (handle_advance_line, handle_set_file, handle_negate_stmt)
11719         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11720         (end_sequence, advance_line): New methods.
11721         (m_gdbarch, m_record_lines_p): New fields.
11722         (lnp_reader_state): Delete.
11723         (dwarf_record_line): Rename to ...
11724         (lnp_state_machine::record_line): ... adjust.
11725         (init_lnp_state_machine): Delete.
11726         (lnp_state_machine::lnp_state_machine): New.
11727         (check_line_address): Rename to ...
11728         (lnp_state_machine::check_line_address): This.
11729         (dwarf_decode_lines_1): Remove reference to "reader_state".
11730         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11731         State machine internal state manipulation moved to
11732         lnp_state_machine methods.
11733
11734 2017-04-04  Pedro Alves  <palves@redhat.com>
11735
11736         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11737         unittests/offset-type-selftests.c.
11738         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11739         * common/offset-type.h: New file.
11740         * common/preprocessor.h: New file.
11741         * common/traits.h: New file.
11742         * common/valid-expr.h: New file.
11743         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11744         sect_offset and cu_offset strong typedefs throughout.
11745         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11746         typedefs throughout.
11747         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11748         sect_offset and cu_offset strong typedefs throughout.
11749         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11750         typedefs throughout.
11751         * gdbtypes.h: Include "common/offset-type.h".
11752         (cu_offset): Now an offset type (strong typedef) instead of a
11753         struct.
11754         (sect_offset): Likewise.
11755         (union call_site_parameter_u): Rename "param_offset" field to
11756         "param_cu_off".
11757         * unittests/offset-type-selftests.c: New file.
11758
11759 2017-04-04  Pedro Alves  <palves@redhat.com>
11760
11761         * common/underlying.h: New file.
11762         * dwarf2read.c: Include "common/gdb_optional.h" and
11763         "common/underlying.h".
11764         (dir_index, file_name_index): New types.
11765         (file_entry): Use them.
11766         (file_entry::include): Use to_underlying.
11767         (line_header::add_file_name): Use dir_index.
11768         (read_formatted_entries): Use gdb::optional.  Read form before
11769         writting to file_entry.
11770         (dwarf_decode_line_header): Use dir_index.
11771         (lnp_state_machine::current_file): Use to_underlying.
11772         (lnp_state_machine::file): Change type to file_name_index.
11773         (dwarf_record_line): Use to_underlying.
11774         (init_lnp_state_machine): Use file_name_index.
11775         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11776
11777 2017-04-04  Pedro Alves  <palves@redhat.com>
11778
11779         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11780         operator bool, has_value and get methods.
11781
11782 2017-04-04  Pedro Alves  <palves@redhat.com>
11783
11784         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11785         fields.
11786         (line_header): Initialize all data fields.  Change type of
11787         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11788         Change type of include_dirs to std::vector<const char *>.  Remove
11789         num_include_dirs, include_dirs_size.  Change type of file_names to
11790         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11791         (line_header::line_header): New.
11792         (line_header::add_include_dir, line_header::add_file_name): New
11793         methods.
11794         (line_header::include_dir_at): Remove NULL check.
11795         (line_header::file_name_at): Add const overload.
11796         (line_header_up): New unique_ptr typedef.
11797         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11798         std::vector.  Remove free_line_header call.
11799         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11800         free_line_header call.
11801         (free_cu_line_header): Delete.
11802         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11803         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11804         Adjust to use std::vector.
11805         (free_line_header): Delete.
11806         (free_line_header_voidp): Use delete.
11807         (add_include_dir): Replace with ...
11808         (line_header::add_include_dir): ... this method.  Use std::vector.
11809         (add_file_name): Replace with ...
11810         (line_header::add_file_name): ... this method.  Use std::vector.
11811         (add_include_dir_stub): Delete.
11812         (read_formatted_entries): Remove memset.
11813         (dwarf_decode_line_header): Return a line_header_up instead of a
11814         raw pointer.  Remove cleanup handling.  Pass lambdas to
11815         read_formatted_entries.  Adjust to use line_header methods.
11816         (dwarf_decode_lines_1): Adjust to use line_header methods.
11817         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11818         use std::vector.
11819
11820 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11821
11822         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11823         instead of struct ptid.
11824
11825 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11826
11827         * frame.c (get_frame_register_bytes): Unwind using value.
11828         (put_frame_register_bytes): Likewise.
11829
11830 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11831
11832         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11833         aggregate-like.
11834
11835 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11836
11837         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11838
11839 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11840
11841         * gdbthread.h (struct thread_info): Declare constructor and
11842         destructor.  Add some in-class member initializers.
11843         * thread.c (free_thread): Remove.
11844         (init_thread_list): Call delete instead of free_thread.
11845         (new_thread): Call thread_info constructor.
11846         (thread_info::thread_info): New function.
11847         (thread_info::~thread_info): New function.
11848         (delete_thread_1): Call delete instead of free_thread.
11849         (make_cleanup_restore_current_thread): Move tp and frame to
11850         inner block.
11851
11852 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11853
11854         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11855         (arc_skip_prologue): Likewise.
11856         (arc_make_frame_cache): Likewise.
11857         (arc_pv_get_operand): New function.
11858         (arc_is_in_prologue): Likewise.
11859         (arc_analyze_prologue): Likewise.
11860         (arc_print_frame_cache): Likewise.
11861         (MAX_PROLOGUE_LENGTH): New constant.
11862
11863 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11864
11865         * configure.tgt: Add arc-insn.o.
11866         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11867         (dump_arc_instruction_command): New function.
11868         (arc_fprintf_disasm): Likewise.
11869         (arc_disassemble_info): Likewise.
11870         (arc_insn_get_operand_value): Likewise.
11871         (arc_insn_get_operand_value_signed): Likewise.
11872         (arc_insn_get_memory_base_reg): Likewise.
11873         (arc_insn_get_memory_offset): Likewise.
11874         (arc_insn_get_branch_target): Likewise.
11875         (arc_insn_dump): Likewise.
11876         (arc_insn_get_linear_next_pc): Likewise.
11877         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11878         (arc_disassemble_info): Likewise.
11879         (arc_insn_get_branch_target): Likewise.
11880         (arc_insn_get_linear_next_pc): Likewise.
11881         * NEWS: Mention new "maint print arc arc-instruction".
11882
11883 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11884
11885         * arc-tdep (maintenance_print_arc_list): New variable.
11886         (maintenance_print_arc_command): New function.
11887
11888 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11889
11890         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11891         Add "limm" and "reserved".
11892         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11893         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11894         * arc-tdep.h (arc_regnum): Likewise.
11895
11896 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11897
11898         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11899         for THREADPTR register.
11900         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11901         register.
11902         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11903         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11904         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11905
11906 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11907
11908         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11909         registers above gdbarch_num_regs (gdbarch) as privileged in
11910         call0 ABI.
11911
11912 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11913
11914         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11915         for a single specified register or for all registers in
11916         a0_base..a0_base + C0_NREGS range.
11917         (supply_gregset_reg): Call regcache_raw_supply for a single
11918         specified register or for all registers in a0_base..a0_base +
11919         C0_NREGS range.
11920
11921 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11922
11923         * arch/xtensa.h (C0_NREGS): Add definition.
11924         * xtensa-tdep.c (C0_NREGS): Remove definition.
11925
11926 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11927
11928         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11929         Drop xtensa_default_isa initialization.
11930         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11931
11932 2017-03-27  Pedro Alves  <palves@redhat.com>
11933
11934         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11935         (file_entry::include_dir): New method.
11936         (line_header::include_dir_at, line_header::file_name_at): New
11937         methods.
11938         (setup_type_unit_groups, setup_type_unit_groups)
11939         (psymtab_include_file_name): Simplify using the new methods.
11940         (lnp_state_machine) <the_line_header>: New field.
11941         <file>: Add comment.
11942         (lnp_state_machine::current_file): New method.
11943         (dwarf_record_line): Simplify using the new methods.
11944         (init_lnp_state_machine): Initialize the "the_line_header" field.
11945         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11946         Simplify using the new methods.
11947
11948 2017-03-27  Pedro Alves  <palves@redhat.com>
11949
11950         * cp-name-parser.y (make_empty): Delete.
11951         (demangler_special, nested_name, ptr_operator, array_indicator)
11952         (direct_declarator, declarator_1): Use fill_comp instead of
11953         make_empty.
11954
11955 2017-03-27  Pedro Alves  <palves@redhat.com>
11956
11957         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11958         to ATTRIBUTE_PRINTF.
11959         * solib-target.c (library_list_start_list): Print "string" not
11960         "version".
11961         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11962         gdb_xml_error call.
11963
11964 2017-03-27  Pedro Alves  <palves@redhat.com>
11965
11966         * dwarf2read.c (struct file_and_directory): New.
11967         (dwarf2_get_dwz_file): Adjust to use std::string.
11968         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11969         (find_file_and_directory): Adjust to return a file_and_directory
11970         object.
11971         (read_file_scope): Adjust to use file_and_directory.  Remove
11972         make_cleanup/do_cleanups calls.
11973         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11974         make_cleanup/do_cleanups calls.
11975         * python/python.c (do_start_initialization): Adjust to ldirname
11976         returning a std::string.
11977         * utils.c (ldirname): Now returns a std::string.
11978         * utils.h (ldirname): Change return type to std::string.
11979         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11980         returning a std::string.
11981         * xml-tdesc.c (file_read_description_xml): Likewise.
11982
11983 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11984
11985         * regcache.c (regcache_debug_print_register): New function.
11986         * regcache.h (regcache_debug_print_register): New declaration.
11987         * target.c (debug_print_register): Remove.
11988         (target_fetch_registers): Call regcache_debug_print_register.
11989         (target_store_registers): Likewise.
11990
11991 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11992
11993         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11994         reference beyond the 'lh->include_dirs' array before accessing to
11995         it.
11996         (psymtab_include_file_name): Likewise.
11997         (dwarf_decode_lines_1): Likewise.
11998         (dwarf_decode_lines): Likewise.
11999         (file_file_name): Likewise.
12000
12001 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12002
12003         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12004         inferior_ptid.
12005         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12006         ps_lsetfpregs): Likewise.
12007         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12008         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12009         ps_lsetfpregs): Likewise.
12010         * target.c (target_fetch_registers, target_store_registers):
12011         Remove asserts.
12012
12013 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12014
12015         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12016
12017 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12018
12019         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12020         (_initialize_aarch64_tdep): Register it.
12021         (aarch64_record_load_store): Handle PRFM instruction.
12022         (aarch64_process_record_test): New function.
12023
12024 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12025
12026         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12027         indentation.
12028
12029 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12030
12031         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12032
12033 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12034
12035         python/python.c (do_start_initialization): Fix memory leak.
12036
12037 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12038
12039         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12040         using get_ptrace_pid.
12041         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12042         inferior_ptid.
12043         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12044         inferior_ptid instead of pid.
12045
12046 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12047
12048         * aarch64-tdep.c: Wrap locally used classes in anonymous
12049         namespace.
12050         * arm-tdep.c: Likewise.
12051         * linespec.c: Likewise.
12052         * ui-out.c: Likewise.
12053
12054 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12055
12056         PR gdb/19637
12057         * python/lib/gdb/printer/bound_registers.py: Import sys.
12058
12059 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12060
12061         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12062         windows_thread_info parameter and use it instead of
12063         current_thread.
12064         (windows_fetch_inferior_registers): Don't set current_thread,
12065         pass the thread to do_windows_fetch_inferior_registers.  Use
12066         ptid from regcache instead of inferior_ptid.
12067         (do_windows_store_inferior_registers): Add windows_thread_info
12068         parameter and use it instead of current_thread.
12069         (windows_store_inferior_registers): Don't set current_thread,
12070         pass the thread to do_windows_store_inferior_registers.  Use
12071         ptid from regcache instead of inferior_ptid.
12072
12073 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12074
12075         * ser-mingw.c (ser_windows_raw): Remove reference to
12076         struct serial::current_timeout.
12077
12078 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12079
12080         PR tdep/20928
12081         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12082         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12083         (sparc64_fsr_type): Fix %fsr decoding.
12084
12085 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12086
12087         * python/py-record-btrace.c (btpy_insn_data): Change return type
12088         for Python 2.
12089
12090 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12091
12092         * spu-linux-nat.c (spu_fetch_inferior_registers,
12093         spu_store_inferior_registers): Use ptid from regcache, set and
12094         restore inferior_ptid.
12095         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12096         Likewise.
12097
12098 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12099
12100         * i386-linux-nat.c (fetch_register, store_register,
12101         i386_linux_fetch_inferior_registers,
12102         i386_linux_store_inferior_registers): Use ptid from regcache.
12103         * ia64-linux-nat.c (ia64_linux_fetch_register,
12104         ia64_linux_store_register): Likewise.
12105         * inf-ptrace.c (inf_ptrace_fetch_register,
12106         inf_ptrace_store_register): Likewise.
12107         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12108         m32r_linux_store_inferior_registers): Likewise.
12109         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12110         m68kbsd_store_inferior_registers): Likewise.
12111         * m68k-linux-nat.c (fetch_register, store_register,
12112         m68k_linux_fetch_inferior_registers,
12113         m68k_linux_store_inferior_registers): Likewise.
12114         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12115         m88kbsd_store_inferior_registers): Likewise.
12116         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12117         mips_fbsd_store_inferior_registers): Likewise.
12118         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12119         mips64_linux_regsets_store_registers): Likewise.
12120         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12121         mipsnbsd_store_inferior_registers): Likewise.
12122         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12123         mips64obsd_store_inferior_registers): Likewise.
12124         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12125         Likewise.
12126         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12127         ppcfbsd_store_inferior_registers): Likewise.
12128         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12129         ppc_linux_store_inferior_registers): Likewise.
12130         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12131         ppcnbsd_store_inferior_registers): Likewise.
12132         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12133         ppcobsd_store_registers): Likewise.
12134         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12135         Likewise.
12136         * ravenscar-thread.c (ravenscar_fetch_registers,
12137         ravenscar_store_registers, ravenscar_prepare_to_store):
12138         Likewise.
12139         * record-btrace.c (record_btrace_fetch_registers,
12140         record_btrace_store_registers, record_btrace_prepare_to_store):
12141         Likewise.
12142         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12143         Lookup inferior using ptid from regcache, instead of
12144         current_inferior.
12145         * remote.c (remote_fetch_registers, remote_store_registers): Use
12146         ptid from regcache.
12147         * rs6000-nat.c (fetch_register, store_register): Likewise.
12148         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12149         s390_linux_store_inferior_registers): Likewise.
12150         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12151         shnbsd_store_inferior_registers): Likewise.
12152         * sol-thread.c (sol_thread_fetch_registers,
12153         sol_thread_store_registers): Likewise.
12154         * sparc-nat.c (sparc_fetch_inferior_registers,
12155         sparc_store_inferior_registers): Likewise.
12156         * tilegx-linux-nat.c (fetch_inferior_registers,
12157         store_inferior_registers): Likewise.
12158         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12159         vaxbsd_store_inferior_registers): Likewise.
12160         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12161         store_xtregs): Likewise.
12162
12163 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12164
12165         PR gdb/14441
12166         * NEWS: Mention support for rvalue references in GDB and python.
12167         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12168         supports both lvalue and rvalue references.
12169
12170 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12171
12172         PR gdb/14441
12173         * gdbtypes.c (rank_one_type): Implement overloading
12174         resolution rules regarding rvalue references.
12175
12176 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12177
12178         PR gdb/14441
12179         * aarch64-tdep.c (aarch64_type_align)
12180         (aarch64_extract_return_value, aarch64_store_return_value): Change
12181         lvalue reference type checks to general reference type checks.
12182         * amd64-tdep.c (amd64_classify): Likewise.
12183         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12184         Likewise.
12185         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12186         (arm_store_return_value): Likewise.
12187         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12188         * c-typeprint.c (c_print_type): Likewise.
12189         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12190         (cplus_number_of_children, cplus_describe_child): Likewise.
12191         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12192         * completer.c (expression_completer): Likewise.
12193         * cp-support.c (make_symbol_overload_list_adl_namespace):
12194         Likewise.
12195         * darwin-nat-info.c (info_mach_region_command): Likewise.
12196         * dwarf2loc.c (entry_data_value_coerce_ref)
12197         (value_of_dwarf_reg_entry): Likewise.
12198         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12199         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12200         Likewise.
12201         * findvar.c (extract_typed_address, store_typed_address):
12202         Likewise.
12203         * gdbtypes.c (rank_one_type): Likewise.
12204         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12205         * infcall.c (value_arg_coerce): Likewise.
12206         * language.c (pointer_type): Likewise.
12207         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12208         Likewise.
12209         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12210         * mn10300-tdep.c (mn10300_type_align): Likewise.
12211         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12212         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12213         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12214         Likewise.
12215         * printcmd.c (print_formatted, x_command): Likewise.
12216         * python/py-type.c (typy_get_composite, typy_template_argument):
12217         Likewise.
12218         * python/py-value.c (valpy_referenced_value)
12219         (valpy_get_dynamic_type, value_has_field): Likewise.
12220         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12221         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12222         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12223         * spu-tdep.c (spu_scalar_value_p): Likewise.
12224         * symtab.c (lookup_symbol_aux): Likewise.
12225         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12226         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12227         Likewise.
12228         * valops.c (value_cast_pointers, value_cast)
12229         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12230         (value_struct_elt, value_struct_elt_bitpos)
12231         (value_find_oload_method_list, find_overload_match)
12232         (value_rtti_indirect_type): Likewise.
12233         * valprint.c (val_print_scalar_type_p, generic_val_print):
12234         Likewise.
12235         * value.c (value_actual_type, value_as_address, unpack_long)
12236         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12237         (coerce_ref): Likewise.
12238         * varobj.c (varobj_get_value_type): Likewise.
12239
12240 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12241
12242         PR gdb/14441
12243         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12244         table of constants.
12245         * python/lib/gdb/command/explore.py: Support exploring values
12246         of rvalue reference types.
12247         * python/lib/gdb/types.py: Implement get_basic_type() for
12248         rvalue reference types.
12249         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12250         constant.
12251         * python/py-value.c (valpy_getitem): Add an rvalue reference
12252         check.
12253         (valpy_reference_value): Add new parameter "refcode".
12254         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12255         New wrappers for valpy_reference_value().
12256         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12257         (gdbpy_invoke_xmethod): Likewise.
12258
12259 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12260
12261         PR gdb/14441
12262         * dwarf2read.c (process_die, read_type_die_1): Handle the
12263         DW_TAG_rvalue_reference_type DIE.
12264         (read_tag_reference_type): Add new parameter "refcode".
12265
12266 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12267
12268         PR gdb/14441
12269         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12270         (c_type_print_modifier, c_type_print_varspec_suffix)
12271         (c_type_print_base): Support printing rvalue reference types.
12272         * c-valprint.c (c_val_print, c_value_print): Support printing
12273         rvalue reference values.
12274
12275 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12276
12277         PR gdb/14441
12278         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12279         typename.
12280         * cp-support.c (replace_typedefs): Handle
12281         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12282         * python/py-type.c (typy_lookup_type): Likewise.
12283
12284 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12285
12286         PR gdb/14441
12287         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12288         * parse.c (insert_type): Change assert statement.
12289         (follow_types): Handle rvalue reference types.
12290         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12291         constant.
12292
12293 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12294
12295         PR gdb/14441
12296         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12297         value_ref() interface.
12298         * c-valprint.c (c_value_print): Likewise.
12299         * infcall.c (value_arg_coerce): Likewise.
12300         * python/py-value.c (valpy_reference_value): Likewise.
12301         * valops.c (value_cast, value_reinterpret_cast)
12302         (value_dynamic_cast, typecmp): Likewise.
12303         (value_ref): Parameterize by kind of return value reference type.
12304         * value.h (value_ref): Add new parameter "refcode".
12305
12306 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12307
12308         PR gdb/14441
12309         * dwarf2read.c (read_tag_reference_type): Use
12310         lookup_lvalue_reference_type() instead of lookup_reference_type().
12311         * eval.c (evaluate_subexp_standard): Likewise.
12312         * f-exp.y: Likewise.
12313         * gdbtypes.c (make_reference_type, lookup_reference_type):
12314         Generalize with rvalue reference types.
12315         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12316         convenience wrappers for lookup_reference_type().
12317         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12318         reference kind parameter.
12319         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12320         wrappers for lookup_reference_type().
12321         * guile/scm-type.c (gdbscm_type_reference): Use
12322         lookup_lvalue_reference_type() instead of lookup_reference_type().
12323         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12324         * parse.c (follow_types): Likewise.
12325         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12326         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12327         Likewise.
12328         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12329         (gdbpy_invoke_xmethod): Likewise.
12330         * stabsread.c: Provide extra argument to make_reference_type()
12331         call.
12332         * valops.c (value_ref, value_rtti_indirect_type): Use
12333         lookup_lvalue_reference_type() instead of lookup_reference_type().
12334
12335 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12336
12337         PR gdb/14441
12338         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12339         (TYPE_IS_REFERENCE): New macro.
12340         (struct type): Add rvalue_reference_type field.
12341         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12342
12343 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12344
12345         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12346         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12347         New function definition.
12348         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12349         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12350         New function declaration.
12351         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12352         * mi/mi-interp.h: New file.
12353         * solib.c (info_sharedlibrary_command): Replace for loop with
12354         ALL_SO_LIBS macro
12355         * solib.h (update_solib_list): New function declaration.
12356         (so_list_head): Move macro.
12357         * solist.h (ALL_SO_LIBS): New macro.
12358
12359 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12360
12361         * infcmd.c (post_create_inferior): Remove unused argument in
12362         call to solib_add.
12363         * remote.c (remote_start_remote): Likewise.
12364         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12365         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12366         (enable_break): Likewise.
12367         * solib.c (update_solib_list): Remove unused target argument
12368         and its documentation.
12369         (solib_add): Remove unused target argument.  Remove unused
12370         argument in call to update_solib_list.
12371         (info_sharedlibrary_command): Remove unused argument in call
12372         to update_solib_list.
12373         (sharedlibrary_command): Remove unused argument in call to
12374         solib_add.
12375         (handle_solib_event): Likewise.
12376         (reload_shared_libraries): Likewise.
12377         * solib.h (solib_add): Remove unused target argument.
12378
12379 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12380
12381         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12382         (s390_displaced_step_fixup): Cover relative branches with the
12383         default fixup handling.  This fixes lack of support for some
12384         relative branch instructions.
12385
12386 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12387
12388         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12389         ptid from regcache.
12390
12391 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12392
12393         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12394         i386_darwin_store_inferior_registers): Use ptid from regcache.
12395
12396 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12397
12398         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12399         i386bsd_store_inferior_registers): Use ptid from regcache.
12400
12401 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12402
12403         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12404         hppaobsd_store_registers): Use ptid from regcache.
12405
12406 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12407
12408         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12409         hppanbsd_store_registers): Use ptid from regcache.
12410
12411 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12412
12413         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12414         from regcache.  Use get_ptrace_pid.
12415
12416 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12417
12418         * corelow.c (get_core_register_section): Use ptid from regcache,
12419         update doc.
12420
12421 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12422
12423         * bsd-uthread.c (bsd_uthread_fetch_registers,
12424         bsd_uthread_store_registers): Use ptid from regcache, set and
12425         restore inferior_ptid.
12426
12427 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12428
12429         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12430         fetch_fp_regs, store_register, store_regs, store_fp_register,
12431         store_fp_regs): Use ptid from regcache.
12432
12433 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12434
12435         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12436         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12437         store_vfp_regs): Use ptid from regcache.
12438
12439 2017-03-17  Pedro Alves  <palves@redhat.com>
12440
12441         PR remote/21188
12442         * ser-base.c (ser_base_wait_for): Add comment.
12443         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12444         version.
12445         * ser-unix.c (hardwire_raw): Remove reference to
12446         scb->current_timeout.
12447         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12448         (hardwire_ops): Install ser_base_readchar instead of
12449         hardwire_readchar.
12450         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12451         Remove fields.
12452
12453 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12454
12455         PR gdb/19637
12456         * python/lib/gdb/printer/bound_registers.py: Add support for
12457         Python 3.
12458
12459 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12460
12461         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12462         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12463         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12464         byte_offset to subobj_byte_offset.  Fix the handling of
12465         DWARF_VALUE_STACK on big-endian targets when coming via an
12466         implicit pointer.
12467         (dwarf2_evaluate_loc_desc): Adjust call to
12468         dwarf2_evaluate_loc_desc_full.
12469         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12470         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12471
12472 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12473
12474         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12475         and REVSH instructions.
12476
12477 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12478
12479         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12480         (arm_record_test): Declare.
12481         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12482         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12483         align with the manual.
12484         (thumb_record_misc): Adjust the code order to align with the
12485         manual.
12486         (thumb2_record_decode_insn_handler): Fix instruction matching.
12487         (instruction_reader_thumb): New class.
12488         (arm_record_test): New function.
12489
12490 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12491
12492         * arm-tdep.c (abstract_memory_reader): New class.
12493         (instruction_reader): New class.
12494         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12495         (decode_insn): Likewise.
12496
12497 2017-03-16  Doug Evans  <dje@google.com>
12498
12499         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12500         member.  Change type of TYPE member to SCM.  All uses updated.
12501         (lsscm_make_lazy_string_smob): Add assert.
12502         (lsscm_make_lazy_string): Flag bad length values.
12503         (lsscm_elt_type): New function.
12504         (gdbscm_lazy_string_to_value): Rewrite to use
12505         lsscm_safe_lazy_string_to_value.
12506         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12507         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12508         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12509         in incoming type.
12510         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12511         * guile/scm-type.c (tyscm_scm_to_type): New function.
12512
12513 2017-03-15  Doug Evans  <dje@google.com>
12514
12515         PR python/17728, python/18439, python/18779
12516         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12517         member.  Change type of TYPE member to PyObject *.  All uses updated.
12518         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12519         (gdbpy_create_lazy_string_object): Flag bad length values.
12520         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12521         Handle typedefs in incoming type.
12522         (stpy_lazy_string_elt_type): New function.
12523         (gdbpy_extract_lazy_string): Call it.
12524         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12525         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12526         typedefs in incoming type.
12527
12528 2017-03-16  Doug Evans  <dje@google.com>
12529
12530         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12531         * guile/scm-type.c (tyscm_scm_to_type): New function.
12532
12533 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12534
12535         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12536         "ULONGEST" for "skip".
12537
12538 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12539
12540         PR gdb/21220
12541         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12542         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12543         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12544         over ptrace peek/poke until end of buffer or error.
12545
12546 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12547
12548         * parse.c (length_of_subexp): Make static.
12549         * parser-defs.h (length_of_subexp): Remove.
12550
12551 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12552
12553         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12554         as well.
12555
12556 2017-03-14  Pedro Alves  <palves@redhat.com>
12557
12558         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12559         (main): Use std::unique_ptr.  Remove calls to
12560         cp_demangled_name_parse_free.
12561
12562 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12563
12564         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12565         alphabsd_store_inferior_registers): Use regcache->ptid instead
12566         of inferior_ptid.
12567
12568 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12569
12570         * aix-thread.c (aix_thread_fetch_registers,
12571         aix_thread_store_registers): Use regcache->ptid instead of
12572         inferior_ptid.
12573
12574 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12575
12576         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12577         store_gregs_to_thread, fetch_fpregs_from_thread,
12578         store_fpregs_to_thread): Use regcache->ptid instead of
12579         inferior_ptid.
12580
12581 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12582
12583         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12584         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12585         instead of inferior_ptid.
12586
12587 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12588
12589         * target.c (target_fetch_registers, target_store_registers): Add
12590         assert.
12591
12592 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12593
12594         * regcache.h (regcache_get_ptid): New function.
12595         * regcache.c (regcache_get_ptid): New function.
12596
12597 2017-03-13  Mark Wielaard  <mark@klomp.org>
12598
12599         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12600
12601 2017-03-10  Keith Seitz  <keiths@redhat.com>
12602
12603         PR c++/8218
12604         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12605
12606 2017-03-08  Pedro Alves  <palves@redhat.com>
12607
12608         PR gdb/18360
12609         * infrun.c (start_step_over, do_target_resume, resume)
12610         (restart_threads): Assert we're not resuming a thread that is
12611         meant to be stopped.
12612         (infrun_thread_stop_requested_callback): Delete.
12613         (infrun_thread_stop_requested): If the thread is internally
12614         stopped, queue a pending stop event and clear the thread's
12615         inline-frame state.
12616         (handle_stop_requested): New function.
12617         (handle_syscall_event, handle_inferior_event_1): Use
12618         handle_stop_requested.
12619         (handle_stop_requested): New function.
12620         (handle_signal_stop): Set the thread's stop_signal here instead of
12621         at caller.
12622         (finish_step_over): Clear step over info unconditionally.
12623         (handle_signal_stop): If the user had interrupted the event
12624         thread, consider the stop a random signal.
12625         (handle_signal_stop) <signal arrived while stepping over
12626         breakpoint>: Don't restart threads here.
12627         (stop_waiting): Don't clear step-over info here.
12628
12629 2017-03-08  Pedro Alves  <palves@redhat.com>
12630
12631         PR 21206
12632         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12633         goes to argument 2, not 1.
12634
12635 2017-03-08  Pedro Alves  <palves@redhat.com>
12636
12637         PR cli/21218
12638         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12639         display_gdb_prompt.
12640         (command_line_input): Add comment.
12641
12642 2017-03-08  Pedro Alves  <palves@redhat.com>
12643
12644         PR tui/21216
12645         * tui/tui-file.c (tui_file::write): New.
12646         * tui/tui-file.h (tui_file): Override "write".
12647         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12648         factored out from ...
12649         (tui_puts): ... here.
12650         (tui_putc): Use them.
12651         (tui_write): New function.
12652         * tui/tui-io.h (tui_write): Declare.
12653
12654 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12655
12656         * Makefile.in (SFILES): Replace "environ.c" with
12657         "common/environ.c".
12658         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12659         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12660         to...
12661         * common/environ.c: ... here.
12662         * environ.h: Moved to...
12663         * common/environ.h: ... here.
12664
12665 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12666
12667         * gdbarch.sh (pstring_ptr): New static function.
12668         (gdbarch_disassembler_options): Use it.
12669         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12670         not valid_disassembler_option->name.
12671         * gdbarch.c: Regenerate.
12672
12673 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12674
12675         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12676
12677 2017-03-07  Pedro Alves  <palves@redhat.com>
12678
12679         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12680
12681 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12682
12683         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12684         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12685         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12686         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12687
12688 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12689
12690         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12691
12692 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12693
12694         * remote.c (remote_add_target_side_commands): Use range-based
12695         for loop.
12696
12697 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12698
12699         PR gdb/21165
12700         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12701         value is lazy.
12702         * valprint.c (common_val_print): Likewise.
12703
12704 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12705
12706         * NEWS: Mention new set/show disassembler-options commands.
12707         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12708         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12709         (prospective_options): New static variable.
12710         (gdb_disassembler::gdb_disassembler): Initialize
12711         m_di.disassembler_options.
12712         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12713         (get_disassembler_options): New function.
12714         (set_disassembler_options): Likewise.
12715         (set_disassembler_options_sfunc): Likewise.
12716         (show_disassembler_options_sfunc): Likewise.
12717         (disassembler_options_completer): Likewise.
12718         (_initialize_disasm): Likewise.
12719         * disasm.h (get_disassembler_options): New prototype.
12720         (set_disassembler_options): Likewise.
12721         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12722         (gdbarch_verify_disassembler_options): Likewise.
12723         * gdbarch.c: Regenerate.
12724         * gdbarch.h: Likewise.
12725         * arm-tdep.c (num_disassembly_options): Delete.
12726         (set_disassembly_style): Likewise.
12727         (arm_disassembler_options): New static variable.
12728         (set_disassembly_style_sfunc): Convert short style name into long
12729         option name.  Call set_disassembler_options.
12730         (show_disassembly_style_sfunc): New function.
12731         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12732         set_gdbarch_verify_disassembler_options.
12733         (_initialize_arm_tdep): Delete regnames variable and update callers.
12734         (arm_disassembler_options): Initialize.
12735         (disasm_options): New variable.
12736         (num_disassembly_options): Rename from this...
12737         (num_disassembly_styles): ...to this.  Compute by scanning through
12738         disasm_options.
12739         (valid_disassembly_styles): Initialize using disasm_options.
12740         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12741         set_arm_regname_option.
12742         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12743         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12744         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12745         set_gdbarch_verify_disassembler_options.
12746         * s390-tdep.c (s390_disassembler_options): New static variable.
12747         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12748         set_gdbarch_verify_disassembler_options.
12749
12750 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12751
12752         * remote.c (remote_add_target_side_condition): Remove "struct"
12753         keyword from range-based for loop.
12754
12755 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12756
12757         * remote.c (remote_add_target_side_condition): Use range-based
12758         for loop.  Update comment.
12759
12760 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12761
12762         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12763
12764 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12765
12766         * regcache.c (regcache_raw_update): New function.
12767         (regcache_raw_read): Move code to regcache_raw_update.
12768         * regcache.h (regcache_raw_update): New declaration.
12769         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12770
12771 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12772
12773         * dwarf2read.c (create_debug_type_hash_table): Initialize
12774         header.signature and header.type_offset_in_tu.
12775
12776 2017-02-24  Pedro Alves  <palves@redhat.com>
12777
12778         * symtab.c (make_file_symbol_completion_list_1): Use
12779         add_symtab_completions.
12780
12781 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12782
12783         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12784
12785 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12786
12787         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12788         I386_MAX_REGISTER_SIZE.
12789         (i386_pseudo_register_write): Likewise.
12790         (i386_process_record): Likewise.
12791         * i387-tdep.c (i387_supply_xsave): Likewise.
12792         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12793         (store_register): Likewise.
12794
12795 2017-02-23  Pedro Alves  <palves@redhat.com>
12796
12797         * ada-lang.c: Include "common/function-view.h".
12798         (ada_iterate_over_symbols): Adjust to use function_view as
12799         callback type.
12800         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12801         (ada_make_symbol_completion_list): Use a lambda.
12802         (ada_exc_search_name_matches): Delete.
12803         (name_matches_regex): New.
12804         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12805         * compile/compile-c-support.c: Include "common/function-view.h".
12806         (print_one_macro): Change prototype to accept a ui_file pointer.
12807         (write_macro_definitions): Use a lambda.
12808         * dwarf2read.c: Include "common/function-view.h".
12809         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12810         (dw2_expand_symtabs_matching): Adjust to use function_view as
12811         callback type.
12812         * language.h: Include "common/function-view.h".
12813         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12814         function_view as callback type.
12815         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12816         * linespec.c: Include "common/function-view.h".
12817         (collect_info::add_symbol): New method.
12818         (struct symbol_and_data_callback, iterate_inline_only, struct
12819         symbol_matcher_data, iterate_name_matcher): Delete.
12820         (iterate_over_all_matching_symtabs): Adjust to use function_view
12821         as callback type and lambdas.
12822         (iterate_over_file_blocks): Adjust to use function_view as
12823         callback type.
12824         (decode_compound_collector): Now a class with private fields.
12825         (decode_compound_collector::release_symbols): New method.
12826         (collect_one_symbol): Rename to...
12827         (decode_compound_collector::operator()): ... this and adjust.
12828         (lookup_prefix_sym): decode_compound_collector construction bits
12829         move to decode_compound_collector ctor.  Pass the
12830         decode_compound_collector object directly as callback.  Remove
12831         cleanups and use decode_compound_collector::release_symbols
12832         instead.
12833         (symtab_collector): Now a class with private fields.
12834         (symtab_collector::release_symtabs): New method.
12835         (add_symtabs_to_list): Rename to...
12836         (symtab_collector::operator()): ... this and adjust.
12837         (collect_symtabs_from_filename): symtab_collector construction
12838         bits move to symtab_collector ctor.  Pass the symtab_collector
12839         object directly as callback.  Remove cleanups and use
12840         symtab_collector::release_symtabs instead.
12841         (collect_symbols): Delete.
12842         (add_matching_symbols_to_info): Use lambdas.
12843         * macrocmd.c (print_macro_callback): Delete.
12844         (info_macro_command): Use a lambda.
12845         (info_macros_command): Pass print_macro_definition as callable
12846         directly.
12847         (print_one_macro): Remove 'ignore' parameter.
12848         (macro_list_command): Adjust.
12849         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12850         (macro_for_each_data::user_data): Delete field.
12851         (foreach_macro): Adjust to call the function_view.
12852         (macro_for_each): Adjust to use function_view as callback type.
12853         (foreach_macro_in_scope): Adjust to call the function_view.
12854         (macro_for_each_in_scope): Adjust to use function_view as callback
12855         type.
12856         * macrotab.h: Include "common/function-view.h".
12857         (macro_callback_fn): Declare a prototype instead of a pointer.
12858         Remove "user_data" parameter.
12859         (macro_for_each, macro_for_each_in_scope): Adjust to use
12860         function_view as callback type.
12861         * psymtab.c (partial_map_expand_apply)
12862         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12863         Adjust to use function_view as callback type and to return bool.
12864         (psym_expand_symtabs_matching): Adjust to use function_view as
12865         callback types.
12866         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12867         to use function_view as callback type and to return bool.
12868         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12869         callback types.
12870         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12871         as callback types.
12872         * symfile.h: Include "common/function-view.h".
12873         (expand_symtabs_file_matcher_ftype)
12874         (expand_symtabs_symbol_matcher_ftype)
12875         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12876         return bool.
12877         (quick_symbol_functions::map_symtabs_matching_filename)
12878         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12879         function_view as callback type and return bool.
12880         (expand_symtabs_matching): Adjust to use function_view as callback
12881         type.
12882         (maintenance_expand_name_matcher)
12883         (maintenance_expand_file_matcher): Delete.
12884         (maintenance_expand_symtabs): Use lambdas.
12885         * symtab.c (iterate_over_some_symtabs): Adjust to use
12886         function_view as callback types and return bool.
12887         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12888         of a cleanup.
12889         (lookup_symtab_callback): Delete.
12890         (lookup_symtab): Use a lambda.
12891         (iterate_over_symbols): Adjust to use function_view as callback
12892         type.
12893         (struct search_symbols_data, search_symbols_file_matches)
12894         (search_symbols_name_matches): Delete.
12895         (search_symbols): Use a pair of lambdas.
12896         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12897         (symtab_expansion_callback): Delete.
12898         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12899         * symtab.h: Include "common/function-view.h".
12900         (iterate_over_some_symtabs): Adjust to use function_view as
12901         callback type and return bool.
12902         (iterate_over_symtabs): Adjust to use function_view as callback
12903         type.
12904         (symbol_found_callback_ftype): Remove 'data' parameter and return
12905         bool.
12906         (iterate_over_symbols): Adjust to use function_view as callback
12907         type.
12908
12909 2017-02-23  Pedro Alves  <palves@redhat.com>
12910
12911         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12912         (%.o) <unittests/%.c>: New pattern.
12913         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12914         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12915         * common/function-view.h: New file.
12916         * unittests/function-view-selftests.c: New file.
12917         * configure: Regenerate.
12918
12919 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12920
12921         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12922         inferior_ptid.
12923         * go32-nat.c (go32_thread_alive): Likewise.
12924
12925 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12926
12927         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12928         delete.
12929
12930 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12931
12932         * varobj.c (varobj_clear_saved_item): Use delete instead of
12933         xfree.
12934         (update_dynamic_varobj_children): Likewise.
12935
12936 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12937
12938         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12939
12940 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12941
12942         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12943         m_enum_value to 0 in default constructor.
12944
12945 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12946
12947         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12948         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12949         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12950         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12951         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12952         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12953         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12954         IS_STORE_CONDITIONAL_INSN.
12955
12956 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12957
12958         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12959
12960 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12961
12962         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12963
12964 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12965
12966         * dwarf2read.c (skip_one_die, read_attribute_value)
12967         (dwarf2_const_value_attr, dump_die_shallow)
12968         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12969         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12970
12971 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12972
12973         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12974         (dwarf_parse_macro_header): Accept DWARF version 5.
12975         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12976
12977 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12978
12979         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12980         DW_AT_GNU_*.
12981         * common/common-exceptions.h (enum errors): Likewise.
12982         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12983         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12984         (dwarf_expr_context::execute_stack_op): Likewise.
12985         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12986         Likewise.
12987         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12988         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12989         (show_entry_values_debug, call_site_to_target_addr)
12990         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12991         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12992         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12993         (value_of_dwarf_block_entry, indirect_pieced_value)
12994         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12995         (disassemble_dwarf_expression): Likewise.
12996         * dwarf2read.c (process_die, inherit_abstract_dies)
12997         (read_call_site_scope): Likewise.
12998         * gdbtypes.h (struct func_type, struct call_site_parameter)
12999         (struct call_site): Likewise.
13000         * stack.c (read_frame_arg): Likewise.
13001         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13002
13003 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13004
13005         * defs.h (read_unsigned_leb128): New declaration.
13006         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13007         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13008         (dwarf2_find_location_expression): Call also
13009         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13010         * dwarf2loc.h (dwarf2_version): New declaration.
13011         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13012         rnglists.
13013         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13014         .debug_rnglists.
13015         (struct dwop_section_names): Add loclists_dwo.
13016         (dwop_section_names): Add .debug_loclists.dwo.
13017         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13018         (struct dwarf2_per_cu_data): Add dwarf_version.
13019         (struct dwo_sections): Add loclists.
13020         (struct attr_abbrev): Add implicit_const.
13021         (read_indirect_line_string): New declaration.
13022         (read_unsigned_leb128): Delete declaration.
13023         (rcuh_kind): New definition.
13024         (read_and_check_comp_unit_head): Change parameter
13025         is_debug_types_section to section_kind.
13026         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13027         (read_comp_unit_head): Change parameter abfd to section, add parameter
13028         section_kind.  Handle DWARF-5.
13029         (error_check_comp_unit_head): Accept also DWARF version 5.
13030         (read_and_check_comp_unit_head): Change parameter
13031         is_debug_types_section to section_kind.
13032         (read_and_check_type_unit_head): Delete function.
13033         (read_abbrev_offset): Handle DWARF-5.
13034         (create_debug_type_hash_table): Add parameter section_kind.  Process
13035         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13036         comp_unit_head.
13037         (create_debug_types_hash_table): Update create_debug_type_hash_table
13038         caller.
13039         (create_all_type_units): Call create_debug_type_hash_table.
13040         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13041         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13042         caller.
13043         (skip_one_die): Handle DW_FORM_implicit_const.
13044         (dwarf2_rnglists_process): New function.
13045         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13046         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13047         (read_attribute_value): Handle DW_FORM_implicit_const,
13048         DW_FORM_line_strp.
13049         (read_attribute): Handle DW_FORM_implicit_const.
13050         (read_indirect_string_at_offset_from): New function from
13051         read_indirect_string_at_offset.
13052         (read_indirect_string_at_offset): Call
13053         read_indirect_string_at_offset_from.
13054         (read_indirect_line_string_at_offset): New function.
13055         (read_indirect_string): New function comment.
13056         (read_indirect_line_string): New function.
13057         (read_unsigned_leb128): Make it global.
13058         (dwarf2_string_attr): Handle DWARF-5.
13059         (add_include_dir_stub, read_formatted_entries): New functions.
13060         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13061         Handle DWARF-5.
13062         (per_cu_header_read_in): Update read_comp_unit_head caller.
13063         (dwarf2_version): New function.
13064         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13065         rnglists.
13066         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13067         fields.
13068
13069 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13070
13071         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13072
13073 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13074
13075         * dwarf2read.c (dwarf2_ranges_process): New function from
13076         dwarf2_ranges_read.
13077         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13078         dwarf2_ranges_process.
13079
13080 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13081
13082         * dwarf2read.c (create_debug_type_hash_table): New function from
13083         create_debug_types_hash_table.
13084         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13085         (create_all_type_units, open_and_init_dwo_file): Update
13086         create_debug_types_hash_table callers.
13087
13088 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13089
13090         PR gdb/16188
13091         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13092         refer to 'ap', not 'args'.
13093
13094 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13095             Pedro Alves  <palves@redhat.com>
13096
13097         PR gdb/16188
13098         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13099         calls succeeded.
13100         * fork-child.c (trace_start_error): New function.
13101         (trace_start_error_with_name): Likewise.
13102         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13103         * inf-ptrace.c (inf_ptrace_me): Likewise.
13104         * inferior.h (trace_start_error): New prototype.
13105         (trace_start_error_with_name): Likewise.
13106
13107 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13108
13109         PR gdb/21164
13110         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13111         NULL before using it.
13112         * symmisc.c (maintenance_print_symbols): Likewise.
13113         (maintenance_print_msymbols): Likewise.
13114
13115 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13116
13117         * NEWS: Add record Python bindings entry.
13118
13119 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13120
13121         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13122         py-record-full.o.
13123         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13124         * python/py-record-btrace.c, python/py-record-btrace.h,
13125         python/py-record-full.c, python/py-record-full.h: New file.
13126         * python/py-record.c: Add include for py-record-btrace.h and
13127         py-record-full.h.
13128         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13129         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13130         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13131         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13132         New definition.
13133         (gdbpy_initialize_btrace): New export.
13134         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13135
13136 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13137
13138         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13139         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13140         * python/py-record.c: New file.
13141         * python/python-internal.h (gdbpy_start_recording,
13142         gdbpy_current_recording, gdpy_stop_recording,
13143         gdbpy_initialize_record): New export.
13144         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13145         (python_GdbMethods): Add gdbpy_start_recording,
13146         gdbpy_current_recording and gdbpy_stop_recording.
13147
13148 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13149
13150         * record-btrace.c (record_btrace_record_method): New function.
13151         (init_record_btrace_ops): Initialize to_record_method.
13152         * record-full.c (record_full_record_method): New function.
13153         (init_record_full_ops, init_record_full_core_ops): Add
13154         record_full_record_method.
13155         * record.h (enum record_method): New enum.
13156         * target-debug.h (target_debug_print_enum_record_method: New define.
13157         * target-delegates.c: Regenerate.
13158         * target.c (target_record_method): New function.
13159         * target.h: Include record.h.
13160         (struct target_ops) <to_record_method>: New field.
13161         (target_record_method): New export.
13162
13163 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13164
13165         * record.h (record_start, record_stop): New export.
13166         * record.c (record_start, record_stop): New function.
13167
13168 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13169
13170         * btrace.c (btrace_fetch): Copy function call segments pointer
13171         into a vector.
13172         (btrace_clear): Clear the vector.
13173         (btrace_find_insn_by_number): Use binary search to find the correct
13174         function call segment.
13175         * btrace.h (brace_fun_p): New typedef.
13176         (struct btrace_thread_info) <functions>: New field.
13177
13178 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13179
13180         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13181         * btrace.c (btrace_decode_error): ... here.  New function.
13182         * btrace.h (btrace_decode_error): New export.
13183
13184 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13185
13186         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13187         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13188         btrace_find_insn_by_number): Remove special case for gaps.
13189         * btrace.h (btrace_insn_get_error): New export.
13190         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13191         * record-btrace.c (btrace_insn_history): Print number for gaps.
13192         (record_btrace_info, record_btrace_goto): Handle gaps.
13193
13194 2017-02-14  Tom Tromey  <tom@tromey.com>
13195
13196         PR python/13598:
13197         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13198         event.
13199         * python/py-evts.c (gdbpy_initialize_py_events): Add
13200         before_prompt registry.
13201         * python/py-events.h (events_object) <before_prompt>: New field.
13202
13203 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13204
13205         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13206
13207 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13208
13209         * symfile (_initialize_symfile): Add usage text to the load command's
13210         help text.
13211
13212 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13213
13214         * utils.c (defaulted_query): Don't query on secondary UIs.
13215
13216 2017-02-10  Tom Tromey  <tom@tromey.com>
13217
13218         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13219
13220 2017-02-10  Tom Tromey  <tom@tromey.com>
13221
13222         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13223         "cleanup" local.
13224         * python/py-type.c (typy_legacy_template_argument): Remove
13225         unnecessary "cleanup" local.
13226
13227 2017-02-10  Tom Tromey  <tom@tromey.com>
13228
13229         * python/python.c (do_start_initialization): New function, from
13230         _initialize_python.
13231         (_initialize_python): Call do_start_initialization.
13232         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13233         goto.
13234
13235 2017-02-10  Tom Tromey  <tom@tromey.com>
13236
13237         * python/py-prettyprint.c (pretty_print_one_value): Use
13238         gdbpy_ref.
13239
13240 2017-02-10  Tom Tromey  <tom@tromey.com>
13241
13242         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13243         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13244         gdbpy_ref.
13245         * python/py-type.c (field_new): Use gdbpy_ref.
13246         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13247         gdbpy_ref.
13248         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13249         (py_free_pspace): Likewise.
13250         (pspace_to_pspace_object): Likewise.
13251         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13252         (py_free_objfile): Likewise.
13253         (objfile_to_objfile_object): Likewise.
13254         * python/py-inferior.c (delete_thread_object): Use
13255         gdbpy_ref.
13256         (infpy_read_memory): Likewise.
13257         (py_free_inferior): Likewise.
13258         * python/py-evtregistry.c (create_eventregistry_object): Use
13259         gdbpy_ref.
13260         * python/py-event.c (create_event_object): Use gdbpy_ref.
13261
13262 2017-02-10  Tom Tromey  <tom@tromey.com>
13263
13264         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13265         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13266         used.
13267         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13268         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13269         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13270         python/py-framefilter.c, python/py-function.c,
13271         python/py-inferior.c, python/py-infevents.c,
13272         python/py-linetable.c, python/py-newobjfileevent.c,
13273         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13274         python/py-signalevent.c, python/py-stopevent.c,
13275         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13276         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13277         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13278         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13279
13280 2017-02-10  Tom Tromey  <tom@tromey.com>
13281
13282         * ui-out.h (ui_out_emit_type): New class.
13283         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13284         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13285         and ui_out_emit_tuple.
13286         (enumerate_locals): Likewise.
13287         (py_mi_print_variables, py_print_locals, py_print_args): Use
13288         ui_out_emit_list.
13289         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13290         ui_out_emit_list.
13291         * common/gdb_optional.h: New file.
13292
13293 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13294
13295         * MAINTAINERS (Write After Approval): Update my e-mail address.
13296
13297 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13298
13299         PR gdb/21122
13300         * breakpoint.c (_initialize_breakpoint): Update the help description
13301         of the 'commands' command to indicate that it takes a list argument.
13302
13303 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13304
13305         * interps.c (current_interp_set_logging): Remove "return".
13306
13307 2017-02-09  Gary Benson  <gbenson@redhat.com>
13308
13309         * symtab.c (add_symtab_completions): Prevent NULL pointer
13310         dereference.
13311
13312 2017-02-08  Pedro Alves  <palves@redhat.com>
13313
13314         * interps.c (interp::interp): Remove reference to quiet_p.
13315         (interp_set): Make static.  Remove dead "Switching to" output
13316         code.
13317         (interp_quiet_p, interp_set_quiet): Delete.
13318         (interpreter_exec_cmd): Don't set the interpreter quiet.
13319         * interps.h (interp_quiet_p): Make static.
13320         (class interp) <quiet_p>: Remove field
13321
13322 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13323
13324         * cli/cli-decode.c (find_command_name_length): Make it extern.
13325         * cli/cli-decode.h (find_command_name_length): Declare.
13326         * cli/cli-script.c (command_name_equals, line_first_arg):
13327         New functions.
13328         (process_next_line): Use cli-decode to parse command names.
13329         (build_command_line): Make args a constant pointer.
13330
13331 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13332
13333         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13334         Remove case-insensitive search.
13335
13336 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13337
13338         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13339         at the end of the line.  Avoids an ARI warning.
13340
13341 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13342
13343         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13344         rdseed instructions.
13345         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13346
13347 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13348
13349         PR tdep/20936
13350         Provide and use sparc32 and sparc64 target description XML files.
13351         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13352         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13353         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13354         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13355         * features/sparc/sparc32-solaris.xml: New file.
13356         * features/sparc/sparc64-solaris.xml: New file.
13357         * features/sparc/sparc32-solaris.c: Generated.
13358         * features/sparc/sparc64-solaris.c: Generated.
13359         * sparc-tdep.h: Account for differences in target descriptions.
13360         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13361         (sparc32_register_type): Use target provided registers.
13362         (validate_tdesc_registers): New function.
13363         (sparc32_gdbarch_init): Use tdesc_has_registers.
13364         Set pseudoregister functions.
13365         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13366         (sparc64_register_type): Use target provided registers.
13367         (sparc64_init_abi): Set pseudoregister functions.
13368
13369 2017-02-03  Tom Tromey  <tom@tromey.com>
13370
13371         PR rust/21097:
13372         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13373         with a single member.
13374
13375 2017-02-03  Pedro Alves  <palves@redhat.com>
13376
13377         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13378         (cli_interp_base::~cli_interp_base): New.
13379         (cli_interp): New struct.
13380         (as_cli_interp): Cast the interp itself to cli_interp.
13381         (cli_interpreter_pre_command_loop): Rename to ...
13382         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13383         parameter.
13384         (cli_interpreter_init): Rename to ...
13385         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13386         boolean.  Make extern.
13387         (cli_interpreter_resume): Rename to ...
13388         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13389         extern.
13390         (cli_interpreter_suspend): Rename to ...
13391         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13392         extern.
13393         (cli_interpreter_exec): Rename to ...
13394         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13395         extern.
13396         (cli_interpreter_supports_command_editing): Rename to ...
13397         (cli_interp_base::supports_command_editing): ... this.  Remove
13398         'interp' parameter.  Make extern.
13399         (cli_ui_out): Rename to ...
13400         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13401         Make extern.
13402         (cli_set_logging): Rename to ...
13403         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13404         parameter.  Make extern.
13405         (cli_interp_procs): Delete.
13406         (cli_interp_factory): Adjust to use "new".
13407         * cli/cli-interp.h: Include "interps.h".
13408         (struct cli_interp_base): New struct.
13409         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13410         (interp_new): Delete.
13411         (interp::interp, interp::~interp): New.
13412         (interp_set): Use bool, and return void.  Assume the interpreter
13413         has suspend, init and resume methods, and that the all return
13414         void.
13415         (set_top_level_interpreter): interp_set returns void.
13416         (interp_ui_out): Adapt.
13417         (current_interp_set_logging): Adapt.
13418         (interp_data): Delete.
13419         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13420         (interp_exec): Adapt.
13421         (top_level_interpreter_data): Delete.
13422         * interps.h (interp_init_ftype, interp_resume_ftype)
13423         (interp_suspend_ftype, interp_exec_ftype)
13424         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13425         (class interp): New.
13426         (interp_new): Delete.
13427         (interp_set): Now returns void.  Use bool.
13428         (interp_data, top_level_interpreter_data): Delete.
13429         * mi/mi-common.h: Include interps.h.
13430         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13431         init, resume, suspect, exec, interp_ui_out, set_logging and
13432         pre_command_loop methods.
13433         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13434         (mi_interpreter_init): Rename to ...
13435         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13436         bool, return void and make extern.  Adjust.
13437         (mi_interpreter_resume): ... Rename to ...
13438         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13439         return void and make extern.  Adjust.
13440         (mi_interpreter_suspend): ... Rename to ...
13441         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13442         return void and make extern.  Adjust.
13443         (mi_interpreter_exec): ... Rename to ...
13444         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13445         extern.  Adjust.
13446         (mi_interpreter_pre_command_loop): ... Rename to ...
13447         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13448         parameter and make extern.
13449         (mi_on_normal_stop_1): Adjust.
13450         (mi_ui_out): Rename to ...
13451         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13452         parameter and make extern.  Adjust.
13453         (mi_set_logging): Rename to ...
13454         (mi_interp::set_logging): ... this.  Remove the 'interp'
13455         parameter and make extern.  Adjust.
13456         (mi_interp_procs): Delete.
13457         (mi_interp_factory): Adjust to use 'new'.
13458         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13459         (mi_print_exception, mi_execute_command, mi_load_progress):
13460         Adjust.
13461         * tui/tui-interp.c (tui_interp): New class.
13462         (as_tui_interp): Return a tui_interp pointer.
13463         (tui_on_normal_stop, tui_on_signal_received)
13464         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13465         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13466         to use interp::interp_ui_out.
13467         (tui_init): Rename to ...
13468         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13469         bool, return void and make extern.  Adjust.
13470         (tui_resume): Rename to ...
13471         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13472         return void and make extern.  Adjust.
13473         (tui_suspend): Rename to ...
13474         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13475         return void and make extern.  Adjust.
13476         (tui_ui_out): Rename to ...
13477         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13478         parameter, and make extern.  Adjust.
13479         (tui_exec): Rename to ...
13480         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13481         make extern.
13482         (tui_interp_procs): Delete.
13483         (tui_interp_factory): Use "new".
13484
13485 2017-02-02  Tom Tromey  <tom@tromey.com>
13486
13487         * rust-exp.y (ends_raw_string, space_then_number)
13488         (rust_identifier_start_p): Return bool.
13489         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13490         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13491         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13492         (rust_chartype_p): Return bool.
13493         (val_print_struct, rust_print_struct_def, rust_print_type):
13494         Update.
13495         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13496         Return bool.
13497
13498 2017-02-02  Tom Tromey  <tom@tromey.com>
13499
13500         * rust-lang.c: Reindent.
13501
13502 2017-02-02  Tom Tromey  <tom@tromey.com>
13503
13504         * rust-lang.h (rust_crate_for_block): Update.
13505         * rust-lang.c (rust_crate_for_block): Return std::string.
13506         (rust_get_disr_info): Use std:;string, not
13507         gdb::unique_xmalloc_ptr.
13508         * rust-exp.y (crate_name): Update.
13509
13510 2017-02-02  Pedro Alves  <palves@redhat.com>
13511
13512         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13513         field out of gdb_disassembler_test and make it static.
13514
13515 2017-02-02  Pedro Alves  <palves@redhat.com>
13516
13517         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13518         mi1_interp and mi_interp fields.
13519
13520 2017-02-02  Pedro Alves  <palves@redhat.com>
13521
13522         * cli/cli-interp.c (struct saved_output_files, saved_output):
13523         Moved from cli/cli-logging.c.
13524         (cli_set_logging): New function.
13525         (cli_interp_procs): Install cli_set_logging.
13526         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13527         Declare.
13528         * cli/cli-logging.c (struct saved_output_files, saved_output):
13529         Moved to cli/cli-interp.c.
13530         (pop_output_files): Don't save outputs here.
13531         (make_logging_output): New function.
13532         (handle_redirections): Don't build tee nor save previous outputs
13533         here.
13534         * interps.c (current_interp_set_logging): Change prototype.
13535         Assume there's always a set_logging_proc method installed.
13536         * interps.h (interp_set_logging_ftype): Change prototype.
13537         (current_interp_set_logging): Change prototype and adjust comment.
13538         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13539         use make_logging_output.
13540         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13541 2017-02-02  Pedro Alves  <palves@redhat.com>
13542
13543         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13544         from ...
13545         (set_logging_overwrite): ... here.
13546         (logging_no_redirect_file): Delete.
13547         (set_logging_redirect): Don't handle redirection on the fly.
13548         Instead warn that "logging off" / "logging on" is necessary.
13549         (pop_output_files): Delete references to logging_no_redirect_file.
13550         (show_logging_command): Always speak in terms of what will happen
13551         once logging is reenabled.
13552
13553 2017-02-02  Pedro Alves  <palves@redhat.com>
13554
13555         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13556
13557 2017-02-02  Pedro Alves  <palves@redhat.com>
13558
13559         * disasm.c (gdb_pretty_print_insn): Rename to ...
13560         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13561         Remove gdbarch parameter.  Adapt to clear the object's buffers
13562         instead of allocating new buffers, and to print using the object's
13563         gdb_disassembler instead of calling gdb_print_insn.
13564         (dump_insns): Use gdb_pretty_print_disassembler.
13565         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13566         (gdb_pretty_print_disassembler): New class.
13567         * record-btrace.c (btrace_insn_history): Use
13568         gdb_pretty_print_disassembler.
13569
13570 2017-02-02  Pedro Alves  <palves@redhat.com>
13571
13572         * ada-lang.c (type_as_string): Use string_file.
13573         * ada-valprint.c (ada_print_floating): Use string_file.
13574         * ada-varobj.c (ada_varobj_scalar_image)
13575         (ada_varobj_get_value_image): Use string_file.
13576         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13577         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13578         * breakpoint.c (update_inserted_breakpoint_locations)
13579         (insert_breakpoint_locations, reattach_breakpoints)
13580         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13581         (print_it_watchpoint): Use string_file.
13582         (save_breakpoints): Use stdio_file.
13583         * c-exp.y (oper): Use string_file.
13584         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13585         tee_file.
13586         (pop_output_files): Use delete.
13587         (handle_redirections): Use stdio_file and tee_file.
13588         * cli/cli-setshow.c (do_show_command): Use string_file.
13589         * compile/compile-c-support.c (c_compute_program): Use
13590         string_file.
13591         * compile/compile-c-symbols.c (generate_vla_size): Take a
13592         'string_file &' instead of a 'ui_file *'.
13593         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13594         of a 'ui_file *'.  Use string_file.
13595         (generate_c_for_variable_locations): Take a 'string_file &'
13596         instead of a 'ui_file *'.
13597         * compile/compile-internal.h (generate_c_for_for_one_variable):
13598         Take a 'string_file &' instead of a 'ui_file *'.
13599         * compile/compile-loc2c.c (push, pushf, unary, binary)
13600         (print_label, pushf_register_address, pushf_register)
13601         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13602         'ui_file *'.  Adjust.
13603         * compile/compile.c (compile_to_object): Use string_file.
13604         * compile/compile.h (compile_dwarf_expr_to_c)
13605         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13606         'ui_file *'.
13607         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13608         (replace_typedefs_qualified_name): Use string_file and
13609         obstack_copy0.
13610         * disasm.c (gdb_pretty_print_insn): Use string_file.
13611         (gdb_disassembly): Adjust reference the null_stream global.
13612         (do_ui_file_delete): Delete.
13613         (gdb_insn_length): Use null_stream.
13614         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13615         * dwarf2loc.c (dwarf2_compile_property_to_c)
13616         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13617         'string_file &' instead of a 'ui_file *'.
13618         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13619         * dwarf2read.c (do_ui_file_peek_last): Delete.
13620         (dwarf2_compute_name): Use string_file.
13621         * event-top.c (gdb_setup_readline): Use stdio_file.
13622         * gdbarch.sh (verify_gdbarch): Use string_file.
13623         * gdbtypes.c (safe_parse_type): Use null_stream.
13624         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13625         string_file.
13626         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13627         'string_file *' instead of a 'ui_file *'.
13628         (gdbscm_arch_disassemble): Use string_file.
13629         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13630         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13631         inherits from ui_file.
13632         (ioscm_file_port_delete, ioscm_file_port_rewind)
13633         (ioscm_file_port_put): Delete.
13634         (ioscm_file_port_write): Rename to ...
13635         (ioscm_file_port::write): ... this.  Remove file_port_magic
13636         checks.
13637         (ioscm_file_port_new): Delete.
13638         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13639         ui_file_up.
13640         * guile/scm-type.c (tyscm_type_name): Use string_file.
13641         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13642         Use string_file.
13643         * infcmd.c (print_return_value_1): Use string_file.
13644         * infrun.c (print_target_wait_results): Use string_file.
13645         * language.c (add_language): Use string_file.
13646         * location.c (explicit_to_string_internal): Use string_file.
13647         * main.c (captured_main_1): Use null_file.
13648         * maint.c (maintenance_print_architecture): Use stdio_file.
13649         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13650         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13651         event_channel>: Change type to mi_console_file pointer.
13652         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13653         (mi_console_file_delete): Delete.
13654         (struct mi_console_file): Delete.
13655         (mi_console_file_magic): Delete.
13656         (mi_console_file_new): Delete.
13657         (mi_console_file::mi_console_file): New.
13658         (mi_console_file_delete): Delete.
13659         (mi_console_file_fputs): Delete.
13660         (mi_console_file::write): New.
13661         (mi_console_raw_packet): Delete.
13662         (mi_console_file::flush): New.
13663         (mi_console_file_flush): Delete.
13664         (mi_console_set_raw): Rename to ...
13665         (mi_console_file::set_raw): ... this.
13666         * mi/mi-console.h (class mi_console_file): New class.
13667         (mi_console_file_new, mi_console_set_raw): Delete.
13668         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13669         (mi_set_logging): Use delete and tee_file.  Adjust.
13670         * mi/mi-main.c (output_register): Use string_file.
13671         (mi_cmd_data_evaluate_expression): Use string_file.
13672         (mi_cmd_data_read_memory): Use string_file.
13673         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13674         * mi/mi-out.c (mi_ui_out::main_stream): New.
13675         (mi_ui_out::rewind): Use main_stream and
13676         string_file.
13677         (mi_ui_out::put): Use main_stream and string_file.
13678         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13679         Allocate a 'string_file' instead.
13680         (mi_out_new): Don't allocate a mem_fileopen stream here.
13681         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13682         (mi_ui_out::main_stream): Declare method.
13683         * printcmd.c (eval_command): Use string_file.
13684         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13685         * python/py-arch.c (archpy_disassemble): Use string_file.
13686         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13687         * python/py-frame.c (frapy_str): Use string_file.
13688         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13689         Use string_file.
13690         * python/py-type.c (typy_str): Use string_file.
13691         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13692         * python/py-value.c (valpy_str): Use string_file.
13693         * record-btrace.c (btrace_insn_history): Use string_file.
13694         * regcache.c (regcache_print): Use stdio_file.
13695         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13696         * remote.c (escape_buffer): Use string_file.
13697         * rust-lang.c (rust_get_disr_info): Use string_file.
13698         * serial.c (serial_open_ops_1): Use stdio_file.
13699         (do_serial_close): Use delete.
13700         * stack.c (print_frame_arg): Use string_file.
13701         (print_frame_args): Remove local mem_fileopen stream, not used.
13702         (print_frame): Use string_file.
13703         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13704         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13705         Take a 'string_file *' instead of a 'ui_file *'.
13706         * top.c (new_ui): Use stdio_file and stderr_file.
13707         (free_ui): Use delete.
13708         (execute_command_to_string): Use string_file.
13709         (quit_confirm): Use string_file.
13710         * tracepoint.c (collection_list::append_exp): Use string_file.
13711         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13712         * tui/tui-file.c: Don't include "ui-file.h".
13713         (enum streamtype, struct tui_stream): Delete.
13714         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13715         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13716         (tui_file::tui_file): New method.
13717         (tui_file_fputs): Delete.
13718         (tui_file_get_strbuf): Delete.
13719         (tui_file::puts): New method.
13720         (tui_file_adjust_strbuf): Delete.
13721         (tui_file_flush): Delete.
13722         (tui_file::flush): New method.
13723         * tui/tui-file.h: Tweak intro comment.
13724         Include ui-file.h.
13725         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13726         (tui_file_adjust_strbuf): Delete declarations.
13727         (class tui_file): New class.
13728         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13729         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13730         (tui_register_format): Use string_stream.
13731         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13732         (tui_get_function_from_frame): Use string_file.
13733         * typeprint.c (type_to_string): Use string_file.
13734         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13735         (null_stream): New global.
13736         (ui_file_delete): Delete.
13737         (ui_file::ui_file): New.
13738         (null_file_isatty): Delete.
13739         (ui_file::~ui_file): New.
13740         (null_file_rewind): Delete.
13741         (ui_file::printf): New.
13742         (null_file_put): Delete.
13743         (null_file_flush): Delete.
13744         (ui_file::putstr): New.
13745         (null_file_write): Delete.
13746         (ui_file::putstrn): New.
13747         (null_file_read): Delete.
13748         (ui_file::putc): New.
13749         (null_file_fputs): Delete.
13750         (null_file_write_async_safe): Delete.
13751         (ui_file::vprintf): New.
13752         (null_file_delete): Delete.
13753         (null_file::write): New.
13754         (null_file_fseek): Delete.
13755         (null_file::puts): New.
13756         (ui_file_data): Delete.
13757         (null_file::write_async_safe): New.
13758         (gdb_flush, ui_file_isatty): Adjust.
13759         (ui_file_put, ui_file_rewind): Delete.
13760         (ui_file_write): Adjust.
13761         (ui_file_write_for_put): Delete.
13762         (ui_file_write_async_safe, ui_file_read): Adjust.
13763         (ui_file_fseek): Delete.
13764         (fputs_unfiltered): Adjust.
13765         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13766         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13767         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13768         (set_ui_file_data): Delete.
13769         (string_file::~string_file, string_file::write)
13770         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13771         (do_ui_file_as_string, ui_file_as_string): Delete.
13772         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13773         (struct mem_file): Delete.
13774         (mem_file_new): Delete.
13775         (stdio_file::stdio_file): New.
13776         (mem_file_delete): Delete.
13777         (stdio_file::stdio_file): New.
13778         (mem_fileopen): Delete.
13779         (stdio_file::~stdio_file): New.
13780         (mem_file_rewind): Delete.
13781         (stdio_file::set_stream): New.
13782         (mem_file_put): Delete.
13783         (stdio_file::open): New.
13784         (mem_file_write): Delete.
13785         (stdio_file_magic, struct stdio_file): Delete.
13786         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13787         (stdio_file::flush): New.
13788         (stdio_file_read): Rename to ...
13789         (stdio_file::read): ... this.  Adjust.
13790         (stdio_file_write): Rename to ...
13791         (stdio_file::write): ... this.  Adjust.
13792         (stdio_file_write_async_safe): Rename to ...
13793         (stdio_file::write_async_safe) ... this.  Adjust.
13794         (stdio_file_fputs): Rename to ...
13795         (stdio_file::puts) ... this.  Adjust.
13796         (stdio_file_isatty): Delete.
13797         (stdio_file_fseek): Delete.
13798         (stdio_file::isatty): New.
13799         (stderr_file_write): Rename to ...
13800         (stderr_file::write) ... this.  Adjust.
13801         (stderr_file_fputs): Rename to ...
13802         (stderr_file::puts) ... this.  Adjust.
13803         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13804         (stderr_file::stderr_file): New.
13805         (tee_file_magic): Delete.
13806         (struct tee_file): Delete.
13807         (tee_file::tee_file): New.
13808         (tee_file_new): Delete.
13809         (tee_file::~tee_file): New.
13810         (tee_file_delete): Delete.
13811         (tee_file_flush): Rename to ...
13812         (tee_file::flush): ... this.  Adjust.
13813         (tee_file_write): Rename to ...
13814         (tee_file::write): ... this.  Adjust.
13815         (tee_file::write_async_safe): New.
13816         (tee_file_fputs): Rename to ...
13817         (tee_file::puts): ... this.  Adjust.
13818         (tee_file_isatty): Rename to ...
13819         (tee_file::isatty): ... this.  Adjust.
13820         * ui-file.h (struct obstack, struct ui_file): Don't
13821         forward-declare.
13822         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13823         (ui_file_write_ftype)
13824         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13825         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13826         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13827         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13828         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13829         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13830         (set_ui_file_fseek): Delete.
13831         (ui_file_data, ui_file_delete, ui_file_rewind)
13832         (struct ui_file): New.
13833         (ui_file_up): New.
13834         (class null_file): New.
13835         (null_stream): Declare.
13836         (ui_file_write_for_put, ui_file_put): Delete.
13837         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13838         Delete.
13839         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13840         (gdb_fopen, tee_file_new): Delete.
13841         (struct string_file): New.
13842         (struct stdio_file): New.
13843         (stdio_file_up): New.
13844         (struct stderr_file): New.
13845         (class tee_file): New.
13846         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13847         of a 'ui_file *'.  Adjust.
13848         * ui-out.h (class ui_out) <field_stream>: Likewise.
13849         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13850         (null_stream): Delete.
13851         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13852         Adjust.
13853         * utils.h (struct ui_file): Delete forward declaration..
13854         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13855         (error_stream): Take a 'string_file &' instead of a
13856         'ui_file *'.
13857         * varobj.c (varobj_value_get_print_value): Use string_file.
13858         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13859         * gdbarch.c: Regenerate.
13860
13861 2017-02-02  Pedro Alves  <palves@redhat.com>
13862
13863         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13864         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13865         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13866         Adjust to call gdb_print_insn instead of
13867         gdb_disassembler::print_insn.
13868         (dump_insns, do_mixed_source_and_assembly_deprecated)
13869         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13870         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13871         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13872         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13873         declaration.
13874         (gdb_pretty_print_insn): Re-add declaration.
13875         * record-btrace.c (btrace_insn_history): Don't allocate a
13876         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13877
13878 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13879
13880         * disasm.h (gdb_disassembly): Remove file_string parameter.
13881         * disasm.c (gdb_disassembly): Likewise.
13882         * cli/cli-cmds.c (print_disassembly): Adapt.
13883         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13884         * stack.c (do_gdb_disassembly): Likewise.
13885
13886 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13887
13888         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13889         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13890         targets.  And if the implicit value is longer than needed, extract
13891         the first bytes instead of the "least significant" ones.
13892
13893 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13894
13895         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13896         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13897         (btrace_fetch): Assert can_access_registers_ptid.
13898         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13899         validate_registers_access.
13900
13901 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13902
13903         * gdbthread.h (can_access_registers_ptid): New.
13904         * thread.c (can_access_registers_ptid): New.
13905
13906 2017-02-01  Pedro Alves  <palves@redhat.com>
13907
13908         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13909
13910 2017-01-31  Pedro Alves  <palves@redhat.com>
13911
13912         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13913         Fix typos.
13914
13915 2017-01-31  Pedro Alves  <palves@redhat.com>
13916
13917         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13918         not used.
13919
13920 2017-01-31  Pedro Alves  <palves@redhat.com>
13921
13922         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13923
13924 2017-01-31  Pedro Alves  <palves@redhat.com>
13925
13926         * common/scoped_restore.h
13927         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13928         change the value's parameter type to T2.
13929         (make_scoped_restore): Likewise.
13930
13931 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13932             Richard Henderson  <rth@redhat.com>
13933
13934         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13935         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13936         GS_BASE for older kernels.
13937         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13938         GS_BASE for older kernels.
13939         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13940         and GS_BASE to the offset table.
13941         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13942         system register group.
13943         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13944         for older kernels.
13945         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13946         amd64 ABI.
13947         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13948         AMD64_GSBASE_REGNUM.
13949         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13950         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13951         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13952         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13953         i386/64bit-segments.xml in those rules.
13954         * features/i386/64bit-segments.xml: New file.
13955         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13956         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13957         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13958         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13959         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13960         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13961         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13962         * features/i386/amd64-avx-linux.c: Regenerated.
13963         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13964         * features/i386/amd64-avx-mpx.c: Regenerated.
13965         * features/i386/amd64-avx512-linux.c: Regenerated.
13966         * features/i386/amd64-linux.c: Regenerated.
13967         * features/i386/amd64-mpx-linux.c: Regenerated.
13968         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13969         * features/i386/i386-avx-mpx.c: Regenerated.
13970         * features/i386/x32-avx-linux.c: Regenerated.
13971         * features/i386/x32-avx512-linux.c: Regenerated.
13972         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13973         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13974         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13975         * regformats/i386/amd64-linux.dat: Regenerated.
13976         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13977         * regformats/i386/x32-avx-linux.dat: Regenerated.
13978         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13979         * regformats/i386/x32-linux.dat: Regenerated.
13980
13981 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13982
13983         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13984         Set to AMD64_NUM_REGS.
13985
13986 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13987
13988         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13989         that checks validity of a register number.
13990
13991 2017-01-27  Kees Cook  <keescook@google.com>
13992
13993         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13994         fetch_fpregs if target has fpa registers.
13995         (arm_linux_store_inferior_registers): Call store_fpregs if target
13996         has fpa registers.
13997
13998 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13999
14000         * cris-tdep.c (cris_gdbarch_init): Remove check for
14001         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14002
14003 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14004
14005         * corelow.c (get_core_register_section): Check for regset
14006         existence before checking for REGSET_VARIABLE_SIZE.
14007
14008 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14009             Pedro Alves  <palves@redhat.com>
14010
14011         PR gdb/20939
14012         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14013         call memory_error, save memaddr instead.
14014         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14015         negative, cal memory_error.
14016         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14017
14018 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14019
14020         * disasm-selftests.c (memory_error_test): New function.
14021         (_initialize_disasm_selftests): Register memory_error_test.
14022
14023 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14024
14025         * Makefile.in (SFILES): Add disasm-selftests.c and
14026         selftest-arch.c.
14027         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14028         * disasm-selftests.c: New file.
14029         * selftest-arch.c: New file.
14030         * selftest-arch.h: New file.
14031
14032 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14033
14034         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14035         to bfd_arch_mep.  Don't return 0 if section is not
14036         found.  Call print_insn_mep.
14037
14038 2017-01-26  Pedro Alves  <palves@redhat.com>
14039             Yao Qi  <yao.qi@linaro.org>
14040
14041         * arm-tdep.c: Include "disasm.h".
14042         (gdb_print_insn_arm): Update code to get gdbarch.
14043         * disasm.c (dis_asm_read_memory): Change it to
14044         gdb_disassembler::dis_asm_read_memory.
14045         (dis_asm_memory_error): Likewise.
14046         (dis_asm_print_address): Likewise.
14047         (gdb_pretty_print_insn): Change it to
14048         gdb_disassembler::pretty_print_insn.
14049         (dump_insns): Add one argument gdb_disassemlber.  All
14050         callers updated.
14051         (do_mixed_source_and_assembly_deprecated): Likewise.
14052         (do_mixed_source_and_assembly): Likewise.
14053         (do_assembly_only): Likewise.
14054         (gdb_disassembler::gdb_disassembler): New.
14055         (gdb_disassembler::print_insn): New.
14056         * disasm.h (class gdb_disassembler): New.
14057         (gdb_pretty_print_insn): Remove declaration.
14058         (gdb_disassemble_info): Likewise.
14059         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14060         (gdbscm_disasm_read_memory_worker): Update.
14061         (gdbscm_disasm_read_memory): Update.
14062         (gdbscm_disasm_memory_error): Remove.
14063         (gdbscm_disasm_print_address): Remove.
14064         (gdbscm_disassembler::gdbscm_disassembler): New.
14065         (gdbscm_print_insn_from_port): Update.
14066         * mips-tdep.c: Include disasm.h.
14067         (gdb_print_insn_mips): Update code to get gdbarch.
14068         * record-btrace.c (btrace_insn_history): Update.
14069         * spu-tdep.c: Include disasm.h.
14070         (struct spu_dis_asm_data): Remove.
14071         (struct spu_dis_asm_info): New.
14072         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14073         SPU id.
14074         (gdb_print_insn_spu): Cast disassemble_info to
14075         spu_dis_asm_info.
14076
14077 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14078
14079         * disasm.c (do_ui_file_delete): Delete.
14080         (gdb_insn_length): Move code creating stream to ...
14081         * utils.c (null_stream): ... here.  New function.
14082         * utils.h (null_stream): Declare.
14083
14084 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14085
14086         * python/py-inferior.c (find_thread_object): Return directly
14087         from the loop.  Remove "found" variable.
14088
14089 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14090
14091         GDB 7.12.1 released.
14092
14093 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14094
14095         * python/py-function.c (fnpy_call): Reorder declarations to have
14096         the gdbpy_enter object declared first.
14097         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14098
14099 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14100
14101         PR python/21068
14102         * python/python-internal.h (PyMem_RawMalloc): Define for
14103         Python < 3.4.
14104         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14105         PyMem_RawMalloc instead of PyMem_Malloc.
14106
14107 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14108             Luis Machado  <lgustavo@codesourcery.com>
14109
14110         * NEWS (New commands): Mention flash-erase.
14111         (New MI commands): Mention target-flash-erase.
14112         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14113         command.
14114         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14115         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14116         * target.c (flash_erase_command): New function.
14117         (initialize_targets): Add new flash-erase command.
14118         * target.h (flash_erase_command): New declaration.
14119
14120 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14121
14122         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14123         HAVE_SYS_PROCFS_H is defined.
14124
14125 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14126
14127         * remote.c (struct cached_reg): Change data into a pointer.
14128         * (stop_reply_dtr): Free data pointers before deleting vector.
14129         (process_stop_reply): Likewise.
14130         (remote_parse_stop_reply): Allocate space for data
14131
14132 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14133
14134         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14135         MAX_REGISTER_SIZE.
14136         (amd64_pseudo_register_read_value): Likewise.
14137         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14138         (store_register_using_P): Likewise.
14139         * regcache.c (regcache_xfer_part): Likewise.
14140
14141 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14142
14143         Split real and pseudo registers.
14144         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14145         (sparc32_pseudo_regnum): New enum.
14146         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14147         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14148         (SPARC32_CP0_REGISTERS): New macro.
14149         (sparc32_pseudo_register_name): New function.
14150         (sparc32_register_name): Use sparc32_pseudo_register_name.
14151         (sparc32_pseudo_register_type): New function.
14152         (sparc32_register_type): Use sparc32_pseudo_register_type.
14153         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14154         pseudo register numbers.
14155         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14156         (SPARC64_CP0_REGISTERS): New macro.
14157         (sparc64_pseudo_register_name): New function.
14158         (sparc64_register_name): Use sparc64_pseudo_register_name.
14159         (sparc64_pseudo_register_type): New function.
14160         (sparc64_register_type): Use sparc64_pseudo_register_type.
14161         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14162         pseudo register numbers.
14163         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14164         sparc64_store_arguments): Handle pseudo register numbers.
14165
14166 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14167
14168         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14169         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14170         output.
14171         (getpkt_or_notif_sane_1): Likewise.
14172
14173 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14174
14175         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14176         of CC.  Pass "-x c++-header" instead of "-x c".
14177
14178 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14179
14180         * remote.c (remote_can_async_p): Update comment.
14181
14182 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14183
14184         * linux-nat.c (linux_nat_can_async_p): Update comment.
14185
14186 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14187
14188         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14189
14190 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14191
14192         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14193
14194 2017-01-10  Tom Tromey  <tom@tromey.com>
14195
14196         * python/py-type.c (typy_legacy_template_argument): Update.
14197         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14198         ~demangle_parse_info): Declare new members.
14199         (cp_demangled_name_to_comp): Return unique_ptr.
14200         (cp_demangled_name_parse_free)
14201         (make_cleanup_cp_demangled_name_parse_free)
14202         (cp_new_demangle_parse_info): Remove.
14203         * cp-support.c (do_demangled_name_parse_free_cleanup)
14204         (make_cleanup_cp_demangled_name_parse_free): Remove.
14205         (inspect_type, cp_canonicalize_string_full)
14206         (cp_canonicalize_string): Update.
14207         (mangled_name_to_comp): Change return type.
14208         (cp_class_name_from_physname, method_name_from_physname)
14209         (cp_func_name, cp_remove_params): Update.
14210         * cp-name-parser.y (demangle_parse_info): New constructor, from
14211         cp_new_demangle_parse_info.
14212         (~demangle_parse_info): New destructor, from
14213         cp_demangled_name_parse_free.
14214         (cp_merge_demangle_parse_infos): Update.
14215         (cp_demangled_name_to_comp): Change return type.
14216
14217 2017-01-10  Tom Tromey  <tom@tromey.com>
14218
14219         * top.c (prevent_dont_repeat): Change return type.
14220         * python/python.c (execute_gdb_command): Use std::string.
14221         Update.
14222         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14223         * command.h (prevent_dont_repeat): Change return type.
14224         * breakpoint.c (bpstat_do_actions_1): Update.
14225
14226 2017-01-10  Tom Tromey  <tom@tromey.com>
14227
14228         * value.h (scoped_value_mark::~scoped_value_mark): Call
14229         free_to_mark.
14230         (scoped_value_mark::free_to_mark): New method.
14231         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14232         scoped_value_mark.
14233
14234 2017-01-10  Tom Tromey  <tom@tromey.com>
14235
14236         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14237         (valpy_reference_value, valpy_const_value, valpy_get_address)
14238         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14239         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14240         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14241         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14242         scoped_value_mark.
14243         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14244         * value.h (scoped_value_mark): New class.
14245
14246 2017-01-10  Tom Tromey  <tom@tromey.com>
14247
14248         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14249         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14250         * psymtab.c (discard_psymtabs_upto): Remove.
14251         (make_cleanup_discard_psymtabs): Remove.
14252         (struct psymtab_state): Remove.
14253
14254 2017-01-10  Tom Tromey  <tom@tromey.com>
14255
14256         * record-full.c (record_full_save_cleanups): Remove.
14257         (record_full_save): Use gdb::unlinker.
14258         * gcore.c (do_bfd_delete_cleanup): Remove.
14259         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14260         cleanups.
14261         * dwarf2read.c (unlink_if_set): Remove.
14262         (write_psymtabs_to_index): Use gdb::unlinker.
14263         * common/gdb_unlinker.h: New file.
14264
14265 2017-01-10  Tom Tromey  <tom@tromey.com>
14266
14267         * windows-tdep.c (windows_xfer_shared_library): Update.
14268         * windows-nat.c (windows_make_so): Update.
14269         * utils.h (make_cleanup_bfd_unref): Remove.
14270         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14271         * symfile.h (symfile_bfd_open)
14272         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14273         * symfile.c (read_symbols, symbol_file_add)
14274         (separate_debug_file_exists): Update.
14275         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14276         (generic_load, reread_symbols): Update.
14277         * symfile-mem.c (symbol_file_add_from_memory): Update.
14278         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14279         (spu_symbol_file_add_from_memory): Update.
14280         * solist.h (struct target_so_ops) <bfd_open>: Return
14281         gdb_bfd_ref_ptr.
14282         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14283         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14284         gdb_bfd_ref_ptr.
14285         (solib_map_sections, reload_shared_libraries_1): Update.
14286         * solib-svr4.c (enable_break): Update.
14287         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14288         * solib-frv.c (enable_break2): Update.
14289         * solib-dsbt.c (enable_break): Update.
14290         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14291         gdb_bfd_ref_ptr.
14292         (darwin_solib_get_all_image_info_addr_at_init): Update.
14293         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14294         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14295         * record-full.c (record_full_save): Update.
14296         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14297         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14298         * minidebug.c (find_separate_debug_file_in_section): Return
14299         gdb_bfd_ref_ptr.
14300         * machoread.c (macho_add_oso_symfile): Change abfd to
14301         gdb_bfd_ref_ptr.
14302         (macho_symfile_read_all_oso): Update.
14303         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14304         (macho_symfile_read): Update.
14305         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14306         (jit_bfd_try_read_symtab): Update.
14307         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14308         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14309         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14310         gdb_bfd_ref_ptr.
14311         (gdb_bfd_ref_policy): New struct.
14312         (gdb_bfd_ref_ptr): New typedef.
14313         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14314         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14315         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14316         gdb_bfd_ref_ptr.
14317         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14318         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14319         (gcore_command): Update.
14320         * exec.c (exec_file_attach): Update.
14321         * elfread.c (elf_symfile_read): Update.
14322         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14323         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14324         (open_and_init_dwo_file): Update.
14325         (open_dwp_file): Return gdb_bfd_ref_ptr.
14326         (open_and_init_dwp_file): Update.
14327         * corelow.c (core_open): Update.
14328         * compile/compile-object-load.c (compile_object_load): Update.
14329         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14330         * coffread.c (coff_symfile_read): Update.
14331         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14332         gdb_bfd_ref_ptr.  Rename.
14333         (dump_bfd_file, restore_command): Update.
14334         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14335         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14336         (find_separate_debug_file_by_buildid): Update.
14337
14338 2017-01-10  Tom Tromey  <tom@tromey.com>
14339
14340         * common/gdb_ref_ptr.h: New file.
14341         * python/py-ref.h (struct gdbpy_ref_policy): New.
14342         (gdbpy_ref): Now a typedef.
14343
14344 2017-01-10  Tom Tromey  <tom@tromey.com>
14345
14346         * utils.h (make_cleanup_htab_delete): Don't declare.
14347         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14348         Remove.
14349         * linespec.c (decode_compound_collector): Add constructor,
14350         destructor.
14351         (lookup_prefix_sym): Remove cleanup.
14352         (symtab_collector): Add constructor, destructor.
14353         (collect_symtabs_from_filename): Remove cleanup.
14354         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14355         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14356         Use htab_up.
14357         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14358         * dwarf2read.c (dw2_expand_symtabs_matching)
14359         (dw2_map_symbol_filenames, dwarf_decode_macros)
14360         (write_psymtabs_to_index): Use htab_up.
14361         * dwarf2loc.c (func_verify_no_selftailcall)
14362         (call_site_find_chain_1, func_verify_no_selftailcall)
14363         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14364         std::vector, gdb::unique_xmalloc_ptr.
14365         (call_sitep): Remove typedef.
14366         (dwarf2_locexpr_baton_eval): Remove unused variable.
14367
14368 2017-01-10  Tom Tromey  <tom@tromey.com>
14369
14370         * python/python-internal.h (make_cleanup_py_decref)
14371         (make_cleanup_py_xdecref): Don't declare.
14372         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14373         (py_xdecref, make_cleanup_py_xdecref): Remove.
14374
14375 2017-01-10  Tom Tromey  <tom@tromey.com>
14376
14377         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14378         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14379
14380 2017-01-10  Tom Tromey  <tom@tromey.com>
14381
14382         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14383
14384 2017-01-10  Tom Tromey  <tom@tromey.com>
14385
14386         * python/py-utils.c (unicode_to_encoded_string)
14387         (python_string_to_target_string)
14388         (python_string_to_target_python_string)
14389         (python_string_to_host_string, gdbpy_obj_to_string)
14390         (get_addr_from_python): Use gdbpy_ref.
14391
14392 2017-01-10  Tom Tromey  <tom@tromey.com>
14393
14394         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14395         gdbpy_ref.
14396
14397 2017-01-10  Tom Tromey  <tom@tromey.com>
14398
14399         * python/python.c (eval_python_command, gdbpy_decode_line)
14400         (gdbpy_run_events, gdbpy_start_type_printers)
14401         (gdbpy_apply_type_printers): Use gdbpy_ref.
14402
14403 2017-01-10  Tom Tromey  <tom@tromey.com>
14404
14405         * python/py-param.c (get_doc_string, compute_enum_values): Use
14406         gdbpy_ref.
14407
14408 2017-01-10  Tom Tromey  <tom@tromey.com>
14409
14410         * python/py-inferior.c (find_thread_object, build_inferior_list):
14411         Use gdbpy_ref.
14412
14413 2017-01-10  Tom Tromey  <tom@tromey.com>
14414
14415         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14416
14417 2017-01-10  Tom Tromey  <tom@tromey.com>
14418
14419         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14420         gdbpy_ref.
14421
14422 2017-01-10  Tom Tromey  <tom@tromey.com>
14423
14424         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14425         extra incref.
14426         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14427         Use gdbpy_ref.
14428
14429 2017-01-10  Tom Tromey  <tom@tromey.com>
14430
14431         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14432         gdbpy_ref.
14433
14434 2017-01-10  Tom Tromey  <tom@tromey.com>
14435
14436         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14437         decref results of PyArg_ParseTupleAndKeywords.
14438
14439 2017-01-10  Tom Tromey  <tom@tromey.com>
14440
14441         * python/python.c (python_run_simple_file): Use
14442         unique_xmalloc_ptr, gdbpy_ref.
14443
14444 2017-01-10  Tom Tromey  <tom@tromey.com>
14445
14446         * python/py-prettyprint.c (print_stack_unless_memory_error)
14447         (print_string_repr, print_children): Use gdbpy_ref.
14448         (dummy_python_frame): New class.
14449         (dummy_python_frame::dummy_python_frame): Rename from
14450         push_dummy_python_frame.
14451         (py_restore_tstate): Remove.
14452
14453 2017-01-10  Tom Tromey  <tom@tromey.com>
14454
14455         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14456
14457 2017-01-10  Tom Tromey  <tom@tromey.com>
14458
14459         * python/python.c (ensure_python_env, restore_python_env):
14460         Remove.
14461         * python/python-internal.h (ensure_python_env): Don't declare.
14462         * varobj.h (varobj_ensure_python_env): Don't declare.
14463         * varobj.c (varobj_ensure_python_env): Remove.
14464
14465 2017-01-10  Tom Tromey  <tom@tromey.com>
14466
14467         * varobj.c (varobj_value_get_print_value): Use
14468         gdbpy_enter_varobj.
14469
14470 2017-01-10  Tom Tromey  <tom@tromey.com>
14471
14472         * python/py-prettyprint.c (print_string_repr, print_children):
14473         Update.
14474         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14475         of "encoding".
14476         * varobj.c (varobj_value_get_print_value): Update.
14477         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14478
14479 2017-01-10  Tom Tromey  <tom@tromey.com>
14480
14481         * varobj.c (varobj_get_display_hint)
14482         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14483         (varobj_set_visualizer, free_variable): Use
14484         gdbpy_enter_varobj.
14485
14486 2017-01-10  Tom Tromey  <tom@tromey.com>
14487
14488         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14489         (do_finish_initialization): New function.  Use gdbpy_ref.
14490         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14491         do_finish_initialization.
14492
14493 2017-01-10  Tom Tromey  <tom@tromey.com>
14494
14495         * python/py-param.c (get_set_value, get_show_value): Use
14496         gdbpy_enter, gdbpy_ref.
14497
14498 2017-01-10  Tom Tromey  <tom@tromey.com>
14499
14500         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14501
14502 2017-01-10  Tom Tromey  <tom@tromey.com>
14503
14504         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14505
14506 2017-01-10  Tom Tromey  <tom@tromey.com>
14507
14508         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14509         Use gdbpy_enter_varobj.
14510
14511 2017-01-10  Tom Tromey  <tom@tromey.com>
14512
14513         * varobj.c (gdbpy_enter_varobj): New constructor.
14514         * python/python-internal.h (gdbpy_enter_varobj): New class.
14515         * python/py-varobj.c (py_varobj_get_iterator): Use
14516         gdbpy_enter_varobj.
14517
14518 2017-01-10  Tom Tromey  <tom@tromey.com>
14519
14520         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14521         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14522         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14523         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14524         unique_xmalloc_ptr.
14525         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14526
14527 2017-01-10  Tom Tromey  <tom@tromey.com>
14528
14529         * python/py-xmethods.c (invoke_match_method): Use
14530         gdbpy_ref.
14531
14532 2017-01-10  Tom Tromey  <tom@tromey.com>
14533
14534         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14535         gdbpy_enter, gdbpy_ref.
14536
14537 2017-01-10  Tom Tromey  <tom@tromey.com>
14538
14539         * python/python.c (python_interactive_command): Use gdbpy_enter.
14540
14541 2017-01-10  Tom Tromey  <tom@tromey.com>
14542
14543         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14544         gdbpy_ref.
14545
14546 2017-01-10  Tom Tromey  <tom@tromey.com>
14547
14548         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14549         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14550
14551 2017-01-10  Tom Tromey  <tom@tromey.com>
14552
14553         * utils.h (htab_deleter): New struct.
14554         (htab_up): New typedef.
14555         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14556         gdbpy_enter, gdbpy_ref, htab_up.
14557
14558 2017-01-10  Tom Tromey  <tom@tromey.com>
14559
14560         * python/py-unwind.c (pending_frame_invalidate): Remove.
14561         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14562
14563 2017-01-10  Tom Tromey  <tom@tromey.com>
14564
14565         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14566         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14567
14568 2017-01-10  Tom Tromey  <tom@tromey.com>
14569
14570         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14571
14572 2017-01-10  Tom Tromey  <tom@tromey.com>
14573
14574         * python/python.c (gdbpy_eval_from_control_command)
14575         (gdbpy_source_script, gdbpy_run_events)
14576         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14577         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14578         gdbpy_enter.
14579
14580 2017-01-10  Tom Tromey  <tom@tromey.com>
14581
14582         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14583
14584 2017-01-10  Tom Tromey  <tom@tromey.com>
14585
14586         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14587
14588 2017-01-10  Tom Tromey  <tom@tromey.com>
14589
14590         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14591         (python_on_inferior_call_pre, python_on_inferior_call_post)
14592         (python_on_memory_change, python_on_register_change)
14593         (python_inferior_exit, python_new_objfile, add_thread_object)
14594         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14595
14596 2017-01-10  Tom Tromey  <tom@tromey.com>
14597
14598         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14599         (bpfinishpy_handle_exit): Use gdbpy_enter.
14600
14601 2017-01-10  Tom Tromey  <tom@tromey.com>
14602
14603         * python/py-cmd.c (cmdpy_destroyer)
14604         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14605         gdbpy_enter.
14606
14607 2017-01-10  Tom Tromey  <tom@tromey.com>
14608
14609         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14610         gdbpy_enter.
14611         (gdbpy_breakpoint_has_cond): Likewise.
14612
14613 2017-01-10  Tom Tromey  <tom@tromey.com>
14614
14615         * python/python.c (gdbpy_enter): New constructor.
14616         (~gdbpy_enter): New destructor.
14617         (restore_python_env, ensure_python_env): Rewrite.
14618         * python/python-internal.h (gdbpy_enter): New class.
14619
14620 2017-01-10  Tom Tromey  <tom@tromey.com>
14621
14622         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14623
14624 2017-01-10  Tom Tromey  <tom@tromey.com>
14625
14626         * python/py-value.c (value_has_field, get_field_flag)
14627         (get_field_type, valpy_getitem, convert_value_from_python): Use
14628         gdbpy_ref.
14629
14630 2017-01-10  Tom Tromey  <tom@tromey.com>
14631
14632         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14633         gdbpy_ref.
14634
14635 2017-01-10  Tom Tromey  <tom@tromey.com>
14636
14637         * python/py-prettyprint.c (search_pp_list)
14638         (find_pretty_printer_from_objfiles)
14639         (find_pretty_printer_from_progspace)
14640         (find_pretty_printer_from_gdb, find_pretty_printer)
14641         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14642         gdbpy_ref.
14643
14644 2017-01-10  Tom Tromey  <tom@tromey.com>
14645
14646         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14647
14648 2017-01-10  Tom Tromey  <tom@tromey.com>
14649
14650         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14651         (ltpy_get_all_source_lines): Use gdbpy_ref.
14652
14653 2017-01-10  Tom Tromey  <tom@tromey.com>
14654
14655         * python/py-framefilter.c (extract_sym, extract_value)
14656         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14657         gdbpy_ref.
14658
14659 2017-01-10  Tom Tromey  <tom@tromey.com>
14660
14661         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14662
14663 2017-01-10  Tom Tromey  <tom@tromey.com>
14664
14665         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14666
14667 2017-01-10  Tom Tromey  <tom@tromey.com>
14668
14669         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14670         gdbpy_ref.
14671
14672 2017-01-10  Tom Tromey  <tom@tromey.com>
14673
14674         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14675
14676 2017-01-10  Tom Tromey  <tom@tromey.com>
14677
14678         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14679         (typy_range): Use gdbpy_ref.
14680
14681 2017-01-10  Tom Tromey  <tom@tromey.com>
14682
14683         * python/py-threadevent.c (create_thread_event_object): Use
14684         gdbpy_ref.
14685         * python/py-stopevent.c (create_stop_event_object): Simplify.
14686         (emit_stop_event): Use gdbpy_ref.
14687         * python/py-signalevent.c (create_signal_event_object): Use
14688         gdbpy_ref.
14689         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14690         (emit_new_objfile_event, create_clear_objfiles_event_object)
14691         (emit_clear_objfiles_event): Use gdbpy_ref.
14692         * python/py-infevents.c (create_inferior_call_event_object)
14693         (create_register_changed_event_object)
14694         (create_memory_changed_event_object, emit_inferior_call_event)
14695         (emit_memory_changed_event, emit_register_changed_event): Use
14696         gdbpy_ref.
14697         * python/py-exitedevent.c (create_exited_event_object)
14698         (emit_exited_event): Use gdbpy_ref.
14699         * python/py-event.h (evpy_emit_event): Remove
14700         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14701         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14702         * python/py-continueevent.c (emit_continue_event): Use
14703         gdbpy_ref.
14704         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14705         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14706         gdbpy_ref.
14707         * python/py-bpevent.c (create_breakpoint_event_object): Use
14708         gdbpy_ref.
14709
14710 2017-01-10  Tom Tromey  <tom@tromey.com>
14711
14712         * python/py-ref.h: New file.
14713
14714 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14715
14716         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14717         void.
14718         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14719         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14720         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14721         * ui-out.c (ui_out::redirect): Likewise.
14722         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14723         * cli/cli-logging.c (set_logging_redirect): Update call site of
14724         ui_out::redirect.
14725         (handle_redirections): Likewise.
14726         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14727         * top.c (execute_command_to_string): Likewise.
14728         * utils.c (do_ui_out_redirect_pop): Likewise.
14729
14730 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14731
14732         * stack.c (_initialize_stack): Update "frame" command help message.
14733
14734 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14735
14736         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14737
14738 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14739
14740         * x86-linux-nat.h: Include gdb_proc_service.h.
14741
14742 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14743
14744         * ser-base.h: Include serial.h.
14745
14746 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14747
14748         * ppc-linux-tdep.h: Include ppc-tdep.h.
14749
14750 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14751
14752         * nat/amd64-linux-siginfo.h: Include signal.h.
14753
14754 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14755
14756         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14757
14758 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14759
14760         * mi/mi-parse.h: Include mi-cmds.h.
14761
14762 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14763
14764         * inf-loop.c: Don't include "target.h".
14765         * inf-loop.h: Include it here.
14766
14767 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14768
14769         * dfp.h: Include "dboulest.h" and "expression.h".
14770
14771 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14772
14773         * ax-gdb.h: Include "ax.h".
14774
14775 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14776
14777         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14778         with nat/gdb_ptrace.h.
14779
14780 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14781
14782         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14783         new line.
14784         (mips64_fbsd_sigframe_init): Likewise.
14785
14786 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14787
14788         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14789         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14790
14791 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14792
14793         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14794         * NEWS: Mention new FreeBSD/mips native configuration.
14795         * config/mips/fbsd.mh: New file.
14796         * configure.host: Add mips*-*-freebsd*.
14797         * mips-fbsd-nat.c: New file.
14798
14799 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14800
14801         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14802         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14803         * NEWS: Mention new FreeBSD/mips target.
14804         * configure.tgt: Add mips*-*-freebsd*.
14805         * mips-fbsd-tdep.c: New file.
14806         * mips-fbsd-tdep.h: New file.
14807
14808 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14809
14810         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14811         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14812
14813 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14814
14815         Update copyright year range in all GDB files.
14816
14817 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14818
14819         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14820
14821 For older changes see ChangeLog-2016.
14822 \f
14823 Local Variables:
14824 mode: change-log
14825 left-margin: 8
14826 fill-column: 74
14827 version-control: never
14828 coding: utf-8
14829 End: