Make breakpoint/location number parsing error output consistent
[external/binutils.git] / gdb / ChangeLog
1 2017-11-07  Pedro Alves  <palves@redhat.com>
2
3         * breakpoint.c (extract_bp_kind): New enum.
4         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
5         factored out from ...
6         (extract_bp_number_and_location): ... here.
7         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
8
9 2017-11-07  Pedro Alves  <palves@redhat.com>
10
11         * breakpoint.c (extract_bp_number_and_location): Change return
12         type to void.  Throw error instead of warning.
13         (enable_disable_command): Adjust.
14
15 2017-11-07  Xavier Roirand  <roirand@adacore.com>
16             Pedro Alves  <palves@redhat.com>
17
18         * breakpoint.c (map_breakpoint_number_range): New, factored out
19         from ...
20         (map_breakpoint_numbers): ... here.
21         (find_location_by_number): Change parameters from string to
22         breakpoint number and location.
23         (extract_bp_number_and_location): New function.
24         (enable_disable_bp_num_loc)
25         (enable_disable_breakpoint_location_range)
26         (enable_disable_command): New functions, factored out ...
27         (enable_command, disable_command): ... these functions, and
28         adjusted to support ranges.
29         * NEWS: Document enable/disable breakpoint location range feature.
30
31 2017-11-06  Luis Machado  <luis.machado@linaro.org>
32
33         * MAINTAINERS (Write After Approval): Update my e-mail address.
34
35 2017-11-06  Pedro Alves  <palves@redhat.com>
36
37         * gnu-nat.c (gnu_terminal_init): Delete.
38         (gnu_target): Don't install gnu_terminal_init.
39         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
40         (child_terminal_init): ... this function.
41
42 2017-11-06  Pedro Alves  <palves@redhat.com>
43
44         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
45         sgtty.h.
46         * config.in, configure: Regenerate.
47
48 2017-11-06  Pedro Alves  <palves@redhat.com>
49
50         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
51         (async_init_signals): Adjust.
52         (handle_stop_sig): Rename to ...
53         (handle_sigtstp): ... this.
54         (async_stop_sig): Rename to ...
55         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
56         SIGTSTP path.
57         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
58         instead of STOP_SIGNAL thoughout.
59         (handle_stop_sig): Rename to ...
60         (handle_sigtstp): ... this.
61         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
62
63 2017-11-06  Pedro Alves  <palves@redhat.com>
64
65         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
66         longer set flags twice in row.
67
68 2017-11-06  Pedro Alves  <palves@redhat.com>
69
70         * Makefile.in (SER_HARDWIRE): Update comment.
71         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
72         * common/gdb_termios.h: Delete file.
73         * common/job-control.c: Include termios.h and unistd.h instead of
74         gdb_termios.h.
75         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
76         check.
77         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
78         Remove sgtty code.
79         * configure.ac: No longer check for termio.h and sgtty.h.
80         * configure: Regenerate.
81         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
82         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
83         Replace PROCESS_GROUP_TYPE references with pid_t references
84         throughout.
85         (gdb_getpgrp): Delete.
86         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
87         (child_terminal_inferior): Remove comment.  Remove sgtty code.
88         (child_terminal_ours_1): Use tcgetpgrp directly instead of
89         gdb_getpgrp.  Use serial_set_tty_state instead aof
90         serial_noflush_set_tty_state.  Remove sgtty code.
91         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
92         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
93         (inferior_process_group): Now returns pid_t.
94         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
95         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
96         * ser-event.c (serial_event_ops): Update.
97         * ser-go32.c (dos_noflush_set_tty_state): Delete.
98         (dos_ops): Update.
99         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
100         * ser-pipe.c (pipe_ops): Update.
101         * ser-tcp.c (tcp_ops): Update.
102         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
103         HAVE_TERMIOS checks.
104         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
105         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
106         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
107         assume termios.
108         (hardwire_noflush_set_tty_state): Delete.
109         (hardwire_print_tty_state, hardwire_drain_output)
110         (hardwire_flush_output, hardwire_flush_input)
111         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
112         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
113         code, and assume termios.
114         (hardwire_ops): Update.
115         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
116         * serial.c (serial_noflush_set_tty_state): Delete.
117         * serial.h (serial_noflush_set_tty_state): Delete.
118         (serial_ops::noflush_set_tty_state): Delete.
119
120 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
121
122         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
123         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
124         (COMMON_OBS): Remove doublest.o and dfp.o.
125         Do not build target-float.c (instead of doublest.c)
126         with -Wformat-nonliteral.
127
128         * doublest.c: Remove file.
129         * doublest.h: Remove file.
130         * dfp.c: Remove file.
131         * dfp.h: Remove file.
132
133         * target-float.c: Do not include "doublest.h" and "dfp.h".
134         (DOUBLEST): Move here from doublest.h.
135         (enum float_kind): Likewise.
136         (FLOATFORMAT_CHAR_BIT): Likewise.
137         (FLOATFORMAT_LARGEST_BYTES): Likewise.
138         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
139         (floatformat_precision): Likewise.
140         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
141         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
142         Likewise.
143         (host_float_format, host_double_format, host_long_double_format):
144         Likewise.
145         (floatformat_to_string, floatformat_from_string): Likewise.
146         (floatformat_to_doublest): Likewise.  Also, inline the original
147         convert_floatformat_to_doublest.
148         (floatformat_from_doublest): Likewise.  Also, inline the original
149         convert_floatformat_from_doublest.
150
151         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
152         (MAX_DECIMAL_STRING): Move here from dfp.c.
153         (match_endianness): Likewise.
154         (set_decnumber_context, decimal_check_errors): Likewise.
155         (decimal_from_number, decimal_to_number): Likewise.
156         (decimal_to_string, decimal_from_string): Likewise.  Make static.
157         (decimal_from_longest, decimal_from_ulongest): Likewise.
158         (decimal_to_longest): Likewise.
159         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
160         (decimal_convert): Likewise.
161
162 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
163
164         * doublest.c: Do not include "gdbtypes.h".
165         (extract_typed_floating): Remove.
166         (store_typed_floating): Remove.
167         (convert_typed_floating): Remove.
168         * doublest.h (struct type): Remove.
169         (DOUBLEST_PRINT_FORMAT): Remove.
170         (DOUBLEST_SCAN_FORMAT): Remove.
171         (extract_typed_floating): Remove.
172         (store_typed_floating): Remove.
173         (convert_typed_floating): Remove.
174
175         * dfp.c (decimal_from_doublest): Remove.
176         (decimal_to_doublest): Remove.
177         * dfp.h: Do not include "doublest.h".
178         (decimal_from_doublest): Remove.
179         (decimal_to_doublest): Remove.
180
181         * value.c: Do not include "doublest.h" and "dfp.h".
182         (value_as_double): Remove.
183         (unpack_double): Remove.
184         (value_from_double): Remove.
185         (value_from_decfloat): Remove.
186         * value.h: Do not include "doublest.h".
187         (value_as_double): Remove.
188         (unpack_double): Remove.
189         (value_from_double): Remove.
190         (value_from_decfloat): Remove.
191
192 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
193
194         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
195         (i386_extract_return_value): Use target_float_convert.
196         (i386_store_return_value): Likewise.
197         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
198         (i387_value_to_register): Likewise.
199         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
200         (ia64_register_to_value): Use target_float_convert.
201         (ia64_value_to_register): Likewise.
202         (ia64_extract_return_value): Likewise.
203         (ia64_store_return_value): Likewise.
204         (ia64_push_dummy_call): Likewise.
205         * m68k-tdep.c: Include "target-float.h".
206         (m68k_register_to_value): Use target_float_convert.
207         (m68k_value_to_register): Likewise.
208         (m68k_svr4_extract_return_value): Likewise.
209         (m68k_svr4_store_return_value): Likewise.
210         * ppc-sysv-tdep.c: Include "target-float.h".
211         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
212         (do_ppc_sysv_return_value): Likewise.
213         (ppc64_sysv_abi_push_freg): Likewise.
214         (ppc64_sysv_abi_return_value_base): Likewise.
215         * rs6000-aix-tdep.c: Include "target-float.h".
216         (rs6000_push_dummy_call): Use target_float_convert.
217         (rs6000_return_value): Likewise.
218         * rs6000-lynx178-tdep.c: Include "target-float.h".
219         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
220         (rs6000_lynx178_return_value): Likewise.
221         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
222         (rs6000_register_to_value): Use target_float_convert.
223         (rs6000_value_to_register): Likewise.
224         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
225         (arm_extract_return_value): Use target_float_convert.
226         (arm_store_return_value): Likewise.
227         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
228         (sh_register_convert_to_virtual): Use target_float_convert.
229         (sh_register_convert_to_raw): Likewise.
230         * sh64-tdep.c: Include "target-float.h".
231         (sh64_extract_return_value): Use target_float_convert.
232         (sh64_register_convert_to_virtual): Likewise.
233         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
234
235 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
236
237         * target-float.c (floatformat_to_host_double): New function.
238         (floatformat_from_host_double): Likewise.
239         (target_float_to_host_double): Likewise.
240         (target_float_from_host_double): Likewise.
241         * target-float.h (target_float_to_host_double): Add prototype.
242         (target_float_from_host_double): Likewise.
243
244         * guile/scm-value.c: Include "target-float.h".
245         (gdbscm_value_to_real): Use target_float_to_host_double.
246         Handle integer source values via value_as_long.
247         * guile/scm-math.c: Include "target-float.h".  Do not include
248         "doublest.h", "dfp.h", and "expression.h".
249         (vlscm_convert_typed_number): Use target_float_from_host_double.
250         (vlscm_convert_number): Likewise.
251
252         * python/py-value.c (valpy_float): Use target_float_to_host_double.
253         (convert_value_from_python): Use target_float_from_host_double.
254
255 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
256
257         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
258         (cast_from_fixed): Likewise.
259         (ada_scaling_type): New function.
260         (ada_delta): Return value instead of DOUBLEST.  Perform target
261         arithmetic instead of host arithmetic.
262         (scaling_factor): Rename to ...
263         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
264         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
265         (ada_fixed_to_float): Remove.
266         (ada_float_to_fixed): Remove.
267         * ada-lang.h (ada_fixed_to_float): Remove.
268         (ada_float_to_fixed): Remove.
269         (ada_delta): Return value instead of DOUBLEST.
270         (ada_scaling_factor): Add prototype.
271
272         * ada-typeprint.c: Include "target-float.h".
273         (print_fixed_point_type): Perform target arithmetic instead of
274         host arithmetic.
275         * ada-valprint.c: Include "target-float.h".
276         (ada_val_print_num): Perform target arithmetic instead of
277         host arithmetic for fixed-point types.
278
279 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
280
281         * target-float.c: Include <math.h>.
282         (floatformat_binop): New function.
283         (floatformat_compare): Likewise.
284         (target_float_binop): Likewise.
285         (target_float_compare): Likewise.
286         * target-float.h: Include "expression.h".
287         (target_float_binop): Add prototype.
288         (target_float_compare): Likewise.
289
290         * valarith.c: Do not include "doublest.h" and "dfp.h".
291         Include "common/byte-vector.h".
292         (value_args_as_decimal): Remove, replace by ...
293         (value_args_as_target_float): ... this function.  Handle both
294         binary and decimal target floating-point formats.
295         (scalar_binop): Handle both binary and decimal FP using
296         value_args_as_target_float and target_float_binop.
297         (value_equal): Handle both binary and decimal FP using
298         value_args_as_target_float and target_float_compare.
299         (value_less): Likewise.
300         (value_pos): Handle all scalar types as simple copy.
301         (value_neg): Handle all scalar types via BINOP_SUB from 0.
302         * dfp.c (decimal_binop): Throw error instead of internal_error
303         when called with an unsupported operation code.
304
305 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
306
307         * target-float.c (target_float_to_string): New function.
308         (target_float_from_string): New function.
309         * target-float.h (target_float_to_string): Add prototype.
310         (target_float_from_string): Add prototype.
311
312         * valprint.c: Include "target-float.h".  Do not include
313         "doublest.h" and "dfp.h".
314         (print_floating): Use target_float_to_string.
315         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
316         (printf_floating): Use target_float_to_string.
317         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
318         (print_i387_value): Use target_float_to_string.
319         * mips-tdep.c: Include "target-float.h".
320         (mips_print_fp_register): Use target_float_to_string.
321         * sh64-tdep.c: Include "target-float.h".
322         (sh64_do_fp_register): Use target_float_to_string.
323
324         * parse.c: Include "target-float.h".  Do not include
325         "doublest.h" and "dfp.h".
326         (parse_float): Use target_float_from_string.
327         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
328         (define_symbol): Use target_float_from_string.
329         * gdbarch-selftests.c: Include "target-float.h".
330         (register_to_value_test): Use target_float_from_string.
331
332 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
333
334         * Makefile.c (SFILES): Add target-float.c.
335         (HFILES_NO_SRCDIR): Add target-float.h.
336         (COMMON_OBS): Add target-float.o.
337         * target-float.h: New file.
338         * target-float.c: New file.
339
340         * doublest.c (floatformat_classify): Fix detection of float_zero.
341
342         * gdbtypes.c (is_floating_type): New function.
343         * gdbtypes.h (is_floating_type): Add prototype.
344
345         * value.c: Do not include "floatformat.h".
346         (unpack_double): Use target_float_is_valid.
347         (is_floating_value): New function.
348         * value.h (is_floating_value): Add prototype-
349
350         * valarith.c: Include "target-float.h".
351         (value_logical_not): Use target_float_is_zero.
352
353         * python/py-value.c: Include "target-float.h".
354         (valpy_nonzero): Use target_float_is_zero.
355
356 2017-11-04  Tom Tromey  <tom@tromey.com>
357
358         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
359
360 2017-11-04  Tom Tromey  <tom@tromey.com>
361
362         * breakpoint.c (set_momentary_breakpoint): Return
363         breakpoint_up.
364         (until_break_command): Update.
365         (new_until_break_fsm): Change argument types to
366         breakpoint_up.
367         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
368         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
369         Remove.
370         * infcmd.c (finish_forward): Update.
371         * breakpoint.h (set_momentary_breakpoint)
372         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
373         (make_cleanup_delete_breakpoint): Remove.
374         (struct breakpoint_deleter): New.
375         (breakpoint_up): New typedef.
376         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
377         (insert_exception_resume_breakpoint): Update.
378         (insert_exception_resume_from_probe): Update.
379         (insert_longjmp_resume_breakpoint): Update.
380         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
381         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
382         * infcall.c (call_function_by_hand_dummy): Update
383
384 2017-11-04  Tom Tromey  <tom@tromey.com>
385
386         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
387
388 2017-11-04  Tom Tromey  <tom@tromey.com>
389
390         * linux-tdep.c (linux_core_info_proc_mappings): Use
391         gdb::def_vector.
392         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
393         "size" argument.
394         (linux_corefile_thread): Update.
395         (linux_make_corefile_notes): Remove unused variable.
396
397 2017-11-04  Tom Tromey  <tom@tromey.com>
398
399         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
400         gdb::byte_vector.
401
402 2017-11-04  Tom Tromey  <tom@tromey.com>
403
404         * objfiles.c (do_free_objfile_cleanup): Remove.
405         * compile/compile-object-load.c (compile_object_load): Update.
406         * objfiles.h (make_cleanup_free_objfile): Remove.
407
408 2017-11-04  Tom Tromey  <tom@tromey.com>
409
410         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
411         (adi_read_versions): Change "tags" to "gdb_byte *".
412         (adi_print_versions): Likewise.
413
414 2017-11-04  Tom Tromey  <tom@tromey.com>
415
416         * breakpoint.c
417         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
418         from start_rbreak_breakpoints.
419         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
420         * breakpoint.h (class scoped_rbreak_breakpoints): New.
421         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
422         * symtab.c (do_end_rbreak_breakpoints): Remove.
423         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
424
425 2017-11-04  Tom Tromey  <tom@tromey.com>
426
427         * cp-namespace.c (reset_directive_searched): Remove.
428         (cp_lookup_symbol_via_imports): Use scoped_restore.
429         * cp-support.c (reset_directive_searched): Remove.
430         (make_symbol_overload_list_using): Use scoped_restore.
431         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
432         (reset_directive_searched): Remove.
433
434 2017-11-04  Tom Tromey  <tom@tromey.com>
435
436         * symfile.c (find_separate_debug_file_by_debuglink): Use
437         unique_xmalloc_ptr.
438
439 2017-11-04  Tom Tromey  <tom@tromey.com>
440
441         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
442         type of "info".
443         (compute_stack_depth): Likewise.
444         (do_compile_dwarf_expr_to_c): Use std::vector.
445
446 2017-11-04  Tom Tromey  <tom@tromey.com>
447
448         * compile/compile-object-load.c (link_callbacks_einfo): Use
449         std::string.
450
451 2017-11-04  Tom Tromey  <tom@tromey.com>
452
453         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
454         Use scoped_free_pendings.
455         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
456         scoped_free_pendings.
457         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
458         (xcoff_initial_scan): Likewise.
459         * buildsym.c (reset_symtab_globals): Update comment.
460         (scoped_free_pendings): Rename from really_free_pendings.
461         (prepare_for_building): Update comment.
462         (buildsym_init): Likewise.
463         * buildsym.h (class scoped_free_pendings): New class.
464         (really_free_pendings): Don't declare.
465
466 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
467
468         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
469         output when converting a zero value to a special byteorder format.
470
471 2017-11-02  Yao Qi  <yao.qi@linaro.org>
472
473         * frame.c (do_frame_register_read): Remove aspace.
474         * jit.c (jit_frame_sniffer): Likwise.
475         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
476         * regcache.c (regcache::regcache): Pass nullptr.
477         (regcache_print): Caller updated.
478         * regcache.h (regcache::regcache): Remove one constructor
479         parameter aspace.
480
481 2017-11-02  Yao Qi  <yao.qi@linaro.org>
482
483         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
484
485 2017-11-02  Yao Qi  <yao.qi@linaro.org>
486
487         * breakpoint.c (insert_single_step_breakpoints): Update.
488         * frame.c (struct frame_info) <aspace>: Add const.
489         (frame_save_as_regcache): Add const.
490         (get_frame_address_space): Return const address_space *.
491         * frame.h (get_frame_address_space): Update declaration.
492         * infrun.c (struct step_over_info) <aspace>: Add const.
493         (set_step_over_info): Make aspace const.
494         (displaced_step_prepare_throw): Change variable const.
495         (resume): Likewise.
496         (proceed): Likewise.
497         (adjust_pc_after_break): Likewise.
498         (save_waitstatus): Likewise.
499         (handle_signal_stop): Likewise.
500         (keep_going_pass_signal): Likewise.
501         * jit.c (jit_frame_sniffer): Add const.
502         * mips-tdep.c (mips_single_step_through_delay): Likewise.
503         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
504         * record-full.c (record_full_wait_1): Likewise.
505         * regcache.c (regcache::regcache): Change parameter to const.
506         * regcache.h (regcache::regcache): Likewise.
507         (regcache::aspace): Return const address_space *.
508         (regcache) <m_aspace>: Add const.
509
510 2017-11-02  Yao Qi  <yao.qi@linaro.org>
511
512         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
513         * frame.c (create_sentinel_frame): Likewise.
514         * infrun.c (displaced_step_prepare_throw): Likewise.
515         (resume): Likewise.
516         (thread_still_needs_step_over_bp): Likewise.
517         (proceed): Likewise.
518         (do_target_wait): Likewise.
519         (adjust_pc_after_break): Likewise.
520         (handle_syscall_event): Likewise.
521         (save_waitstatus): Likewise.
522         (handle_inferior_event_1): Likewise.
523         (handle_signal_stop): Likewise.
524         (keep_going_pass_signal): Likewise.
525         * linux-nat.c (status_callback): Likewise.
526         (save_stop_reason): Likewise.
527         (resume_stopped_resumed_lwps): Likewise.
528         * record-full.c (record_full_exec_insn): Likewise.
529         (record_full_wait_1): Likewise.
530         * regcache.c (get_regcache_aspace): Remove.
531         * regcache.h (get_regcache_aspace): Remove.
532
533 2017-11-02  Yao Qi  <yao.qi@linaro.org>
534
535         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
536         (init_regcache_descr): Use gdbarch_num_regs.
537         (regcache::regcache): Likewise.
538         (regcache::get_register_status): Likewise.
539         (regcache::assert_raw_regnum): Likewise.
540         (regcache::cooked_read): Likewise.
541         (regcache::cooked_read_value): Likewise.
542         (regcache::cooked_write): Likewise.
543         (regcache::dump): Likewise.
544         (regcache::num_raw_registers): New method.
545         * regcache.h (class regcache) <num_raw_registers>: New.
546
547 2017-11-02  Yao Qi  <yao.qi@linaro.org>
548
549         * regcache.c (regcache::assert_regnum): New method.
550         (regcache::invalidate): Call assert_regnum.
551         (regcache::raw_update): Likewise.
552         (regcache::raw_write): Likewise.
553         (regcache::raw_read_part): Likewise.
554         (regcache::raw_write_part): Likewise.
555         (regcache::raw_supply): Likewise.
556         (regcache::raw_supply_integer): Likewise.
557         (regcache::raw_supply_zeroed): Likewise.
558         (regcache::raw_collect): Likewise.
559         (regcache::raw_collect_integer): Likewise.
560         * regcache.h (regcache::assert_regnum): Declare.
561
562 2017-11-02  Yao Qi  <yao.qi@linaro.org>
563
564         * regcache.c (regcache::dump): Remove code.
565
566 2017-11-02  Yao Qi  <yao.qi@linaro.org>
567
568         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
569         Remove.
570         <sizeof_cooked_register_status>: Remove.
571         (init_regcache_descr): Update.
572         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
573         (regcache::save): Likewise.
574         (regcache::dump): Likewise.
575
576 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
577
578         * ft32-tdep.c (ft32_fetch_instruction): New function.
579         (ft32_analyze_prologue): Use ft32_fetch_instruction().
580
581 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
582
583         * cli/cli-script.c (execute_control_command): Rename to ...
584         (execute_control_command_1): ... this.
585         (execute_control_command): New function.
586
587 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
588
589         * tracepoint.c (tfind_command): Remove const_cast.
590
591 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
592
593         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
594
595 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
596
597         * common/common-utils.h (in_inclusive_range): New function.
598         * arm-tdep.c (arm_record_extension_space): Use
599         in_inclusive_range.
600         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
601         * cris-tdep.c (cris_spec_reg_applicable): Use
602         in_inclusive_range.
603
604 2017-10-30  Pedro Alves  <palves@redhat.com>
605             Simon Marchi <simon.marchi@ericsson.com>
606
607         * remote.c (remote_set_syscall_catchpoint): Build a std::string
608         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
609
610 2017-10-30  Pedro Alves  <palves@redhat.com>
611
612         * common/common-utils.c (string_appendf, string_vappendf): New
613         functions.
614         * common/common-utils.h (string_appendf, string_vappendf): New
615         declarations.
616         * unittests/common-utils-selftests.c (string_appendf_func)
617         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
618         (string_vappendf_tests): New functions.
619         (_initialize_common_utils_selftests): Register "string_appendf" and
620         "string_vappendf tests".
621
622 2017-10-30  Pedro Alves  <palves@redhat.com>
623
624         * unittests/common-utils-selftests.c (format_func): New typedef.
625         (string_printf_tests, string_vprintf_tests): Tests factored out
626         and merged to ...
627         (test_format_func): ... this new function.
628         (string_printf_tests, string_vprintf_tests): Reimplement on top of
629         test_format_func.
630
631 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
632
633         * darwin-nat.c: Remove include of gdb.h.
634
635 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
636
637         * xtensa-xtregs.c: Fix formatting issues.
638
639 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
640
641         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
642
643 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
644
645         PR python/21213
646         * python/py-infthread.c (thpy_get_inferior): Increment reference
647         of inferior before returning it.
648
649 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
650
651         * unittests/common-utils-selftests.c (format): Add
652         ATTRIBUTE_PRINTF.
653
654 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
655
656         * xml-syscall.c (struct syscall_desc): Add constructor.
657         <name>: Change type to std::string.
658         (syscall_desc_up): New typedef.
659         (syscall_desc_p): Remove typeder.
660         (DEF_VEC_P(syscall_desc_p)): Remove.
661         (struct syscall_group_desc): Add constructor.
662         <name>: Change type to std::string.
663         <syscalls>: Change type to std::vector.
664         (syscall_group_desc_up): New typedef.
665         (syscall_group_desc_p): Remove typedef.
666         (DEF_VEC_P(syscall_group_desc_p)): Remove.
667         (struct syscalls_info) <syscalls>: Change type to std::vector of
668         unique_ptr.
669         <groups>: Likewise.
670         <my_gdb_datadir>: Change type to std::string.
671         (syscalls_info_up): New typedef.
672         (allocate_syscalls_info): Remove.
673         (syscalls_info_free_syscalls_desc): Remove.
674         (syscalls_info_free_syscall_group_desc): Remove.
675         (free_syscalls_info): Remove.
676         (make_cleanup_free_syscalls_info): Remove.
677         (syscall_group_create_syscall_group_desc): Adjust.
678         (syscall_group_add_syscall): Adjust.
679         (syscall_create_syscall_desc): Adjust.
680         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
681         (init_syscalls_info): Adjust.
682         (syscall_group_get_group_by_name): Adjust.
683         (xml_get_syscall_number): Adjust.
684         (xml_get_syscall_name): Adjust.
685         (xml_list_of_syscalls): Adjust.
686         (xml_list_syscalls_by_group): Adjust.
687         (xml_list_of_groups): Adjust.
688
689 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
690
691         * probe.h: Don't include gdb_vecs.h.
692         (DEF_VEC_P (probe_p)): Remove.
693         (find_probes_in_objfile): Return an std::vector.
694         * probe.c (find_probes_in_objfile): Likewise.
695         * breakpoint.c (breakpoint_objfile_data)
696         <longjmp_probes>: Change type to std::vector.
697         <exception_probes>: Likewise.
698         (free_breakpoint_probes): Don't manually free vectors.
699         (create_longjmp_master_breakpoint): Adjust.
700         (create_exception_master_breakpoint): Adjust.
701         * solib-svr4.c (svr4_create_probe_breakpoints): Change
702         parameter type, adjust.
703         (svr4_create_solib_event_breakpoints): Adjust.
704
705 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
706
707         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
708         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
709         with new.
710         (free_breakpoint_probes): Rename to ...
711         (free_breakpoint_objfile_data): ... this, and call delete on
712         bp_objfile_data..
713
714 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
715
716         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
717         (loaded_script_ptr): Remove typedef.
718         (DEF_VEC_P (loaded_script_ptr)): Remove.
719         (struct collect_matching_scripts_data): Add constructor.
720         <scripts_p>: Change type to (pointer to) std::vector.
721         (collect_matching_scripts_data): Adjust.
722         (sort_scripts_by_name): Make suitable for std::sort.
723         (print_scripts): Don't sort vector, adjust to std::vector.
724         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
725
726 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
727
728         * symfile.c (filename_language): Make struct, not typedef.  Add
729         constructor.
730         <ext>: Change type to std::string.
731         (DEF_VEC_O (filename_language)): Remove.
732         (filename_language_table): Change type to std::vector.
733         (add_filename_language): Adjust.
734         (set_ext_lang_command): Adjust.
735         (info_ext_lang_command): Adjust.
736         (deduce_language_from_filename): Adjust.
737         (class scoped_restore_filename_language_table): Remove.
738         (test_filename_language): Use scoped_restore.
739         (test_set_ext_lang_command): Use scoped_restore, adjust to
740         std::vector change.
741
742 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
743
744         * symfile.c: Include selftest.h.
745         (class scoped_restore_filename_language_table): New.
746         (test_filename_language): New test.
747         (test_set_ext_lang_command): New test.
748         (_initialize_symfile): Register tests.
749
750 2017-10-27  Keith Seitz  <keiths@redhat.com>
751
752         * breakpoint.c (print_breakpoint_location): Use the symbol saved
753         in the bp_location, falling back to find_pc_sect_function when
754         needed.
755         (add_location_to_breakpoint): Save sal->symbol.
756         * breakpoint.h (struct bp_location) <symbol>: New field.
757         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
758         * symtab.h (struct symtab_and_line) <symbol>: New field.
759
760 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
761
762         PR gdb/13669
763         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
764         to rewind obstack.
765
766 2017-10-26  Pedro Alves  <palves@redhat.com>
767
768         * remote.c (remote_async_terminal_ours_p): Delete.
769         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
770         Remove references to 'remote_async_terminal_ours_p'.
771
772 2017-10-26  Yao Qi  <yao.qi@linaro.org>
773
774         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
775
776 2017-10-26  Yao Qi  <yao.qi@linaro.org>
777
778         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
779         aspace const.
780         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
781         Likewise.
782         * breakpoint.c (bpstat_check_location): Remove cast.
783         (breakpoint_hit_catch_fork): Make aspce const.
784         (breakpoint_hit_catch_solib): Likewise.
785         (breakpoint_hit_catch_exec): Likewise.
786         (breakpoint_hit_ranged_breakpoint): Likewise.
787         (breakpoint_hit_watchpoint): Likewise.
788         (base_breakpoint_breakpoint_hit): Likewise.
789         (bkpt_breakpoint_hit): Likewise.
790         (dprintf_breakpoint_hit): Likewise.
791         (tracepoint_breakpoint_hit): Likewise.
792         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
793
794 2017-10-26  Yao Qi  <yao.qi@linaro.org>
795
796         * breakpoint.c (breakpoint_location_address_match): Change
797         "struct address_space *" to "const address_space".
798         (breakpoint_location_address_range_overlap): Likewise.
799         (breakpoint_here_p): Likewise.
800         (breakpoint_in_range_p): Likewise.
801         (moribund_breakpoint_here_p): Likewise.
802         (bp_location_inserted_here_p): Likewise.
803         (software_breakpoint_inserted_here_p): Likewise.
804         (hardware_breakpoint_inserted_here_p): Likewise.
805         (hardware_watchpoint_inserted_in_range): Likewise.
806         (bpstat_check_location): Likewise.
807         (bpstat_stop_status): Likewise.
808         (breakpoint_address_match): Likewise.
809         (breakpoint_address_match_range): Likewise.
810         (breakpoint_location_address_match): Likewise.
811         (breakpoint_location_address_range_overlap): Likewise.
812         (insert_single_step_breakpoint): Likewise.
813         (breakpoint_has_location_inserted_here): Likewise.
814         (single_step_breakpoint_inserted_here_p): Likewise.
815         (pc_at_non_inline_function): Likewise.
816         * breakpoint.h (bpstat_stop_status): Update declaration.
817         (breakpoint_here_p): Likewise.
818         (breakpoint_in_range_p): Likewise.
819         (moribund_breakpoint_here_p): Likewise.
820         (breakpoint_inserted_here_p): Likewise.
821         (software_breakpoint_inserted_here_p): Likewise.
822         (hardware_breakpoint_inserted_here_p): Likewise.
823         (breakpoint_has_location_inserted_here): Likewise.
824         (single_step_breakpoint_inserted_here_p): Likewise.
825         (hardware_watchpoint_inserted_in_range): Likewise.
826         (breakpoint_address_match): Likewise.
827         (insert_single_step_breakpoint): Likewise.
828         (pc_at_non_inline_function): Likewise.
829         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
830         * record.c (record_check_stopped_by_breakpoint): Likewise.
831         * record.h (record_check_stopped_by_breakpoint): Likewise.
832         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
833
834 2017-10-25  Yao Qi  <yao.qi@linaro.org>
835
836         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
837         regcache->arch () instead get_regcache_arch.
838         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
839         Likewise.
840         (aarch64_fbsd_store_inferior_registers): Likewise.
841         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
842         (store_gregs_to_thread): Likewise.
843         (fetch_fpregs_from_thread): Likewise.
844         (store_fpregs_to_thread): Likewise.
845         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
846         (aarch64_store_return_value): Likewise.
847         (aarch64_software_single_step): Likewise.
848         * aix-thread.c (aix_thread_wait): Likewise.
849         (supply_reg32): Likewise.
850         (supply_sprs64): Likewise.
851         (supply_sprs32): Likewise.
852         (fill_gprs64): Likewise.
853         (fill_gprs32): Likewise.
854         (fill_sprs64): Likewise.
855         (fill_sprs32): Likewise.
856         (store_regs_user_thread): Likewise.
857         (store_regs_kernel_thread): Likewise.
858         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
859         (alphabsd_store_inferior_registers): Likewise.
860         * alpha-tdep.c (alpha_extract_return_value): Likewise.
861         (alpha_store_return_value): Likewise.
862         (alpha_deal_with_atomic_sequence): Likewise.
863         (alpha_next_pc): Likewise.
864         (alpha_software_single_step): Likewise.
865         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
866         (amd64bsd_store_inferior_registers): Likewise.
867         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
868         Likewise.
869         (amd64_linux_store_inferior_registers): Likewise.
870         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
871         (amd64_collect_native_gregset): Likewise.
872         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
873         (amd64obsd_collect_uthread): Likewise.
874         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
875         (amd64_collect_fpregset): Likewise.
876         (amd64_supply_fxsave): Likewise.
877         (amd64_supply_xsave): Likewise.
878         (amd64_collect_fxsave): Likewise.
879         (amd64_collect_xsave): Likewise.
880         * arc-tdep.c (arc_write_pc): Likewise.
881         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
882         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
883         (arm_fbsd_store_inferior_registers): Likewise.
884         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
885         (store_vfp_regs): Likewise.
886         (arm_linux_fetch_inferior_registers): Likewise.
887         (arm_linux_store_inferior_registers): Likewise.
888         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
889         (arm_linux_sigreturn_next_pc): Likewise.
890         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
891         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
892         (fetch_register): Likewise.
893         (store_register): Likewise.
894         * arm-tdep.c (arm_is_thumb): Likewise.
895         (displaced_in_arm_mode): Likewise.
896         (bx_write_pc): Likewise.
897         (arm_get_next_pcs_addr_bits_remove): Likewise.
898         (arm_software_single_step): Likewise.
899         (arm_extract_return_value): Likewise.
900         (arm_store_return_value): Likewise.
901         (arm_write_pc): Likewise.
902         * bfin-tdep.c (bfin_extract_return_value): Likewise.
903         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
904         (bsd_uthread_store_registers): Likewise.
905         * core-regset.c (fetch_core_registers): Likewise.
906         * corelow.c (get_core_registers): Likewise.
907         * cris-tdep.c (cris_store_return_value): Likewise.
908         (cris_extract_return_value): Likewise.
909         (find_step_target): Likewise.
910         (find_step_target): Likewise.
911         (cris_software_single_step): Likewise.
912         * ctf.c (ctf_fetch_registers): Likewise.
913         * darwin-nat.c (cancel_breakpoint): Likewise.
914         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
915         * frv-tdep.c (frv_extract_return_value): Likewise.
916         * ft32-tdep.c (ft32_store_return_value): Likewise.
917         (ft32_extract_return_value): Likewise.
918         * go32-nat.c (fetch_register): Likewise.
919         (go32_fetch_registers): Likewise.
920         (go32_store_registers): Likewise.
921         (store_register): Likewise.
922         * h8300-tdep.c (h8300_extract_return_value): Likewise.
923         (h8300_store_return_value): Likewise.
924         * hppa-linux-nat.c (fetch_register): Likewise.
925         (store_register): Likewise.
926         (hppa_linux_fetch_inferior_registers): Likewise.
927         (hppa_linux_store_inferior_registers): Likewise.
928         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
929         (i386_darwin_store_inferior_registers): Likewise.
930         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
931         (gnu_store_registers): Likewise.
932         * i386-linux-nat.c (fetch_register): Likewise.
933         (store_register): Likewise.
934         (supply_gregset): Likewise.
935         (fill_gregset): Likewise.
936         (i386_linux_fetch_inferior_registers): Likewise.
937         (i386_linux_store_inferior_registers): Likewise.
938         (i386_linux_resume): Likewise.
939         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
940         Likewise.
941         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
942         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
943         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
944         (i386obsd_collect_uthread): Likewise.
945         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
946         (i386_supply_gregset): Likewise.
947         (i386_collect_gregset): Likewise.
948         (i386_supply_fpregset): Likewise.
949         (i386_collect_fpregset): Likewise.
950         (i386_mpx_bd_base): Likewise.
951         * i386-v4-nat.c (supply_fpregset): Likewise.
952         (fill_fpregset): Likewise.
953         * i387-tdep.c (i387_supply_fsave): Likewise.
954         (i387_collect_fsave): Likewise.
955         (i387_supply_fxsave): Likewise.
956         (i387_collect_fxsave): Likewise.
957         (i387_supply_xsave): Likewise.
958         (i387_collect_xsave): Likewise.
959         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
960         (ia64_linux_store_registers): Likewise.
961         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
962         (ia64_extract_return_value): Likewise.
963         (ia64_store_return_value): Likewise.
964         (find_func_descr): Likewise.
965         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
966         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
967         (inf_ptrace_store_registers): Likewise.
968         * infrun.c (use_displaced_stepping): Likewise.
969         (displaced_step_prepare_throw): Likewise.
970         (resume): Likewise.
971         (proceed): Likewise.
972         (do_target_wait): Likewise.
973         (adjust_pc_after_break): Likewise.
974         (handle_inferior_event_1): Likewise.
975         (handle_signal_stop): Likewise.
976         (save_infcall_suspend_state): Likewise.
977         (restore_infcall_suspend_state): Likewise.
978         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
979         * jit.c (jit_frame_prev_register): Likewise.
980         * linux-nat.c (save_stop_reason): Likewise.
981         (linux_nat_wait_1): Likewise.
982         (resume_stopped_resumed_lwps): Likewise.
983         * linux-record.c (record_linux_sockaddr): Likewise.
984         (record_linux_msghdr): Likewise.
985         (record_linux_system_call): Likewise.
986         * linux-tdep.c (linux_collect_thread_registers): Likewise.
987         * lm32-tdep.c (lm32_extract_return_value): Likewise.
988         (lm32_store_return_value): Likewise.
989         * m32c-tdep.c (m32c_read_flg): Likewise.
990         (m32c_pseudo_register_read): Likewise.
991         (m32c_pseudo_register_write): Likewise.
992         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
993         (m32r_linux_collect_gregset): Likewise.
994         * m32r-tdep.c (m32r_store_return_value): Likewise.
995         (m32r_extract_return_value): Likewise.
996         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
997         (m68kbsd_collect_fpregset): Likewise.
998         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
999         * m68k-linux-nat.c (fetch_register): Likewise.
1000         (old_fetch_inferior_registers): Likewise.
1001         (old_store_inferior_registers): Likewise.
1002         (store_regs): Likewise.
1003         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1004         (m68k_svr4_store_return_value): Likewise.
1005         * m88k-tdep.c (m88k_store_arguments): Likewise.
1006         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1007         (mi_cmd_data_write_register_values): Likewise.
1008         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1009         (mips_fbsd_store_inferior_registers): Likewise.
1010         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1011         (mips_fbsd_supply_gregs): Likewise.
1012         (mips_fbsd_collect_fpregs): Likewise.
1013         (mips_fbsd_collect_gregs): Likewise.
1014         (mips_fbsd_supply_fpregset): Likewise.
1015         (mips_fbsd_collect_fpregset): Likewise.
1016         (mips_fbsd_supply_gregset): Likewise.
1017         (mips_fbsd_collect_gregset): Likewise.
1018         * mips-linux-nat.c (supply_gregset): Likewise.
1019         (fill_gregset): Likewise.
1020         (supply_fpregset): Likewise.
1021         (fill_fpregset): Likewise.
1022         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1023         (mips_fill_gregset): Likewise.
1024         (mips_supply_fpregset): Likewise.
1025         (mips_fill_fpregset): Likewise.
1026         (mips64_supply_gregset): Likewise.
1027         (micromips_linux_sigframe_validate): Likewise.
1028         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1029         (mipsnbsd_fetch_inferior_registers): Likewise.
1030         (mipsnbsd_store_inferior_registers): Likewise.
1031         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1032         (mipsnbsd_supply_gregset): Likewise.
1033         (mipsnbsd_iterate_over_regset_sections): Likewise.
1034         (mipsnbsd_supply_reg): Likewise.
1035         (mipsnbsd_supply_fpreg): Likewise.
1036         * mips-tdep.c (mips_in_frame_stub): Likewise.
1037         (mips_dummy_id): Likewise.
1038         (is_octeon_bbit_op): Likewise.
1039         (micromips_bc1_pc): Likewise.
1040         (extended_mips16_next_pc): Likewise.
1041         (mips16_next_pc): Likewise.
1042         (deal_with_atomic_sequence): Likewise.
1043         * moxie-tdep.c (moxie_process_readu): Likewise.
1044         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1045         * nto-procfs.c (procfs_store_registers): Likewise.
1046         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1047         (ppcfbsd_store_inferior_registers): Likewise.
1048         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1049         (fetch_altivec_register): Likewise.
1050         (get_spe_registers): Likewise.
1051         (fetch_spe_register): Likewise.
1052         (fetch_altivec_registers): Likewise.
1053         (fetch_all_gp_regs): Likewise.
1054         (fetch_all_fp_regs): Likewise.
1055         (store_vsx_register): Likewise.
1056         (store_altivec_register): Likewise.
1057         (set_spe_registers): Likewise.
1058         (store_spe_register): Likewise.
1059         (store_altivec_registers): Likewise.
1060         (store_all_gp_regs): Likewise.
1061         (store_all_fp_regs): Likewise.
1062         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1063         (ppc_linux_collect_gregset): Likewise.
1064         (ppc_canonicalize_syscall): Likewise.
1065         (ppc_linux_record_signal): Likewise.
1066         (ppu2spu_prev_register): Likewise.
1067         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1068         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1069         (ppcobsd_store_registers): Likewise.
1070         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1071         Likewise.
1072         (ppc_ravenscar_generic_store_registers): Likewise.
1073         * procfs.c (procfs_fetch_registers): Likewise.
1074         (procfs_store_registers): Likewise.
1075         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1076         (ravenscar_store_registers): Likewise.
1077         (ravenscar_prepare_to_store): Likewise.
1078         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1079         * record-full.c (record_full_wait_1): Likewise.
1080         (record_full_registers_change): Likewise.
1081         (record_full_store_registers): Likewise.
1082         (record_full_core_fetch_registers): Likewise.
1083         (record_full_save): Likewise.
1084         (record_full_goto_insn): Likewise.
1085         * regcache.c (regcache_register_size): Likewise.
1086         (get_regcache_arch): Remove.
1087         (regcache_read_pc): Likewise.
1088         * regcache.h (get_regcache_arch): Remove.
1089         * remote-sim.c (gdbsim_fetch_register): Likewise.
1090         (gdbsim_store_register): Likewise.
1091         * remote.c (fetch_register_using_p): Likewise.
1092         (send_g_packet): Likewise.
1093         (remote_prepare_to_store): Likewise.
1094         (store_registers_using_G): Likewise.
1095         * reverse.c (save_bookmark_command): Likewise.
1096         (goto_bookmark_command): Likewise.
1097         * rs6000-aix-tdep.c (branch_dest): Likewise.
1098         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1099         (fetch_register): Likewise.
1100         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1101         (ppc_collect_reg): Likewise.
1102         (ppc_collect_gregset): Likewise.
1103         (ppc_collect_fpregset): Likewise.
1104         (ppc_collect_vsxregset): Likewise.
1105         (ppc_collect_vrregset): Likewise.
1106         (ppc_displaced_step_hw_singlestep): Likewise.
1107         (rs6000_pseudo_register_read): Likewise.
1108         (rs6000_pseudo_register_write): Likewise.
1109         * s390-linux-nat.c (supply_gregset): Likewise.
1110         (fill_gregset): Likewise.
1111         (s390_linux_fetch_inferior_registers): Likewise.
1112         * s390-linux-tdep.c (s390_write_pc): Likewise.
1113         (s390_software_single_step): Likewise.
1114         (s390_all_but_pc_registers_record): Likewise.
1115         (s390_linux_syscall_record): Likewise.
1116         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1117         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1118         (shnbsd_store_inferior_registers): Likewise.
1119         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1120         (sh_extract_return_value_fpu): Likewise.
1121         (sh_store_return_value_nofpu): Likewise.
1122         (sh_corefile_supply_regset): Likewise.
1123         (sh_corefile_collect_regset): Likewise.
1124         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1125         (sh64_store_return_value): Likewise.
1126         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1127         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1128         (sparc_store_inferior_registers): Likewise.
1129         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1130         (sparc_ravenscar_prepare_to_store): Likewise.
1131         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1132         (sparc_analyze_control_transfer): Likewise.
1133         (sparc_step_trap): Likewise.
1134         (sparc_software_single_step): Likewise.
1135         (sparc32_gdbarch_init): Likewise.
1136         (sparc_supply_rwindow): Likewise.
1137         (sparc_collect_rwindow): Likewise.
1138         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1139         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1140         (sparc64nbsd_collect_gregset): Likewise.
1141         (sparc64nbsd_supply_fpregset): Likewise.
1142         (sparc64nbsd_collect_fpregset): Likewise.
1143         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1144         (sparc64_supply_gregset): Likewise.
1145         (sparc64_collect_gregset): Likewise.
1146         (sparc64_supply_fpregset): Likewise.
1147         (sparc64_collect_fpregset): Likewise.
1148         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1149         * spu-tdep.c (spu_unwind_sp): Likewise.
1150         (spu2ppu_prev_register): Likewise.
1151         (spu_memory_remove_breakpoint): Likewise.
1152         * stack.c (return_command): Likewise.
1153         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1154         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1155         * tracefile.c (trace_save_ctf): Likewise.
1156         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1157         (do_windows_store_inferior_registers): Likewise.
1158         (windows_resume): Likewise.
1159         * xtensa-linux-nat.c (fill_gregset): Likewise.
1160         (supply_gregset_reg): Likewise.
1161         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1162         (xtensa_register_read_masked): Likewise.
1163         (xtensa_supply_gregset): Likewise.
1164         (xtensa_extract_return_value): Likewise.
1165         (xtensa_store_return_value): Likewise.
1166
1167 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1168
1169         * doublest.c (floatformat_from_string): New function.
1170         * doublest.h (floatformat_from_string): Add prototype.
1171
1172         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1173         (OP_FLOAT): ... this.
1174         * expression.h: Do not include "doublest.h".
1175         (union exp_element): Replace doubleconst and decfloatconst by
1176         new element floatconst.
1177         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1178         (ada_evaluate_subexp): Likewise.
1179         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1180         OP_DOUBLE and OP_DECFLOAT.
1181         * expprint.c (print_subexp_standard): Likewise.
1182         (dump_subexp_body_standard): Likewise.
1183         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1184
1185         * parse.c: Include "dfp.h".
1186         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1187         (write_exp_elt_floatcst): New function.
1188         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1189         and OP_DECFLOAT.
1190         (operator_check_standard): Likewise.
1191         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1192         Return target format buffer instead of host DOUBLEST.
1193         Use floatformat_from_string and decimal_from_string to parse
1194         either binary or decimal floating-point types.
1195         (parse_c_float): Remove.
1196         * parser-defs.h: Do not include "doublest.h".
1197         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1198         (write_exp_elt_floatcst): Add prototype.
1199         (parse_float): Update prototype.
1200         (parse_c_float): Remove.
1201
1202         * c-exp.y: Do not include "dfp.h".
1203         (typed_val_float): Use byte buffer instead of DOUBLEST.
1204         (typed_val_decfloat): Remove.
1205         (DECFLOAT): Remove.
1206         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1207         (parse_number): Update to new parse_float interface.
1208         Parse suffixes and determine type before calling parse_float.
1209         Handle decimal and binary FP types the same way.
1210
1211         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1212         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1213         (parse_number): Update to new parse_float interface.
1214         Parse suffixes and determine type before calling parse_float.
1215
1216         * f-exp.y: Replace dval by typed_val_float.
1217         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1218         (parse_number): Use parse_float instead of atof.
1219
1220         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1221         (parse_go_float): Remove.
1222         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1223         (parse_number): Call parse_float instead of parse_go_float.
1224         Parse suffixes and determine type before calling parse_float.
1225
1226         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1227         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1228         (parse_number): Update to new parse_float interface.
1229         Parse suffixes and determine type before calling parse_float.
1230
1231         * m2-exp.y: Replace dval by byte buffer val.
1232         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1233         (parse_number): Call parse_float instead of atof.
1234
1235         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1236         (lex_number): Call parse_float instead of strtod.
1237         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1238         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1239         Use write_exp_elt_floatcst.
1240         (unit_testing): Remove static variable.
1241         (rust_type): Do not check unit_testing.
1242         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1243
1244         * ada-exp.y (type_float, type_double): Remove.
1245         (typed_val_float): Use byte buffer instead of DOUBLEST.
1246         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1247         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1248
1249 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1250
1251         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1252         * arch/aarch64.h: New file.
1253
1254 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1255
1256         * dfp.h (decimal_from_string): Use const reference for argument.
1257         * dfp.c (decimal_from_string): Likewise.
1258
1259 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1260
1261         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1262         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1263         * mips-tdep.c (mips_print_fp_register): Likewise.
1264
1265 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1266
1267         * common/format.h (enum argclass): Replace decfloat_arg by
1268         dec32float_arg, dec64float_arg, and dec128float_arg.
1269         * common/format.c (parse_format_string): Update to return
1270         new decimal float argument classes.
1271
1272         * printcmd.c (printf_decfloat): Rename to ...
1273         (printf_floating): ... this.  Add argclass argument, and use it
1274         instead of parsing the format string again.  Add support for
1275         binary floating-point values, using floatformat_to_string.
1276         Convert value to the target format if it doesn't already match.
1277         (ui_printf): Call printf_floating instead of printf_decfloat,
1278         also for double_arg / long_double_arg.  Pass argclass.
1279
1280         * dfp.c (decimal_to_string): Add format string argument.
1281         * dfp.h (decimal_to_string): Likewise.
1282
1283         * doublest.c (floatformat_to_string): Add format string argument.
1284         * doublest.h (floatformat_to_string): Likewise.
1285
1286 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1287
1288         * doublest.c (floatformat_precision): New routine.
1289         (floatformat_to_string): Likewise.
1290         * doublest.c (floatformat_to_string): Add prototype.
1291
1292         * printcmd.c (print_scalar_formatted): Only call print_floating
1293         on floating-point types.
1294         * valprint.c: Do not include "floatformat.h".
1295         (generic_val_print_decfloat): Remove.
1296         (generic_val_print): Call generic_val_print_float for both
1297         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1298         (print_floating): Use floatformat_to_string.  Handle decimal float.
1299         (print_decimal_floating): Remove, merge into floatformat_to_string.
1300         * value.h (print_decimal_floating): Remove.
1301
1302         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1303
1304 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1305
1306         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1307
1308 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1309
1310         * memattr.h: Don't include vec.h.
1311         (struct mem_attrib): Initialize fields.
1312         <unknown>: New static method.
1313         (struct mem_region): Add constructors, operator<, initialize
1314         fields.
1315         * memattr.c: Include algorithm.
1316         (default_mem_attrib, unknown_mem_attrib): Remove.
1317         (user_mem_region_list): New global.
1318         (target_mem_region_list, mem_region_list): Change type to
1319         std::vector<mem_region>.
1320         (mem_use_target): Now a function.
1321         (target_mem_regions_valid): Change type to bool.
1322         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1323         (require_user_regions): Adjust.
1324         (require_target_regions): Adjust.
1325         (create_mem_region): Adjust.
1326         (lookup_mem_region): Adjust.
1327         (invalidate_target_mem_regions): Adjust.
1328         (mem_clear): Rename to...
1329         (user_mem_clear): ... this, and adjust.
1330         (mem_command): Adjust.
1331         (info_mem_command): Adjust.
1332         (mem_enable, enable_mem_command, mem_disable,
1333         disable_mem_command): Adjust.
1334         (mem_delete): Adjust.
1335         (delete_mem_command): Adjust.
1336         * memory-map.h (parse_memory_map): Return an std::vector.
1337         * memory-map.c (parse_memory_map): Likewise.
1338         (struct memory_map_parsing_data): Add constructor.
1339         <memory_map>: Point to std::vector.
1340         (memory_map_start_memory): Adjust.
1341         (memory_map_end_memory): Adjust.
1342         (memory_map_end_property): Adjust.
1343         (clear_result): Remove.
1344         * remote.c (remote_memory_map): Return an std::vector.
1345         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1346         Remove.
1347         (target_debug_print_mem_region_vector): New.
1348         * target-delegates.c: Regenerate.
1349         * target.h (mem_region_vector): New typedef.
1350         (to_memory_map): Return mem_region_vector.
1351         (target_memory_map): Return an std::vector.
1352         * target.c (target_memory_map): Return an std::vector.
1353         (flash_erase_command): Adjust.
1354
1355 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1356
1357         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1358         Change type to std::string.
1359         (memory_map_start_property): Adjust.
1360         (memory_map_end_property): Adjust.
1361
1362 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1363
1364         * infrun.h: Include common/byte-vector.h.
1365         (struct displaced_step_closure): New struct.
1366         (struct buf_displaced_step_closure): New struct.
1367         * infrun.c (displaced_step_closure::~displaced_step_closure):
1368         Provide default implementation.
1369         (displaced_step_clear): Deallocate step closure with delete.
1370         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1371         (aarch64_displaced_step_closure): ... this, extend
1372         displaced_step_closure.
1373         (aarch64_displaced_step_data) <dsc>: Change type to
1374         aarch64_displaced_step_closure.
1375         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1376         unique_ptr.
1377         (aarch64_displaced_step_fixup): Add cast for displaced step
1378         closure.
1379         * amd64-tdep.c (displaced_step_closure): Rename to ...
1380         (amd64_displaced_step_closure): ... this, extend
1381         displaced_step_closure.
1382         <insn_buf>: Change type to std::vector<gdb_byte>.
1383         <max_len>: Remove.
1384         (fixup_riprel): Change type of DSC parameter, adjust to type
1385         change of insn_buf.
1386         (fixup_displaced_copy): Change type of DSC parameter.
1387         (amd64_displaced_step_copy_insn): Instantiate
1388         amd64_displaced_step_closure.
1389         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1390         to type change of insn_buf.
1391         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1392         parameter DSC.
1393         (arm_linux_copy_svc): Likewise.
1394         (cleanup_kernel_helper_return): Likewise.
1395         (arm_catch_kernel_helper_return): Likewise.
1396         (arm_linux_displaced_step_copy_insn): Instantiate
1397         arm_displaced_step_closure.
1398         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1399         (displaced_read_reg): Change type of parameter DSC.
1400         (branch_write_pc): Likewise.
1401         (load_write_pc): Likewise.
1402         (alu_write_pc): Likewise.
1403         (displaced_write_reg): Likewise.
1404         (arm_copy_unmodified): Likewise.
1405         (thumb_copy_unmodified_32bit): Likewise.
1406         (thumb_copy_unmodified_16bit): Likewise.
1407         (cleanup_preload): Likewise.
1408         (install_preload): Likewise.
1409         (arm_copy_preload): Likewise.
1410         (thumb2_copy_preload): Likewise.
1411         (install_preload_reg): Likewise.
1412         (arm_copy_preload_reg): Likewise.
1413         (cleanup_copro_load_store): Likewise.
1414         (install_copro_load_store): Likewise.
1415         (arm_copy_copro_load_store) Likewise.
1416         (thumb2_copy_copro_load_store): Likewise.
1417         (cleanup_branch): Likewise.
1418         (install_b_bl_blx): Likewise.
1419         (arm_copy_b_bl_blx): Likewise.
1420         (thumb2_copy_b_bl_blx): Likewise.
1421         (thumb_copy_b): Likewise.
1422         (install_bx_blx_reg): Likewise.
1423         (arm_copy_bx_blx_reg): Likewise.
1424         (thumb_copy_bx_blx_reg): Likewise.
1425         (cleanup_alu_imm): Likewise.
1426         (arm_copy_alu_imm): Likewise.
1427         (thumb2_copy_alu_imm): Likewise.
1428         (cleanup_alu_reg): Likewise.
1429         (install_alu_reg): Likewise.
1430         (arm_copy_alu_reg): Likewise.
1431         (thumb_copy_alu_reg): Likewise.
1432         (cleanup_alu_shifted_reg): Likewise.
1433         (install_alu_shifted_reg): Likewise.
1434         (arm_copy_alu_shifted_reg): Likewise.
1435         (cleanup_load): Likewise.
1436         (cleanup_store): Likewise.
1437         (arm_copy_extra_ld_st): Likewise.
1438         (install_load_store): Likewise.
1439         (thumb2_copy_load_literal): Likewise.
1440         (thumb2_copy_load_reg_imm): Likewise.
1441         (arm_copy_ldr_str_ldrb_strb): Likewise.
1442         (cleanup_block_load_all): Likewise.
1443         (cleanup_block_store_pc): Likewise.
1444         (cleanup_block_load_pc): Likewise.
1445         (arm_copy_block_xfer): Likewise.
1446         (thumb2_copy_block_xfer): Likewise.
1447         (cleanup_svc): Likewise.
1448         (install_svc): Likewise.
1449         (arm_copy_svc): Likewise.
1450         (thumb_copy_svc): Likewise.
1451         (arm_copy_undef): Likewise.
1452         (thumb_32bit_copy_undef): Likewise.
1453         (arm_copy_unpred): Likewise.
1454         (arm_decode_misc_memhint_neon): Likewise.
1455         (arm_decode_unconditional): Likewise.
1456         (arm_decode_miscellaneous): Likewise.
1457         (arm_decode_dp_misc): Likewise.
1458         (arm_decode_ld_st_word_ubyte): Likewise.
1459         (arm_decode_media): Likewise.
1460         (arm_decode_b_bl_ldmstm): Likewise.
1461         (arm_decode_ext_reg_ld_st): Likewise.
1462         (thumb2_decode_dp_shift_reg): Likewise.
1463         (thumb2_decode_ext_reg_ld_st): Likewise.
1464         (arm_decode_svc_copro): Likewise.
1465         (thumb2_decode_svc_copro): Likewise.
1466         (install_pc_relative): Likewise.
1467         (thumb_copy_pc_relative_16bit): Likewise.
1468         (thumb_decode_pc_relative_16bit): Likewise.
1469         (thumb_copy_pc_relative_32bit): Likewise.
1470         (thumb_copy_16bit_ldr_literal): Likewise.
1471         (thumb_copy_cbnz_cbz): Likewise.
1472         (thumb2_copy_table_branch): Likewise.
1473         (cleanup_pop_pc_16bit_all): Likewise.
1474         (thumb_copy_pop_pc_16bit): Likewise.
1475         (thumb_process_displaced_16bit_insn): Likewise.
1476         (decode_thumb_32bit_ld_mem_hints): Likewise.
1477         (thumb_process_displaced_32bit_insn): Likewise.
1478         (thumb_process_displaced_insn): Likewise.
1479         (arm_process_displaced_insn): Likewise.
1480         (arm_displaced_init_closure): Likewise.
1481         (arm_displaced_step_fixup): Add cast for closure.
1482         * arm-tdep.h: Include infrun.h.
1483         (displaced_step_closure): Rename to ...
1484         (arm_displaced_step_closure): ... this, extend
1485         displaced_step_closure.
1486         <u::svc::copy_svc_os>: Change type of parameter DSC.
1487         <cleanup>: Likewise.
1488         (arm_process_displaced_insn): Likewise.
1489         (arm_displaced_init_closure): Likewise.
1490         (displaced_read_reg): Likewise.
1491         (displaced_write_reg): Likewise.
1492         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1493         Adjust.
1494         * i386-tdep.h: Include infrun.h.
1495         (i386_displaced_step_closure): New typedef.
1496         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1497         i386_displaced_step_closure.
1498         (i386_displaced_step_fixup): Adjust.
1499         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1500         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1501         and unique_ptr.
1502         (ppc_displaced_step_fixup): Adjust.
1503         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1504         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1505         and unique_ptr.
1506         (s390_displaced_step_fixup): Adjust.
1507
1508 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1509
1510         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1511         Remove declarations.
1512
1513 2017-10-20  Tom Tromey  <tom@tromey.com>
1514
1515         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1516         std::vector.
1517         (gdb_bfd_record_inclusion): Update.
1518         (bfdp): Remove typedef.
1519
1520 2017-10-20  Tom Tromey  <tom@tromey.com>
1521
1522         * gdb_bfd.c (gdb_bfd_ref): Use new.
1523         (struct gdb_bfd_data): Add constructor, destructor, and member
1524         initializers.
1525         (gdb_bfd_unref): Use delete.
1526
1527 2017-10-20  Tom Tromey  <tom@tromey.com>
1528
1529         * exec.c (exec_file_attach): Use new_bfd_ref.
1530         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1531         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1532         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1533         new_bfd_ref.
1534         * gdb_bfd.h (new_bfd_ref): New function.
1535
1536 2017-10-20  Pedro Alves  <palves@redhat.com>
1537
1538         * main.c (captured_command_loop): Add attribute noinline.
1539
1540 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1541
1542         * interps.c (struct interp_factory): Add constructor.
1543         (interp_factory_p): Remove typedef.
1544         (DEF_VEC_P(interp_factory_p)): Remove.
1545         (interpreter_factories): Change type to std::vector.
1546         (interp_factory_register): Adjust.
1547         (interp_lookup): Adjust.
1548         (interpreter_completer): Adjust.
1549
1550 2017-10-19  Tom Tromey  <tom@tromey.com>
1551
1552         * break-catch-syscall.c (catch_syscall_completer): Use
1553         std::string, gdb::unique_xmalloc_ptr.
1554
1555 2017-10-19  Tom Tromey  <tom@tromey.com>
1556
1557         * infcall.c (call_function_by_hand_dummy): Use std::string.
1558
1559 2017-10-19  Tom Tromey  <tom@tromey.com>
1560
1561         * mi/mi-main.c (mi_cmd_execute): Update.
1562         * top.h (prepare_execute_command): Return scoped_value_mark.
1563         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1564         Add move constructor.
1565         * top.c (prepare_execute_command): Return scoped_value_mark.
1566         (execute_command): Update.
1567
1568 2017-10-19  Pedro Alves  <palves@redhat.com>
1569
1570         * xml-support.c (xml_fetch_content_from_file): Check fread's
1571         return.
1572
1573 2017-10-19  Pedro Alves  <palves@redhat.com>
1574
1575         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1576         async.
1577         (handle_error_fd): New function.
1578         (ser_base_async): Add/delete an event loop file handler for
1579         error_fd.
1580
1581 2017-10-19  Pedro Alves  <palves@redhat.com>
1582
1583         * xml-support.c (xml_fetch_content_from_file): Don't read in
1584         chunks.  Instead use fseek to determine the file's size, and read
1585         it in one go.
1586
1587 2017-11-18  Keith Seitz  <keiths@redhat.com>
1588
1589         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1590         types.
1591         Add whitespace to front of type name.
1592
1593 2017-10-18  Keith Seitz  <keiths@redhat.com>
1594
1595         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1596         DW_AT_accessibility.
1597
1598 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1599
1600         * features/tic6x-c62x-linux.c: Remove.
1601
1602 2017-10-17  Tom Tromey  <tom@tromey.com>
1603
1604         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1605         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1606         (do_mixed_source_and_assembly): Likewise.
1607
1608 2017-10-17  Tom Tromey  <tom@tromey.com>
1609
1610         * regcache.c (regcache::xfer_part): Remove assertion.
1611
1612 2017-10-17  Pedro Alves  <palves@redhat.com>
1613
1614         * xml-support.c (xml_fetch_content_from_file): Call
1615         unique_ptr::release() instead unique_ptr::get() when passing
1616         through xrealloc.
1617
1618 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1619
1620         * regcache.c (regcache::xfer_part): Remove parameters read and
1621         write, add parameter is_raw.  All callers are updated.
1622
1623 2017-10-16  Keith Seitz  <keiths@redhat.com>
1624
1625         * c-typeprint.c (enum access_specifier): Moved here from
1626         c_type_print_base.
1627         (output_access_specifier): New function.
1628         (c_type_print_base): Consider typedefs when assessing
1629         whether access labels are needed.
1630         Use output_access_specifier as needed.
1631         Output access specifier for typedefs, if needed.
1632         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1633         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1634         fields.
1635         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1636         accessor macros.
1637
1638 2017-10-16  Tom Tromey  <tom@tromey.com>
1639
1640         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1641         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1642         * target.c (target_fileio_read_stralloc): Update.
1643         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1644         * target.h (target_fileio_read_stralloc): Return
1645         unique_xmalloc_ptr.
1646
1647 2017-10-16  Tom Tromey  <tom@tromey.com>
1648
1649         * xml-syscall.c (xml_init_syscalls_info): Update.
1650         * xml-support.c (xinclude_start_include): Update.
1651         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1652         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1653         (xml_fetch_content_from_file): Likewise.
1654         * osdata.c (get_osdata): Update.
1655         * target.h (target_read_stralloc, target_get_osdata): Return
1656         unique_xmalloc_ptr.
1657         * solib-aix.c (solib_aix_get_library_list): Update.
1658         * solib-target.c (solib_target_current_sos): Update.
1659         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1660         * xml-tdesc.c (fetch_available_features_from_target): Update.
1661         (target_fetch_description_xml): Update.
1662         (file_read_description_xml): Update.
1663         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1664         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1665         (remote_pid_to_exec_file): Update.
1666         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1667         (target_get_osdata): Likewise.
1668
1669 2017-10-16  Tom Tromey  <tom@tromey.com>
1670
1671         * remote.c (remote_register_number_and_offset): Use std::vector.
1672         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1673         (putpkt_binary): Use gdb::def_vector.
1674         (compare_sections_command): Use gdb::byte_vector.
1675
1676 2017-10-16  Tom Tromey  <tom@tromey.com>
1677
1678         * ppc-linux-nat.c (hwdebug_insert_point): Use
1679         gdb::unique_xmalloc_ptr, XDUP.
1680
1681 2017-10-16  Tom Tromey  <tom@tromey.com>
1682
1683         * probe.c (parse_probes): Use std::string.
1684         (info_probes_for_ops, enable_probes_command)
1685         (disable_probes_command): Remove cleanups.
1686
1687 2017-10-16  Tom Tromey  <tom@tromey.com>
1688
1689         * buildsym.c (block_compar): Remove.
1690         (end_symtab_get_static_block): Use std::vector.
1691
1692 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1693
1694         * memrange.h (struct mem_range): Define operator< and operator==.
1695         (mem_range_s): Remove.
1696         (DEF_VEC_O (mem_range_s)): Remove.
1697         (normalize_mem_ranges): Change parameter type to std::vector.
1698         * memrange.c (compare_mem_ranges): Remove.
1699         (normalize_mem_ranges): Change parameter type to std::vector,
1700         adjust to vector change.
1701         * exec.c (section_table_available_memory): Return vector, remove
1702         parameter.
1703         (section_table_read_available_memory): Adjust to std::vector
1704         change.
1705         * remote.c (remote_read_bytes): Adjust to std::vector
1706         change.
1707         * tracepoint.h (traceframe_available_memory): Change parameter
1708         type to std::vector.
1709         * tracepoint.c (traceframe_available_memory): Change parameter
1710         type to std::vector, adjust.
1711         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1712         std::vector change.
1713         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1714         unittests/memrange-selftests.c.
1715         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1716         * gdb/unittests/memrange-selftests.c: New file.
1717
1718 2017-10-16  Pedro Alves  <palves@redhat.com>
1719
1720         * elfread.c (probe_key_free): Rename range-for variable.
1721         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1722         (find_probe_by_pc, collect_probes): Rename range-for variable.
1723
1724 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1725
1726         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1727         * features/tic6x-c62x.c: Remove.
1728         * features/tic6x-c64x-linux.c: Remove.
1729         * features/tic6x-c64x.c: Remove.
1730         * features/tic6x-c64xp-linux.c: Remove.
1731         * features/tic6x-c64xp.c: Remove.
1732         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1733         initialize_tdesc_tic6x_*_linux functions.
1734         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1735         initialize_tdesc_tic6x_* functions.
1736
1737 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1738
1739         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1740         tic6x-c62x.
1741         * regformats/tic6x-c62x.dat: Remove.
1742         * regformats/tic6x-c64x.dat: Remove.
1743         * regformats/tic6x-c64xp.dat: Remove.
1744
1745 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1746
1747         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1748         (the !HAVE_LIBEXPAT version).
1749
1750 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1751
1752         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1753         const.
1754
1755 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1756
1757         * target.h: Include tracepoint.h.
1758         (enum trace_find_type): Move to tracepoint.h.
1759         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1760         * tracepoint.h: Don't include target.h
1761         (enum trace_find_type): Move from target.h.
1762         (parse_traceframe_info): Return a unique ptr.
1763         * tracepoint.c (current_traceframe_info): Change type to unique
1764         ptr.
1765         (free_traceframe_info): Remove.
1766         (clear_traceframe_info): Don't manually free
1767         current_traceframe_info.
1768         (free_result): Remove.
1769         (parse_traceframe_info): Return a unique ptr.
1770         (get_traceframe_info): Adjust to unique ptr.
1771         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1772         * remote.c (remote_traceframe_info): Return a unique ptr.
1773         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1774         ptr.
1775         * target-debug.h (target_debug_print_traceframe_info_up): New
1776         macro.
1777         * target-delegates.c: Regenerate.
1778
1779 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1780
1781         * memrange.h (struct mem_range): Add constructors.
1782         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1783         std::vector<mem_range>.
1784         * tracepoint.c (free_traceframe_info): Don't manually free
1785         vector.
1786         (traceframe_info_start_memory): Adjust to vector change.
1787         (traceframe_available_memory): Likewise.
1788         * tracefile-tfile.c (build_traceframe_info): Likewise.
1789         * ctf.c (ctf_traceframe_info): Likewise.
1790
1791 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1792
1793         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1794         std::vector<int>.
1795         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1796         (traceframe_info_start_tvar): Adjust to vector change.
1797         (parse_traceframe_info): Allocate with new.
1798         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1799         vector change.
1800         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1801         change.
1802         tfile_traceframe_info): Allocate with new.
1803         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1804         change.
1805
1806 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1807
1808         * tracepoint.c (traceframe_info): Rename to...
1809         (current_traceframe_info): ...this.
1810         (clear_traceframe_info): Adjust.
1811         (get_traceframe_info): Adjust.
1812
1813 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1814
1815         * nat/linux-osdata.c: Include algorithm.
1816         (compare_processes): Remove.
1817         (struct pid_pgid_entry): New struct.
1818         (linux_xfer_osdata_processgroups): Use std::vector instead of
1819         XNEWVEC.
1820
1821 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1822
1823         * objfiles.h: Don't include symfile.h.
1824         (struct partial_symbol): Remove forward-declaration.
1825         (struct objfile) <global_psymbols, static_psymbols>: Change type
1826         to std::vector<partial_symbol *>.
1827         * objfiles.c (objfile::objfile): Don't memset those fields.
1828         (objfile::~objfile): Don't free those fields.
1829         * psympriv.h (struct psymbol_allocation_list): Remove
1830         forward-declaration.
1831         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1832         to std::vector.
1833         (start_psymtab_common): Change parameters to std::vector.
1834         * psymtab.c: Include algorithm.
1835         (require_partial_symbols): Call shrink_to_fit.
1836         (find_pc_sect_psymbol): Adjust to vector change.
1837         (match_partial_symbol): Likewise.
1838         (lookup_partial_symbol): Likewise.
1839         (psym_relocate): Likewise.
1840         (dump_psymtab): Likewise.
1841         (recursively_search_psymtabs): Likewise.
1842         (compare_psymbols): Remove.
1843         (sort_pst_symbols): Adjust to vector change.
1844         (start_psymtab_common): Likewise.
1845         (end_psymtab_common): Likewise.
1846         (psymbol_bcache_full): De-constify return value.
1847         (add_psymbol_to_bcache): Likewise.
1848         (extend_psymbol_list): Remove.
1849         (append_psymbol_to_list): Adjust to vector change.
1850         (add_psymbol_to_list): Likewise.
1851         (init_psymbol_list): Likewise.
1852         (maintenance_info_psymtabs): Likewise.
1853         (maintenance_check_psymtabs): Likewise.
1854         * symfile.h (struct psymbol_allocation_list): Remove.
1855         * symfile.c (reread_symbols): Adjust to vector change.
1856         * dbxread.c (start_psymtab): Change type of parameters.
1857         (dbx_symfile_read): Adjust to vector change.
1858         (read_dbx_symtab): Likewise.
1859         (start_psymtab): Change type of parameters.
1860         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1861         (create_partial_symtab): Likewise.
1862         (add_partial_symbol): Likewise.
1863         (write_one_signatured_type): Likewise.
1864         (recursively_write_psymbols): Likewise.
1865         * mdebugread.c (parse_partial_symbols): Likewise.
1866         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1867         (scan_xcoff_symtab): Adjust to vector change.
1868         (xcoff_initial_scan): Likewise.
1869
1870 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1871
1872         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1873
1874 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1875
1876         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1877         Remove s390x-*-expedite, add s390x-expedite.
1878
1879 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1880
1881         * features/s390-gs-linux64.c: Regenerated.
1882         * features/s390x-gs-linux64.c: Regenerated.
1883
1884 2017-10-13  Tom Tromey  <tom@tromey.com>
1885
1886         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1887         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1888         delete.
1889         * symfile.c (symbol_file_add_with_addrs): Use new.
1890         (symbol_file_add_separate): Update comment.
1891         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1892         * jit.c (jit_object_close_impl): Use new.
1893         (jit_unregister_code): Use delete.
1894         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1895         (~objfile): Rename from free_objfile.
1896         (free_objfile_separate_debug, do_free_objfile_cleanup)
1897         (free_all_objfiles, objfile_purge_solibs): Use delete.
1898         * objfiles.h (struct objfile): Add constructor and destructor.
1899         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1900         (allocate_objfile, free_objfile): Don't declare.
1901         (struct objstats): Add initializers.
1902
1903 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1904
1905         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1906         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1907         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1908         * gdbarch.h: Regenerate.
1909         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1910         Adjust comment.
1911         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1912         (i386_displaced_step_fixup): Adjust comment.
1913         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1914
1915 2017-10-12  Tom Tromey  <tom@tromey.com>
1916
1917         * prologue-value.h (pv_area::store_would_trash): Return bool.
1918         (pv_area::find_reg): Likewise.
1919         * prologue-value.c (pv_area::store_would_trash): Return bool.
1920         (pv_area::find_reg): Likewise.
1921
1922 2017-10-12  Tom Tromey  <tom@tromey.com>
1923
1924         * s390-linux-tdep.c (s390_store, s390_load)
1925         (s390_check_for_saved, s390_analyze_prologue): Update.
1926         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1927         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1928         * prologue-value.h (class pv_area): Move from prologue-value.c.
1929         Change names of members.  Add constructor, destructor, member
1930         functions.
1931         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1932         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1933         (pv_area_fetch, pv_area_scan): Don't declare.
1934         * prologue-value.c (struct pv_area::area_entry): Now member of
1935         pv_area.
1936         (struct pv_area): Move to prologue-value.h.
1937         (pv_area::pv_area): Rename from make_pv_area.
1938         (pv_area::~pv_area): Rename from free_pv_area.
1939         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1940         (clear_entries, find_entry, overlaps, store_would_trash, store)
1941         (fetch, find_reg, scan): Now member of pv_area.
1942         Remove "area" argument.  Update.
1943         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1944         Update.
1945         * mn10300-tdep.c (push_reg, check_for_saved)
1946         (mn10300_analyze_prologue): Update.
1947         * mep-tdep.c (is_arg_spill, check_for_saved)
1948         (mep_analyze_prologue): Update.
1949         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1950         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1951         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1952         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1953         Update.
1954         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1955         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1956
1957 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1958
1959         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1960         * linux-nat.c (linux_nat_delete_thread): New variable.
1961         (lwp_free): Invoke linux_nat_delete_thread if set.
1962         (linux_nat_set_delete_thread): New function.
1963         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1964         thread delete callback.
1965         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1966         (_initialize_arm_linux_nat): Assign thread delete callback.
1967         * s390-linux-nat.c (s390_delete_thread): New function.
1968         (_initialize_s390_nat): Assign thread delete callback.
1969         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1970         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1971         function.
1972         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1973         declaration.
1974         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1975         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1976
1977 2017-10-09  Tom Tromey  <tom@tromey.com>
1978
1979         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1980         std::string.
1981         * tui/tui-layout.c (enum tui_status): Use std::string.
1982
1983 2017-10-11  Tom Tromey  <tom@tromey.com>
1984
1985         * gdbthread.h (thread_command): Constify.
1986         * inferior.h (detach_command): Constify.
1987         * top.h (set_history, show_history): Constify.
1988         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1989         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1990         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1991         * printcmd.c (set_command): Constify.
1992         (non_const_set_command): New function.
1993         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1994         * breakpoint.c (enable_command, disable_command, delete_command)
1995         (catch_command, tcatch_command, set_breakpoint_cmd)
1996         (show_breakpoint_cmd): Constify.
1997         * macrocmd.c (macro_command): Constify.
1998         * infcmd.c (unset_command, kill_command, detach_command)
1999         (info_proc_cmd): Constify.
2000         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2001         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2002         (info_auto_load_cmd): Constify.
2003         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2004         (unset_tdesc_cmd): Constify.
2005         * ada-lang.c (set_ada_command, show_ada_command)
2006         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2007         * guile/guile.c (set_guile_command, show_guile_command)
2008         (info_guile_command): Constify.
2009         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2010         Constify.
2011         * skip.c (skip_command): Constify.
2012         * compile/compile.c (_initialize_compile): Constify.
2013         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2014         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2015         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2016         (maint_btrace_pt_show_cmd): Constify.
2017         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2018         Constify.
2019         * python/python.c (user_show_python, user_set_python): Constify.
2020         * mips-tdep.c (set_mips_command, show_mips_command)
2021         (set_mipsfpu_command): Constify.
2022         * record-btrace.c (cmd_record_btrace_start)
2023         (cmd_set_record_btrace, cmd_show_record_btrace)
2024         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2025         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2026         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2027         Constify.
2028         * symfile.c (overlay_command): Constify.
2029         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2030         * cli/cli-logging.c (set_logging_command, show_logging_command):
2031         Constify.
2032         * cli/cli-dump.c (dump_command, append_command)
2033         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2034         (tekhex_dump_command, binary_dump_command)
2035         (binary_append_command): Constify.
2036         * cli/cli-decode.c (struct cmd_list_element): Change type of
2037         "fun".
2038         * cli/cli-cmds.c (info_command, show_command, set_debug)
2039         (show_debug): Constify.
2040         (show_command): Add non-const overload.
2041         * top.c (set_history, show_history): Constify.
2042         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2043         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2044         * target.c (target_command): Constify.
2045         * sparc64-tdep.c (info_adi_command): Constify.
2046         * record-full.c (cmd_record_full_start): Constify.
2047         (set_record_full_command): Constify.  Fix typo.
2048         (show_record_full_command): Constify.
2049         * thread.c (thread_command, thread_apply_command): Constify.
2050         * memattr.c (dummy_cmd): Constify.
2051         * value.c (function_command): Constify.
2052         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2053         * probe.c (info_probes_command): Constify.
2054         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2055         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2056         (show_thread_cmd, set_thread_default_cmd)
2057         (show_thread_default_cmd): Constify.
2058         (check_empty): Constify.
2059         * tracepoint.c (tfind_command): Constify.
2060         * cp-support.c (maint_cplus_command): Constify.
2061         * windows-tdep.c (info_w32_command): Constify.
2062         * record.c (cmd_record_start, set_record_command)
2063         (show_record_command, info_record_command, cmd_record_goto):
2064         Constify.
2065         * ravenscar-thread.c (set_ravenscar_command)
2066         (show_ravenscar_command): Constify.
2067         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2068         Constify.
2069         (add_internal_problem_command): Remove casts.
2070         * arc-tdep.c (maintenance_print_arc_command): Constify.
2071         * valprint.c (set_print, show_print, set_print_raw)
2072         (show_print_raw): Constify.
2073         * maint.c (maintenance_command, maintenance_info_command)
2074         (maintenance_print_command, maintenance_set_cmd)
2075         (maintenance_show_cmd, set_per_command_cmd)
2076         (show_per_command_cmd, maintenance_check_command): Constify.
2077         * language.c (set_check, show_check): Constify.
2078         * typeprint.c (show_print_type, set_print_type): Constify.
2079         * go32-nat.c (go32_info_dos_command): Constify.
2080
2081 2017-10-11  Tom Tromey  <tom@tromey.com>
2082
2083         * breakpoint.c (prepare_re_set_context): Remove.
2084         (breakpoint_re_set_one): Update.  Don't use cleanups.
2085         (breakpoint_re_set): Use scoped_restore, std::string, and
2086         scoped_restore_current_language.
2087
2088 2017-10-11  Tom Tromey  <tom@tromey.com>
2089
2090         * breakpoint.c (commands_command_1): Use std::string.
2091         (cleanup_executing_breakpoints): Remove.
2092         (bpstat_do_actions_1): Use scoped_restore.
2093         (bpstat_check_watchpoint): Use std::string.
2094         (decode_static_tracepoint_spec): Likewise.
2095         (break_range_command): Likewise.
2096         (watch_command_1): Likewise.
2097         (compare_breakpoints): Change argument types.
2098         (clear_command): Use std::vector.
2099         (cleanup_executing_breakpoints): Remove.
2100         (update_global_location_list): Use unique_xmalloc_ptr.
2101         (strace_command): Remove unused declaration.
2102
2103 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2104
2105         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2106         * NEWS: Mention new FreeBSD/arm native configuration.
2107         * configure.host: Add arm*-*-freebsd*.
2108         * configure.nat: Likewise.
2109         * arm-fbsd-nat.c: New file.
2110
2111 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2112
2113         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2114         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2115         * NEWS: Mention new FreeBSD/arm target.
2116         * configure.tgt: Add arm*-*-freebsd*.
2117         * arm-fbsd-tdep.c: New file.
2118         * arm-fbsd-tdep.h: New file.
2119
2120 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2121
2122         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2123         `gdbarch_elfcore_write_linux_prpsinfo'.
2124         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2125         method.
2126         (elf_internal_linux_prpsinfo): Remove declaration.
2127         * gdbarch.h: Regenerate.
2128         * gdbarch.c: Regenerate.
2129
2130 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2131
2132         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2133         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2134
2135 2017-10-11  Pedro Alves  <palves@redhat.com>
2136
2137         * breakpoint.c (reattach_breakpoints): Delete.
2138         * breakpoint.h (reattach_breakpoints): Delete.
2139
2140 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2141
2142         * symfile.c (registered_sym_fns): Make struct, not typedef.
2143         (DEF_VEC_O (registered_sym_fns)): Remove.
2144         (symtab_fns): Change type to std::vector.
2145         (add_symtab_fns): Adjust.
2146         (find_sym_fns): Adjust.
2147
2148 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2149
2150         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2151         * arc-tdep.h (arc_arch_is_em): New function.
2152         (arc_arch_is_hs): Likewise.
2153
2154 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2155
2156         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2157         parentheses in the declaration.
2158         (macro_lookup_inclusion): Likewise.
2159         (macro_lookup_definition): Likewise.
2160         * p-lang.h (pascal_builtin_types): Likewise.
2161         * tui/tui-data.c (tui_win_list): Likewise.
2162         * tui/tui-data.h (tui_win_list): Likewise.
2163         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2164
2165 2017-10-11  Mark Rages  <markrages@gmail.com>
2166
2167         * target-memory.c (block_boundaries): Fix for block address not
2168         aligned on block size.
2169
2170 2017-10-10  Pedro Alves <palves@redhat.com>
2171             Tom Tromey  <tom@tromey.com>
2172
2173         * breakpoint.c (struct captured_breakpoint_query_args)
2174         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2175         (print_breakpoint): New.
2176         * breakpoint.h (print_breakpoint): Declare.
2177         * common/common-exceptions.h (enum return_reason): Remove
2178         references to catch_exceptions.
2179         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2180         Delete.
2181         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2182         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2183         * gdb.h: Delete.
2184         * gdbthread.h (thread_select): Declare.
2185         * mi/mi-cmd-break.c: Don't include gdb.h.
2186         (breakpoint_notify): Use print_breakpoint.
2187         * mi/mi-cmd-catch.c: Don't include gdb.h.
2188         * mi/mi-interp.c: Don't include gdb.h.
2189         (mi_print_breakpoint_for_event): New.
2190         (mi_breakpoint_created, mi_breakpoint_modified): Use
2191         mi_print_breakpoint_for_event.
2192         * mi/mi-main.c: Don't include gdb.h.
2193         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2194         thread_select instead of gdb_thread_select.
2195         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2196         of using gdb_list_thread_ids.
2197         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2198         FILEIO_ENOSYS here.
2199         (remote_fileio_request): Use TRY/CATCH instead of
2200         catch_exceptions.
2201         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2202         (symbol_file_add_from_memory_wrapper): Delete.
2203         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2204         * thread.c: Don't include gdb.h.
2205         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2206         (thread_alive): Use thread_select.
2207         (do_captured_thread_select): Delete, parts salvaged as ...
2208         (thread_select): ... this new function.
2209         (gdb_thread_select): Delete.
2210
2211 2017-10-10  Pedro Alves  <palves@redhat.com>
2212             Tom Tromey  <tom@tromey.com>
2213
2214         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2215         and reverse logic.
2216         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2217         No longer macros.  Instead ...
2218         (enum wp_check_result): They're now values of this new
2219         enumeration.
2220         (watchpoint_check): Change return type to wp_check_result and
2221         parameter type to bpstat.
2222         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2223         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2224         catch_errors.  Reverse logic of watchpoint_check call.
2225         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2226         pointer as parameter.
2227         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2228         * common/common-exceptions.c (throw_exception_sjlj): Update
2229         comments to avoid mentioning catch_errors.
2230         * exceptions.c (catch_errors): Delete.
2231         * exceptions.h: Update comments to avoid mentioning catch_errors.
2232         (catch_errors_ftype, catch_errors): Delete.
2233         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2234         (hook_stop_stub): Delete.
2235         (restore_selected_frame): Change return type to void, and
2236         parameter type to const frame_id &.
2237         (restore_infcall_control_state): Use TRY/CATCH instead of
2238         catch_errors.
2239         * main.c (captured_command_loop): Return void and remove
2240         parameter.  Remove references to catch_errors.
2241         (captured_main): Use TRY/CATCH instead of catch_errors.
2242         * objc-lang.c (objc_submethod_helper_data)
2243         (find_objc_msgcall_submethod_helper): Delete.
2244         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2245         catch_errors.
2246         * record-full.c (record_full_message): Return void.
2247         (record_full_message_args, record_full_message_wrapper): Delete.
2248         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2249         instead of catch_errors.
2250         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2251         parameter type to int.
2252         * solib-darwin.c (open_symbol_file_object): Ditto.
2253         * solib-dsbt.c (open_symbol_file_object): Ditto.
2254         * solib-frv.c (open_symbol_file_object): Ditto.
2255         * solib-svr4.c (open_symbol_file_object): Ditto.
2256         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2257         * solib.c (update_solib_list): Use TRY/CATCH instead of
2258         catch_errors.
2259         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2260         Change type.
2261         * symmisc.c (struct print_symbol_args): Remove.
2262         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2263         (print_symbol): Change type.
2264         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2265         and remove parameters.
2266         (catch_errors): New.
2267         (get_windows_debug_event): Adjust.
2268
2269 2017-10-09  Tom Tromey  <tom@tromey.com>
2270
2271         * mi/mi-main.c (free_splay_tree): Remove.
2272         (list_available_thread_groups): Use splay_tree_up.
2273         * common/gdb_splay_tree.h: New file.
2274
2275 2017-10-09  Tom Tromey  <tom@tromey.com>
2276
2277         * mi/mi-main.c (do_nothing): Remove.
2278         (list_available_thread_groups): Update.
2279
2280 2017-10-09  Pedro Alves  <palves@redhat.com>
2281
2282         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2283         reading registers when switching context.
2284
2285 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2286
2287         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2288         (fbsd_convert_siginfo): Likewise.
2289         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2290
2291 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2292
2293         * configure.ac (try_guile_versions): Remove guile-2.2.
2294         * configure: Regenerate.
2295
2296 2017-10-09  Tom Tromey  <tom@tromey.com>
2297
2298         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2299         (COMPILE.pre): Use $(CXX).
2300
2301 2017-10-09  Pedro Alves  <palves@redhat.com>
2302
2303         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2304         Use bool.
2305         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2306         * cp-support.h (cp_remove_params): Now returns a
2307         gdb::unique_xmalloc_ptr.
2308         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2309         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2310         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2311         returning a gdb::unique_xmalloc_ptr.
2312         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2313         * stack.c (find_frame_funname): Adjust to cp_remove_params
2314         returning a gdb::unique_xmalloc_ptr.
2315
2316 2017-10-08  Tom Tromey  <tom@tromey.com>
2317
2318         * dwarf2read.c (dwarf2_get_dwz_file): Use
2319         gdb::unique_xmalloc_ptr.
2320         (find_slot_in_mapped_hash): Likewise.
2321         (dwarf2_physname): Likewise.
2322         (create_dwo_unit_in_dwp_v1): Use std::string.
2323         (create_dwo_unit_in_dwp_v2): Likewise.
2324         (lookup_dwo_cutu): Likewise.
2325         (inherit_abstract_dies): Use std::vector.
2326         (read_array_type): Likewise.
2327         (dwarf_decode_macros): Remove unused declaration.
2328         (unsigned_int_compar): Remove.
2329         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2330         (psymtabs_addrmap_cleanup): Remove.
2331
2332 2017-10-08  Tom Tromey  <tom@tromey.com>
2333
2334         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2335         * frame.h (frame_cleanup_after_sniffer): Declare.
2336         (frame_prepare_for_sniffer): Return void.
2337         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2338         type of argument.
2339         (frame_prepare_for_sniffer): Return void.
2340
2341 2017-10-08  Tom Tromey  <tom@tromey.com>
2342
2343         * utils.h (make_cleanup_value_free): Remove.
2344         * utils.c (do_value_free, struct cleanup): Remove.
2345         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2346         Use gdb_value_up.
2347         * value.h (struct value_deleter): New.
2348         (gdb_value_up): New typedef.
2349
2350 2017-10-08  Tom Tromey  <tom@tromey.com>
2351
2352         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2353         (make_cleanup_free_search_symbols): Remove.
2354         (search_symbols): Return std::vector.
2355         (symbol_search::compare_search_syms): Now member of
2356         symbol_search.  Change arguments.
2357         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2358         (symtab_symbol_info, rbreak_command): Update.
2359         * symtab.h (struct symbol_search) <next>: Remove.
2360         Add constructors.
2361         (symbol_search::operator<): New function.
2362         (symbol_search::operator==): New function.
2363         (search_symbols): Remove std::vector.
2364         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2365         (symbol_search::compare_search_syms): Declare.
2366
2367 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2368
2369         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2370         arch/aarch64-insn.o.
2371         Remove one rule.
2372         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2373
2374 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2375
2376         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2377         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2378         arch/arm-linux.o respectively.
2379         * configure.tgt: Likewise.
2380
2381 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2382
2383         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2384         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2385
2386 2017-10-06  Pedro Alves  <palves@redhat.com>
2387
2388         * windows-nat.c: Include <algorithm>.
2389
2390 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2391
2392         * configure.tgt (i386_tobjs): New variable.
2393         (amd64_tobjs): New variable.
2394         Set $cpu_obs and $os_obs.
2395
2396 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2397
2398         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2399         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2400         (clean): Remove object files and dependency files.
2401         (distclean): Remove the directory.
2402         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2403         * configure: Re-generated.
2404         * configure.tgt: Replace amd64.o with arch/amd64.o.
2405
2406 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2407
2408         PR build/22188
2409         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2410         and SETEND.
2411
2412 2017-10-05  Pedro Alves  <palves@redhat.com>
2413
2414         * linux-nat.c (linux_child_follow_fork): When following the parent
2415         and detaching the child, consult the parent thread's architecture
2416         instead of the child's.
2417
2418 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2419
2420         * ax.h: Do not include "doublest.h".
2421         (union agent_val): Remove.
2422
2423 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2424
2425         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2426         (decimal_to_string): Return std::string object.
2427         (decimal_from_string): Accept std::string object.  Return bool.
2428         (decimal_from_integral, decimal_from_doublest): Remove.
2429         (decimal_from_longest): Add prototype.
2430         (decimal_from_ulongest): Likewise.
2431         (decimal_to_longest): Likewise.
2432         (decimal_from_doublest): Likewise.
2433         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2434         (MAX_DECIMAL_STRING): Move here.
2435         (decimal_to_string): Return std::string object.
2436         (decimal_from_string): Accept std::string object.  Return bool.
2437         (decimal_from_integral): Remove, replace by ...
2438         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2439         (decimal_to_longest): New function.
2440         (decimal_from_floating): Remove, replace by ...
2441         (decimal_from_doublest): ... this new function.
2442         (decimal_to_doublest): Update to new decimal_to_string interface.
2443
2444         * value.c (unpack_long): Use decimal_to_longest.
2445         * valops.c (value_cast): Use decimal_from_doublest instead of
2446         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2447         decimal_from_integral.
2448         * valarith.c (value_args_as_decimal): Likewise.
2449         * valprint.c (print_decimal_floating): Update to new
2450         decimal_to_string interface.
2451         * printcmd.c (printf_decfloat): Likewise.
2452         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2453
2454 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2455
2456         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2457         * gdbtypes.c: Include "floatformat.h".
2458         * value.c: Likewise.
2459         * m68k-tdep.c: Likewise.
2460
2461         * findvar.c: Do not include "floatformat.h".
2462         * amd64-darwin-tdep.c: Likewise.
2463         * arm-linux-tdep.c: Likewise.
2464         * i386-darwin-tdep.c: Likewise.
2465         * i387-tdep.c: Likewise.
2466         * m68k-linux-tdep.c: Likewise.
2467         * mep-tdep.c: Likewise.
2468         * mips-tdep.c: Likewise.
2469         * nios2-tdep.c: Likewise.
2470         * s390-linux-tdep.c: Likewise.
2471         * sparc-obsd-tdep.c: Likewise.
2472         * sparc-tdep.c: Likewise.
2473         * sparc64-tdep.c: Likewise.
2474         * spu-tdep.c: Likewise.
2475         * tic6x-tdep.c: Likewise.
2476         * tilegx-tdep.c: Likewise.
2477         * vax-tdep.c: Likewise.
2478         * xstormy16-tdep.c: Likewise.
2479         * xtensa-tdep.c: Likewise.
2480
2481         * top.c: Do not include "doublest.h".
2482         * aarch64-tdep.c: Likewise.
2483         * alpha-tdep.c: Likewise.
2484         * arm-linux-tdep.c: Likewise.
2485         * m68k-linux-tdep.c: Likewise.
2486         * tilegx-tdep.c: Likewise.
2487         * xstormy16-tdep.c: Likewise.
2488
2489 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2490
2491         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2492         (mipsn32_fbsd_sigframe): Define.
2493         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2494         for FreeBSD/mipsn32.
2495
2496 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2497
2498         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2499         AT_HWCAP.
2500
2501 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2502
2503         * MAINTAINERS (Misc): Update my email address.
2504
2505 2017-10-04  Pedro Alves  <palves@redhat.com>
2506
2507         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2508         it instead of target_gdbarch.
2509         (get_remote_state, get_remote_packet_size): Adjust
2510         get_remote_arch_state calls, passing down target_gdbarch
2511         explicitly.
2512         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2513         'gdbarch' and use it instead of target_gdbarch.
2514         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2515         passing down target_gdbarch explicitly.
2516         (struct stop_reply) <arch>: New field.
2517         (remote_parse_stop_reply): Use the stopped thread's architecture,
2518         not the current inferior's.  Save the architecture in the
2519         stop_reply.
2520         (process_stop_reply): Use the stop reply's architecture.
2521         (process_g_packet, remote_fetch_registers)
2522         (remote_prepare_to_store, store_registers_using_G)
2523         (remote_store_registers): Adjust get_remote_arch_state calls,
2524         using the regcache's architecture.
2525         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2526         passing down target_gdbarch explicitly.
2527         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2528         beneath instead of calling target_gdbarch.
2529         * target.c (default_thread_architecture): Use the specified
2530         inferior's architecture, instead of the current inferior's
2531         architecture (via target_gdbarch).
2532
2533 2017-10-04  Pedro Alves  <palves@redhat.com>
2534
2535         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2536         case.
2537         (regcache_print): Handle !target_has_registers here instead.
2538
2539 2017-10-04  Pedro Alves  <palves@redhat.com>
2540
2541         * frame.c (create_test_frame): Delete.
2542         * frame.h (create_test_frame): Delete.
2543         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2544         (class regcache_test): Delete.
2545         (test_target_has_registers, test_target_has_stack)
2546         (test_target_has_memory, test_target_prepare_to_store)
2547         (test_target_store_registers): New functions.
2548         (test_target_ops): New class.
2549         (register_to_value_test): Error out if there's already a
2550         process_stratum (or higher) target pushed.  Create a fuller mock
2551         environment, with mock target_ops, inferior, address space, thread
2552         and inferior_ptid.
2553         * progspace.c (struct address_space): Move to ...
2554         * progspace.h (struct address_space): ... here.
2555         * regcache.h (regcache::~regcache, regcache::raw_write)
2556         [GDB_SELF_TEST]: No longer virtual.
2557
2558 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2559
2560         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2561
2562 2017-10-04  Pedro Alves  <palves@redhat.com>
2563
2564         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2565         out of 'between TRY and CATCH'.
2566
2567 2017-10-04  Pedro Alves  <palves@redhat.com>
2568
2569         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2570         * common/common-exceptions.h (TRY): Open an outermost scope.
2571         Expand intro comment.
2572         (CATCH): Reindent.
2573         (END_CATCH): Close the outermost scope.
2574         * completer.c (complete_line_internal): Add missing END_CATCH.
2575
2576 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2577
2578         * NEWS (Changes since GDB 8.0): Add entry about new
2579         'set-cwd-on-gdbserver' feature.
2580         (New remote packets): Add entry for QSetWorkingDir.
2581         * common/common-inferior.h (set_inferior_cwd): New prototype.
2582         * infcmd.c (set_inferior_cwd): Remove "static".
2583         (show_cwd_command): Expand text to include remote debugging.
2584         * remote.c: Add PACKET_QSetWorkingDir.
2585         (remote_protocol_features) <QSetWorkingDir>: New entry for
2586         PACKET_QSetWorkingDir.
2587         (extended_remote_set_inferior_cwd): New function.
2588         (extended_remote_create_inferior): Call
2589         "extended_remote_set_inferior_cwd".
2590         (_initialize_remote): Call "add_packet_config_cmd" for
2591         QSetWorkingDir.
2592
2593 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2594
2595         * NEWS (New commands): Mention "set/show cwd".
2596         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2597         "cd" command's help text.
2598         * common/common-inferior.h (get_inferior_cwd): New prototype.
2599         * infcmd.c (inferior_cwd_scratch): New global variable.
2600         (set_inferior_cwd): New function.
2601         (get_inferior_cwd): Likewise.
2602         (set_cwd_command): Likewise.
2603         (show_cwd_command): Likewise.
2604         (_initialize_infcmd): Add "set/show cwd" commands.
2605         * inferior.h (class inferior) <cwd>: New field.
2606         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2607         (fork_inferior): Change inferior's cwd before its execution.
2608         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2609         to CreateProcess.
2610
2611 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2612
2613         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2614         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2615         (COMMON_OBS): Add gdb_tilde_expand.o.
2616         * common/gdb_tilde_expand.c: New file.
2617         * common/gdb_tilde_expand.h: Likewise.
2618
2619 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2620
2621         * gdbarch.sh (objfile): Remove duplicate declaration.
2622         * gdbarch.h: Regenerate.
2623
2624 2017-10-03  Tom Tromey  <tom@tromey.com>
2625
2626         * utils.c (internal_vproblem): Use string_vprintf.
2627
2628 2017-10-03  Tom Tromey  <tom@tromey.com>
2629
2630         * printcmd.c (info_symbol_command): Use std::string.
2631
2632 2017-10-03  Tom Tromey  <tom@tromey.com>
2633
2634         * top.c (gdb_safe_append_history): Use std::string.
2635
2636 2017-10-03  Tom Tromey  <tom@tromey.com>
2637
2638         * event-top.c (stdin_event_handler): Update.
2639         * main.c (captured_main_1): Update.
2640         * top.h (make_delete_ui_cleanup): Remove.
2641         (struct ui): Add constructor and destructor.
2642         (new_ui, delete_ui): Remove.
2643         * top.c (make_delete_ui_cleanup): Remove.
2644         (new_ui_command): Use std::unique_ptr.
2645         (delete_ui_cleanup): Remove.
2646         (ui::ui): Rename from new_ui.  Update.
2647         (free_ui): Remove.
2648         (ui::~ui): Rename from delete_ui.  Update.
2649
2650 2017-10-03  Tom Tromey  <tom@tromey.com>
2651
2652         * symfile.c (load_progress): Use gdb::byte_vector.
2653
2654 2017-10-03  Tom Tromey  <tom@tromey.com>
2655
2656         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2657         declaration.
2658         * printcmd.c (x_command): Remove unused declaration.
2659         * symfile.c (symbol_file_command): Remove unused declaration.
2660
2661 2017-10-03  Tom Tromey  <tom@tromey.com>
2662
2663         * utils.c (internal_vproblem): Use std::string.
2664         (defaulted_query): Likewise.
2665
2666 2017-10-03  Tom Tromey  <tom@tromey.com>
2667
2668         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2669         * top.c (execute_command_to_string): Update.
2670         * utils.c (make_cleanup_restore_page_info): Remove.
2671         (do_restore_page_info_cleanup): Remove.
2672         (set_batch_flag_and_restore_page_info):
2673         New.
2674         (make_cleanup_restore_page_info): Remove.
2675         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2676         (~set_batch_flag_and_restore_page_info): New
2677         (make_cleanup_restore_uinteger): Remove.
2678         (make_cleanup_restore_integer): Remove.
2679         (struct restore_integer_closure): Remove.
2680         (restore_integer): Remove.
2681         * utils.h (struct set_batch_flag_and_restore_page_info): New
2682         class.
2683         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2684         (make_cleanup_restore_page_info): Remove.
2685         (make_cleanup_restore_uinteger) Remove.
2686         (make_cleanup_restore_integer) Remove.
2687
2688 2017-10-03  Tom Tromey  <tom@tromey.com>
2689
2690         * record-full.h (record_full_gdb_operation_disable_set): Return
2691         scoped_restore_tmpl<int>.
2692         * infrun.c (adjust_pc_after_break): Update.
2693         (handle_signal_stop): Update.
2694         * record-full.c (record_full_gdb_operation_disable_set): Return
2695         scoped_restore_tmpl<int>.
2696         (record_full_wait_1, record_full_insert_breakpoint)
2697         (record_full_remove_breakpoint, record_full_save)
2698         (record_full_goto_insn): Update.
2699
2700 2017-10-02  Tom Tromey  <tom@tromey.com>
2701
2702         PR rust/22236:
2703         * rust-lang.c (rust_val_print_str): New function.
2704         (val_print_struct): Call it.
2705         (rust_subscript): Preserve name of slice type.
2706
2707 2017-10-02  Tom Tromey  <tom@tromey.com>
2708
2709         * rust-lang.c (rust_subscript): Handle slices in
2710         EVAL_AVOID_SIDE_EFFECTS case.
2711
2712 2017-10-02  Tom Tromey  <tom@tromey.com>
2713
2714         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2715
2716 2017-10-02  Tom Tromey  <tom@tromey.com>
2717
2718         * rust-lang.h (rust_slice_type): Add "extern".
2719
2720 2017-10-02  Tom Tromey  <tom@tromey.com>
2721             Pedro Alves  <palves@redhat.com>
2722
2723         * ada-lang.h (ada_exc_info::operator<): Make const.
2724         (ada_exc_info::operator==): Make const.
2725         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2726         Make const.
2727
2728 2017-09-29  Tom Tromey  <tom@tromey.com>
2729
2730         * target.c (read_whatever_is_readable): Change type of "result".
2731         Update.
2732         (free_memory_read_result_vector): Remove.
2733         (read_memory_robust): Change return type.  Update.
2734         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2735         bin2hex, std::string.
2736         * target.h (memory_read_result_s): Remove typedef.
2737         (free_memory_read_result_vector): Remove.
2738         (read_memory_robust): Return std::vector.
2739
2740 2017-09-29  Tom Tromey  <tom@tromey.com>
2741
2742         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2743
2744 2017-09-29  Tom Tromey  <tom@tromey.com>
2745
2746         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2747         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2748         operator< and operator==.
2749         (ada_exceptions_list): Return a std::vector.
2750         * ada-lang.c (ada_exc_info::operator<): Rename from
2751         compare_ada_exception_info.
2752         (ada_exc_info::operator==): New.
2753         (sort_remove_dups_ada_exceptions_list): Change type of
2754         "exceptions".
2755         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2756         (ada_add_global_exceptions): Likewise.
2757         (ada_exceptions_list_1): Return a std::vector.
2758         (ada_exceptions_list): Likewise.
2759
2760 2017-09-29  Tom Tromey  <tom@tromey.com>
2761
2762         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2763         'std::set *'.
2764         (print_one_inferior): Update.
2765         (free_vector_of_ints): Remove.
2766         (list_available_thread_groups): Change "ids" to std::set.
2767         (mi_cmd_list_thread_groups): Update.
2768         (struct collect_cores_data) <core>: Now a std::set.
2769         (collect_cores): Update.
2770         (unique): Remove.
2771         (print_one_inferior): Update.
2772
2773 2017-09-29  Tom Tromey  <tom@tromey.com>
2774
2775         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2776         (mi_execute_async_cli_command): Likewise.
2777         (mi_cmd_trace_frame_collected): Use field_fmt.
2778
2779 2017-09-29  Tom Tromey  <tom@tromey.com>
2780
2781         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2782         gdb::byte_vector.
2783
2784 2017-09-29  Tom Tromey  <tom@tromey.com>
2785
2786         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2787
2788 2017-09-29  Tom Tromey  <tom@tromey.com>
2789
2790         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2791
2792 2017-09-29  Tom Tromey  <tom@tromey.com>
2793
2794         * varobj.h (varobj_gen_name): Return std::string.
2795         * varobj.c (varobj_gen_name): Return std::string.
2796         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2797         (mi_cmd_var_delete): Don't copy "name".
2798
2799 2017-09-29  Tom Tromey  <tom@tromey.com>
2800
2801         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2802         (mi_cmd_break_insert_1): Update.
2803
2804 2017-09-29  Tom Tromey  <tom@tromey.com>
2805
2806         * target.h (make_scoped_defer_target_commit_resume): Update.
2807         * target.c (make_scoped_defer_target_commit_resume): Rename from
2808         make_cleanup_defer_target_commit_resume.  Return a
2809         scoped_restore.
2810         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2811
2812 2017-09-29  Tom Tromey  <tom@tromey.com>
2813
2814         * main.c (captured_main_1): Remove unused declaration.
2815         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2816
2817 2017-09-29  Tom Tromey  <tom@tromey.com>
2818
2819         * symtab.c (search_symbols): Remove unused outer cleanup.
2820         (make_source_files_completion_list): Remove unused declaration.
2821
2822 2017-09-29  Tom Tromey  <tom@tromey.com>
2823
2824         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2825
2826 2017-09-29  Tom Tromey  <tom@tromey.com>
2827
2828         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2829         gdb::byte_vector.
2830
2831 2017-09-29  Tom Tromey  <tom@tromey.com>
2832
2833         * complaints.c (vcomplaint): Use std::string.
2834
2835 2017-09-29  Tom Tromey  <tom@tromey.com>
2836
2837         * tracepoint.c (trace_variable_command): Use std::string.
2838         (encode_actions_1): Remove unused declarations.
2839         (create_tsv_from_upload): Use std::string.
2840
2841 2017-09-29  Tom Tromey  <tom@tromey.com>
2842
2843         * cp-support.c (gdb_demangle): Use std::string.
2844
2845 2017-09-29  Tom Tromey  <tom@tromey.com>
2846
2847         * stack.c (parse_frame_specification): Use std::string
2848         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2849
2850 2017-09-29  Tom Tromey  <tom@tromey.com>
2851
2852         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2853
2854 2017-09-29  Tom Tromey  <tom@tromey.com>
2855
2856         * utils.c (vfprintf_maybe_filtered): Use std::string.
2857         (vfprintf_unfiltered): Likewise.
2858
2859 2017-09-29  Tom Tromey  <tom@tromey.com>
2860
2861         * event-top.c (top_level_prompt): Return std::string.
2862         (display_gdb_prompt): Update.
2863
2864 2017-09-29  Tom Tromey  <tom@tromey.com>
2865
2866         * unittests/common-utils-selftests.c (format): New function.
2867         (string_vprintf_tests): New function.
2868         (_initialize_common_utils_selftests): Register new tests.
2869         * common/common-utils.c (string_vprintf): New function.
2870         * common/common-utils.h (string_vprintf): Declare.
2871
2872 2017-09-29  Pedro Alves  <palves@redhat.com>
2873
2874         * common/rsp-low.c (unpack_varlen_hex): Constify.
2875         * common/rsp-low.h (unpack_varlen_hex): Constify.
2876         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2877         Constify.
2878         * remote.c (remote_set_permissions, read_ptid)
2879         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2880         (remote_static_tracepoint_marker_at)
2881         (remote_static_tracepoint_markers_by_strid)
2882         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2883         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2884         (parse_tracepoint_definition, parse_tsv_definition)
2885         (parse_static_tracepoint_marker_definition): Constify.
2886         * tracepoint.h (parse_static_tracepoint_marker_definition)
2887         (parse_trace_status, parse_tracepoint_status)
2888         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2889
2890 2017-09-29  Pedro Alves  <palves@redhat.com>
2891
2892         * remote.c (target_buf, target_buf_size): Delete.
2893         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2894         Use the connection's packet buffer instead.
2895         All callers adjusted.
2896         (_initialize_remote): Remove references to target_buf and
2897         target_buf_size.
2898
2899 2017-09-28  Pedro Alves  <palves@redhat.com>
2900
2901         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2902         unittests/common-utils-selftests.c.
2903         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2904         (COMMON_OBS): Remove utils-selftests.o.
2905         * utils-selftests.c: Move to ...
2906         * unittests/common-utils-selftests.c: ... here and rename self
2907         test to "string_printf".
2908
2909 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2910
2911         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2912         having NULL cus or tus.
2913
2914 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2915
2916         * arm-tdep.c: (convert_from_extended): Remove.
2917         (convert_to_extended): Likewise.
2918         (arm_extract_return_value): Use convert_typed_floating.
2919         (arm_store_return_value): Likewise.
2920
2921         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2922         * sh-tdep.c: Do not include "floatformat.h".
2923         (sh_littlebyte_bigword_type): New function.
2924         (sh_register_convert_to_virtual): Use convert_typed_floating.
2925         (sh_register_convert_to_raw): Likewise.
2926         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2927         (sh64_littlebyte_bigword_type): New function.
2928         (sh64_extract_return_value): Use convert_typed_floating.
2929         (sh64_register_convert_to_virtual): Likewise.
2930         (sh64_register_convert_to_raw): Likewise.
2931
2932 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2933
2934         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2935         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2936
2937         * gdbtypes.h (union type_specific): Make field floatformat hold
2938         just a single struct floatformat, not an array.
2939         (floatformat_from_type): Move here.
2940         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2941         changed TYPE_FLOATFORMAT definition.
2942         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2943         (recursive_dump_type): Likewise.
2944         (init_float_type): Install correct floatformat for byte order.
2945         (arch_float_type): Likewise.
2946
2947 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2948
2949         * gdbtypes.c (init_type): Change incoming argument from
2950         length-in-bytes to length-in-bits.  Assert length is a
2951         multiple of TARGET_CHAR_BITS.
2952         (arch_type, arch_flags_type): Likewise.
2953         (init_integer_type): Update call to init_type.
2954         (init_character_type): Likewise.
2955         (init_boolean_type): Likewise.
2956         (init_float_type): Likewise.
2957         (init_decfloat_type): Likewise.
2958         (init_complex_type): Likewise.
2959         (init_pointer_type): Likewise.
2960         (objfile_type): Likewise.
2961         (arch_integer_type): Update call to arch_type.
2962         (arch_character_type): Likewise.
2963         (arch_boolean_type): Likewise.
2964         (arch_float_type): Likewise.
2965         (arch_decfloat_type): Likewise.
2966         (arch_complex_type): Likewise.
2967         (arch_pointer_type): Likewise.
2968         (gdbtypes_post_init): Likewise.
2969
2970         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2971         (read_base_type): Likewise.
2972         * mdebugread.c (basic_type): Likewise.
2973         * stabsread.c (dbx_init_float_type): Likewise.
2974         (rs6000_builtin_type): Likewise.
2975         (read_range_type): Likewise.  Also, fix call to init_integer_type
2976         with erroneous length argument.
2977
2978         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2979         * d-lang.c (build_d_types): Likewise.
2980         * f-lang.c (build_fortran_types): Likewise.
2981         * go-lang.c (build_go_types): Likewise.
2982         * opencl-lang.c (build_opencl_types): Likewise.
2983         * jit.c (finalize_symtab): Likewise.
2984         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2985         (build_std_type_info_type): Likewise.
2986         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2987         update call to arch_flags_type.
2988
2989         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2990         arch_type.
2991         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2992         * windows-tdep.c (windows_get_tlb_type): Likewise.
2993
2994         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2995         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2996         * m32c-tdep.c (make_types): Likewise.
2997         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2998         (rl78_psw_type): Update call to arch_flags_type.
2999         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3000         * rx-tdep.c (rx_psw_type): Likewise.
3001         (rx_fpsw_type): Likewise.
3002         * sparc-tdep.c (sparc_psr_type): Likewise.
3003         (sparc_fsr_type): Likewise.
3004         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3005         (sparc64_ccr_type): Likewise.
3006         (sparc64_fsr_type): Likewise.
3007         (sparc64_fprs_type): Likewise.
3008
3009 2017-09-27  Tom Tromey  <tom@tromey.com>
3010
3011         * findcmd.c (find_command): Constify.
3012
3013 2017-09-27  Tom Tromey  <tom@tromey.com>
3014
3015         * ada-tasks.c (task_command_1, task_command): Constify.
3016
3017 2017-09-27  Tom Tromey  <tom@tromey.com>
3018
3019         * symtab.c (maintenance_print_symbol_cache)
3020         (maintenance_flush_symbol_cache)
3021         (maintenance_print_symbol_cache_statistics): Constify.
3022
3023 2017-09-27  Tom Tromey  <tom@tromey.com>
3024
3025         * inferior.c (detach_inferior_command, kill_inferior_command)
3026         (inferior_command): Constify.
3027
3028 2017-09-27  Tom Tromey  <tom@tromey.com>
3029
3030         * regcache.c (regcache_print, maintenance_print_registers)
3031         (maintenance_print_raw_registers)
3032         (maintenance_print_cooked_registers)
3033         (maintenance_print_register_groups)
3034         (maintenance_print_remote_registers): Constify.
3035
3036 2017-09-27  Tom Tromey  <tom@tromey.com>
3037
3038         * printcmd.c (map_display_numbers, undisplay_command)
3039         (enable_disable_display_command, enable_display_command)
3040         (disable_display_command): Constify.
3041
3042 2017-09-27  Tom Tromey  <tom@tromey.com>
3043
3044         * breakpoint.h (delete_command): Don't declare.
3045         * breakpoint.c (delete_command, enable_once_command)
3046         (enable_count_command, enable_delete_command, breakpoint_1)
3047         (maintenance_info_breakpoints, stopin_command, stopat_command)
3048         (delete_command, delete_trace_command, save_breakpoints)
3049         (save_breakpoints_command, save_tracepoints_command): Constify.
3050
3051 2017-09-27  Tom Tromey  <tom@tromey.com>
3052
3053         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3054         (skip_ws, extract_identifier, macro_define_command)
3055         (macro_undef_command, macro_list_command): Constify.
3056
3057 2017-09-27  Tom Tromey  <tom@tromey.com>
3058
3059         * infcmd.c (environment_info, set_environment_command)
3060         (unset_environment_command, path_info, info_proc_cmd_1)
3061         (info_proc_cmd_mappings, info_proc_cmd_stat)
3062         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3063         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3064
3065 2017-09-27  Tom Tromey  <tom@tromey.com>
3066
3067         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3068         Constify.
3069
3070 2017-09-27  Tom Tromey  <tom@tromey.com>
3071
3072         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3073
3074 2017-09-27  Tom Tromey  <tom@tromey.com>
3075
3076         * demangle.c (demangle_command): Constify.
3077
3078 2017-09-27  Tom Tromey  <tom@tromey.com>
3079
3080         * progspace.c (maintenance_info_program_spaces_command):
3081         Constify.
3082
3083 2017-09-27  Tom Tromey  <tom@tromey.com>
3084
3085         * compile/compile.c (check_raw_argument, compile_file_command)
3086         (compile_code_command, compile_print_command): Constify.
3087
3088 2017-09-27  Tom Tromey  <tom@tromey.com>
3089
3090         * reggroups.c (maintenance_print_reggroups): Constify.
3091
3092 2017-09-27  Tom Tromey  <tom@tromey.com>
3093
3094         * dwarf2read.c (save_gdb_index_command): Constify.
3095
3096 2017-09-27  Tom Tromey  <tom@tromey.com>
3097
3098         * stap-probe.c (info_probes_stap_command): Constify.
3099
3100 2017-09-27  Tom Tromey  <tom@tromey.com>
3101
3102         * fork-child.c (unset_exec_wrapper_command): Constify.
3103
3104 2017-09-27  Tom Tromey  <tom@tromey.com>
3105
3106         * btrace.c (get_uint, get_context_size, no_chunk)
3107         (maint_btrace_packet_history_cmd)
3108         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3109         (maint_info_btrace_cmd): Constify.
3110
3111 2017-09-27  Tom Tromey  <tom@tromey.com>
3112
3113         * reverse.c (delete_bookmark_command): Constify.
3114
3115 2017-09-27  Tom Tromey  <tom@tromey.com>
3116
3117         * remote.c (set_memory_packet_size)
3118         (set_memory_write_packet_size, show_memory_write_packet_size)
3119         (set_memory_read_packet_size, show_memory_read_packet_size)
3120         (compare_sections_command, packet_command, remote_put_command)
3121         (remote_get_command, remote_delete_command): Constify.
3122
3123 2017-09-27  Tom Tromey  <tom@tromey.com>
3124
3125         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3126         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3127         (set_mipsfpu_auto_command): Constify.
3128
3129 2017-09-27  Tom Tromey  <tom@tromey.com>
3130
3131         * cli/cli-cmds.h (cd_command): Constify.
3132         * cli/cli-cmds.c (cd_command): Constify.
3133
3134 2017-09-27  Tom Tromey  <tom@tromey.com>
3135
3136         * thread.c (thread_name_command, thread_find_command): Constify.
3137
3138 2017-09-27  Tom Tromey  <tom@tromey.com>
3139
3140         * probe.c (enable_probes_command, disable_probes_command):
3141         Constify.
3142
3143 2017-09-27  Tom Tromey  <tom@tromey.com>
3144
3145         * symfile.c (symbol_file_command): Constify.
3146         * gdbcore.h (deprecated_file_changed_hook): Constify.
3147         * exec.c (deprecated_file_changed_hook, exec_file_command)
3148         (file_command): Constify.
3149         * defs.h (symbol_file_command): Constify.
3150
3151 2017-09-27  Tom Tromey  <tom@tromey.com>
3152
3153         * remote-fileio.c (set_system_call_allowed)
3154         (show_system_call_allowed): Constify.
3155
3156 2017-09-27  Tom Tromey  <tom@tromey.com>
3157
3158         * tracepoint.c (delete_trace_variable_command)
3159         (tfind_end_command, tfind_start_command, tfind_pc_command)
3160         (tfind_tracepoint_command, tfind_line_command)
3161         (tfind_range_command, tfind_outside_command): Constify.
3162
3163 2017-09-27  Tom Tromey  <tom@tromey.com>
3164
3165         * ax-gdb.c (maint_agent_printf_command, agent_command)
3166         (agent_eval_command): Constify.
3167
3168 2017-09-27  Tom Tromey  <tom@tromey.com>
3169
3170         * tracepoint.c (info_scope_command): Constify.
3171         * python/python.c (gdbpy_decode_line): Constify.
3172         * python/py-breakpoint.c (bppy_init): Constify.
3173         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3174         * location.h: (new_linespec_location)
3175         (string_to_event_location_basic, string_to_event_location):
3176         Constify.
3177         * location.c (new_linespec_location)
3178         (string_to_event_location_basic, string_to_event_location):
3179         Constify.
3180         * linespec.h (decode_line_with_current_source)
3181         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3182         * linespec.c (linespec_lex_to_end)
3183         (decode_line_with_current_source)
3184         (decode_line_with_last_displayed): Constify.
3185         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3186         Constify.
3187         * cli/cli-cmds.c (edit_command, list_command): Constify.
3188         * breakpoint.h (until_break_command, watch_command_wrapper)
3189         (awatch_command_wrapper, rwatch_command_wrapper)
3190         (init_ada_exception_breakpoint): Constify.
3191         * breakpoint.c (break_command_1, dprintf_command)
3192         (break_range_command, watch_command_wrapper)
3193         (rwatch_command_wrapper, awatch_command_wrapper)
3194         (until_break_command, init_ada_exception_breakpoint)
3195         (strace_marker_create_sals_from_location, trace_command)
3196         (ftrace_command, strace_command, struct tracepoint): Constify.
3197         * ax-gdb.c (agent_command_1): Constify.
3198         * ada-lang.c (ada_exception_sal): Constify.
3199
3200 2017-09-27  Tom Tromey  <tom@tromey.com>
3201
3202         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3203         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3204         (get_context_size, no_chunk, get_insn_history_modifiers)
3205         (cmd_record_insn_history, get_call_history_modifiers)
3206         (cmd_record_call_history): Constify.
3207
3208 2017-09-27  Tom Tromey  <tom@tromey.com>
3209
3210         * source.c (show_substitute_path_command)
3211         (unset_substitute_path_command, set_substitute_path_command):
3212         Constify.
3213
3214 2017-09-27  Tom Tromey  <tom@tromey.com>
3215
3216         * typeprint.c (maintenance_print_type): Constify.
3217         * maint.c (maintenance_dump_me, maintenance_demangle)
3218         (maintenance_time_display, maintenance_info_sections)
3219         (maintenance_print_statistics, maintenance_deprecate)
3220         (maintenance_undeprecate): Constify.
3221         (maintenance_do_deprecate): Constify.  Use std::string.
3222         (maintenance_selftest): Constify.
3223         * gdbtypes.h (maintenance_print_type): Constify.
3224
3225 2017-09-27  Tom Tromey  <tom@tromey.com>
3226
3227         * hppa-tdep.c (unwind_command): Constify.
3228
3229 2017-09-27  Tom Tromey  <tom@tromey.com>
3230
3231         * target-descriptions.c (unset_tdesc_filename_cmd)
3232         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3233         Constify.
3234
3235 2017-09-27  Tom Tromey  <tom@tromey.com>
3236
3237         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3238
3239 2017-09-27  Tom Tromey  <tom@tromey.com>
3240
3241         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3242
3243 2017-09-27  Tom Tromey  <tom@tromey.com>
3244
3245         * tui/tui-regs.c (tui_reg_command): Constify.
3246
3247 2017-09-27  Tom Tromey  <tom@tromey.com>
3248
3249         * skip.c (skip_file_command, skip_function_command)
3250         (skip_enable_command, skip_disable_command, skip_delete_command):
3251         Constify.
3252
3253 2017-09-27  Tom Tromey  <tom@tromey.com>
3254
3255         * record-btrace.c (cmd_record_btrace_bts_start)
3256         (cmd_record_btrace_pt_start): Constify.
3257
3258 2017-09-27  Tom Tromey  <tom@tromey.com>
3259
3260         * symmisc.c (maintenance_print_symbols)
3261         (maintenance_print_msymbols, maintenance_print_objfiles)
3262         (maintenance_info_symtabs, maintenance_check_symtabs)
3263         (maintenance_expand_symtabs, maintenance_info_line_tables):
3264         Constify.
3265
3266 2017-09-27  Tom Tromey  <tom@tromey.com>
3267
3268         * top.c (new_ui_command): Constify.
3269
3270 2017-09-27  Tom Tromey  <tom@tromey.com>
3271
3272         * symfile.c (add_symbol_file_command)
3273         (remove_symbol_file_command, list_overlays_command)
3274         (map_overlay_command, unmap_overlay_command)
3275         (overlay_auto_command, overlay_manual_command)
3276         (overlay_off_command, overlay_load_command): Constify.
3277
3278 2017-09-27  Tom Tromey  <tom@tromey.com>
3279
3280         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3281         (info_spu_mailbox_command, info_spu_dma_command)
3282         (info_spu_proxydma_command): Constify.
3283
3284 2017-09-27  Tom Tromey  <tom@tromey.com>
3285
3286         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3287
3288 2017-09-27  Tom Tromey  <tom@tromey.com>
3289
3290         * cli/cli-script.c (user_defined_command): Constify.
3291
3292 2017-09-27  Tom Tromey  <tom@tromey.com>
3293
3294         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3295         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3296         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3297         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3298         (dump_binary_value, append_binary_memory, append_binary_value):
3299         Constify.
3300         (struct dump_context) <func>: Constify.
3301         (add_dump_command): Update.
3302
3303 2017-09-27  Tom Tromey  <tom@tromey.com>
3304
3305         * cli/cli-cmds.c (show_version, show_configuration)
3306         (source_command, show_user): Constify.
3307
3308 2017-09-27  Tom Tromey  <tom@tromey.com>
3309
3310         * target.c (maintenance_print_target_stack): Constify.
3311
3312 2017-09-27  Tom Tromey  <tom@tromey.com>
3313
3314         * interps.c (interpreter_exec_cmd): Constify.
3315
3316 2017-09-27  Tom Tromey  <tom@tromey.com>
3317
3318         * record-full.c (cmd_record_full_restore): Constify.
3319
3320 2017-09-27  Tom Tromey  <tom@tromey.com>
3321
3322         * memattr.c (enable_mem_command, disable_mem_command)
3323         (delete_mem_command): Constify.
3324
3325 2017-09-27  Tom Tromey  <tom@tromey.com>
3326
3327         * value.c (show_convenience): Constify.
3328
3329 2017-09-27  Tom Tromey  <tom@tromey.com>
3330
3331         * gdbcore.h (core_file_command): Update.
3332         * corefile.c (core_file_command): Constify.
3333
3334 2017-09-27  Tom Tromey  <tom@tromey.com>
3335
3336         * user-regs.c (maintenance_print_user_registers): Constify.
3337
3338 2017-09-27  Tom Tromey  <tom@tromey.com>
3339
3340         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3341
3342 2017-09-27  Tom Tromey  <tom@tromey.com>
3343
3344         * cp-support.c (first_component_command): Constify.
3345
3346 2017-09-27  Tom Tromey  <tom@tromey.com>
3347
3348         * psymtab.c (maintenance_print_psymbols)
3349         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3350         Constify.
3351
3352 2017-09-27  Tom Tromey  <tom@tromey.com>
3353
3354         * windows-tdep.c (display_tib): Constify.
3355
3356 2017-09-27  Tom Tromey  <tom@tromey.com>
3357
3358         * linux-fork.c (delete_checkpoint_command)
3359         (detach_checkpoint_command): Constify.
3360
3361 2017-09-27  Tom Tromey  <tom@tromey.com>
3362
3363         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3364
3365 2017-09-27  Tom Tromey  <tom@tromey.com>
3366
3367         * arc-tdep.c (dump_arc_instruction_command): Constify.
3368
3369 2017-09-27  Tom Tromey  <tom@tromey.com>
3370
3371         * valprint.c (set_radix, show_radix): Constify.
3372
3373 2017-09-27  Tom Tromey  <tom@tromey.com>
3374
3375         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3376
3377 2017-09-27  Tom Tromey  <tom@tromey.com>
3378
3379         * command.h (not_just_help_class_command): Update.
3380         * cli/cli-decode.h (not_just_help_class_command): Update.
3381         * cli/cli-decode.c (not_just_help_class_command): Constify.
3382
3383 2017-09-27  Tom Tromey  <tom@tromey.com>
3384
3385         * gdb_bfd.c (maintenance_info_bfds): Constify.
3386
3387 2017-09-27  Tom Tromey  <tom@tromey.com>
3388
3389         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3390         overloads.
3391         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3392         (do_const_cfunc): New function.
3393         (cmd_cfunc_eq): New overload.
3394         (cli_user_command_p): Check do_const_cfunc.
3395         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3396         const_cfunc.
3397         * command.h (add_cmd): Add const overload and no-function
3398         overload.
3399         (set_cmd_cfunc): Add const overload.
3400         (cmd_const_cfunc_ftype): Declare.
3401         (cmd_cfunc_eq): Add const overload.
3402         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3403         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3404         overload.
3405
3406 2017-09-27  Tom Tromey  <tom@tromey.com>
3407
3408         * macroexp.c (get_next_token_for_substitution): New function.
3409         (substitute_args): Call it.  Check for __VA_OPT__.
3410
3411 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3412             Pedro Alves <palves@redhat.com>
3413
3414         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3415         producer_is_icc_lt_14.
3416         (producer_is_icc_lt_14): New function.
3417         (check_producer): Add code for checking version of ICC.
3418         (producer_is_icc): Move to producer.c.
3419         (read_structure_type): Restrict ICC workaround to ICC<14.
3420         * producer.c: Include selftest.h.
3421         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3422         New functions.
3423         * producer.h (producer_is_icc): New declaration.
3424
3425 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3426
3427         * Makefile.in (SFILES): Add producer.c.
3428         (COMMON_OBS): Add producer.o
3429         * amd64-tdep.c (producer.h): Add new include.
3430         * dwarf2read.c (producer.h): Add new include.
3431         * producer.c: New file.
3432         * producer.h: New file.
3433         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3434         producer.c.
3435         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3436         producer.h.
3437
3438 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3439
3440         * configure.ac: Search ncursesw before ncurses.
3441         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3442         * gdb_curses.h: Include <ncursesw/ncurses.h>
3443         * config.in, configure: Regenerate.
3444
3445 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3446
3447         PR gdb/22185
3448         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3449         obsolete.
3450         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3451         Remove i386sol2 support.
3452         * configure.nat <i386sol2>: Remove.
3453         <sol2-64>: Fold into ...
3454         <sol2>: ... this.
3455         Move common settings to default section.
3456         Add sol-thread.o.
3457         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3458         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3459         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3460         <i[34567]86-*-solaris*>: Remove.
3461         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3462
3463         * configure.ac: Remove wctype in libw check.
3464         (_MSE_INT_H): Don't define on Solaris 7-9.
3465         <solaris*>: Remove libthread_db.so.1 check.
3466         * configure: Regenerate.
3467         * config.in: Regenerate.
3468
3469         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3470         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3471         (gdb_ps_size_t): Remove.
3472         Use base types in users.
3473         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3474
3475         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3476
3477 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3478
3479         PR build/22206
3480         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3481         (adi_is_addr_mapped): Likewise.
3482         (PSR_ICC): Don't redefine.
3483         (PSR_IMPL): Likewise.
3484
3485 2017-09-25  Tom Tromey  <tom@tromey.com>
3486
3487         * regcache.c (regcache::dump): Use string_printf.
3488
3489 2017-09-25  Tom Tromey  <tom@tromey.com>
3490
3491         * regcache.c (class regcache_invalidator): New.
3492         (struct register_to_invalidate): Remove.
3493         (make_cleanup_regcache_invalidate): Remove.
3494         (regcache::raw_write): Use regcache_invalidator.
3495
3496 2017-09-25  Tom Tromey  <tom@tromey.com>
3497
3498         * spu-tdep.c (spu2ppu_sniffer): Update.
3499         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3500         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3501         Remove.
3502         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3503         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3504         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3505         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3506         (frame_pop): Update.
3507
3508 2017-09-25  Tom Tromey  <tom@tromey.com>
3509
3510         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3511         * regcache.h (regcache_xfree): Don't declare.
3512         * regcache.c (regcache_xfree): Remove.
3513         (do_regcache_xfree): Use delete.
3514         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3515         * linux-fork.c (free_fork): Use delete.
3516         (fork_save_infrun_state): Likewise.
3517         * jit.c (jit_dealloc_cache): Use delete.
3518         * infrun.c (discard_infcall_suspend_state): Use delete.
3519
3520 2017-09-25  Tom Tromey  <tom@tromey.com>
3521
3522         * regcache.h (regcache_xmalloc): Don't declare.
3523         (regcache_raw_set_cached_value): Update comment.
3524         * regcache.c (regcache_xmalloc): Remove.
3525         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3526         * jit.c (jit_frame_sniffer): Use new.
3527         * frame.c (frame_save_as_regcache): Use new.
3528
3529 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3530
3531         * NEWS: Advertise support for guarded-storage registers on IBM z.
3532
3533 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3534
3535         * s390-linux-nat.c (have_regset_gs): New static variable.
3536         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3537         control block and guarded-storage broadcast control regsets.
3538         (s390_read_description): Detect whether the target has
3539         guarded-storage support, return appropriate tdesc.
3540         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3541         (features/s390x-gs-linux64.c): Likewise.
3542         (struct gdbarch_tdep) <have_gs>: New field.
3543         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3544         (s390_gsbc_regset): New variables.
3545         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3546         and s390_gsbc_regset, if applicable.
3547         (s390_core_read_description): Check whether core file was from a
3548         target with guarded-storage support; include appropriate regsets.
3549         (s390_gdbarch_init): Add registers for guarded-storage support.
3550         (_initialize_s390_tdep): Initialize new target descriptions that
3551         include registers for guarded-storage support.
3552         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3553         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3554         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3555         (S390_NUM_REGS): Adjust macro definition.
3556         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3557         (tdesc_s390x_gs_linux64): New declarations.
3558
3559 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3560
3561         * features/s390-gs-linux64.xml: New file.
3562         * features/s390-gs.xml: New file.
3563         * features/s390-gsbc.xml: New file.
3564         * features/s390x-gs-linux64.xml: New file.
3565         * features/Makefile (WHICH): Add s390-gs-linux64 and
3566         s390x-gs-linux64.
3567         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3568         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3569         * features/s390-gs-linux64.c: New generated file.
3570         * features/s390x-gs-linux64.c: New file.
3571         * regformats/s390-gs-linux64.dat: New file.
3572         * regformats/s390x-gs-linux64.dat: New file.
3573
3574 2017-09-23  Tom Tromey  <tom@tromey.com>
3575
3576         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3577
3578 2017-09-22  Tom Tromey  <tom@tromey.com>
3579
3580         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3581         type to scoped_restore_tmpl.
3582         <scoped_input_handler>: Initialize m_quit_handler directly.
3583
3584 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3585
3586         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3587         (cd_command): Likewise.  Free "current_directory" before
3588         assigning to it.
3589         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3590         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3591         * top.c (gdb_dirbuf): Remove global declaration.
3592         * top.h (gdb_dirbuf): Likewise.
3593
3594 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3595
3596         * gnulib/aclocal.m4: Regenerate.
3597         * gnulib/config.in: Regenerate.
3598         * gnulib/configure: Regenerate.
3599         * gnulib/import/Makefile.am: Regenerate.
3600         * gnulib/import/Makefile.in: Regenerate.
3601         * gnulib/import/assure.h: New file.
3602         * gnulib/import/at-func.c: Likewise
3603         * gnulib/import/chdir-long.c: New file.
3604         * gnulib/import/chdir-long.h: New file.
3605         * gnulib/import/cloexec.c: New file.
3606         * gnulib/import/cloexec.h: New file.
3607         * gnulib/import/close.c: New file.
3608         * gnulib/import/closedir.c: New file.
3609         * gnulib/import/dirent-private.h: New file.
3610         * gnulib/import/dup-safer.c: New file.
3611         * gnulib/import/dup.c: New file.
3612         * gnulib/import/dup2.c: New file.
3613         * gnulib/import/error.c: New file.
3614         * gnulib/import/error.h: New file.
3615         * gnulib/import/exitfail.c: New file.
3616         * gnulib/import/exitfail.h: New file.
3617         * gnulib/import/fchdir.c: New file.
3618         * gnulib/import/fcntl.c: New file.
3619         * gnulib/import/fcntl.in.h: New file.
3620         * gnulib/import/fd-hook.c: New file.
3621         * gnulib/import/fd-hook.h: New file.
3622         * gnulib/import/fd-safer.c: New file.
3623         * gnulib/import/fdopendir.c: New file.
3624         * gnulib/import/filename.h: New file.
3625         * gnulib/import/filenamecat-lgpl.c: New file.
3626         * gnulib/import/filenamecat.h: New file.
3627         * gnulib/import/fstat.c: New file.
3628         * gnulib/import/fstatat.c: New file.
3629         * gnulib/import/getcwd-lgpl.c: New file.
3630         * gnulib/import/getcwd.c: New file.
3631         * gnulib/import/getdtablesize.c: New file.
3632         * gnulib/import/getlogin_r.c: New file.
3633         * gnulib/import/getprogname.c: New file.
3634         * gnulib/import/getprogname.h: New file.
3635         * gnulib/import/gettext.h: New file.
3636         * gnulib/import/glob-libc.h: New file.
3637         * gnulib/import/glob.c: New file.
3638         * gnulib/import/glob.in.h: New file.
3639         * gnulib/import/intprops.h: New file.
3640         * gnulib/import/m4/chdir-long.m4: New file.
3641         * gnulib/import/m4/close.m4: New file.
3642         * gnulib/import/m4/closedir.m4: New file.
3643         * gnulib/import/m4/d-ino.m4: New file.
3644         * gnulib/import/m4/d-type.m4: New file.
3645         * gnulib/import/m4/dup.m4: New file.
3646         * gnulib/import/m4/dup2.m4: New file.
3647         * gnulib/import/m4/error.m4: New file.
3648         * gnulib/import/m4/fchdir.m4: New file.
3649         * gnulib/import/m4/fcntl.m4: New file.
3650         * gnulib/import/m4/fcntl_h.m4: New file.
3651         * gnulib/import/m4/fdopendir.m4: New file.
3652         * gnulib/import/m4/filenamecat.m4: New file.
3653         * gnulib/import/m4/fstat.m4: New file.
3654         * gnulib/import/m4/fstatat.m4: New file.
3655         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3656         * gnulib/import/m4/getcwd-path-max.m4: New file.
3657         * gnulib/import/m4/getcwd.m4: New file.
3658         * gnulib/import/m4/getdtablesize.m4: New file.
3659         * gnulib/import/m4/getlogin_r.m4: New file.
3660         * gnulib/import/m4/getprogname.m4: New file.
3661         * gnulib/import/m4/glob.m4: New file.
3662         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3663         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3664         * gnulib/import/m4/mempcpy.m4: New file.
3665         * gnulib/import/m4/memrchr.m4: New file.
3666         * gnulib/import/m4/mode_t.m4: New file.
3667         * gnulib/import/m4/msvc-inval.m4: New file.
3668         * gnulib/import/m4/msvc-nothrow.m4: New file.
3669         * gnulib/import/m4/open.m4: New file.
3670         * gnulib/import/m4/openat.m4: New file.
3671         * gnulib/import/m4/opendir.m4: New file.
3672         * gnulib/import/m4/readdir.m4: New file.
3673         * gnulib/import/m4/realloc.m4: New file.
3674         * gnulib/import/m4/rewinddir.m4: New file.
3675         * gnulib/import/m4/save-cwd.m4: New file.
3676         * gnulib/import/m4/strdup.m4: New file.
3677         * gnulib/import/m4/strerror.m4: New file.
3678         * gnulib/import/m4/unistd-safer.m4: New file.
3679         * gnulib/import/mempcpy.c: New file.
3680         * gnulib/import/memrchr.c: New file.
3681         * gnulib/import/msvc-inval.c: New file.
3682         * gnulib/import/msvc-inval.h: New file.
3683         * gnulib/import/msvc-nothrow.c: New file.
3684         * gnulib/import/msvc-nothrow.h: New file.
3685         * gnulib/import/open.c: New file.
3686         * gnulib/import/openat-die.c: New file.
3687         * gnulib/import/openat-priv.h: New file.
3688         * gnulib/import/openat-proc.c: New file.
3689         * gnulib/import/openat.c: New file.
3690         * gnulib/import/openat.h: New file.
3691         * gnulib/import/opendir.c: New file.
3692         * gnulib/import/pipe-safer.c: New file.
3693         * gnulib/import/readdir.c: New file.
3694         * gnulib/import/realloc.c: New file.
3695         * gnulib/import/rewinddir.c: New file.
3696         * gnulib/import/save-cwd.c: New file.
3697         * gnulib/import/save-cwd.h: New file.
3698         * gnulib/import/strdup.c: New file.
3699         * gnulib/import/strerror-override.c: New file.
3700         * gnulib/import/strerror-override.h: New file.
3701         * gnulib/import/strerror.c: New file.
3702         * gnulib/import/unistd--.h: New file.
3703         * gnulib/import/unistd-safer.h: New file.
3704         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3705         "getcwd" and "glob".
3706         * ser-tcp.c: Undefine "close" before redefining it.
3707
3708 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3709
3710         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3711         get rid of res_val.
3712
3713 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3714
3715         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3716         <sol2,sparc>: Likewise.
3717         <sol2-64,i386>: Likewise.
3718
3719         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3720         -Wdeprecated-declarations on *-*-solaris*.
3721         * configure: Regenerate.
3722
3723         * procfs.c: Include "nat/inferior.h".
3724         (procfs_info_proc): Fix typo.
3725
3726 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3727
3728         * remote.c (vector): Include.
3729         (struct private_thread_info): Add field, thread_handle.
3730         (free_private_thread_info): Deallocate storage associated with
3731         thread handle.
3732         (get_private_info_thread): Initialize `thread_handle' field.
3733         (struct thread_item): Add field, thread_handle.
3734         (clear_threads_listing_context): Deallocate storage associated
3735         with thread handle.
3736         (start_thread): Add support for "handle" attribute.
3737         (thread_attributes): Add "handle".
3738         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3739         field.
3740         (remote_update_thread_list): Update thread_handle.
3741         (remote_thread_handle_to_thread_info): New function.
3742         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3743
3744 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3745
3746         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3747         function.
3748         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3749         * python/python-internal.h (thread_object_type): Declare.
3750
3751 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3752
3753         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3754         (target_thread_handle_to_thread_info): Declare.
3755         * target.c (target_thread_handle_to_thread_info): New function.
3756         * target-delegates.c: Regenerate.
3757         * gdbthread.h (find_thread_by_handle): Declare.
3758         * thread.c (find_thread_by_handle): New function.
3759         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3760         function.
3761         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3762
3763 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3764
3765         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3766
3767 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3768
3769         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3770
3771 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3772
3773         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3774         to gdb_target_obs.
3775
3776 2017-09-20  Tom Tromey  <tom@tromey.com>
3777
3778         * breakpoint.c (struct counted_command_line): Remove.
3779         (breakpoint_commands): Update.
3780         (alloc_counted_command_line, incref_counted_command_line)
3781         (decref_counted_command_line, do_cleanup_counted_command_line)
3782         (make_cleanup_decref_counted_command_line): Remove.
3783         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3784         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3785         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3786         (save_breakpoints): Update.
3787         * breakpoint.h (counted_command_line): Now a typedef to
3788         shared_ptr.
3789         (struct breakpoint) <commands>: Now a counted_command_line.
3790         (struct bpstats) <command>: Likewise.
3791
3792 2017-09-20  Tom Tromey  <tom@tromey.com>
3793
3794         * breakpoint.c (struct commands_info, do_map_commands_command):
3795         Remove.
3796         (commands_command_1): Update.
3797         (iterate_over_related_breakpoints): Take a function_view.
3798         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3799         (delete_command): Update.
3800         (map_breakpoint_numbers): Take a function_view.
3801         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3802         (disable_command): Update.
3803         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3804         (enable_command): Update.
3805         (struct disp_data, do_enable_breakpoint_disp)
3806         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3807         (do_map_enable_delete_breakpoint): Remove.
3808         (enable_once_command, enable_count_command, enable_delete_command)
3809         (delete_trace_variable_command): Update.
3810
3811 2017-09-20  Tom Tromey  <tom@tromey.com>
3812
3813         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3814         (bpstat_clear): Use delete.
3815         (bpstats): New constructors.
3816         (bpstat_copy, bpstat_stop_status): Use new.
3817         (dprintf_after_condition_true): Update.
3818         * breakpoint.h (bpstats::bpstats): Add constructors.
3819         (bpstats::~bpstats): Add destructor.
3820
3821 2017-09-20  Pedro Alves  <palves@redhat.com>
3822
3823         * eval.c (make_params): Delete, refactored as ...
3824         (class fake_method): ... this new type's ctor.
3825         (fake_method::~fake_method): New.
3826         (evaluate_subexp_standard): Use 'fake_method'.
3827
3828 2017-09-20  Tom Tromey  <tom@tromey.com>
3829
3830         * windows-nat.c (get_windows_debug_event, windows_wait)
3831         (do_initial_windows_stuff, windows_attach): Update.
3832         * utils.c (vwarning, internal_vproblem): Update.
3833         (ui_unregister_input_event_handler_cleanup)
3834         (prepare_to_handle_input): Remove.
3835         (class scoped_input_handler): New.
3836         (defaulted_query, prompt_for_continue): Update.
3837         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3838         Update.
3839         * top.c (undo_terminal_modifications_before_exit): Update.
3840         * target/target.h (target_terminal_init, target_terminal_inferior)
3841         (target_terminal_ours): Don't declare.
3842         (class target_terminal): New.
3843         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3844         (target_terminal_ours_for_output)
3845         (make_cleanup_restore_target_terminal): Don't declare.
3846         (target_terminal_info): Remove.
3847         * target.c (enum terminal_state, terminal_state): Remove.
3848         (target_terminal::terminal_state): Define.
3849         (target_terminal::init): Rename from target_terminal_init.
3850         (target_terminal::inferior): Rename from
3851         target_terminal_inferior.
3852         (target_terminal::ours): Rename from target_terminal_ours.
3853         (target_terminal::ours_for_output): Rename from
3854         target_terminal_ours_for_output.
3855         (target_terminal::info): New method.
3856         (cleanup_restore_target_terminal)
3857         (make_cleanup_restore_target_terminal): Remove.
3858         * solib.c (handle_solib_event): Update.
3859         * remote.c (remote_serial_quit_handler): Update.
3860         (remote_terminal_inferior, remote_wait_as): Update.
3861         * record-full.c (record_full_wait_1): Update.
3862         * nto-procfs.c (procfs_create_inferior): Update.
3863         * nat/fork-inferior.c (startup_inferior): Update.
3864         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3865         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3866         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3867         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3868         (mi_breakpoint_created, mi_breakpoint_deleted)
3869         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3870         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3871         (mi_user_selected_context_changed, report_initial_inferior):
3872         Update.
3873         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3874         (linux_nat_terminal_inferior): Update.
3875         * infrun.c (follow_fork_inferior)
3876         (handle_vfork_child_exec_or_exit, do_target_resume)
3877         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3878         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3879         Update.
3880         * inflow.c (child_terminal_init, info_terminal_command): Update.
3881         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3882         (attach_command): Update.
3883         * infcall.c (call_thread_fsm_should_stop): Update.
3884         * gnu-nat.c (gnu_attach): Update.
3885         * extension.c (struct active_ext_lang_state)
3886         (restore_active_ext_lang): Update.
3887         * exceptions.c (print_flush): Update.
3888         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3889         (struct quit_handler_cleanup_data, restore_quit_handler)
3890         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3891         Remove.
3892         * cp-support.c (gdb_demangle): Update.
3893         * breakpoint.c (update_inserted_breakpoint_locations)
3894         (insert_breakpoint_locations, handle_jit_event)
3895         (disable_breakpoints_in_unloaded_shlib): Update.
3896         * annotate.c (annotate_breakpoints_invalid)
3897         (annotate_frames_invalid): Update.
3898
3899 2017-09-20  Tom Tromey  <tom@tromey.com>
3900
3901         * main.c (catch_command_errors): Rename from
3902         catch_command_errors_const.
3903         (captured_main_1): Update.
3904
3905 2017-09-20  Pedro Alves  <palves@redhat.com>
3906
3907         * cli/cli-cmds.c (list_command): Use print_sal_location.
3908         (print_sal_location): New function.
3909         (ambiguous_line_spec): Use print_sal_location.
3910         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3911         * symtab.c (find_function_start_sal): Likewise.
3912         * symtab.h (symtab_and_line::symbol): New field.
3913
3914 2017-09-20  Pedro Alves  <palves@redhat.com>
3915
3916         * linespec.c (minsym_found): Handle non-text minsyms.
3917         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3918
3919 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3920
3921         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3922         backslash.
3923
3924 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3925
3926         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3927         vmovups instead vmovaps.
3928         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3929
3930 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3931
3932         * NEWS (Changes since GDB 8.0): Add starti.
3933         * infcmd.c (enum run_break): New.
3934         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3935         case.
3936         (run_command): Use enum run_how.
3937         (start_command): Likewise.
3938         (starti_command): New function.
3939         (RUN_ARGS_HELP): New macro.
3940         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3941         commands.  Add starti command.
3942
3943 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3944
3945         * Makefile.in (monitor.o): Remove the rule.
3946
3947 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3948
3949         * annotate.h (struct annotate_arg_emitter): Use
3950         DISABLE_COPY_AND_ASSIGN.
3951         * common/refcounted-object.h (refcounted_object): Likewise.
3952         * completer.h (struct completion_result): Likewise.
3953         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3954         * filename-seen-cache.h (filename_seen_cache): Likewise.
3955         * gdbcore.h (thread_section_name): Likewise.
3956         * gdb_regex.h (compiled_regex): Likewise.
3957         * gdbthread.h (scoped_restore_current_thread): Likewise.
3958         * inferior.h (scoped_restore_current_inferior): Likewise.
3959         * jit.c (jit_reader): Likewise.
3960         * linespec.h (struct linespec_result): Likewise.
3961         * mi/mi-parse.h (struct mi_parse): Likewise.
3962         * nat/fork-inferior.c (execv_argv): Likewise.
3963         * progspace.h (scoped_restore_current_program_space): Likewise.
3964         * python/python-internal.h (class gdbpy_enter): Likewise.
3965         * regcache.h (regcache): Likewise.
3966         * target-descriptions.c (struct tdesc_reg): Likewise.
3967         (struct tdesc_type): Likewise.
3968         (struct tdesc_feature): Likewise.
3969         * ui-out.h (ui_out_emit_type): Likewise.
3970
3971 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3972
3973         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3974         label abort_expression.
3975
3976 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3977
3978         * common/buffer.c (buffer_xml_printf): Adjust.
3979         * common/xml-utils.c (xml_escape_text): Change return type to
3980         std::string, update code accordingly.
3981         * common/xml-utils.h (xml_escape_text): Change return type to
3982         std::string.
3983         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3984         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3985         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3986         Adjust.
3987
3988 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3989
3990         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3991         (SUBDIR_UNITTESTS_OBS): Add new object file.
3992         * unittests/xml-utils-selftests.c: New file.
3993
3994 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3995
3996         * common/selftest.h (selftest): New struct/interface.
3997         (register_test): Add name parameter, add new overload.
3998         (run_tests): Add filter parameter.
3999         (for_each_selftest_ftype): New typedef.
4000         (for_each_selftest): New declaration.
4001         * common/selftest.c (tests): Change type to
4002         map<string, unique_ptr<selftest>>.
4003         (simple_selftest): New struct.
4004         (register_test): New function.
4005         (register_test): Add name parameter and use it.
4006         (run_tests): Add filter parameter and use it.  Add prints.
4007         Adjust to vector -> map change.
4008         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4009         registering selftests.
4010         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4011         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4012         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4013         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4014         * findvar.c (_initialize_findvar): Likewise.
4015         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4016         * maint.c (maintenance_selftest): Update call to run_tests.
4017         (maintenance_info_selftests): New function.
4018         (_initialize_maint_cmds): Register "maintenance info selftests"
4019         command.  Update "maintenance selftest" doc.
4020         * regcache.c (_initialize_regcache): Add names when registering
4021         selftests.
4022         * rust-exp.y (_initialize_rust_exp): Likewise.
4023         * selftest-arch.c (gdbarch_selftest): New struct.
4024         (gdbarch_tests): Remove.
4025         (register_test_foreach_arch): Add name parameter.  Call
4026         register_test.
4027         (tests_with_arch): Remove, move most content to
4028         gdbarch_selftest::operator().
4029         (_initialize_selftests_foreach_arch): Remove.
4030         * selftest-arch.h (register_test_foreach_arch): Add name
4031         parameter.
4032         (run_tests_with_arch): New declaration.
4033         * utils-selftests.c (_initialize_utils_selftests): Add names
4034         when registering selftests.
4035         * utils.c (_initialize_utils): Likewise.
4036         * unittests/array-view-selftests.c
4037         (_initialize_array_view_selftests): Likewise.
4038         * unittests/environ-selftests.c (_initialize_environ_selftests):
4039         Likewise.
4040         * unittests/function-view-selftests.c
4041         (_initialize_function_view_selftests): Likewise.
4042         * unittests/offset-type-selftests.c
4043         (_initialize_offset_type_selftests): Likewise.
4044         * unittests/optional-selftests.c
4045         (_initialize_optional_selftests): Likewise.
4046         * unittests/scoped_restore-selftests.c
4047         (_initialize_scoped_restore_selftests): Likewise.
4048         * NEWS: Document "maintenance selftest" and "maint info
4049         selftests".
4050
4051 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4052
4053         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4054         scoped_restore.
4055
4056 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4057
4058         * mi/mi-main.c (mi_load_progress): Make uiout variable
4059         a unique_ptr.
4060
4061 2017-09-15  Pedro Alves  <palves@redhat.com>
4062
4063         * compile/compile-c-types.c (convert_enum, convert_int)
4064         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4065
4066 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4067
4068         * dwarf2read.c (copy_string): Remove.
4069         (parse_macro_definition): Replace copy_string with savestring.
4070
4071 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4072
4073         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4074         gdb_target_obs.
4075         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4076         Likewise.
4077         (i[34567]86-*-linux*): Likewise.
4078
4079 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4080
4081         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4082         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4083         <stack>: Change type to std::vector.
4084         <stack_len, stack_allocated>: Remove.
4085         <grow_stack>: Remove.
4086         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4087         (dwarf_expr_context::~dwarf_expr_context): Remove.
4088         (dwarf_expr_context::grow_stack): Remove.
4089         (dwarf_expr_context::push): Adjust.
4090         (dwarf_expr_context::pop): Adjust.
4091         (dwarf_expr_context::fetch): Adjust.
4092         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4093         (dwarf_expr_context::stack_empty_p): Adjust.
4094         (dwarf_expr_context::execute_stack_op): Adjust.
4095
4096 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4097
4098         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4099         return type to bool.
4100         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4101
4102 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4103
4104         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4105         Change type to bool.
4106         (dwarf_stack_value) <in_stack_memory>: Likewise.
4107         (dwarf_expr_context) <push_address>: Change parameter type to
4108         bool.
4109         <fetch_in_stack_memory>: Change return type to bool.
4110         <push>: Change parameter type to bool.
4111         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4112         to bool.
4113         (dwarf_expr_context::push_address): Likewise.
4114         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4115         to bool.
4116         (dwarf_expr_context::execute_stack_op): Adjust.
4117         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4118
4119 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4120
4121         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4122         (struct dwarf_expr_context) <n_pieces>: Remove.
4123         <pieces>: Change type to std::vector.
4124         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4125         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4126         pieces.
4127         (dwarf_expr_context::add_piece): Adjust.
4128         * dwarf2loc.c (struct piece_closure): Initialize fields.
4129         <n_pieces>: Remove.
4130         <pieces>: Change type to std::vector.
4131         (allocate_piece_closure): Adjust, change parameter to
4132         std::vector rvalue and std::move it to piece_closure.
4133         (rw_pieced_value): Adjust.
4134         (check_pieced_synthetic_pointer): Adjust.
4135         (indirect_synthetic_pointer): Adjust.
4136         (coerce_pieced_ref): Adjust.
4137         (free_pieced_value_closure):  Adjust.  Use delete to free
4138         piece_closure.
4139         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4140         to allocate_piece_closure.
4141         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4142
4143 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4144
4145         * probe.h (probe_ops_cp): Remove typedef.
4146         (DEF_VEC_P (probe_ops_cp)): Remove.
4147         (all_probe_ops): Change type to std::vector.
4148         * probe.c (info_probes_for_ops): Adjust to vector change.
4149         (probe_linespec_to_ops): Likewise.
4150         (all_probe_ops): Change type to std::vector.
4151         (_initialize_probe): Adjust to vector change.
4152         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4153         * elfread.c (elf_get_probes): Likewise.
4154         * stap-probe.c (_initialize_stap_probe): Likewise.
4155
4156 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4157
4158         * probe.h (struct bound_probe): Define constructors.
4159         * probe.c (bound_probe_s): Remove typedef.
4160         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4161         (collect_probes): Change return type to std::vector, remove
4162         cleanup.
4163         (compare_probes): Return bool, change parameter type.  Change
4164         semantic to "less than".
4165         (gen_ui_out_table_header_info): Change parameter to std::vector
4166         and update.
4167         (exists_probe_with_pops): Likewise.
4168         (info_probes_for_ops): Update to std::vector change.
4169         (enable_probes_command): Likewise.
4170         (disable_probes_command): Likewise.
4171
4172 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4173
4174         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4175         vec to std::vector.
4176         * probe.c (parse_probes_in_pspace): Update.
4177         (find_probes_in_objfile): Update.
4178         (find_probe_by_pc): Update.
4179         (collect_probes): Update.
4180         (probe_any_get_probes): Update.
4181         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4182         return type to reference to std::vector.
4183         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4184         std::vector and update.
4185         (dtrace_process_dof): Likewise.
4186         (dtrace_get_probes): Likewise.
4187         * elfread.c (elf_get_probes): Change return type to std::vector,
4188         store an std::vector in bfd_data.
4189         (probe_key_free): Update to std::vector.
4190         * stap-probe.c (handle_stap_probe): Change parameter to
4191         std::vector and update.
4192         (stap_get_probes): Likewise.
4193         * symfile-debug.c (debug_sym_get_probes): Change return type to
4194         std::vector and update.
4195
4196 2017-09-11  Tom Tromey  <tom@tromey.com>
4197
4198         * breakpoint.c (program_breakpoint_here_p): Update.
4199         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4200         from make_show_memory_breakpoints_cleanup.  Return a
4201         scoped_restore_tmpl<int>.
4202         (restore_show_memory_breakpoints): Remove.
4203         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4204         * mem-break.c (memory_validate_breakpoint): Update.
4205         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4206         (ia64_memory_remove_breakpoint): Update.
4207         (ia64_breakpoint_from_pc): Update.
4208         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4209         from make_show_memory_breakpoints_cleanup.
4210
4211 2017-09-11  Tom Tromey  <tom@tromey.com>
4212
4213         * d-namespace.c (d_lookup_symbol): Use std::string.
4214         (find_symbol_in_baseclass): Likewise.
4215
4216 2017-09-11  Tom Tromey  <tom@tromey.com>
4217
4218         * ctf.c (ctf_start): Use std::string.
4219
4220 2017-09-11  Tom Tromey  <tom@tromey.com>
4221
4222         * ada-lang.c (is_known_support_routine): Update.
4223         (ada_unhandled_exception_name_addr_from_raise): Update.
4224         * guile/scm-frame.c (gdbscm_frame_name): Update.
4225         * python/py-frame.c (frapy_name): Update.
4226         (frapy_function): Update.
4227         * stack.h (find_frame_funname): Update.
4228         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4229         (print_frame): Update.
4230
4231 2017-09-11  Tom Tromey  <tom@tromey.com>
4232
4233         * findcmd.c (put_bits): Take a gdb::byte_vector.
4234         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4235         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4236         cleanups.
4237         (find_command): Update.
4238
4239 2017-09-11  Tom Tromey  <tom@tromey.com>
4240
4241         * cli/cli-script.c (class scoped_restore_hook_in): New.
4242         (clear_hook_in_cleanup): Remove.
4243         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4244         scoped_restore_hook_in.
4245
4246 2017-09-11  Tom Tromey  <tom@tromey.com>
4247
4248         * cli/cli-script.c (restore_interp): Remove.
4249         (read_command_lines): Use scoped_restore_interp.
4250         * interps.c (scoped_restore_interp::set_temp): Rename from
4251         interp_set_temp.
4252         * interps.h (class scoped_restore_interp): New.
4253         (interp_set_temp): Remove.
4254
4255 2017-09-11  Tom Tromey  <tom@tromey.com>
4256
4257         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4258         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4259         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4260         scoped_restore.
4261         (mi_cmd_break_insert_1): Update.
4262         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4263         scoped_restore.
4264
4265 2017-09-11  Tom Tromey  <tom@tromey.com>
4266
4267         * demangle.c (demangle_command): Update.
4268         * breakpoint.c (disable_command): Update.
4269         (enable_command): Update.
4270         (find_location_by_number): Make "number" const.  Use
4271         get_number_trailer.
4272         * cli/cli-utils.c (extract_arg): Return std::string.
4273         * probe.c (parse_probe_linespec): Update.  Change types.
4274         (collect_probes): Take string arguments.
4275         (parse_probe_linespec): Likewise.
4276         (info_probes_for_ops): Update.
4277         (enable_probes_command): Update.
4278         (disable_probes_command): Update.
4279         * break-catch-sig.c (catch_signal_split_args): Update.
4280         * mi/mi-parse.c (mi_parse): Update.
4281
4282 2017-09-11  Tom Tromey  <tom@tromey.com>
4283
4284         * language.h (language_enum): Make argument const.
4285         * language.c (language_enum): Make argument const.
4286
4287 2017-09-11  Tom Tromey  <tom@tromey.com>
4288
4289         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4290         as function.
4291         (skip_to_space): Rename from skip_to_space_const.
4292         * common/common-utils.c (skip_to_space): New function.
4293         (skip_to_space): Rename from skip_to_space_const.
4294         * cli/cli-utils.h (get_number): Rename from get_number_const.
4295         (extract_arg): Rename from extract_arg_const.
4296         * cli/cli-utils.c (get_number): Rename from get_number_const.
4297         (extract_arg): Rename from extract_arg_const.
4298         (number_or_range_parser::get_number): Use ::get_number.
4299         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4300         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4301         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4302         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4303         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4304         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4305         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4306         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4307
4308 2017-09-11  Tom Tromey  <tom@tromey.com>
4309
4310         * python/python.c (do_start_initialization): Use
4311         py-event-types.def to initialize types.
4312         Define all object type structures.
4313         * python/python-internal.h: Don't declare event initialization
4314         functions.
4315         * python/py-threadevent.c (thread_event_object_type): Don't
4316         define.
4317         * python/py-stopevent.c (stop_event_object_type): Don't define.
4318         * python/py-signalevent.c (signal_event_object_type): Don't
4319         declare or define.
4320         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4321         (clear_objfiles_event_object_type): Don't declare or define.
4322         * python/py-infevents.c (inferior_call_pre_event_object_type)
4323         (inferior_call_post_event_object_type)
4324         (register_changed_event_object_type)
4325         (memory_changed_event_object_type): Don't declare or define.
4326         * python/py-inferior.c (new_thread_event_object_type)
4327         (new_inferior_event_object_type)
4328         (inferior_deleted_event_object_type): Don't declare or define.
4329         * python/py-exitedevent.c (exited_event_object_type): Don't
4330         declare or define.
4331         * python/py-evts.c (gdbpy_initialize_py_events): Use
4332         py-all-events.def.
4333         * python/py-events.h (thread_event_object_type): Don't declare.
4334         (events_object): Use py-all-events.def.
4335         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4336         py-event-types.def.
4337         * python/py-event-types.def: New file.
4338         * python/py-continueevent.c (create_continue_event_object): Don't
4339         declare or define.
4340         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4341         declare or define.
4342         * python/py-all-events.def: New file.
4343
4344 2017-09-11  Tom Tromey  <tom@tromey.com>
4345
4346         * python/py-threadevent.c (create_thread_event_object): Return
4347         gdbpy_ref.
4348         * python/py-stopevent.h (create_stop_event_object)
4349         (create_breakpoint_event_object, create_signal_event_object):
4350         Update.
4351         * python/py-stopevent.c (create_stop_event_object): Return
4352         gdbpy_ref.
4353         (emit_stop_event): Update.
4354         * python/py-signalevent.c (create_signal_event_object): Return
4355         gdbpy_ref.
4356         * python/py-infevents.c (create_inferior_call_event_object):
4357         Update.
4358         * python/py-event.h (create_event_object)
4359         (create_thread_event_object): Update.
4360         * python/py-event.c (create_event_object): Return gdbpy_ref.
4361         * python/py-continueevent.c: Return gdbpy_ref.
4362         * python/py-bpevent.c (create_breakpoint_event_object): Return
4363         gdbpy_ref.
4364
4365 2017-09-11  Tom Tromey  <tom@tromey.com>
4366
4367         PR python/15622:
4368         * NEWS: Add entry.
4369         * python/python.c (do_start_initialization): Initialize new event
4370         types.
4371         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4372         (gdbpy_initialize_inferior_deleted_event)
4373         (gdbpy_initialize_new_thread_event): Declare.
4374         * python/py-threadevent.c (create_thread_event_object): Add option
4375         "thread" parameter.
4376         * python/py-inferior.c (new_thread_event_object_type)
4377         (new_inferior_event_object_type)
4378         (inferior_deleted_event_object_type): Declare.
4379         (python_new_inferior, python_inferior_deleted): New functions.
4380         (add_thread_object): Emit new_thread event.
4381         (gdbpy_initialize_inferior): Attach new functions to corresponding
4382         observers.
4383         (new_thread, new_inferior, inferior_deleted): Define new event
4384         types.
4385         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4386         registries.
4387         * python/py-events.h (events_object) <new_inferior,
4388         inferior_deleted, new_thread>: New fields.
4389         * python/py-event.h (create_thread_event_breakpoint): Add optional
4390         "thread" parameter.
4391
4392 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4393
4394         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4395         check current_ui instead.
4396         (internal_vproblem): Likewise.
4397
4398 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4399
4400         * thread.c (print_thread_info_1): Remove unnecessary calls to
4401         uiout->is_mi_like_p.
4402
4403 2017-09-09  Tom Tromey  <tom@tromey.com>
4404
4405         * namespace.h (add_using_directive): Update.
4406         * namespace.c (add_using_directive): Change type of excludes to
4407         std::vector.
4408         * dwarf2read.c (read_import_statement): Use std::vector.
4409         (read_namespace): Update.
4410         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4411
4412 2017-09-09  Tom Tromey  <tom@tromey.com>
4413
4414         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4415
4416 2017-09-09  Tom Tromey  <tom@tromey.com>
4417
4418         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4419
4420 2017-09-09  Tom Tromey  <tom@tromey.com>
4421
4422         * stack.c (func_command): Use gdb::def_vector.
4423
4424 2017-09-09  Tom Tromey  <tom@tromey.com>
4425
4426         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4427         ui_out_emit_list, ui_out_emit_tuple.
4428         (mi_cmd_var_update): Likewise.
4429
4430 2017-09-09  Tom Tromey  <tom@tromey.com>
4431
4432         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4433         ui_out_redirect_pop.
4434         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4435         ui_out_redirect_pop.
4436         * utils.c (do_ui_out_redirect_pop)
4437         (make_cleanup_ui_out_redirect_pop): Remove.
4438         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4439         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4440         * ui-out.h (ui_out_redirect_pop): New class.
4441
4442 2017-09-09  Tom Tromey  <tom@tromey.com>
4443
4444         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4445         (list_available_thread_groups, mi_cmd_list_thread_groups)
4446         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4447         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4448         Likewise.
4449
4450 2017-09-09  Tom Tromey  <tom@tromey.com>
4451
4452         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4453         ui_out_emit_tuple.
4454
4455 2017-09-09  Tom Tromey  <tom@tromey.com>
4456
4457         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4458         * stack.c (print_frame): Use ui_out_emit_tuple.
4459         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4460         (info_spu_mailbox_command, info_spu_dma_command)
4461         (info_spu_proxydma_command): Likewise.
4462         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4463         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4464         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4465         ui_out_emit_tuple.
4466         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4467
4468 2017-09-09  Tom Tromey  <tom@tromey.com>
4469
4470         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4471         (class ui_out_emit_table): Update comment.
4472         * ui-out.c (do_cleanup_table_end)
4473         (make_cleanup_ui_out_table_begin_end): Remove.
4474         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4475         (info_spu_dma_cmdlist): Likewise.
4476         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4477         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4478         ui_out_emit_table.
4479
4480 2017-09-09  Tom Tromey  <tom@tromey.com>
4481
4482         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4483         ui_out_emit_list, gdb::optional.
4484
4485 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4486
4487         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4488         prototype.
4489         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4490         prototype.
4491         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4492         prototype.
4493         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4494         * ada-exp.y: Remove _initialize_ada_exp prototype.
4495         * ada-lang.c: Remove _initialize_ada_language prototype.
4496         * ada-tasks.c: Remove _initialize_tasks prototype.
4497         * addrmap.c: Remove _initialize_addrmap prototype.
4498         * agent.c: Remove _initialize_agent prototype.
4499         * aix-thread.c: Remove _initialize_aix_thread prototype.
4500         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4501         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4502         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4503         prototype.
4504         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4505         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4506         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4507         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4508         prototype.
4509         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4510         prototype.
4511         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4512         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4513         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4514         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4515         prototype.
4516         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4517         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4518         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4519         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4520         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4521         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4522         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4523         prototype.
4524         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4525         prototype.
4526         * annotate.c: Remove _initialize_annotate prototype.
4527         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4528         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4529         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4530         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4531         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4532         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4533         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4534         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4535         prototype.
4536         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4537         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4538         * auto-load.c: Remove _initialize_auto_load prototype.
4539         * auxv.c: Remove _initialize_auxv prototype.
4540         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4541         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4542         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4543         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4544         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4545         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4546         prototype.
4547         * break-catch-throw.c: Remove _initialize_break_catch_throw
4548         prototype.
4549         * breakpoint.c: Remove _initialize_breakpoint prototype.
4550         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4551         * btrace.c: Remove _initialize_btrace prototype.
4552         * charset.c: Remove _initialize_charset prototype.
4553         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4554         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4555         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4556         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4557         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4558         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4559         * coffread.c: Remove _initialize_coffread prototype.
4560         * compile/compile.c: Remove _initialize_compile prototype.
4561         * complaints.c: Remove _initialize_complaints prototype.
4562         * completer.c: Remove _initialize_completer prototype.
4563         * copying.awk: Remove _initialize_copying prototype.
4564         * copying.c: Regenerate.
4565         * core-regset.c: Remove _initialize_core_regset prototype.
4566         * corefile.c: Remove _initialize_core prototype.
4567         * corelow.c: Remove _initialize_corelow prototype.
4568         * cp-abi.c: Remove _initialize_cp_abi prototype.
4569         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4570         * cp-support.c: Remove _initialize_cp_support prototype.
4571         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4572         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4573         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4574         * ctf.c: Remove _initialize_ctf prototype.
4575         * d-lang.c: Remove _initialize_d_language prototype.
4576         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4577         prototype.
4578         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4579         * dbxread.c: Remove _initialize_dbxread prototype.
4580         * dcache.c: Remove _initialize_dcache prototype.
4581         * demangle.c: Remove _initialize_demangler prototype.
4582         * disasm-selftests.c: Remove _initialize_disasm_selftests
4583         prototype.
4584         * disasm.c: Remove _initialize_disasm prototype.
4585         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4586         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4587         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4588         prototype.
4589         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4590         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4591         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4592         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4593         * elfread.c: Remove _initialize_elfread prototype.
4594         * exec.c: Remove _initialize_exec prototype.
4595         * extension.c: Remove _initialize_extension prototype.
4596         * f-lang.c: Remove _initialize_f_language prototype.
4597         * f-valprint.c: Remove _initialize_f_valprint prototype.
4598         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4599         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4600         * filesystem.c: Remove _initialize_filesystem prototype.
4601         * findcmd.c: Remove _initialize_mem_search prototype.
4602         * fork-child.c: Remove _initialize_fork_child prototype.
4603         * frame-base.c: Remove _initialize_frame_base prototype.
4604         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4605         * frame.c: Remove _initialize_frame prototype.
4606         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4607         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4608         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4609         * gcore.c: Remove _initialize_gcore prototype.
4610         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4611         * gdbarch.c: Regenerate.
4612         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4613         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4614         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4615         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4616         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4617         * go-lang.c: Remove _initialize_go_language prototype.
4618         * go32-nat.c: Remove _initialize_go32_nat prototype.
4619         * guile/guile.c: Remove _initialize_guile prototype.
4620         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4621         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4622         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4623         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4624         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4625         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4626         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4627         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4628         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4629         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4630         prototype.
4631         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4632         prototype.
4633         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4634         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4635         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4636         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4637         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4638         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4639         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4640         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4641         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4642         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4643         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4644         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4645         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4646         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4647         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4648         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4649         prototype.
4650         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4651         prototype.
4652         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4653         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4654         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4655         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4656         * infcall.c: Remove _initialize_infcall prototype.
4657         * infcmd.c: Remove _initialize_infcmd prototype.
4658         * inferior.c: Remove _initialize_inferiors prototype.
4659         * inflow.c: Remove _initialize_inflow prototype.
4660         * infrun.c: Remove _initialize_infrun prototype.
4661         * interps.c: Remove _initialize_interpreter prototype.
4662         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4663         * jit.c: Remove _initialize_jit prototype.
4664         * language.c: Remove _initialize_language prototype.
4665         * linux-fork.c: Remove _initialize_linux_fork prototype.
4666         * linux-nat.c: Remove _initialize_linux_nat prototype.
4667         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4668         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4669         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4670         * m2-lang.c: Remove _initialize_m2_language prototype.
4671         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4672         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4673         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4674         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4675         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4676         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4677         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4678         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4679         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4680         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4681         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4682         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4683         * machoread.c: Remove _initialize_machoread prototype.
4684         * macrocmd.c: Remove _initialize_macrocmd prototype.
4685         * macroscope.c: Remove _initialize_macroscope prototype.
4686         * maint.c: Remove _initialize_maint_cmds prototype.
4687         * mdebugread.c: Remove _initialize_mdebugread prototype.
4688         * memattr.c: Remove _initialize_mem prototype.
4689         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4690         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4691         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4692         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4693         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4694         * microblaze-linux-tdep.c: Remove
4695         _initialize_microblaze_linux_tdep prototype.
4696         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4697         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4698         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4699         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4700         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4701         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4702         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4703         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4704         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4705         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4706         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4707         prototype.
4708         * mipsread.c: Remove _initialize_mipsread prototype.
4709         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4710         prototype.
4711         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4712         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4713         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4714         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4715         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4716         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4717         prototype.
4718         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4719         * nto-procfs.c: Remove _initialize_procfs prototype.
4720         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4721         * objc-lang.c: Remove _initialize_objc_language prototype.
4722         * objfiles.c: Remove _initialize_objfiles prototype.
4723         * observer.c: Remove observer_test_first_notification_function,
4724         observer_test_second_notification_function,
4725         observer_test_third_notification_function, and
4726         _initialize_observer prototypes.
4727         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4728         * osabi.c: Remove _initialize_gdb_osabi prototype.
4729         * osdata.c: Remove _initialize_osdata prototype.
4730         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4731         * parse.c: Remove _initialize_parse prototype.
4732         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4733         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4734         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4735         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4736         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4737         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4738         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4739         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4740         * printcmd.c: Remove _initialize_printcmd prototype.
4741         * probe.c: Remove _initialize_probe prototype.
4742         * proc-api.c: Remove _initialize_proc_api prototype.
4743         * proc-events.c: Remove _initialize_proc_events prototype.
4744         * proc-service.c: Remove _initialize_proc_service prototype.
4745         * procfs.c: Remove _initialize_procfs prototype.
4746         * psymtab.c: Remove _initialize_psymtab prototype.
4747         * python/python.c: Remove _initialize_python prototype.
4748         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4749         * record-btrace.c: Remove _initialize_record_btrace prototype.
4750         * record-full.c: Remove _initialize_record_full prototype.
4751         * record.c: Remove _initialize_record prototype.
4752         * regcache.c: Remove _initialize_regcache prototype.
4753         * reggroups.c: Remove _initialize_reggroup prototype.
4754         * remote-notif.c: Remove _initialize_notif prototype.
4755         * remote-sim.c: Remove _initialize_remote_sim prototype.
4756         * remote.c: Remove _initialize_remote prototype.
4757         * reverse.c: Remove _initialize_reverse prototype.
4758         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4759         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4760         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4761         prototype.
4762         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4763         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4764         * rust-exp.y: Remove _initialize_rust_exp prototype.
4765         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4766         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4767         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4768         * score-tdep.c: Remove _initialize_score_tdep prototype.
4769         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4770         prototype.
4771         * ser-go32.c: Remove _initialize_ser_dos prototype.
4772         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4773         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4774         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4775         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4776         * serial.c: Remove _initialize_serial prototype.
4777         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4778         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4779         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4780         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4781         * skip.c: Remove _initialize_step_skip prototype.
4782         * sol-thread.c: Remove _initialize_sol_thread prototype.
4783         * solib-aix.c: Remove _initialize_solib_aix prototype.
4784         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4785         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4786         * solib-frv.c: Remove _initialize_frv_solib prototype.
4787         * solib-spu.c: Remove _initialize_spu_solib prototype.
4788         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4789         * solib-target.c: Remove _initialize_solib_target prototype.
4790         * solib.c: Remove _initialize_solib prototype.
4791         * source.c: Remove _initialize_source prototype.
4792         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4793         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4794         prototype.
4795         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4796         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4797         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4798         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4799         prototype.
4800         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4801         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4802         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4803         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4804         prototype.
4805         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4806         prototype.
4807         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4808         prototype.
4809         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4810         prototype.
4811         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4812         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4813         prototype.
4814         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4815         prototype.
4816         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4817         prototype.
4818         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4819         prototype.
4820         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4821         prototype.
4822         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4823         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4824         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4825         * stabsread.c: Remove _initialize_stabsread prototype.
4826         * stack.c: Remove _initialize_stack prototype.
4827         * stap-probe.c: Remove _initialize_stap_probe prototype.
4828         * std-regs.c: Remove _initialize_frame_reg prototype.
4829         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4830         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4831         * symfile.c: Remove _initialize_symfile prototype.
4832         * symmisc.c: Remove _initialize_symmisc prototype.
4833         * symtab.c: Remove _initialize_symtab prototype.
4834         * target-dcache.c: Remove _initialize_target_dcache prototype.
4835         * target-descriptions.c: Remove _initialize_target_descriptions
4836         prototype.
4837         * thread.c: Remove _initialize_thread prototype.
4838         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4839         prototype.
4840         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4841         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4842         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4843         prototype.
4844         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4845         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4846         * tracefile.c: Remove _initialize_tracefile prototype.
4847         * tracepoint.c: Remove _initialize_tracepoint prototype.
4848         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4849         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4850         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4851         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4852         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4853         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4854         * tui/tui.c: Remove _initialize_tui prototype.
4855         * typeprint.c: Remove _initialize_typeprint prototype.
4856         * user-regs.c: Remove _initialize_user_regs prototype.
4857         * utils.c: Remove _initialize_utils prototype.
4858         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4859         * valarith.c: Remove _initialize_valarith prototype.
4860         * valops.c: Remove _initialize_valops prototype.
4861         * valprint.c: Remove _initialize_valprint prototype.
4862         * value.c: Remove _initialize_values prototype.
4863         * varobj.c: Remove _initialize_varobj prototype.
4864         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4865         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4866         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4867         * windows-nat.c: Remove _initialize_windows_nat,
4868         _initialize_check_for_gdb_ini, and _initialize_loadable
4869         prototypes.
4870         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4871         * xcoffread.c: Remove _initialize_xcoffread prototype.
4872         * xml-support.c: Remove _initialize_xml_support prototype.
4873         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4874         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4875         prototype.
4876         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4877         prototype.
4878         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4879
4880 2017-09-08  Keith Seitz  <keiths@redhat.com>
4881
4882         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4883         field.
4884
4885 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4886
4887         * f-valprint.c (f_val_print): Remove check for one byte
4888         sized integers. Remove printing of character type.
4889
4890 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4891             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4892             Bernhard Heckel  <bernhard.heckel@intel.com>
4893
4894         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4895         to maintain proper indentation when printing pointers/refs.
4896
4897 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4898
4899         GDB 8.0.1 released.
4900
4901 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4902
4903         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4904
4905 2017-09-05  Tom Tromey  <tom@tromey.com>
4906
4907         * parse.c (funcall_chain): Now a std::vector.
4908         (start_arglist, end_arglist): Simplify.
4909         (free_funcalls): Remove.
4910         (parse_exp_in_context_1): Remove cleanup.
4911
4912 2017-09-05  Tom Tromey  <tom@tromey.com>
4913
4914         * go-exp.y (go_parse): Don't create a cleanup.
4915
4916 2017-09-05  Tom Tromey  <tom@tromey.com>
4917
4918         * d-exp.y (PrimaryExpression): Use std::string.
4919         (d_parse): Don't create a cleanup.
4920
4921 2017-09-05  Tom Tromey  <tom@tromey.com>
4922
4923         * utils.c (do_clear_parser_state): Remove.
4924         (make_cleanup_clear_parser_state): Remove.
4925         * p-exp.y (pascal_parse): Use scoped_restore.
4926         * m2-exp.y (m2_parse): Use scoped_restore.
4927         * f-exp.y (f_parse): Use scoped_restore.
4928         * d-exp.y (d_parse): Use scoped_restore.
4929         * c-exp.y (c_parse): Use scoped_restore.
4930         * ada-exp.y (ada_parse): Use scoped_restore.
4931         * utils.h (make_cleanup_clear_parser_state): Remove.
4932
4933 2017-09-06  Keith Seitz  <keiths@redhat.com>
4934
4935         * dwarf2read.c (dw2_linkage_name_attr): New function.
4936         (dw2_linkage_name): New function.
4937         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4938         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4939         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4940
4941 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4942
4943         * config/djgpp/djconfig.sh: Correct shell portability issue.
4944
4945 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4946
4947         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4948
4949 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4950
4951         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4952         * NEWS: Mention new FreeBSD/mips native configuration.
4953         * configure.host: Add aarch64*-*-freebsd*.
4954         * configure.nat: Likewise.
4955         * aarch64-fbsd-nat.c: New file.
4956
4957 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4958
4959         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4960         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4961         * NEWS: Mention new FreeBSD/aarch64 target.
4962         * configure.tgt: Add aarch64*-*-freebsd*.
4963         * aarch64-fbsd-tdep.c: New file.
4964         * aarch64-fbsd-tdep.h: New file.
4965
4966 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4967
4968         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4969
4970 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4971
4972         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4973         of TLS symbols.
4974
4975 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4976
4977         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4978         call.
4979
4980 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4981
4982         * infrun.c (follow_exec): Call add_thread after
4983         target_find_description.
4984
4985 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4986
4987         * infrun.c (handle_inferior_event_1): When exec'ing, read
4988         stop_pc after follow_exec.
4989
4990 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4991
4992         * remote.c (process_g_packet): Update error message.
4993
4994 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4995
4996         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4997         targets.
4998
4999 2017-09-05  Pedro Alves  <palves@redhat.com>
5000
5001         * eval.c (eval_call, evaluate_funcall): New functions, factored
5002         out from ...
5003         (evaluate_subexp_standard): ... this.
5004
5005 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5006
5007         * amd64-tdep.c (amd64_target_description): Create target
5008         descriptions.
5009         (_initialize_amd64_tdep): Don't call functions
5010         initialize_tdesc_amd64_*.  Add self tests.
5011         * arch/amd64.c (amd64_create_target_description): Add parameter
5012         is_linux.  Call set_tdesc_osabi if is_linux is true.
5013         * arch/amd64.h (amd64_create_target_description): Update the
5014         declaration.
5015         * arch/i386.c (i386_create_target_description): Add parameter
5016         is_linux.  Call set_tdesc_osabi if is_linux is true.
5017         * arch/i386.h (i386_create_target_description): Update
5018         declaration.
5019         * configure.tgt: Add i386.o to gdb_target_obs.
5020         * features/Makefile (XMLTOC): Remove i386/*.xml.
5021         * features/i386/amd64-avx-avx512.c: Remove.
5022         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5023         * features/i386/amd64-avx-mpx.c: Remove.
5024         * features/i386/amd64-avx.c: Remove.
5025         * features/i386/amd64-mpx.c: Remove.
5026         * features/i386/amd64.c: Remove.
5027         * features/i386/i386-avx-avx512.c: Remove.
5028         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5029         * features/i386/i386-avx-mpx.c: Remove.
5030         * features/i386/i386-avx.c: Remove.
5031         * features/i386/i386-mmx.c: Remove.
5032         * features/i386/i386-mpx.c: Remove.
5033         * features/i386/i386.c: Remove.
5034         * i386-tdep.c: Don't include features/i386/i386*.c., include
5035         target-descriptions.h and arch/i386.h.
5036         (i386_target_description): Create target descriptions.
5037         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5038         functions.  Do self tests.
5039
5040 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5041
5042         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5043         * features/i386/amd64-avx-avx512-linux.c: Removed.
5044         * features/i386/amd64-avx-linux.c: Removed.
5045         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5046         * features/i386/amd64-avx-mpx-linux.c: Removed.
5047         * features/i386/amd64-linux.c: Removed.
5048         * features/i386/amd64-mpx-linux.c: Removed.
5049         * features/i386/x32-avx-avx512-linux.c: Removed.
5050         * features/i386/x32-avx-linux.c: Removed.
5051         * features/i386/x32-linux.c: Removed.
5052
5053 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5054
5055         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5056         features/i386/*.c.
5057         (amd64_linux_read_description): Call
5058         amd64_create_target_description.
5059         * arch/amd64.c: New file.
5060         * arch/amd64.h: New file.
5061         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5062         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5063
5064 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5065
5066         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5067         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5068         (amd64_linux_read_description): Create target descriptions.
5069         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5070         functions.  Add unit tests.
5071         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5072         x32-core.xml.
5073         * features/i386/64bit-avx.c: Generated.
5074         * features/i386/64bit-avx512.c: Generated.
5075         * features/i386/64bit-core.c: Generated.
5076         * features/i386/64bit-linux.c: Generated.
5077         * features/i386/64bit-mpx.c: Generated.
5078         * features/i386/64bit-pkeys.c: Generated.
5079         * features/i386/64bit-segments.c: Generated.
5080         * features/i386/64bit-sse.c: Generated.
5081         * features/i386/x32-core.c: Generated.
5082         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5083         c files for amd64-linux and x32-linux.
5084
5085 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5086
5087         * amd64-linux-tdep.c (amd64_linux_read_description): New
5088         function.
5089         (amd64_linux_core_read_description): Call
5090         amd64_linux_read_description.
5091         (amd64_linux_init_abi): Likewise.
5092         (amd64_x32_linux_init_abi): Likewise.
5093         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5094         * x86-linux-nat.c (x86_linux_read_description): Call
5095         amd64_linux_read_description.
5096
5097 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5098
5099         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5100         comments.
5101
5102 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5103
5104         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5105         * features/i386/i386-avx-avx512-linux.c: Remove.
5106         * features/i386/i386-avx-linux.c: Remove.
5107         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5108         * features/i386/i386-avx-mpx-linux.c: Remove.
5109         * features/i386/i386-linux.c: Remove.
5110         * features/i386/i386-mmx-linux.c: Remove.
5111         * features/i386/i386-mpx-linux.c: Remove.
5112
5113 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5114
5115         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5116         (SFILES): Add arch/i386.c.
5117         (HFILES_NO_SRCDIR): Add arch/i386.h.
5118         * arch/i386.c: New file.
5119         * arch/i386.h: New file.
5120         * arch/tdesc.h (allocate_target_description): Declare.
5121         (set_tdesc_architecture): Declare.
5122         (set_tdesc_osabi): Declare.
5123         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5124         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5125         include arch/i386.h.
5126         (i386_linux_read_description): Remove code and call
5127         i386_create_target_description.
5128         (set_tdesc_architecture): New function.
5129         (set_tdesc_osabi): New function.
5130         * target-descriptions.h (allocate_target_description): Remove.
5131
5132 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5133
5134         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5135         * target-descriptions.c (tdesc_create_feature): Likewise, and
5136         adjust code.
5137         * features/i386/32bit-avx.c: Re-generated.
5138         * features/i386/32bit-avx512.c: Re-generated.
5139         * features/i386/32bit-core.c: Re-generated.
5140         * features/i386/32bit-linux.c: Re-generated.
5141         * features/i386/32bit-mpx.c: Re-generated.
5142         * features/i386/32bit-pkeys.c: Re-generated.
5143         * features/i386/32bit-sse.c: Re-generated.
5144
5145 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5146
5147         * regformats/regdef.h (struct reg): Override operator == and !=.
5148
5149 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5150
5151         * arch/tdesc.h: New file.
5152         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5153         * target-descriptions.c: Update comments.
5154         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5155         declarations.
5156         * features/i386/32bit-avx.c: Re-generated.
5157         * features/i386/32bit-avx512.c: Re-generated.
5158         * features/i386/32bit-core.c: Re-generated.
5159         * features/i386/32bit-linux.c: Re-generated.
5160         * features/i386/32bit-mpx.c: Re-generated.
5161         * features/i386/32bit-pkeys.c: Re-generated.
5162         * features/i386/32bit-sse.c: Re-generated.
5163
5164 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5165
5166         * regformats/regdat.sh: Update generated code.
5167
5168 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5169
5170         * regformats/regdat.sh: Adjust code order.
5171
5172 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5173
5174         * expprint.c (dump_subexp_body_standard): Use constant format
5175         string in fprintf_filtered call.
5176
5177 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5178
5179         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5180         NetBSD/i386.
5181         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5182
5183 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5184
5185         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5186
5187 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5188
5189         * bsd-kvm.o: Define _KMEMUSER.
5190         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5191         * configure: Regenerate.
5192
5193 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5194
5195         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5196         * i386-fbsd-nat.c: Likewise.
5197
5198 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5199
5200         * unittests/array-view-selftests.c: Add include of <array>.
5201
5202 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5203
5204         * spu-tdep.c (flush_ea_cache): Add missing argument to
5205         call_function_by_hand.
5206
5207 2017-09-04  Pedro Alves  <palves@redhat.com>
5208
5209         * NEWS (Safer support for debugging with no debug info): New.
5210
5211 2017-09-04  Pedro Alves  <palves@redhat.com>
5212
5213         * c-exp.y (function_method, function_method_void): Add current
5214         instance flags to TYPE_INSTANCE.
5215         * dwarf2read.c (check_modifier): New.
5216         (compute_delayed_physnames): Assert that only C++ adds delayed
5217         physnames.  Mark fn_fields as const/volatile depending on
5218         physname.
5219         * eval.c (make_params): New type_instance_flags parameter.  Use
5220         it as the new type's instance flags.
5221         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5222         flags element and pass it to make_params.
5223         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5224         instance flags element.
5225         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5226         * gdbtypes.h: Include "enum-flags.h".
5227         (type_instance_flags): New enum-flags type.
5228         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5229         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5230         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5231         (follow_type_instance_flags): New function.
5232         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5233         * parser-defs.h (follow_type_instance_flags): Declare.
5234         * valops.c (value_struct_elt_for_reference): const/volatile must
5235         match too.
5236
5237 2017-09-04  Pedro Alves  <palves@redhat.com>
5238
5239         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5240         function/method scopes; lookup the nested name as a function local
5241         static variable.
5242
5243 2017-09-04  Pedro Alves  <palves@redhat.com>
5244
5245         (%type <voidval>): Add function_method.
5246         * c-exp.y (exp): New production for calls with no arguments.
5247         (function_method, function_method_void_or_typelist): New
5248         productions.
5249         (exp): New production for "method()::static_var".
5250         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5251         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5252         Handle OP_FUNC_STATIC_VAR.
5253         * parse.c (operator_length_standard):
5254         Handle OP_FUNC_STATIC_VAR.
5255
5256 2017-09-04  Pedro Alves  <palves@redhat.com>
5257
5258         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5259         handling.
5260         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5261         Ditto.
5262         * parse.c (operator_length_standard, operator_check_standard):
5263         Ditto.
5264         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5265
5266 2017-09-04  Pedro Alves  <palves@redhat.com>
5267
5268         * ax-gdb.c: Include "typeprint.h".
5269         (gen_expr_for_cast): New function.
5270         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5271         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5272         type is unknown.
5273         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5274         nodebug_data_symbol.
5275         * eval.c: Include "typeprint.h".
5276         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5277         Error out if symbol has unknown type.
5278         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5279         evaluate_subexp_for_cast.
5280         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5281         OP_VAR_MSYM_VALUE.
5282         (evaluate_subexp_for_cast): New function.
5283         * gdbtypes.c (init_nodebug_var_type): New function.
5284         (objfile_type): Use it to initialize types of variables with no
5285         debug info.
5286         * typeprint.c (error_unknown_type): New.
5287         * typeprint.h (error_unknown_type): New declaration.
5288         * compile/compile-c-types.c (convert_type_basic): Handle
5289         TYPE_CODE_ERROR; warn and fallback to int for variables with
5290         unknown type.
5291
5292 2017-09-04  Pedro Alves  <palves@redhat.com>
5293
5294         * eval.c (evaluate_var_value): New function, factored out from ...
5295         (evaluate_subexp_standard): ... here.
5296
5297 2017-09-04  Pedro Alves  <palves@redhat.com>
5298
5299         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5300         Remove useless assignments to 'op'.
5301
5302 2017-09-04  Pedro Alves  <palves@redhat.com>
5303
5304         * eval.c (eval_skip_value): New function.
5305         (evaluate_subexp_standard): Use it.
5306
5307 2017-09-04  Pedro Alves  <palves@redhat.com>
5308
5309         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5310         function name from symbol/minsym and pass it to
5311         error_call_unknown_return_type.
5312
5313 2017-09-04  Pedro Alves  <palves@redhat.com>
5314
5315         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5316         * ax-gdb.c (gen_msym_var_ref): New function.
5317         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5318         * eval.c (evaluate_var_msym_value): New function.
5319         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5320         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5321         to call_function_by_hand.
5322         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5323         Handle OP_VAR_MSYM_VALUE.
5324         (union exp_element) <msymbol>: New field.
5325         * minsyms.h (struct type): Forward declare.
5326         (find_minsym_type_and_address): Declare.
5327         * parse.c (write_exp_elt_msym): New function.
5328         (write_exp_msymbol): Delete, refactored as ...
5329         (find_minsym_type_and_address): ... this new function.
5330         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5331         (operator_length_standard, operator_check_standard): Handle
5332         OP_VAR_MSYM_VALUE.
5333         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5334
5335 2017-09-04  Pedro Alves  <palves@redhat.com>
5336
5337         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5338         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5339         unknown.
5340         * ada-typeprint.c (print_func_type): Handle functions with unknown
5341         return type.
5342         * c-typeprint.c (c_type_print_base): Handle functions and methods
5343         with unknown return type.
5344         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5345         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5346         * compile/compile-c-types.c: Include "objfiles.h".
5347         (convert_func): For functions with unknown return type, warn and
5348         default to int.
5349         * compile/compile-object-run.c (compile_object_run): Adjust call
5350         to call_function_by_hand_dummy.
5351         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5352         call_function_by_hand.
5353         * eval.c (evaluate_subexp_standard): Adjust calls to
5354         call_function_by_hand.  Handle functions and methods with unknown
5355         return type.  Pass expect_type to call_function_by_hand.
5356         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5357         return type.
5358         * gcore.c (call_target_sbrk): Adjust call to
5359         call_function_by_hand.
5360         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5361         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5362         an integer address type instead of nodebug.
5363         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5364         call_function_by_hand.
5365         * infcall.c (error_call_unknown_return_type): New function.
5366         (call_function_by_hand): New "default_return_type" parameter.
5367         Pass it down.
5368         (call_function_by_hand_dummy): New "default_return_type"
5369         parameter.  Use it instead of defaulting to int.  If there's no
5370         default and the return type is unknown, throw an error.  If
5371         there's a default return type, and the called function has no
5372         debug info, then assume the function is prototyped.
5373         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5374         New "default_return_type" parameter.
5375         (error_call_unknown_return_type): New declaration.
5376         * linux-fork.c (call_lseek): Cast return type of lseek.
5377         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5378         call_function_by_hand.
5379         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5380         calls to call_function_by_hand.
5381         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5382         return type.
5383         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5384         (value_nsstring, print_object_command): Adjust calls to
5385         call_function_by_hand.
5386         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5387         functions with unknown return type.
5388         (pascal_type_print_func_varspec_suffix): New function.
5389         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5390         TYPE_CODE_METHOD>: Use it.
5391         * python/py-value.c (valpy_call): Adjust call to
5392         call_function_by_hand.
5393         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5394         call_function_by_hand.
5395         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5396         call_function_by_hand.
5397         * valops.c (value_allocate_space_in_inferior): Adjust call to
5398         call_function_by_hand.
5399         * typeprint.c (type_print_unknown_return_type): New function.
5400         * typeprint.h (type_print_unknown_return_type): New declaration.
5401
5402 2017-09-04  Pedro Alves  <palves@redhat.com>
5403
5404         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5405         types with more than one parameter as prototyped.
5406
5407 2017-09-04  Pedro Alves  <palves@redhat.com>
5408
5409         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5410         (disassemble_command): Use gdb_disassembly_flags instead of bare
5411         int.
5412         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5413         (dump_insns, do_mixed_source_and_assembly_deprecated)
5414         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5415         Use gdb_disassembly_flags instead of bare int.
5416         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5417         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5418         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5419         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5420         (enum gdb_disassembly_flag): ... values of this new enumeration.
5421         (gdb_disassembly_flags): Define.
5422         (gdb_disassembly)
5423         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5424         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5425         gdb_disassembly_flags instead of bare int.
5426         * record-btrace.c (btrace_insn_history)
5427         (record_btrace_insn_history, record_btrace_insn_history_range)
5428         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5429         instead of bare int.
5430         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5431         Use gdb_disassembly_flags instead of bare int.
5432         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5433         Define.
5434         * target-delegates.c: Regenerate.
5435         * target.c (target_insn_history, target_insn_history_from)
5436         (target_insn_history_range): Use gdb_disassembly_flags instead of
5437         bare int.
5438         * target.h: Include "disasm.h".
5439         (struct target_ops) <to_insn_history, to_insn_history_from,
5440         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5441         int.
5442         (target_insn_history, target_insn_history_from)
5443         (target_insn_history_range): Use gdb_disassembly_flags instead of
5444         bare int.
5445
5446 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5447
5448         * cli/cli-script.c (build_command_line): For if/while commands,
5449         check whether args is empty.
5450
5451 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5452
5453         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5454         (enum command_control_type): Likewise.
5455         (struct command_line): Likewise.
5456         (free_command_lines): Likewise.
5457         (struct command_lines_deleter): Likewise.
5458         (command_line_up): Likewise.
5459         (read_command_lines): Likewise.
5460         (read_command_lines_1): Likewise.
5461         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5462         (enum command_control_type): Likewise.
5463         (struct command_line): Likewise.
5464         (free_command_lines): Likewise.
5465         (struct command_lines_deleter): Likewise.
5466         (command_line_up): Likewise.
5467         (read_command_lines): Likewise.
5468         (read_command_lines_1): Likewise.
5469         * breakpoint.h: Include cli/cli-script.h.
5470         * extension-priv.h: Likewise.
5471         * gdbcmd.h: Likewise.
5472
5473 2017-09-04  Pedro Alves  <palves@redhat.com>
5474
5475         * ada-lang.c (is_known_support_routine): Move sal declaration to
5476         where it is initialized.
5477         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5478         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5479         (clear_command, update_static_tracepoint): Remove init_sal
5480         references.  Move declarations closer to initializations.
5481         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5482         initializations.
5483         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5484         references.  Move sal declarations closer to initializations.
5485         * frame.c (find_frame_sal): Return a symtab_and_line via function
5486         return instead of output parameter.  Remove init_sal references.
5487         * frame.h (find_frame_sal): Return a symtab_and_line via function
5488         return instead of output parameter.
5489         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5490         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5491         instead of memset.
5492         (gdbscm_find_pc_line): Remove init_sal reference.
5493         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5494         references.  Move declarations closer to initializations.
5495         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5496         initializations.
5497         (finish_backward): Remove init_sal references.  Move declarations
5498         closer to initializations.
5499         * infrun.c (process_event_stop_test, handle_step_into_function)
5500         (insert_hp_step_resume_breakpoint_at_frame)
5501         (insert_step_resume_breakpoint_at_caller): Likewise.
5502         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5503         (symbol_to_sal): Likewise.
5504         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5505         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5506         to its initialization.
5507         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5508         init_sal references.  Move declarations closer to initializations.
5509         * source.c (get_current_source_symtab_and_line): Remove brace
5510         initialization.
5511         (set_current_source_symtab_and_line): Now takes the sal by const
5512         reference.  Remove brace initialization.
5513         (line_info): Remove init_sal reference.
5514         * source.h (set_current_source_symtab_and_line): Now takes a
5515         symtab_and_line via const reference.
5516         * stack.c (set_current_sal_from_frame): Adjust.
5517         (print_frame_info): Adjust.
5518         (get_last_displayed_sal): Return the sal via function return
5519         instead of via output parameter.  Simplify.
5520         (frame_info): Adjust.
5521         * stack.h (get_last_displayed_sal): Return the sal via function
5522         return instead of via output parameter.
5523         * symtab.c (init_sal): Delete.
5524         (find_pc_sect_line): Remove init_sal references.  Move
5525         declarations closer to initializations.
5526         (find_function_start_sal): Remove init_sal references.  Move
5527         declarations closer to initializations.
5528         * symtab.h (struct symtab_and_line): In-class initialize all
5529         fields.
5530         * tracepoint.c (set_traceframe_context)
5531         (print_one_static_tracepoint_marker): Remove init_sal references.
5532         Move declarations closer to initializations.
5533         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5534         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5535         declarations closer to initializations.
5536         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5537         init_sal references.  Adjust.
5538
5539 2017-09-04  Pedro Alves  <palves@redhat.com>
5540
5541         * ax-gdb.c (agent_command_1): Use range-for.
5542         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5543         * breakpoint.c: Include "common/array-view.h".
5544         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5545         parameter from struct symtabs_and_lines to
5546         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5547         (breakpoint_sals_to_pc): Change sals parameter from struct
5548         symtabs_and_lines to std::vector reference.
5549         (check_fast_tracepoint_sals): Change sals parameter from struct
5550         symtabs_and_lines to std::array_view.  Use range-for.
5551         (decode_static_tracepoint_spec): Return a std::vector instead of
5552         symtabs_and_lines.  Update.
5553         (create_breakpoint): Update.
5554         (break_range_command, until_break_command, clear_command): Update.
5555         (base_breakpoint_decode_location, bkpt_decode_location)
5556         (bkpt_probe_create_sals_from_location)
5557         (bkpt_probe_decode_location, tracepoint_decode_location)
5558         (tracepoint_probe_decode_location)
5559         (strace_marker_create_sals_from_location): Return a std::vector
5560         instead of symtabs_and_lines.
5561         (strace_marker_create_breakpoints_sal): Update.
5562         (strace_marker_decode_location): Return a std::vector instead of
5563         symtabs_and_lines.  Update.
5564         (update_breakpoint_locations): Change struct symtabs_and_lines
5565         parameters to gdb::array_view.  Adjust.
5566         (location_to_sals): Return a std::vector instead of
5567         symtabs_and_lines.  Update.
5568         (breakpoint_re_set_default): Use std::vector instead of struct
5569         symtabs_and_lines.
5570         (decode_location_default): Return a std::vector instead of
5571         symtabs_and_lines.  Update.
5572         * breakpoint.h: Include "common/array-view.h".
5573         (struct breakpoint_ops) <decode_location>: Now returns a
5574         std::vector instead of returning a symtabs_and_lines via output
5575         parameter.
5576         (update_breakpoint_locations): Change sals parameters to use
5577         gdb::array_view.
5578         * cli/cli-cmds.c (edit_command, list_command): Update to use
5579         std::vector and gdb::array_view.
5580         (ambiguous_line_spec): Adjust to use gdb::array_view and
5581         range-for.
5582         (compare_symtabs): Rename to ...
5583         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5584         const reference and adjust.
5585         (filter_sals): Rewrite using std::vector and standard algorithms.
5586         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5587         (jump_command): Update to use std::vector.
5588         * linespec.c (struct linespec_state) <canonical_names>: Update
5589         comment.
5590         (add_sal_to_sals_basic): Delete.
5591         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5592         (decode_line_2, create_sals_line_offset)
5593         (convert_address_location_to_sals, convert_linespec_to_sals)
5594         (convert_explicit_location_to_sals, parse_linespec)
5595         (event_location_to_sals, decode_line_full, decode_line_1)
5596         (decode_line_with_current_source)
5597         (decode_line_with_last_displayed, decode_objc)
5598         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5599         (linespec_result::~linespec_result): Adjust to use std::vector
5600         instead of symtabs_and_lines.
5601         * linespec.h (linespec_sals::sals): Now a std::vector.
5602         (struct linespec_result): Use std::vector, bool, and in-class
5603         initialization.
5604         (decode_line_1, decode_line_with_current_source)
5605         (decode_line_with_last_displayed): Return std::vector.
5606         * macrocmd.c (info_macros_command): Use std::vector.
5607         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5608         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5609         std::vector.
5610         * probe.h (parse_probes): Return a std::vector.
5611         * python/python.c (gdbpy_decode_line): Use std::vector and
5612         gdb::array_view.
5613         * source.c (select_source_symtab, line_info): Use std::vector.
5614         * stack.c (func_command): Use std::vector.
5615         * symtab.h (struct symtabs_and_lines): Delete.
5616         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5617
5618 2017-09-04  Pedro Alves  <palves@redhat.com>
5619
5620         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5621         unittests/array-view-selftests.c.
5622         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5623         * common/array-view.h: New file.
5624         * unittests/array-view-selftests.c: New file.
5625
5626 2017-09-04  Pedro Alves  <palves@redhat.com>
5627
5628         * cli/cli-cmds.c (edit_command): Pass message to
5629         ambiguous_line_spec.
5630         (list_command): Pass message to ambiguous_line_spec.  Say
5631         "first"/"last" instead of "start" and "end" to be consistent with
5632         the manual.
5633         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5634         them to print formatted message.
5635
5636 2017-09-04  Pedro Alves  <palves@redhat.com>
5637
5638         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5639         ftrace_update_insns by reference instead of pointer.
5640
5641 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5642
5643         * i386-go32-tdep.c: Include x86-xstate.h.
5644         (i386_go32_init_abi): Call i386_target_description.
5645         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5646         if xcr0 is X86_XSTATE_X87_MASK.
5647         * i386-tdep.h (tdesc_i386): Remove the declaration.
5648         (tdesc_i386_mmx): Likewise.
5649
5650 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5651
5652         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5653         X86_XSTATE_SSE_MASK instead of 0.
5654
5655 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5656
5657         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5658         i386_target_description.
5659         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5660         i386_target_description.
5661         * i386-tdep.c (i386_gdbarch_init): Likewise.
5662
5663 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5664
5665         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5666         (x86_darwin_init_abi_64): Call amd64_target_description.
5667         * amd64-dicos-tdep.c: Likewise.
5668         * amd64-fbsd-nat.c: Likewise.
5669         * amd64-fbsd-tdep.c: Likewise.
5670         * amd64-nbsd-tdep.c: Likewise.
5671         * amd64-obsd-tdep.c: Likewise.
5672         * amd64-sol2-tdep.c: Likewise.
5673         * amd64-windows-tdep.c: Likewise.
5674         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5675
5676 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5677
5678         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5679         (btrace_function) <insn>: Change type to use std::vector.
5680         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5681         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5682         ftrace_update_insns, ftrace_compute_global_level_offset,
5683         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5684         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5685         change to std::vector.
5686         (ftrace_update_insns): Adjust to change to std::vector, change
5687         type of INSN parameter.
5688         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5689         * record-btrace.c (btrace_call_history_insn_range,
5690         btrace_compute_src_line_range,
5691         record_btrace_frame_prev_register): Adjust to change to
5692         std::vector.
5693         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5694         to change to std::vector.
5695
5696 2017-09-03  Tom Tromey  <tom@tromey.com>
5697
5698         * corefile.c (reopen_exec_file): Use std::string.
5699
5700 2017-09-03  Tom Tromey  <tom@tromey.com>
5701
5702         * compile/compile.c (compile_register_name_mangled): Return
5703         std::string.
5704         * compile/compile-loc2c.c (pushf_register_address): Update.
5705         (pushf_register): Update.
5706         * compile/compile-c-types.c (convert_array): Update.
5707         * compile/compile-c-symbols.c (generate_vla_size): Update.
5708         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5709         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5710         (convert_one_symbol): Update.
5711         (generate_c_for_for_one_variable): Update.
5712         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5713         std::string.
5714         (generate_register_struct): Update.
5715         * compile/compile-internal.h (c_get_range_decl_name): Return a
5716         std::string.
5717         (compile_register_name_mangled): Return std::string.
5718
5719 2017-09-03  Tom Tromey  <tom@tromey.com>
5720
5721         * utils.c (perror_string): Return a std::string.
5722         (throw_perror_with_name, perror_warning_with_name): Update.
5723
5724 2017-09-03  Tom Tromey  <tom@tromey.com>
5725
5726         * demangle.c (demangle_command): Use std::string,
5727         unique_xmalloc_ptr.
5728
5729 2017-09-03  Tom Tromey  <tom@tromey.com>
5730
5731         * cli/cli-setshow.c (do_set_command): Use std::string.
5732
5733 2017-09-03  Tom Tromey  <tom@tromey.com>
5734
5735         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5736
5737 2017-09-03  Tom Tromey  <tom@tromey.com>
5738
5739         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5740
5741 2017-09-03  Tom Tromey  <tom@tromey.com>
5742
5743         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5744         gdb::unique_xmalloc_ptr.
5745
5746 2017-09-03  Tom Tromey  <tom@tromey.com>
5747
5748         * thread.c (print_thread_info_1): Use string_printf.
5749         (thread_apply_command, thread_apply_all_command): Use
5750         std::string.
5751
5752 2017-09-03  Tom Tromey  <tom@tromey.com>
5753
5754         * valprint.c (val_print_string): Update.
5755         * gdbcore.h (memory_error_message): Return std::string.
5756         * corefile.c (memory_error_message): Return std::string.
5757         (memory_error): Update.
5758         * breakpoint.c (insert_bp_location): Update.
5759
5760 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5761
5762         * target/waitstatus.h (target_waitstatus_to_string): Change
5763         return type to std::string.
5764         * target/waitstatus.c (target_waitstatus_to_string): Return
5765         std::string.
5766         * target.h (target_waitstatus_to_string): Remove declaration.
5767         * infrun.c (resume, clear_proceed_status_thread,
5768         print_target_wait_results, do_target_wait, save_waitstatus,
5769         stop_all_threads): Adjust.
5770         * record-btrace.c (record_btrace_wait): Adjust.
5771         * target-debug.h
5772         (target_debug_print_struct_target_waitstatus_p): Adjust.
5773
5774 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5775
5776         PR gdb/22046
5777         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5778         detection.
5779
5780 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5781
5782         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5783         for setting/unsetting environment variables on the remote target.
5784         (New remote packets): Add entries for QEnvironmentHexEncoded,
5785         QEnvironmentUnset and QEnvironmentReset.
5786         * common/environ.c (gdb_environ::operator=): Extend method to
5787         handle m_user_set_env_list and m_user_unset_env_list.
5788         (gdb_environ::clear): Likewise.
5789         (match_var_in_string): Change type of first parameter from 'char
5790         *' to 'const char *'.
5791         (gdb_environ::set): Extend method to handle
5792         m_user_set_env_list and m_user_unset_env_list.
5793         (gdb_environ::unset): Likewise.
5794         (gdb_environ::clear_user_set_env): New method.
5795         (gdb_environ::user_set_envp): Likewise.
5796         (gdb_environ::user_unset_envp): Likewise.
5797         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5798         m_user_unset_env_list on move constructor/assignment.
5799         (unset): Add new default parameter 'update_unset_list = true'.
5800         (clear_user_set_env): New method.
5801         (user_set_envp): Likewise.
5802         (user_unset_envp): Likewise.
5803         (m_user_set_env_list): New std::set.
5804         (m_user_unset_env_list): Likewise.
5805         * common/rsp-low.c (hex2str): New function.
5806         (bin2hex): New overload for bin2hex function.
5807         * common/rsp-low.c (hex2str): New prototype.
5808         (str2hex): New overload prototype.
5809         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5810         QEnvironmentUnset and QEnvironmentReset.
5811         (remote_protocol_features): Add QEnvironmentHexEncoded,
5812         QEnvironmentUnset and QEnvironmentReset packets.
5813         (send_environment_packet): New function.
5814         (extended_remote_environment_support): Likewise.
5815         (extended_remote_create_inferior): Call
5816         extended_remote_environment_support.
5817         (_initialize_remote): Add QEnvironmentHexEncoded,
5818         QEnvironmentUnset and QEnvironmentReset packet configs.
5819         * unittests/environ-selftests.c (gdb_selftest_env_var):
5820         New variable.
5821         (test_vector_initialization): New function.
5822         (test_init_from_host_environ): Likewise.
5823         (test_reinit_from_host_environ): Likewise.
5824         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5825         Likewise.
5826         (test_unset_set_empty_vector): Likewise.
5827         (test_vector_clear): Likewise.
5828         (test_std_move): Likewise.
5829         (test_move_constructor):
5830         (test_self_move): Likewise.
5831         (test_set_unset_reset): Likewise.
5832         (run_tests): Rewrite in terms of the functions above.
5833
5834 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5835
5836         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5837         (adi_available): Use a temp variable of type CORE_ADDR as argument
5838         3 when calling target_auxv_search.
5839         (adi_normalize_address): Use masks and xor operators to calculate
5840         normalized address.
5841         (adi_read_versions, adi_write_versions, adi_print_versions)
5842         (do_examine, do_assign): Use paddress.
5843
5844 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5845
5846         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5847         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5848         out of loop and add supply of FIR.
5849         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5850         add collect of FIR.
5851
5852 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5853
5854         PR gdb/21827
5855         * cli/cli-script.c (define_command): Don't convert command name
5856         to lower case.
5857
5858 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5859
5860         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5861         Update all callers accordingly. Remove all code blocks handling
5862         the case where DISPP is not NULL.
5863
5864 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5865
5866         PR symtab/22003
5867         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5868         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5869         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5870
5871 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5872
5873         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5874         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5875         (read_comp_units_from_section): New parameter abbrev_section, use
5876         read_and_check_comp_unit_head, allocate signatured_type if needed.
5877         (create_all_comp_units): Update read_comp_units_from_section caller.
5878
5879 2017-08-23  Pedro Alves  <palves@redhat.com>
5880
5881         PR remote/21852
5882         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5883         to null_ptid and switch to thread without reading the registers
5884         after adding the inferior.
5885
5886 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5887
5888         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5889         compile-gcc.
5890         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5891         (compile_to_object): Implement compile_gcc.
5892         (_initialize_compile): Install "set compile-gcc".  Initialize
5893         compile_gcc.
5894
5895 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5896
5897         * compile/compile.c (compile_to_object): Conditionally call
5898         set_verbose.  Conditionally call compile or compile_v0.
5899
5900 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5901
5902         * sparc64-tdep.h: (adi_normalize_address): New export.
5903         * sparc-nat.h: (open_adi_tag_fd): New export.
5904         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5905         * sparc64-linux-tdep.c:
5906         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5907         (sparc64_linux_handle_segmentation_fault): New function.
5908         (sparc64_linux_init_abi): Register
5909         sparc64_linux_handle_segmentation_fault
5910         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5911         (sparc64_addr_bits_remove): New function.
5912         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5913         (MAX_PROC_NAME_SIZE): New macro.
5914         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5915         (sparc64adilist): New variable.
5916         (adi_proc_list): New variable.
5917         (find_adi_info): New function.
5918         (add_adi_info): New function.
5919         (get_adi_info_proc): New function.
5920         (get_adi_info): New function.
5921         (info_adi_command): New function.
5922         (read_maps_entry): New function.
5923         (adi_available): New function.
5924         (adi_normalize_address): New function.
5925         (adi_align_address): New function.
5926         (adi_convert_byte_count): New function.
5927         (adi_tag_fd): New function.
5928         (adi_is_addr_mapped): New function.
5929         (adi_read_versions): New function.
5930         (adi_write_versions): New function.
5931         (adi_print_versions): New function.
5932         (do_examine): New function.
5933         (do_assign): New function.
5934         (adi_examine_command): New function.
5935         (adi_assign_command): New function.
5936         (_initialize_sparc64_adi_tdep): New function.
5937
5938 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5939
5940         * breakpoint.c (breakpoints_info): Rename to ...
5941         (info_breakpoints_command): ... this.
5942         (watchpoints_info): Rename to ...
5943         (info_watchpoints_command): ... this.
5944         (tracepoints_info): Rename to ...
5945         (info_tracepoints_command): ... this.
5946         (_initialize_breakpoint): Adjust.
5947         * dcache.c (dcache_info): Rename to ...
5948         (info_display_command): ... this.
5949         (_initialize_dcache): Adjust.
5950         * frame.h (args_info): Rename to ...
5951         (info_args_command): ... this.
5952         (locals_info): Rename to ...
5953         (info_locals_command): ... this.
5954         * infcmd.c (nofp_registers_info): Rename to ...
5955         (info_registers_command): ... this.
5956         (float_info): Rename to ...
5957         (info_float_command): ... this.
5958         (program_info): Rename to ...
5959         (info_program_command): ... this.
5960         (all_registers_info): Rename to ...
5961         (info_all_registers_command): ... this.
5962         (vector_info): Rename to ...
5963         (info_vector_command): ... this.
5964         (float_info): Rename to ...
5965         (info_float_command): ... this.
5966         (_initialize_infcmd): Adjust.
5967         * inferior.h (term_info): Rename to ...
5968         (info_terminal_command): ... this.
5969         * inflow.c (term_info): Rename to ...
5970         (info_terminal_command): ... this.
5971         (_initialize_inflow): Adjust.
5972         * infrun.c (signals_info): Rename to ...
5973         (info_signals_command): ... this.
5974         (_initialize_infrun): Adjust.
5975         * objc-lang.c (classes_info): Rename to ...
5976         (info_classes_command): ... this.
5977         (selectors_info): Rename to ...
5978         (info_selectors_command): ... this.
5979         (_initialize_objc_language): Adjust.
5980         * printcmd.c (sym_info): Rename to ...
5981         (info_symbol_command): ... this.
5982         (address_info): Rename to ...
5983         (info_address_command): ... this.
5984         (display_info): Rename to ...
5985         (info_display_command): ... this.
5986         (_initialize_printcmd): Adjust.
5987         * reverse.c (bookmarks_info): Rename to ...
5988         (info_breakpoints_command): ... this.
5989         (_initialize_reverse): Adjust.
5990         * ser-go32.c (dos_info): Rename to ...
5991         (info_serial_command): ... this.
5992         (_initialize_ser_dos): Adjust.
5993         * skip.c (skip_info): Rename to ...
5994         (info_skip_command): ... this.
5995         (_initialize_step_skip): Adjust.
5996         * source.c (line_info): Rename to ...
5997         (info_line_command): ... this.
5998         (source_info): Rename to ...
5999         (info_source_command)
6000         * stack.c (frame_info): Rename to ...
6001         (info_frame_command): ... this.
6002         (locals_info): Rename to ...
6003         (info_locals_command): ... this.
6004         (args_info): Rename to ...
6005         (info_args_command): ... this.
6006         (_initialize_stack): Adjust.
6007         * symtab.c (sources_info): Rename to ...
6008         (info_sources_command): ... this.
6009         (variables_info): Rename to ...
6010         (info_variables_command): ... this.
6011         (functions_info): Rename to ...
6012         (info_functions_command): ... this.
6013         (types_info): Rename to ...
6014         (info_types_command): ... this.
6015         (_initialize_symtab): Adjust.
6016         * target.c (target_info): Rename to ...
6017         (info_target_command): ... this.
6018         (initialize_targets): Adjust.
6019         * tracepoint.c (tvariables_info): Rename to ...
6020         (info_tvariables_command): ... this.
6021         (scope_info): Rename to ...
6022         (info_scope_command): ... this.
6023         (trace_dump_actions): Adjust.
6024         (_initialize_tracepoint): Adjust.
6025
6026 2017-08-22  Tom Tromey  <tom@tromey.com>
6027
6028         * breakpoint.h (install_breakpoint): Update.
6029         * breakpoint.c (add_solib_catchpoint): Update.
6030         (install_breakpoint): Change argument to a std::unique_ptr.
6031         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6032         (create_breakpoint_sal, create_breakpoint): Update.
6033         (watch_command_1, catch_exec_command_1)
6034         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6035         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6036         Return the breakpoint.
6037         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6038         (new_single_step_breakpoint): Update.
6039         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6040         std::unique_ptr.
6041         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6042         std::unique_ptr.
6043         * break-catch-sig.c (create_signal_catchpoint): Use
6044         std::unique_ptr.
6045         * ada-lang.c (create_ada_exception_catchpoint): Use
6046         std::unique_ptr.
6047
6048 2017-08-22  Tom Tromey  <tom@tromey.com>
6049
6050         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6051
6052 2017-08-22  Tom Tromey  <tom@tromey.com>
6053
6054         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6055         (lookup_partial_symbol): Update.
6056
6057 2017-08-22  Tom Tromey  <tom@tromey.com>
6058
6059         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6060         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6061         (find_and_open_source, symtab_to_fullname): Update.
6062         * psymtab.c (psymtab_to_fullname): Update.
6063
6064 2017-08-22  Tom Tromey  <tom@tromey.com>
6065
6066         * exec.c (exec_file_attach): Update.
6067         * linux-thread-db.c (try_thread_db_load): Update.
6068         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6069         * utils.c (gdb_realpath): Change return type.
6070         (gdb_realpath_keepfile): Update.
6071         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6072         (_initialize_utils): Register the new self test.
6073         * source.c (openp): Update.
6074         (find_and_open_source): Update.
6075         * nto-tdep.c (nto_find_and_open_solib): Update.
6076         * main.c (set_gdb_data_directory): Update.
6077         (captured_main_1): Update.
6078         * dwarf2read.c (dwarf2_get_dwz_file): Update
6079         (dw2_map_symbol_filenames): Update.
6080         * auto-load.c (auto_load_safe_path_vec_update): Update.
6081         (filename_is_in_auto_load_safe_path_vec): Change type of
6082         "filename_realp".
6083         (auto_load_objfile_script): Update.
6084         (file_is_auto_load_safe): Update.  Use std::string.
6085         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6086
6087 2017-08-22  Tom Tromey  <tom@tromey.com>
6088
6089         * utils.c (gdb_realpath_keepfile): Return a
6090         gdb::unique_xmalloc_ptr.
6091         * exec.c (exec_file_attach): Update.
6092         * utils.h (gdb_realpath_keepfile): Return a
6093         gdb::unique_xmalloc_ptr.
6094
6095 2017-08-22  Tom Tromey  <tom@tromey.com>
6096
6097         * compile/compile.c (compile_file_command): Use
6098         gdb::unique_xmalloc_ptr, std::string.
6099         * utils.c (gdb_abspath): Change return type.
6100         * source.c (openp): Update.
6101         * objfiles.c (allocate_objfile): Update.
6102         * main.c (set_gdb_data_directory): Update.
6103         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6104
6105 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6106
6107         * cli-cmds.c (list_commands): List actual code around more than
6108         one location.
6109
6110 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6111
6112         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6113
6114 2017-08-21  Pedro Alves  <palves@redhat.com>
6115
6116         PR gdb/19487
6117         * c-exp.y (variable production): Handle function aliases.
6118         * minsyms.c (msymbol_is_text): New function.
6119         * minsyms.h (msymbol_is_text): Declare.
6120         * symtab.c (find_function_alias_target): New function.
6121         * symtab.h (find_function_alias_target): Declare.
6122
6123 2017-08-21  Pedro Alves  <palves@redhat.com>
6124
6125         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6126         typedefs.
6127         * typeprint.c (whatis_exp): If handling "whatis", and expression
6128         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6129         typedefs here.
6130         * valops.c (value_cast): Save "to" type before resolving
6131         stubs/typedefs.  Use that type as resulting value's type.
6132
6133 2017-08-18  Tom Tromey  <tom@tromey.com>
6134             Pedro Alves  <palves@redhat.com>
6135
6136         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6137         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6138         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6139         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6140         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6141         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6142         (linux_get_siginfo_data): Add "thread" argument.  Use
6143         scoped_restore.
6144         * linux-nat.c (linux_child_follow_fork)
6145         (check_stopped_by_watchpoint): Use scoped_restore.
6146         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6147         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6148         (restore_inferior_ptid, save_inferior_ptid): Remove.
6149         * btrace.c (btrace_fetch): Use scoped_restore.
6150         * bsd-uthread.c (bsd_uthread_fetch_registers)
6151         (bsd_uthread_store_registers): Use scoped_restore.
6152         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6153         scoped_restore.
6154         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6155         (aix_thread_xfer_partial): Use scoped_restore.
6156         * inferior.h (save_inferior_ptid): Remove.
6157
6158 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6159
6160         PR tdep/21818
6161         * arm-tdep.c (gdb_print_insn_arm): Mark
6162         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6163
6164 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6165
6166         * NEWS: Mention GDBserver's new option "--selftest".
6167         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6168         * selftest.c: Move it to common/selftest.c.
6169         * selftest.h: Move it to common/selftest.h.
6170         * selftest-arch.c (reset): New function.
6171         (tests_with_arch): Call reset.
6172
6173 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6174
6175         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6176         instead of exception_fprintf and printf_filtered.
6177
6178 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6179
6180         * selftest.c (register_self_test): Rename it to
6181         selftests::register_test.
6182         (run_self_tests): selftest::run_tests.
6183         * selftest.h: Update declarations.
6184         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6185         selftests::register_test_foreach_arch.
6186         * selftest-arch.h: Update declaration.
6187         * aarch64-tdep.c: Update.
6188         * arm-tdep.c: Likewise.
6189         * disasm-selftests.c: Likewise.
6190         * dwarf2loc.c: Likewise.
6191         * dwarf2-frame.c: Likewise.
6192         * findvar.c: Likewise.
6193         * gdbarch-selftests.c: Likewise.
6194         * maint.c (maintenance_selftest): Likewise.
6195         * regcache.c: Likewise.
6196         * rust-exp.y: Likewise.
6197         * selftest-arch.c: Likewise.
6198         * unittests/environ-selftests.c: Likewise.
6199         * unittests/function-view-selftests.c: Likewise.
6200         * unittests/offset-type-selftests.c: Likewise.
6201         * unittests/optional-selftests.c: Likewise.
6202         * unittests/scoped_restore-selftests.c: Likewise.
6203         * utils-selftests.c: Likewise.
6204
6205 2017-08-17  Pedro Alves  <palves@redhat.com>
6206
6207         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6208         local.
6209
6210 2017-08-17  Pedro Alves  <palves@redhat.com>
6211
6212         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6213         field.
6214         (reset_die_in_process): Delete, replaced by ...
6215         (process_die_scope): ... this new class.  Make it responsible for
6216         freeing cu->line_header too.
6217         (process_die): Use process_die_scope.
6218         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6219         cu->line_header_die_owner.  Don't release the line header if it's
6220         owned by the CU.
6221         (setup_type_unit_groups): Make the CU/DIE own the line header.
6222         Don't release the line header here.
6223
6224 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6225
6226         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6227
6228 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6229
6230         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6231         Single-Key mode
6232
6233 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6234
6235         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6236         mode command list.
6237
6238 2017-08-15  Stafford Horne  <shorne@gmail.com>
6239
6240         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6241
6242 2017-08-15  Stafford Horne  <shorne@gmail.com>
6243
6244         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6245
6246 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6247
6248         PR gdb/21954
6249         * infcmd.c (unset_environment_command): Use the 'clear' method on
6250         the environment instead of resetting it.
6251
6252 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6253
6254         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6255         platforms.
6256
6257 2017-08-14  Tom Tromey  <tom@tromey.com>
6258
6259         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6260         (print_binary_chars): Likewise.
6261         (BITS_IN_BYTES): Remove.
6262
6263 2017-08-14  Tom Tromey  <tom@tromey.com>
6264
6265         PR gdb/21675
6266         * valprint.c (LOW_ZERO): Change value to 034.
6267         (print_octal_chars): Add static_asserts for octal constants.
6268         * printcmd.c (print_scalar_formatted): Add 'd' case.
6269
6270 2017-08-11  Tom Tromey  <tom@tromey.com>
6271
6272         * symfile.c (add_symbol_file_command): Use std::vector.
6273
6274 2017-08-14  Tom Tromey  <tom@tromey.com>
6275
6276         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6277         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6278         std::move.
6279         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6280
6281 2017-08-11  Pedro Alves  <palves@redhat.com>
6282
6283         * infrun.c (process_event_stop_test): Adjust
6284         function_name_is_marked_for_skip call.
6285         * skip.c: Include <list>.
6286         (skiplist_entry): Make it a class with private fields, and
6287         getters/setters.
6288         (skiplist_entry_chain): Delete.
6289         (skiplist_entries): New.
6290         (skiplist_entry_count): Delete.
6291         (highest_skiplist_entry_num): New.
6292         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6293         (add_skiplist_entry): Delete.
6294         (skiplist_entry::skiplist_entry): New.
6295         (skiplist_entry::add_entry): New.
6296         (skip_file_command, skip_function): Adjust.
6297         (compile_skip_regexp): Delete.
6298         (skip_command): Don't compile regexp here.  Adjust to use
6299         skiplist_entry::add_entry.
6300         (skip_info): Adjust to use range-for and getters.
6301         (skip_enable_command, skip_disable_command): Adjust to use
6302         range-for and setters.
6303         (skip_delete_command): Adjust to use std::list.
6304         (add_skiplist_entry): Delete.
6305         (skip_file_p): Delete, refactored as ...
6306         (skiplist_entry::do_skip_file_p): ... this new method.
6307         (skip_gfile_p): Delete, refactored as ...
6308         (skiplist_entry::do_gskip_file_p): ... this new method.
6309         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6310         (skiplist_entry::skip_function_p): ... this new method.
6311         (function_name_is_marked_for_skip): Now returns bool, and takes
6312         the function sal by const reference.  Adjust to use range-for and
6313         skiplist_entry methods.
6314         (_initialize_step_skip): Remove references to
6315         skiplist_entry_chain, skiplist_entry_count.
6316         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6317         takes the function sal by const reference.
6318
6319 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6320
6321         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6322         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6323         (dwarf2_frame_cache):
6324         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6325         RETURN_MASK_ALL and set *this_case to NULL.
6326         * frame-unwind.h: Update comments.
6327
6328 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6329
6330         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6331         (dwarf2_frame_state_copy_regs): Remove.
6332         (dwarf2_frame_state_free_regs): Remove.
6333         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6334         (dwarf2_restore_rule): Call method .alloc_regs instead of
6335         dwarf2_frame_state_alloc_regs.
6336         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6337         constructor.  Call std::move.
6338         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6339         (dwarf2_frame_cache): Likewise.
6340
6341         [GDB_SELF_TEST]: Include selftest.h and
6342         selftest-arch.h.
6343         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6344         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6345         execute_cfa_program_test.
6346
6347         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6348         copy ctor, assignment operator, move assignment.
6349         <alloc_regs>: New method.
6350         <swap>: New method.
6351         (struct dwarf2_frame_state): Delete dtor.
6352         (dwarf2_frame_state_alloc_regs): Remove declaration.
6353         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6354         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6355
6356 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6357
6358         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6359         (dwarf2_frame_state::dwarf2_frame_state): New.
6360         (dwarf2_frame_state::~dwarf2_frame_state): New.
6361         (dwarf2_fetch_cfa_info): Update.
6362         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6363         rather than a pointer.  Update code.
6364         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6365         dtor.
6366         <data_align, code_align, retaddr_column>: Change them to const.
6367         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6368         to bool.
6369
6370 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6371
6372         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6373         <loc.exp>: New field.
6374         * dwarf2-frame.c (execute_cfa_program): Update.
6375         (dwarf2_frame_prev_register): Update.
6376
6377 2017-08-10  Pedro Alves  <palves@redhat.com>
6378
6379         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6380
6381 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6382
6383         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6384         (fbsd_pending_children): Use std::list.
6385         (fbsd_remember_child): Likewise.
6386         (fbsd_is_child_pending): Likewise.
6387         (fbsd_pending_vfork_done): Use std::forward_list.
6388         (fbsd_add_vfork_done): Likewise.
6389         (fbsd_is_vfork_done_pending): Likewise.
6390         (fbsd_next_vfork_done): Likewise.
6391
6392 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6393
6394         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6395         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6396         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6397         for `mapfilename'.
6398         (fbsd_xfer_partial): Use gdb::byte_vector.
6399         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6400
6401 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6402
6403         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6404         "filestuff.h".
6405         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6406
6407 2017-08-09  Tom Tromey  <tom@tromey.com>
6408
6409         * skip.c (skiplist_entry): New constructor.
6410         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6411         (skiplist_entry::file_is_glob): Now bool.
6412         (skiplist_entry::file, skiplist_entry::function): Now
6413         std::string.
6414         (make_skip_entry): Return a unique_ptr.  Use new.
6415         (free_skiplist_entry, free_skiplist_entry_cleanup)
6416         (make_free_skiplist_entry_cleanup): Remove.
6417         (skip_command, skip_disable_command, add_skiplist_entry)
6418         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6419         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6420         (function_name_is_marked_for_skip): Update.
6421         (skip_delete_command): Update.  Use delete.
6422
6423 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6424
6425         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6426         (aarch64_linux_core_read_description): New function.
6427         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6428
6429 2017-08-09  Pedro Alves  <palves@redhat.com>
6430
6431         * cp-name-parser.y (cp_comp_to_string): Return a
6432         gdb::unique_xmalloc_ptr<char>.
6433         * cp-support.c (replace_typedefs_qualified_name)
6434         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6435         (cp_canonicalize_string_full): Use op= instead of explicit
6436         convertion.
6437         (cp_class_name_from_physname, method_name_from_physname)
6438         (cp_func_name, cp_remove_params): Adjust to use
6439         gdb::unique_xmalloc_ptr<char>.
6440         * cp-support.h (cp_comp_to_string): Return a
6441         gdb::unique_xmalloc_ptr<char>.
6442         * python/py-type.c (typy_lookup_type): Adjust to use
6443         gdb::unique_xmalloc_ptr<char>.
6444
6445 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6446
6447         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6448
6449 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6450             Yao Qi  <yao.qi@linaro.org>
6451
6452         * cp-support.c (cp_canonicalize_string_full): Use
6453         gdb::unique_xmalloc_ptr<char>.
6454         (cp_canonicalize_string): Likewise.
6455
6456 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6457
6458         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6459         * regformats/i386/amd64-avx-avx512.dat: Remove.
6460         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6461         * regformats/i386/amd64-avx-mpx.dat:Remove.
6462         * regformats/i386/amd64-avx.dat: Remove.
6463         * regformats/i386/amd64-mpx.dat: Remove.
6464         * regformats/i386/i386-avx-avx512.dat: Remove.
6465         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6466         * regformats/i386/i386-avx-mpx.dat: Remove.
6467         * regformats/i386/i386-mmx.dat: Remove.
6468         * regformats/i386/i386-mpx.dat: Remove.
6469
6470 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6471
6472         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6473         * amd64-tdep.c: Don't include features/i386/x32*.c.
6474         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6475         functions.
6476         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6477         and i386/x32-avx-avx512.
6478         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6479         and i386/x32.xml.
6480         * features/i386/x32-avx-avx512.c: Removed.
6481         * features/i386/x32-avx-avx512.xml: Removed.
6482         * features/i386/x32-avx.c: Removed.
6483         * features/i386/x32-avx.xml: Removed.
6484         * features/i386/x32.c: Removed.
6485         * features/i386/x32.xml: Removed.
6486         * regformats/i386/x32-avx-avx512.dat: Removed.
6487         * regformats/i386/x32-avx.dat: Removed.
6488         * regformats/i386/x32.dat: Removed.
6489
6490 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6491
6492         PR breakpoints/21886
6493         * mem-break.c (default_memory_insert_breakpoint): Use
6494         `->placed_address' rather than `->reqstd_address' for the
6495         breakpoint location.
6496
6497 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6498
6499         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6500         assertions.
6501
6502 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6503
6504         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6505         a union of `tdep_info', `tdesc_data' and `id'.
6506         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6507         rather than `info.tdep_info'.
6508         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6509         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6510         * i386-tdep.c (i386_gdbarch_init): Likewise.
6511         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6512         * mips-tdep.c (mips_gdbarch_init): Likewise.
6513         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6514         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6515         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6516         `info.tdep_info'.
6517         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6518         `info.tdep_info'.
6519         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6520         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6521         `info.tdep_info'.
6522         * spu-tdep.c (spu_gdbarch_init): Likewise.
6523         * gdbarch.h: Regenerate.
6524
6525 2017-08-07  Leszek Swirski  <leszeks@google.com>
6526
6527         PR symtab/20899
6528         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6529
6530 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6531
6532         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6533         (gdbsim_open): Rename gdb_argv args object to argv.
6534
6535 2017-08-05  Tom Tromey  <tom@tromey.com>
6536
6537         * compile/compile-object-load.c (compile_object_load): Use
6538         gdb::unique_xmalloc_ptr.
6539         * cli/cli-dump.c (scan_filename): Rename from
6540         scan_filename_with_cleanup.  Change return type.
6541         (scan_expression): Rename from scan_expression_with_cleanup.
6542         Change return type.
6543         (dump_memory_to_file, dump_value_to_file, restore_command):
6544         Use gdb::unique_xmalloc_ptr.  Update.
6545         * cli/cli-cmds.c (find_and_open_script): Use
6546         gdb::unique_xmalloc_ptr.
6547         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6548         * symmisc.c (maintenance_print_symbols)
6549         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6550         * symfile.c (symfile_bfd_open, generic_load)
6551         (add_symbol_file_command, remove_symbol_file_command): Use
6552         gdb::unique_xmalloc_ptr.
6553         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6554         * psymtab.c (maintenance_print_psymbols): Use
6555         gdb::unique_xmalloc_ptr.
6556         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6557         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6558         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6559         (reload_shared_libraries_1): Likewise.
6560
6561 2017-08-05  Tom Tromey  <tom@tromey.com>
6562
6563         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6564         (rust_op_vector, rust_set_vector): New typedefs.
6565         (current_parser): New global.
6566         (work_obstack): Change to pointer type.  Update all users.
6567         (rust_ast, pstate): Remove globals.
6568         (struct rust_parser): New.
6569         (%union) <params, field_inits>: Change type.
6570         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6571         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6572         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6573         (convert_params_to_types, convert_params_to_expression): Change
6574         type of "params".
6575         (ast_string): Change type of "fields".
6576         (rust_parse): Make a rust_parser.  Remove cleanups.
6577         (rust_lex_tests): Make and install an auto_obstack.
6578
6579 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6580
6581         * configure.srv (ipa_x32_linux_regobj): New.
6582         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6583         instead of X86_TDESC_AVX512.
6584         (initialize_low_tracepoint): Call
6585         init_registers_x32_avx_avx512_linux.
6586
6587 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6588
6589         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6590
6591 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6592
6593         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6594
6595 2017-08-03  Tom Tromey  <tom@tromey.com>
6596
6597         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6598         Remove.
6599         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6600
6601 2017-08-03  Tom Tromey  <tom@tromey.com>
6602
6603         * python/py-param.c (compute_enum_values): Use gdb_argv.
6604
6605 2017-08-03  Tom Tromey  <tom@tromey.com>
6606
6607         * utils.h (struct gdb_argv_deleter): New.
6608         (gdb_argv): New class.
6609         * utils.c (gdb_argv::reset): New method.
6610         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6611         * tracefile.c (tsave_command): Use gdb_argv.
6612         * top.c (new_ui_command): Use gdb_argv.
6613         * symmisc.c (maintenance_print_symbols)
6614         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6615         * symfile.c (symbol_file_command, generic_load)
6616         (remove_symbol_file_command): Use gdb_argv.
6617         * stack.c (backtrace_command): Use gdb_argv.
6618         * source.c (add_path, show_substitute_path_command)
6619         (unset_substitute_path_command, set_substitute_path_command):
6620         Use gdb_argv.
6621         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6622         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6623         * remote.c (extended_remote_run, remote_put_command)
6624         (remote_get_command, remote_delete_command): Use gdb_argv.
6625         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6626         (gdbsim_open): Use gdb_argv.
6627         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6628         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6629         * procfs.c (procfs_info_proc): Use gdb_argv.
6630         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6631         * infrun.c (handle_command): Use gdb_argv.
6632         * inferior.c (add_inferior_command, clone_inferior_command):
6633         Use gdb_argv.
6634         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6635         * exec.c (exec_file_command): Use gdb_argv.
6636         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6637         * compile/compile.c (build_argc_argv): Use gdb_argv.
6638
6639 2017-08-03  Tom Tromey  <tom@tromey.com>
6640
6641         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6642
6643 2017-08-03  Tom Tromey  <tom@tromey.com>
6644
6645         * python/python.c (compute_python_string): Return std::string.
6646         (gdbpy_eval_from_control_command): Update.
6647         (do_start_initialization): Use std::string.
6648         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6649         xstrprintf.
6650         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6651         xstrprintf.
6652
6653 2017-08-03  Tom Tromey  <tom@tromey.com>
6654
6655         * top.h (do_restore_instream_cleanup): Remove.
6656         * top.c (do_restore_instream_cleanup): Remove.
6657         (read_command_file): Use scoped_restore.
6658         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6659
6660 2017-08-03  Tom Tromey  <tom@tromey.com>
6661
6662         * cli/cli-script.c (execute_user_command)
6663         (execute_control_command): Use scoped_restore.
6664
6665 2017-08-03  Tom Tromey  <tom@tromey.com>
6666
6667         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6668         (execute_user_command): Remove user_call_depth; use
6669         user_args_stack's size instead.
6670
6671 2017-08-03  Tom Tromey  <tom@tromey.com>
6672
6673         * top.h (in_user_command): Remove.
6674         * top.c (in_user_command): Remove.
6675         * cli/cli-script.c (do_restore_user_call_depth)
6676         (execute_user_command): Update.
6677
6678 2017-08-03  Tom Tromey  <tom@tromey.com>
6679
6680         * valops.c (search_struct_method): Use gdb::byte_vector.
6681         * valarith.c (value_concat): Use std::vector.
6682         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6683         (simple_search_memory): Likewise.
6684         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6685         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6686         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6687         * elfread.c (elf_rel_plt_read): Use std::string.
6688         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6689         * cli/cli-dump.c (restore_section_callback): Use
6690         gdb::byte_vector.
6691
6692 2017-08-03  Tom Tromey  <tom@tromey.com>
6693
6694         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6695
6696 2017-08-03  Tom Tromey  <tom@tromey.com>
6697
6698         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6699         (tui_register_format): Use scoped_restore.
6700
6701 2017-08-03  Tom Tromey  <tom@tromey.com>
6702
6703         * reverse.c (exec_direction_default): Remove.
6704         (exec_reverse_once): Use scoped_restore.
6705         * remote.c (restore_remote_timeout): Remove.
6706         (remote_flash_erase, remote_flash_write, remote_flash_done)
6707         (readchar, remote_serial_write): Use scoped_restore.
6708         * cli/cli-script.c (struct source_cleanup_lines_args)
6709         (source_cleanup_lines): Remove.
6710         (script_from_file): Use scoped_restore.
6711         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6712         (source_command): Use scoped_restore.
6713
6714 2017-08-03  Tom Tromey  <tom@tromey.com>
6715
6716         * utils.h (make_cleanup_free_so): Remove.
6717         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6718         * solist.h (struct so_deleter): New.
6719         (so_list_up): New typedef.
6720         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6721
6722 2017-08-03  Tom Tromey  <tom@tromey.com>
6723
6724         * utils.h (make_cleanup_restore_current_language): Remove.
6725         * utils.c (do_restore_current_language)
6726         (make_cleanup_restore_current_language): Remove.
6727         * parse.c (parse_exp_in_context_1)
6728         (parse_expression_with_language): Use
6729         scoped_restore_current_language.
6730         * mi/mi-main.c (mi_cmd_execute): Use
6731         scoped_restore_current_language.
6732         * language.h (scoped_restore_current_language): New class.
6733
6734 2017-08-03  Tom Tromey  <tom@tromey.com>
6735
6736         * compile/compile.c (cleanup_unlink_file): Remove.
6737         (compile_to_object): Use gdb::unlinker.
6738         (eval_compile_command): Likewise.
6739
6740 2017-08-03  Tom Tromey  <tom@tromey.com>
6741
6742         * utils.h (make_cleanup_fclose): Remove.
6743         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6744
6745 2017-08-03  Tom Tromey  <tom@tromey.com>
6746
6747         * top.c (open_terminal_stream): Return gdb_file_up.
6748         (new_ui_command): Update.
6749
6750 2017-08-03  Tom Tromey  <tom@tromey.com>
6751
6752         * source.c (print_source_lines_base, forward_search_command)
6753         (reverse_search_command): Use gdb_file_up.
6754
6755 2017-08-03  Tom Tromey  <tom@tromey.com>
6756
6757         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6758
6759 2017-08-03  Tom Tromey  <tom@tromey.com>
6760
6761         * cli/cli-cmds.c (find_and_open_script): Change return type.
6762         Remove "streamp" and "full_path" parameters.
6763         (source_script_with_search): Update.
6764         * auto-load.c (source_script_file): Update.
6765         * cli/cli-cmds.h (find_and_open_script): Change type.
6766         (open_script): New struct.
6767
6768 2017-08-03  Tom Tromey  <tom@tromey.com>
6769
6770         * xml-support.c (xml_fetch_content_from_file): Update.
6771         * ui-file.c (stdio_file::open): Update.
6772         * tracefile-tfile.c (tfile_start): Update.
6773         * remote.c (remote_file_put, remote_file_get): Update.
6774         * nat/linux-procfs.c (linux_proc_get_int)
6775         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6776         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6777         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6778         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6779         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6780         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6781         * linux-nat.c (linux_proc_pending_signals): Update.
6782         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6783         (file_closer): Remove.
6784         * compile/compile.c (compile_to_object): Update.
6785         * common/filestuff.h (struct gdb_file_deleter): New.
6786         (gdb_file_up): New typedef.
6787         (gdb_fopen_cloexec): Change return type.
6788         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6789         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6790         (dump_binary_file, restore_binary_file): Update.
6791         * auto-load.c (auto_load_objfile_script_1): Update.
6792
6793 2017-08-03  Tom Tromey  <tom@tromey.com>
6794
6795         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6796         (info_static_tracepoint_markers_command): Likewise.
6797         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6798         * skip.c (skip_info): Use ui_out_emit_table.
6799         * progspace.c (print_program_space): Use ui_out_emit_table.
6800         * osdata.c (info_osdata): Use ui_out_emit_table.
6801         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6802         ui_out_emit_table.
6803         * linux-thread-db.c (info_auto_load_libthread_db): Use
6804         ui_out_emit_table.
6805         * inferior.c (print_inferior): Use ui_out_emit_table.
6806         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6807         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6808         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6809         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6810         * ui-out.h (class ui_out_emit_table): New.
6811
6812 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6813
6814         * mips-tdep.c (mips_fpu_type_str): New function.
6815         (mips_dump_tdep): Call it.
6816
6817 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6818
6819         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6820         `->mips_fpu_type'.
6821
6822 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6823
6824         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6825
6826 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6827
6828         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6829
6830 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6831
6832         * cli/cli-cmds.c (maintenancechecklist): New variable.
6833         * gdbcmd.h (maintenancechecklist): Declare it.
6834         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6835         Call i386_linux_read_description with different masks.
6836         * maint.c (maintenance_check_command): New function.
6837         (_initialize_maint_cmds): Call add_prefix_cmd.
6838         * target-descriptions.c (tdesc_reg): override operator != and ==.
6839         (tdesc_type): Likewise.
6840         (tdesc_feature): Likewise.
6841         (target_desc): Likewise.
6842         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6843         (maintenance_check_xml_descriptions): New function.
6844         (_initialize_target_descriptions) Add command "xml-descriptions".
6845         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6846
6847 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6848
6849         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6850         Include features/i386/32bit-*.c.
6851         (i386_linux_read_description): Generate target description if it
6852         doesn't exist.
6853         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6854         functions.
6855         * features/i386/32bit-linux.c: Re-generated.
6856         * features/i386/32bit-sse.c: Likewise.
6857         * target-descriptions.c (print_c_feature::visit): Print code to
6858         set register number if needed.
6859         (print_c_feature) <m_next_regnum>: New field.
6860
6861 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6862
6863         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6864         (FEATURE_XMLFILES): New.
6865         (FEATURE_CFILES): New.
6866         New rules.
6867         (clean-cfiles): Remove generated c files.
6868         * features/i386/32bit-avx.c: Generated.
6869         * features/i386/32bit-avx512.c: Generated.
6870         * features/i386/32bit-core.c: Generated.
6871         * features/i386/32bit-linux.c: Generated.
6872         * features/i386/32bit-mpx.c: Generated.
6873         * features/i386/32bit-pkeys.c: Generated.
6874         * features/i386/32bit-sse.c: Generated.
6875         * target-descriptions.c: Include algorithm.
6876         (tdesc_element_visitor): Add method visit_end.
6877         (print_c_tdesc): Implement visit_end.
6878         (print_c_tdesc:: m_filename_after_features): Move it to
6879         protected.
6880         (print_c_feature): New class.
6881         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6882         name starts with "i386/32bit-".
6883
6884 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6885
6886         * target-descriptions.c (tdesc_element_visitor): New class.
6887         (tdesc_element): New class.
6888         (tdesc_reg): Inherit from tdesc_element.
6889         (tdesc_reg::accept): New function.
6890         (tdesc_type): Inherit from tdesc_element.
6891         (tdesc_type::accept): New function.
6892         (tdesc_feature): Inherit from tdesc_element.
6893         (tdesc_feature::accept): New function.
6894         (target_desc): Inherit from tdesc_element.
6895         (target_desc::target_desc): New.
6896         (target_desc::~target_desc): New.
6897         (target_desc::accept): New.
6898         (allocate_target_description): Use new.
6899         (free_target_description): Use delete.
6900         (print_c_tdesc): New class.
6901         (maint_print_c_tdesc_cmd): Adjust.
6902
6903         * features/aarch64.c: Re-generated.
6904         * features/arc-arcompact.c: Re-generated.
6905         * features/arc-v2.c: Re-generated.
6906         * features/arm/arm-with-iwmmxt.c: Re-generated.
6907         * features/arm/arm-with-m.c: Re-generated.
6908         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6909         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6910         * features/arm/arm-with-neon.c: Re-generated.
6911         * features/arm/arm-with-vfpv2.c: Re-generated.
6912         * features/arm/arm-with-vfpv3.c: Re-generated.
6913         * features/i386/amd64-avx-avx512.c: Re-generated.
6914         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6915         * features/i386/amd64-avx.c: Re-generated.
6916         * features/i386/amd64-avx-linux.c: Re-generated.
6917         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6918         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6919         * features/i386/amd64-avx-mpx.c: Re-generated.
6920         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6921         * features/i386/amd64.c: Re-generated.
6922         * features/i386/amd64-linux.c: Re-generated.
6923         * features/i386/amd64-mpx.c: Re-generated.
6924         * features/i386/amd64-mpx-linux.c: Re-generated.
6925         * features/i386/i386-avx-avx512.c: Re-generated.
6926         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6927         * features/i386/i386-avx.c: Re-generated.
6928         * features/i386/i386-avx-linux.c: Re-generated.
6929         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6930         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6931         * features/i386/i386-avx-mpx.c: Re-generated.
6932         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6933         * features/i386/i386.c: Re-generated.
6934         * features/i386/i386-linux.c: Re-generated.
6935         * features/i386/i386-mmx.c: Re-generated.
6936         * features/i386/i386-mmx-linux.c: Re-generated.
6937         * features/i386/i386-mpx.c: Re-generated.
6938         * features/i386/i386-mpx-linux.c: Re-generated.
6939         * features/i386/x32-avx-avx512.c: Re-generated.
6940         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6941         * features/i386/x32-avx.c: Re-generated.
6942         * features/i386/x32-avx-linux.c: Re-generated.
6943         * features/i386/x32.c: Re-generated.
6944         * features/i386/x32-linux.c: Re-generated.
6945         * features/microblaze.c: Re-generated.
6946         * features/microblaze-with-stack-protect.c: Re-generated.
6947         * features/mips64-dsp-linux.c: Re-generated.
6948         * features/mips64-linux.c: Re-generated.
6949         * features/mips-dsp-linux.c: Re-generated.
6950         * features/mips-linux.c: Re-generated.
6951         * features/nds32.c: Re-generated.
6952         * features/nios2.c: Re-generated.
6953         * features/nios2-linux.c: Re-generated.
6954         * features/rs6000/powerpc-32.c: Re-generated.
6955         * features/rs6000/powerpc-32l.c: Re-generated.
6956         * features/rs6000/powerpc-403.c: Re-generated.
6957         * features/rs6000/powerpc-403gc.c : Re-generated.
6958         * features/rs6000/powerpc-405.c: Re-generated.
6959         * features/rs6000/powerpc-505.c: Re-generated.
6960         * features/rs6000/powerpc-601.c: Re-generated.
6961         * features/rs6000/powerpc-602.c: Re-generated.
6962         * features/rs6000/powerpc-603.c: Re-generated.
6963         * features/rs6000/powerpc-604.c: Re-generated.
6964         * features/rs6000/powerpc-64.c: Re-generated.
6965         * features/rs6000/powerpc-64l.c: Re-generated.
6966         * features/rs6000/powerpc-7400.c: Re-generated.
6967         * features/rs6000/powerpc-750.c: Re-generated.
6968         * features/rs6000/powerpc-860.c: Re-generated.
6969         * features/rs6000/powerpc-altivec32.c: Re-generated.
6970         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6971         * features/rs6000/powerpc-altivec64.c: Re-generated.
6972         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6973         * features/rs6000/powerpc-cell32l.c: Re-generated.
6974         * features/rs6000/powerpc-cell64l.c: Re-generated.
6975         * features/rs6000/powerpc-e500.c: Re-generated.
6976         * features/rs6000/powerpc-e500l.c: Re-generated.
6977         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6978         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6979         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6980         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6981         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6982         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6983         * features/rs6000/powerpc-vsx32.c: Re-generated.
6984         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6985         * features/rs6000/powerpc-vsx64.c: Re-generated.
6986         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6987         * features/rs6000/rs6000.c: Re-generated.
6988         * features/s390-linux32.c: Re-generated.
6989         * features/s390-linux32v1.c: Re-generated.
6990         * features/s390-linux32v2.c: Re-generated.
6991         * features/s390-linux64.c: Re-generated.
6992         * features/s390-linux64v1.c: Re-generated.
6993         * features/s390-linux64v2.c: Re-generated.
6994         * features/s390-te-linux64.c: Re-generated.
6995         * features/s390-tevx-linux64.c: Re-generated.
6996         * features/s390-vx-linux64.c: Re-generated.
6997         * features/s390x-linux64.c: Re-generated.
6998         * features/s390x-linux64v1.c: Re-generated.
6999         * features/s390x-linux64v2.c: Re-generated.
7000         * features/s390x-te-linux64.c: Re-generated.
7001         * features/s390x-tevx-linux64.c: Re-generated.
7002         * features/s390x-vx-linux64.c: Re-generated.
7003         * features/sparc/sparc32-solaris.c: Re-generated.
7004         * features/sparc/sparc64-solaris.c: Re-generated.
7005         * features/tic6x-c62x.c: Re-generated.
7006         * features/tic6x-c62x-linux.c: Re-generated.
7007         * features/tic6x-c64x.c: Re-generated.
7008         * features/tic6x-c64x-linux.c: Re-generated.
7009         * features/tic6x-c64xp.c: Re-generated.
7010         * features/tic6x-c64xp-linux.c: Re-generated.
7011
7012 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7013
7014         * i386-linux-tdep.c (i386_linux_read_description): New function.
7015         (i386_linux_core_read_description): Call
7016         i386_linux_read_description.
7017         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7018         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7019         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7020         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7021         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7022         * x86-linux-nat.c (x86_linux_read_description): Call
7023         i386_linux_read_description.
7024
7025 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7026
7027         * NEWS: Mention it.
7028         * features/Makefile (%.c: %.xml): Pass the xml file name to
7029         command "maint print c-tdesc".
7030         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7031         name from 'arg'.
7032
7033 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7034
7035         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7036         in-class initialization.
7037         (tdesc_create_feature): Call new instead of XCNEW.
7038         (free_target_description): Ue delete.
7039
7040 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7041
7042         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7043
7044 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7045
7046         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7047         constant.
7048         (amd64_x32_init_abi): Likewise.
7049         * amd64-tdep.h (amd64_init_abi): Update declaration.
7050         (amd64_x32_init_abi): Likewise.
7051
7052 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7053
7054         PR tdep/21717
7055         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7056         condition for FPSCR.
7057         (arm_linux_store_inferior_registers): Likewise.
7058
7059 2017-07-22  Tom Tromey  <tom@tromey.com>
7060
7061         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7062         <syscalls_counts>: Now a std::vector.
7063         (get_catch_syscall_inferior_data): Use "new".
7064         (catch_syscall_inferior_data_cleanup): Use "delete".
7065         (insert_catch_syscall, remove_catch_syscall)
7066         (clear_syscall_counts): Update.
7067
7068 2017-07-22  Tom Tromey  <tom@tromey.com>
7069
7070         * break-catch-syscall.c (syscall_catchpoint)
7071         <syscalls_to_be_caught>: Now a std::vector<int>
7072         (~syscall_catchpoint): Remove.
7073         (insert_catch_syscall, remove_catch_syscall)
7074         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7075         (print_mention_catch_syscall, print_recreate_catch_syscall):
7076         Update.
7077         (create_syscall_event_catchpoint): Change type of "filter"
7078         parameter.
7079         (catch_syscall_split_args): Return a std::vector.
7080         (catch_syscall_command_1, catching_syscall_number_1): Update.
7081
7082 2017-07-22  Tom Tromey  <tom@tromey.com>
7083
7084         * break-catch-throw.c (struct exception_catchpoint)
7085         <exception_rx>: Now a std::string.
7086         (~exception_catchpoint): Remove.
7087         (print_one_detail_exception_catchpoint): Update.
7088         (handle_gnu_v3_exceptions): Change type of except_rx.
7089         (extract_exception_regexp): Return a std::string.
7090         (catch_exception_command_1): Update.
7091
7092 2017-07-22  Tom Tromey  <tom@tromey.com>
7093
7094         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7095         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7096         std::vector.
7097         <catch_all>: Now a bool.
7098         (~signal_catchpoint): Remove.
7099         (signal_catchpoint_insert_location)
7100         (signal_catchpoint_remove_location)
7101         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7102         (signal_catchpoint_print_mention)
7103         (signal_catchpoint_print_recreate)
7104         (signal_catchpoint_explains_signal): Update.
7105         (create_signal_catchpoint): Change type of "filter" and
7106         "catch_all".
7107         (catch_signal_split_args): Return a std::vector.  Change type of
7108         "catch_all".
7109         (catch_signal_command): Update.
7110
7111 2017-07-20  Pedro Alves  <palves@redhat.com>
7112
7113         * ada-lang.c (ada_language_defn): Make extern.
7114         (_initialize_ada_language): Remove add_language call.
7115         * c-lang.c (c_language_defn, cplus_language_defn)
7116         (asm_language_defn, minimal_language_defn): Make extern.
7117         (_initialize_c_language): Delete.
7118         * completer.c (compare_cstrings): Delete, moved to utils.h.
7119         * d-lang.c (d_language_defn): Make extern.
7120         (_initialize_d_language): Remove add_language calls.
7121         * defs.h (enum language): Add comment.
7122         * f-lang.c (f_language_defn): Make extern.
7123         (_initialize_f_language): Remove add_language call.
7124         * go-lang.c (go_language_defn): Make extern.
7125         (_initialize_go_language): Remove add_language call.
7126         * language.c: Include <algorithm>.
7127         (languages): Redefine as const array.
7128         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7129         (set_language_command): Handle "local".  Use for-range loop.
7130         (set_language): Remove loop.
7131         (language_enum): Rewrite.
7132         (language_def, language_str): Remove loops.
7133         (add_language): Delete.
7134         (add_set_language_command): New, based on add_languages.
7135         (skip_language_trampoline): Adjust.
7136         (local_language_defn): Delete.
7137         (language_gdbarch_post_init): Adjust.
7138         (_initialize_language): Remove add_language calls.  Call
7139         add_set_language_command.
7140         * language.h (add_language): Delete.
7141         (auto_language_defn)
7142         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7143         (asm_language_defn, c_language_defn, cplus_language_defn)
7144         (d_language_defn, f_language_defn, go_language_defn)
7145         (m2_language_defn, objc_language_defn, opencl_language_defn)
7146         (pascal_language_defn, rust_language_defn): Declare.
7147         * m2-lang.c (m2_language_defn): Make extern.
7148         (_initialize_m2_language): Remove add_language call.
7149         * objc-lang.c (objc_language_defn): Make extern.
7150         (_initialize_objc_language): Remove add_language call.
7151         * opencl-lang.c (opencl_language_defn): Make extern.
7152         (_initialize_opencl_language): Remove add_language call.
7153         * p-lang.c (pascal_language_defn): Make extern.
7154         (_initialize_pascal_language): Delete.
7155         * rust-lang.c (rust_language_defn): Make extern.
7156         (_initialize_rust_language): Delete.
7157         * utils.h (compare_cstrings): New static inline function.
7158
7159 2017-07-20  Pedro Alves  <palves@redhat.com>
7160
7161         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7162         (get_var_value): Constify parameters.
7163         (get_int_var_value): Change prototype.
7164         (to_fixed_range_type): Adjust.
7165         * ada-lang.h (get_int_var_value): Change prototype.
7166
7167 2017-07-20  Pedro Alves  <palves@redhat.com>
7168
7169         * dwarf2read.c (dw2_lookup_symbol): Use
7170         SYMBOL_MATCHES_SEARCH_NAME.
7171         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7172
7173 2017-07-20  Pedro Alves  <palves@redhat.com>
7174
7175         * block.c (block_iter_name_step, block_iter_name_first)
7176         (block_iter_name_next): Delete.
7177         (block_lookup_symbol_primary): Adjust to use
7178         dict_iter_match_first/dict_iter_match_next.
7179         * block.h (block_iter_name_first, block_iter_name_next): Delete
7180         declarations.
7181         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7182         dict_iter_match_first/dict_iter_match_next.
7183
7184 2017-07-20  Pedro Alves  <palves@redhat.com>
7185
7186         * cp-support.c (cp_find_first_component_aux): Add missing case for
7187         end of string.
7188
7189 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7190
7191         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7192         of dwo_cu's dwo_file.
7193
7194 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7195
7196         * remote.c (store_registers_using_G): Remove one line comment.
7197
7198 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7199
7200         * regcache.c (regcache_cpy): Simplify it.
7201         (regcache::cpy_no_passthrough): Remove it.
7202         * regcache.h (cpy_no_passthrough): Remove it.
7203         (regcache_dup, regcache_cpy): Update comments.
7204
7205 2017-07-18  Pedro Alves  <palves@redhat.com>
7206
7207         * remote-sim.c (sim_command_completer): Adjust to work with a
7208         completion_tracker instead of a VEC.
7209
7210 2017-07-17  Pedro Alves  <palves@redhat.com>
7211
7212         * completer.c (complete_source_filenames): New function.
7213         (complete_address_and_linespec_locations): New function.
7214         (location_completer): Use complete_address_and_linespec_locations.
7215         (completion_tracker::build_completion_result): Honor the tracker's
7216         request to suppress append.
7217         * completer.h (completion_tracker::suppress_append_ws)
7218         (completion_tracker::set_suppress_append_ws): New methods.
7219         (completion_tracker::m_suppress_append_ws): New field.
7220         (complete_source_filenames): New declaration.
7221         * linespec.c (linespec_complete_what): New.
7222         (struct ls_parser) <complete_what, completion_word,
7223         completion_quote_char, completion_quote_end, completion_tracker>:
7224         New fields.
7225         (string_find_incomplete_keyword_at_end): New.
7226         (linespec_lexer_lex_string): Record quote char.  If in completion
7227         mode, don't throw.
7228         (linespec_lexer_consume_token): Advance the completion word point.
7229         (linespec_lexer_peek_token): Save/restore completion info.
7230         (save_stream_and_consume_token): New.
7231         (set_completion_after_number): New.
7232         (linespec_parse_basic): Set what to complete next depending on
7233         token.  Handle function and label completions specially.
7234         (parse_linespec): Disable objc shortcut in completion mode.  Set
7235         what to complete next depending on token type.  Skip keyword if in
7236         completion mode.
7237         (complete_linespec_component, linespec_complete): New.
7238         * linespec.h (linespec_complete): Declare.
7239
7240 2017-07-17  Pedro Alves  <palves@redhat.com>
7241
7242         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7243         Handle 'operator<' / 'operator<<'.
7244
7245 2017-07-17  Pedro Alves  <palves@redhat.com>
7246
7247         * completer.c (collect_explicit_location_matches): Handle
7248         MATCH_LABEL.
7249         (convert_explicit_location_to_linespec): New, factored out from
7250         ...
7251         (convert_explicit_location_to_sals): ... this.
7252         (complete_label): New.
7253         (linespec_complete_label, find_label_symbols_in_block): New.
7254         (find_label_symbols): Add completion_mode parameter and adjust to
7255         call find_label_symbols_in_block.
7256         * linespec.h (linespec_complete_label): Declare.
7257
7258 2017-07-17  Pedro Alves  <palves@redhat.com>
7259
7260         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7261         complete_symbol_mode parameter.
7262         * cli/cli-cmds.c (complete_command): Get the completion result out
7263         of the handle_brkchars tracker if used a custom word point.
7264         * completer.c: Include "linespec.h".
7265         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7266         (advance_to_expression_complete_word_point): New.
7267         (completion_tracker::completes_to_completion_word): New.
7268         (complete_files_symbols): Pass down
7269         complete_symbol_mode::EXPRESSION.
7270         (explicit_options, probe_options): New.
7271         (collect_explicit_location_matches): Complete on the
7272         explictit_loc->foo instead of word.  Use
7273         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7274         keyword and options completions.
7275         (backup_text_ptr): Delete.
7276         (skip_keyword): New.
7277         (complete_explicit_location): Remove 'word' parameter.  Add
7278         language, quoted_arg_start and quoted_arg_end parameters.
7279         Rewrite, parsing left to right.
7280         (location_completer): Rewrite.
7281         (location_completer_handle_brkchars): New function.
7282         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7283         (enum complete_line_internal_reason): Adjust comments.
7284         (completion_tracker::discard_completions): New.
7285         (completer_handle_brkchars_func_for_completer): Handle
7286         location_completer.
7287         (gdb_custom_word_point_brkchars)
7288         (gdb_org_rl_basic_quote_characters): New.
7289         (gdb_completion_word_break_characters_throw)
7290         (completion_find_completion_word): Handle trackers that use a
7291         custom word point.
7292         (completion_tracker::advance_custom_word_point_by): New.
7293         (completion_tracker::build_completion_result): Don't rely on
7294         readline appending the quote char.
7295         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7296         use a custom word point.
7297         (gdb_rl_attempted_completion_function): Restore
7298         rl_basic_quote_characters.
7299         * completer.h (class completion_tracker): Extend intro comment.
7300         (completion_tracker::set_quote_char)
7301         (completion_tracker::quote_char)
7302         (completion_tracker::set_use_custom_word_point)
7303         (completion_tracker::use_custom_word_point)
7304         (completion_tracker::custom_word_point)
7305         (completion_tracker::set_custom_word_point)
7306         (completion_tracker::advance_custom_word_point_by)
7307         (completion_tracker::completes_to_completion_word)
7308         (completion_tracker::discard_completions): New methods.
7309         (completion_tracker::m_quote_char)
7310         (completion_tracker::m_use_custom_word_point)
7311         (completion_tracker::m_custom_word_point): New fields.
7312         (advance_to_expression_complete_word_point): Declare.
7313         * f-lang.c (f_collect_symbol_completion_matches): Add
7314         complete_symbol_mode parameter.
7315         * language.h (struct language_defn)
7316         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7317         parameter.
7318         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7319         (linespec_complete_function): New function.
7320         (linespec_lexer_lex_keyword): Adjust.
7321         * linespec.h (linespec_keywords, linespec_complete_function): New
7322         declarations.
7323         * location.c (find_end_quote): New function.
7324         (explicit_location_lex_one): Add explicit_completion_info
7325         parameter.  Save quoting info.  Don't throw if being called for
7326         completion.  Don't handle Ada operators here.
7327         (is_cp_operator, skip_op_false_positives, first_of)
7328         (explicit_location_lex_one_function): New function.
7329         (string_to_explicit_location): Replace 'dont_throw' parameter with
7330         an explicit_completion_info pointer parameter.  Handle it.  Don't
7331         use explicit_location_lex_one to lex function names.  Use
7332         explicit_location_lex_one_function instead.
7333         * location.h (struct explicit_completion_info): New.
7334         (string_to_explicit_location): Replace 'dont_throw' parameter with
7335         an explicit_completion_info pointer parameter.
7336         * symtab.c (default_collect_symbol_completion_matches_break_on):
7337         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7338         (default_collect_symbol_completion_matches)
7339         (collect_symbol_completion_matches): Add complete_symbol_mode
7340         parameter.
7341         (collect_symbol_completion_matches_type): Pass down
7342         complete_symbol_mode::EXPRESSION.
7343         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7344         parameter.  Handle LINESPEC mode.
7345         * symtab.h (complete_symbol_mode): New.
7346         (default_collect_symbol_completion_matches_break_on)
7347         (default_collect_symbol_completion_matches)
7348         (collect_symbol_completion_matches)
7349         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7350         parameter.
7351
7352 2017-07-17  Pedro Alves  <palves@redhat.com>
7353
7354         * utils.c (enum class strncmp_iw_mode): New.
7355         (strcmp_iw): Rename to ...
7356         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7357         parameters.  Handle them.
7358         (strncmp_iw): New.
7359         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7360         * utils.h (strncmp_iw): Declare.
7361         (strcmp_iw): Move describing comments here.
7362
7363 2017-07-17  Pedro Alves  <palves@redhat.com>
7364
7365         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7366         CP_OPERATOR_STR.
7367         * c-typeprint.c (is_type_conversion_operator): Use
7368         CP_OPERATOR_STR.
7369         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7370         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7371         CP_OPERATOR_LEN.
7372         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7373         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7374         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7375         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7376         CP_OPERATOR_STR.
7377         * location.c: Include "cp-support.h".
7378         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7379         CP_OPERATOR_STR.
7380         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7381         CP_OPERATOR_LEN.
7382
7383 2017-07-17  Pedro Alves  <palves@redhat.com>
7384
7385         * cli/cli-cmds.c (complete_command): Use a completion tracker
7386         along with completion_find_completion_word for handle_brkchars
7387         phase.
7388         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7389         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7390         (struct gdb_rl_completion_word_info): New.
7391         (gdb_rl_find_completion_word): New.
7392         (completion_find_completion_word): New.
7393         * completer.h (completion_find_completion_word): Declare.
7394
7395 2017-07-17  Pedro Alves  <palves@redhat.com>
7396
7397         * ada-lang.c (symbol_completion_match): Adjust comments.
7398         (symbol_completion_add): Replace vector parameter with
7399         completion_tracker parameter.  Use it.
7400         (ada_make_symbol_completion_list): Rename to...
7401         (ada_collect_symbol_completion_matches): ... this.  Add
7402         completion_tracker parameter and use it.
7403         (ada_language_defn): Adjust.
7404         * break-catch-syscall.c (catch_syscall_completer): Adjust
7405         prototype and work with completion_tracker instead of VEC.
7406         * breakpoint.c (condition_completer): Adjust prototype and work
7407         with completion_tracker instead of VEC.
7408         * c-lang.c (c_language_defn, cplus_language_defn)
7409         (asm_language_defn, minimal_language_defn): Adjust to renames.
7410         * cli/cli-cmds.c (complete_command): Rework using
7411         completion_tracker.  Catch exceptions when completing.
7412         * cli/cli-decode.c (integer_unlimited_completer)
7413         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7414         with completion_tracker instead of VEC.
7415         * command.h (struct completion_tracker): Forward declare.
7416         (completer_ftype, completer_handle_brkchars_ftype): Change
7417         types.
7418         (complete_on_cmdlist, complete_on_enum): Adjust.
7419         * completer.c: Include <algorithm>.
7420         (struct gdb_completer_state): New.
7421         (current_completion): New global.
7422         (readline_line_completion_function): Delete.
7423         (noop_completer, filename_completer)
7424         (filename_completer_handle_brkchars, complete_files_symbols)
7425         (linespec_location_completer): Adjust to work with a
7426         completion_tracker instead of a VEC.
7427         (string_or_empty): New.
7428         (collect_explicit_location_matches): Adjust to work with a
7429         completion_tracker instead of a VEC.
7430         (explicit_location_completer): Rename to ...
7431         (complete_explicit_location): ... this and adjust to work with a
7432         completion_tracker instead of a VEC.
7433         (location_completer): Adjust to work with a completion_tracker
7434         instead of a VEC.
7435         (add_struct_fields): Adjust to work with a completion_list instead
7436         of VEC.
7437         (expression_completer): Rename to ...
7438         (complete_expression): ... this and adjust to work with a
7439         completion_tracker instead of a VEC.  Use complete_files_symbols.
7440         (expression_completer): Reimplement on top of complete_expression.
7441         (symbol_completer): Adjust to work with a completion_tracker
7442         instead of a VEC.
7443         (enum complete_line_internal_reason): Add describing comments.
7444         (complete_line_internal_normal_command): Adjust to work with a
7445         completion_tracker instead of a VEC.
7446         (complete_line_internal): Rename to ...
7447         (complete_line_internal_1): ... this and adjust to work with a
7448         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7449         handle_brkchars phase.
7450         (new_completion_tracker): Delete.
7451         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7452         complete_line_internal_1.
7453         (free_completion_tracker): Delete.
7454         (INITIAL_COMPLETION_HTAB_SIZE): New.
7455         (completion_tracker::completion_tracker)
7456         (completion_tracker::~completion_tracker): New.
7457         (maybe_add_completion): Delete.
7458         (completion_tracker::maybe_add_completion)
7459         (completion_tracker::add_completion)
7460         (completion_tracker::add_completions): New.
7461         (throw_max_completions_reached_error): Delete.
7462         (complete_line): Adjust to work with a completion_tracker instead
7463         of a VEC.  Don't create a completion_tracker_t or check for max
7464         completions here.
7465         (command_completer, command_completer_handle_brkchars)
7466         (signal_completer, reg_or_group_completer_1)
7467         (reg_or_group_completer, default_completer_handle_brkchars):
7468         Adjust to work with a completion_tracker.
7469         (gdb_completion_word_break_characters_throw): New.
7470         (gdb_completion_word_break_characters): Reimplement.
7471         (line_completion_function): Delete.
7472         (completion_tracker::recompute_lowest_common_denominator)
7473         (expand_preserving_ws)
7474         (completion_tracker::build_completion_result)
7475         (completion_result::completion_result)
7476         (completion_result::completion_result)
7477         (completion_result::~completion_result)
7478         (completion_result::completion_result)
7479         (completion_result::release_match_list, compare_cstrings)
7480         (completion_result::sort_match_list)
7481         (completion_result::reset_match_list)
7482         (gdb_rl_attempted_completion_function_throw)
7483         (gdb_rl_attempted_completion_function): New.
7484         * completer.h (completion_list, struct completion_result)
7485         (class completion_tracker): New.
7486         (complete_line): Add completion_tracker parameter.
7487         (readline_line_completion_function): Delete.
7488         (gdb_rl_attempted_completion_function): New.
7489         (noop_completer, filename_completer, expression_completer)
7490         (location_completer, symbol_completer, command_completer)
7491         (signal_completer, reg_or_group_completer): Update prototypes.
7492         (completion_tracker_t, new_completion_tracker)
7493         (make_cleanup_free_completion_tracker): Delete.
7494         (enum maybe_add_completion_enum): Delete.
7495         (maybe_add_completion): Delete.
7496         (throw_max_completions_reached_error): Delete.
7497         * corefile.c (complete_set_gnutarget): Adjust to work with a
7498         completion_tracker instead of a VEC.
7499         * cp-abi.c (cp_abi_completer): Adjust to work with a
7500         completion_tracker instead of a VEC.
7501         * d-lang.c (d_language_defn): Adjust.
7502         * disasm.c (disassembler_options_completer): Adjust to work with a
7503         completion_tracker instead of a VEC.
7504         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7505         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7506         with a completion_tracker instead of a VEC.
7507         (f_language_defn): Adjust.
7508         * go-lang.c (go_language_defn): Adjust.
7509         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7510         Adjust to work with a completion_tracker instead of a VEC.
7511         * infrun.c (handle_completer): Likewise.
7512         * interps.c (interpreter_completer): Likewise.
7513         * interps.h (interpreter_completer): Likewise.
7514         * language.c (unknown_language_defn, auto_language_defn)
7515         (local_language_defn): Adjust.
7516         * language.h (language_defn::la_make_symbol_completion_list):
7517         Rename to ...
7518         (language_defn::la_collect_symbol_completion_matches): ... this
7519         and adjust to work with a completion_tracker instead of a VEC.
7520         * m2-lang.c (m2_language_defn): Adjust.
7521         * objc-lang.c (objc_language_defn): Adjust.
7522         * opencl-lang.c (opencl_language_defn): Adjust.
7523         * p-lang.c (pascal_language_defn): Adjust.
7524         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7525         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7526         with a completion_tracker.
7527         * rust-lang.c (rust_language_defn): Adjust.
7528         * symtab.c (free_completion_list, do_free_completion_list)
7529         (return_val, completion_tracker): Delete.
7530         (completion_list_add_name, completion_list_add_symbol)
7531         (completion_list_add_msymbol, completion_list_objc_symbol)
7532         (completion_list_add_fields, add_symtab_completions): Add
7533         completion_tracker parameter and use it.
7534         (default_make_symbol_completion_list_break_on_1): Rename to...
7535         (default_collect_symbol_completion_matches_break_on): ... this.
7536         Add completion_tracker parameter and use it instead of allocating
7537         a completion tracker here.
7538         (default_make_symbol_completion_list_break_on): Delete old
7539         implementation.
7540         (default_make_symbol_completion_list): Delete.
7541         (default_collect_symbol_completion_matches): New.
7542         (make_symbol_completion_list): Delete.
7543         (collect_symbol_completion_matches): New.
7544         (make_symbol_completion_type): Rename to ...
7545         (collect_symbol_completion_matches_type): ... this.  Add
7546         completion_tracker parameter and use it instead of VEC.
7547         (make_file_symbol_completion_list_1): Rename to...
7548         (collect_file_symbol_completion_matches): ... this.  Add
7549         completion_tracker parameter and use it instead of VEC.
7550         (make_file_symbol_completion_list): Delete.
7551         (add_filename_to_list): Use completion_list instead of a VEC.
7552         (add_partial_filename_data::list): Now a completion_list.
7553         (make_source_files_completion_list): Work with a completion_list
7554         instead of a VEC.
7555         * symtab.h: Include "completer.h".
7556         (default_make_symbol_completion_list_break_on)
7557         (default_make_symbol_completion_list, make_symbol_completion_list)
7558         (make_symbol_completion_type, make_file_symbol_completion_list)
7559         (make_source_files_completion_list): Delete.
7560         (default_collect_symbol_completion_matches_break_on)
7561         (default_collect_symbol_completion_matches)
7562         (collect_symbol_completion_matches)
7563         (collect_symbol_completion_matches_type)
7564         (collect_file_symbol_completion_matches)
7565         (make_source_files_completion_list): New.
7566         * top.c (init_main): Don't install a rl_completion_entry_function
7567         hook.  Install a rl_attempted_completion_function hook instead.
7568         * tui/tui-layout.c (layout_completer): Adjust to work with a
7569         completion_tracker.
7570         * tui/tui-regs.c (tui_reggroup_completer):
7571         * tui/tui-win.c (window_name_completer, focus_completer)
7572         (winheight_completer): Adjust to work with a completion_tracker.
7573         * value.c: Include "completer.h".
7574         (complete_internalvar): Adjust to work with a completion_tracker.
7575         * value.h (complete_internalvar): Likewise.
7576
7577 2017-07-17  Pedro Alves  <palves@redhat.com>
7578
7579         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7580         renames.
7581         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7582         comments to completer_ftype's declaration.
7583         <completer_handle_brkchars>: Change type to
7584         completer_handle_brkchars_ftype.
7585         * command.h (completer_ftype): Add describing comment and give
7586         names to parameters.
7587         (completer_ftype_void): Rename to ...
7588         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7589         (set_cmd_completer_handle_brkchars): Adjust.
7590         * completer.c (filename_completer_handle_brkchars): New function.
7591         (complete_line_internal_normal_command): New function, factored
7592         out from ...
7593         (complete_line_internal): ... here.
7594         (command_completer_handle_brkchars)
7595         (default_completer_handle_brkchars)
7596         (completer_handle_brkchars_func_for_completer): New functions.
7597         * completer.h (set_gdb_completion_word_break_characters): Delete
7598         declaration.
7599         (completer_handle_brkchars_func_for_completer): New declaration.
7600         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7601         completer_handle_brkchars_func_for_completer.
7602
7603 2017-07-17  Pedro Alves  <palves@redhat.com>
7604
7605         * completer.c (symbol_completer): New function, based on
7606         make_symbol_completion_list_fn.
7607         * completer.h (symbol_completer): New declaration.
7608         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7609         * python/py-cmd.c (completers): Adjust.
7610         * symtab.c (make_symbol_completion_list_fn): Delete.
7611         * symtab.h (make_symbol_completion_list_fn): Delete.
7612         * cli/cli-decode.c (add_cmd): Adjust.
7613
7614 2017-07-17  Pedro Alves  <palves@redhat.com>
7615
7616         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7617         * dwarf2read.c: Include "filename-seen-cache.h".
7618         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7619         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7620         * filename-seen-cache.c: New file.
7621         * filename-seen-cache.h: New file.
7622         * symtab.c: Include "filename-seen-cache.h".
7623         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7624         (create_filename_seen_cache, clear_filename_seen_cache)
7625         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7626         to filename-seen-cache.h/filename-seen-cache.c.
7627         (output_source_filename, sources_info)
7628         (maybe_add_partial_symtab_filename)
7629         (make_source_files_completion_list): Adjust to use
7630         filename_seen_cache.
7631
7632 2017-07-17  Pedro Alves  <palves@redhat.com>
7633
7634         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7635         fields.
7636         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7637         dwarf2_debug_sections*)): New.
7638         (dwarf2_per_objfile::dwarf2_per_objfile(const
7639         dwarf2_per_objfile&)): Declare as deleted.
7640         (dwarf2_per_objfile::operator=): Declare as deleted.
7641         (dwarf2_per_objfile::dwarf2_per_objfile)
7642         (dwarf2_per_objfile::~dwarf2_per_objfile)
7643         (dwarf2_per_objfile::free_cached_comp_units): New.
7644         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7645         ctor.  Call dwarf2_per_objfile's ctor manually.
7646         (dwarf2_locate_sections): Deleted/refactored as ...
7647         (dwarf2_per_objfile::locate_sections): ... this new method.
7648         (free_cached_comp_units): Defer to
7649         dwarf2_per_objfile::free_cached_comp_units.
7650         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7651
7652 2017-07-14  Tom Tromey  <tom@tromey.com>
7653
7654         PR rust/21764:
7655         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7656         parameter.
7657         <UNOP_SIZEOF>: Split into separate case.
7658         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7659
7660 2017-07-14  Tom Tromey  <tom@tromey.com>
7661
7662         PR rust/21763:
7663         * symtab.c (symbol_matches_domain): Add language_rust to special
7664         case.
7665         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7666         treat LOC_TYPEDEF symbols as variables.
7667
7668 2017-07-14  Pedro Alves  <palves@redhat.com>
7669
7670         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7671         symtabs matching all symtabs with SRCFILE as file name instead of
7672         only considering the first hit, with lookup_symtab.
7673
7674 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7675
7676         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7677         operator_name parameters.
7678         (gen_expr): Update function call.
7679
7680 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7681
7682         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7683         parameter.
7684         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7685         Likewise.
7686         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7687         parameter, use agent_expr::gdbarch instead, update function
7688         calls.
7689         (locexpr_tracepoint_var_ref): Likewise.
7690         (loclist_tracepoint_var_ref): Likewise.
7691         * ax-gdb.c (gen_trace_static_fields): Likewise.
7692         (gen_traced_pop): Likewise.
7693         (gen_frame_args_address): Likewise.
7694         (gen_frame_locals_address): Likewise.
7695         (gen_var_ref): Likewise.
7696         (gen_struct_ref_recursive): Likewise.
7697         (gen_static_field): Likewise.
7698         (gen_maybe_namespace_elt): Likewise.
7699         (gen_expr): Likewise.
7700         (gen_trace_for_var): Likewise.
7701         (gen_trace_for_expr): Likewise.
7702         (gen_trace_for_return_address): Likewise.
7703
7704 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7705
7706         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7707         parameter.
7708         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7709
7710 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7711
7712         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7713         from ax, update calls.
7714         (gen_usual_arithmetic): Likewise.
7715         (gen_integral_promotions): Likewise.
7716         (gen_bitfield_ref): Likewise.
7717         (gen_primitive_field): Likewise.
7718         (gen_struct_ref_recursive): Likewise.
7719         (gen_struct_ref): Likewise.
7720         (gen_maybe_namespace_elt): Likewise.
7721         (gen_struct_elt_for_reference): Likewise.
7722         (gen_namespace_elt): Likewise.
7723         (gen_aggregate_elt_ref): Likewise.
7724         (gen_expr): Get gdbarch from ax, update calls.
7725         (gen_expr_binop_rest): Likewise.
7726
7727 2017-07-13  Pedro Alves  <palves@redhat.com>
7728
7729         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7730         as default tdesc.
7731         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7732         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7733         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7734         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7735         tdep.
7736         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7737         Get final tdesc from the tdep.
7738         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7739         default tdesc.
7740         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7741         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7742         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7743         Use it as default tdesc.
7744         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7745         down to amd_init_abi.  No longer handle fallback tdesc here.
7746         * amd64-tdep.h (tdesc_x32): Declare.
7747         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7748         parameter.
7749         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7750         as default tdesc.
7751
7752 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7753
7754         * s390-linux-tdep.c (s390_process_record): Add support for
7755         instructions new in arch12.
7756
7757 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7758
7759         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7760         PT_GETFSBASE and PT_GETGSBASE.
7761         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7762         PT_SETGSBASE.
7763
7764 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7765
7766         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7767         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7768         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7769         those rules.
7770         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7771         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7772         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7773         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7774         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7775         * features/i386/amd64.xml: Add 64bit-segments.xml.
7776         * features/i386/amd64-avx-avx512.c: Regenerated.
7777         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7778         * features/i386/amd64-avx-mpx.c: Regenerated.
7779         * features/i386/amd64-avx.c: Regenerated.
7780         * features/i386/amd64-mpx.c: Regenerated.
7781         * features/i386/amd64.c: Regenerated.
7782         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7783         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7784         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7785         * regformats/i386/amd64-avx.dat: Regenerated.
7786         * regformats/i386/amd64-mpx.dat: Regenerated.
7787         * regformats/i386/amd64.dat: Regenerated.
7788
7789 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7790
7791         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7792         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7793
7794 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7795
7796         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7797         unsetenv.
7798         * gnulib/aclocal.m4: Regenerate.
7799         * gnulib/config.in: Regenerate.
7800         * gnulib/configure: Regenerate.
7801         * gnulib/import/Makefile.am: Regenerate.
7802         * gnulib/import/Makefile.in: Regenerate.
7803         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7804         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7805         * gnulib/import/m4/environ.m4: New file.
7806         * gnulib/import/m4/setenv.m4: New file.
7807         * gnulib/import/setenv.c: New file.
7808         * gnulib/import/unsetenv.c: New file.
7809
7810 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7811
7812         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7813         address when op is DW_OP_addr.
7814
7815 2017-07-09  Tom Tromey  <tom@tromey.com>
7816
7817         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7818         check and apply to outer type.
7819
7820 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7821
7822         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7823         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7824         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7825         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7826
7827 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7828
7829         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7830
7831 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7832
7833         * corelow.c (get_core_siginfo): Remove.
7834         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7835         instead of get_core_siginfo.
7836         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7837         * gdbarch.h: Re-generate.
7838         * gdbarch.c: Re-generate.
7839         * linux-tdep.c (linux_core_xfer_siginfo): New.
7840         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7841
7842 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7843
7844         * corelow.c (thread_section_name): Move to ...
7845         * gdbcore.h (thread_section_name): ... here.
7846
7847 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7848
7849         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7850         (struct siginfo32): New.
7851         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7852         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7853         via ptrace(PT_LWPINFO).
7854
7855 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7856
7857         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7858         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7859         (fbsd_get_siginfo_type): New.
7860         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7861         (_initialize_fbsd_tdep): New.
7862
7863 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7864
7865         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7866         a singular dwo_unit*) to support multiple CUs in the same way that
7867         multiple TUs are supported.
7868         (create_cus_hash_table): Replace create_dwo_cu with a function for
7869         parsing multiple CUs from a DWO file.
7870         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7871         create_dwo_cu.
7872         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7873         htab_find, rather than comparing the signature to a singleton CU in
7874         the dwo_file.
7875
7876 2017-07-06  Pedro Alves  <palves@redhat.com>
7877
7878         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7879
7880 2017-07-04  Pedro Alves  <palves@redhat.com>
7881
7882         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7883         * gdbtypes.h (TYPE_STATIC): Delete.
7884         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7885         is_synchronized, is_native>: Delete.
7886         <dummy>: Bump.
7887         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7888         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7889         (TYPE_FN_FIELD_ABSTRACT): Delete.
7890
7891 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7892
7893         * buffer.h (buffer_finish): Fix spelling mistakes.
7894
7895 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7896
7897         * .dir-locals.el: Automatically switch to C-style comments in
7898         versions of Emacs that support the feature.
7899
7900 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7901             Pedro Alves  <palves@redhat.com>
7902
7903         PR cli/21688
7904         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7905         (process_next_line): New variable 'inline_cmd'.
7906         Adjust 'if' clauses for "python", "compile" and "guile" to use
7907         'command_name_equals' and check for '!inline_cmd'.
7908
7909 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7910
7911         PR cli/21688
7912         * cli/cli-script.c (command_name_equals_not_inline): New function.
7913         (process_next_line): Adjust 'if' clauses for "python", "compile"
7914         and "guile" to use command_name_equals_not_inline.
7915
7916 2017-06-29  Pedro Alves  <palves@redhat.com>
7917
7918         * completer.c (expression_completer): Call
7919         linespec_location_completer instead of location_completer.
7920
7921 2017-06-29  Pedro Alves  <palves@redhat.com>
7922
7923         * completer.c (expression_completer): Remove code that recomputes
7924         'text' from 'word'.
7925
7926 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7927
7928         * regformats/regdat.sh: Generate code with
7929         "ifndef IN_PROCESS_AGENT".
7930
7931 2017-06-28  Pedro Alves  <palves@redhat.com>
7932
7933         * command.h: Include "common/scoped_restore.h".
7934
7935 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7936
7937         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7938         instead of obstack_grow.
7939
7940 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7941
7942         PR gdb/21337
7943         * symfile.c (reread_symbols): Call objfiles_changed just before
7944         read_symbols.
7945
7946 2017-06-27  Pedro Alves  <palves@redhat.com>
7947
7948         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7949         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7950         (completion_list_add_symbol, completion_list_add_msymbol):
7951         ... these new functions.
7952         (add_symtab_completions)
7953         (default_make_symbol_completion_list_break_on_1): Adjust.
7954
7955 2017-06-27  Pedro Alves  <palves@redhat.com>
7956
7957         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7958         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7959         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7960         dtor.
7961         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7962         'storage_obstack' field an auto_obstack.  In-class initialize all
7963         non-bitfield fields.  Make minsyms_read bool.
7964         * symfile.c (read_symbols): Adjust.
7965
7966 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7967
7968         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7969         (gdbsim_store_register): Likewise.
7970
7971 2017-06-27  Pedro Alves  <palves@redhat.com>
7972
7973         * c-exp.y (name_obstack): Now an auto_obstack.
7974         (yylex): Use auto_obstack::clear.
7975         (c_parse): Use auto_obstack::clear instead of reinitializing and
7976         freeing the obstack.
7977         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7978         * d-exp.y (name_obstack): Now an auto_obstack.
7979         (yylex): Use auto_obstack::clear.
7980         (d_parse): Use auto_obstack::clear instead of reinitializing and
7981         freeing the obstack.
7982         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7983         auto_obstack.
7984         * dwarf2read.c (create_addrmap_from_index)
7985         (dwarf2_build_psymtabs_hard)
7986         (update_enumeration_type_from_children): Likewise.
7987         * gdb_obstack.h (auto_obstack): New type.
7988         * go-exp.y (name_obstack): Now an auto_obstack.
7989         (build_packaged_name): Use auto_obstack::clear.
7990         (go_parse): Use auto_obstack::clear instead of reinitializing and
7991         freeing the obstack.
7992         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7993         auto_obstack.
7994         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7995         * rust-exp.y (work_obstack): Now an auto_obstack.
7996         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7997         reinitializing and freeing the obstack.
7998         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7999         (host_char_to_target): Use auto_obstack.
8000         * utils.h (make_cleanup_obstack_free): Delete declaration.
8001         * valprint.c (generic_emit_char, generic_printstr): Use
8002         auto_obstack.
8003
8004 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8005
8006         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8007         thread.
8008         (darwin_init_thread_list): Don't update dummy thread.
8009         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8010
8011 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8012
8013         * record-full.c (netorder16): Remove.
8014
8015 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8016
8017         * common/diagnostics.h: Define macros for GCC.
8018         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8019         * common/vec.h: Include diagnostics.h.
8020         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8021         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8022         warning.
8023
8024 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8025
8026         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8027         New macro.
8028         * ada-lex.l: Ignore deprecated register warnings.
8029
8030 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8031
8032         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8033         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8034
8035 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8036
8037         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8038         its own line.
8039
8040 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8041
8042         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8043
8044 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8045
8046         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8047         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8048         (xtensa_register_read_masked): Likewise.
8049
8050 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8051
8052         * common/environ.c (gdb_environ::unset): Update comment.
8053
8054 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8055
8056         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8057         registers.
8058
8059 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8060
8061         * record-full.c (record_full_exec_insn): Use byte_vector.
8062
8063 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8064
8065         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8066         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8067
8068 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8069
8070         * remote.c (cached_reg): Move from here...
8071         * regcache.h (cached_reg): ...to here.
8072         * python/py-unwind.c (struct reg_info): Remove.
8073         (cached_frame_info): Use cached_reg_t.
8074         (pyuw_prev_register): Likewise.
8075         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8076         (pyuw_dealloc_cache): Free all registers.
8077
8078 2017-06-22  Pedro Alves  <palves@redhat.com>
8079             Simon Marchi  <simon.marchi@ericsson.com>
8080
8081         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8082         warning.
8083         * common/diagnostics.h: New file.
8084
8085 2017-06-22  Pedro Alves  <palves@redhat.com>
8086
8087         * common/agent.h: Add include guards.
8088
8089 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8090
8091         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8092         talk about addressable units instead of bytes.
8093
8094 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8095
8096         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8097         of '::const_iterator'.
8098
8099 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8100
8101         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8102         'unittests/environ-selftests.c'.
8103         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8104         * charset.c (find_charset_names): Declare object 'iconv_env'.
8105         Update code to use 'iconv_env' object.  Remove call to
8106         'free_environ'.
8107         * common/environ.c: Include <utility>.
8108         (make_environ): Delete function.
8109         (free_environ): Delete function.
8110         (gdb_environ::clear): New function.
8111         (gdb_environ::operator=): New function.
8112         (gdb_environ::get): Likewise.
8113         (environ_vector): Delete function.
8114         (set_in_environ): Delete function.
8115         (gdb_environ::set): New function.
8116         (unset_in_environ): Delete function.
8117         (gdb_environ::unset): New function.
8118         (gdb_environ::envp): Likewise.
8119         * common/environ.h: Include <vector>.
8120         (struct gdb_environ): Delete; transform into...
8121         (class gdb_environ): ... this class.
8122         (free_environ): Delete prototype.
8123         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8124         environ_vector): Likewise.
8125         * infcmd.c (run_command_1): Update code to call
8126         'envp' from 'gdb_environ' class.
8127         (environment_info): Update code to call methods from 'gdb_environ'
8128         class.
8129         (unset_environment_command): Likewise.
8130         (path_info): Likewise.
8131         (path_command): Likewise.
8132         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8133         (inferior::inferior): Initialize 'environment' using the host's
8134         information.
8135         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8136         Include "environ.h".
8137         (class inferior) <environment>: Change type from 'struct
8138         gdb_environ' to 'gdb_environ'.
8139         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8140         methods from 'gdb_environ' class.
8141         * solib.c (solib_find_1): Likewise
8142         * unittests/environ-selftests.c: New file.
8143
8144 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8145
8146         * features/i386/i386-linux.xml: Exchange the order of including
8147         32bit-linux.xml and 32bit-sse.xml.
8148         * features/i386/i386-linux.c: Regenerated.
8149
8150 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8151
8152         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8153         Delete copy ctor and assignment operator.
8154         (tdesc_type): Likewise.
8155         (tdesc_feature): Likewise.
8156         (tdesc_free_reg): Remove.
8157         (tdesc_create_reg): Use new.
8158         (tdesc_free_type): Remove.
8159         (tdesc_create_vector): Use new.
8160         (tdesc_create_union): Likewise.
8161         (tdesc_create_flags): Likewise.
8162         (tdesc_create_enum): Likewise.
8163         (tdesc_free_feature): Delete.
8164         (free_target_description): Use delete.
8165
8166 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8167
8168         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8169         registers.
8170
8171 2017-06-19  Pedro Alves  <palves@redhat.com>
8172
8173         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8174         after gdb::unlinker.
8175
8176 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8177
8178         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8179         gdb_environ to access an environment variable.
8180
8181 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8182
8183         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8184         gdb_byte*.
8185
8186 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8187
8188         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8189
8190 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8191
8192         * configure: Re-generate.
8193         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8194
8195 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8196
8197         * configure: Re-generate.
8198         * warning.m4: Pass -Werror to compiler when checking for
8199         supported warning flags.
8200
8201 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8202
8203         * Makefile.in (COMPILE.pre): Add "-x c++".
8204
8205 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8206             Pedro Alves  <palves@redhat.com>
8207             Yao Qi  <yao.qi@linaro.org>
8208
8209         * defs.h (RequireLongest): New.
8210         (extract_integer): Declare function template.
8211         (extract_signed_integer): Remove the declaration, but define it
8212         static inline.
8213         (extract_unsigned_integer): Likewise.
8214         (store_integer): Declare function template.
8215         (store_signed_integer): Remove the declaration, but define it
8216         static inline.
8217         (store_unsigned_integer): Likewise.
8218         * findvar.c (extract_integer): New function template.
8219         (extract_signed_integer): Remove.
8220         (extract_unsigned_integer): Remove.
8221         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8222         instantiations.
8223         (store_integer): New function template.
8224         (store_signed_integer): Remove.
8225         (store_unsigned_integer): Remove.
8226         (store_integer): Explicit instantiations.
8227         * regcache.c (regcache_raw_read_signed): Update.
8228         (regcache::raw_read): New function.
8229         (regcache::raw_read_signed): Remove.
8230         (regcache::raw_read_unsigned): Remove.
8231         (regcache_raw_read_unsigned): Update.
8232         (regcache_raw_write_unsigned): Update.
8233         (regcache::raw_write_signed): Remove.
8234         (regcache::raw_write): New function.
8235         (regcache_cooked_read_signed): Update.
8236         (regcache::raw_write_unsigned): Remove.
8237         (regcache::cooked_read_signed): Remove.
8238         (regcache_cooked_read_unsigned): Update.
8239         (regcache::cooked_read_unsigned): Remove.
8240         (regcache_cooked_write_signed): Update.
8241         (regcache_cooked_write_unsigned): Update.
8242         * regcache.h (regcache) <raw_read_signed>: Remove.
8243         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8244         <raw_read, raw_write>: New.
8245         <cooked_read_signed, cooked_write_signed>: Remove.
8246         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8247         <cooked_read, cooked_write>: New.
8248         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8249         (sh64_pseudo_register_write): Update.
8250
8251 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8252
8253         * arc-tdep.c (arc_disassembler_options): New variable.
8254         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8255         of default_print_insn.
8256         (arc_delayed_print_insn): Set info->section when needed,
8257         use default_print_insn to retrieve a disassembler.
8258
8259 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8260
8261         PR gdb/21574
8262         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8263         to mention $SHELL and startup-with-shell.
8264
8265 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8266
8267         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8268
8269 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8270
8271         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8272         default_print_insn instead of print_insn_aarch64.
8273         * arm-tdep.c (gdb_print_insn_arm): Call
8274         default_print_insn instead of print_insn_big_arm
8275         and print_insn_little_arm.
8276         * i386-tdep.c (i386_print_insn): Call default_print_insn
8277         instead of print_insn_i386.
8278         * ia64-tdep.c (ia64_print_insn): Call
8279         default_print_insn instead of print_insn_ia64.
8280         * mips-tdep.c (gdb_print_insn_mips): Call
8281         default_print_insn instead of print_insn_big_mips
8282         and print_insn_little_mips.
8283         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8284         instead of print_insn_spu.
8285
8286 2017-06-14  Pedro Alves  <palves@redhat.com>
8287
8288         * ada-lang.c: Include "common/byte-vector.h".
8289         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8290         * charset.c (wchar_iterator::iterate): Resize the vector instead
8291         of reserving it.
8292         * common/byte-vector.h: Include "common/def-vector.h".
8293         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8294         * cli/cli-dump.c: Include "common/byte-vector.h".
8295         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8296         * common/byte-vector.h: New file.
8297         * common/def-vector.h: New file.
8298         * common/default-init-alloc.h: New file.
8299         * dwarf2loc.c: Include "common/byte-vector.h".
8300         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8301         instead of reserving it.
8302         * dwarf2read.c: Include "common/byte-vector.h".
8303         (data_buf::m_vec): Now a gdb::byte_vector.
8304         * gdb_regex.c: Include "common/def-vector.h".
8305         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8306         * mi/mi-main.c: Include "common/byte-vector.h".
8307         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8308         * printcmd.c: Include "common/byte-vector.h".
8309         (print_scalar_formatted): Use gdb::byte_vector.
8310         * valprint.c: Include "common/byte-vector.h".
8311         (maybe_negate_by_bytes, print_decimal_chars): Use
8312         gdb::byte_vector.
8313
8314 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8315
8316         * darwin-nat.c: Include "nat/fork-inferior.h".
8317
8318 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8319
8320         * configure.nat: Factor out Darwin bits that are not
8321         architecture-specific.  Add fork-inferior.o.
8322
8323 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8324
8325         * configure.nat: Factor out AIX bits that are not
8326         architecture-specific.  Add fork-inferior.o.
8327
8328 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8329
8330         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8331         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8332         wrappers that just call rw_pieced_value.
8333
8334 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8335
8336         * dwarf2loc.c (write_pieced_value): When writing the data for a
8337         memory piece, use write_memory_with_notification instead of
8338         write_memory.
8339
8340 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8341
8342         * valops.c (read_value_memory): Change embedded_offset to
8343         represent a bit offset instead of a byte offset.
8344         * value.h (read_value_memory): Adjust comment.
8345
8346 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8347
8348         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8349         dest_offset_bits and source_offset_bits.
8350         (write_pieced_value): Likewise.
8351
8352 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8353
8354         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8355         given by DW_OP_bit_piece.
8356         (write_pieced_value): Likewise.
8357
8358 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8359
8360         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8361         some other preparations to the places where sufficient information
8362         is available.
8363         (write_pieced_value): Likewise.
8364
8365 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8366
8367         * dwarf2loc.c (bits_to_bytes): New function.
8368         (read_pieced_value): Fix offset calculations for register pieces
8369         on big-endian targets.
8370         (write_pieced_value): Likewise.
8371
8372 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8373
8374         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8375         (write_pieced_value): Likewise.
8376
8377 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8378
8379         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8380         transfer the source value's least significant bits, instead of its
8381         lowest-addressed ones.  Rename type_len to max_offset.
8382         (read_pieced_value): Mirror above changes to write_pieced_value as
8383         applicable.
8384
8385 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8386
8387         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8388         truncate full bytes from dest_offset_bits before using it as an
8389         offset into the buffer.
8390
8391 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8392
8393         * dwarf2loc.c (write_pieced_value): Include transfer size in
8394         byte-wise check.
8395
8396 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8397
8398         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8399         calculation of this_size.
8400
8401 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8402
8403         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8404         when targeting a bit-field.
8405         (write_pieced_value): Likewise.
8406
8407 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8408
8409         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8410         (allocate_piece_closure): Drop addr_size parameter.
8411         (dwarf2_evaluate_loc_desc_full): Adjust call to
8412         allocate_piece_closure.
8413
8414 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8415
8416         PR gdb/21226
8417         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8418         the LSB end, independent of endianness.
8419
8420 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8421
8422         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8423         size capping.
8424
8425 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8426
8427         * mips-linux-nat.c: Move include features/mips*-linux.c to
8428         mips-linux-tdep.c.
8429         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8430         to mips-linux-tdep.c.
8431         * mips-linux-tdep.c: Include features/mips*-linux.c
8432         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8433         functions.
8434         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8435         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8436         (tdesc_mips64_dsp_linux): Declare.
8437
8438 2017-06-12  Tom Tromey  <tom@tromey.com>
8439
8440         * valprint.h (val_print_type_code_int): Remove.
8441         * valprint.c (generic_val_print_int): Always call
8442         val_print_scalar_formatted.
8443         (val_print_type_code_int): Remove.
8444         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8445         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8446         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8447         * ada-valprint.c (ada_val_print_num): Use
8448         val_print_scalar_formatted.
8449
8450 2017-06-12  Tom Tromey  <tom@tromey.com>
8451
8452         * printcmd.c (print_scalar_formatted): Unify the two switches.
8453         Don't convert scalars to LONGEST.
8454
8455 2017-06-12  Tom Tromey  <tom@tromey.com>
8456
8457         PR exp/16225:
8458         * valprint.h (print_decimal_chars): Update.
8459         * valprint.c (maybe_negate_by_bytes): New function.
8460         (print_decimal_chars): Add "is_signed" argument.
8461         * printcmd.c (print_scalar_formatted): Update.
8462
8463 2017-06-12  Tom Tromey  <tom@tromey.com>
8464
8465         PR exp/16225:
8466         * valprint.h (print_binary_chars, print_hex_chars): Update.
8467         * valprint.c (val_print_type_code_int): Update.
8468         (print_binary_chars): Add "zero_pad" argument.
8469         (emit_octal_digit): New function.
8470         (print_octal_chars): Don't zero-pad.
8471         (print_decimal_chars): Likewise.
8472         (print_hex_chars): Add "zero_pad" argument.
8473         * sh64-tdep.c (sh64_do_fp_register): Update.
8474         * regcache.c (regcache::dump): Update.
8475         * printcmd.c (print_scalar_formatted): Update.
8476         * infcmd.c (default_print_one_register_info): Update.
8477
8478 2017-06-12  Pedro Alves  <palves@redhat.com>
8479             Alan Hayward  <alan.hayward@arm.com>
8480
8481         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8482         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8483         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8484         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8485         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8486
8487 2017-06-12  Pedro Alves  <palves@redhat.com>
8488
8489         * dwarf2read.c (mapped_symtab::data): Now a vector of
8490         symtab_index_entry instead of vector of
8491         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8492         whether an element's name is NULL instead of checking whether the
8493         element itself is NULL.
8494         (find_slot): Change return type.  Adjust.
8495         (hash_expand, , add_index_entry, uniquify_cu_indices)
8496         (write_hash_table): Adjust.
8497
8498 2017-06-12  Pedro Alves  <palves@redhat.com>
8499
8500         * dwarf2read.c (recursively_count_psymbols): New function.
8501         (write_psymtabs_to_index): Call it to compute number of psyms and
8502         pass estimate size of psyms_seen to unordered_set's ctor.
8503
8504 2017-06-12  Pedro Alves  <palves@redhat.com>
8505
8506         * dwarf2read.c (write_hash_table): Check if key already exists
8507         before emplacing.
8508
8509 2017-06-12  Pedro Alves  <palves@redhat.com>
8510
8511         * dwarf2read.c (data_buf::append_space): Rename to...
8512         (data_buf::grow): ... this, and make private.  Adjust all callers.
8513         (data_buf::append_uint): New method.
8514         (add_address_entry, write_one_signatured_type)
8515         (write_psymtabs_to_index): Use it.
8516
8517 2017-06-12  Pedro Alves  <palves@redhat.com>
8518
8519         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8520         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8521         (data_buf::file_write): Call ::fwrite directly.
8522
8523 2017-06-12  Pedro Alves  <palves@redhat.com>
8524
8525         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8526         std::vector::erase.
8527
8528 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8529
8530         Code cleanup: C++ify .gdb_index producer.
8531         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8532         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8533         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8534         (create_strtab, add_string): Remove.
8535         (file_write, data_buf): New.
8536         (struct symtab_index_entry): Use std::vector for cu_indices.
8537         (struct mapped_symtab): Use std::vector for data.
8538         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8539         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8540         Remove.
8541         (find_slot): Change return type.  Update it to the new data structures.
8542         (hash_expand, add_index_entry): Update it to the new data structures.
8543         (offset_type_compare): Remove.
8544         (uniquify_cu_indices): Update it to the new data structures.
8545         (c_str_view, c_str_view_hasher, vector_hasher): New.
8546         (add_indices_to_cpool): Remove.
8547         (write_hash_table): Update it to the new data structures.
8548         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8549         (eq_psymtab_cu_index): Remove.
8550         (psym_index_map): New typedef.
8551         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8552         reference and std::unordered_map for cu_index_htab.
8553         (add_address_entry, add_address_entry_worker, write_address_map)
8554         (write_psymbols): Update it to the new data structures.
8555         (write_obstack): Remove.
8556         (struct signatured_type_index_data): Change types_list to a data_buf
8557         reference and psyms_seen to a std::unordered_set reference.
8558         (write_one_signatured_type, recursively_write_psymbols)
8559         (write_psymtabs_to_index): Update it to the new data structures.
8560
8561 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8562
8563         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8564         separate-debug-file commands.
8565         * symfile.h (separate_debug_file_debug): New global.
8566         * symfile.c (separate_debug_file_debug): New global.
8567         (separate_debug_file_exists, find_separate_debug_file): Add
8568         debug output.
8569         (_initialize_symfile): Add "set debug separate-debug-file"
8570         command.
8571         * build-id.c (build_id_to_debug_bfd,
8572         find_separate_debug_file_by_buildid): Add debug output.
8573
8574 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8575
8576         * gdbarch.sh (displaced_step_free_closure): Remove.
8577         * gdbarch.h, gdbarch.c: Re-generate.
8578         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8579         displaced_step_free_closure.
8580         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8581         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8582         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8583         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8584         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8585         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8586         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8587         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8588         * infrun.c (displaced_step_clear): Call xfree instead of
8589         gdbarch_displaced_step_free_closure.
8590
8591 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8592
8593         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8594         NULL".
8595
8596 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8597
8598         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8599         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8600         (mn10300_push_dummy_call): Likewise.
8601
8602 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8603
8604         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8605
8606 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8607
8608         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8609
8610 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8611
8612         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8613         able to start inferiors using a shell.
8614         (New remote packets): Announce new packet "QStartupWithShell".
8615         * remote.c: Add PACKET_QStartupWithShell.
8616         (extended_remote_create_inferior): Handle new
8617         PACKET_QStartupWithShell.
8618         (remote_protocol_features) <QStartupWithShell>: New entry for
8619         PACKET_QStartupWithShell.
8620         (_initialize_remote): Call "add_packet_config_cmd" for
8621         QStartupShell.
8622
8623 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8624             Pedro Alves  <palves@redhat.com>
8625
8626         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8627         and "nat/fork-inferior.h".
8628         * common/common-inferior.h: New file, with contents from
8629         "gdb/inferior.h".
8630         * commom/common-utils.c: Include "common-utils.h".
8631         (stringify_argv): New function.
8632         * common/common-utils.h (stringify_argv): New prototype.
8633         * configure.nat: Add "fork-inferior.o" as a dependency for
8634         "*linux*", "fbsd*" and "nbsd*" hosts.
8635         * corefile.c (get_exec_file): Update comment.
8636         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8637         instead of "startup_inferior".
8638         (darwin_create_inferior): Call "add_thread_silent" after
8639         "fork_inferior".
8640         * fork-child.c: Cleanup unnecessary includes.
8641         (SHELL_FILE): Move to "common/common-fork-child.c".
8642         (environ): Likewise.
8643         (exec_wrapper): Initialize.
8644         (get_exec_wrapper): New function.
8645         (breakup_args): Move to "common/common-fork-child.c"; rename to
8646         "breakup_args_for_exec".
8647         (escape_bang_in_quoted_argument): Move to
8648         "common/common-fork-child.c".
8649         (saved_ui): New variable.
8650         (prefork_hook): New function.
8651         (postfork_hook): Likewise.
8652         (postfork_child_hook): Likewise.
8653         (gdb_startup_inferior): Likewise.
8654         (fork_inferior): Move to "common/common-fork-child.c".  Update
8655         function to support gdbserver.
8656         (startup_inferior): Likewise.
8657         * gdbcore.h (get_exec_file): Remove declaration.
8658         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8659         instead of "startup_inferior".  Call "add_thread_silent" after
8660         "fork_inferior".
8661         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8662         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8663         instead of "startup_inferior".  Call "add_thread_silent" after
8664         "fork_inferior".
8665         * inferior.h: Include "common-inferior.h".
8666         (trace_start_error): Move to "common/common-utils.h".
8667         (trace_start_error_with_name): Likewise.
8668         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8669         (startup_inferior): Likewise.
8670         (gdb_startup_inferior): New prototype.
8671         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8672         * nat/fork-inferior.h: New file.
8673         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8674         instead of "startup_inferior".  Call "add_thread_silent" after
8675         "fork_inferior".
8676         * target.h (target_terminal_init): Move prototype to
8677         "target/target.h".
8678         (target_terminal_inferior): Likewise.
8679         (target_terminal_ours): Likewise.
8680         * target/target.h (target_terminal_init): New prototype, moved
8681         from "target.h".
8682         (target_terminal_inferior): Likewise.
8683         (target_terminal_ours): Likewise.
8684         * utils.c (gdb_flush_out_err): New function.
8685
8686 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8687
8688         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8689         * common/common-gdbthread.h: New file, with parts from
8690         "gdb/gdbthread.h".
8691         * gdbthread.h: Include "common-gdbthread.h".
8692         (switch_to_thread): Moved to "common/common-gdbthread.h".
8693
8694 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8695
8696         * Makefile.in (SFILES): Add "common/job-control.c".
8697         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8698         (COMMON_OBS): Add "job-control.o".
8699         * common/job-control.c: New file, with contents from
8700         "gdb/inflow.c".
8701         * common/job-control.h: New file, with contents from "terminal.h".
8702         * fork-child.c: Include "job-control.h".
8703         * inflow.c: Include "job-control.h".
8704         (gdb_setpgid): Move to "common/common-inflow.c".
8705         (_initialize_inflow): Move setting of "job_control" to
8706         "handle_job_control".
8707         * terminal.h (job_control): Moved to "common/common-terminal.h".
8708         (gdb_setpgid): Likewise.
8709         * top.c: Include "job_control.h".
8710         * utils.c: Likewise.
8711         (job_control): Moved to "job-control.c".
8712
8713 2017-06-07  Pedro Alves  <palves@redhat.com>
8714
8715         * Makefile.in (SFILES): Add gdb_regex.c.
8716         (COMMON_OBS): Add gdb_regex.o.
8717         * ada-lang.c (ada_add_standard_exceptions)
8718         (ada_add_exceptions_from_frame, name_matches_regex)
8719         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8720         parameter type to compiled_regex.  Adjust.
8721         (ada_exceptions_list): Use compiled_regex.
8722         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8723         std::unique_ptr<compiled_regex>.
8724         (exception_catchpoint::~exception_catchpoint): Remove regfree
8725         call.
8726         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8727         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8728         * breakpoint.c (solib_catchpoint::compiled): Now a
8729         std::unique_ptr<compiled_regex>.
8730         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8731         (check_status_catch_solib): Adjust to use compiled_regex.
8732         (add_solib_catchpoint): Adjust to use compiled_regex.
8733         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8734         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8735         compiled_regex reference.  Adjust to use it.
8736         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8737         declaration.  Include "gdb_regex.h".
8738         (apropos_cmd): Change regex parameter to compiled_regex reference.
8739         * gdb_regex.c: New file.
8740         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8741         declarations.
8742         (class compiled_regex): New.
8743         * linux-tdep.c: Include "common/gdb_optional.h".
8744         (struct mapping_regexes): New, factored out from
8745         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8746         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8747         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8748         * probe.c: Include "common/gdb_optional.h".
8749         (collect_probes): Use compiled_regex and gdb::optional and remove
8750         cleanups.
8751         * skip.c: Include "common/gdb_optional.h".
8752         (skiplist_entry::compiled_function_regexp): Now a
8753         gdb::optional<compiled_regex>.
8754         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8755         (free_skiplist_entry): Remove regfree call.
8756         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8757         compiled_regex and gdb::optional.
8758         * symtab.c: Include "common/gdb_optional.h".
8759         (search_symbols): Use compiled_regex and gdb::optional.
8760         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8761         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8762         to gdb_regex.c.
8763
8764 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8765
8766         * regcache.c (regcache::save): Avoid buffer use.
8767         (regcache::dump): Likewise.
8768
8769 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8770
8771         * sh-tdep.c (sh_pseudo_register_read): Remove
8772         MAX_REGISTER_SIZE.
8773         (sh_pseudo_register_write): Likewise.
8774         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8775         (sh64_pseudo_register_write): Likewise
8776
8777 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8778
8779         * aarch64-tdep.c (aarch64_store_return_value): Use
8780         V_REGISTER_SIZE.
8781         (aarch64_pseudo_read_value): Likewise.
8782         (aarch64_pseudo_write): Likewise.
8783
8784 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8785
8786         * regformats/regdef.h (set_register_cache): Remove the
8787         declaration.
8788
8789 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8790
8791         * frame.c (frame_unwind_register_signed): Use
8792         frame_unwind_register_value.
8793
8794 2017-06-06  Pedro Alves  <palves@redhat.com>
8795
8796         PR breakpoints/21553
8797         * breakpoint.c (create_breakpoints_sal_default)
8798         (init_breakpoint_sal, create_breakpoint_sal): Use
8799         gdb::unique_xmalloc_ptr for string parameters.
8800         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8801         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8802         (base_breakpoint_create_breakpoints_sal)
8803         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8804         (strace_marker_create_breakpoints_sal)
8805         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8806         string parameters.
8807         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8808         gdb::unique_xmalloc_ptr for string parameters.
8809         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8810         parameters.
8811
8812 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8813
8814         * alpha-tdep.c (alpha_register_to_value): Use
8815         get_frame_register_value.
8816         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8817
8818 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8819
8820         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8821         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8822         (ia64_value_to_register): Likewise.
8823         (ia64_extract_return_value): Likewise.
8824         (ia64_store_return_value): Likewise.
8825         (ia64_push_dummy_call): Likewise.
8826
8827 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8828
8829         GDB 8.0 released.
8830
8831 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8832
8833         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8834
8835 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8836
8837         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8838         parameter.
8839         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8840
8841 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8842
8843         * event-loop.c (poll_timers): Unallocate timer using delete
8844         instead of xfree.
8845
8846 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8847
8848         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8849         (struct breakpoint) <~breakpoint>: New.
8850         (struct watchpoint): Inherit from breakpoint.
8851         <~watchpoint>: New.
8852         <base>: Remove.
8853         (struct tracepoint): Inherit from breakpoint.
8854         <base>: Remove.
8855         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8856         (struct longjmp_breakpoint): Inherit from breakpoint.
8857         <~longjmp_breakpoint>: New.
8858         <base>: Remove.
8859         (new_breakpoint_from_type): Remove casts.
8860         (watchpoint_in_thread_scope): Remove reference to base field.
8861         (watchpoint_del_at_next_stop): Likewise.
8862         (update_watchpoint): Likewise.
8863         (watchpoint_check): Likewise.
8864         (bpstat_check_watchpoint): Likewise.
8865         (set_longjmp_breakpoint): Likewise.
8866         (struct fork_catchpoint): Inherit from breakpoint.
8867         <base>: Remove.
8868         (struct solib_catchpoint): Inherit from breakpoint.
8869         <~solib_catchpoint>: New.
8870         <base>: Remove.
8871         (dtor_catch_solib): Change to ...
8872         (solib_catchpoint::~solib_catchpoint): ... this.
8873         (breakpoint_hit_catch_solib): Remove reference to base field.
8874         (add_solib_catchpoint): Likewise.
8875         (create_fork_vfork_event_catchpoint): Likewise.
8876         (struct exec_catchpoint): Inherit from breakpoint.
8877         <~exec_catchpoint>: New.
8878         <base>: Remove.
8879         (dtor_catch_exec): Change to ...
8880         (exec_catchpoint::~exec_catchpoint): ... this.
8881         (dtor_watchpoint): Change to ...
8882         (watchpoint::~watchpoint): ... this.
8883         (watch_command_1): Remove reference to base field.
8884         (catch_exec_command_1): Likewise.
8885         (base_breakpoint_dtor): Change to ...
8886         (breakpoint::~breakpoint): ... this.
8887         (base_breakpoint_ops): Remove dtor field value.
8888         (longjmp_bkpt_dtor): Change to ...
8889         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8890         (strace_marker_create_breakpoints_sal): Remove reference to base
8891         field.
8892         (delete_breakpoint): Don't manually call breakpoint destructor.
8893         (create_tracepoint_from_upload): Remove reference to base field.
8894         (trace_pass_set_count): Likewise.
8895         (initialize_breakpoint_ops): Don't initialize
8896         momentary_breakpoint_ops, don't set dtors.
8897         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8898         <~ada_catchpoint>: New.
8899         <base>: Remove.
8900         (create_excep_cond_exprs): Remove reference to base field.
8901         (dtor_exception): Change to ...
8902         (ada_catchpoint::~ada_catchpoint): ... this.
8903         (dtor_catch_exception): Remove.
8904         (dtor_catch_exception_unhandled): Remove.
8905         (dtor_catch_assert): Remove.
8906         (create_ada_exception_catchpoint): Remove reference to base
8907         field.
8908         (initialize_ada_catchpoint_ops): Don't set dtors.
8909         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8910         breakpoint.
8911         <~signal_catchpoint>: New.
8912         <base>: Remove.
8913         (signal_catchpoint_dtor): Change to ...
8914         (signal_catchpoint::~signal_catchpoint): ... this.
8915         (create_signal_catchpoint): Remove reference to base field.
8916         (initialize_signal_catchpoint_ops): Don't set dtor.
8917         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8918         from breakpoint.
8919         <~syscall_catchpoint>: New.
8920         <base>: Remove.
8921         (dtor_catch_syscall): Change to ...
8922         (syscall_catchpoint::~syscall_catchpoint): ... this.
8923         (create_syscall_event_catchpoint): Remove reference to base
8924         field.
8925         (initialize_syscall_catchpoint_ops): Don't set dtor.
8926         * break-catch-throw.c (struct exception_catchpoint): Inherit
8927         from breakpoint.
8928         <~exception_catchpoint>: New.
8929         <base>: Remove.
8930         (dtor_exception_catchpoint): Change to ...
8931         (exception_catchpoint::~exception_catchpoint): ... this.
8932         (handle_gnu_v3_exceptions): Remove reference to base field.
8933         (initialize_throw_catchpoint_ops): Don't set dtor.
8934         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8935         field.
8936         * remote.c (remote_get_tracepoint_status): Likewise.
8937         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8938         * tracefile.c (tracefile_fetch_registers): Likewise.
8939         * tracepoint.c (actions_command): Likewise.
8940         (validate_actionline): Likewise.
8941         (tfind_1): Likewise.
8942         (get_traceframe_location): Likewise.
8943         (find_matching_tracepoint_location): Likewise.
8944         (parse_tracepoint_status): Likewise.
8945         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8946
8947 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8948
8949         * breakpoint.c (struct longjmp_breakpoint): New struct.
8950         (is_tracepoint_type): Change return type to bool.
8951         (is_longjmp_type): New function.
8952         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8953         (set_raw_breakpoint_without_location): Use
8954         new_breakpoint_from_type.
8955         (set_raw_breakpoint): Likewise.
8956
8957 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8958
8959         * breakpoint.c (new_breakpoint_from_type): New function.
8960         (create_breakpoint_sal): Use new_breakpoint_from_type and
8961         unique_ptr.
8962         (create_breakpoint): Likewise.
8963
8964 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8965
8966         * memattr.c (mem_info_command): Rename to ...
8967         (info_mem_command): ... this.
8968         (mem_enable_command): Rename to ...
8969         (enable_mem_command): ... this.
8970         (mem_disable_command): Rename to ...
8971         (disable_mem_command): ... this.
8972         (mem_delete_command): Rename to ...
8973         (delete_mem_command): ... this.
8974         (_initialize_mem): Adjust function names.
8975
8976 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8977
8978         * btrace.c (handle_pt_insn_events): New.
8979         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8980         STATUS.  Split into this and ...
8981         (handle_pt_insn_event_flags): ... this.
8982
8983 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8984
8985         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8986         and struct pt_insn.resynced.
8987         * configure: Regenerated.
8988         * config.in: Regenerated.
8989
8990 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8991
8992         * btrace.c (ftrace_find_call_by_number): New function.
8993         (ftrace_new_function): Store objects, not pointers.
8994         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8995         ftrace_new_gap, ftrace_update_function,
8996         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8997         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8998         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8999         btrace_ends_with_single_insn, btrace_call_get): Account for
9000         btrace_thread_info::functions now storing objects.
9001         * btrace.h (struct btrace_thread_info): Add constructor.
9002         (struct btrace_thread_info) <functions>: Make std::vector.
9003         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9004         Initialize with default values.
9005         * record-btrace.c (record_btrace_frame_sniffer): Account for
9006         btrace_thread_info::functions now storing objects.
9007
9008 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9009
9010         * btrace.c: Remove typedef bfun_s.
9011         (ftrace_new_gap): Directly add gaps to the list of gaps.
9012         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9013         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9014         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9015         instead of gdb VEC.
9016
9017 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9018
9019         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9020         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9021         with btrace_thread_info::next_segment and
9022         btrace_thread_info::prev_segment.
9023         * btrace.h: Remove struct btrace_func_link.
9024         (struct btrace_function): Replace pair of function segment pointers
9025         with pair of indices.
9026         * python/py-record-btrace.c (btpy_call_prev_sibling,
9027         btpy_call_next_sibling): Replace references to
9028         btrace_thread_info::segment with btrace_thread_info::next_segment and
9029         btrace_thread_info::prev_segment.
9030         * record-btrace.c (record_btrace_frame_this_id): Use
9031         btrace_find_call_by_number.
9032
9033 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9034
9035         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9036         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9037         btrace_insn_next, btrace_insn_prev): Remove references to
9038         btrace_thread_info::flow.
9039         * btrace.h (struct btrace_function): Remove FLOW.
9040
9041 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9042
9043         * btrace.c (ftrace_find_call_by_number): New function.
9044         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9045         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9046         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9047         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9048         index.
9049         * btrace.h (struct btrace_function): Turn UP into an index.
9050         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9051         as an index.
9052         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9053         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9054         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9055
9056 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9057
9058         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9059         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9060         ftrace_update_function, ftrace_compute_global_level_offset,
9061         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9062         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9063         btrace_insn_end, btrace_is_empty): Remove references to
9064         btrace_thread_info::begin and btrace_thread_info::end.
9065         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9066         (struct btrace_thread_info) <functions>: Adjust comment.
9067         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9068         btrace_thread_info::begin.
9069
9070 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9071
9072         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9073         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9074         ftrace_update_function): Remove arguments that implicitly were always
9075         BTINFO->END.
9076         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9077         Don't pass BTINFO->END.
9078
9079 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9080
9081         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9082         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9083         btrace_find_insn_by_number): Replace function segment pointer with
9084         index.
9085         (btrace_insn_cmp): Simplify.
9086         * btrace.h: (struct btrace_insn_iterator) Rename index to
9087         insn_index.  Replace function segment pointer with index into function
9088         segment vector.
9089         * record-btrace.c (record_btrace_call_history): Replace function
9090         segment pointer use with index.
9091         (record_btrace_frame_sniffer): Retrieve function call segment through
9092         vector.
9093         (record_btrace_set_replay): Remove defunc't safety check.
9094
9095 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9096
9097         * btrace.c (btrace_ends_with_single_insn): New function.
9098         (btrace_call_get, btrace_call_number, btrace_call_begin,
9099         btrace_call_end, btrace_call_next, btrace_call_prev,
9100         btrace_find_call_by_number): Use index into call segment vector
9101         instead of pointer.
9102         (btrace_call_cmp): Simplify.
9103         * btrace.h (struct btrace_call_iterator): Replace function call segment
9104         pointer with index into vector.
9105         * record-btrace.c (record_btrace_call_history): Use index instead of
9106         pointer.
9107
9108 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9109
9110         * btrace.c (btrace_insn_begin, btrace_insn_end,
9111         btrace_find_insn_by_number): Add btinfo to iterator.
9112         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9113
9114 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9115
9116         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9117         and save pointers directly.
9118         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9119         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9120         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9121         changed signature of functions.
9122         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9123         (btrace_fetch): Remove code that adds btrace_function pointers to
9124         vector of btrace_functions.
9125         (btrace_clear): Simplify freeing vector of btrace_functions.
9126
9127 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9128
9129         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9130         Replace VEC_* with std::vector functions.
9131         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9132         (struct btrace_thread_info)<functions>: Change type to std::vector.
9133
9134 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9135
9136         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9137         "Removed targets and native configurations" up.  Merge duplicate
9138         "New commands" sub-sections.  Add "New options" sub-sections.
9139
9140 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9141
9142         * defs.h (copy_integer_to_size): New declaration.
9143         * findvar.c (copy_integer_to_size): New function.
9144         (do_cint_test): New selftest function.
9145         (copy_integer_to_size_test): Likewise.
9146         (_initialize_findvar): Likewise.
9147         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9148         (mips_fbsd_collect_reg): Use raw_collect_integer.
9149         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9150         (mips64_fill_gregset): Use raw_collect_integer
9151         (mips64_fill_fpregset): Use raw_supply_integer.
9152         * regcache.c (regcache::raw_supply_integer): New function.
9153         (regcache::raw_collect_integer): Likewise.
9154         * regcache.h: (regcache::raw_supply_integer): New declaration.
9155         (regcache::raw_collect_integer): Likewise.
9156
9157 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9158
9159         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9160         (COMMON_OBS): Add gdbarch-selftests.o.
9161         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9162         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9163         * gdbarch-selftests.c: New file.
9164         * regcache.h (regcache) <~regcache>: Mark it virtual if
9165         GDB_SELF_TEST.
9166         <raw_write>: Likewise.
9167
9168 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9169
9170         * regcache.c (current_regcache): Change it to
9171         regcache::current_regcache.
9172         (regcache_observer_target_changed): Update.
9173         (regcache_thread_ptid_changed): Make it a regcache static
9174         method.
9175         (regcache_thread_ptid_changed): Update.
9176         (class regcache_access): New.
9177         (current_regcache_test): Update.
9178         (_initialize_regcache): Update.
9179         * regcache.h: Include forward_list.
9180         (regcache): Declare regcache_thread_ptid_changed and declare
9181         registers_changed_ptid as friend.
9182
9183 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9184
9185         * i387-tdep.c (i387_register_to_value): Use register_size
9186         instead of TYPE_LENGTH.
9187         * m68k-tdep.c (m68k_register_to_value): Likewise.
9188
9189 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9190
9191         * i387-tdep.c (i387_convert_register_p): Return false if type
9192         code isn't TYPE_CODE_FLT.
9193
9194 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9195
9196         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9197         length is 4.
9198         (alpha_register_to_value): Remove type length check.
9199         (alpha_value_to_register): Likewise.
9200
9201 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9202
9203         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9204         TYPE_CODE_FLT.
9205
9206 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9207
9208         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9209         TYPE_CODE_FLT or not.
9210
9211 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9212
9213         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9214         * avr-tdep.c (avr_gdbarch_init): Likewise.
9215         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9216         * cris-tdep.c (cris_gdbarch_init): Likewise.
9217         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9218         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9219         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9220         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9221         * mep-tdep.c (mep_gdbarch_init): Likewise.
9222         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9223         * mips-tdep.c (mips_gdbarch_init): Likewise.
9224         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9225         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9226         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9227         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9228         * v850-tdep.c (v850_gdbarch_init): Likewise.
9229
9230 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9231
9232         * selftest-arch.c (tests_with_arch): Call registers_changed
9233         and reinit_frame_cache.
9234         * selftest.c (run_self_tests): Likewise.
9235
9236 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9237
9238         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9239         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9240
9241 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9242
9243         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9244         set_gdbarch_print_insn.
9245
9246 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9247
9248         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9249         set_gdbarch_print_insn.
9250
9251 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9252
9253         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9254         set_gdbarch_print_insn.
9255         * arc-tdep.c (arc_gdbarch_init): Likewise.
9256         * arch-utils.c: include dis-asm.h.
9257         (default_print_insn): New function.
9258         * arch-utils.h (default_print_insn): Declare.
9259         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9260         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9261         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9262         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9263         * frv-tdep.c (frv_gdbarch_init): Likewise.
9264         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9265         * gdbarch.sh (print_insn): Use default_print_insn.
9266         * gdbarch.c: Regenerated.
9267         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9268         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9269         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9270         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9271         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9272         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9273         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9274         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9275         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9276         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9277         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9278         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9279         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9280         * mt-tdep.c (mt_gdbarch_init): Likewise.
9281         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9282         * nios2-tdep.c (nios2_print_insn): Remove.
9283         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9284         * rx-tdep.c (rx_gdbarch_init): Likewise.
9285         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9286         * score-tdep.c (score_print_insn): Remove.
9287         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9288         * sh-tdep.c (sh_gdbarch_init): Likewise.
9289         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9290         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9291         * tic6x-tdep.c (tic6x_print_insn): Remove.
9292         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9293         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9294         * v850-tdep.c (v850_gdbarch_init): Likewise.
9295         * vax-tdep.c (vax_gdbarch_init): Likewise.
9296         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9297         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9298
9299 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9300
9301         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9302         (MIPS_FP0_REGNUM): Remove.
9303         (MIPS_FSR_REGNUM): Remove.
9304         (mips_fbsd_supply_fpregs): Use mips_regnum.
9305         (mips_fbsd_supply_gregs): Likewise.
9306         (mips_fbsd_collect_fpregs): Likewise.
9307         (mips_fbsd_collect_gregs): Likewise.
9308
9309 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9310
9311         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9312         (getpfpregs_supplies): New function.
9313         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9314         getfpregs_supplies.
9315         (mips_fbsd_store_inferior_registers): Likewise.
9316
9317 2017-05-22  Pedro Alves <palves@redhat.com>
9318
9319         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9320         maintainer.
9321
9322 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9323
9324         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9325         (store_register): Likewise.
9326         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9327         (get_decimal_float_return_value): Likewise.
9328         (do_ppc_sysv_return_value): Likewise.
9329         (ppc64_sysv_abi_push_integer): Likewise.
9330         (ppc64_sysv_abi_push_freg): Likewise.
9331         (ppc64_sysv_abi_return_value_base): Likewise.
9332         (ppc64_sysv_abi_return_value): Likewise.
9333         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9334         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9335         * rs6000-nat.c: Likewise.
9336         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9337         (rs6000_value_to_register): Likewise.
9338         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9339
9340 2017-05-21  Tom Tromey  <tom@tromey.com>
9341
9342         PR rust/21466:
9343         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9344         arrays as "[T]", not "[T; ]".
9345
9346 2017-05-19  Tom Tromey  <tom@tromey.com>
9347
9348         PR rust/21484:
9349         * rust-lang.c (exp_descriptor_rust): New function.
9350         (rust_language_defn): Use it.
9351         * p-lang.c (pascal_language_defn): Update.
9352         * opencl-lang.c (opencl_language_defn): Update.
9353         * objc-lang.c (objc_language_defn): Update.
9354         * m2-lang.c (m2_language_defn): Update.
9355         * language.h (struct language_defn)
9356         <la_watch_location_expression>: New member.
9357         * language.c (unknown_language_defn, auto_language_defn)
9358         (local_language_defn): Update.
9359         * go-lang.c (go_language_defn): Update.
9360         * f-lang.c (f_language_defn): Update.
9361         * d-lang.c (d_language_defn): Update.
9362         * c-lang.h (c_watch_location_expression): Declare.
9363         * c-lang.c (c_watch_location_expression): New function.
9364         (c_language_defn, cplus_language_defn, asm_language_defn)
9365         (minimal_language_defn): Use it.
9366         * breakpoint.c (watch_command_1): Call
9367         la_watch_location_expression.
9368         * ada-lang.c (ada_language_defn): Update.
9369
9370 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9371
9372         PR tui/21482
9373         * gdb_curses.h (NOMACROS): Define.
9374         (NCURSES_NOMACROS): Define.
9375
9376 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9377
9378         PR tui/21482
9379         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9380         arg to char *.
9381         * tui/tui-wingeneral.c (box_win): Likewise.
9382         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9383         (tui_show_source_line): Likewise.
9384         (tui_show_exec_info_content): Likewise.
9385
9386 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9387
9388         * sparc-tdep.c (sparc_structure_return_p)
9389         (sparc_arg_on_registers_p): New functions.
9390         (sparc32_store_arguments): Use them.
9391         * sparc64-tdep.c (sparc64_16_byte_align_p)
9392         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9393         Handle TYPE_CODE_ARRAY.
9394
9395 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9396
9397         * cli/cli-decode.c (add_alias_cmd): New function.
9398         * command.h (add_alias_cmd): Declare.
9399         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9400         instead call add_alias_cmd.
9401
9402 2017-05-17  Pedro Alves  <palves@redhat.com>
9403
9404         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9405         (nat_makefile_frag): ... this.  All references updated.
9406         * configure.ac: Likewise.
9407         * configure.nat: Likewise.  Enhance comments.
9408         * configure: Regenerate.
9409
9410 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9411
9412         * procfs.c (procfs_create_inferior): Change prototype to match
9413         definition.
9414
9415 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9416
9417         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9418         C++ compiler warning.
9419
9420 2017-05-12  Tom Tromey  <tom@tromey.com>
9421
9422         PR rust/21483:
9423         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9424         recurse, just call value_struct_elt directly.
9425
9426 2017-05-12  Tom Tromey  <tom@tromey.com>
9427
9428         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9429         OP_RUST_ARRAY>: Fix.
9430
9431 2017-05-12  Tom Tromey  <tom@tromey.com>
9432
9433         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9434
9435 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9436
9437         * regcache.c: Include <forward_list>.
9438         (struct regcache_list): Remove.
9439         (current_regcache): Update.
9440         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9441         (regcache_thread_ptid_changed): Likewise.
9442         (registers_changed_ptid): Likewise.
9443         (current_regcache_size): Likewise.
9444
9445 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9446
9447         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9448         (current_regcache_size): New function.
9449         (current_regcache_test): New function.
9450         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9451
9452 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9453
9454         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9455         (print_gp_register_row): Use get_frame_register_value.
9456
9457 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9458
9459         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9460         (mips_supply_fpregset): Likewise.
9461         (mips64_supply_gregset): Likewise.
9462
9463 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9464
9465         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9466         regcache->raw_supply_zeroed.
9467
9468 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9469
9470         * configure.nat: Rearrange 'case' statements to match
9471         host before cpu.
9472
9473 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9474
9475         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9476         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9477         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9478         "@nat_extra_makefile_frag@".
9479         (Makefile): Remove dependency on "@frags@".
9480         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9481         (data-directory/Makefile): Likewise.
9482         * config/aarch64/linux.mh: Deleted; moved contents to
9483         "gdb/configure.nat".
9484         * config/alpha/alpha-linux.mh: Likewise.
9485         * config/alpha/nbsd.mh: Likewise.
9486         * config/arm/linux.mh: Likewise.
9487         * config/arm/nbsdelf.mh: Likewise.
9488         * config/i386/cygwin.mh: Likewise.
9489         * config/i386/cygwin64.mh: Likewise.
9490         * config/i386/darwin.mh: Likewise.
9491         * config/i386/fbsd.mh: Likewise.
9492         * config/i386/fbsd64.mh: Likewise.
9493         * config/i386/go32.mh: Likewise.
9494         * config/i386/i386gnu.mh: Likewise.
9495         * config/i386/i386sol2.mh: Likewise.
9496         * config/i386/linux.mh: Likewise.
9497         * config/i386/linux64.mh: Likewise.
9498         * config/i386/mingw.mh: Likewise.
9499         * config/i386/mingw64.mh: Likewise.
9500         * config/i386/nbsd64.mh: Likewise.
9501         * config/i386/nbsdelf.mh: Likewise.
9502         * config/i386/nto.mh: Likewise.
9503         * config/i386/obsd.mh: Likewise.
9504         * config/i386/obsd64.mh: Likewise.
9505         * config/i386/sol2-64.mh: Likewise.
9506         * config/ia64/linux.mh: Likewise.
9507         * config/m32r/linux.mh: Likewise.
9508         * config/m68k/linux.mh: Likewise.
9509         * config/m68k/nbsdelf.mh: Likewise.
9510         * config/m68k/obsd.mh: Likewise.
9511         * config/m88k/obsd.mh: Likewise.
9512         * config/mips/fbsd.mh: Likewise.
9513         * config/mips/linux.mh: Likewise.
9514         * config/mips/nbsd.mh: Likewise.
9515         * config/mips/obsd64.mh: Likewise.
9516         * config/pa/linux.mh: Likewise.
9517         * config/pa/nbsd.mh: Likewise.
9518         * config/pa/obsd.mh: Likewise.
9519         * config/powerpc/aix.mh: Likewise.
9520         * config/powerpc/fbsd.mh: Likewise.
9521         * config/powerpc/linux.mh: Likewise.
9522         * config/powerpc/nbsd.mh: Likewise.
9523         * config/powerpc/obsd.mh: Likewise.
9524         * config/powerpc/ppc64-linux.mh: Likewise.
9525         * config/powerpc/spu-linux.mh: Likewise.
9526         * config/s390/linux.mh: Likewise.
9527         * config/sh/nbsd.mh: Likewise.
9528         * config/sparc/fbsd.mh: Likewise.
9529         * config/sparc/linux.mh: Likewise.
9530         * config/sparc/linux64.mh: Likewise.
9531         * config/sparc/nbsd64.mh: Likewise.
9532         * config/sparc/nbsdelf.mh: Likewise.
9533         * config/sparc/obsd64.mh: Likewise.
9534         * config/sparc/sol2.mh: Likewise.
9535         * config/tilegx/linux.mh: Likewise.
9536         * config/vax/nbsdelf.mh: Likewise.
9537         * config/vax/obsd.mh: Likewise.
9538         * config/xtensa/linux.mh: Likewise.
9539         * config/i386/i386gnu.mn: New file, with excerpts from
9540         "config/i386/i386gnu.mh".
9541         * configure: Regenerate.
9542         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9543         *.mh files under "gdb/config".
9544         * configure.nat: New file, with contents from the
9545         "gdb/config/*/*.mh" files.
9546
9547 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9548
9549         * btrace.c (btrace_clear): Free insn vector.
9550
9551 2017-05-05  Pedro Alves  <palves@redhat.com>
9552
9553         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9554         * configure: Regenerate.
9555
9556 2017-05-04  Pedro Alves  <palves@redhat.com>
9557
9558         * Makefile.in (SFILES): Add progspace-and-thread.c.
9559         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9560         (COMMON_OBS): Add progspace-and-thread.o.
9561         * breakpoint.c: Include "progspace-and-thread.h".
9562         (update_inserted_breakpoint_locations)
9563         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9564         Use scoped_restore_current_pspace_and_thread.
9565         (create_std_terminate_master_breakpoint): Use
9566         scoped_restore_current_program_space.
9567         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9568         (print_breakpoint_location): Use
9569         scoped_restore_current_program_space.
9570         (bp_loc_is_permanent): Use
9571         scoped_restore_current_pspace_and_thread.
9572         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9573         (download_tracepoint_locations): Use
9574         scoped_restore_current_pspace_and_thread.
9575         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9576         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9577         (enum step_over_calls_kind): Moved from inferior.h.
9578         (class scoped_restore_current_thread): New class.
9579         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9580         declaration.
9581         (scoped_restore_current_thread): New class.
9582         * infcmd.c: Include "common/gdb_optional.h".
9583         (continue_1, proceed_after_attach): Use
9584         scoped_restore_current_thread.
9585         (notice_new_inferior): Use scoped_restore_current_thread.
9586         * inferior.c: Include "progspace-and-thread.h".
9587         (restore_inferior, save_current_inferior): Delete.
9588         (add_inferior_command, clone_inferior_command): Use
9589         scoped_restore_current_pspace_and_thread.
9590         * inferior.h (scoped_restore_current_inferior): New class.
9591         * infrun.c: Include "progspace-and-thread.h" and
9592         "common/gdb_optional.h".
9593         (follow_fork_inferior): Use
9594         scoped_restore_current_pspace_and_thread.
9595         (scoped_restore_exited_inferior): New class.
9596         (handle_vfork_child_exec_or_exit): Use
9597         scoped_restore_exited_inferior,
9598         scoped_restore_current_pspace_and_thread,
9599         scoped_restore_current_thread and scoped_restore.
9600         (fetch_inferior_event): Use scoped_restore_current_thread.
9601         * linespec.c (decode_line_full, decode_line_1): Use
9602         scoped_restore_current_program_space.
9603         * mi/mi-main.c: Include "progspace-and-thread.h".
9604         (exec_continue): Use scoped_restore_current_thread.
9605         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9606         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9607         * proc-service.c (ps_pglobal_lookup): Use
9608         scoped_restore_current_program_space.
9609         * progspace-and-thread.c: New file.
9610         * progspace-and-thread.h: New file.
9611         * progspace.c (release_program_space, clone_program_space): Use
9612         scoped_restore_current_program_space.
9613         (restore_program_space, save_current_program_space)
9614         (save_current_space_and_thread): Delete.
9615         (switch_to_program_space_and_thread): Moved to
9616         progspace-and-thread.c.
9617         * progspace.h (save_current_program_space)
9618         (save_current_space_and_thread): Delete declarations.
9619         (scoped_restore_current_program_space): New class.
9620         * remote.c (remote_btrace_maybe_reopen): Use
9621         scoped_restore_current_thread.
9622         * symtab.c: Include "progspace-and-thread.h".
9623         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9624         * thread.c (print_thread_info_1): Use
9625         scoped_restore_current_thread.
9626         (struct current_thread_cleanup): Delete.
9627         (do_restore_current_thread_cleanup)
9628         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9629         (scoped_restore_current_thread::~scoped_restore_current_thread):
9630         ... this new dtor.
9631         (make_cleanup_restore_current_thread): Rename/convert to ...
9632         (scoped_restore_current_thread::scoped_restore_current_thread):
9633         ... this new ctor.
9634         (thread_apply_all_command): Use scoped_restore_current_thread.
9635         (thread_apply_command): Use scoped_restore_current_thread.
9636         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9637         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9638
9639 2017-05-04  Pedro Alves  <palves@redhat.com>
9640
9641         * thread.c (make_cleanup_restore_current_thread): Move
9642         find_thread_ptid call before the is_stopped call.  Assert that the
9643         thread is found.  Replace is_stopped call by checking the thread's
9644         state directly.  Remove unnecessary NULL-thread check.
9645
9646 2017-05-04  Pedro Alves  <palves@redhat.com>
9647
9648         * corelow.c (thread_section_name): New class.
9649         (get_core_register_section, get_core_siginfo): Use it.
9650
9651 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9652
9653         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9654         (get_core_register_section): Remove xfree of NULL pointer.
9655
9656 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9657
9658         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9659         * regcache.c (regcache::raw_supply_zeroed): New function.
9660         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9661
9662 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9663
9664         * gdbarch.sh: Remove commented out definition of
9665         TARGET_CHAR_BIT.
9666         * gdbarch.h: Re-generate.
9667
9668 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9669
9670         * configure: Regenerate.
9671
9672 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9673
9674         * solib-target.c (solib_target_relocate_section_addresses):
9675         Remove num_section_bases, num_bases, segment_bases variables.
9676
9677 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9678
9679         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9680
9681 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9682
9683         * solib-target.c: Include <vector>
9684         (struct lm_info_target) <~lm_info_target>: Remove.
9685         <segment_bases, section_bases>: Change type to
9686         std::vector<CORE_ADDR>.
9687         (library_list_start_segment, library_list_start_section,
9688         library_list_end_library,
9689         solib_target_relocate_section_addresses): Adjust.
9690
9691 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9692
9693         * gdbarch.sh (software_single_step): Change return type to
9694         std::vector<CORE_ADDR>.
9695         * gdbarch.c, gdbarch.h: Re-generate.
9696         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9697         Adjust.
9698         (arm_deal_with_atomic_sequence_raw): Adjust.
9699         (thumb_get_next_pcs_raw): Adjust.
9700         (arm_get_next_pcs_raw): Adjust.
9701         (arm_get_next_pcs): Adjust.
9702         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9703         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9704         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9705         (alpha_software_single_step): Adjust.
9706         * alpha-tdep.h (alpha_software_single_step): Adjust.
9707         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9708         * arm-tdep.c (arm_software_single_step): Adjust.
9709         (arm_breakpoint_kind_from_current_state): Adjust.
9710         * arm-tdep.h (arm_software_single_step): Adjust.
9711         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9712         * cris-tdep.c (cris_software_single_step): Adjust.
9713         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9714         (micromips_deal_with_atomic_sequence): Adjust.
9715         (deal_with_atomic_sequence): Adjust.
9716         (mips_software_single_step): Adjust.
9717         * mips-tdep.h (mips_software_single_step): Adjust.
9718         * moxie-tdep.c (moxie_software_single_step): Adjust.
9719         * nios2-tdep.c (nios2_software_single_step): Adjust.
9720         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9721         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9722         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9723         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9724         * sparc-tdep.c (sparc_software_single_step): Adjust.
9725         * spu-tdep.c (spu_software_single_step): Adjust.
9726         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9727
9728 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9729
9730         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9731         * gdbarch.h: Re-generate.
9732
9733 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9734
9735         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9736         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9737         * python/py-instruction.c, python/py-instruction.h: New file.
9738         * python/py-record.c: Add py-instruction.h include.
9739         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9740         gdb.RecordInstruction.
9741         * python/python-internal.h: Add gdbpy_initialize_instruction
9742         declaration.
9743         * python/python.c (do_start_initialization): Add
9744         gdbpy_initialize_instruction.
9745
9746 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9747
9748         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9749         Remove.
9750         (btrace_func_from_recpy_func): New function.
9751         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9752         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9753         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9754         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9755         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9756         Also, use new helper functions.
9757         (btpy_list_item): Use new helper functions.
9758         (recpy_bt_function_call_history): Use new type name.
9759         (btpy_call_getset): Remove.
9760         (gdbpy_initialize_btrace): Remove code to initialize
9761         gdb.BtraceFunctionCall.
9762         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9763         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9764         recpy_bt_func_prev, recpy_bt_func_next): New export.
9765         * python/py-record.c (recpy_func_type): New static object.
9766         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9767         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9768         recpy_func_next): New function.
9769         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9770         (recpy_func_getset): New static object.
9771         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9772         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9773
9774 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9775
9776         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9777         (btpy_object, btpy_insn_type, btpy_new): Remove.
9778         (btpy_list_object): Use gdb.RecordInstruction type instead of
9779         gdb.BtraceInstruction type.
9780         (btrace_insn_from_recpy_insn): New function.
9781         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9782         btpy_new.
9783         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9784         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9785         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9786         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9787         instead of btpy_object.
9788         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9789         btpy_insn_data, btpy_insn_decode): Rename to ...
9790         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9791         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9792         recpy_bt_insn_decode): This.  Also, use new helper functions.
9793         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9794         recpy_insn_type.
9795         (btpy_insn_getset): Remove.
9796         (gdbpy_initialize_btrace): Remove code to initialize
9797         gdb.BtraceInstruction.  Use recpy_element_object.
9798         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9799         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9800         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9801         * python/py-record.c (recpy_insn_type): New static object.
9802         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9803         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9804         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9805         New function.
9806         (recpy_insn_getset): New static object.
9807         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9808         * python/py-record.h (recpy_element_object): New typedef.
9809         (recpy_insn_type, recpy_insn_new): New export.
9810
9811 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9812
9813         * py-record-btrace.c (btpy_insn_new): Removed.
9814         (btpy_insn_or_gap_new): New function.
9815         (btpy_insn_error): Removed.
9816         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9817         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9818         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9819         btpy_insn_or_gap_new instead of btpy_insn_new.
9820         (btpy_insn_getset): Remove btpy_insn_error.
9821         * py-record.c (recpy_gap_type): New static object.
9822         (recpy_gap_object): New typedef.
9823         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9824         recpy_gap_reason_string): New function.
9825         (recpy_gap_getset): New static object.
9826         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9827         * py-record.h (recpy_gap_new): New export.
9828
9829 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9830
9831         * python/py-record.c (recpy_ptid): Remove.
9832         (recpy_record_getset): Remove recpy_ptid.
9833
9834 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9835
9836         * btrace.c (btrace_fetch): Set inferior_ptid.
9837         * python/py-record-btrace.c: Add "py-record.h" include.
9838         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9839         recpy_bt_end, recpy_bt_instruction_history,
9840         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9841         in gdb.Record object instead of current ptid.
9842         * python/py-record.c: Include new "py-record.h" file.
9843         (recpy_record_object): Moved to py-record.h.
9844         * python/py-record.h: New file.
9845
9846 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9847
9848         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9849         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9850         indentation.
9851
9852 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9853
9854         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9855         the past maintainers section.
9856
9857 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9858
9859         * infcmd.c (get_return_value): Use regcache ctor, and remove
9860         cleanup.
9861
9862 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9863             Pedro Alves  <palves@redhat.com>
9864
9865         * regcache.c (regcache::regcache): New tag dispatch ctor.
9866         (do_cooked_read): Moved above.
9867         (regcache_dup): Use the tag dispatch ctor..
9868         * regcache.h (regcache): Declare ctor, delete copy ctor and
9869         assignment operator, remove friend regcache_dup.
9870
9871 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9872
9873         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9874         call method save instead of regcache_cpy.
9875         * regcache.h (struct regcache): Make regcache_dup a friend.
9876
9877 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9878
9879         * regcache.c (struct regcache): Move to regcache.h
9880         (regcache::arch): New method.
9881         (regcache_get_ptid): Update.
9882         (get_regcache_arch): Call arch method.
9883         (get_regcache_aspace): Call method aspace.
9884         (register_buffer): Change it to method.
9885         (regcache_save): Change it to regcache::save.
9886         (regcache_restore): Likewise.
9887         (regcache_cpy_no_passthrough): Remove the declaration.
9888         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9889         (regcache_cpy_no_passthrough): Change it to method
9890         cpy_no_passthrough.
9891         (regcache_register_status): Change it to method
9892         get_register_status.
9893         (regcache_invalidate): Change it to method invalidate.
9894         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9895         (regcache_raw_update): Change it to method raw_update.
9896         (regcache_raw_read): Likewise.
9897         (regcache_raw_read_signed): Likewise.
9898         (regcache_raw_read_unsigned): Likewise.
9899         (regcache_raw_write_signed): Likewise.
9900         (regcache_raw_write_unsigned): Likewise.
9901         (regcache_cooked_read): Likewise.
9902         (regcache_cooked_read_value): Likewise.
9903         (regcache_cooked_read_signed): Likewise.
9904         (regcache_cooked_read_unsigned): Likewise.
9905         (regcache_cooked_write_signed): Likewise.
9906         (regcache_cooked_write_unsigned): Likewise.
9907         (regcache_raw_set_cached_value): Likewise.
9908         (regcache_raw_write): Likewise.
9909         (regcache_cooked_write): Likewise.
9910         (regcache_xfer_part): Likewise.
9911         (regcache_raw_read_part): Likewise.
9912         (regcache_raw_write_part): Likewise.
9913         (regcache_cooked_read_part): Likewise.
9914         (regcache_cooked_write_part): Likewise.
9915         (regcache_raw_supply): Likewise.
9916         (regcache_raw_collect): Likewise.
9917         (regcache_transfer_regset): Likewise.
9918         (regcache_supply_regset): Likewise.
9919         (regcache_collect_regset): Likewise.
9920         (regcache_debug_print_register): Likewise.
9921         (enum regcache_dump_what): Move it to regcache.h.
9922         (regcache_dump): Change it to method dump.
9923         * regcache.h (enum regcache_dump_what): New.
9924         (class regcache): New.
9925         * target.c (target_fetch_registers): Call method
9926         debug_print_register.
9927         (target_store_registers): Likewise.
9928
9929 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9930
9931         * windows-nat.c (struct lm_info_windows): Initialize field.
9932         (windows_make_so): Allocate lm_info_windows with new.
9933         (windows_free_so): Free lm_info_windows with delete.
9934
9935 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9936
9937         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9938         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9939         cleanup.
9940         (darwin_free_so): Free lm_info_darwin with delete.
9941
9942 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9943
9944         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9945         <l_addr_p>: Change type to bool.
9946         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9947         (svr4_free_so): Free lm_info_svr4 with delete.
9948         (svr4_copy_library_list): Replace memcpy with call to copy
9949         constructor.
9950         (library_list_start_library, svr4_default_sos): Allocate
9951         lm_info_svr4 with new.
9952
9953 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9954
9955         * solib-target.c (struct lm_info_target): Add destructor,
9956         initialize fields.
9957         <name>: Change type to std::string.
9958         (library_list_start_library): Allocate lm_info_target with new.
9959         (solib_target_free_library_list): Free lm_info_target with
9960         delete.
9961         (solib_target_current_sos): Adapt to std::string.
9962         (solib_target_free_so): Free lm_info_target with delete.
9963
9964 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9965
9966         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9967         fields.
9968         (frv_current_sos): Allocate lm_info_frv with new.
9969         (frv_relocate_main_executable): Free lm_info_frv with delete,
9970         allocate with new.
9971         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9972
9973 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9974
9975         * solib-frv.c (struct lm_info_frv): Fix indentation.
9976
9977 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9978
9979         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9980         map field.
9981         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9982         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9983         and allocate with new.
9984         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9985
9986 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9987
9988         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9989         <filename, member_name>: Change type to std::string.
9990         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9991         (library_list_start_library): Allocate lm_info_aix with new.
9992         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9993         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9994         with copy constructor.
9995
9996 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9997
9998         * solist.h (struct lm_info): Remove.
9999         (struct lm_info_base): New class.
10000         (struct so_list) <lm_info>: Change type to lm_info_base *.
10001         * nto-tdep.c (struct lm_info): Remove.
10002         (lm_addr): Adjust.
10003         * solib-aix.c (struct lm_info): Rename to ...
10004         (struct lm_info_aix): ... this.  Extend lm_info_base.
10005         (lm_info_p): Rename to ...
10006         (lm_info_aix_p): ... this, and adjust.
10007         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10008         solib_aix_parse_libraries, library_list_start_library,
10009         solib_aix_free_library_list, solib_aix_parse_libraries,
10010         solib_aix_get_library_list,
10011         solib_aix_relocate_section_addresses, solib_aix_free_so,
10012         solib_aix_get_section_offsets,
10013         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10014         Adjust.
10015         (struct solib_aix_inferior_data) <library_list>: Adjust.
10016         * solib-darwin.c (struct lm_info): Rename to ...
10017         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10018         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10019         * solib-dsbt.c (struct lm_info): Rename to ...
10020         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10021         (struct dsbt_info) <main_executable_lm_info): Adjust.
10022         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10023         dsbt_relocate_section_addresses): Adjust.
10024         * solib-frv.c (struct lm_info): Rename to ...
10025         (struct lm_info_frv): ... this.  Extend lm_info_base.
10026         (main_executable_lm_info): Adjust.
10027         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10028         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10029         find_canonical_descriptor_in_load_object,
10030         frv_fdpic_find_canonical_descriptor): Adjust.
10031         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10032         to lm_info_svr4.
10033         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10034         svr4_clear_so, svr4_copy_library_list,
10035         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10036         svr4_current_sos, svr4_fetch_objfile_link_map,
10037         solist_update_incremental): Adjust.
10038         * solib-svr4.h (struct lm_info_svr4): Move here from
10039         solib-svr4.c.
10040         * solib-target.c (struct lm_info): Rename to ...
10041         (struct lm_info_target): ... this.  Extend lm_info_base.
10042         (lm_info_p): Rename to ...
10043         (lm_info_target_p): ... this.
10044         (solib_target_parse_libraries, library_list_start_segment,
10045         library_list_start_section, library_list_start_library,
10046         library_list_end_library, solib_target_free_library_list,
10047         solib_target_current_sos, solib_target_free_so,
10048         solib_target_relocate_section_addresses): Adjust.
10049         * windows-nat.c (struct lm_info): Rename to ...
10050         (struct lm_info_windows): ... this.  Extend lm_info_base.
10051         (windows_make_so, handle_load_dll, handle_unload_dll,
10052         windows_xfer_shared_libraries): Adjust.
10053
10054 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10055
10056         * solib-darwin.c (struct darwin_so_list): Remove.
10057         (darwin_current_sos): Allocate an so_list object instead of a
10058         darwin_so_list, separately allocate an lm_info object.
10059         (darwin_free_so): Free lm_info.
10060
10061 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10062
10063         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10064         with fprintf_filtered.
10065
10066 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10067
10068         * regcache.c (regcache::regcache): New function.
10069         (regcache::~regcache): New function.
10070         (regcache_xmalloc_1): Remove.
10071         (regcache_xmalloc): Call new regcache.
10072         (regcache_xfree): Call delete regcache.
10073         (get_thread_arch_aspace_regcache): Call new regcache.
10074
10075 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10076
10077         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10078         lwp instead of ptid_get_lwp.
10079
10080 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10081
10082         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10083         lwp_info instead of getting from inferior_ptid.
10084
10085 2017-04-27  Keith Seitz  <keiths@redhat.com>
10086
10087         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10088         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10089         (CV_CONVERSION_BADNESS): Define.
10090         (rank_one_type): Remove overly restrictive rvalue reference
10091         rank checks.
10092         Add cv-qualifier checks and subranks for type equality.
10093         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10094         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10095         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10096
10097 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10098
10099         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10100         count when creating the object.
10101
10102 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10103             Ulrich Weigand  <uweigand@de.ibm.com>
10104
10105         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10106         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10107         is used in AIX.
10108         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10109         (process_xcoff_symbol): Likewise.
10110         (scan_xcoff_symtab): Likewise.
10111
10112 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10113
10114         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10115         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10116         (ia64_access_reg): Use get_frame_register_unsigned.
10117         (ia64_access_rse_reg): Likewise.
10118         (ia64_libunwind_frame_prev_register): Likewise.
10119
10120 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10121
10122         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10123         * gdbarch.c: Regenerated.
10124         * gdbarch.h: Regenerated.
10125         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10126         visibility external.
10127         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10128         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10129         (enum cfa_how_kind): Move to ...
10130         (struct dwarf2_frame_state_reg_info): Likewise.
10131         (struct dwarf2_frame_state): Likewise.
10132         * dwarf2-frame.h: ... here.
10133         (dwarf2_frame_state_alloc_regs): New declaration.
10134         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10135         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10136
10137 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10138
10139         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10140         regcache_raw_read_unsigned.
10141         (xtensa_pseudo_register_write): Likewise.
10142
10143 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10144
10145         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10146         (nds32_pseudo_register_write): Likewise.
10147
10148 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10149
10150         * regcache.c (struct regcache) <readonly_p>: Change its type
10151         to bool.
10152         (regcache_xmalloc_1): Update parameter type and callers update.
10153
10154 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10155
10156         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10157         set_gdbarch_wchar_bit.
10158         * arm-tdep.c (arm_gdbarch_init): Likewise.
10159
10160 2017-04-25  Pedro Alves  <palves@redhat.com>
10161
10162         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10163         (BothAreRelocatable, memcopy, memmove): Don't define.
10164         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10165         macros.
10166
10167 2017-04-25  Pedro Alves  <palves@redhat.com>
10168
10169         * common/common-defs.h: Include "common/poison.h".
10170         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10171         and adjust.
10172         * common/poison.h: New file.
10173         * common/traits.h: Include <type_traits>.
10174         (Not, Or, Requires): New, moved from common/function-view.h.
10175
10176 2017-04-25  Pedro Alves  <palves@redhat.com>
10177
10178         * breakpoint.h (struct breakpoint): In-class initialize all
10179         fields.  Make boolean fields "bool".
10180         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10181         memset call and initializations no longer necessary.
10182
10183 2017-04-25  Pedro Alves  <palves@redhat.com>
10184
10185         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10186         reference.
10187         (pt_btrace_insn): New function.
10188         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10189
10190 2017-04-25  Pedro Alves  <palves@redhat.com>
10191
10192         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10193         "base" field and inherit from "bp_location" instead.  Add
10194         non-default ctor.
10195         (allocate_location_exception): Use new non-default ctor.
10196         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10197         (init_bp_location): Convert to ...
10198         (bp_location::bp_location): ... this new ctor, and remove memset
10199         call.
10200         (base_breakpoint_allocate_location): Use the new non-default ctor.
10201         * breakpoint.h (bp_location): Now a class.  Declare default and
10202         non-default ctors.  In-class initialize all members.
10203         (init_bp_location): Remove declaration.
10204
10205 2017-04-25  Pedro Alves  <palves@redhat.com>
10206
10207         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10208         assignment operator.
10209
10210 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10211
10212         * doublest.c (convert_doublest_to_floatformat): Call
10213         floatformat_totalsize_bytes.
10214
10215 2017-04-22  Tom Tromey  <tom@tromey.com>
10216
10217         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10218         ui_out_emit_list.
10219         * stack.c (print_frame): Use ui_out_emit_list.
10220         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10221         ui_out_emit_list.
10222         * mi/mi-main.c (print_one_inferior)
10223         (mi_cmd_data_list_register_names)
10224         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10225         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10226         ui_out_emit_list.
10227         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10228         (mi_output_solib_attribs): Use ui_out_emit_list,
10229         ui_out_emit_tuple.
10230         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10231         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10232         (mi_cmd_stack_list_args, list_args_or_locals): Use
10233         ui_out_emit_list.
10234         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10235         * breakpoint.c (print_solib_event, output_thread_groups): Use
10236         ui_out_emit_list.
10237
10238 2017-04-22  Tom Tromey  <tom@tromey.com>
10239
10240         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10241         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10242         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10243
10244 2017-04-22  Tom Tromey  <tom@tromey.com>
10245
10246         * tracepoint.c (tvariables_info_1)
10247         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10248
10249 2017-04-22  Tom Tromey  <tom@tromey.com>
10250
10251         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10252         annotate_arg_emitter.
10253         * breakpoint.c (print_mention_watchpoint)
10254         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10255         * annotate.h (struct annotate_arg_emitter): New.
10256
10257 2017-04-22  Tom Tromey  <tom@tromey.com>
10258
10259         * record-btrace.c (record_btrace_insn_history)
10260         (record_btrace_insn_history_range, record_btrace_call_history)
10261         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10262         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10263         ui_out_emit_tuple.
10264         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10265         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10266         * skip.c (skip_info): Use ui_out_emit_tuple.
10267         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10268         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10269         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10270         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10271         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10272         ui_out_emit_tuple.
10273         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10274         (output_register, mi_cmd_data_read_memory)
10275         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10276         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10277         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10278         Use ui_out_emit_tuple.
10279         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10280         ui_out_emit_tuple.
10281         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10282         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10283         * linux-thread-db.c (info_auto_load_libthread_db): Use
10284         ui_out_emit_tuple.
10285         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10286         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10287         * disasm.c (do_mixed_source_and_assembly_deprecated)
10288         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10289         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10290         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10291         * breakpoint.c (print_one_breakpoint_location)
10292         (print_one_breakpoint): Use ui_out_emit_tuple.
10293         * auto-load.c (print_script, info_auto_load_cmd): Use
10294         ui_out_emit_tuple.
10295         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10296
10297 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10298
10299         * thread.c (print_thread_info_1): Remove dead code.
10300
10301 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10302
10303         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10304         GDB_SELF_TEST.
10305         * arm-tdep.c (selftests::arm_record_test): Likewise.
10306
10307 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10308
10309         * regcache.c (regcache_restore): Remove argument 2.  Replace
10310         argument 3 with regcache.  Get register status from
10311         src->register_status and get register contents from
10312         register_buffer (src, regnum).
10313         (regcache_cpy): Update.
10314
10315 2017-04-19  Pedro Alves  <palves@redhat.com>
10316
10317         * gdbthread.h (thread): Add missing closing parenthesis in
10318         comment.
10319
10320 2017-04-19  Pedro Alves  <palves@redhat.com>
10321
10322         * common/refcounted-object.h: New file.
10323         * gdbthread.h: Include "common/refcounted-object.h".
10324         (thread_info): Inherit from refcounted_object and add comments.
10325         (thread_info::incref, thread_info::decref)
10326         (thread_info::m_refcount): Delete.
10327         (thread_info::deletable): Use the refcounted_object::refcount()
10328         method.
10329         * inferior.c (current_inferior_): Add comment.
10330         (set_current_inferior): Increment/decrement refcounts.
10331         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10332         not-deletable instead of comparing with the current inferior.
10333         (initialize_inferiors): Increment the initial inferior's refcount.
10334         * inferior.h (struct inferior): Forward declare.
10335         Include "common/refcounted-object.h".
10336         (current_inferior, set_current_inferior): Move declaration to
10337         before struct inferior's definition, and fix comment.
10338         (inferior): Inherit from refcounted_object.  Add comments.
10339         * thread.c (switch_to_thread_no_regs): Reference the thread's
10340         inferior pointer directly instead of doing a ptid lookup.
10341         (switch_to_no_thread): New function.
10342         (switch_to_thread(thread_info *)): New function, factored out
10343         from ...
10344         (switch_to_thread(ptid_t)): ... this.
10345         (restore_current_thread): Delete.
10346         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10347         fields, and add 'inf' field.
10348         (do_restore_current_thread_cleanup): Check whether old->inf is
10349         alive instead of looking up an inferior by ptid.  Use
10350         switch_to_thread and switch_to_no_thread.
10351         (restore_current_thread_cleanup_dtor): Use old->inf directly
10352         instead of lookup up an inferior by id.  Decref the inferior.
10353         Don't restore 'removable'.
10354         (make_cleanup_restore_current_thread): Same the inferior pointer
10355         in old, instead of the inferior number.  Incref the inferior.
10356         Don't save/clear 'removable'.
10357
10358 2017-04-19  Pedro Alves  <palves@redhat.com>
10359
10360         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10361         unittests/scoped_restore-selftests.c.
10362         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10363         * common/scoped_restore.h (scoped_restore_base): Make "class".
10364         (scoped_restore_base::release): New public method.
10365         (scoped_restore_base::scoped_restore_base): New protected ctor.
10366         (scoped_restore_base::m_saved_var): New protected field.
10367         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10368         scoped_restore_base base class instead of m_saved_var directly.
10369         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10370         (scoped_restore_tmpl::scoped_restore_tmpl(const
10371         scoped_restore_tmpl<T>&)): Likewise.
10372         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10373         method.
10374         (scoped_restore_tmpl::saved_var): New method.
10375         (scoped_restore_tmpl::m_saved_var): Delete.
10376         * inferior.h (inferior::detaching): Now a bool.
10377         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10378         cleanup.
10379         * unittests/scoped_restore-selftests.c: New file.
10380
10381 2017-04-19  Pedro Alves  <palves@redhat.com>
10382
10383         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10384         Re-sort in alphabetic order.
10385
10386 2017-04-18  Pedro Alves  <palves@redhat.com>
10387
10388         * xml-support.c (obstack_xml_printf): Delete.
10389         * xml-support.h (obstack_xml_printf): Delete.
10390
10391 2017-04-18  Pedro Alves  <palves@redhat.com>
10392
10393         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10394         vdebug, verror, body_text, start_element, end_element, name,
10395         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10396         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10397         is_xinclude>: Make private and add m_ prefix.
10398         (gdb_xml_parser::body_text): New method, based on ...
10399         (gdb_xml_body_text): ... this.  Adjust.
10400         (gdb_xml_parser::vdebug): New method, based on ...
10401         (gdb_xml_debug): ... this.  Adjust.
10402         (gdb_xml_parser::verror): New method, based on ...
10403         (gdb_xml_error): ... this.  Adjust.
10404         (gdb_xml_parser::start_element): New method, based on ...
10405         (gdb_xml_start_element): ... this.  Adjust.
10406         (gdb_xml_start_element_wrapper): Defer to
10407         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10408         (gdb_xml_parser::end_element): New method, based on ...
10409         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10410         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10411         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10412         (gdb_xml_parser::use_dtd): New method, based on ...
10413         (gdb_xml_use_dtd): ... this.  Adjust.
10414         (gdb_xml_parser::parse): New method, based on ...
10415         (gdb_xml_parse): ... this.  Adjust.
10416         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10417         (xinclude_start_include): Adjust to call the parser's name method.
10418         (xml_xinclude_default, xml_xinclude_start_doctype)
10419         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10420         method.
10421         (xml_process_xincludes): Adjust to call parser methods.
10422         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10423         declarations.
10424
10425 2017-04-18  Pedro Alves  <palves@redhat.com>
10426
10427         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10428         gdb::optional<std::string>.
10429         * xml-support.c: Include <string>.
10430         (scope_level::scope_level(scope_level &&))
10431         (scope_level::~scope_level): Delete.
10432         (scope_level::body): Now a std::string.
10433         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10434         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10435         parameter.
10436         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10437         (xinclude_parsing_data::output): Now a std::string reference.
10438         (xinclude_start_include): Adjust.
10439         (xml_xinclude_default): Adjust.
10440         (xml_process_xincludes): Add 'output' parameter, and return bool.
10441         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10442         and return bool.
10443         * xml-tdesc.c: Include <unordered_map> and <string>.
10444         (tdesc_xml_cache): Delete.
10445         (tdesc_xml_cache_s): Delete.
10446         (xml_cache): Now an std::unordered_map.
10447         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10448         (target_fetch_description_xml): Change return type to
10449         gdb::optional<std::string>, and adjust.
10450         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10451         (target_fetch_description_xml): Change return type to
10452         gdb::optional<std::string>.
10453
10454 2017-04-18  Pedro Alves  <palves@redhat.com>
10455
10456         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10457         unittests/optional-selftests.c.
10458         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10459         * unittests/optional-selftests.c: New file.
10460         * unittests/optional/assignment/1.cc: New file.
10461         * unittests/optional/assignment/2.cc: New file.
10462         * unittests/optional/assignment/3.cc: New file.
10463         * unittests/optional/assignment/4.cc: New file.
10464         * unittests/optional/assignment/5.cc: New file.
10465         * unittests/optional/assignment/6.cc: New file.
10466         * unittests/optional/assignment/7.cc: New file.
10467         * unittests/optional/cons/copy.cc: New file.
10468         * unittests/optional/cons/default.cc: New file.
10469         * unittests/optional/cons/move.cc: New file.
10470         * unittests/optional/cons/value.cc: New file.
10471         * unittests/optional/in_place.cc: New file.
10472         * unittests/optional/observers/1.cc: New file.
10473         * unittests/optional/observers/2.cc: New file.
10474
10475 2017-04-18  Pedro Alves  <palves@redhat.com>
10476
10477         * common/gdb_optional.h: Include common/traits.h.
10478         (in_place_t): New type.
10479         (in_place): New constexpr variable.
10480         (optional::optional): Remove member initialization of
10481         m_instantiated.
10482         (optional::optional(in_place_t...)): New constructor.
10483         (optional::~optional): Use reset.
10484         (optional::optional(const optional&)): New.
10485         (optional::optional(const optional&&)): New.
10486         (optional::optional(T &)): New.
10487         (optional::optional(T &&)): New.
10488         (operator::operator=(const optional &)): New.
10489         (operator::operator=(optional &&)): New.
10490         (operator::operator= (const T &))
10491         (operator::operator= (T &&))
10492         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10493         (operator::reset): New.
10494         (operator::m_instantiated):: Add in-class initializer.
10495         * common/traits.h: Include <type_traits>.
10496         (struct And): New types.
10497
10498 2017-04-18  Pedro Alves  <palves@redhat.com>
10499
10500         * xml-support.c: Include <vector>.
10501         (scope_level::scope_level(const gdb_xml_element *))
10502         (scope_level::scope_level(scope_level&&)): New.
10503         (scope_level::~scope_level): New.
10504         (scope_level_s): Delete.
10505         (gdb_xml_parser::scopes): Now a std::vector.
10506         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10507         Use std::vector.
10508         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10509         scope cleanup code.
10510         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10511         of the scopes member.  Use std::vector::emplace_back.
10512
10513 2017-04-18  Pedro Alves  <palves@redhat.com>
10514
10515         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10516         a bool.
10517         (gdb_xml_end_element): Change type of first parameter.
10518         (gdb_xml_cleanup): Rename to ...
10519         (gdb_xml_parser::~gdb_xml_parser): ... this.
10520         (gdb_xml_create_parser_and_cleanup): Delete with ...
10521         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10522         to this new ctor.
10523         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10524         using gdb_xml_create_parser_and_cleanup.
10525         (xinclude_parsing_data): Add ctor/dtor.
10526         (xml_xinclude_cleanup): Delete.
10527         (xml_process_xincludes): Create a local xinclude_parsing_data
10528         instead of heap-allocating one.  Create a local gdb_xml_parser
10529         instead of heap-allocating one with
10530         gdb_xml_create_parser_and_cleanup.
10531
10532 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10533
10534         PR threads/20743
10535         * fbsd-nat.c (resume_one_thread_cb): Remove.
10536         (resume_all_threads_cb): Remove.
10537         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10538         iterate_over_threads.
10539
10540 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10541
10542         * NEWS: Create a new section for the next release branch.
10543         Rename the section of the current branch, now that it has
10544         been cut.
10545
10546 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10547
10548         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10549         * version.in: Bump version to 8.0.50.DATE-git.
10550
10551 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10552
10553         PR gdb/21385
10554         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10555         independently of the host, and fix build breakage on Cygwin.
10556
10557 2017-04-13  Pedro Alves  <palves@redhat.com>
10558
10559         * inferior.c (free_inferior): Convert to ...
10560         (inferior::~inferior): ... this dtor.
10561         (inferior::inferior): New ctor, factored out from ...
10562         (add_inferior_silent): ... here.  Allocate the inferior with a new
10563         expression.
10564         (delete_inferior): Call delete instead of free_inferior.
10565         * inferior.h (gdb_environ, continuation): Forward declare.
10566         (inferior): Now a class.  Add in-class initialization to all
10567         members.  Make boolean fields bool, except 'detaching'.
10568         (inferior::inferior): New explicit ctor.
10569         (inferior::~inferior): New.
10570
10571 2017-04-13  Pedro Alves  <palves@redhat.com>
10572
10573         * inferior.c (init_inferior_list): Delete.
10574         * inferior.h (init_inferior_list): Delete.
10575
10576 2017-04-13  Pedro Alves  <palves@redhat.com>
10577
10578         PR threads/13217
10579         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10580         (top level): Call it twice, with different thread sets.
10581
10582 2017-04-13  Pedro Alves  <palves@redhat.com>
10583
10584         * thread.c: Include <algorithm>.
10585         (thread_array_cleanup): Delete.
10586         (scoped_inc_dec_ref): New class.
10587         (live_threads_count): New function.
10588         (set_thread_refcount): Delete.
10589         (tp_array_compar_ascending): Now a bool.
10590         (tp_array_compar): Convert to a std::sort comparison function.
10591         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10592         and live_threads_count.
10593
10594 2017-04-13  Pedro Alves  <palves@redhat.com>
10595
10596         * infrun.c (follow_fork_inferior): Also switch the current
10597         inferior.
10598
10599 2017-04-13  Pedro Alves  <palves@redhat.com>
10600
10601         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10602         before calling create_internal_breakpoint.
10603
10604 2017-04-13  Pedro Alves  <palves@redhat.com>
10605
10606         * fork-child.c (execv_argv): New class.
10607         (breakup_args): Refactored as ...
10608         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10609         Copy arguments to storage and replace separators with NULL
10610         terminators in place.
10611         (escape_bang_in_quoted_argument): Adjust to return bool.
10612         (execv_argv::execv_argv): New ctor.
10613         (execv_argv::init_for_shell): New method, factored out from
10614         fork_inferior.  Don't strdup strings into the vector.
10615         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10616         Remove free_vector_argv call.
10617
10618 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10619
10620         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10621         tdep->rx_psw_type.
10622
10623 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10624
10625         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10626         * rx-tdep.c (rx_gdbarch_init): Likewise.
10627
10628 2017-04-13  Pedro Alves  <palves@redhat.com>
10629
10630         * breakpoint.h (struct breakpoint): Reindent.
10631
10632 2017-04-13  Pedro Alves  <palves@redhat.com>
10633
10634         * breakpoint.c (bp_location): Rename to ...
10635         (bp_locations): ... this.  All references updated.
10636         (bp_location_count): Rename to ...
10637         (bp_locations_count): ... this.  All references updated.
10638         (bp_location_placed_address_before_address_max): Rename to ...
10639         (bp_locations_placed_address_before_address_max): ... this.  All
10640         references updated.
10641         (bp_location_shadow_len_after_address_max): Rename to ...
10642         (bp_locations_shadow_len_after_address_max): ... this.  All
10643         references updated.
10644         (bp_location_compare_addrs): Rename to ...
10645         (bp_locations_compare_addrs): ... this.  All references updated.
10646         (bp_location_compare):Rename to ...
10647         (bp_locations_compare): ... this.  All references updated.
10648         (bp_location_target_extensions_update): Rename to ...
10649         (bp_locations_target_extensions_update): ... this.  All references
10650         updated.
10651
10652 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10653
10654         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10655         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10656         'sgtty.h'.
10657         * common/gdb_termios.h: New file, with parts of "terminal.h".
10658         * inflow.c: Include "gdb_termios.h".
10659         * ser-unix.c: Include "gdb_termios.h".
10660         * terminal.h: Move terminal-related defines to
10661         "common/gdb_termios.h".
10662
10663 2017-04-12  Tom Tromey  <tom@tromey.com>
10664
10665         * probe.c (parse_probes): Update.
10666         * location.h (delete_event_location): Don't declare.
10667         (event_location_deleter::operator()): Update.
10668         * location.c (event_location_deleter::operator()): Rename from
10669         delete_event_location.
10670         * linespec.h (linespec_result) <location>: Change type to
10671         event_location_up.
10672         * linespec.c (canonicalize_linespec, event_location_to_sals)
10673         (decode_objc): Update.
10674         (linespec_result): Don't call delete_event_location.
10675         * breakpoint.c (create_breakpoints_sal)
10676         (bkpt_probe_create_sals_from_location)
10677         (strace_marker_create_sals_from_location): Update.
10678
10679 2017-04-12  Tom Tromey  <tom@tromey.com>
10680
10681         * linespec.h (struct linespec_result): Add constructor and
10682         destructor.
10683         (init_linespec_result, destroy_linespec_result)
10684         (make_cleanup_destroy_linespec_result): Don't declare.
10685         * linespec.c (init_linespec_result): Remove.
10686         (linespec_result::~linespec_result): Rename from
10687         destroy_linespec_result.  Update.
10688         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10689         Remove.
10690         * breakpoint.c (create_breakpoint, break_range_command)
10691         (decode_location_default): Update.
10692         * ax-gdb.c (agent_command_1): Update.
10693
10694 2017-04-12  Tom Tromey  <tom@tromey.com>
10695
10696         * remote.c (remote_download_tracepoint): Update.
10697         * python/py-breakpoint.c (bppy_get_location): Update.
10698         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10699         (gdbscm_breakpoint_location): Update.
10700         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10701         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10702         Change type to event_location_up.
10703         * breakpoint.c (create_overlay_event_breakpoint)
10704         (create_longjmp_master_breakpoint)
10705         (create_std_terminate_master_breakpoint)
10706         (create_exception_master_breakpoint)
10707         (breakpoint_event_location_empty_p, print_breakpoint_location)
10708         (print_one_breakpoint_location, create_thread_event_breakpoint)
10709         (init_breakpoint_sal, create_breakpoint)
10710         (print_recreate_ranged_breakpoint, break_range_command)
10711         (init_ada_exception_breakpoint, say_where): Update.
10712         (base_breakpoint_dtor): Don't call delete_event_location.
10713         (bkpt_print_recreate, tracepoint_print_recreate)
10714         (dprintf_print_recreate, update_static_tracepoint)
10715         (breakpoint_re_set_default): Update.
10716
10717 2017-04-12  Tom Tromey  <tom@tromey.com>
10718
10719         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10720         type of "to_do".  Update.
10721         (compute_stack_depth): Use std::vector.
10722
10723 2017-04-12  Tom Tromey  <tom@tromey.com>
10724
10725         * printcmd.c (find_instruction_backward): Use std::vector.
10726
10727 2017-04-12  Tom Tromey  <tom@tromey.com>
10728
10729         * symfile.c (objfilep): Remove typedef.
10730         (reread_symbols): Use a std::vector.
10731
10732 2017-04-12  Tom Tromey  <tom@tromey.com>
10733
10734         * mi/mi-main.c (exec_direction_forward): Remove.
10735         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10736         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10737         scoped_restore.
10738         * guile/guile.c (guile_repl_command, guile_command)
10739         (gdbscm_execute_gdb_command): Use scoped_restore.
10740         * go-exp.y (go_parse): Use scoped_restore.
10741         * d-exp.y (d_parse): Use scoped_restore.
10742         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10743         * c-exp.y (c_parse): Use scoped_restore.
10744
10745 2017-04-12  Tom Tromey  <tom@tromey.com>
10746
10747         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10748         (mi_parse): Update return type.
10749         (mi_parse_free): Remove.
10750         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10751         (mi_parse::~mi_parse): Rename from mi_parse_free.
10752         (mi_parse_cleanup): Remove.
10753         (mi_parse): Return a unique_ptr.  Use new.
10754         * mi/mi-main.c (mi_execute_command): Update.
10755
10756 2017-04-12  Tom Tromey  <tom@tromey.com>
10757
10758         * location.c (explicit_location_lex_one): Return a
10759         unique_xmalloc_ptr.
10760         (string_to_explicit_location): Update.  Remove cleanups.
10761
10762 2017-04-12  Tom Tromey  <tom@tromey.com>
10763
10764         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10765         (compare_value_and_voffset): Change type.  Update.
10766         (compute_vtable_size): Change type of "offset_vec".
10767         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10768         (gnuv3_get_typeid): Remove extraneous declaration.
10769
10770 2017-04-12  Tom Tromey  <tom@tromey.com>
10771
10772         * charset.h (wchar_iterator): Fix comment.
10773
10774 2017-04-12  Tom Tromey  <tom@tromey.com>
10775
10776         * charset.c (iconv_wrapper): New class.
10777         (cleanup_iconv): Remove.
10778         (convert_between_encodings): Use it.
10779
10780 2017-04-12  Tom Tromey  <tom@tromey.com>
10781
10782         * symfile.h (increment_reading_symtab): Update type.
10783         * symfile.c (decrement_reading_symtab): Remove.
10784         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10785         * psymtab.c (psymtab_to_symtab): Update.
10786         * dwarf2read.c (dw2_instantiate_symtab): Update.
10787
10788 2017-04-12  Tom Tromey  <tom@tromey.com>
10789
10790         * jit.c (struct jit_reader): Declare separately.  Add constructor
10791         and destructor.  Change type of "handle".
10792         (loaded_jit_reader): Define separately.
10793         (jit_reader_load): Update.  New "new".
10794         (jit_reader_unload_command): Use "delete".
10795         * gdb-dlfcn.h (struct dlclose_deleter): New.
10796         (gdb_dlhandle_up): New typedef.
10797         (gdb_dlopen, gdb_dlsym): Update types.
10798         (gdb_dlclose): Remove.
10799         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10800         (gdb_dlsym): Change type of "handle".
10801         (make_cleanup_dlclose): Remove.
10802         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10803         * compile/compile-c-support.c (load_libcc): Update.
10804
10805 2017-04-12  Tom Tromey  <tom@tromey.com>
10806
10807         * symtab.h (find_pcs_for_symtab_line): Change return type.
10808         * symtab.c (find_pcs_for_symtab_line): Change return type.
10809         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10810         type of "vec".  Update.
10811         (ltpy_get_pcs_for_line): Update.
10812         * linespec.c (decode_digits_ordinary): Update.
10813
10814 2017-04-12  Tom Tromey  <tom@tromey.com>
10815
10816         * tracepoint.c (actions_command): Update.
10817         * python/python.c (python_command, python_interactive_command):
10818         Update.
10819         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10820         * guile/guile.c (guile_command): Update.
10821         * defs.h (read_command_lines, read_command_lines_1): Return
10822         command_line_up.
10823         (command_lines_deleter): New struct.
10824         (command_line_up): New typedef.
10825         * compile/compile.c (compile_code_command)
10826         (compile_print_command): Update.
10827         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10828         command_line_up.
10829         (make_cleanup_free_command_lines): Remove.
10830         * cli/cli-script.c (get_command_line, read_command_lines_1)
10831         (copy_command_lines): Return command_line_up.
10832         (while_command, if_command, read_command_lines, define_command)
10833         (document_command): Update.
10834         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10835         Remove.
10836         * breakpoint.h (breakpoint_set_commands): Change type of
10837         "commands".
10838         * breakpoint.c (breakpoint_set_commands): Change type of
10839         "commands".  Update.
10840         (do_map_commands_command, update_dprintf_command_list)
10841         (create_tracepoint_from_upload): Update.
10842
10843 2017-04-12  Tom Tromey  <tom@tromey.com>
10844
10845         * tracepoint.c (scope_info): Update.
10846         * spu-tdep.c (spu_catch_start): Update.
10847         * python/python.c (gdbpy_decode_line): Update.
10848         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10849         * python/py-breakpoint.c (bppy_init): Update.
10850         * probe.c (parse_probes): Update.
10851         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10852         * location.h (event_location_deleter): New struct.
10853         (event_location_up): New typedef.
10854         (new_linespec_location, new_address_location, new_probe_location)
10855         (new_explicit_location, copy_event_location)
10856         (string_to_event_location, string_to_event_location_basic)
10857         (string_to_explicit_location): Update return type.
10858         (make_cleanup_delete_event_location): Remove.
10859         * location.c (new_linespec_location, new_address_location)
10860         (new_probe_location, new_explicit_location, copy_event_location):
10861         Return event_location_up.
10862         (delete_event_location_cleanup)
10863         (make_cleanup_delete_event_location): Remove.
10864         (string_to_explicit_location, string_to_event_location_basic)
10865         (string_to_event_location): Return event_location_up.
10866         * linespec.c (canonicalize_linespec, event_location_to_sals)
10867         (decode_line_with_current_source)
10868         (decode_line_with_last_displayed, decode_objc): Update.
10869         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10870         * completer.c (location_completer): Update.
10871         * cli/cli-cmds.c (edit_command, list_command): Update.
10872         * breakpoint.c (create_overlay_event_breakpoint)
10873         (create_longjmp_master_breakpoint)
10874         (create_std_terminate_master_breakpoint)
10875         (create_exception_master_breakpoint)
10876         (create_thread_event_breakpoint): Update.
10877         (init_breakpoint_sal): Update.  Remove some dead code.
10878         (create_breakpoint_sal): Change type of "location".  Update.
10879         (create_breakpoints_sal, create_breakpoint, break_command_1)
10880         (dprintf_command, break_range_command, until_break_command)
10881         (init_ada_exception_breakpoint)
10882         (strace_marker_create_sals_from_location)
10883         (update_static_tracepoint, trace_command, ftrace_command)
10884         (strace_command, create_tracepoint_from_upload): Update.
10885         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10886         * ax-gdb.c (agent_command_1): Update.
10887
10888 2017-04-12  Pedro Alves  <palves@redhat.com>
10889
10890         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10891         * configure.tgt: Handle i[34567]86-*-go32* and
10892         i[34567]86-*-msdosdjgpp*.
10893         * i386-tdep.c (i386_svr4_reg_to_regnum):
10894         Make extern.
10895         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10896         i386-go32-tdep.c.
10897         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10898         * i386-go32-tdep.c: New file.
10899         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10900         declarations.
10901
10902 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10903
10904         * aix-thread.c (pd_status2str): Change return type to const char *.
10905
10906 2017-04-12  Pedro Alves  <palves@redhat.com>
10907
10908         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10909         calls to set_gdbarch_gnu_triplet_regexp.
10910
10911 2017-04-12  Pedro Alves  <palves@redhat.com>
10912
10913         PR gdb/21323
10914         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10915         New enum value.
10916         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10917         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10918         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10919         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10920         * gdbarch.h, gdbarch.c: Regenerate.
10921         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10922         gdbarch_wchar_bit and gdbarch_wchar_signed.
10923         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10924         * arm-tdep.c (arm_gdbarch_init): Likewise.
10925         * avr-tdep.c (avr_gdbarch_init): Likewise.
10926         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10927         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10928         * i386-tdep.c (i386_go32_init_abi): Likewise.
10929         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10930         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10931         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10932         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10933         * sh-tdep.c (sh_gdbarch_init): Likewise.
10934         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10935         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10936         * windows-tdep.c (windows_init_abi): Likewise.
10937         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10938
10939 2017-04-12  Pedro Alves  <palves@redhat.com>
10940
10941         PR c++/21323
10942         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10943         cplus_primitive_type_char32_t>: New enum values.
10944         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10945         and cplus_primitive_type_char32_t.
10946         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10947         32, use the archtecture's built-in type for char16_t and char32_t,
10948         respectively.  Otherwise, fallback to init_integer_type as before,
10949         but make the type unsigned, and issue a complaint.
10950         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10951
10952 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10953
10954         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10955         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10956
10957 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10958
10959         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10960         'const char *'.
10961
10962 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10963
10964         * common/common-utils.c (free_vector_argv): New function.
10965         * common/common-utils.h: Include <vector>.
10966         (free_vector_argv): New prototype.
10967         * darwin-nat.c (darwin_create_inferior): Rewrite function
10968         prototype in order to constify "exec_file" and accept a
10969         "std::string" for "allargs".
10970         * fork-child.c: Include <vector>.
10971         (breakup_args): Rewrite function, using C++.
10972         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10973         and accept "std::string" for "allargs".  Update the code to
10974         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10975         and "execvp".
10976         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10977         order to constify "exec_file" and accept a "std::string" for
10978         "allargs".
10979         * go32-nat.c (go32_create_inferior): Likewise.
10980         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10981         * infcmd.c (run_command_1): Constify "exec_file".  Use
10982         "std::string" for inferior arguments.
10983         * inferior.h (fork_inferior): Update prototype.
10984         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10985         prototype in order to constify "exec_file" and accept a
10986         "std::string" for "allargs".
10987         * nto-procfs.c (procfs_create_inferior): Likewise.
10988         * procfs.c (procfs_create_inferior): Likewise.
10989         * remote-sim.c (gdbsim_create_inferior): Likewise.
10990         * remote.c (extended_remote_run): Update code to accept
10991         "std::string" as argument.
10992         (extended_remote_create_inferior): Rewrite function prototype in
10993         order to constify "exec_file" and accept a "std::string" for
10994         "allargs".
10995         * rs6000-nat.c (super_create_inferior): Likewise.
10996         (rs6000_create_inferior): Likewise.
10997         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10998         * windows-nat.c (windows_create_inferior): Likewise.
10999
11000 2017-04-11  Pedro Alves  <palves@redhat.com>
11001
11002         * thread.c: Fix whitespace throughout.
11003
11004 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11005
11006         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11007
11008 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11009
11010         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11011
11012 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11013
11014         PR gdb/21364
11015         * osdata.c (info_osdata): Check if 'type' is an empty string
11016         instead of NULL.
11017
11018 2017-04-10  Pedro Alves  <palves@redhat.com>
11019
11020         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11021         (ptid_to_global_thread_id, in_thread_list)
11022         (do_captured_list_thread_ids, set_resumed, set_running)
11023         (set_executing, set_stop_requested, finish_thread_state)
11024         (validate_registers_access, can_access_registers_ptid)
11025         (print_thread_info_1, switch_to_thread)
11026         (do_restore_current_thread_cleanup)
11027         (make_cleanup_restore_current_thread, thread_command)
11028         (thread_name_command): Use operator== instead of ptid_equal.
11029
11030 2017-04-10  Pedro Alves  <palves@redhat.com>
11031
11032         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11033         (current_thread_cleanup_chain): Delete.
11034         (restore_current_thread_cleanup_dtor)
11035         (make_cleanup_restore_current_thread): Remove references to
11036         current_thread_cleanup_chain.
11037
11038 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11039
11040         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11041         REG_UNKNOWN.
11042
11043 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11044
11045         PR gdb/19942
11046         * gdbthread.h (thread_info::deletable): New method.
11047         (thread_info::incref): New method.
11048         (thread_info::decref): New method.
11049         (thread_info::refcount): Move it to private.
11050         * infrun.c (save_stop_context): Call inc_refcount.
11051         (release_stop_context_cleanup): Likewise.
11052         * thread.c (set_thread_exited): New function.
11053         (init_thread_list): Delete "tp" only it is deletable, otherwise
11054         call set_thread_exited.
11055         (delete_thread_1): Call set_thread_exited.
11056         (current_thread_cleanup) <inferior_pid>: Remove.
11057         <thread>: New field.
11058         (restore_current_thread_ptid_changed): Removed.
11059         (do_restore_current_thread_cleanup): Adjust.
11060         (restore_current_thread_cleanup_dtor): Don't call
11061         find_thread_ptid.
11062         (set_thread_refcount): Use dec_refcount.
11063         (make_cleanup_restore_current_thread): Adjust.
11064         (thread_apply_all_command): Call inc_refcount.
11065         (_initialize_thread): Don't call
11066         observer_attach_thread_ptid_changed.
11067
11068 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11069
11070         * thread.c (delete_thread_1): Hoist code on marking thread as
11071         exited.
11072
11073 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11074
11075         * windows-nat.c (windows_detach): Initialize ptid with
11076         minus_one_ptid.
11077
11078 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11079
11080         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11081
11082 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11083
11084         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11085         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11086         (bfin_pseudo_register_write): Likewise
11087
11088 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11089
11090         * common/ptid.h (struct ptid): Change to...
11091         (class ptid_t): ... this.
11092         <ptid_t>: New constructors.
11093         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11094         matches>: New methods.
11095         <make_null, make_minus_one>: New static methods.
11096         <pid>: Rename to...
11097         <m_pid>: ...this.
11098         <lwp>: Rename to...
11099         <m_lwp>: ...this.
11100         <tid>: Rename to...
11101         <m_tid>: ...this.
11102         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11103         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11104         as references, move comment to class ptid_t.
11105         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11106         ptid_t static methods.
11107         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11108         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11109         Take ptid arguments as references, implement using ptid_t methods.
11110         * unittests/ptid-selftests.c: New file.
11111         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11112         unittests/ptid-selftests.c.
11113         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11114
11115 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11116
11117         * python/python.c (python_run_simple_file): Cast mode literal to
11118         non-const char pointer as expected by PyFile_FromString.
11119
11120 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11121
11122         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11123         minus_one_ptid and null_ptid.
11124
11125 2017-04-05  Pedro Alves  <palves@redhat.com>
11126
11127         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11128         * configure: Regenerate.
11129
11130 2017-04-05  Pedro Alves  <palves@redhat.com>
11131
11132         * ada-exp.y (yyerror): Constify.
11133         * ada-lang.c (bound_name, get_selections)
11134         (ada_variant_discrim_type)
11135         (ada_variant_discrim_name, ada_value_struct_elt)
11136         (ada_lookup_struct_elt_type, is_unchecked_variant)
11137         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11138         (catch_ada_exception_command_split)
11139         (catch_ada_assert_command_split, catch_assert_command)
11140         (ada_op_name): Constify.
11141         * ada-lang.h (ada_yyerror, get_selections)
11142         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11143         * arc-tdep.c (arc_print_frame_cache): Constify.
11144         * arm-tdep.c (arm_skip_stub): Constify.
11145         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11146         (gen_aggregate_elt_ref): Constify.
11147         * bcache.c (print_bcache_statistics): Constify.
11148         * bcache.h (print_bcache_statistics): Constify.
11149         * break-catch-throw.c (catch_exception_command_1):
11150         * breakpoint.c (struct ep_type_description::description):
11151         Constify.
11152         (add_solib_catchpoint): Constify.
11153         (catch_fork_command_1): Add cast.
11154         (add_catch_command): Constify.
11155         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11156         Constify.
11157         * bsd-uthread.c (bsd_uthread_state): Constify.
11158         * buildsym.c (patch_subfile_names): Constify.
11159         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11160         Constify.
11161         * c-exp.y (yyerror): Constify.
11162         (token::oper): Constify.
11163         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11164         * c-varobj.c (cplus_describe_child): Constify.
11165         * charset.c (find_charset_names): Add cast.
11166         (find_charset_names): Constify array and add const_cast.
11167         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11168         (edit_command): Constify.
11169         * cli/cli-decode.c (lookup_cmd): Constify.
11170         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11171         Constify.
11172         (struct dump_context): Constify.
11173         (add_dump_command, restore_command): Constify.
11174         * cli/cli-script.c (get_command_line): Constify.
11175         * cli/cli-script.h (get_command_line): Constify.
11176         * cli/cli-utils.c (check_for_argument): Constify.
11177         * cli/cli-utils.h (check_for_argument): Constify.
11178         * coff-pe-read.c (struct read_pe_section_data): Constify.
11179         * command.h (lookup_cmd): Constify.
11180         * common/print-utils.c (decimal2str): Constify.
11181         * completer.c (gdb_print_filename): Constify.
11182         * corefile.c (set_gnutarget): Constify.
11183         * cp-name-parser.y (yyerror): Constify.
11184         * cp-valprint.c (cp_print_class_member): Constify.
11185         * cris-tdep.c (cris_register_name, crisv32_register_name):
11186         Constify.
11187         * d-exp.y (yyerror): Constify.
11188         (struct token::oper): Constify.
11189         * d-lang.h (d_yyerror): Constify.
11190         * dbxread.c (struct header_file_location::name): Constify.
11191         (add_old_header_file, add_new_header_file, last_function_name)
11192         (dbx_next_symbol_text, add_bincl_to_list)
11193         (find_corresponding_bincl_psymtab, set_namestring)
11194         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11195         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11196         * defs.h (command_line_input, print_address_symbolic)
11197         (deprecated_readline_begin_hook): Constify.
11198         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11199         Constify.
11200         * event-top.c (handle_line_of_input): Constify and add cast.
11201         * exceptions.c (catch_errors): Constify.
11202         * exceptions.h (catch_errors): Constify.
11203         * expprint.c (print_subexp_standard, op_string, op_name)
11204         (op_name_standard, dump_raw_expression, dump_raw_expression):
11205         * expression.h (op_name, op_string, dump_raw_expression):
11206         Constify.
11207         * f-exp.y (yyerror): Constify.
11208         (struct token::oper): Constify.
11209         (struct f77_boolean_val::name): Constify.
11210         * f-lang.c (f_word_break_characters): Constify.
11211         * f-lang.h (f_yyerror): Constify.
11212         * fork-child.c (fork_inferior): Add cast.
11213         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11214         (new_variant): Constify.
11215         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11216         * gdbarch.c: Regenerate.
11217         * gdbcore.h (set_gnutarget): Constify.
11218         * go-exp.y (yyerror): Constify.
11219         (token::oper): Constify.
11220         * go-lang.h (go_yyerror): Constify.
11221         * go32-nat.c (go32_sysinfo): Constify.
11222         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11223         * guile/scm-cmd.c (cmdscm_function): Constify.
11224         * guile/scm-param.c (pascm_param_value): Constify.
11225         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11226         (h8300sx_register_name): Constify.
11227         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11228         Constify.
11229         * ia64-tdep.c (ia64_register_names): Constify.
11230         * infcmd.c (construct_inferior_arguments): Constify.
11231         (path_command, attach_post_wait): Constify.
11232         * language.c (show_range_command, show_case_command)
11233         (unk_lang_error): Constify.
11234         * language.h (language_defn::la_error)
11235         (language_defn::la_name_of_this): Constify.
11236         * linespec.c (decode_line_2): Constify.
11237         * linux-thread-db.c (thread_db_err_str): Constify.
11238         * lm32-tdep.c (lm32_register_name): Constify.
11239         * m2-exp.y (yyerror): Constify.
11240         * m2-lang.h (m2_yyerror): Constify.
11241         * m32r-tdep.c (m32r_register_names): Constify and make static.
11242         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11243         * m88k-tdep.c (m88k_register_name): Constify.
11244         * macroexp.c (appendmem): Constify.
11245         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11246         (upgrade_type, parse_external, parse_partial_symbols)
11247         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11248         (new_symbol): Constify.
11249         * memattr.c (mem_info_command): Constify.
11250         * mep-tdep.c (register_name_from_keyword): Constify.
11251         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11252         Constify.
11253         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11254         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11255         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11256         cast.
11257         (mi_execute_async_cli_command): Constify.
11258         * mips-tdep.c (mips_register_name): Constify.
11259         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11260         (am33_register_name, am33_2_register_name)
11261         * moxie-tdep.c (moxie_register_names): Constify.
11262         * nat/linux-osdata.c (osdata_type): Constify fields.
11263         * nto-tdep.c (nto_parse_redirection): Constify.
11264         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11265         (lookup_child_selector): Constify.
11266         (objc_methcall::name): Constify.
11267         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11268         (lookup_struct_typedef): Constify.
11269         * objfiles.c (pc_in_section): Constify.
11270         * objfiles.h (pc_in_section): Constify.
11271         * p-exp.y (struct token::oper): Constify.
11272         (yyerror): Constify.
11273         * p-lang.h (pascal_yyerror): Constify.
11274         * parser-defs.h (op_name_standard): Constify.
11275         (op_print::string): Constify.
11276         (exp_descriptor::op_name): Constify.
11277         * printcmd.c (print_address_symbolic): Constify.
11278         * psymtab.c (print_partial_symbols): Constify.
11279         * python/py-breakpoint.c (stop_func): Constify.
11280         (bppy_get_expression): Constify.
11281         * python/py-cmd.c (cmdpy_completer::name): Constify.
11282         (cmdpy_function): Constify.
11283         * python/py-event.c (evpy_add_attribute)
11284         (gdbpy_initialize_event_generic): Constify.
11285         * python/py-event.h (evpy_add_attribute)
11286         (gdbpy_initialize_event_generic): Constify.
11287         * python/py-evts.c (add_new_registry): Constify.
11288         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11289         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11290         * python/py-inferior.c (get_buffer): Add cast.
11291         * python/py-param.c (parm_constant::name): Constify.
11292         * python/py-unwind.c (fprint_frame_id): Constify.
11293         * python/python.c (gdbpy_parameter_value): Constify.
11294         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11295         * remote.c (memory_packet_config::name): Constify.
11296         (show_packet_config_cmd, remote_write_bytes)
11297         (remote_buffer_add_string):
11298         * reverse.c (exec_reverse_once): Constify.
11299         * rs6000-tdep.c (variant::name, variant::description): Constify.
11300         * rust-exp.y (rustyyerror): Constify.
11301         * rust-lang.c (rust_op_name): Constify.
11302         * rust-lang.h (rustyyerror): Constify.
11303         * serial.h (serial_ops::name): Constify.
11304         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11305         (sh_sh3e_register_name, sh_sh2e_register_name)
11306         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11307         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11308         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11309         (sh_sh4al_dsp_register_name): Constify.
11310         * sh64-tdep.c (sh64_register_name): Constify.
11311         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11312         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11313         * stabsread.c (patch_block_stabs, read_type_number)
11314         (ref_map::stabs, ref_add, process_reference)
11315         (symbol_reference_defined, define_symbol, define_symbol)
11316         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11317         (read_one_struct_field, read_struct_fields, read_baseclasses)
11318         (read_tilde_fields, read_struct_type, read_array_type)
11319         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11320         (read_huge_number, read_range_type, read_args, common_block_start)
11321         (find_name_end): Constify.
11322         * stabsread.h (common_block_start, define_symbol)
11323         (process_one_symbol, symbol_reference_defined, ref_add):
11324         * symfile.c (get_section_index, add_symbol_file_command):
11325         * symfile.h (get_section_index): Constify.
11326         * target-descriptions.c (tdesc_type::name): Constify.
11327         (tdesc_free_type): Add cast.
11328         * target.c (find_default_run_target):
11329         (add_deprecated_target_alias, find_default_run_target)
11330         (target_announce_detach): Constify.
11331         (do_option): Constify.
11332         * target.h (add_deprecated_target_alias): Constify.
11333         * thread.c (print_thread_info_1): Constify.
11334         * top.c (deprecated_readline_begin_hook, command_line_input):
11335         Constify.
11336         (init_main): Add casts.
11337         * top.h (handle_line_of_input): Constify.
11338         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11339         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11340         (tfind_command): Rename to ...
11341         (tfind_command_1): ... this and constify.
11342         (tfind_command): New function.
11343         (tfind_end_command, tfind_start_command): Adjust.
11344         (encode_source_string): Constify.
11345         * tracepoint.h (encode_source_string): Constify.
11346         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11347         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11348         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11349         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11350         * tui/tui-win.c (parse_scrolling_args): Constify.
11351         * tui/tui-windata.c (tui_erase_data_content): Constify.
11352         * tui/tui-windata.h (tui_erase_data_content): Constify.
11353         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11354         * tui/tui.c (tui_enable): Add cast.
11355         * utils.c (defaulted_query): Constify.
11356         (init_page_info): Add cast.
11357         (puts_debug, subset_compare): Constify.
11358         * utils.h (subset_compare): Constify.
11359         * varobj.c (varobj_format_string): Constify.
11360         * varobj.h (varobj_format_string): Constify.
11361         * vax-tdep.c (vax_register_name): Constify.
11362         * windows-nat.c (windows_detach): Constify.
11363         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11364         * xml-support.c (gdb_xml_end_element): Constify.
11365         * xml-tdesc.c (tdesc_start_reg): Constify.
11366         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11367         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11368         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11369
11370 2017-04-05  Pedro Alves  <palves@redhat.com>
11371
11372         * proc-api.c (struct trans): Constify.
11373         (procfs_note): Constify.
11374         * proc-events.c (struct trans, syscall_table):
11375         * proc-flags.c (struct trans): Constify.
11376         * proc-utils.h (procfs_note): Constify.
11377         * proc-why.c (struct trans): Constify.
11378         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11379         (procfs_detach): Constify.
11380         * sol-thread.c (struct string_map): Constify.
11381         (td_err_string, td_state_string): Constify.
11382
11383 2017-04-05  Pedro Alves  <palves@redhat.com>
11384
11385         * proc-api.c (procfs_filename): Don't initialize
11386         procfs_filename.
11387         (prepare_to_trace): Assume procfs_filename is non-NULL.
11388         (_initialize_proc_api): Give procfs_filename a default value here.
11389
11390 2017-04-05  Pedro Alves  <palves@redhat.com>
11391
11392         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11393         'cond_string' parameter.
11394         (extract_exception_regexp): Constify 'string' parameter.
11395         (catch_exception_command_1): Constify.
11396         * breakpoint.c (init_catchpoint)
11397         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11398         parameter.
11399         (ep_parse_optional_if_clause, catch_fork_command_1)
11400         (catch_exec_command_1): Constify.
11401         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11402         parameter.
11403         (ep_parse_optional_if_clause): Constify.
11404         * cli/cli-utils.c (remove_trailing_whitespace)
11405         (check_for_argument): Constify.
11406         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11407         non-const overload.
11408         (check_for_argument): Likewise.
11409
11410 2017-04-05  Pedro Alves  <palves@redhat.com>
11411
11412         * event-top.c (command_line_handler): Add cast to execute_command
11413         call.
11414         * record-btrace.c (cmd_record_btrace_bts_start)
11415         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11416         (cmd_record_btrace_start): Add cast to execute_command call.
11417         * record-full.c (record_full_goto_insn):
11418         * record.c (record_start, record_stop): Add cast to
11419         execute_command_to_string calls.
11420         (cmd_record_start): Add cast to execute_command calls.
11421
11422 2017-04-05  Pedro Alves  <palves@redhat.com>
11423
11424         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11425         static inline function.
11426         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11427         array and use gdb_PyArg_ParseTupleAndKeywords.
11428         * python/py-cmd.c (cmdpy_init): Likewise.
11429         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11430         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11431         (infpy_search_memory): Likewise.
11432         * python/py-objfile.c (objfpy_add_separate_debug_file)
11433         (gdbpy_lookup_objfile): Likewise.
11434         * python/py-symbol.c (gdbpy_lookup_symbol)
11435         (gdbpy_lookup_global_symbol): Likewise.
11436         * python/py-type.c (gdbpy_lookup_type): Likewise.
11437         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11438         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11439         Likewise.
11440
11441 2017-04-05  Pedro Alves  <palves@redhat.com>
11442
11443         * python/python-internal.h (gdb_PyGetSetDef): New type.
11444         * python/py-block.c (block_object_getset)
11445         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11446         * python/py-event.c (event_object_getset)
11447         (finish_breakpoint_object_getset): Likewise.
11448         * python/py-inferior.c (inferior_object_getset): Likewise.
11449         * python/py-infthread.c (thread_object_getset): Likewise.
11450         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11451         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11452         * python/py-objfile.c (objfile_getset): Likewise.
11453         * python/py-progspace.c (pspace_getset): Likewise.
11454         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11455         Likewise.
11456         * python/py-record.c (recpy_record_getset): Likewise.
11457         * python/py-symbol.c (symbol_object_getset): Likewise.
11458         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11459         Likewise.
11460         * python/py-type.c (type_object_getset, field_object_getset):
11461         Likewise.
11462         * python/py-value.c (value_object_getset): Likewise.
11463
11464 2017-04-05  Pedro Alves  <palves@redhat.com>
11465
11466         * python/python-internal.h (gdb_PyObject_CallMethod)
11467         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11468         New functions.
11469         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11470         (PySys_GetObject, PySys_SetPath): New macros.
11471
11472 2017-04-05  Pedro Alves  <palves@redhat.com>
11473
11474         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11475         info_osdata_command.
11476         * osdata.c (info_osdata_command): Rename to ...
11477         (info_osdata): ... this.  Constify 'type' parameter, and remove
11478         the 'from_tty' parameter.  Accept NULL TYPE.
11479         (info_osdata_command): New function.
11480         * osdata.h (info_osdata_command): Remove declaration.
11481         (info_osdata): New declaration.
11482
11483 2017-04-05  Pedro Alves  <palves@redhat.com>
11484
11485         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11486         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11487         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11488         parameter.
11489         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11490         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11491         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11492         parameter.
11493         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11494         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11495         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11496         (mi_cmd_file_list_exec_source_files)
11497         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11498         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11499         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11500         parameter.
11501         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11502         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11503         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11504         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11505         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11506         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11507         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11508         'command' parameter.
11509         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11510         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11511         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11512         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11513         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11514         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11515         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11516         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11517         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11518         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11519         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11520         parameter.
11521         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11522         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11523         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11524         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11525         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11526         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11527         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11528         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11529         (mi_cmd_data_list_changed_registers)
11530         (mi_cmd_data_write_register_values)
11531         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11532         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11533         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11534         (mi_cmd_list_features, mi_cmd_list_target_features)
11535         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11536         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11537         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11538         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11539         (mi_cmd_trace_frame_collected): Constify 'command'
11540         parameter.
11541         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11542         'command' parameter.
11543
11544 2017-04-05  Pedro Alves  <palves@redhat.com>
11545
11546         * ada-lang.c (ada_completer_word_break_characters): Now a const
11547         array.
11548         (ada_get_gdb_completer_word_break_characters): Constify.
11549         * completer.c (gdb_completer_command_word_break_characters)
11550         (gdb_completer_file_name_break_characters)
11551         (gdb_completer_quote_characters): Now const arrays.
11552         (get_gdb_completer_quote_characters): Constify.
11553         (set_rl_completer_word_break_characters): New function.
11554         (set_gdb_completion_word_break_characters)
11555         (complete_line_internal): Use it.
11556         * completer.h (get_gdb_completer_quote_characters): Constify.
11557         (set_rl_completer_word_break_characters): Declare.
11558         * f-lang.c (f_word_break_characters): Constify.
11559         * language.c (default_word_break_characters): Constify.
11560         * language.h (language_defn::la_word_break_characters): Constify.
11561         (default_word_break_characters): Constify.
11562         * top.c (init_main): Use set_rl_completer_word_break_characters.
11563
11564 2017-04-05  Pedro Alves  <palves@redhat.com>
11565
11566         * aix-thread.c (aix_thread_pid_to_str)
11567         (aix_thread_extra_thread_info): Constify.
11568         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11569         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11570         (bsd_uthread_pid_to_str): Constify.
11571         * corelow.c (core_pid_to_str): Constify.
11572         * darwin-nat.c (darwin_pid_to_str): Constify.
11573         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11574         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11575         Constify.
11576         * gnu-nat.c (gnu_pid_to_str): Constify.
11577         * go32-nat.c (go32_pid_to_str): Constify.
11578         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11579         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11580         * inferior.c (inferior_pid_to_str): Constify.
11581         * linux-nat.c (linux_nat_pid_to_str): Constify.
11582         * linux-tdep.c (linux_core_pid_to_str): Constify.
11583         * linux-thread-db.c (thread_db_pid_to_str)
11584         (thread_db_extra_thread_info): Constify.
11585         * nto-tdep.c (nto_extra_thread_info): Constify.
11586         * nto-tdep.h (nto_extra_thread_info): Constify.
11587         * obsd-nat.c (obsd_pid_to_str): Constify.
11588         * procfs.c (procfs_pid_to_str): Constify.
11589         * ravenscar-thread.c (ravenscar_extra_thread_info)
11590         (ravenscar_pid_to_str): Constify.
11591         * remote-sim.c (gdbsim_pid_to_str): Constify.
11592         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11593         Constify.
11594         * sol-thread.c (solaris_pid_to_str): Constify.
11595         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11596         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11597         * target.c (default_pid_to_str, target_pid_to_str)
11598         (normal_pid_to_str, default_pid_to_str): Constify.
11599         * target.h (target_ops::to_pid_to_str)
11600         (target_ops::to_extra_thread_info): Constify.
11601         (target_pid_to_str, normal_pid_to_str): Constify.
11602         * windows-nat.c (windows_pid_to_str): Constify.
11603         * gdbarch.sh (core_pid_to_str): Constify.
11604         * target-delegates.c: Regenerate.
11605         * gdbarch.h, gdbarch.c: Regenerate.
11606
11607 2017-04-05  Pedro Alves  <palves@redhat.com>
11608
11609         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11610         the memory of the temporary warning_pre_print override.
11611         * utils.c (warning_pre_print): Constify.
11612         * utils.h (warning_pre_print): Constify.
11613
11614 2017-04-05  Pedro Alves  <palves@redhat.com>
11615
11616         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11617         (shell_command): New function.
11618         (make_command): Use std::string.
11619         (init_cli_cmds): Register shell_command instead of shell_escape.
11620
11621 2017-04-05  Pedro Alves  <palves@redhat.com>
11622
11623         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11624         * tracepoint.c (default_collect): Don't initialize.
11625
11626 2017-04-05  Pedro Alves  <palves@redhat.com>
11627
11628         * macroexp.c (macro_buffer::shared): Now a bool.
11629         (init_buffer): Update.
11630         (init_shared_buffer): Constify 'addr' parameter.
11631         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11632         casts.
11633
11634 2017-04-05  Pedro Alves  <palves@redhat.com>
11635
11636         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11637         * disasm.c (set_disassembler_options): Constify local.
11638         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11639
11640 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11641
11642         PR gdb/21352
11643         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11644         option.
11645
11646 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11647
11648         * frame.c (frame_unwind_register_unsigned): Call
11649         frame_unwind_register_value.
11650
11651 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11652
11653         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11654         Use gdb_test_multiple, and don't match anchor.
11655
11656 2017-04-05  Pedro Alves  <palves@redhat.com>
11657
11658         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11659         (Write After Approval): Remove Simon Marchi.
11660
11661 2017-04-05  Pedro Alves  <palves@redhat.com>
11662
11663         * common/gdb_optional.h (optional::optional): Make constexpr and
11664         initialize m_dummy.
11665
11666 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11667
11668         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11669         (amd64fbsd_jmp_buf_reg_offset): Remove.
11670         (amd64fbsd_supply_uthread): Remove function.
11671         (amd64fbsd_collect_uthread): Remove function.
11672         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11673         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11674         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11675         (fbsd-nat.c): Update comment.
11676         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11677         (i386fbsd_jmp_buf_reg_offset): Remove.
11678         (i386fbsd_supply_uthread): Remove function.
11679         (i386fbsd_collect_uthread): Remove function.
11680         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11681
11682 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11683
11684         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11685         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11686         * NEWS: Mention that support for FreeBSD/alpha was removed.
11687         * alpha-fbsd-tdep.c: Delete file.
11688         * config/alpha/fbsd.mh: Delete file.
11689         * configure.host: Delete alpha*-*-freebsd* and
11690         alpha*-*-kfreebsd*-gnu.
11691         * configure.tgt: Delete alpha*-*-freebsd* and
11692         alpha*-*-kfreebsd*-gnu.
11693
11694 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11695
11696         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11697         amd64bsd_store_inferior_registers): Use ptid from regcache.
11698
11699 2017-04-04  Pedro Alves  <palves@redhat.com>
11700
11701         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11702         data fields, make them private and add "m_" prefixes.
11703         (lnp_state_machine::lnp_state_machine): New ctor.
11704         (record_line, check_line_address, handle_set_discriminator)
11705         (handle_set_address, handle_advance_pc, handle_special_opcode)
11706         (handle_advance_line, handle_set_file, handle_negate_stmt)
11707         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11708         (end_sequence, advance_line): New methods.
11709         (m_gdbarch, m_record_lines_p): New fields.
11710         (lnp_reader_state): Delete.
11711         (dwarf_record_line): Rename to ...
11712         (lnp_state_machine::record_line): ... adjust.
11713         (init_lnp_state_machine): Delete.
11714         (lnp_state_machine::lnp_state_machine): New.
11715         (check_line_address): Rename to ...
11716         (lnp_state_machine::check_line_address): This.
11717         (dwarf_decode_lines_1): Remove reference to "reader_state".
11718         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11719         State machine internal state manipulation moved to
11720         lnp_state_machine methods.
11721
11722 2017-04-04  Pedro Alves  <palves@redhat.com>
11723
11724         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11725         unittests/offset-type-selftests.c.
11726         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11727         * common/offset-type.h: New file.
11728         * common/preprocessor.h: New file.
11729         * common/traits.h: New file.
11730         * common/valid-expr.h: New file.
11731         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11732         sect_offset and cu_offset strong typedefs throughout.
11733         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11734         typedefs throughout.
11735         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11736         sect_offset and cu_offset strong typedefs throughout.
11737         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11738         typedefs throughout.
11739         * gdbtypes.h: Include "common/offset-type.h".
11740         (cu_offset): Now an offset type (strong typedef) instead of a
11741         struct.
11742         (sect_offset): Likewise.
11743         (union call_site_parameter_u): Rename "param_offset" field to
11744         "param_cu_off".
11745         * unittests/offset-type-selftests.c: New file.
11746
11747 2017-04-04  Pedro Alves  <palves@redhat.com>
11748
11749         * common/underlying.h: New file.
11750         * dwarf2read.c: Include "common/gdb_optional.h" and
11751         "common/underlying.h".
11752         (dir_index, file_name_index): New types.
11753         (file_entry): Use them.
11754         (file_entry::include): Use to_underlying.
11755         (line_header::add_file_name): Use dir_index.
11756         (read_formatted_entries): Use gdb::optional.  Read form before
11757         writting to file_entry.
11758         (dwarf_decode_line_header): Use dir_index.
11759         (lnp_state_machine::current_file): Use to_underlying.
11760         (lnp_state_machine::file): Change type to file_name_index.
11761         (dwarf_record_line): Use to_underlying.
11762         (init_lnp_state_machine): Use file_name_index.
11763         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11764
11765 2017-04-04  Pedro Alves  <palves@redhat.com>
11766
11767         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11768         operator bool, has_value and get methods.
11769
11770 2017-04-04  Pedro Alves  <palves@redhat.com>
11771
11772         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11773         fields.
11774         (line_header): Initialize all data fields.  Change type of
11775         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11776         Change type of include_dirs to std::vector<const char *>.  Remove
11777         num_include_dirs, include_dirs_size.  Change type of file_names to
11778         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11779         (line_header::line_header): New.
11780         (line_header::add_include_dir, line_header::add_file_name): New
11781         methods.
11782         (line_header::include_dir_at): Remove NULL check.
11783         (line_header::file_name_at): Add const overload.
11784         (line_header_up): New unique_ptr typedef.
11785         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11786         std::vector.  Remove free_line_header call.
11787         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11788         free_line_header call.
11789         (free_cu_line_header): Delete.
11790         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11791         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11792         Adjust to use std::vector.
11793         (free_line_header): Delete.
11794         (free_line_header_voidp): Use delete.
11795         (add_include_dir): Replace with ...
11796         (line_header::add_include_dir): ... this method.  Use std::vector.
11797         (add_file_name): Replace with ...
11798         (line_header::add_file_name): ... this method.  Use std::vector.
11799         (add_include_dir_stub): Delete.
11800         (read_formatted_entries): Remove memset.
11801         (dwarf_decode_line_header): Return a line_header_up instead of a
11802         raw pointer.  Remove cleanup handling.  Pass lambdas to
11803         read_formatted_entries.  Adjust to use line_header methods.
11804         (dwarf_decode_lines_1): Adjust to use line_header methods.
11805         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11806         use std::vector.
11807
11808 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11809
11810         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11811         instead of struct ptid.
11812
11813 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11814
11815         * frame.c (get_frame_register_bytes): Unwind using value.
11816         (put_frame_register_bytes): Likewise.
11817
11818 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11819
11820         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11821         aggregate-like.
11822
11823 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11824
11825         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11826
11827 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11828
11829         * gdbthread.h (struct thread_info): Declare constructor and
11830         destructor.  Add some in-class member initializers.
11831         * thread.c (free_thread): Remove.
11832         (init_thread_list): Call delete instead of free_thread.
11833         (new_thread): Call thread_info constructor.
11834         (thread_info::thread_info): New function.
11835         (thread_info::~thread_info): New function.
11836         (delete_thread_1): Call delete instead of free_thread.
11837         (make_cleanup_restore_current_thread): Move tp and frame to
11838         inner block.
11839
11840 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11841
11842         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11843         (arc_skip_prologue): Likewise.
11844         (arc_make_frame_cache): Likewise.
11845         (arc_pv_get_operand): New function.
11846         (arc_is_in_prologue): Likewise.
11847         (arc_analyze_prologue): Likewise.
11848         (arc_print_frame_cache): Likewise.
11849         (MAX_PROLOGUE_LENGTH): New constant.
11850
11851 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11852
11853         * configure.tgt: Add arc-insn.o.
11854         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11855         (dump_arc_instruction_command): New function.
11856         (arc_fprintf_disasm): Likewise.
11857         (arc_disassemble_info): Likewise.
11858         (arc_insn_get_operand_value): Likewise.
11859         (arc_insn_get_operand_value_signed): Likewise.
11860         (arc_insn_get_memory_base_reg): Likewise.
11861         (arc_insn_get_memory_offset): Likewise.
11862         (arc_insn_get_branch_target): Likewise.
11863         (arc_insn_dump): Likewise.
11864         (arc_insn_get_linear_next_pc): Likewise.
11865         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11866         (arc_disassemble_info): Likewise.
11867         (arc_insn_get_branch_target): Likewise.
11868         (arc_insn_get_linear_next_pc): Likewise.
11869         * NEWS: Mention new "maint print arc arc-instruction".
11870
11871 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11872
11873         * arc-tdep (maintenance_print_arc_list): New variable.
11874         (maintenance_print_arc_command): New function.
11875
11876 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11877
11878         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11879         Add "limm" and "reserved".
11880         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11881         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11882         * arc-tdep.h (arc_regnum): Likewise.
11883
11884 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11885
11886         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11887         for THREADPTR register.
11888         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11889         register.
11890         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11891         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11892         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11893
11894 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11895
11896         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11897         registers above gdbarch_num_regs (gdbarch) as privileged in
11898         call0 ABI.
11899
11900 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11901
11902         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11903         for a single specified register or for all registers in
11904         a0_base..a0_base + C0_NREGS range.
11905         (supply_gregset_reg): Call regcache_raw_supply for a single
11906         specified register or for all registers in a0_base..a0_base +
11907         C0_NREGS range.
11908
11909 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11910
11911         * arch/xtensa.h (C0_NREGS): Add definition.
11912         * xtensa-tdep.c (C0_NREGS): Remove definition.
11913
11914 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11915
11916         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11917         Drop xtensa_default_isa initialization.
11918         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11919
11920 2017-03-27  Pedro Alves  <palves@redhat.com>
11921
11922         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11923         (file_entry::include_dir): New method.
11924         (line_header::include_dir_at, line_header::file_name_at): New
11925         methods.
11926         (setup_type_unit_groups, setup_type_unit_groups)
11927         (psymtab_include_file_name): Simplify using the new methods.
11928         (lnp_state_machine) <the_line_header>: New field.
11929         <file>: Add comment.
11930         (lnp_state_machine::current_file): New method.
11931         (dwarf_record_line): Simplify using the new methods.
11932         (init_lnp_state_machine): Initialize the "the_line_header" field.
11933         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11934         Simplify using the new methods.
11935
11936 2017-03-27  Pedro Alves  <palves@redhat.com>
11937
11938         * cp-name-parser.y (make_empty): Delete.
11939         (demangler_special, nested_name, ptr_operator, array_indicator)
11940         (direct_declarator, declarator_1): Use fill_comp instead of
11941         make_empty.
11942
11943 2017-03-27  Pedro Alves  <palves@redhat.com>
11944
11945         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11946         to ATTRIBUTE_PRINTF.
11947         * solib-target.c (library_list_start_list): Print "string" not
11948         "version".
11949         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11950         gdb_xml_error call.
11951
11952 2017-03-27  Pedro Alves  <palves@redhat.com>
11953
11954         * dwarf2read.c (struct file_and_directory): New.
11955         (dwarf2_get_dwz_file): Adjust to use std::string.
11956         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11957         (find_file_and_directory): Adjust to return a file_and_directory
11958         object.
11959         (read_file_scope): Adjust to use file_and_directory.  Remove
11960         make_cleanup/do_cleanups calls.
11961         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11962         make_cleanup/do_cleanups calls.
11963         * python/python.c (do_start_initialization): Adjust to ldirname
11964         returning a std::string.
11965         * utils.c (ldirname): Now returns a std::string.
11966         * utils.h (ldirname): Change return type to std::string.
11967         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11968         returning a std::string.
11969         * xml-tdesc.c (file_read_description_xml): Likewise.
11970
11971 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11972
11973         * regcache.c (regcache_debug_print_register): New function.
11974         * regcache.h (regcache_debug_print_register): New declaration.
11975         * target.c (debug_print_register): Remove.
11976         (target_fetch_registers): Call regcache_debug_print_register.
11977         (target_store_registers): Likewise.
11978
11979 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11980
11981         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11982         reference beyond the 'lh->include_dirs' array before accessing to
11983         it.
11984         (psymtab_include_file_name): Likewise.
11985         (dwarf_decode_lines_1): Likewise.
11986         (dwarf_decode_lines): Likewise.
11987         (file_file_name): Likewise.
11988
11989 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11990
11991         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11992         inferior_ptid.
11993         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11994         ps_lsetfpregs): Likewise.
11995         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11996         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11997         ps_lsetfpregs): Likewise.
11998         * target.c (target_fetch_registers, target_store_registers):
11999         Remove asserts.
12000
12001 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12002
12003         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12004
12005 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12006
12007         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12008         (_initialize_aarch64_tdep): Register it.
12009         (aarch64_record_load_store): Handle PRFM instruction.
12010         (aarch64_process_record_test): New function.
12011
12012 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12013
12014         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12015         indentation.
12016
12017 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12018
12019         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12020
12021 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12022
12023         python/python.c (do_start_initialization): Fix memory leak.
12024
12025 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12026
12027         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12028         using get_ptrace_pid.
12029         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12030         inferior_ptid.
12031         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12032         inferior_ptid instead of pid.
12033
12034 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12035
12036         * aarch64-tdep.c: Wrap locally used classes in anonymous
12037         namespace.
12038         * arm-tdep.c: Likewise.
12039         * linespec.c: Likewise.
12040         * ui-out.c: Likewise.
12041
12042 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12043
12044         PR gdb/19637
12045         * python/lib/gdb/printer/bound_registers.py: Import sys.
12046
12047 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12048
12049         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12050         windows_thread_info parameter and use it instead of
12051         current_thread.
12052         (windows_fetch_inferior_registers): Don't set current_thread,
12053         pass the thread to do_windows_fetch_inferior_registers.  Use
12054         ptid from regcache instead of inferior_ptid.
12055         (do_windows_store_inferior_registers): Add windows_thread_info
12056         parameter and use it instead of current_thread.
12057         (windows_store_inferior_registers): Don't set current_thread,
12058         pass the thread to do_windows_store_inferior_registers.  Use
12059         ptid from regcache instead of inferior_ptid.
12060
12061 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12062
12063         * ser-mingw.c (ser_windows_raw): Remove reference to
12064         struct serial::current_timeout.
12065
12066 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12067
12068         PR tdep/20928
12069         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12070         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12071         (sparc64_fsr_type): Fix %fsr decoding.
12072
12073 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12074
12075         * python/py-record-btrace.c (btpy_insn_data): Change return type
12076         for Python 2.
12077
12078 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12079
12080         * spu-linux-nat.c (spu_fetch_inferior_registers,
12081         spu_store_inferior_registers): Use ptid from regcache, set and
12082         restore inferior_ptid.
12083         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12084         Likewise.
12085
12086 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12087
12088         * i386-linux-nat.c (fetch_register, store_register,
12089         i386_linux_fetch_inferior_registers,
12090         i386_linux_store_inferior_registers): Use ptid from regcache.
12091         * ia64-linux-nat.c (ia64_linux_fetch_register,
12092         ia64_linux_store_register): Likewise.
12093         * inf-ptrace.c (inf_ptrace_fetch_register,
12094         inf_ptrace_store_register): Likewise.
12095         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12096         m32r_linux_store_inferior_registers): Likewise.
12097         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12098         m68kbsd_store_inferior_registers): Likewise.
12099         * m68k-linux-nat.c (fetch_register, store_register,
12100         m68k_linux_fetch_inferior_registers,
12101         m68k_linux_store_inferior_registers): Likewise.
12102         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12103         m88kbsd_store_inferior_registers): Likewise.
12104         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12105         mips_fbsd_store_inferior_registers): Likewise.
12106         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12107         mips64_linux_regsets_store_registers): Likewise.
12108         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12109         mipsnbsd_store_inferior_registers): Likewise.
12110         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12111         mips64obsd_store_inferior_registers): Likewise.
12112         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12113         Likewise.
12114         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12115         ppcfbsd_store_inferior_registers): Likewise.
12116         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12117         ppc_linux_store_inferior_registers): Likewise.
12118         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12119         ppcnbsd_store_inferior_registers): Likewise.
12120         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12121         ppcobsd_store_registers): Likewise.
12122         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12123         Likewise.
12124         * ravenscar-thread.c (ravenscar_fetch_registers,
12125         ravenscar_store_registers, ravenscar_prepare_to_store):
12126         Likewise.
12127         * record-btrace.c (record_btrace_fetch_registers,
12128         record_btrace_store_registers, record_btrace_prepare_to_store):
12129         Likewise.
12130         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12131         Lookup inferior using ptid from regcache, instead of
12132         current_inferior.
12133         * remote.c (remote_fetch_registers, remote_store_registers): Use
12134         ptid from regcache.
12135         * rs6000-nat.c (fetch_register, store_register): Likewise.
12136         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12137         s390_linux_store_inferior_registers): Likewise.
12138         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12139         shnbsd_store_inferior_registers): Likewise.
12140         * sol-thread.c (sol_thread_fetch_registers,
12141         sol_thread_store_registers): Likewise.
12142         * sparc-nat.c (sparc_fetch_inferior_registers,
12143         sparc_store_inferior_registers): Likewise.
12144         * tilegx-linux-nat.c (fetch_inferior_registers,
12145         store_inferior_registers): Likewise.
12146         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12147         vaxbsd_store_inferior_registers): Likewise.
12148         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12149         store_xtregs): Likewise.
12150
12151 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12152
12153         PR gdb/14441
12154         * NEWS: Mention support for rvalue references in GDB and python.
12155         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12156         supports both lvalue and rvalue references.
12157
12158 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12159
12160         PR gdb/14441
12161         * gdbtypes.c (rank_one_type): Implement overloading
12162         resolution rules regarding rvalue references.
12163
12164 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12165
12166         PR gdb/14441
12167         * aarch64-tdep.c (aarch64_type_align)
12168         (aarch64_extract_return_value, aarch64_store_return_value): Change
12169         lvalue reference type checks to general reference type checks.
12170         * amd64-tdep.c (amd64_classify): Likewise.
12171         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12172         Likewise.
12173         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12174         (arm_store_return_value): Likewise.
12175         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12176         * c-typeprint.c (c_print_type): Likewise.
12177         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12178         (cplus_number_of_children, cplus_describe_child): Likewise.
12179         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12180         * completer.c (expression_completer): Likewise.
12181         * cp-support.c (make_symbol_overload_list_adl_namespace):
12182         Likewise.
12183         * darwin-nat-info.c (info_mach_region_command): Likewise.
12184         * dwarf2loc.c (entry_data_value_coerce_ref)
12185         (value_of_dwarf_reg_entry): Likewise.
12186         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12187         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12188         Likewise.
12189         * findvar.c (extract_typed_address, store_typed_address):
12190         Likewise.
12191         * gdbtypes.c (rank_one_type): Likewise.
12192         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12193         * infcall.c (value_arg_coerce): Likewise.
12194         * language.c (pointer_type): Likewise.
12195         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12196         Likewise.
12197         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12198         * mn10300-tdep.c (mn10300_type_align): Likewise.
12199         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12200         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12201         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12202         Likewise.
12203         * printcmd.c (print_formatted, x_command): Likewise.
12204         * python/py-type.c (typy_get_composite, typy_template_argument):
12205         Likewise.
12206         * python/py-value.c (valpy_referenced_value)
12207         (valpy_get_dynamic_type, value_has_field): Likewise.
12208         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12209         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12210         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12211         * spu-tdep.c (spu_scalar_value_p): Likewise.
12212         * symtab.c (lookup_symbol_aux): Likewise.
12213         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12214         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12215         Likewise.
12216         * valops.c (value_cast_pointers, value_cast)
12217         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12218         (value_struct_elt, value_struct_elt_bitpos)
12219         (value_find_oload_method_list, find_overload_match)
12220         (value_rtti_indirect_type): Likewise.
12221         * valprint.c (val_print_scalar_type_p, generic_val_print):
12222         Likewise.
12223         * value.c (value_actual_type, value_as_address, unpack_long)
12224         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12225         (coerce_ref): Likewise.
12226         * varobj.c (varobj_get_value_type): Likewise.
12227
12228 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12229
12230         PR gdb/14441
12231         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12232         table of constants.
12233         * python/lib/gdb/command/explore.py: Support exploring values
12234         of rvalue reference types.
12235         * python/lib/gdb/types.py: Implement get_basic_type() for
12236         rvalue reference types.
12237         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12238         constant.
12239         * python/py-value.c (valpy_getitem): Add an rvalue reference
12240         check.
12241         (valpy_reference_value): Add new parameter "refcode".
12242         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12243         New wrappers for valpy_reference_value().
12244         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12245         (gdbpy_invoke_xmethod): Likewise.
12246
12247 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12248
12249         PR gdb/14441
12250         * dwarf2read.c (process_die, read_type_die_1): Handle the
12251         DW_TAG_rvalue_reference_type DIE.
12252         (read_tag_reference_type): Add new parameter "refcode".
12253
12254 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12255
12256         PR gdb/14441
12257         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12258         (c_type_print_modifier, c_type_print_varspec_suffix)
12259         (c_type_print_base): Support printing rvalue reference types.
12260         * c-valprint.c (c_val_print, c_value_print): Support printing
12261         rvalue reference values.
12262
12263 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12264
12265         PR gdb/14441
12266         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12267         typename.
12268         * cp-support.c (replace_typedefs): Handle
12269         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12270         * python/py-type.c (typy_lookup_type): Likewise.
12271
12272 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12273
12274         PR gdb/14441
12275         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12276         * parse.c (insert_type): Change assert statement.
12277         (follow_types): Handle rvalue reference types.
12278         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12279         constant.
12280
12281 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12282
12283         PR gdb/14441
12284         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12285         value_ref() interface.
12286         * c-valprint.c (c_value_print): Likewise.
12287         * infcall.c (value_arg_coerce): Likewise.
12288         * python/py-value.c (valpy_reference_value): Likewise.
12289         * valops.c (value_cast, value_reinterpret_cast)
12290         (value_dynamic_cast, typecmp): Likewise.
12291         (value_ref): Parameterize by kind of return value reference type.
12292         * value.h (value_ref): Add new parameter "refcode".
12293
12294 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12295
12296         PR gdb/14441
12297         * dwarf2read.c (read_tag_reference_type): Use
12298         lookup_lvalue_reference_type() instead of lookup_reference_type().
12299         * eval.c (evaluate_subexp_standard): Likewise.
12300         * f-exp.y: Likewise.
12301         * gdbtypes.c (make_reference_type, lookup_reference_type):
12302         Generalize with rvalue reference types.
12303         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12304         convenience wrappers for lookup_reference_type().
12305         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12306         reference kind parameter.
12307         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12308         wrappers for lookup_reference_type().
12309         * guile/scm-type.c (gdbscm_type_reference): Use
12310         lookup_lvalue_reference_type() instead of lookup_reference_type().
12311         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12312         * parse.c (follow_types): Likewise.
12313         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12314         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12315         Likewise.
12316         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12317         (gdbpy_invoke_xmethod): Likewise.
12318         * stabsread.c: Provide extra argument to make_reference_type()
12319         call.
12320         * valops.c (value_ref, value_rtti_indirect_type): Use
12321         lookup_lvalue_reference_type() instead of lookup_reference_type().
12322
12323 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12324
12325         PR gdb/14441
12326         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12327         (TYPE_IS_REFERENCE): New macro.
12328         (struct type): Add rvalue_reference_type field.
12329         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12330
12331 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12332
12333         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12334         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12335         New function definition.
12336         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12337         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12338         New function declaration.
12339         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12340         * mi/mi-interp.h: New file.
12341         * solib.c (info_sharedlibrary_command): Replace for loop with
12342         ALL_SO_LIBS macro
12343         * solib.h (update_solib_list): New function declaration.
12344         (so_list_head): Move macro.
12345         * solist.h (ALL_SO_LIBS): New macro.
12346
12347 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12348
12349         * infcmd.c (post_create_inferior): Remove unused argument in
12350         call to solib_add.
12351         * remote.c (remote_start_remote): Likewise.
12352         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12353         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12354         (enable_break): Likewise.
12355         * solib.c (update_solib_list): Remove unused target argument
12356         and its documentation.
12357         (solib_add): Remove unused target argument.  Remove unused
12358         argument in call to update_solib_list.
12359         (info_sharedlibrary_command): Remove unused argument in call
12360         to update_solib_list.
12361         (sharedlibrary_command): Remove unused argument in call to
12362         solib_add.
12363         (handle_solib_event): Likewise.
12364         (reload_shared_libraries): Likewise.
12365         * solib.h (solib_add): Remove unused target argument.
12366
12367 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12368
12369         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12370         (s390_displaced_step_fixup): Cover relative branches with the
12371         default fixup handling.  This fixes lack of support for some
12372         relative branch instructions.
12373
12374 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12375
12376         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12377         ptid from regcache.
12378
12379 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12380
12381         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12382         i386_darwin_store_inferior_registers): Use ptid from regcache.
12383
12384 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12385
12386         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12387         i386bsd_store_inferior_registers): Use ptid from regcache.
12388
12389 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12390
12391         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12392         hppaobsd_store_registers): Use ptid from regcache.
12393
12394 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12395
12396         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12397         hppanbsd_store_registers): Use ptid from regcache.
12398
12399 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12400
12401         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12402         from regcache.  Use get_ptrace_pid.
12403
12404 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12405
12406         * corelow.c (get_core_register_section): Use ptid from regcache,
12407         update doc.
12408
12409 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12410
12411         * bsd-uthread.c (bsd_uthread_fetch_registers,
12412         bsd_uthread_store_registers): Use ptid from regcache, set and
12413         restore inferior_ptid.
12414
12415 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12416
12417         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12418         fetch_fp_regs, store_register, store_regs, store_fp_register,
12419         store_fp_regs): Use ptid from regcache.
12420
12421 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12422
12423         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12424         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12425         store_vfp_regs): Use ptid from regcache.
12426
12427 2017-03-17  Pedro Alves  <palves@redhat.com>
12428
12429         PR remote/21188
12430         * ser-base.c (ser_base_wait_for): Add comment.
12431         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12432         version.
12433         * ser-unix.c (hardwire_raw): Remove reference to
12434         scb->current_timeout.
12435         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12436         (hardwire_ops): Install ser_base_readchar instead of
12437         hardwire_readchar.
12438         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12439         Remove fields.
12440
12441 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12442
12443         PR gdb/19637
12444         * python/lib/gdb/printer/bound_registers.py: Add support for
12445         Python 3.
12446
12447 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12448
12449         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12450         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12451         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12452         byte_offset to subobj_byte_offset.  Fix the handling of
12453         DWARF_VALUE_STACK on big-endian targets when coming via an
12454         implicit pointer.
12455         (dwarf2_evaluate_loc_desc): Adjust call to
12456         dwarf2_evaluate_loc_desc_full.
12457         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12458         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12459
12460 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12461
12462         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12463         and REVSH instructions.
12464
12465 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12466
12467         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12468         (arm_record_test): Declare.
12469         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12470         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12471         align with the manual.
12472         (thumb_record_misc): Adjust the code order to align with the
12473         manual.
12474         (thumb2_record_decode_insn_handler): Fix instruction matching.
12475         (instruction_reader_thumb): New class.
12476         (arm_record_test): New function.
12477
12478 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12479
12480         * arm-tdep.c (abstract_memory_reader): New class.
12481         (instruction_reader): New class.
12482         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12483         (decode_insn): Likewise.
12484
12485 2017-03-16  Doug Evans  <dje@google.com>
12486
12487         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12488         member.  Change type of TYPE member to SCM.  All uses updated.
12489         (lsscm_make_lazy_string_smob): Add assert.
12490         (lsscm_make_lazy_string): Flag bad length values.
12491         (lsscm_elt_type): New function.
12492         (gdbscm_lazy_string_to_value): Rewrite to use
12493         lsscm_safe_lazy_string_to_value.
12494         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12495         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12496         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12497         in incoming type.
12498         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12499         * guile/scm-type.c (tyscm_scm_to_type): New function.
12500
12501 2017-03-15  Doug Evans  <dje@google.com>
12502
12503         PR python/17728, python/18439, python/18779
12504         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12505         member.  Change type of TYPE member to PyObject *.  All uses updated.
12506         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12507         (gdbpy_create_lazy_string_object): Flag bad length values.
12508         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12509         Handle typedefs in incoming type.
12510         (stpy_lazy_string_elt_type): New function.
12511         (gdbpy_extract_lazy_string): Call it.
12512         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12513         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12514         typedefs in incoming type.
12515
12516 2017-03-16  Doug Evans  <dje@google.com>
12517
12518         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12519         * guile/scm-type.c (tyscm_scm_to_type): New function.
12520
12521 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12522
12523         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12524         "ULONGEST" for "skip".
12525
12526 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12527
12528         PR gdb/21220
12529         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12530         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12531         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12532         over ptrace peek/poke until end of buffer or error.
12533
12534 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12535
12536         * parse.c (length_of_subexp): Make static.
12537         * parser-defs.h (length_of_subexp): Remove.
12538
12539 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12540
12541         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12542         as well.
12543
12544 2017-03-14  Pedro Alves  <palves@redhat.com>
12545
12546         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12547         (main): Use std::unique_ptr.  Remove calls to
12548         cp_demangled_name_parse_free.
12549
12550 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12551
12552         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12553         alphabsd_store_inferior_registers): Use regcache->ptid instead
12554         of inferior_ptid.
12555
12556 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12557
12558         * aix-thread.c (aix_thread_fetch_registers,
12559         aix_thread_store_registers): Use regcache->ptid instead of
12560         inferior_ptid.
12561
12562 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12563
12564         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12565         store_gregs_to_thread, fetch_fpregs_from_thread,
12566         store_fpregs_to_thread): Use regcache->ptid instead of
12567         inferior_ptid.
12568
12569 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12570
12571         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12572         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12573         instead of inferior_ptid.
12574
12575 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12576
12577         * target.c (target_fetch_registers, target_store_registers): Add
12578         assert.
12579
12580 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12581
12582         * regcache.h (regcache_get_ptid): New function.
12583         * regcache.c (regcache_get_ptid): New function.
12584
12585 2017-03-13  Mark Wielaard  <mark@klomp.org>
12586
12587         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12588
12589 2017-03-10  Keith Seitz  <keiths@redhat.com>
12590
12591         PR c++/8218
12592         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12593
12594 2017-03-08  Pedro Alves  <palves@redhat.com>
12595
12596         PR gdb/18360
12597         * infrun.c (start_step_over, do_target_resume, resume)
12598         (restart_threads): Assert we're not resuming a thread that is
12599         meant to be stopped.
12600         (infrun_thread_stop_requested_callback): Delete.
12601         (infrun_thread_stop_requested): If the thread is internally
12602         stopped, queue a pending stop event and clear the thread's
12603         inline-frame state.
12604         (handle_stop_requested): New function.
12605         (handle_syscall_event, handle_inferior_event_1): Use
12606         handle_stop_requested.
12607         (handle_stop_requested): New function.
12608         (handle_signal_stop): Set the thread's stop_signal here instead of
12609         at caller.
12610         (finish_step_over): Clear step over info unconditionally.
12611         (handle_signal_stop): If the user had interrupted the event
12612         thread, consider the stop a random signal.
12613         (handle_signal_stop) <signal arrived while stepping over
12614         breakpoint>: Don't restart threads here.
12615         (stop_waiting): Don't clear step-over info here.
12616
12617 2017-03-08  Pedro Alves  <palves@redhat.com>
12618
12619         PR 21206
12620         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12621         goes to argument 2, not 1.
12622
12623 2017-03-08  Pedro Alves  <palves@redhat.com>
12624
12625         PR cli/21218
12626         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12627         display_gdb_prompt.
12628         (command_line_input): Add comment.
12629
12630 2017-03-08  Pedro Alves  <palves@redhat.com>
12631
12632         PR tui/21216
12633         * tui/tui-file.c (tui_file::write): New.
12634         * tui/tui-file.h (tui_file): Override "write".
12635         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12636         factored out from ...
12637         (tui_puts): ... here.
12638         (tui_putc): Use them.
12639         (tui_write): New function.
12640         * tui/tui-io.h (tui_write): Declare.
12641
12642 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12643
12644         * Makefile.in (SFILES): Replace "environ.c" with
12645         "common/environ.c".
12646         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12647         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12648         to...
12649         * common/environ.c: ... here.
12650         * environ.h: Moved to...
12651         * common/environ.h: ... here.
12652
12653 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12654
12655         * gdbarch.sh (pstring_ptr): New static function.
12656         (gdbarch_disassembler_options): Use it.
12657         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12658         not valid_disassembler_option->name.
12659         * gdbarch.c: Regenerate.
12660
12661 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12662
12663         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12664
12665 2017-03-07  Pedro Alves  <palves@redhat.com>
12666
12667         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12668
12669 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12670
12671         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12672         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12673         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12674         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12675
12676 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12677
12678         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12679
12680 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12681
12682         * remote.c (remote_add_target_side_commands): Use range-based
12683         for loop.
12684
12685 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12686
12687         PR gdb/21165
12688         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12689         value is lazy.
12690         * valprint.c (common_val_print): Likewise.
12691
12692 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12693
12694         * NEWS: Mention new set/show disassembler-options commands.
12695         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12696         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12697         (prospective_options): New static variable.
12698         (gdb_disassembler::gdb_disassembler): Initialize
12699         m_di.disassembler_options.
12700         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12701         (get_disassembler_options): New function.
12702         (set_disassembler_options): Likewise.
12703         (set_disassembler_options_sfunc): Likewise.
12704         (show_disassembler_options_sfunc): Likewise.
12705         (disassembler_options_completer): Likewise.
12706         (_initialize_disasm): Likewise.
12707         * disasm.h (get_disassembler_options): New prototype.
12708         (set_disassembler_options): Likewise.
12709         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12710         (gdbarch_verify_disassembler_options): Likewise.
12711         * gdbarch.c: Regenerate.
12712         * gdbarch.h: Likewise.
12713         * arm-tdep.c (num_disassembly_options): Delete.
12714         (set_disassembly_style): Likewise.
12715         (arm_disassembler_options): New static variable.
12716         (set_disassembly_style_sfunc): Convert short style name into long
12717         option name.  Call set_disassembler_options.
12718         (show_disassembly_style_sfunc): New function.
12719         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12720         set_gdbarch_verify_disassembler_options.
12721         (_initialize_arm_tdep): Delete regnames variable and update callers.
12722         (arm_disassembler_options): Initialize.
12723         (disasm_options): New variable.
12724         (num_disassembly_options): Rename from this...
12725         (num_disassembly_styles): ...to this.  Compute by scanning through
12726         disasm_options.
12727         (valid_disassembly_styles): Initialize using disasm_options.
12728         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12729         set_arm_regname_option.
12730         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12731         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12732         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12733         set_gdbarch_verify_disassembler_options.
12734         * s390-tdep.c (s390_disassembler_options): New static variable.
12735         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12736         set_gdbarch_verify_disassembler_options.
12737
12738 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12739
12740         * remote.c (remote_add_target_side_condition): Remove "struct"
12741         keyword from range-based for loop.
12742
12743 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12744
12745         * remote.c (remote_add_target_side_condition): Use range-based
12746         for loop.  Update comment.
12747
12748 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12749
12750         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12751
12752 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12753
12754         * regcache.c (regcache_raw_update): New function.
12755         (regcache_raw_read): Move code to regcache_raw_update.
12756         * regcache.h (regcache_raw_update): New declaration.
12757         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12758
12759 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12760
12761         * dwarf2read.c (create_debug_type_hash_table): Initialize
12762         header.signature and header.type_offset_in_tu.
12763
12764 2017-02-24  Pedro Alves  <palves@redhat.com>
12765
12766         * symtab.c (make_file_symbol_completion_list_1): Use
12767         add_symtab_completions.
12768
12769 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12770
12771         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12772
12773 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12774
12775         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12776         I386_MAX_REGISTER_SIZE.
12777         (i386_pseudo_register_write): Likewise.
12778         (i386_process_record): Likewise.
12779         * i387-tdep.c (i387_supply_xsave): Likewise.
12780         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12781         (store_register): Likewise.
12782
12783 2017-02-23  Pedro Alves  <palves@redhat.com>
12784
12785         * ada-lang.c: Include "common/function-view.h".
12786         (ada_iterate_over_symbols): Adjust to use function_view as
12787         callback type.
12788         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12789         (ada_make_symbol_completion_list): Use a lambda.
12790         (ada_exc_search_name_matches): Delete.
12791         (name_matches_regex): New.
12792         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12793         * compile/compile-c-support.c: Include "common/function-view.h".
12794         (print_one_macro): Change prototype to accept a ui_file pointer.
12795         (write_macro_definitions): Use a lambda.
12796         * dwarf2read.c: Include "common/function-view.h".
12797         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12798         (dw2_expand_symtabs_matching): Adjust to use function_view as
12799         callback type.
12800         * language.h: Include "common/function-view.h".
12801         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12802         function_view as callback type.
12803         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12804         * linespec.c: Include "common/function-view.h".
12805         (collect_info::add_symbol): New method.
12806         (struct symbol_and_data_callback, iterate_inline_only, struct
12807         symbol_matcher_data, iterate_name_matcher): Delete.
12808         (iterate_over_all_matching_symtabs): Adjust to use function_view
12809         as callback type and lambdas.
12810         (iterate_over_file_blocks): Adjust to use function_view as
12811         callback type.
12812         (decode_compound_collector): Now a class with private fields.
12813         (decode_compound_collector::release_symbols): New method.
12814         (collect_one_symbol): Rename to...
12815         (decode_compound_collector::operator()): ... this and adjust.
12816         (lookup_prefix_sym): decode_compound_collector construction bits
12817         move to decode_compound_collector ctor.  Pass the
12818         decode_compound_collector object directly as callback.  Remove
12819         cleanups and use decode_compound_collector::release_symbols
12820         instead.
12821         (symtab_collector): Now a class with private fields.
12822         (symtab_collector::release_symtabs): New method.
12823         (add_symtabs_to_list): Rename to...
12824         (symtab_collector::operator()): ... this and adjust.
12825         (collect_symtabs_from_filename): symtab_collector construction
12826         bits move to symtab_collector ctor.  Pass the symtab_collector
12827         object directly as callback.  Remove cleanups and use
12828         symtab_collector::release_symtabs instead.
12829         (collect_symbols): Delete.
12830         (add_matching_symbols_to_info): Use lambdas.
12831         * macrocmd.c (print_macro_callback): Delete.
12832         (info_macro_command): Use a lambda.
12833         (info_macros_command): Pass print_macro_definition as callable
12834         directly.
12835         (print_one_macro): Remove 'ignore' parameter.
12836         (macro_list_command): Adjust.
12837         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12838         (macro_for_each_data::user_data): Delete field.
12839         (foreach_macro): Adjust to call the function_view.
12840         (macro_for_each): Adjust to use function_view as callback type.
12841         (foreach_macro_in_scope): Adjust to call the function_view.
12842         (macro_for_each_in_scope): Adjust to use function_view as callback
12843         type.
12844         * macrotab.h: Include "common/function-view.h".
12845         (macro_callback_fn): Declare a prototype instead of a pointer.
12846         Remove "user_data" parameter.
12847         (macro_for_each, macro_for_each_in_scope): Adjust to use
12848         function_view as callback type.
12849         * psymtab.c (partial_map_expand_apply)
12850         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12851         Adjust to use function_view as callback type and to return bool.
12852         (psym_expand_symtabs_matching): Adjust to use function_view as
12853         callback types.
12854         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12855         to use function_view as callback type and to return bool.
12856         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12857         callback types.
12858         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12859         as callback types.
12860         * symfile.h: Include "common/function-view.h".
12861         (expand_symtabs_file_matcher_ftype)
12862         (expand_symtabs_symbol_matcher_ftype)
12863         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12864         return bool.
12865         (quick_symbol_functions::map_symtabs_matching_filename)
12866         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12867         function_view as callback type and return bool.
12868         (expand_symtabs_matching): Adjust to use function_view as callback
12869         type.
12870         (maintenance_expand_name_matcher)
12871         (maintenance_expand_file_matcher): Delete.
12872         (maintenance_expand_symtabs): Use lambdas.
12873         * symtab.c (iterate_over_some_symtabs): Adjust to use
12874         function_view as callback types and return bool.
12875         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12876         of a cleanup.
12877         (lookup_symtab_callback): Delete.
12878         (lookup_symtab): Use a lambda.
12879         (iterate_over_symbols): Adjust to use function_view as callback
12880         type.
12881         (struct search_symbols_data, search_symbols_file_matches)
12882         (search_symbols_name_matches): Delete.
12883         (search_symbols): Use a pair of lambdas.
12884         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12885         (symtab_expansion_callback): Delete.
12886         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12887         * symtab.h: Include "common/function-view.h".
12888         (iterate_over_some_symtabs): Adjust to use function_view as
12889         callback type and return bool.
12890         (iterate_over_symtabs): Adjust to use function_view as callback
12891         type.
12892         (symbol_found_callback_ftype): Remove 'data' parameter and return
12893         bool.
12894         (iterate_over_symbols): Adjust to use function_view as callback
12895         type.
12896
12897 2017-02-23  Pedro Alves  <palves@redhat.com>
12898
12899         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12900         (%.o) <unittests/%.c>: New pattern.
12901         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12902         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12903         * common/function-view.h: New file.
12904         * unittests/function-view-selftests.c: New file.
12905         * configure: Regenerate.
12906
12907 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12908
12909         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12910         inferior_ptid.
12911         * go32-nat.c (go32_thread_alive): Likewise.
12912
12913 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12914
12915         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12916         delete.
12917
12918 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12919
12920         * varobj.c (varobj_clear_saved_item): Use delete instead of
12921         xfree.
12922         (update_dynamic_varobj_children): Likewise.
12923
12924 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12925
12926         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12927
12928 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12929
12930         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12931         m_enum_value to 0 in default constructor.
12932
12933 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12934
12935         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12936         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12937         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12938         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12939         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12940         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12941         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12942         IS_STORE_CONDITIONAL_INSN.
12943
12944 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12945
12946         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12947
12948 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12949
12950         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12951
12952 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12953
12954         * dwarf2read.c (skip_one_die, read_attribute_value)
12955         (dwarf2_const_value_attr, dump_die_shallow)
12956         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12957         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12958
12959 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12960
12961         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12962         (dwarf_parse_macro_header): Accept DWARF version 5.
12963         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12964
12965 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12966
12967         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12968         DW_AT_GNU_*.
12969         * common/common-exceptions.h (enum errors): Likewise.
12970         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12971         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12972         (dwarf_expr_context::execute_stack_op): Likewise.
12973         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12974         Likewise.
12975         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12976         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12977         (show_entry_values_debug, call_site_to_target_addr)
12978         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12979         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12980         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12981         (value_of_dwarf_block_entry, indirect_pieced_value)
12982         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12983         (disassemble_dwarf_expression): Likewise.
12984         * dwarf2read.c (process_die, inherit_abstract_dies)
12985         (read_call_site_scope): Likewise.
12986         * gdbtypes.h (struct func_type, struct call_site_parameter)
12987         (struct call_site): Likewise.
12988         * stack.c (read_frame_arg): Likewise.
12989         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12990
12991 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12992
12993         * defs.h (read_unsigned_leb128): New declaration.
12994         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12995         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12996         (dwarf2_find_location_expression): Call also
12997         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12998         * dwarf2loc.h (dwarf2_version): New declaration.
12999         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13000         rnglists.
13001         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13002         .debug_rnglists.
13003         (struct dwop_section_names): Add loclists_dwo.
13004         (dwop_section_names): Add .debug_loclists.dwo.
13005         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13006         (struct dwarf2_per_cu_data): Add dwarf_version.
13007         (struct dwo_sections): Add loclists.
13008         (struct attr_abbrev): Add implicit_const.
13009         (read_indirect_line_string): New declaration.
13010         (read_unsigned_leb128): Delete declaration.
13011         (rcuh_kind): New definition.
13012         (read_and_check_comp_unit_head): Change parameter
13013         is_debug_types_section to section_kind.
13014         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13015         (read_comp_unit_head): Change parameter abfd to section, add parameter
13016         section_kind.  Handle DWARF-5.
13017         (error_check_comp_unit_head): Accept also DWARF version 5.
13018         (read_and_check_comp_unit_head): Change parameter
13019         is_debug_types_section to section_kind.
13020         (read_and_check_type_unit_head): Delete function.
13021         (read_abbrev_offset): Handle DWARF-5.
13022         (create_debug_type_hash_table): Add parameter section_kind.  Process
13023         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13024         comp_unit_head.
13025         (create_debug_types_hash_table): Update create_debug_type_hash_table
13026         caller.
13027         (create_all_type_units): Call create_debug_type_hash_table.
13028         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13029         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13030         caller.
13031         (skip_one_die): Handle DW_FORM_implicit_const.
13032         (dwarf2_rnglists_process): New function.
13033         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13034         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13035         (read_attribute_value): Handle DW_FORM_implicit_const,
13036         DW_FORM_line_strp.
13037         (read_attribute): Handle DW_FORM_implicit_const.
13038         (read_indirect_string_at_offset_from): New function from
13039         read_indirect_string_at_offset.
13040         (read_indirect_string_at_offset): Call
13041         read_indirect_string_at_offset_from.
13042         (read_indirect_line_string_at_offset): New function.
13043         (read_indirect_string): New function comment.
13044         (read_indirect_line_string): New function.
13045         (read_unsigned_leb128): Make it global.
13046         (dwarf2_string_attr): Handle DWARF-5.
13047         (add_include_dir_stub, read_formatted_entries): New functions.
13048         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13049         Handle DWARF-5.
13050         (per_cu_header_read_in): Update read_comp_unit_head caller.
13051         (dwarf2_version): New function.
13052         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13053         rnglists.
13054         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13055         fields.
13056
13057 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13058
13059         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13060
13061 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13062
13063         * dwarf2read.c (dwarf2_ranges_process): New function from
13064         dwarf2_ranges_read.
13065         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13066         dwarf2_ranges_process.
13067
13068 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13069
13070         * dwarf2read.c (create_debug_type_hash_table): New function from
13071         create_debug_types_hash_table.
13072         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13073         (create_all_type_units, open_and_init_dwo_file): Update
13074         create_debug_types_hash_table callers.
13075
13076 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13077
13078         PR gdb/16188
13079         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13080         refer to 'ap', not 'args'.
13081
13082 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13083             Pedro Alves  <palves@redhat.com>
13084
13085         PR gdb/16188
13086         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13087         calls succeeded.
13088         * fork-child.c (trace_start_error): New function.
13089         (trace_start_error_with_name): Likewise.
13090         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13091         * inf-ptrace.c (inf_ptrace_me): Likewise.
13092         * inferior.h (trace_start_error): New prototype.
13093         (trace_start_error_with_name): Likewise.
13094
13095 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13096
13097         PR gdb/21164
13098         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13099         NULL before using it.
13100         * symmisc.c (maintenance_print_symbols): Likewise.
13101         (maintenance_print_msymbols): Likewise.
13102
13103 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13104
13105         * NEWS: Add record Python bindings entry.
13106
13107 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13108
13109         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13110         py-record-full.o.
13111         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13112         * python/py-record-btrace.c, python/py-record-btrace.h,
13113         python/py-record-full.c, python/py-record-full.h: New file.
13114         * python/py-record.c: Add include for py-record-btrace.h and
13115         py-record-full.h.
13116         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13117         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13118         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13119         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13120         New definition.
13121         (gdbpy_initialize_btrace): New export.
13122         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13123
13124 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13125
13126         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13127         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13128         * python/py-record.c: New file.
13129         * python/python-internal.h (gdbpy_start_recording,
13130         gdbpy_current_recording, gdpy_stop_recording,
13131         gdbpy_initialize_record): New export.
13132         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13133         (python_GdbMethods): Add gdbpy_start_recording,
13134         gdbpy_current_recording and gdbpy_stop_recording.
13135
13136 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13137
13138         * record-btrace.c (record_btrace_record_method): New function.
13139         (init_record_btrace_ops): Initialize to_record_method.
13140         * record-full.c (record_full_record_method): New function.
13141         (init_record_full_ops, init_record_full_core_ops): Add
13142         record_full_record_method.
13143         * record.h (enum record_method): New enum.
13144         * target-debug.h (target_debug_print_enum_record_method: New define.
13145         * target-delegates.c: Regenerate.
13146         * target.c (target_record_method): New function.
13147         * target.h: Include record.h.
13148         (struct target_ops) <to_record_method>: New field.
13149         (target_record_method): New export.
13150
13151 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13152
13153         * record.h (record_start, record_stop): New export.
13154         * record.c (record_start, record_stop): New function.
13155
13156 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13157
13158         * btrace.c (btrace_fetch): Copy function call segments pointer
13159         into a vector.
13160         (btrace_clear): Clear the vector.
13161         (btrace_find_insn_by_number): Use binary search to find the correct
13162         function call segment.
13163         * btrace.h (brace_fun_p): New typedef.
13164         (struct btrace_thread_info) <functions>: New field.
13165
13166 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13167
13168         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13169         * btrace.c (btrace_decode_error): ... here.  New function.
13170         * btrace.h (btrace_decode_error): New export.
13171
13172 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13173
13174         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13175         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13176         btrace_find_insn_by_number): Remove special case for gaps.
13177         * btrace.h (btrace_insn_get_error): New export.
13178         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13179         * record-btrace.c (btrace_insn_history): Print number for gaps.
13180         (record_btrace_info, record_btrace_goto): Handle gaps.
13181
13182 2017-02-14  Tom Tromey  <tom@tromey.com>
13183
13184         PR python/13598:
13185         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13186         event.
13187         * python/py-evts.c (gdbpy_initialize_py_events): Add
13188         before_prompt registry.
13189         * python/py-events.h (events_object) <before_prompt>: New field.
13190
13191 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13192
13193         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13194
13195 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13196
13197         * symfile (_initialize_symfile): Add usage text to the load command's
13198         help text.
13199
13200 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13201
13202         * utils.c (defaulted_query): Don't query on secondary UIs.
13203
13204 2017-02-10  Tom Tromey  <tom@tromey.com>
13205
13206         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13207
13208 2017-02-10  Tom Tromey  <tom@tromey.com>
13209
13210         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13211         "cleanup" local.
13212         * python/py-type.c (typy_legacy_template_argument): Remove
13213         unnecessary "cleanup" local.
13214
13215 2017-02-10  Tom Tromey  <tom@tromey.com>
13216
13217         * python/python.c (do_start_initialization): New function, from
13218         _initialize_python.
13219         (_initialize_python): Call do_start_initialization.
13220         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13221         goto.
13222
13223 2017-02-10  Tom Tromey  <tom@tromey.com>
13224
13225         * python/py-prettyprint.c (pretty_print_one_value): Use
13226         gdbpy_ref.
13227
13228 2017-02-10  Tom Tromey  <tom@tromey.com>
13229
13230         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13231         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13232         gdbpy_ref.
13233         * python/py-type.c (field_new): Use gdbpy_ref.
13234         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13235         gdbpy_ref.
13236         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13237         (py_free_pspace): Likewise.
13238         (pspace_to_pspace_object): Likewise.
13239         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13240         (py_free_objfile): Likewise.
13241         (objfile_to_objfile_object): Likewise.
13242         * python/py-inferior.c (delete_thread_object): Use
13243         gdbpy_ref.
13244         (infpy_read_memory): Likewise.
13245         (py_free_inferior): Likewise.
13246         * python/py-evtregistry.c (create_eventregistry_object): Use
13247         gdbpy_ref.
13248         * python/py-event.c (create_event_object): Use gdbpy_ref.
13249
13250 2017-02-10  Tom Tromey  <tom@tromey.com>
13251
13252         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13253         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13254         used.
13255         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13256         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13257         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13258         python/py-framefilter.c, python/py-function.c,
13259         python/py-inferior.c, python/py-infevents.c,
13260         python/py-linetable.c, python/py-newobjfileevent.c,
13261         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13262         python/py-signalevent.c, python/py-stopevent.c,
13263         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13264         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13265         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13266         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13267
13268 2017-02-10  Tom Tromey  <tom@tromey.com>
13269
13270         * ui-out.h (ui_out_emit_type): New class.
13271         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13272         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13273         and ui_out_emit_tuple.
13274         (enumerate_locals): Likewise.
13275         (py_mi_print_variables, py_print_locals, py_print_args): Use
13276         ui_out_emit_list.
13277         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13278         ui_out_emit_list.
13279         * common/gdb_optional.h: New file.
13280
13281 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13282
13283         * MAINTAINERS (Write After Approval): Update my e-mail address.
13284
13285 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13286
13287         PR gdb/21122
13288         * breakpoint.c (_initialize_breakpoint): Update the help description
13289         of the 'commands' command to indicate that it takes a list argument.
13290
13291 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13292
13293         * interps.c (current_interp_set_logging): Remove "return".
13294
13295 2017-02-09  Gary Benson  <gbenson@redhat.com>
13296
13297         * symtab.c (add_symtab_completions): Prevent NULL pointer
13298         dereference.
13299
13300 2017-02-08  Pedro Alves  <palves@redhat.com>
13301
13302         * interps.c (interp::interp): Remove reference to quiet_p.
13303         (interp_set): Make static.  Remove dead "Switching to" output
13304         code.
13305         (interp_quiet_p, interp_set_quiet): Delete.
13306         (interpreter_exec_cmd): Don't set the interpreter quiet.
13307         * interps.h (interp_quiet_p): Make static.
13308         (class interp) <quiet_p>: Remove field
13309
13310 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13311
13312         * cli/cli-decode.c (find_command_name_length): Make it extern.
13313         * cli/cli-decode.h (find_command_name_length): Declare.
13314         * cli/cli-script.c (command_name_equals, line_first_arg):
13315         New functions.
13316         (process_next_line): Use cli-decode to parse command names.
13317         (build_command_line): Make args a constant pointer.
13318
13319 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13320
13321         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13322         Remove case-insensitive search.
13323
13324 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13325
13326         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13327         at the end of the line.  Avoids an ARI warning.
13328
13329 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13330
13331         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13332         rdseed instructions.
13333         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13334
13335 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13336
13337         PR tdep/20936
13338         Provide and use sparc32 and sparc64 target description XML files.
13339         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13340         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13341         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13342         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13343         * features/sparc/sparc32-solaris.xml: New file.
13344         * features/sparc/sparc64-solaris.xml: New file.
13345         * features/sparc/sparc32-solaris.c: Generated.
13346         * features/sparc/sparc64-solaris.c: Generated.
13347         * sparc-tdep.h: Account for differences in target descriptions.
13348         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13349         (sparc32_register_type): Use target provided registers.
13350         (validate_tdesc_registers): New function.
13351         (sparc32_gdbarch_init): Use tdesc_has_registers.
13352         Set pseudoregister functions.
13353         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13354         (sparc64_register_type): Use target provided registers.
13355         (sparc64_init_abi): Set pseudoregister functions.
13356
13357 2017-02-03  Tom Tromey  <tom@tromey.com>
13358
13359         PR rust/21097:
13360         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13361         with a single member.
13362
13363 2017-02-03  Pedro Alves  <palves@redhat.com>
13364
13365         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13366         (cli_interp_base::~cli_interp_base): New.
13367         (cli_interp): New struct.
13368         (as_cli_interp): Cast the interp itself to cli_interp.
13369         (cli_interpreter_pre_command_loop): Rename to ...
13370         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13371         parameter.
13372         (cli_interpreter_init): Rename to ...
13373         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13374         boolean.  Make extern.
13375         (cli_interpreter_resume): Rename to ...
13376         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13377         extern.
13378         (cli_interpreter_suspend): Rename to ...
13379         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13380         extern.
13381         (cli_interpreter_exec): Rename to ...
13382         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13383         extern.
13384         (cli_interpreter_supports_command_editing): Rename to ...
13385         (cli_interp_base::supports_command_editing): ... this.  Remove
13386         'interp' parameter.  Make extern.
13387         (cli_ui_out): Rename to ...
13388         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13389         Make extern.
13390         (cli_set_logging): Rename to ...
13391         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13392         parameter.  Make extern.
13393         (cli_interp_procs): Delete.
13394         (cli_interp_factory): Adjust to use "new".
13395         * cli/cli-interp.h: Include "interps.h".
13396         (struct cli_interp_base): New struct.
13397         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13398         (interp_new): Delete.
13399         (interp::interp, interp::~interp): New.
13400         (interp_set): Use bool, and return void.  Assume the interpreter
13401         has suspend, init and resume methods, and that the all return
13402         void.
13403         (set_top_level_interpreter): interp_set returns void.
13404         (interp_ui_out): Adapt.
13405         (current_interp_set_logging): Adapt.
13406         (interp_data): Delete.
13407         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13408         (interp_exec): Adapt.
13409         (top_level_interpreter_data): Delete.
13410         * interps.h (interp_init_ftype, interp_resume_ftype)
13411         (interp_suspend_ftype, interp_exec_ftype)
13412         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13413         (class interp): New.
13414         (interp_new): Delete.
13415         (interp_set): Now returns void.  Use bool.
13416         (interp_data, top_level_interpreter_data): Delete.
13417         * mi/mi-common.h: Include interps.h.
13418         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13419         init, resume, suspect, exec, interp_ui_out, set_logging and
13420         pre_command_loop methods.
13421         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13422         (mi_interpreter_init): Rename to ...
13423         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13424         bool, return void and make extern.  Adjust.
13425         (mi_interpreter_resume): ... Rename to ...
13426         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13427         return void and make extern.  Adjust.
13428         (mi_interpreter_suspend): ... Rename to ...
13429         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13430         return void and make extern.  Adjust.
13431         (mi_interpreter_exec): ... Rename to ...
13432         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13433         extern.  Adjust.
13434         (mi_interpreter_pre_command_loop): ... Rename to ...
13435         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13436         parameter and make extern.
13437         (mi_on_normal_stop_1): Adjust.
13438         (mi_ui_out): Rename to ...
13439         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13440         parameter and make extern.  Adjust.
13441         (mi_set_logging): Rename to ...
13442         (mi_interp::set_logging): ... this.  Remove the 'interp'
13443         parameter and make extern.  Adjust.
13444         (mi_interp_procs): Delete.
13445         (mi_interp_factory): Adjust to use 'new'.
13446         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13447         (mi_print_exception, mi_execute_command, mi_load_progress):
13448         Adjust.
13449         * tui/tui-interp.c (tui_interp): New class.
13450         (as_tui_interp): Return a tui_interp pointer.
13451         (tui_on_normal_stop, tui_on_signal_received)
13452         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13453         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13454         to use interp::interp_ui_out.
13455         (tui_init): Rename to ...
13456         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13457         bool, return void and make extern.  Adjust.
13458         (tui_resume): Rename to ...
13459         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13460         return void and make extern.  Adjust.
13461         (tui_suspend): Rename to ...
13462         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13463         return void and make extern.  Adjust.
13464         (tui_ui_out): Rename to ...
13465         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13466         parameter, and make extern.  Adjust.
13467         (tui_exec): Rename to ...
13468         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13469         make extern.
13470         (tui_interp_procs): Delete.
13471         (tui_interp_factory): Use "new".
13472
13473 2017-02-02  Tom Tromey  <tom@tromey.com>
13474
13475         * rust-exp.y (ends_raw_string, space_then_number)
13476         (rust_identifier_start_p): Return bool.
13477         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13478         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13479         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13480         (rust_chartype_p): Return bool.
13481         (val_print_struct, rust_print_struct_def, rust_print_type):
13482         Update.
13483         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13484         Return bool.
13485
13486 2017-02-02  Tom Tromey  <tom@tromey.com>
13487
13488         * rust-lang.c: Reindent.
13489
13490 2017-02-02  Tom Tromey  <tom@tromey.com>
13491
13492         * rust-lang.h (rust_crate_for_block): Update.
13493         * rust-lang.c (rust_crate_for_block): Return std::string.
13494         (rust_get_disr_info): Use std:;string, not
13495         gdb::unique_xmalloc_ptr.
13496         * rust-exp.y (crate_name): Update.
13497
13498 2017-02-02  Pedro Alves  <palves@redhat.com>
13499
13500         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13501         field out of gdb_disassembler_test and make it static.
13502
13503 2017-02-02  Pedro Alves  <palves@redhat.com>
13504
13505         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13506         mi1_interp and mi_interp fields.
13507
13508 2017-02-02  Pedro Alves  <palves@redhat.com>
13509
13510         * cli/cli-interp.c (struct saved_output_files, saved_output):
13511         Moved from cli/cli-logging.c.
13512         (cli_set_logging): New function.
13513         (cli_interp_procs): Install cli_set_logging.
13514         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13515         Declare.
13516         * cli/cli-logging.c (struct saved_output_files, saved_output):
13517         Moved to cli/cli-interp.c.
13518         (pop_output_files): Don't save outputs here.
13519         (make_logging_output): New function.
13520         (handle_redirections): Don't build tee nor save previous outputs
13521         here.
13522         * interps.c (current_interp_set_logging): Change prototype.
13523         Assume there's always a set_logging_proc method installed.
13524         * interps.h (interp_set_logging_ftype): Change prototype.
13525         (current_interp_set_logging): Change prototype and adjust comment.
13526         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13527         use make_logging_output.
13528         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13529 2017-02-02  Pedro Alves  <palves@redhat.com>
13530
13531         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13532         from ...
13533         (set_logging_overwrite): ... here.
13534         (logging_no_redirect_file): Delete.
13535         (set_logging_redirect): Don't handle redirection on the fly.
13536         Instead warn that "logging off" / "logging on" is necessary.
13537         (pop_output_files): Delete references to logging_no_redirect_file.
13538         (show_logging_command): Always speak in terms of what will happen
13539         once logging is reenabled.
13540
13541 2017-02-02  Pedro Alves  <palves@redhat.com>
13542
13543         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13544
13545 2017-02-02  Pedro Alves  <palves@redhat.com>
13546
13547         * disasm.c (gdb_pretty_print_insn): Rename to ...
13548         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13549         Remove gdbarch parameter.  Adapt to clear the object's buffers
13550         instead of allocating new buffers, and to print using the object's
13551         gdb_disassembler instead of calling gdb_print_insn.
13552         (dump_insns): Use gdb_pretty_print_disassembler.
13553         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13554         (gdb_pretty_print_disassembler): New class.
13555         * record-btrace.c (btrace_insn_history): Use
13556         gdb_pretty_print_disassembler.
13557
13558 2017-02-02  Pedro Alves  <palves@redhat.com>
13559
13560         * ada-lang.c (type_as_string): Use string_file.
13561         * ada-valprint.c (ada_print_floating): Use string_file.
13562         * ada-varobj.c (ada_varobj_scalar_image)
13563         (ada_varobj_get_value_image): Use string_file.
13564         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13565         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13566         * breakpoint.c (update_inserted_breakpoint_locations)
13567         (insert_breakpoint_locations, reattach_breakpoints)
13568         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13569         (print_it_watchpoint): Use string_file.
13570         (save_breakpoints): Use stdio_file.
13571         * c-exp.y (oper): Use string_file.
13572         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13573         tee_file.
13574         (pop_output_files): Use delete.
13575         (handle_redirections): Use stdio_file and tee_file.
13576         * cli/cli-setshow.c (do_show_command): Use string_file.
13577         * compile/compile-c-support.c (c_compute_program): Use
13578         string_file.
13579         * compile/compile-c-symbols.c (generate_vla_size): Take a
13580         'string_file &' instead of a 'ui_file *'.
13581         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13582         of a 'ui_file *'.  Use string_file.
13583         (generate_c_for_variable_locations): Take a 'string_file &'
13584         instead of a 'ui_file *'.
13585         * compile/compile-internal.h (generate_c_for_for_one_variable):
13586         Take a 'string_file &' instead of a 'ui_file *'.
13587         * compile/compile-loc2c.c (push, pushf, unary, binary)
13588         (print_label, pushf_register_address, pushf_register)
13589         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13590         'ui_file *'.  Adjust.
13591         * compile/compile.c (compile_to_object): Use string_file.
13592         * compile/compile.h (compile_dwarf_expr_to_c)
13593         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13594         'ui_file *'.
13595         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13596         (replace_typedefs_qualified_name): Use string_file and
13597         obstack_copy0.
13598         * disasm.c (gdb_pretty_print_insn): Use string_file.
13599         (gdb_disassembly): Adjust reference the null_stream global.
13600         (do_ui_file_delete): Delete.
13601         (gdb_insn_length): Use null_stream.
13602         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13603         * dwarf2loc.c (dwarf2_compile_property_to_c)
13604         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13605         'string_file &' instead of a 'ui_file *'.
13606         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13607         * dwarf2read.c (do_ui_file_peek_last): Delete.
13608         (dwarf2_compute_name): Use string_file.
13609         * event-top.c (gdb_setup_readline): Use stdio_file.
13610         * gdbarch.sh (verify_gdbarch): Use string_file.
13611         * gdbtypes.c (safe_parse_type): Use null_stream.
13612         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13613         string_file.
13614         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13615         'string_file *' instead of a 'ui_file *'.
13616         (gdbscm_arch_disassemble): Use string_file.
13617         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13618         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13619         inherits from ui_file.
13620         (ioscm_file_port_delete, ioscm_file_port_rewind)
13621         (ioscm_file_port_put): Delete.
13622         (ioscm_file_port_write): Rename to ...
13623         (ioscm_file_port::write): ... this.  Remove file_port_magic
13624         checks.
13625         (ioscm_file_port_new): Delete.
13626         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13627         ui_file_up.
13628         * guile/scm-type.c (tyscm_type_name): Use string_file.
13629         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13630         Use string_file.
13631         * infcmd.c (print_return_value_1): Use string_file.
13632         * infrun.c (print_target_wait_results): Use string_file.
13633         * language.c (add_language): Use string_file.
13634         * location.c (explicit_to_string_internal): Use string_file.
13635         * main.c (captured_main_1): Use null_file.
13636         * maint.c (maintenance_print_architecture): Use stdio_file.
13637         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13638         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13639         event_channel>: Change type to mi_console_file pointer.
13640         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13641         (mi_console_file_delete): Delete.
13642         (struct mi_console_file): Delete.
13643         (mi_console_file_magic): Delete.
13644         (mi_console_file_new): Delete.
13645         (mi_console_file::mi_console_file): New.
13646         (mi_console_file_delete): Delete.
13647         (mi_console_file_fputs): Delete.
13648         (mi_console_file::write): New.
13649         (mi_console_raw_packet): Delete.
13650         (mi_console_file::flush): New.
13651         (mi_console_file_flush): Delete.
13652         (mi_console_set_raw): Rename to ...
13653         (mi_console_file::set_raw): ... this.
13654         * mi/mi-console.h (class mi_console_file): New class.
13655         (mi_console_file_new, mi_console_set_raw): Delete.
13656         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13657         (mi_set_logging): Use delete and tee_file.  Adjust.
13658         * mi/mi-main.c (output_register): Use string_file.
13659         (mi_cmd_data_evaluate_expression): Use string_file.
13660         (mi_cmd_data_read_memory): Use string_file.
13661         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13662         * mi/mi-out.c (mi_ui_out::main_stream): New.
13663         (mi_ui_out::rewind): Use main_stream and
13664         string_file.
13665         (mi_ui_out::put): Use main_stream and string_file.
13666         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13667         Allocate a 'string_file' instead.
13668         (mi_out_new): Don't allocate a mem_fileopen stream here.
13669         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13670         (mi_ui_out::main_stream): Declare method.
13671         * printcmd.c (eval_command): Use string_file.
13672         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13673         * python/py-arch.c (archpy_disassemble): Use string_file.
13674         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13675         * python/py-frame.c (frapy_str): Use string_file.
13676         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13677         Use string_file.
13678         * python/py-type.c (typy_str): Use string_file.
13679         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13680         * python/py-value.c (valpy_str): Use string_file.
13681         * record-btrace.c (btrace_insn_history): Use string_file.
13682         * regcache.c (regcache_print): Use stdio_file.
13683         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13684         * remote.c (escape_buffer): Use string_file.
13685         * rust-lang.c (rust_get_disr_info): Use string_file.
13686         * serial.c (serial_open_ops_1): Use stdio_file.
13687         (do_serial_close): Use delete.
13688         * stack.c (print_frame_arg): Use string_file.
13689         (print_frame_args): Remove local mem_fileopen stream, not used.
13690         (print_frame): Use string_file.
13691         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13692         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13693         Take a 'string_file *' instead of a 'ui_file *'.
13694         * top.c (new_ui): Use stdio_file and stderr_file.
13695         (free_ui): Use delete.
13696         (execute_command_to_string): Use string_file.
13697         (quit_confirm): Use string_file.
13698         * tracepoint.c (collection_list::append_exp): Use string_file.
13699         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13700         * tui/tui-file.c: Don't include "ui-file.h".
13701         (enum streamtype, struct tui_stream): Delete.
13702         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13703         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13704         (tui_file::tui_file): New method.
13705         (tui_file_fputs): Delete.
13706         (tui_file_get_strbuf): Delete.
13707         (tui_file::puts): New method.
13708         (tui_file_adjust_strbuf): Delete.
13709         (tui_file_flush): Delete.
13710         (tui_file::flush): New method.
13711         * tui/tui-file.h: Tweak intro comment.
13712         Include ui-file.h.
13713         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13714         (tui_file_adjust_strbuf): Delete declarations.
13715         (class tui_file): New class.
13716         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13717         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13718         (tui_register_format): Use string_stream.
13719         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13720         (tui_get_function_from_frame): Use string_file.
13721         * typeprint.c (type_to_string): Use string_file.
13722         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13723         (null_stream): New global.
13724         (ui_file_delete): Delete.
13725         (ui_file::ui_file): New.
13726         (null_file_isatty): Delete.
13727         (ui_file::~ui_file): New.
13728         (null_file_rewind): Delete.
13729         (ui_file::printf): New.
13730         (null_file_put): Delete.
13731         (null_file_flush): Delete.
13732         (ui_file::putstr): New.
13733         (null_file_write): Delete.
13734         (ui_file::putstrn): New.
13735         (null_file_read): Delete.
13736         (ui_file::putc): New.
13737         (null_file_fputs): Delete.
13738         (null_file_write_async_safe): Delete.
13739         (ui_file::vprintf): New.
13740         (null_file_delete): Delete.
13741         (null_file::write): New.
13742         (null_file_fseek): Delete.
13743         (null_file::puts): New.
13744         (ui_file_data): Delete.
13745         (null_file::write_async_safe): New.
13746         (gdb_flush, ui_file_isatty): Adjust.
13747         (ui_file_put, ui_file_rewind): Delete.
13748         (ui_file_write): Adjust.
13749         (ui_file_write_for_put): Delete.
13750         (ui_file_write_async_safe, ui_file_read): Adjust.
13751         (ui_file_fseek): Delete.
13752         (fputs_unfiltered): Adjust.
13753         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13754         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13755         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13756         (set_ui_file_data): Delete.
13757         (string_file::~string_file, string_file::write)
13758         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13759         (do_ui_file_as_string, ui_file_as_string): Delete.
13760         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13761         (struct mem_file): Delete.
13762         (mem_file_new): Delete.
13763         (stdio_file::stdio_file): New.
13764         (mem_file_delete): Delete.
13765         (stdio_file::stdio_file): New.
13766         (mem_fileopen): Delete.
13767         (stdio_file::~stdio_file): New.
13768         (mem_file_rewind): Delete.
13769         (stdio_file::set_stream): New.
13770         (mem_file_put): Delete.
13771         (stdio_file::open): New.
13772         (mem_file_write): Delete.
13773         (stdio_file_magic, struct stdio_file): Delete.
13774         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13775         (stdio_file::flush): New.
13776         (stdio_file_read): Rename to ...
13777         (stdio_file::read): ... this.  Adjust.
13778         (stdio_file_write): Rename to ...
13779         (stdio_file::write): ... this.  Adjust.
13780         (stdio_file_write_async_safe): Rename to ...
13781         (stdio_file::write_async_safe) ... this.  Adjust.
13782         (stdio_file_fputs): Rename to ...
13783         (stdio_file::puts) ... this.  Adjust.
13784         (stdio_file_isatty): Delete.
13785         (stdio_file_fseek): Delete.
13786         (stdio_file::isatty): New.
13787         (stderr_file_write): Rename to ...
13788         (stderr_file::write) ... this.  Adjust.
13789         (stderr_file_fputs): Rename to ...
13790         (stderr_file::puts) ... this.  Adjust.
13791         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13792         (stderr_file::stderr_file): New.
13793         (tee_file_magic): Delete.
13794         (struct tee_file): Delete.
13795         (tee_file::tee_file): New.
13796         (tee_file_new): Delete.
13797         (tee_file::~tee_file): New.
13798         (tee_file_delete): Delete.
13799         (tee_file_flush): Rename to ...
13800         (tee_file::flush): ... this.  Adjust.
13801         (tee_file_write): Rename to ...
13802         (tee_file::write): ... this.  Adjust.
13803         (tee_file::write_async_safe): New.
13804         (tee_file_fputs): Rename to ...
13805         (tee_file::puts): ... this.  Adjust.
13806         (tee_file_isatty): Rename to ...
13807         (tee_file::isatty): ... this.  Adjust.
13808         * ui-file.h (struct obstack, struct ui_file): Don't
13809         forward-declare.
13810         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13811         (ui_file_write_ftype)
13812         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13813         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13814         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13815         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13816         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13817         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13818         (set_ui_file_fseek): Delete.
13819         (ui_file_data, ui_file_delete, ui_file_rewind)
13820         (struct ui_file): New.
13821         (ui_file_up): New.
13822         (class null_file): New.
13823         (null_stream): Declare.
13824         (ui_file_write_for_put, ui_file_put): Delete.
13825         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13826         Delete.
13827         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13828         (gdb_fopen, tee_file_new): Delete.
13829         (struct string_file): New.
13830         (struct stdio_file): New.
13831         (stdio_file_up): New.
13832         (struct stderr_file): New.
13833         (class tee_file): New.
13834         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13835         of a 'ui_file *'.  Adjust.
13836         * ui-out.h (class ui_out) <field_stream>: Likewise.
13837         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13838         (null_stream): Delete.
13839         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13840         Adjust.
13841         * utils.h (struct ui_file): Delete forward declaration..
13842         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13843         (error_stream): Take a 'string_file &' instead of a
13844         'ui_file *'.
13845         * varobj.c (varobj_value_get_print_value): Use string_file.
13846         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13847         * gdbarch.c: Regenerate.
13848
13849 2017-02-02  Pedro Alves  <palves@redhat.com>
13850
13851         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13852         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13853         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13854         Adjust to call gdb_print_insn instead of
13855         gdb_disassembler::print_insn.
13856         (dump_insns, do_mixed_source_and_assembly_deprecated)
13857         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13858         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13859         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13860         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13861         declaration.
13862         (gdb_pretty_print_insn): Re-add declaration.
13863         * record-btrace.c (btrace_insn_history): Don't allocate a
13864         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13865
13866 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13867
13868         * disasm.h (gdb_disassembly): Remove file_string parameter.
13869         * disasm.c (gdb_disassembly): Likewise.
13870         * cli/cli-cmds.c (print_disassembly): Adapt.
13871         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13872         * stack.c (do_gdb_disassembly): Likewise.
13873
13874 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13875
13876         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13877         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13878         targets.  And if the implicit value is longer than needed, extract
13879         the first bytes instead of the "least significant" ones.
13880
13881 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13882
13883         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13884         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13885         (btrace_fetch): Assert can_access_registers_ptid.
13886         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13887         validate_registers_access.
13888
13889 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13890
13891         * gdbthread.h (can_access_registers_ptid): New.
13892         * thread.c (can_access_registers_ptid): New.
13893
13894 2017-02-01  Pedro Alves  <palves@redhat.com>
13895
13896         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13897
13898 2017-01-31  Pedro Alves  <palves@redhat.com>
13899
13900         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13901         Fix typos.
13902
13903 2017-01-31  Pedro Alves  <palves@redhat.com>
13904
13905         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13906         not used.
13907
13908 2017-01-31  Pedro Alves  <palves@redhat.com>
13909
13910         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13911
13912 2017-01-31  Pedro Alves  <palves@redhat.com>
13913
13914         * common/scoped_restore.h
13915         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13916         change the value's parameter type to T2.
13917         (make_scoped_restore): Likewise.
13918
13919 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13920             Richard Henderson  <rth@redhat.com>
13921
13922         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13923         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13924         GS_BASE for older kernels.
13925         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13926         GS_BASE for older kernels.
13927         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13928         and GS_BASE to the offset table.
13929         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13930         system register group.
13931         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13932         for older kernels.
13933         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13934         amd64 ABI.
13935         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13936         AMD64_GSBASE_REGNUM.
13937         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13938         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13939         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13940         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13941         i386/64bit-segments.xml in those rules.
13942         * features/i386/64bit-segments.xml: New file.
13943         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13944         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13945         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13946         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13947         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13948         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13949         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13950         * features/i386/amd64-avx-linux.c: Regenerated.
13951         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13952         * features/i386/amd64-avx-mpx.c: Regenerated.
13953         * features/i386/amd64-avx512-linux.c: Regenerated.
13954         * features/i386/amd64-linux.c: Regenerated.
13955         * features/i386/amd64-mpx-linux.c: Regenerated.
13956         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13957         * features/i386/i386-avx-mpx.c: Regenerated.
13958         * features/i386/x32-avx-linux.c: Regenerated.
13959         * features/i386/x32-avx512-linux.c: Regenerated.
13960         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13961         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13962         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13963         * regformats/i386/amd64-linux.dat: Regenerated.
13964         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13965         * regformats/i386/x32-avx-linux.dat: Regenerated.
13966         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13967         * regformats/i386/x32-linux.dat: Regenerated.
13968
13969 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13970
13971         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13972         Set to AMD64_NUM_REGS.
13973
13974 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13975
13976         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13977         that checks validity of a register number.
13978
13979 2017-01-27  Kees Cook  <keescook@google.com>
13980
13981         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13982         fetch_fpregs if target has fpa registers.
13983         (arm_linux_store_inferior_registers): Call store_fpregs if target
13984         has fpa registers.
13985
13986 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13987
13988         * cris-tdep.c (cris_gdbarch_init): Remove check for
13989         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13990
13991 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13992
13993         * corelow.c (get_core_register_section): Check for regset
13994         existence before checking for REGSET_VARIABLE_SIZE.
13995
13996 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13997             Pedro Alves  <palves@redhat.com>
13998
13999         PR gdb/20939
14000         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14001         call memory_error, save memaddr instead.
14002         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14003         negative, cal memory_error.
14004         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14005
14006 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14007
14008         * disasm-selftests.c (memory_error_test): New function.
14009         (_initialize_disasm_selftests): Register memory_error_test.
14010
14011 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14012
14013         * Makefile.in (SFILES): Add disasm-selftests.c and
14014         selftest-arch.c.
14015         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14016         * disasm-selftests.c: New file.
14017         * selftest-arch.c: New file.
14018         * selftest-arch.h: New file.
14019
14020 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14021
14022         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14023         to bfd_arch_mep.  Don't return 0 if section is not
14024         found.  Call print_insn_mep.
14025
14026 2017-01-26  Pedro Alves  <palves@redhat.com>
14027             Yao Qi  <yao.qi@linaro.org>
14028
14029         * arm-tdep.c: Include "disasm.h".
14030         (gdb_print_insn_arm): Update code to get gdbarch.
14031         * disasm.c (dis_asm_read_memory): Change it to
14032         gdb_disassembler::dis_asm_read_memory.
14033         (dis_asm_memory_error): Likewise.
14034         (dis_asm_print_address): Likewise.
14035         (gdb_pretty_print_insn): Change it to
14036         gdb_disassembler::pretty_print_insn.
14037         (dump_insns): Add one argument gdb_disassemlber.  All
14038         callers updated.
14039         (do_mixed_source_and_assembly_deprecated): Likewise.
14040         (do_mixed_source_and_assembly): Likewise.
14041         (do_assembly_only): Likewise.
14042         (gdb_disassembler::gdb_disassembler): New.
14043         (gdb_disassembler::print_insn): New.
14044         * disasm.h (class gdb_disassembler): New.
14045         (gdb_pretty_print_insn): Remove declaration.
14046         (gdb_disassemble_info): Likewise.
14047         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14048         (gdbscm_disasm_read_memory_worker): Update.
14049         (gdbscm_disasm_read_memory): Update.
14050         (gdbscm_disasm_memory_error): Remove.
14051         (gdbscm_disasm_print_address): Remove.
14052         (gdbscm_disassembler::gdbscm_disassembler): New.
14053         (gdbscm_print_insn_from_port): Update.
14054         * mips-tdep.c: Include disasm.h.
14055         (gdb_print_insn_mips): Update code to get gdbarch.
14056         * record-btrace.c (btrace_insn_history): Update.
14057         * spu-tdep.c: Include disasm.h.
14058         (struct spu_dis_asm_data): Remove.
14059         (struct spu_dis_asm_info): New.
14060         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14061         SPU id.
14062         (gdb_print_insn_spu): Cast disassemble_info to
14063         spu_dis_asm_info.
14064
14065 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14066
14067         * disasm.c (do_ui_file_delete): Delete.
14068         (gdb_insn_length): Move code creating stream to ...
14069         * utils.c (null_stream): ... here.  New function.
14070         * utils.h (null_stream): Declare.
14071
14072 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14073
14074         * python/py-inferior.c (find_thread_object): Return directly
14075         from the loop.  Remove "found" variable.
14076
14077 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14078
14079         GDB 7.12.1 released.
14080
14081 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14082
14083         * python/py-function.c (fnpy_call): Reorder declarations to have
14084         the gdbpy_enter object declared first.
14085         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14086
14087 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14088
14089         PR python/21068
14090         * python/python-internal.h (PyMem_RawMalloc): Define for
14091         Python < 3.4.
14092         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14093         PyMem_RawMalloc instead of PyMem_Malloc.
14094
14095 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14096             Luis Machado  <lgustavo@codesourcery.com>
14097
14098         * NEWS (New commands): Mention flash-erase.
14099         (New MI commands): Mention target-flash-erase.
14100         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14101         command.
14102         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14103         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14104         * target.c (flash_erase_command): New function.
14105         (initialize_targets): Add new flash-erase command.
14106         * target.h (flash_erase_command): New declaration.
14107
14108 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14109
14110         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14111         HAVE_SYS_PROCFS_H is defined.
14112
14113 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14114
14115         * remote.c (struct cached_reg): Change data into a pointer.
14116         * (stop_reply_dtr): Free data pointers before deleting vector.
14117         (process_stop_reply): Likewise.
14118         (remote_parse_stop_reply): Allocate space for data
14119
14120 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14121
14122         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14123         MAX_REGISTER_SIZE.
14124         (amd64_pseudo_register_read_value): Likewise.
14125         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14126         (store_register_using_P): Likewise.
14127         * regcache.c (regcache_xfer_part): Likewise.
14128
14129 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14130
14131         Split real and pseudo registers.
14132         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14133         (sparc32_pseudo_regnum): New enum.
14134         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14135         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14136         (SPARC32_CP0_REGISTERS): New macro.
14137         (sparc32_pseudo_register_name): New function.
14138         (sparc32_register_name): Use sparc32_pseudo_register_name.
14139         (sparc32_pseudo_register_type): New function.
14140         (sparc32_register_type): Use sparc32_pseudo_register_type.
14141         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14142         pseudo register numbers.
14143         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14144         (SPARC64_CP0_REGISTERS): New macro.
14145         (sparc64_pseudo_register_name): New function.
14146         (sparc64_register_name): Use sparc64_pseudo_register_name.
14147         (sparc64_pseudo_register_type): New function.
14148         (sparc64_register_type): Use sparc64_pseudo_register_type.
14149         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14150         pseudo register numbers.
14151         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14152         sparc64_store_arguments): Handle pseudo register numbers.
14153
14154 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14155
14156         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14157         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14158         output.
14159         (getpkt_or_notif_sane_1): Likewise.
14160
14161 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14162
14163         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14164         of CC.  Pass "-x c++-header" instead of "-x c".
14165
14166 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14167
14168         * remote.c (remote_can_async_p): Update comment.
14169
14170 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14171
14172         * linux-nat.c (linux_nat_can_async_p): Update comment.
14173
14174 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14175
14176         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14177
14178 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14179
14180         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14181
14182 2017-01-10  Tom Tromey  <tom@tromey.com>
14183
14184         * python/py-type.c (typy_legacy_template_argument): Update.
14185         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14186         ~demangle_parse_info): Declare new members.
14187         (cp_demangled_name_to_comp): Return unique_ptr.
14188         (cp_demangled_name_parse_free)
14189         (make_cleanup_cp_demangled_name_parse_free)
14190         (cp_new_demangle_parse_info): Remove.
14191         * cp-support.c (do_demangled_name_parse_free_cleanup)
14192         (make_cleanup_cp_demangled_name_parse_free): Remove.
14193         (inspect_type, cp_canonicalize_string_full)
14194         (cp_canonicalize_string): Update.
14195         (mangled_name_to_comp): Change return type.
14196         (cp_class_name_from_physname, method_name_from_physname)
14197         (cp_func_name, cp_remove_params): Update.
14198         * cp-name-parser.y (demangle_parse_info): New constructor, from
14199         cp_new_demangle_parse_info.
14200         (~demangle_parse_info): New destructor, from
14201         cp_demangled_name_parse_free.
14202         (cp_merge_demangle_parse_infos): Update.
14203         (cp_demangled_name_to_comp): Change return type.
14204
14205 2017-01-10  Tom Tromey  <tom@tromey.com>
14206
14207         * top.c (prevent_dont_repeat): Change return type.
14208         * python/python.c (execute_gdb_command): Use std::string.
14209         Update.
14210         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14211         * command.h (prevent_dont_repeat): Change return type.
14212         * breakpoint.c (bpstat_do_actions_1): Update.
14213
14214 2017-01-10  Tom Tromey  <tom@tromey.com>
14215
14216         * value.h (scoped_value_mark::~scoped_value_mark): Call
14217         free_to_mark.
14218         (scoped_value_mark::free_to_mark): New method.
14219         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14220         scoped_value_mark.
14221
14222 2017-01-10  Tom Tromey  <tom@tromey.com>
14223
14224         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14225         (valpy_reference_value, valpy_const_value, valpy_get_address)
14226         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14227         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14228         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14229         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14230         scoped_value_mark.
14231         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14232         * value.h (scoped_value_mark): New class.
14233
14234 2017-01-10  Tom Tromey  <tom@tromey.com>
14235
14236         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14237         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14238         * psymtab.c (discard_psymtabs_upto): Remove.
14239         (make_cleanup_discard_psymtabs): Remove.
14240         (struct psymtab_state): Remove.
14241
14242 2017-01-10  Tom Tromey  <tom@tromey.com>
14243
14244         * record-full.c (record_full_save_cleanups): Remove.
14245         (record_full_save): Use gdb::unlinker.
14246         * gcore.c (do_bfd_delete_cleanup): Remove.
14247         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14248         cleanups.
14249         * dwarf2read.c (unlink_if_set): Remove.
14250         (write_psymtabs_to_index): Use gdb::unlinker.
14251         * common/gdb_unlinker.h: New file.
14252
14253 2017-01-10  Tom Tromey  <tom@tromey.com>
14254
14255         * windows-tdep.c (windows_xfer_shared_library): Update.
14256         * windows-nat.c (windows_make_so): Update.
14257         * utils.h (make_cleanup_bfd_unref): Remove.
14258         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14259         * symfile.h (symfile_bfd_open)
14260         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14261         * symfile.c (read_symbols, symbol_file_add)
14262         (separate_debug_file_exists): Update.
14263         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14264         (generic_load, reread_symbols): Update.
14265         * symfile-mem.c (symbol_file_add_from_memory): Update.
14266         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14267         (spu_symbol_file_add_from_memory): Update.
14268         * solist.h (struct target_so_ops) <bfd_open>: Return
14269         gdb_bfd_ref_ptr.
14270         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14271         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14272         gdb_bfd_ref_ptr.
14273         (solib_map_sections, reload_shared_libraries_1): Update.
14274         * solib-svr4.c (enable_break): Update.
14275         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14276         * solib-frv.c (enable_break2): Update.
14277         * solib-dsbt.c (enable_break): Update.
14278         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14279         gdb_bfd_ref_ptr.
14280         (darwin_solib_get_all_image_info_addr_at_init): Update.
14281         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14282         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14283         * record-full.c (record_full_save): Update.
14284         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14285         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14286         * minidebug.c (find_separate_debug_file_in_section): Return
14287         gdb_bfd_ref_ptr.
14288         * machoread.c (macho_add_oso_symfile): Change abfd to
14289         gdb_bfd_ref_ptr.
14290         (macho_symfile_read_all_oso): Update.
14291         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14292         (macho_symfile_read): Update.
14293         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14294         (jit_bfd_try_read_symtab): Update.
14295         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14296         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14297         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14298         gdb_bfd_ref_ptr.
14299         (gdb_bfd_ref_policy): New struct.
14300         (gdb_bfd_ref_ptr): New typedef.
14301         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14302         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14303         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14304         gdb_bfd_ref_ptr.
14305         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14306         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14307         (gcore_command): Update.
14308         * exec.c (exec_file_attach): Update.
14309         * elfread.c (elf_symfile_read): Update.
14310         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14311         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14312         (open_and_init_dwo_file): Update.
14313         (open_dwp_file): Return gdb_bfd_ref_ptr.
14314         (open_and_init_dwp_file): Update.
14315         * corelow.c (core_open): Update.
14316         * compile/compile-object-load.c (compile_object_load): Update.
14317         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14318         * coffread.c (coff_symfile_read): Update.
14319         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14320         gdb_bfd_ref_ptr.  Rename.
14321         (dump_bfd_file, restore_command): Update.
14322         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14323         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14324         (find_separate_debug_file_by_buildid): Update.
14325
14326 2017-01-10  Tom Tromey  <tom@tromey.com>
14327
14328         * common/gdb_ref_ptr.h: New file.
14329         * python/py-ref.h (struct gdbpy_ref_policy): New.
14330         (gdbpy_ref): Now a typedef.
14331
14332 2017-01-10  Tom Tromey  <tom@tromey.com>
14333
14334         * utils.h (make_cleanup_htab_delete): Don't declare.
14335         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14336         Remove.
14337         * linespec.c (decode_compound_collector): Add constructor,
14338         destructor.
14339         (lookup_prefix_sym): Remove cleanup.
14340         (symtab_collector): Add constructor, destructor.
14341         (collect_symtabs_from_filename): Remove cleanup.
14342         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14343         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14344         Use htab_up.
14345         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14346         * dwarf2read.c (dw2_expand_symtabs_matching)
14347         (dw2_map_symbol_filenames, dwarf_decode_macros)
14348         (write_psymtabs_to_index): Use htab_up.
14349         * dwarf2loc.c (func_verify_no_selftailcall)
14350         (call_site_find_chain_1, func_verify_no_selftailcall)
14351         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14352         std::vector, gdb::unique_xmalloc_ptr.
14353         (call_sitep): Remove typedef.
14354         (dwarf2_locexpr_baton_eval): Remove unused variable.
14355
14356 2017-01-10  Tom Tromey  <tom@tromey.com>
14357
14358         * python/python-internal.h (make_cleanup_py_decref)
14359         (make_cleanup_py_xdecref): Don't declare.
14360         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14361         (py_xdecref, make_cleanup_py_xdecref): Remove.
14362
14363 2017-01-10  Tom Tromey  <tom@tromey.com>
14364
14365         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14366         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14367
14368 2017-01-10  Tom Tromey  <tom@tromey.com>
14369
14370         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14371
14372 2017-01-10  Tom Tromey  <tom@tromey.com>
14373
14374         * python/py-utils.c (unicode_to_encoded_string)
14375         (python_string_to_target_string)
14376         (python_string_to_target_python_string)
14377         (python_string_to_host_string, gdbpy_obj_to_string)
14378         (get_addr_from_python): Use gdbpy_ref.
14379
14380 2017-01-10  Tom Tromey  <tom@tromey.com>
14381
14382         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14383         gdbpy_ref.
14384
14385 2017-01-10  Tom Tromey  <tom@tromey.com>
14386
14387         * python/python.c (eval_python_command, gdbpy_decode_line)
14388         (gdbpy_run_events, gdbpy_start_type_printers)
14389         (gdbpy_apply_type_printers): Use gdbpy_ref.
14390
14391 2017-01-10  Tom Tromey  <tom@tromey.com>
14392
14393         * python/py-param.c (get_doc_string, compute_enum_values): Use
14394         gdbpy_ref.
14395
14396 2017-01-10  Tom Tromey  <tom@tromey.com>
14397
14398         * python/py-inferior.c (find_thread_object, build_inferior_list):
14399         Use gdbpy_ref.
14400
14401 2017-01-10  Tom Tromey  <tom@tromey.com>
14402
14403         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14404
14405 2017-01-10  Tom Tromey  <tom@tromey.com>
14406
14407         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14408         gdbpy_ref.
14409
14410 2017-01-10  Tom Tromey  <tom@tromey.com>
14411
14412         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14413         extra incref.
14414         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14415         Use gdbpy_ref.
14416
14417 2017-01-10  Tom Tromey  <tom@tromey.com>
14418
14419         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14420         gdbpy_ref.
14421
14422 2017-01-10  Tom Tromey  <tom@tromey.com>
14423
14424         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14425         decref results of PyArg_ParseTupleAndKeywords.
14426
14427 2017-01-10  Tom Tromey  <tom@tromey.com>
14428
14429         * python/python.c (python_run_simple_file): Use
14430         unique_xmalloc_ptr, gdbpy_ref.
14431
14432 2017-01-10  Tom Tromey  <tom@tromey.com>
14433
14434         * python/py-prettyprint.c (print_stack_unless_memory_error)
14435         (print_string_repr, print_children): Use gdbpy_ref.
14436         (dummy_python_frame): New class.
14437         (dummy_python_frame::dummy_python_frame): Rename from
14438         push_dummy_python_frame.
14439         (py_restore_tstate): Remove.
14440
14441 2017-01-10  Tom Tromey  <tom@tromey.com>
14442
14443         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14444
14445 2017-01-10  Tom Tromey  <tom@tromey.com>
14446
14447         * python/python.c (ensure_python_env, restore_python_env):
14448         Remove.
14449         * python/python-internal.h (ensure_python_env): Don't declare.
14450         * varobj.h (varobj_ensure_python_env): Don't declare.
14451         * varobj.c (varobj_ensure_python_env): Remove.
14452
14453 2017-01-10  Tom Tromey  <tom@tromey.com>
14454
14455         * varobj.c (varobj_value_get_print_value): Use
14456         gdbpy_enter_varobj.
14457
14458 2017-01-10  Tom Tromey  <tom@tromey.com>
14459
14460         * python/py-prettyprint.c (print_string_repr, print_children):
14461         Update.
14462         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14463         of "encoding".
14464         * varobj.c (varobj_value_get_print_value): Update.
14465         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14466
14467 2017-01-10  Tom Tromey  <tom@tromey.com>
14468
14469         * varobj.c (varobj_get_display_hint)
14470         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14471         (varobj_set_visualizer, free_variable): Use
14472         gdbpy_enter_varobj.
14473
14474 2017-01-10  Tom Tromey  <tom@tromey.com>
14475
14476         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14477         (do_finish_initialization): New function.  Use gdbpy_ref.
14478         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14479         do_finish_initialization.
14480
14481 2017-01-10  Tom Tromey  <tom@tromey.com>
14482
14483         * python/py-param.c (get_set_value, get_show_value): Use
14484         gdbpy_enter, gdbpy_ref.
14485
14486 2017-01-10  Tom Tromey  <tom@tromey.com>
14487
14488         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14489
14490 2017-01-10  Tom Tromey  <tom@tromey.com>
14491
14492         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14493
14494 2017-01-10  Tom Tromey  <tom@tromey.com>
14495
14496         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14497         Use gdbpy_enter_varobj.
14498
14499 2017-01-10  Tom Tromey  <tom@tromey.com>
14500
14501         * varobj.c (gdbpy_enter_varobj): New constructor.
14502         * python/python-internal.h (gdbpy_enter_varobj): New class.
14503         * python/py-varobj.c (py_varobj_get_iterator): Use
14504         gdbpy_enter_varobj.
14505
14506 2017-01-10  Tom Tromey  <tom@tromey.com>
14507
14508         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14509         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14510         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14511         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14512         unique_xmalloc_ptr.
14513         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14514
14515 2017-01-10  Tom Tromey  <tom@tromey.com>
14516
14517         * python/py-xmethods.c (invoke_match_method): Use
14518         gdbpy_ref.
14519
14520 2017-01-10  Tom Tromey  <tom@tromey.com>
14521
14522         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14523         gdbpy_enter, gdbpy_ref.
14524
14525 2017-01-10  Tom Tromey  <tom@tromey.com>
14526
14527         * python/python.c (python_interactive_command): Use gdbpy_enter.
14528
14529 2017-01-10  Tom Tromey  <tom@tromey.com>
14530
14531         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14532         gdbpy_ref.
14533
14534 2017-01-10  Tom Tromey  <tom@tromey.com>
14535
14536         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14537         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14538
14539 2017-01-10  Tom Tromey  <tom@tromey.com>
14540
14541         * utils.h (htab_deleter): New struct.
14542         (htab_up): New typedef.
14543         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14544         gdbpy_enter, gdbpy_ref, htab_up.
14545
14546 2017-01-10  Tom Tromey  <tom@tromey.com>
14547
14548         * python/py-unwind.c (pending_frame_invalidate): Remove.
14549         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14550
14551 2017-01-10  Tom Tromey  <tom@tromey.com>
14552
14553         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14554         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14555
14556 2017-01-10  Tom Tromey  <tom@tromey.com>
14557
14558         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14559
14560 2017-01-10  Tom Tromey  <tom@tromey.com>
14561
14562         * python/python.c (gdbpy_eval_from_control_command)
14563         (gdbpy_source_script, gdbpy_run_events)
14564         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14565         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14566         gdbpy_enter.
14567
14568 2017-01-10  Tom Tromey  <tom@tromey.com>
14569
14570         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14571
14572 2017-01-10  Tom Tromey  <tom@tromey.com>
14573
14574         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14575
14576 2017-01-10  Tom Tromey  <tom@tromey.com>
14577
14578         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14579         (python_on_inferior_call_pre, python_on_inferior_call_post)
14580         (python_on_memory_change, python_on_register_change)
14581         (python_inferior_exit, python_new_objfile, add_thread_object)
14582         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14583
14584 2017-01-10  Tom Tromey  <tom@tromey.com>
14585
14586         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14587         (bpfinishpy_handle_exit): Use gdbpy_enter.
14588
14589 2017-01-10  Tom Tromey  <tom@tromey.com>
14590
14591         * python/py-cmd.c (cmdpy_destroyer)
14592         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14593         gdbpy_enter.
14594
14595 2017-01-10  Tom Tromey  <tom@tromey.com>
14596
14597         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14598         gdbpy_enter.
14599         (gdbpy_breakpoint_has_cond): Likewise.
14600
14601 2017-01-10  Tom Tromey  <tom@tromey.com>
14602
14603         * python/python.c (gdbpy_enter): New constructor.
14604         (~gdbpy_enter): New destructor.
14605         (restore_python_env, ensure_python_env): Rewrite.
14606         * python/python-internal.h (gdbpy_enter): New class.
14607
14608 2017-01-10  Tom Tromey  <tom@tromey.com>
14609
14610         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14611
14612 2017-01-10  Tom Tromey  <tom@tromey.com>
14613
14614         * python/py-value.c (value_has_field, get_field_flag)
14615         (get_field_type, valpy_getitem, convert_value_from_python): Use
14616         gdbpy_ref.
14617
14618 2017-01-10  Tom Tromey  <tom@tromey.com>
14619
14620         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14621         gdbpy_ref.
14622
14623 2017-01-10  Tom Tromey  <tom@tromey.com>
14624
14625         * python/py-prettyprint.c (search_pp_list)
14626         (find_pretty_printer_from_objfiles)
14627         (find_pretty_printer_from_progspace)
14628         (find_pretty_printer_from_gdb, find_pretty_printer)
14629         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14630         gdbpy_ref.
14631
14632 2017-01-10  Tom Tromey  <tom@tromey.com>
14633
14634         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14635
14636 2017-01-10  Tom Tromey  <tom@tromey.com>
14637
14638         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14639         (ltpy_get_all_source_lines): Use gdbpy_ref.
14640
14641 2017-01-10  Tom Tromey  <tom@tromey.com>
14642
14643         * python/py-framefilter.c (extract_sym, extract_value)
14644         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14645         gdbpy_ref.
14646
14647 2017-01-10  Tom Tromey  <tom@tromey.com>
14648
14649         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14650
14651 2017-01-10  Tom Tromey  <tom@tromey.com>
14652
14653         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14654
14655 2017-01-10  Tom Tromey  <tom@tromey.com>
14656
14657         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14658         gdbpy_ref.
14659
14660 2017-01-10  Tom Tromey  <tom@tromey.com>
14661
14662         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14663
14664 2017-01-10  Tom Tromey  <tom@tromey.com>
14665
14666         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14667         (typy_range): Use gdbpy_ref.
14668
14669 2017-01-10  Tom Tromey  <tom@tromey.com>
14670
14671         * python/py-threadevent.c (create_thread_event_object): Use
14672         gdbpy_ref.
14673         * python/py-stopevent.c (create_stop_event_object): Simplify.
14674         (emit_stop_event): Use gdbpy_ref.
14675         * python/py-signalevent.c (create_signal_event_object): Use
14676         gdbpy_ref.
14677         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14678         (emit_new_objfile_event, create_clear_objfiles_event_object)
14679         (emit_clear_objfiles_event): Use gdbpy_ref.
14680         * python/py-infevents.c (create_inferior_call_event_object)
14681         (create_register_changed_event_object)
14682         (create_memory_changed_event_object, emit_inferior_call_event)
14683         (emit_memory_changed_event, emit_register_changed_event): Use
14684         gdbpy_ref.
14685         * python/py-exitedevent.c (create_exited_event_object)
14686         (emit_exited_event): Use gdbpy_ref.
14687         * python/py-event.h (evpy_emit_event): Remove
14688         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14689         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14690         * python/py-continueevent.c (emit_continue_event): Use
14691         gdbpy_ref.
14692         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14693         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14694         gdbpy_ref.
14695         * python/py-bpevent.c (create_breakpoint_event_object): Use
14696         gdbpy_ref.
14697
14698 2017-01-10  Tom Tromey  <tom@tromey.com>
14699
14700         * python/py-ref.h: New file.
14701
14702 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14703
14704         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14705         void.
14706         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14707         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14708         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14709         * ui-out.c (ui_out::redirect): Likewise.
14710         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14711         * cli/cli-logging.c (set_logging_redirect): Update call site of
14712         ui_out::redirect.
14713         (handle_redirections): Likewise.
14714         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14715         * top.c (execute_command_to_string): Likewise.
14716         * utils.c (do_ui_out_redirect_pop): Likewise.
14717
14718 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14719
14720         * stack.c (_initialize_stack): Update "frame" command help message.
14721
14722 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14723
14724         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14725
14726 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14727
14728         * x86-linux-nat.h: Include gdb_proc_service.h.
14729
14730 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14731
14732         * ser-base.h: Include serial.h.
14733
14734 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14735
14736         * ppc-linux-tdep.h: Include ppc-tdep.h.
14737
14738 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14739
14740         * nat/amd64-linux-siginfo.h: Include signal.h.
14741
14742 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14743
14744         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14745
14746 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14747
14748         * mi/mi-parse.h: Include mi-cmds.h.
14749
14750 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14751
14752         * inf-loop.c: Don't include "target.h".
14753         * inf-loop.h: Include it here.
14754
14755 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14756
14757         * dfp.h: Include "dboulest.h" and "expression.h".
14758
14759 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14760
14761         * ax-gdb.h: Include "ax.h".
14762
14763 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14764
14765         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14766         with nat/gdb_ptrace.h.
14767
14768 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14769
14770         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14771         new line.
14772         (mips64_fbsd_sigframe_init): Likewise.
14773
14774 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14775
14776         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14777         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14778
14779 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14780
14781         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14782         * NEWS: Mention new FreeBSD/mips native configuration.
14783         * config/mips/fbsd.mh: New file.
14784         * configure.host: Add mips*-*-freebsd*.
14785         * mips-fbsd-nat.c: New file.
14786
14787 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14788
14789         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14790         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14791         * NEWS: Mention new FreeBSD/mips target.
14792         * configure.tgt: Add mips*-*-freebsd*.
14793         * mips-fbsd-tdep.c: New file.
14794         * mips-fbsd-tdep.h: New file.
14795
14796 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14797
14798         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14799         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14800
14801 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14802
14803         Update copyright year range in all GDB files.
14804
14805 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14806
14807         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14808
14809 For older changes see ChangeLog-2016.
14810 \f
14811 Local Variables:
14812 mode: change-log
14813 left-margin: 8
14814 fill-column: 74
14815 version-control: never
14816 coding: utf-8
14817 End: