Constify add_prefix_cmd
[external/binutils.git] / gdb / ChangeLog
1 2017-10-11  Tom Tromey  <tom@tromey.com>
2
3         * gdbthread.h (thread_command): Constify.
4         * inferior.h (detach_command): Constify.
5         * top.h (set_history, show_history): Constify.
6         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
7         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
8         * bsd-kvm.c (bsd_kvm_cmd): Constify.
9         * printcmd.c (set_command): Constify.
10         (non_const_set_command): New function.
11         * dcache.c (set_dcache_command, show_dcache_command): Constify.
12         * breakpoint.c (enable_command, disable_command, delete_command)
13         (catch_command, tcatch_command, set_breakpoint_cmd)
14         (show_breakpoint_cmd): Constify.
15         * macrocmd.c (macro_command): Constify.
16         * infcmd.c (unset_command, kill_command, detach_command)
17         (info_proc_cmd): Constify.
18         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
19         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
20         (info_auto_load_cmd): Constify.
21         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
22         (unset_tdesc_cmd): Constify.
23         * ada-lang.c (set_ada_command, show_ada_command)
24         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
25         * guile/guile.c (set_guile_command, show_guile_command)
26         (info_guile_command): Constify.
27         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
28         Constify.
29         * skip.c (skip_command): Constify.
30         * compile/compile.c (_initialize_compile): Constify.
31         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
32         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
33         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
34         (maint_btrace_pt_show_cmd): Constify.
35         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
36         Constify.
37         * python/python.c (user_show_python, user_set_python): Constify.
38         * mips-tdep.c (set_mips_command, show_mips_command)
39         (set_mipsfpu_command): Constify.
40         * record-btrace.c (cmd_record_btrace_start)
41         (cmd_set_record_btrace, cmd_show_record_btrace)
42         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
43         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
44         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
45         Constify.
46         * symfile.c (overlay_command): Constify.
47         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
48         * cli/cli-logging.c (set_logging_command, show_logging_command):
49         Constify.
50         * cli/cli-dump.c (dump_command, append_command)
51         (srec_dump_command, ihex_dump_command, verilog_dump_command)
52         (tekhex_dump_command, binary_dump_command)
53         (binary_append_command): Constify.
54         * cli/cli-decode.c (struct cmd_list_element): Change type of
55         "fun".
56         * cli/cli-cmds.c (info_command, show_command, set_debug)
57         (show_debug): Constify.
58         (show_command): Add non-const overload.
59         * top.c (set_history, show_history): Constify.
60         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
61         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
62         * target.c (target_command): Constify.
63         * sparc64-tdep.c (info_adi_command): Constify.
64         * record-full.c (cmd_record_full_start): Constify.
65         (set_record_full_command): Constify.  Fix typo.
66         (show_record_full_command): Constify.
67         * thread.c (thread_command, thread_apply_command): Constify.
68         * memattr.c (dummy_cmd): Constify.
69         * value.c (function_command): Constify.
70         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
71         * probe.c (info_probes_command): Constify.
72         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
73         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
74         (show_thread_cmd, set_thread_default_cmd)
75         (show_thread_default_cmd): Constify.
76         (check_empty): Constify.
77         * tracepoint.c (tfind_command): Constify.
78         * cp-support.c (maint_cplus_command): Constify.
79         * windows-tdep.c (info_w32_command): Constify.
80         * record.c (cmd_record_start, set_record_command)
81         (show_record_command, info_record_command, cmd_record_goto):
82         Constify.
83         * ravenscar-thread.c (set_ravenscar_command)
84         (show_ravenscar_command): Constify.
85         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
86         Constify.
87         (add_internal_problem_command): Remove casts.
88         * arc-tdep.c (maintenance_print_arc_command): Constify.
89         * valprint.c (set_print, show_print, set_print_raw)
90         (show_print_raw): Constify.
91         * maint.c (maintenance_command, maintenance_info_command)
92         (maintenance_print_command, maintenance_set_cmd)
93         (maintenance_show_cmd, set_per_command_cmd)
94         (show_per_command_cmd, maintenance_check_command): Constify.
95         * language.c (set_check, show_check): Constify.
96         * typeprint.c (show_print_type, set_print_type): Constify.
97         * go32-nat.c (go32_info_dos_command): Constify.
98
99 2017-10-11  Tom Tromey  <tom@tromey.com>
100
101         * breakpoint.c (prepare_re_set_context): Remove.
102         (breakpoint_re_set_one): Update.  Don't use cleanups.
103         (breakpoint_re_set): Use scoped_restore, std::string, and
104         scoped_restore_current_language.
105
106 2017-10-11  Tom Tromey  <tom@tromey.com>
107
108         * breakpoint.c (commands_command_1): Use std::string.
109         (cleanup_executing_breakpoints): Remove.
110         (bpstat_do_actions_1): Use scoped_restore.
111         (bpstat_check_watchpoint): Use std::string.
112         (decode_static_tracepoint_spec): Likewise.
113         (break_range_command): Likewise.
114         (watch_command_1): Likewise.
115         (compare_breakpoints): Change argument types.
116         (clear_command): Use std::vector.
117         (cleanup_executing_breakpoints): Remove.
118         (update_global_location_list): Use unique_xmalloc_ptr.
119         (strace_command): Remove unused declaration.
120
121 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
122
123         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
124         * NEWS: Mention new FreeBSD/arm native configuration.
125         * configure.host: Add arm*-*-freebsd*.
126         * configure.nat: Likewise.
127         * arm-fbsd-nat.c: New file.
128
129 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
130
131         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
132         (ALLDEPFILES): Add arm-fbsd-tdep.c.
133         * NEWS: Mention new FreeBSD/arm target.
134         * configure.tgt: Add arm*-*-freebsd*.
135         * arm-fbsd-tdep.c: New file.
136         * arm-fbsd-tdep.h: New file.
137
138 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
139
140         * linux-tdep.c (linux_make_corefile_notes): Remove call to
141         `gdbarch_elfcore_write_linux_prpsinfo'.
142         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
143         method.
144         (elf_internal_linux_prpsinfo): Remove declaration.
145         * gdbarch.h: Regenerate.
146         * gdbarch.c: Regenerate.
147
148 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
149
150         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
151         `set_gdbarch_elfcore_write_linux_prpsinfo'.
152
153 2017-10-11  Pedro Alves  <palves@redhat.com>
154
155         * breakpoint.c (reattach_breakpoints): Delete.
156         * breakpoint.h (reattach_breakpoints): Delete.
157
158 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
159
160         * symfile.c (registered_sym_fns): Make struct, not typedef.
161         (DEF_VEC_O (registered_sym_fns)): Remove.
162         (symtab_fns): Change type to std::vector.
163         (add_symtab_fns): Adjust.
164         (find_sym_fns): Adjust.
165
166 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
167
168         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
169         * arc-tdep.h (arc_arch_is_em): New function.
170         (arc_arch_is_hs): Likewise.
171
172 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
173
174         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
175         parentheses in the declaration.
176         (macro_lookup_inclusion): Likewise.
177         (macro_lookup_definition): Likewise.
178         * p-lang.h (pascal_builtin_types): Likewise.
179         * tui/tui-data.c (tui_win_list): Likewise.
180         * tui/tui-data.h (tui_win_list): Likewise.
181         * utils.h (make_cleanup_free_section_addr_info): Likewise.
182
183 2017-10-11  Mark Rages  <markrages@gmail.com>
184
185         * target-memory.c (block_boundaries): Fix for block address not
186         aligned on block size.
187
188 2017-10-10  Pedro Alves <palves@redhat.com>
189             Tom Tromey  <tom@tromey.com>
190
191         * breakpoint.c (struct captured_breakpoint_query_args)
192         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
193         (print_breakpoint): New.
194         * breakpoint.h (print_breakpoint): Declare.
195         * common/common-exceptions.h (enum return_reason): Remove
196         references to catch_exceptions.
197         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
198         Delete.
199         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
200         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
201         * gdb.h: Delete.
202         * gdbthread.h (thread_select): Declare.
203         * mi/mi-cmd-break.c: Don't include gdb.h.
204         (breakpoint_notify): Use print_breakpoint.
205         * mi/mi-cmd-catch.c: Don't include gdb.h.
206         * mi/mi-interp.c: Don't include gdb.h.
207         (mi_print_breakpoint_for_event): New.
208         (mi_breakpoint_created, mi_breakpoint_modified): Use
209         mi_print_breakpoint_for_event.
210         * mi/mi-main.c: Don't include gdb.h.
211         (mi_cmd_thread_select): Parse the global thread ID here.  Use
212         thread_select instead of gdb_thread_select.
213         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
214         of using gdb_list_thread_ids.
215         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
216         FILEIO_ENOSYS here.
217         (remote_fileio_request): Use TRY/CATCH instead of
218         catch_exceptions.
219         * symfile-mem.c (struct symbol_file_add_from_memory_args)
220         (symbol_file_add_from_memory_wrapper): Delete.
221         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
222         * thread.c: Don't include gdb.h.
223         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
224         (thread_alive): Use thread_select.
225         (do_captured_thread_select): Delete, parts salvaged as ...
226         (thread_select): ... this new function.
227         (gdb_thread_select): Delete.
228
229 2017-10-10  Pedro Alves  <palves@redhat.com>
230             Tom Tromey  <tom@tromey.com>
231
232         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
233         and reverse logic.
234         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
235         No longer macros.  Instead ...
236         (enum wp_check_result): They're now values of this new
237         enumeration.
238         (watchpoint_check): Change return type to wp_check_result and
239         parameter type to bpstat.
240         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
241         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
242         catch_errors.  Reverse logic of watchpoint_check call.
243         (breakpoint_re_set_one): Now returns void and takes a breakpoint
244         pointer as parameter.
245         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
246         * common/common-exceptions.c (throw_exception_sjlj): Update
247         comments to avoid mentioning catch_errors.
248         * exceptions.c (catch_errors): Delete.
249         * exceptions.h: Update comments to avoid mentioning catch_errors.
250         (catch_errors_ftype, catch_errors): Delete.
251         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
252         (hook_stop_stub): Delete.
253         (restore_selected_frame): Change return type to void, and
254         parameter type to const frame_id &.
255         (restore_infcall_control_state): Use TRY/CATCH instead of
256         catch_errors.
257         * main.c (captured_command_loop): Return void and remove
258         parameter.  Remove references to catch_errors.
259         (captured_main): Use TRY/CATCH instead of catch_errors.
260         * objc-lang.c (objc_submethod_helper_data)
261         (find_objc_msgcall_submethod_helper): Delete.
262         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
263         catch_errors.
264         * record-full.c (record_full_message): Return void.
265         (record_full_message_args, record_full_message_wrapper): Delete.
266         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
267         instead of catch_errors.
268         * solib-aix.c (solib_aix_open_symbol_file_object): Change
269         parameter type to int.
270         * solib-darwin.c (open_symbol_file_object): Ditto.
271         * solib-dsbt.c (open_symbol_file_object): Ditto.
272         * solib-frv.c (open_symbol_file_object): Ditto.
273         * solib-svr4.c (open_symbol_file_object): Ditto.
274         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
275         * solib.c (update_solib_list): Use TRY/CATCH instead of
276         catch_errors.
277         * solist.h (struct target_so_ops) <open_symbol_file_object>:
278         Change type.
279         * symmisc.c (struct print_symbol_args): Remove.
280         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
281         (print_symbol): Change type.
282         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
283         and remove parameters.
284         (catch_errors): New.
285         (get_windows_debug_event): Adjust.
286
287 2017-10-09  Tom Tromey  <tom@tromey.com>
288
289         * mi/mi-main.c (free_splay_tree): Remove.
290         (list_available_thread_groups): Use splay_tree_up.
291         * common/gdb_splay_tree.h: New file.
292
293 2017-10-09  Tom Tromey  <tom@tromey.com>
294
295         * mi/mi-main.c (do_nothing): Remove.
296         (list_available_thread_groups): Update.
297
298 2017-10-09  Pedro Alves  <palves@redhat.com>
299
300         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
301         reading registers when switching context.
302
303 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
304
305         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
306         (fbsd_convert_siginfo): Likewise.
307         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
308
309 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
310
311         * configure.ac (try_guile_versions): Remove guile-2.2.
312         * configure: Regenerate.
313
314 2017-10-09  Tom Tromey  <tom@tromey.com>
315
316         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
317         (COMPILE.pre): Use $(CXX).
318
319 2017-10-09  Pedro Alves  <palves@redhat.com>
320
321         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
322         Use bool.
323         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
324         * cp-support.h (cp_remove_params): Now returns a
325         gdb::unique_xmalloc_ptr.
326         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
327         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
328         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
329         returning a gdb::unique_xmalloc_ptr.
330         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
331         * stack.c (find_frame_funname): Adjust to cp_remove_params
332         returning a gdb::unique_xmalloc_ptr.
333
334 2017-10-08  Tom Tromey  <tom@tromey.com>
335
336         * dwarf2read.c (dwarf2_get_dwz_file): Use
337         gdb::unique_xmalloc_ptr.
338         (find_slot_in_mapped_hash): Likewise.
339         (dwarf2_physname): Likewise.
340         (create_dwo_unit_in_dwp_v1): Use std::string.
341         (create_dwo_unit_in_dwp_v2): Likewise.
342         (lookup_dwo_cutu): Likewise.
343         (inherit_abstract_dies): Use std::vector.
344         (read_array_type): Likewise.
345         (dwarf_decode_macros): Remove unused declaration.
346         (unsigned_int_compar): Remove.
347         (dwarf2_build_psymtabs_hard): Use scoped_restore.
348         (psymtabs_addrmap_cleanup): Remove.
349
350 2017-10-08  Tom Tromey  <tom@tromey.com>
351
352         * frame-unwind.c (frame_unwind_try_unwinder): Update.
353         * frame.h (frame_cleanup_after_sniffer): Declare.
354         (frame_prepare_for_sniffer): Return void.
355         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
356         type of argument.
357         (frame_prepare_for_sniffer): Return void.
358
359 2017-10-08  Tom Tromey  <tom@tromey.com>
360
361         * utils.h (make_cleanup_value_free): Remove.
362         * utils.c (do_value_free, struct cleanup): Remove.
363         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
364         Use gdb_value_up.
365         * value.h (struct value_deleter): New.
366         (gdb_value_up): New typedef.
367
368 2017-10-08  Tom Tromey  <tom@tromey.com>
369
370         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
371         (make_cleanup_free_search_symbols): Remove.
372         (search_symbols): Return std::vector.
373         (symbol_search::compare_search_syms): Now member of
374         symbol_search.  Change arguments.
375         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
376         (symtab_symbol_info, rbreak_command): Update.
377         * symtab.h (struct symbol_search) <next>: Remove.
378         Add constructors.
379         (symbol_search::operator<): New function.
380         (symbol_search::operator==): New function.
381         (search_symbols): Remove std::vector.
382         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
383         (symbol_search::compare_search_syms): Declare.
384
385 2017-10-06  Yao Qi  <yao.qi@linaro.org>
386
387         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
388         arch/aarch64-insn.o.
389         Remove one rule.
390         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
391
392 2017-10-06  Yao Qi  <yao.qi@linaro.org>
393
394         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
395         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
396         arch/arm-linux.o respectively.
397         * configure.tgt: Likewise.
398
399 2017-10-06  Yao Qi  <yao.qi@linaro.org>
400
401         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
402         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
403
404 2017-10-06  Pedro Alves  <palves@redhat.com>
405
406         * windows-nat.c: Include <algorithm>.
407
408 2017-10-06  Yao Qi  <yao.qi@linaro.org>
409
410         * configure.tgt (i386_tobjs): New variable.
411         (amd64_tobjs): New variable.
412         Set $cpu_obs and $os_obs.
413
414 2017-10-06  Yao Qi  <yao.qi@linaro.org>
415
416         * Makefile.in (CONFIG_SRC_SUBDIR): New.
417         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
418         (clean): Remove object files and dependency files.
419         (distclean): Remove the directory.
420         * configure.ac: Invoke AC_CONFIG_COMMANDS.
421         * configure: Re-generated.
422         * configure.tgt: Replace amd64.o with arch/amd64.o.
423
424 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
425
426         PR build/22188
427         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
428         and SETEND.
429
430 2017-10-05  Pedro Alves  <palves@redhat.com>
431
432         * linux-nat.c (linux_child_follow_fork): When following the parent
433         and detaching the child, consult the parent thread's architecture
434         instead of the child's.
435
436 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
437
438         * ax.h: Do not include "doublest.h".
439         (union agent_val): Remove.
440
441 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
442
443         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
444         (decimal_to_string): Return std::string object.
445         (decimal_from_string): Accept std::string object.  Return bool.
446         (decimal_from_integral, decimal_from_doublest): Remove.
447         (decimal_from_longest): Add prototype.
448         (decimal_from_ulongest): Likewise.
449         (decimal_to_longest): Likewise.
450         (decimal_from_doublest): Likewise.
451         * dfp.c: Do not include "gdbtypes.h" or "value.h".
452         (MAX_DECIMAL_STRING): Move here.
453         (decimal_to_string): Return std::string object.
454         (decimal_from_string): Accept std::string object.  Return bool.
455         (decimal_from_integral): Remove, replace by ...
456         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
457         (decimal_to_longest): New function.
458         (decimal_from_floating): Remove, replace by ...
459         (decimal_from_doublest): ... this new function.
460         (decimal_to_doublest): Update to new decimal_to_string interface.
461
462         * value.c (unpack_long): Use decimal_to_longest.
463         * valops.c (value_cast): Use decimal_from_doublest instead of
464         decimal_from_floating.  Use decimal_from_[u]longest isntead of
465         decimal_from_integral.
466         * valarith.c (value_args_as_decimal): Likewise.
467         * valprint.c (print_decimal_floating): Update to new
468         decimal_to_string interface.
469         * printcmd.c (printf_decfloat): Likewise.
470         * c-exp.y (parse_number): Update to new decimal_from_string interface.
471
472 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
473
474         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
475         * gdbtypes.c: Include "floatformat.h".
476         * value.c: Likewise.
477         * m68k-tdep.c: Likewise.
478
479         * findvar.c: Do not include "floatformat.h".
480         * amd64-darwin-tdep.c: Likewise.
481         * arm-linux-tdep.c: Likewise.
482         * i386-darwin-tdep.c: Likewise.
483         * i387-tdep.c: Likewise.
484         * m68k-linux-tdep.c: Likewise.
485         * mep-tdep.c: Likewise.
486         * mips-tdep.c: Likewise.
487         * nios2-tdep.c: Likewise.
488         * s390-linux-tdep.c: Likewise.
489         * sparc-obsd-tdep.c: Likewise.
490         * sparc-tdep.c: Likewise.
491         * sparc64-tdep.c: Likewise.
492         * spu-tdep.c: Likewise.
493         * tic6x-tdep.c: Likewise.
494         * tilegx-tdep.c: Likewise.
495         * vax-tdep.c: Likewise.
496         * xstormy16-tdep.c: Likewise.
497         * xtensa-tdep.c: Likewise.
498
499         * top.c: Do not include "doublest.h".
500         * aarch64-tdep.c: Likewise.
501         * alpha-tdep.c: Likewise.
502         * arm-linux-tdep.c: Likewise.
503         * m68k-linux-tdep.c: Likewise.
504         * tilegx-tdep.c: Likewise.
505         * xstormy16-tdep.c: Likewise.
506
507 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
508
509         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
510         (mipsn32_fbsd_sigframe): Define.
511         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
512         for FreeBSD/mipsn32.
513
514 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
515
516         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
517         AT_HWCAP.
518
519 2017-10-05  Tristan Gingold  <tgingold@free.fr>
520
521         * MAINTAINERS (Misc): Update my email address.
522
523 2017-10-04  Pedro Alves  <palves@redhat.com>
524
525         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
526         it instead of target_gdbarch.
527         (get_remote_state, get_remote_packet_size): Adjust
528         get_remote_arch_state calls, passing down target_gdbarch
529         explicitly.
530         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
531         'gdbarch' and use it instead of target_gdbarch.
532         (get_memory_packet_size): Adjust get_remote_arch_state calls,
533         passing down target_gdbarch explicitly.
534         (struct stop_reply) <arch>: New field.
535         (remote_parse_stop_reply): Use the stopped thread's architecture,
536         not the current inferior's.  Save the architecture in the
537         stop_reply.
538         (process_stop_reply): Use the stop reply's architecture.
539         (process_g_packet, remote_fetch_registers)
540         (remote_prepare_to_store, store_registers_using_G)
541         (remote_store_registers): Adjust get_remote_arch_state calls,
542         using the regcache's architecture.
543         (remote_get_trace_status): Adjust get_remote_arch_state calls,
544         passing down target_gdbarch explicitly.
545         * spu-multiarch.c (spu_thread_architecture): Defer to the target
546         beneath instead of calling target_gdbarch.
547         * target.c (default_thread_architecture): Use the specified
548         inferior's architecture, instead of the current inferior's
549         architecture (via target_gdbarch).
550
551 2017-10-04  Pedro Alves  <palves@redhat.com>
552
553         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
554         case.
555         (regcache_print): Handle !target_has_registers here instead.
556
557 2017-10-04  Pedro Alves  <palves@redhat.com>
558
559         * frame.c (create_test_frame): Delete.
560         * frame.h (create_test_frame): Delete.
561         * gdbarch-selftests.c: Include gdbthread.h and target.h.
562         (class regcache_test): Delete.
563         (test_target_has_registers, test_target_has_stack)
564         (test_target_has_memory, test_target_prepare_to_store)
565         (test_target_store_registers): New functions.
566         (test_target_ops): New class.
567         (register_to_value_test): Error out if there's already a
568         process_stratum (or higher) target pushed.  Create a fuller mock
569         environment, with mock target_ops, inferior, address space, thread
570         and inferior_ptid.
571         * progspace.c (struct address_space): Move to ...
572         * progspace.h (struct address_space): ... here.
573         * regcache.h (regcache::~regcache, regcache::raw_write)
574         [GDB_SELF_TEST]: No longer virtual.
575
576 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
577
578         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
579
580 2017-10-04  Pedro Alves  <palves@redhat.com>
581
582         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
583         out of 'between TRY and CATCH'.
584
585 2017-10-04  Pedro Alves  <palves@redhat.com>
586
587         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
588         * common/common-exceptions.h (TRY): Open an outermost scope.
589         Expand intro comment.
590         (CATCH): Reindent.
591         (END_CATCH): Close the outermost scope.
592         * completer.c (complete_line_internal): Add missing END_CATCH.
593
594 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
595
596         * NEWS (Changes since GDB 8.0): Add entry about new
597         'set-cwd-on-gdbserver' feature.
598         (New remote packets): Add entry for QSetWorkingDir.
599         * common/common-inferior.h (set_inferior_cwd): New prototype.
600         * infcmd.c (set_inferior_cwd): Remove "static".
601         (show_cwd_command): Expand text to include remote debugging.
602         * remote.c: Add PACKET_QSetWorkingDir.
603         (remote_protocol_features) <QSetWorkingDir>: New entry for
604         PACKET_QSetWorkingDir.
605         (extended_remote_set_inferior_cwd): New function.
606         (extended_remote_create_inferior): Call
607         "extended_remote_set_inferior_cwd".
608         (_initialize_remote): Call "add_packet_config_cmd" for
609         QSetWorkingDir.
610
611 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
612
613         * NEWS (New commands): Mention "set/show cwd".
614         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
615         "cd" command's help text.
616         * common/common-inferior.h (get_inferior_cwd): New prototype.
617         * infcmd.c (inferior_cwd_scratch): New global variable.
618         (set_inferior_cwd): New function.
619         (get_inferior_cwd): Likewise.
620         (set_cwd_command): Likewise.
621         (show_cwd_command): Likewise.
622         (_initialize_infcmd): Add "set/show cwd" commands.
623         * inferior.h (class inferior) <cwd>: New field.
624         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
625         (fork_inferior): Change inferior's cwd before its execution.
626         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
627         to CreateProcess.
628
629 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
630
631         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
632         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
633         (COMMON_OBS): Add gdb_tilde_expand.o.
634         * common/gdb_tilde_expand.c: New file.
635         * common/gdb_tilde_expand.h: Likewise.
636
637 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
638
639         * gdbarch.sh (objfile): Remove duplicate declaration.
640         * gdbarch.h: Regenerate.
641
642 2017-10-03  Tom Tromey  <tom@tromey.com>
643
644         * utils.c (internal_vproblem): Use string_vprintf.
645
646 2017-10-03  Tom Tromey  <tom@tromey.com>
647
648         * printcmd.c (info_symbol_command): Use std::string.
649
650 2017-10-03  Tom Tromey  <tom@tromey.com>
651
652         * top.c (gdb_safe_append_history): Use std::string.
653
654 2017-10-03  Tom Tromey  <tom@tromey.com>
655
656         * event-top.c (stdin_event_handler): Update.
657         * main.c (captured_main_1): Update.
658         * top.h (make_delete_ui_cleanup): Remove.
659         (struct ui): Add constructor and destructor.
660         (new_ui, delete_ui): Remove.
661         * top.c (make_delete_ui_cleanup): Remove.
662         (new_ui_command): Use std::unique_ptr.
663         (delete_ui_cleanup): Remove.
664         (ui::ui): Rename from new_ui.  Update.
665         (free_ui): Remove.
666         (ui::~ui): Rename from delete_ui.  Update.
667
668 2017-10-03  Tom Tromey  <tom@tromey.com>
669
670         * symfile.c (load_progress): Use gdb::byte_vector.
671
672 2017-10-03  Tom Tromey  <tom@tromey.com>
673
674         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
675         declaration.
676         * printcmd.c (x_command): Remove unused declaration.
677         * symfile.c (symbol_file_command): Remove unused declaration.
678
679 2017-10-03  Tom Tromey  <tom@tromey.com>
680
681         * utils.c (internal_vproblem): Use std::string.
682         (defaulted_query): Likewise.
683
684 2017-10-03  Tom Tromey  <tom@tromey.com>
685
686         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
687         * top.c (execute_command_to_string): Update.
688         * utils.c (make_cleanup_restore_page_info): Remove.
689         (do_restore_page_info_cleanup): Remove.
690         (set_batch_flag_and_restore_page_info):
691         New.
692         (make_cleanup_restore_page_info): Remove.
693         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
694         (~set_batch_flag_and_restore_page_info): New
695         (make_cleanup_restore_uinteger): Remove.
696         (make_cleanup_restore_integer): Remove.
697         (struct restore_integer_closure): Remove.
698         (restore_integer): Remove.
699         * utils.h (struct set_batch_flag_and_restore_page_info): New
700         class.
701         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
702         (make_cleanup_restore_page_info): Remove.
703         (make_cleanup_restore_uinteger) Remove.
704         (make_cleanup_restore_integer) Remove.
705
706 2017-10-03  Tom Tromey  <tom@tromey.com>
707
708         * record-full.h (record_full_gdb_operation_disable_set): Return
709         scoped_restore_tmpl<int>.
710         * infrun.c (adjust_pc_after_break): Update.
711         (handle_signal_stop): Update.
712         * record-full.c (record_full_gdb_operation_disable_set): Return
713         scoped_restore_tmpl<int>.
714         (record_full_wait_1, record_full_insert_breakpoint)
715         (record_full_remove_breakpoint, record_full_save)
716         (record_full_goto_insn): Update.
717
718 2017-10-02  Tom Tromey  <tom@tromey.com>
719
720         PR rust/22236:
721         * rust-lang.c (rust_val_print_str): New function.
722         (val_print_struct): Call it.
723         (rust_subscript): Preserve name of slice type.
724
725 2017-10-02  Tom Tromey  <tom@tromey.com>
726
727         * rust-lang.c (rust_subscript): Handle slices in
728         EVAL_AVOID_SIDE_EFFECTS case.
729
730 2017-10-02  Tom Tromey  <tom@tromey.com>
731
732         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
733
734 2017-10-02  Tom Tromey  <tom@tromey.com>
735
736         * rust-lang.h (rust_slice_type): Add "extern".
737
738 2017-10-02  Tom Tromey  <tom@tromey.com>
739             Pedro Alves  <palves@redhat.com>
740
741         * ada-lang.h (ada_exc_info::operator<): Make const.
742         (ada_exc_info::operator==): Make const.
743         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
744         Make const.
745
746 2017-09-29  Tom Tromey  <tom@tromey.com>
747
748         * target.c (read_whatever_is_readable): Change type of "result".
749         Update.
750         (free_memory_read_result_vector): Remove.
751         (read_memory_robust): Change return type.  Update.
752         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
753         bin2hex, std::string.
754         * target.h (memory_read_result_s): Remove typedef.
755         (free_memory_read_result_vector): Remove.
756         (read_memory_robust): Return std::vector.
757
758 2017-09-29  Tom Tromey  <tom@tromey.com>
759
760         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
761
762 2017-09-29  Tom Tromey  <tom@tromey.com>
763
764         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
765         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
766         operator< and operator==.
767         (ada_exceptions_list): Return a std::vector.
768         * ada-lang.c (ada_exc_info::operator<): Rename from
769         compare_ada_exception_info.
770         (ada_exc_info::operator==): New.
771         (sort_remove_dups_ada_exceptions_list): Change type of
772         "exceptions".
773         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
774         (ada_add_global_exceptions): Likewise.
775         (ada_exceptions_list_1): Return a std::vector.
776         (ada_exceptions_list): Likewise.
777
778 2017-09-29  Tom Tromey  <tom@tromey.com>
779
780         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
781         'std::set *'.
782         (print_one_inferior): Update.
783         (free_vector_of_ints): Remove.
784         (list_available_thread_groups): Change "ids" to std::set.
785         (mi_cmd_list_thread_groups): Update.
786         (struct collect_cores_data) <core>: Now a std::set.
787         (collect_cores): Update.
788         (unique): Remove.
789         (print_one_inferior): Update.
790
791 2017-09-29  Tom Tromey  <tom@tromey.com>
792
793         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
794         (mi_execute_async_cli_command): Likewise.
795         (mi_cmd_trace_frame_collected): Use field_fmt.
796
797 2017-09-29  Tom Tromey  <tom@tromey.com>
798
799         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
800         gdb::byte_vector.
801
802 2017-09-29  Tom Tromey  <tom@tromey.com>
803
804         * mi/mi-parse.c (mi_parse): Remove unused declaration.
805
806 2017-09-29  Tom Tromey  <tom@tromey.com>
807
808         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
809
810 2017-09-29  Tom Tromey  <tom@tromey.com>
811
812         * varobj.h (varobj_gen_name): Return std::string.
813         * varobj.c (varobj_gen_name): Return std::string.
814         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
815         (mi_cmd_var_delete): Don't copy "name".
816
817 2017-09-29  Tom Tromey  <tom@tromey.com>
818
819         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
820         (mi_cmd_break_insert_1): Update.
821
822 2017-09-29  Tom Tromey  <tom@tromey.com>
823
824         * target.h (make_scoped_defer_target_commit_resume): Update.
825         * target.c (make_scoped_defer_target_commit_resume): Rename from
826         make_cleanup_defer_target_commit_resume.  Return a
827         scoped_restore.
828         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
829
830 2017-09-29  Tom Tromey  <tom@tromey.com>
831
832         * main.c (captured_main_1): Remove unused declaration.
833         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
834
835 2017-09-29  Tom Tromey  <tom@tromey.com>
836
837         * symtab.c (search_symbols): Remove unused outer cleanup.
838         (make_source_files_completion_list): Remove unused declaration.
839
840 2017-09-29  Tom Tromey  <tom@tromey.com>
841
842         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
843
844 2017-09-29  Tom Tromey  <tom@tromey.com>
845
846         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
847         gdb::byte_vector.
848
849 2017-09-29  Tom Tromey  <tom@tromey.com>
850
851         * complaints.c (vcomplaint): Use std::string.
852
853 2017-09-29  Tom Tromey  <tom@tromey.com>
854
855         * tracepoint.c (trace_variable_command): Use std::string.
856         (encode_actions_1): Remove unused declarations.
857         (create_tsv_from_upload): Use std::string.
858
859 2017-09-29  Tom Tromey  <tom@tromey.com>
860
861         * cp-support.c (gdb_demangle): Use std::string.
862
863 2017-09-29  Tom Tromey  <tom@tromey.com>
864
865         * stack.c (parse_frame_specification): Use std::string
866         (info_frame_command): Use gdb::unique_xmalloc_ptr.
867
868 2017-09-29  Tom Tromey  <tom@tromey.com>
869
870         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
871
872 2017-09-29  Tom Tromey  <tom@tromey.com>
873
874         * utils.c (vfprintf_maybe_filtered): Use std::string.
875         (vfprintf_unfiltered): Likewise.
876
877 2017-09-29  Tom Tromey  <tom@tromey.com>
878
879         * event-top.c (top_level_prompt): Return std::string.
880         (display_gdb_prompt): Update.
881
882 2017-09-29  Tom Tromey  <tom@tromey.com>
883
884         * unittests/common-utils-selftests.c (format): New function.
885         (string_vprintf_tests): New function.
886         (_initialize_common_utils_selftests): Register new tests.
887         * common/common-utils.c (string_vprintf): New function.
888         * common/common-utils.h (string_vprintf): Declare.
889
890 2017-09-29  Pedro Alves  <palves@redhat.com>
891
892         * common/rsp-low.c (unpack_varlen_hex): Constify.
893         * common/rsp-low.h (unpack_varlen_hex): Constify.
894         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
895         Constify.
896         * remote.c (remote_set_permissions, read_ptid)
897         (remote_current_thread, remote_get_threads_with_qthreadinfo)
898         (remote_static_tracepoint_marker_at)
899         (remote_static_tracepoint_markers_by_strid)
900         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
901         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
902         (parse_tracepoint_definition, parse_tsv_definition)
903         (parse_static_tracepoint_marker_definition): Constify.
904         * tracepoint.h (parse_static_tracepoint_marker_definition)
905         (parse_trace_status, parse_tracepoint_status)
906         (parse_tracepoint_definition, parse_tsv_definition): Constify.
907
908 2017-09-29  Pedro Alves  <palves@redhat.com>
909
910         * remote.c (target_buf, target_buf_size): Delete.
911         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
912         Use the connection's packet buffer instead.
913         All callers adjusted.
914         (_initialize_remote): Remove references to target_buf and
915         target_buf_size.
916
917 2017-09-28  Pedro Alves  <palves@redhat.com>
918
919         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
920         unittests/common-utils-selftests.c.
921         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
922         (COMMON_OBS): Remove utils-selftests.o.
923         * utils-selftests.c: Move to ...
924         * unittests/common-utils-selftests.c: ... here and rename self
925         test to "string_printf".
926
927 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
928
929         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
930         having NULL cus or tus.
931
932 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
933
934         * arm-tdep.c: (convert_from_extended): Remove.
935         (convert_to_extended): Likewise.
936         (arm_extract_return_value): Use convert_typed_floating.
937         (arm_store_return_value): Likewise.
938
939         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
940         * sh-tdep.c: Do not include "floatformat.h".
941         (sh_littlebyte_bigword_type): New function.
942         (sh_register_convert_to_virtual): Use convert_typed_floating.
943         (sh_register_convert_to_raw): Likewise.
944         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
945         (sh64_littlebyte_bigword_type): New function.
946         (sh64_extract_return_value): Use convert_typed_floating.
947         (sh64_register_convert_to_virtual): Likewise.
948         (sh64_register_convert_to_raw): Likewise.
949
950 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
951
952         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
953         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
954
955         * gdbtypes.h (union type_specific): Make field floatformat hold
956         just a single struct floatformat, not an array.
957         (floatformat_from_type): Move here.
958         * gdbtypes.c (floatformat_from_type): Move here.  Update to
959         changed TYPE_FLOATFORMAT definition.
960         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
961         (recursive_dump_type): Likewise.
962         (init_float_type): Install correct floatformat for byte order.
963         (arch_float_type): Likewise.
964
965 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
966
967         * gdbtypes.c (init_type): Change incoming argument from
968         length-in-bytes to length-in-bits.  Assert length is a
969         multiple of TARGET_CHAR_BITS.
970         (arch_type, arch_flags_type): Likewise.
971         (init_integer_type): Update call to init_type.
972         (init_character_type): Likewise.
973         (init_boolean_type): Likewise.
974         (init_float_type): Likewise.
975         (init_decfloat_type): Likewise.
976         (init_complex_type): Likewise.
977         (init_pointer_type): Likewise.
978         (objfile_type): Likewise.
979         (arch_integer_type): Update call to arch_type.
980         (arch_character_type): Likewise.
981         (arch_boolean_type): Likewise.
982         (arch_float_type): Likewise.
983         (arch_decfloat_type): Likewise.
984         (arch_complex_type): Likewise.
985         (arch_pointer_type): Likewise.
986         (gdbtypes_post_init): Likewise.
987
988         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
989         (read_base_type): Likewise.
990         * mdebugread.c (basic_type): Likewise.
991         * stabsread.c (dbx_init_float_type): Likewise.
992         (rs6000_builtin_type): Likewise.
993         (read_range_type): Likewise.  Also, fix call to init_integer_type
994         with erroneous length argument.
995
996         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
997         * d-lang.c (build_d_types): Likewise.
998         * f-lang.c (build_fortran_types): Likewise.
999         * go-lang.c (build_go_types): Likewise.
1000         * opencl-lang.c (build_opencl_types): Likewise.
1001         * jit.c (finalize_symtab): Likewise.
1002         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1003         (build_std_type_info_type): Likewise.
1004         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
1005         update call to arch_flags_type.
1006
1007         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1008         arch_type.
1009         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1010         * windows-tdep.c (windows_get_tlb_type): Likewise.
1011
1012         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1013         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1014         * m32c-tdep.c (make_types): Likewise.
1015         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1016         (rl78_psw_type): Update call to arch_flags_type.
1017         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1018         * rx-tdep.c (rx_psw_type): Likewise.
1019         (rx_fpsw_type): Likewise.
1020         * sparc-tdep.c (sparc_psr_type): Likewise.
1021         (sparc_fsr_type): Likewise.
1022         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1023         (sparc64_ccr_type): Likewise.
1024         (sparc64_fsr_type): Likewise.
1025         (sparc64_fprs_type): Likewise.
1026
1027 2017-09-27  Tom Tromey  <tom@tromey.com>
1028
1029         * findcmd.c (find_command): Constify.
1030
1031 2017-09-27  Tom Tromey  <tom@tromey.com>
1032
1033         * ada-tasks.c (task_command_1, task_command): Constify.
1034
1035 2017-09-27  Tom Tromey  <tom@tromey.com>
1036
1037         * symtab.c (maintenance_print_symbol_cache)
1038         (maintenance_flush_symbol_cache)
1039         (maintenance_print_symbol_cache_statistics): Constify.
1040
1041 2017-09-27  Tom Tromey  <tom@tromey.com>
1042
1043         * inferior.c (detach_inferior_command, kill_inferior_command)
1044         (inferior_command): Constify.
1045
1046 2017-09-27  Tom Tromey  <tom@tromey.com>
1047
1048         * regcache.c (regcache_print, maintenance_print_registers)
1049         (maintenance_print_raw_registers)
1050         (maintenance_print_cooked_registers)
1051         (maintenance_print_register_groups)
1052         (maintenance_print_remote_registers): Constify.
1053
1054 2017-09-27  Tom Tromey  <tom@tromey.com>
1055
1056         * printcmd.c (map_display_numbers, undisplay_command)
1057         (enable_disable_display_command, enable_display_command)
1058         (disable_display_command): Constify.
1059
1060 2017-09-27  Tom Tromey  <tom@tromey.com>
1061
1062         * breakpoint.h (delete_command): Don't declare.
1063         * breakpoint.c (delete_command, enable_once_command)
1064         (enable_count_command, enable_delete_command, breakpoint_1)
1065         (maintenance_info_breakpoints, stopin_command, stopat_command)
1066         (delete_command, delete_trace_command, save_breakpoints)
1067         (save_breakpoints_command, save_tracepoints_command): Constify.
1068
1069 2017-09-27  Tom Tromey  <tom@tromey.com>
1070
1071         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1072         (skip_ws, extract_identifier, macro_define_command)
1073         (macro_undef_command, macro_list_command): Constify.
1074
1075 2017-09-27  Tom Tromey  <tom@tromey.com>
1076
1077         * infcmd.c (environment_info, set_environment_command)
1078         (unset_environment_command, path_info, info_proc_cmd_1)
1079         (info_proc_cmd_mappings, info_proc_cmd_stat)
1080         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1081         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1082
1083 2017-09-27  Tom Tromey  <tom@tromey.com>
1084
1085         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1086         Constify.
1087
1088 2017-09-27  Tom Tromey  <tom@tromey.com>
1089
1090         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1091
1092 2017-09-27  Tom Tromey  <tom@tromey.com>
1093
1094         * demangle.c (demangle_command): Constify.
1095
1096 2017-09-27  Tom Tromey  <tom@tromey.com>
1097
1098         * progspace.c (maintenance_info_program_spaces_command):
1099         Constify.
1100
1101 2017-09-27  Tom Tromey  <tom@tromey.com>
1102
1103         * compile/compile.c (check_raw_argument, compile_file_command)
1104         (compile_code_command, compile_print_command): Constify.
1105
1106 2017-09-27  Tom Tromey  <tom@tromey.com>
1107
1108         * reggroups.c (maintenance_print_reggroups): Constify.
1109
1110 2017-09-27  Tom Tromey  <tom@tromey.com>
1111
1112         * dwarf2read.c (save_gdb_index_command): Constify.
1113
1114 2017-09-27  Tom Tromey  <tom@tromey.com>
1115
1116         * stap-probe.c (info_probes_stap_command): Constify.
1117
1118 2017-09-27  Tom Tromey  <tom@tromey.com>
1119
1120         * fork-child.c (unset_exec_wrapper_command): Constify.
1121
1122 2017-09-27  Tom Tromey  <tom@tromey.com>
1123
1124         * btrace.c (get_uint, get_context_size, no_chunk)
1125         (maint_btrace_packet_history_cmd)
1126         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1127         (maint_info_btrace_cmd): Constify.
1128
1129 2017-09-27  Tom Tromey  <tom@tromey.com>
1130
1131         * reverse.c (delete_bookmark_command): Constify.
1132
1133 2017-09-27  Tom Tromey  <tom@tromey.com>
1134
1135         * remote.c (set_memory_packet_size)
1136         (set_memory_write_packet_size, show_memory_write_packet_size)
1137         (set_memory_read_packet_size, show_memory_read_packet_size)
1138         (compare_sections_command, packet_command, remote_put_command)
1139         (remote_get_command, remote_delete_command): Constify.
1140
1141 2017-09-27  Tom Tromey  <tom@tromey.com>
1142
1143         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1144         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1145         (set_mipsfpu_auto_command): Constify.
1146
1147 2017-09-27  Tom Tromey  <tom@tromey.com>
1148
1149         * cli/cli-cmds.h (cd_command): Constify.
1150         * cli/cli-cmds.c (cd_command): Constify.
1151
1152 2017-09-27  Tom Tromey  <tom@tromey.com>
1153
1154         * thread.c (thread_name_command, thread_find_command): Constify.
1155
1156 2017-09-27  Tom Tromey  <tom@tromey.com>
1157
1158         * probe.c (enable_probes_command, disable_probes_command):
1159         Constify.
1160
1161 2017-09-27  Tom Tromey  <tom@tromey.com>
1162
1163         * symfile.c (symbol_file_command): Constify.
1164         * gdbcore.h (deprecated_file_changed_hook): Constify.
1165         * exec.c (deprecated_file_changed_hook, exec_file_command)
1166         (file_command): Constify.
1167         * defs.h (symbol_file_command): Constify.
1168
1169 2017-09-27  Tom Tromey  <tom@tromey.com>
1170
1171         * remote-fileio.c (set_system_call_allowed)
1172         (show_system_call_allowed): Constify.
1173
1174 2017-09-27  Tom Tromey  <tom@tromey.com>
1175
1176         * tracepoint.c (delete_trace_variable_command)
1177         (tfind_end_command, tfind_start_command, tfind_pc_command)
1178         (tfind_tracepoint_command, tfind_line_command)
1179         (tfind_range_command, tfind_outside_command): Constify.
1180
1181 2017-09-27  Tom Tromey  <tom@tromey.com>
1182
1183         * ax-gdb.c (maint_agent_printf_command, agent_command)
1184         (agent_eval_command): Constify.
1185
1186 2017-09-27  Tom Tromey  <tom@tromey.com>
1187
1188         * tracepoint.c (info_scope_command): Constify.
1189         * python/python.c (gdbpy_decode_line): Constify.
1190         * python/py-breakpoint.c (bppy_init): Constify.
1191         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1192         * location.h: (new_linespec_location)
1193         (string_to_event_location_basic, string_to_event_location):
1194         Constify.
1195         * location.c (new_linespec_location)
1196         (string_to_event_location_basic, string_to_event_location):
1197         Constify.
1198         * linespec.h (decode_line_with_current_source)
1199         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1200         * linespec.c (linespec_lex_to_end)
1201         (decode_line_with_current_source)
1202         (decode_line_with_last_displayed): Constify.
1203         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1204         Constify.
1205         * cli/cli-cmds.c (edit_command, list_command): Constify.
1206         * breakpoint.h (until_break_command, watch_command_wrapper)
1207         (awatch_command_wrapper, rwatch_command_wrapper)
1208         (init_ada_exception_breakpoint): Constify.
1209         * breakpoint.c (break_command_1, dprintf_command)
1210         (break_range_command, watch_command_wrapper)
1211         (rwatch_command_wrapper, awatch_command_wrapper)
1212         (until_break_command, init_ada_exception_breakpoint)
1213         (strace_marker_create_sals_from_location, trace_command)
1214         (ftrace_command, strace_command, struct tracepoint): Constify.
1215         * ax-gdb.c (agent_command_1): Constify.
1216         * ada-lang.c (ada_exception_sal): Constify.
1217
1218 2017-09-27  Tom Tromey  <tom@tromey.com>
1219
1220         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1221         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1222         (get_context_size, no_chunk, get_insn_history_modifiers)
1223         (cmd_record_insn_history, get_call_history_modifiers)
1224         (cmd_record_call_history): Constify.
1225
1226 2017-09-27  Tom Tromey  <tom@tromey.com>
1227
1228         * source.c (show_substitute_path_command)
1229         (unset_substitute_path_command, set_substitute_path_command):
1230         Constify.
1231
1232 2017-09-27  Tom Tromey  <tom@tromey.com>
1233
1234         * typeprint.c (maintenance_print_type): Constify.
1235         * maint.c (maintenance_dump_me, maintenance_demangle)
1236         (maintenance_time_display, maintenance_info_sections)
1237         (maintenance_print_statistics, maintenance_deprecate)
1238         (maintenance_undeprecate): Constify.
1239         (maintenance_do_deprecate): Constify.  Use std::string.
1240         (maintenance_selftest): Constify.
1241         * gdbtypes.h (maintenance_print_type): Constify.
1242
1243 2017-09-27  Tom Tromey  <tom@tromey.com>
1244
1245         * hppa-tdep.c (unwind_command): Constify.
1246
1247 2017-09-27  Tom Tromey  <tom@tromey.com>
1248
1249         * target-descriptions.c (unset_tdesc_filename_cmd)
1250         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1251         Constify.
1252
1253 2017-09-27  Tom Tromey  <tom@tromey.com>
1254
1255         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1256
1257 2017-09-27  Tom Tromey  <tom@tromey.com>
1258
1259         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1260
1261 2017-09-27  Tom Tromey  <tom@tromey.com>
1262
1263         * tui/tui-regs.c (tui_reg_command): Constify.
1264
1265 2017-09-27  Tom Tromey  <tom@tromey.com>
1266
1267         * skip.c (skip_file_command, skip_function_command)
1268         (skip_enable_command, skip_disable_command, skip_delete_command):
1269         Constify.
1270
1271 2017-09-27  Tom Tromey  <tom@tromey.com>
1272
1273         * record-btrace.c (cmd_record_btrace_bts_start)
1274         (cmd_record_btrace_pt_start): Constify.
1275
1276 2017-09-27  Tom Tromey  <tom@tromey.com>
1277
1278         * symmisc.c (maintenance_print_symbols)
1279         (maintenance_print_msymbols, maintenance_print_objfiles)
1280         (maintenance_info_symtabs, maintenance_check_symtabs)
1281         (maintenance_expand_symtabs, maintenance_info_line_tables):
1282         Constify.
1283
1284 2017-09-27  Tom Tromey  <tom@tromey.com>
1285
1286         * top.c (new_ui_command): Constify.
1287
1288 2017-09-27  Tom Tromey  <tom@tromey.com>
1289
1290         * symfile.c (add_symbol_file_command)
1291         (remove_symbol_file_command, list_overlays_command)
1292         (map_overlay_command, unmap_overlay_command)
1293         (overlay_auto_command, overlay_manual_command)
1294         (overlay_off_command, overlay_load_command): Constify.
1295
1296 2017-09-27  Tom Tromey  <tom@tromey.com>
1297
1298         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1299         (info_spu_mailbox_command, info_spu_dma_command)
1300         (info_spu_proxydma_command): Constify.
1301
1302 2017-09-27  Tom Tromey  <tom@tromey.com>
1303
1304         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1305
1306 2017-09-27  Tom Tromey  <tom@tromey.com>
1307
1308         * cli/cli-script.c (user_defined_command): Constify.
1309
1310 2017-09-27  Tom Tromey  <tom@tromey.com>
1311
1312         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1313         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1314         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1315         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1316         (dump_binary_value, append_binary_memory, append_binary_value):
1317         Constify.
1318         (struct dump_context) <func>: Constify.
1319         (add_dump_command): Update.
1320
1321 2017-09-27  Tom Tromey  <tom@tromey.com>
1322
1323         * cli/cli-cmds.c (show_version, show_configuration)
1324         (source_command, show_user): Constify.
1325
1326 2017-09-27  Tom Tromey  <tom@tromey.com>
1327
1328         * target.c (maintenance_print_target_stack): Constify.
1329
1330 2017-09-27  Tom Tromey  <tom@tromey.com>
1331
1332         * interps.c (interpreter_exec_cmd): Constify.
1333
1334 2017-09-27  Tom Tromey  <tom@tromey.com>
1335
1336         * record-full.c (cmd_record_full_restore): Constify.
1337
1338 2017-09-27  Tom Tromey  <tom@tromey.com>
1339
1340         * memattr.c (enable_mem_command, disable_mem_command)
1341         (delete_mem_command): Constify.
1342
1343 2017-09-27  Tom Tromey  <tom@tromey.com>
1344
1345         * value.c (show_convenience): Constify.
1346
1347 2017-09-27  Tom Tromey  <tom@tromey.com>
1348
1349         * gdbcore.h (core_file_command): Update.
1350         * corefile.c (core_file_command): Constify.
1351
1352 2017-09-27  Tom Tromey  <tom@tromey.com>
1353
1354         * user-regs.c (maintenance_print_user_registers): Constify.
1355
1356 2017-09-27  Tom Tromey  <tom@tromey.com>
1357
1358         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1359
1360 2017-09-27  Tom Tromey  <tom@tromey.com>
1361
1362         * cp-support.c (first_component_command): Constify.
1363
1364 2017-09-27  Tom Tromey  <tom@tromey.com>
1365
1366         * psymtab.c (maintenance_print_psymbols)
1367         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1368         Constify.
1369
1370 2017-09-27  Tom Tromey  <tom@tromey.com>
1371
1372         * windows-tdep.c (display_tib): Constify.
1373
1374 2017-09-27  Tom Tromey  <tom@tromey.com>
1375
1376         * linux-fork.c (delete_checkpoint_command)
1377         (detach_checkpoint_command): Constify.
1378
1379 2017-09-27  Tom Tromey  <tom@tromey.com>
1380
1381         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1382
1383 2017-09-27  Tom Tromey  <tom@tromey.com>
1384
1385         * arc-tdep.c (dump_arc_instruction_command): Constify.
1386
1387 2017-09-27  Tom Tromey  <tom@tromey.com>
1388
1389         * valprint.c (set_radix, show_radix): Constify.
1390
1391 2017-09-27  Tom Tromey  <tom@tromey.com>
1392
1393         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1394
1395 2017-09-27  Tom Tromey  <tom@tromey.com>
1396
1397         * command.h (not_just_help_class_command): Update.
1398         * cli/cli-decode.h (not_just_help_class_command): Update.
1399         * cli/cli-decode.c (not_just_help_class_command): Constify.
1400
1401 2017-09-27  Tom Tromey  <tom@tromey.com>
1402
1403         * gdb_bfd.c (maintenance_info_bfds): Constify.
1404
1405 2017-09-27  Tom Tromey  <tom@tromey.com>
1406
1407         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1408         overloads.
1409         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1410         (do_const_cfunc): New function.
1411         (cmd_cfunc_eq): New overload.
1412         (cli_user_command_p): Check do_const_cfunc.
1413         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1414         const_cfunc.
1415         * command.h (add_cmd): Add const overload and no-function
1416         overload.
1417         (set_cmd_cfunc): Add const overload.
1418         (cmd_const_cfunc_ftype): Declare.
1419         (cmd_cfunc_eq): Add const overload.
1420         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1421         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1422         overload.
1423
1424 2017-09-27  Tom Tromey  <tom@tromey.com>
1425
1426         * macroexp.c (get_next_token_for_substitution): New function.
1427         (substitute_args): Call it.  Check for __VA_OPT__.
1428
1429 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1430             Pedro Alves <palves@redhat.com>
1431
1432         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1433         producer_is_icc_lt_14.
1434         (producer_is_icc_lt_14): New function.
1435         (check_producer): Add code for checking version of ICC.
1436         (producer_is_icc): Move to producer.c.
1437         (read_structure_type): Restrict ICC workaround to ICC<14.
1438         * producer.c: Include selftest.h.
1439         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1440         New functions.
1441         * producer.h (producer_is_icc): New declaration.
1442
1443 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1444
1445         * Makefile.in (SFILES): Add producer.c.
1446         (COMMON_OBS): Add producer.o
1447         * amd64-tdep.c (producer.h): Add new include.
1448         * dwarf2read.c (producer.h): Add new include.
1449         * producer.c: New file.
1450         * producer.h: New file.
1451         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1452         producer.c.
1453         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1454         producer.h.
1455
1456 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1457
1458         * configure.ac: Search ncursesw before ncurses.
1459         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1460         * gdb_curses.h: Include <ncursesw/ncurses.h>
1461         * config.in, configure: Regenerate.
1462
1463 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1464
1465         PR gdb/22185
1466         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1467         obsolete.
1468         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1469         Remove i386sol2 support.
1470         * configure.nat <i386sol2>: Remove.
1471         <sol2-64>: Fold into ...
1472         <sol2>: ... this.
1473         Move common settings to default section.
1474         Add sol-thread.o.
1475         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1476         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1477         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1478         <i[34567]86-*-solaris*>: Remove.
1479         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1480
1481         * configure.ac: Remove wctype in libw check.
1482         (_MSE_INT_H): Don't define on Solaris 7-9.
1483         <solaris*>: Remove libthread_db.so.1 check.
1484         * configure: Regenerate.
1485         * config.in: Regenerate.
1486
1487         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1488         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1489         (gdb_ps_size_t): Remove.
1490         Use base types in users.
1491         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1492
1493         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1494
1495 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1496
1497         PR build/22206
1498         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1499         (adi_is_addr_mapped): Likewise.
1500         (PSR_ICC): Don't redefine.
1501         (PSR_IMPL): Likewise.
1502
1503 2017-09-25  Tom Tromey  <tom@tromey.com>
1504
1505         * regcache.c (regcache::dump): Use string_printf.
1506
1507 2017-09-25  Tom Tromey  <tom@tromey.com>
1508
1509         * regcache.c (class regcache_invalidator): New.
1510         (struct register_to_invalidate): Remove.
1511         (make_cleanup_regcache_invalidate): Remove.
1512         (regcache::raw_write): Use regcache_invalidator.
1513
1514 2017-09-25  Tom Tromey  <tom@tromey.com>
1515
1516         * spu-tdep.c (spu2ppu_sniffer): Update.
1517         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1518         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1519         Remove.
1520         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1521         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1522         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1523         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1524         (frame_pop): Update.
1525
1526 2017-09-25  Tom Tromey  <tom@tromey.com>
1527
1528         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1529         * regcache.h (regcache_xfree): Don't declare.
1530         * regcache.c (regcache_xfree): Remove.
1531         (do_regcache_xfree): Use delete.
1532         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1533         * linux-fork.c (free_fork): Use delete.
1534         (fork_save_infrun_state): Likewise.
1535         * jit.c (jit_dealloc_cache): Use delete.
1536         * infrun.c (discard_infcall_suspend_state): Use delete.
1537
1538 2017-09-25  Tom Tromey  <tom@tromey.com>
1539
1540         * regcache.h (regcache_xmalloc): Don't declare.
1541         (regcache_raw_set_cached_value): Update comment.
1542         * regcache.c (regcache_xmalloc): Remove.
1543         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1544         * jit.c (jit_frame_sniffer): Use new.
1545         * frame.c (frame_save_as_regcache): Use new.
1546
1547 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1548
1549         * NEWS: Advertise support for guarded-storage registers on IBM z.
1550
1551 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1552
1553         * s390-linux-nat.c (have_regset_gs): New static variable.
1554         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1555         control block and guarded-storage broadcast control regsets.
1556         (s390_read_description): Detect whether the target has
1557         guarded-storage support, return appropriate tdesc.
1558         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1559         (features/s390x-gs-linux64.c): Likewise.
1560         (struct gdbarch_tdep) <have_gs>: New field.
1561         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1562         (s390_gsbc_regset): New variables.
1563         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1564         and s390_gsbc_regset, if applicable.
1565         (s390_core_read_description): Check whether core file was from a
1566         target with guarded-storage support; include appropriate regsets.
1567         (s390_gdbarch_init): Add registers for guarded-storage support.
1568         (_initialize_s390_tdep): Initialize new target descriptions that
1569         include registers for guarded-storage support.
1570         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1571         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1572         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1573         (S390_NUM_REGS): Adjust macro definition.
1574         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1575         (tdesc_s390x_gs_linux64): New declarations.
1576
1577 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1578
1579         * features/s390-gs-linux64.xml: New file.
1580         * features/s390-gs.xml: New file.
1581         * features/s390-gsbc.xml: New file.
1582         * features/s390x-gs-linux64.xml: New file.
1583         * features/Makefile (WHICH): Add s390-gs-linux64 and
1584         s390x-gs-linux64.
1585         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1586         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1587         * features/s390-gs-linux64.c: New generated file.
1588         * features/s390x-gs-linux64.c: New file.
1589         * regformats/s390-gs-linux64.dat: New file.
1590         * regformats/s390x-gs-linux64.dat: New file.
1591
1592 2017-09-23  Tom Tromey  <tom@tromey.com>
1593
1594         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1595
1596 2017-09-22  Tom Tromey  <tom@tromey.com>
1597
1598         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1599         type to scoped_restore_tmpl.
1600         <scoped_input_handler>: Initialize m_quit_handler directly.
1601
1602 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1603
1604         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1605         (cd_command): Likewise.  Free "current_directory" before
1606         assigning to it.
1607         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1608         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1609         * top.c (gdb_dirbuf): Remove global declaration.
1610         * top.h (gdb_dirbuf): Likewise.
1611
1612 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1613
1614         * gnulib/aclocal.m4: Regenerate.
1615         * gnulib/config.in: Regenerate.
1616         * gnulib/configure: Regenerate.
1617         * gnulib/import/Makefile.am: Regenerate.
1618         * gnulib/import/Makefile.in: Regenerate.
1619         * gnulib/import/assure.h: New file.
1620         * gnulib/import/at-func.c: Likewise
1621         * gnulib/import/chdir-long.c: New file.
1622         * gnulib/import/chdir-long.h: New file.
1623         * gnulib/import/cloexec.c: New file.
1624         * gnulib/import/cloexec.h: New file.
1625         * gnulib/import/close.c: New file.
1626         * gnulib/import/closedir.c: New file.
1627         * gnulib/import/dirent-private.h: New file.
1628         * gnulib/import/dup-safer.c: New file.
1629         * gnulib/import/dup.c: New file.
1630         * gnulib/import/dup2.c: New file.
1631         * gnulib/import/error.c: New file.
1632         * gnulib/import/error.h: New file.
1633         * gnulib/import/exitfail.c: New file.
1634         * gnulib/import/exitfail.h: New file.
1635         * gnulib/import/fchdir.c: New file.
1636         * gnulib/import/fcntl.c: New file.
1637         * gnulib/import/fcntl.in.h: New file.
1638         * gnulib/import/fd-hook.c: New file.
1639         * gnulib/import/fd-hook.h: New file.
1640         * gnulib/import/fd-safer.c: New file.
1641         * gnulib/import/fdopendir.c: New file.
1642         * gnulib/import/filename.h: New file.
1643         * gnulib/import/filenamecat-lgpl.c: New file.
1644         * gnulib/import/filenamecat.h: New file.
1645         * gnulib/import/fstat.c: New file.
1646         * gnulib/import/fstatat.c: New file.
1647         * gnulib/import/getcwd-lgpl.c: New file.
1648         * gnulib/import/getcwd.c: New file.
1649         * gnulib/import/getdtablesize.c: New file.
1650         * gnulib/import/getlogin_r.c: New file.
1651         * gnulib/import/getprogname.c: New file.
1652         * gnulib/import/getprogname.h: New file.
1653         * gnulib/import/gettext.h: New file.
1654         * gnulib/import/glob-libc.h: New file.
1655         * gnulib/import/glob.c: New file.
1656         * gnulib/import/glob.in.h: New file.
1657         * gnulib/import/intprops.h: New file.
1658         * gnulib/import/m4/chdir-long.m4: New file.
1659         * gnulib/import/m4/close.m4: New file.
1660         * gnulib/import/m4/closedir.m4: New file.
1661         * gnulib/import/m4/d-ino.m4: New file.
1662         * gnulib/import/m4/d-type.m4: New file.
1663         * gnulib/import/m4/dup.m4: New file.
1664         * gnulib/import/m4/dup2.m4: New file.
1665         * gnulib/import/m4/error.m4: New file.
1666         * gnulib/import/m4/fchdir.m4: New file.
1667         * gnulib/import/m4/fcntl.m4: New file.
1668         * gnulib/import/m4/fcntl_h.m4: New file.
1669         * gnulib/import/m4/fdopendir.m4: New file.
1670         * gnulib/import/m4/filenamecat.m4: New file.
1671         * gnulib/import/m4/fstat.m4: New file.
1672         * gnulib/import/m4/fstatat.m4: New file.
1673         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1674         * gnulib/import/m4/getcwd-path-max.m4: New file.
1675         * gnulib/import/m4/getcwd.m4: New file.
1676         * gnulib/import/m4/getdtablesize.m4: New file.
1677         * gnulib/import/m4/getlogin_r.m4: New file.
1678         * gnulib/import/m4/getprogname.m4: New file.
1679         * gnulib/import/m4/glob.m4: New file.
1680         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1681         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1682         * gnulib/import/m4/mempcpy.m4: New file.
1683         * gnulib/import/m4/memrchr.m4: New file.
1684         * gnulib/import/m4/mode_t.m4: New file.
1685         * gnulib/import/m4/msvc-inval.m4: New file.
1686         * gnulib/import/m4/msvc-nothrow.m4: New file.
1687         * gnulib/import/m4/open.m4: New file.
1688         * gnulib/import/m4/openat.m4: New file.
1689         * gnulib/import/m4/opendir.m4: New file.
1690         * gnulib/import/m4/readdir.m4: New file.
1691         * gnulib/import/m4/realloc.m4: New file.
1692         * gnulib/import/m4/rewinddir.m4: New file.
1693         * gnulib/import/m4/save-cwd.m4: New file.
1694         * gnulib/import/m4/strdup.m4: New file.
1695         * gnulib/import/m4/strerror.m4: New file.
1696         * gnulib/import/m4/unistd-safer.m4: New file.
1697         * gnulib/import/mempcpy.c: New file.
1698         * gnulib/import/memrchr.c: New file.
1699         * gnulib/import/msvc-inval.c: New file.
1700         * gnulib/import/msvc-inval.h: New file.
1701         * gnulib/import/msvc-nothrow.c: New file.
1702         * gnulib/import/msvc-nothrow.h: New file.
1703         * gnulib/import/open.c: New file.
1704         * gnulib/import/openat-die.c: New file.
1705         * gnulib/import/openat-priv.h: New file.
1706         * gnulib/import/openat-proc.c: New file.
1707         * gnulib/import/openat.c: New file.
1708         * gnulib/import/openat.h: New file.
1709         * gnulib/import/opendir.c: New file.
1710         * gnulib/import/pipe-safer.c: New file.
1711         * gnulib/import/readdir.c: New file.
1712         * gnulib/import/realloc.c: New file.
1713         * gnulib/import/rewinddir.c: New file.
1714         * gnulib/import/save-cwd.c: New file.
1715         * gnulib/import/save-cwd.h: New file.
1716         * gnulib/import/strdup.c: New file.
1717         * gnulib/import/strerror-override.c: New file.
1718         * gnulib/import/strerror-override.h: New file.
1719         * gnulib/import/strerror.c: New file.
1720         * gnulib/import/unistd--.h: New file.
1721         * gnulib/import/unistd-safer.h: New file.
1722         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
1723         "getcwd" and "glob".
1724         * ser-tcp.c: Undefine "close" before redefining it.
1725
1726 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1727
1728         * guile/scm-value.c (gdbscm_value_address): Initialize address,
1729         get rid of res_val.
1730
1731 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1732
1733         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
1734         <sol2,sparc>: Likewise.
1735         <sol2-64,i386>: Likewise.
1736
1737         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
1738         -Wdeprecated-declarations on *-*-solaris*.
1739         * configure: Regenerate.
1740
1741         * procfs.c: Include "nat/inferior.h".
1742         (procfs_info_proc): Fix typo.
1743
1744 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1745
1746         * remote.c (vector): Include.
1747         (struct private_thread_info): Add field, thread_handle.
1748         (free_private_thread_info): Deallocate storage associated with
1749         thread handle.
1750         (get_private_info_thread): Initialize `thread_handle' field.
1751         (struct thread_item): Add field, thread_handle.
1752         (clear_threads_listing_context): Deallocate storage associated
1753         with thread handle.
1754         (start_thread): Add support for "handle" attribute.
1755         (thread_attributes): Add "handle".
1756         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1757         field.
1758         (remote_update_thread_list): Update thread_handle.
1759         (remote_thread_handle_to_thread_info): New function.
1760         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1761
1762 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1763
1764         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1765         function.
1766         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1767         * python/python-internal.h (thread_object_type): Declare.
1768
1769 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1770
1771         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1772         (target_thread_handle_to_thread_info): Declare.
1773         * target.c (target_thread_handle_to_thread_info): New function.
1774         * target-delegates.c: Regenerate.
1775         * gdbthread.h (find_thread_by_handle): Declare.
1776         * thread.c (find_thread_by_handle): New function.
1777         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1778         function.
1779         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1780
1781 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1782
1783         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1784
1785 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1786
1787         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1788
1789 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1790
1791         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1792         to gdb_target_obs.
1793
1794 2017-09-20  Tom Tromey  <tom@tromey.com>
1795
1796         * breakpoint.c (struct counted_command_line): Remove.
1797         (breakpoint_commands): Update.
1798         (alloc_counted_command_line, incref_counted_command_line)
1799         (decref_counted_command_line, do_cleanup_counted_command_line)
1800         (make_cleanup_decref_counted_command_line): Remove.
1801         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1802         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1803         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1804         (save_breakpoints): Update.
1805         * breakpoint.h (counted_command_line): Now a typedef to
1806         shared_ptr.
1807         (struct breakpoint) <commands>: Now a counted_command_line.
1808         (struct bpstats) <command>: Likewise.
1809
1810 2017-09-20  Tom Tromey  <tom@tromey.com>
1811
1812         * breakpoint.c (struct commands_info, do_map_commands_command):
1813         Remove.
1814         (commands_command_1): Update.
1815         (iterate_over_related_breakpoints): Take a function_view.
1816         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1817         (delete_command): Update.
1818         (map_breakpoint_numbers): Take a function_view.
1819         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1820         (disable_command): Update.
1821         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1822         (enable_command): Update.
1823         (struct disp_data, do_enable_breakpoint_disp)
1824         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1825         (do_map_enable_delete_breakpoint): Remove.
1826         (enable_once_command, enable_count_command, enable_delete_command)
1827         (delete_trace_variable_command): Update.
1828
1829 2017-09-20  Tom Tromey  <tom@tromey.com>
1830
1831         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1832         (bpstat_clear): Use delete.
1833         (bpstats): New constructors.
1834         (bpstat_copy, bpstat_stop_status): Use new.
1835         (dprintf_after_condition_true): Update.
1836         * breakpoint.h (bpstats::bpstats): Add constructors.
1837         (bpstats::~bpstats): Add destructor.
1838
1839 2017-09-20  Pedro Alves  <palves@redhat.com>
1840
1841         * eval.c (make_params): Delete, refactored as ...
1842         (class fake_method): ... this new type's ctor.
1843         (fake_method::~fake_method): New.
1844         (evaluate_subexp_standard): Use 'fake_method'.
1845
1846 2017-09-20  Tom Tromey  <tom@tromey.com>
1847
1848         * windows-nat.c (get_windows_debug_event, windows_wait)
1849         (do_initial_windows_stuff, windows_attach): Update.
1850         * utils.c (vwarning, internal_vproblem): Update.
1851         (ui_unregister_input_event_handler_cleanup)
1852         (prepare_to_handle_input): Remove.
1853         (class scoped_input_handler): New.
1854         (defaulted_query, prompt_for_continue): Update.
1855         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1856         Update.
1857         * top.c (undo_terminal_modifications_before_exit): Update.
1858         * target/target.h (target_terminal_init, target_terminal_inferior)
1859         (target_terminal_ours): Don't declare.
1860         (class target_terminal): New.
1861         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1862         (target_terminal_ours_for_output)
1863         (make_cleanup_restore_target_terminal): Don't declare.
1864         (target_terminal_info): Remove.
1865         * target.c (enum terminal_state, terminal_state): Remove.
1866         (target_terminal::terminal_state): Define.
1867         (target_terminal::init): Rename from target_terminal_init.
1868         (target_terminal::inferior): Rename from
1869         target_terminal_inferior.
1870         (target_terminal::ours): Rename from target_terminal_ours.
1871         (target_terminal::ours_for_output): Rename from
1872         target_terminal_ours_for_output.
1873         (target_terminal::info): New method.
1874         (cleanup_restore_target_terminal)
1875         (make_cleanup_restore_target_terminal): Remove.
1876         * solib.c (handle_solib_event): Update.
1877         * remote.c (remote_serial_quit_handler): Update.
1878         (remote_terminal_inferior, remote_wait_as): Update.
1879         * record-full.c (record_full_wait_1): Update.
1880         * nto-procfs.c (procfs_create_inferior): Update.
1881         * nat/fork-inferior.c (startup_inferior): Update.
1882         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1883         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1884         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1885         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1886         (mi_breakpoint_created, mi_breakpoint_deleted)
1887         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1888         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1889         (mi_user_selected_context_changed, report_initial_inferior):
1890         Update.
1891         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1892         (linux_nat_terminal_inferior): Update.
1893         * infrun.c (follow_fork_inferior)
1894         (handle_vfork_child_exec_or_exit, do_target_resume)
1895         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1896         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1897         Update.
1898         * inflow.c (child_terminal_init, info_terminal_command): Update.
1899         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1900         (attach_command): Update.
1901         * infcall.c (call_thread_fsm_should_stop): Update.
1902         * gnu-nat.c (gnu_attach): Update.
1903         * extension.c (struct active_ext_lang_state)
1904         (restore_active_ext_lang): Update.
1905         * exceptions.c (print_flush): Update.
1906         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1907         (struct quit_handler_cleanup_data, restore_quit_handler)
1908         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1909         Remove.
1910         * cp-support.c (gdb_demangle): Update.
1911         * breakpoint.c (update_inserted_breakpoint_locations)
1912         (insert_breakpoint_locations, handle_jit_event)
1913         (disable_breakpoints_in_unloaded_shlib): Update.
1914         * annotate.c (annotate_breakpoints_invalid)
1915         (annotate_frames_invalid): Update.
1916
1917 2017-09-20  Tom Tromey  <tom@tromey.com>
1918
1919         * main.c (catch_command_errors): Rename from
1920         catch_command_errors_const.
1921         (captured_main_1): Update.
1922
1923 2017-09-20  Pedro Alves  <palves@redhat.com>
1924
1925         * cli/cli-cmds.c (list_command): Use print_sal_location.
1926         (print_sal_location): New function.
1927         (ambiguous_line_spec): Use print_sal_location.
1928         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1929         * symtab.c (find_function_start_sal): Likewise.
1930         * symtab.h (symtab_and_line::symbol): New field.
1931
1932 2017-09-20  Pedro Alves  <palves@redhat.com>
1933
1934         * linespec.c (minsym_found): Handle non-text minsyms.
1935         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1936
1937 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1938
1939         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1940         backslash.
1941
1942 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1943
1944         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1945         vmovups instead vmovaps.
1946         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1947
1948 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1949
1950         * NEWS (Changes since GDB 8.0): Add starti.
1951         * infcmd.c (enum run_break): New.
1952         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1953         case.
1954         (run_command): Use enum run_how.
1955         (start_command): Likewise.
1956         (starti_command): New function.
1957         (RUN_ARGS_HELP): New macro.
1958         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1959         commands.  Add starti command.
1960
1961 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1962
1963         * Makefile.in (monitor.o): Remove the rule.
1964
1965 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1966
1967         * annotate.h (struct annotate_arg_emitter): Use
1968         DISABLE_COPY_AND_ASSIGN.
1969         * common/refcounted-object.h (refcounted_object): Likewise.
1970         * completer.h (struct completion_result): Likewise.
1971         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1972         * filename-seen-cache.h (filename_seen_cache): Likewise.
1973         * gdbcore.h (thread_section_name): Likewise.
1974         * gdb_regex.h (compiled_regex): Likewise.
1975         * gdbthread.h (scoped_restore_current_thread): Likewise.
1976         * inferior.h (scoped_restore_current_inferior): Likewise.
1977         * jit.c (jit_reader): Likewise.
1978         * linespec.h (struct linespec_result): Likewise.
1979         * mi/mi-parse.h (struct mi_parse): Likewise.
1980         * nat/fork-inferior.c (execv_argv): Likewise.
1981         * progspace.h (scoped_restore_current_program_space): Likewise.
1982         * python/python-internal.h (class gdbpy_enter): Likewise.
1983         * regcache.h (regcache): Likewise.
1984         * target-descriptions.c (struct tdesc_reg): Likewise.
1985         (struct tdesc_type): Likewise.
1986         (struct tdesc_feature): Likewise.
1987         * ui-out.h (ui_out_emit_type): Likewise.
1988
1989 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1990
1991         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1992         label abort_expression.
1993
1994 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1995
1996         * common/buffer.c (buffer_xml_printf): Adjust.
1997         * common/xml-utils.c (xml_escape_text): Change return type to
1998         std::string, update code accordingly.
1999         * common/xml-utils.h (xml_escape_text): Change return type to
2000         std::string.
2001         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2002         * windows-tdep.c (windows_xfer_shared_library): Adjust.
2003         * unittests/xml-utils-selftests.c (test_xml_escape_text):
2004         Adjust.
2005
2006 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2007
2008         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2009         (SUBDIR_UNITTESTS_OBS): Add new object file.
2010         * unittests/xml-utils-selftests.c: New file.
2011
2012 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2013
2014         * common/selftest.h (selftest): New struct/interface.
2015         (register_test): Add name parameter, add new overload.
2016         (run_tests): Add filter parameter.
2017         (for_each_selftest_ftype): New typedef.
2018         (for_each_selftest): New declaration.
2019         * common/selftest.c (tests): Change type to
2020         map<string, unique_ptr<selftest>>.
2021         (simple_selftest): New struct.
2022         (register_test): New function.
2023         (register_test): Add name parameter and use it.
2024         (run_tests): Add filter parameter and use it.  Add prints.
2025         Adjust to vector -> map change.
2026         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2027         registering selftests.
2028         * arm-tdep.c (_initialize_arm_tdep): Likewise.
2029         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2030         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2031         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2032         * findvar.c (_initialize_findvar): Likewise.
2033         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2034         * maint.c (maintenance_selftest): Update call to run_tests.
2035         (maintenance_info_selftests): New function.
2036         (_initialize_maint_cmds): Register "maintenance info selftests"
2037         command.  Update "maintenance selftest" doc.
2038         * regcache.c (_initialize_regcache): Add names when registering
2039         selftests.
2040         * rust-exp.y (_initialize_rust_exp): Likewise.
2041         * selftest-arch.c (gdbarch_selftest): New struct.
2042         (gdbarch_tests): Remove.
2043         (register_test_foreach_arch): Add name parameter.  Call
2044         register_test.
2045         (tests_with_arch): Remove, move most content to
2046         gdbarch_selftest::operator().
2047         (_initialize_selftests_foreach_arch): Remove.
2048         * selftest-arch.h (register_test_foreach_arch): Add name
2049         parameter.
2050         (run_tests_with_arch): New declaration.
2051         * utils-selftests.c (_initialize_utils_selftests): Add names
2052         when registering selftests.
2053         * utils.c (_initialize_utils): Likewise.
2054         * unittests/array-view-selftests.c
2055         (_initialize_array_view_selftests): Likewise.
2056         * unittests/environ-selftests.c (_initialize_environ_selftests):
2057         Likewise.
2058         * unittests/function-view-selftests.c
2059         (_initialize_function_view_selftests): Likewise.
2060         * unittests/offset-type-selftests.c
2061         (_initialize_offset_type_selftests): Likewise.
2062         * unittests/optional-selftests.c
2063         (_initialize_optional_selftests): Likewise.
2064         * unittests/scoped_restore-selftests.c
2065         (_initialize_scoped_restore_selftests): Likewise.
2066         * NEWS: Document "maintenance selftest" and "maint info
2067         selftests".
2068
2069 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2070
2071         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2072         scoped_restore.
2073
2074 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2075
2076         * mi/mi-main.c (mi_load_progress): Make uiout variable
2077         a unique_ptr.
2078
2079 2017-09-15  Pedro Alves  <palves@redhat.com>
2080
2081         * compile/compile-c-types.c (convert_enum, convert_int)
2082         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2083
2084 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2085
2086         * dwarf2read.c (copy_string): Remove.
2087         (parse_macro_definition): Replace copy_string with savestring.
2088
2089 2017-09-15  Yao Qi  <yao.qi@linaro.org>
2090
2091         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2092         gdb_target_obs.
2093         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2094         Likewise.
2095         (i[34567]86-*-linux*): Likewise.
2096
2097 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2098
2099         * dwarf2expr.h (dwarf_stack_value): Add constructor.
2100         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2101         <stack>: Change type to std::vector.
2102         <stack_len, stack_allocated>: Remove.
2103         <grow_stack>: Remove.
2104         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2105         (dwarf_expr_context::~dwarf_expr_context): Remove.
2106         (dwarf_expr_context::grow_stack): Remove.
2107         (dwarf_expr_context::push): Adjust.
2108         (dwarf_expr_context::pop): Adjust.
2109         (dwarf_expr_context::fetch): Adjust.
2110         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2111         (dwarf_expr_context::stack_empty_p): Adjust.
2112         (dwarf_expr_context::execute_stack_op): Adjust.
2113
2114 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2115
2116         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2117         return type to bool.
2118         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2119
2120 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2121
2122         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2123         Change type to bool.
2124         (dwarf_stack_value) <in_stack_memory>: Likewise.
2125         (dwarf_expr_context) <push_address>: Change parameter type to
2126         bool.
2127         <fetch_in_stack_memory>: Change return type to bool.
2128         <push>: Change parameter type to bool.
2129         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2130         to bool.
2131         (dwarf_expr_context::push_address): Likewise.
2132         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2133         to bool.
2134         (dwarf_expr_context::execute_stack_op): Adjust.
2135         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2136
2137 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2138
2139         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2140         (struct dwarf_expr_context) <n_pieces>: Remove.
2141         <pieces>: Change type to std::vector.
2142         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2143         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2144         pieces.
2145         (dwarf_expr_context::add_piece): Adjust.
2146         * dwarf2loc.c (struct piece_closure): Initialize fields.
2147         <n_pieces>: Remove.
2148         <pieces>: Change type to std::vector.
2149         (allocate_piece_closure): Adjust, change parameter to
2150         std::vector rvalue and std::move it to piece_closure.
2151         (rw_pieced_value): Adjust.
2152         (check_pieced_synthetic_pointer): Adjust.
2153         (indirect_synthetic_pointer): Adjust.
2154         (coerce_pieced_ref): Adjust.
2155         (free_pieced_value_closure):  Adjust.  Use delete to free
2156         piece_closure.
2157         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2158         to allocate_piece_closure.
2159         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2160
2161 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2162
2163         * probe.h (probe_ops_cp): Remove typedef.
2164         (DEF_VEC_P (probe_ops_cp)): Remove.
2165         (all_probe_ops): Change type to std::vector.
2166         * probe.c (info_probes_for_ops): Adjust to vector change.
2167         (probe_linespec_to_ops): Likewise.
2168         (all_probe_ops): Change type to std::vector.
2169         (_initialize_probe): Adjust to vector change.
2170         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2171         * elfread.c (elf_get_probes): Likewise.
2172         * stap-probe.c (_initialize_stap_probe): Likewise.
2173
2174 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2175
2176         * probe.h (struct bound_probe): Define constructors.
2177         * probe.c (bound_probe_s): Remove typedef.
2178         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2179         (collect_probes): Change return type to std::vector, remove
2180         cleanup.
2181         (compare_probes): Return bool, change parameter type.  Change
2182         semantic to "less than".
2183         (gen_ui_out_table_header_info): Change parameter to std::vector
2184         and update.
2185         (exists_probe_with_pops): Likewise.
2186         (info_probes_for_ops): Update to std::vector change.
2187         (enable_probes_command): Likewise.
2188         (disable_probes_command): Likewise.
2189
2190 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2191
2192         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2193         vec to std::vector.
2194         * probe.c (parse_probes_in_pspace): Update.
2195         (find_probes_in_objfile): Update.
2196         (find_probe_by_pc): Update.
2197         (collect_probes): Update.
2198         (probe_any_get_probes): Update.
2199         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2200         return type to reference to std::vector.
2201         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2202         std::vector and update.
2203         (dtrace_process_dof): Likewise.
2204         (dtrace_get_probes): Likewise.
2205         * elfread.c (elf_get_probes): Change return type to std::vector,
2206         store an std::vector in bfd_data.
2207         (probe_key_free): Update to std::vector.
2208         * stap-probe.c (handle_stap_probe): Change parameter to
2209         std::vector and update.
2210         (stap_get_probes): Likewise.
2211         * symfile-debug.c (debug_sym_get_probes): Change return type to
2212         std::vector and update.
2213
2214 2017-09-11  Tom Tromey  <tom@tromey.com>
2215
2216         * breakpoint.c (program_breakpoint_here_p): Update.
2217         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2218         from make_show_memory_breakpoints_cleanup.  Return a
2219         scoped_restore_tmpl<int>.
2220         (restore_show_memory_breakpoints): Remove.
2221         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2222         * mem-break.c (memory_validate_breakpoint): Update.
2223         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2224         (ia64_memory_remove_breakpoint): Update.
2225         (ia64_breakpoint_from_pc): Update.
2226         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2227         from make_show_memory_breakpoints_cleanup.
2228
2229 2017-09-11  Tom Tromey  <tom@tromey.com>
2230
2231         * d-namespace.c (d_lookup_symbol): Use std::string.
2232         (find_symbol_in_baseclass): Likewise.
2233
2234 2017-09-11  Tom Tromey  <tom@tromey.com>
2235
2236         * ctf.c (ctf_start): Use std::string.
2237
2238 2017-09-11  Tom Tromey  <tom@tromey.com>
2239
2240         * ada-lang.c (is_known_support_routine): Update.
2241         (ada_unhandled_exception_name_addr_from_raise): Update.
2242         * guile/scm-frame.c (gdbscm_frame_name): Update.
2243         * python/py-frame.c (frapy_name): Update.
2244         (frapy_function): Update.
2245         * stack.h (find_frame_funname): Update.
2246         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2247         (print_frame): Update.
2248
2249 2017-09-11  Tom Tromey  <tom@tromey.com>
2250
2251         * findcmd.c (put_bits): Take a gdb::byte_vector.
2252         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2253         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2254         cleanups.
2255         (find_command): Update.
2256
2257 2017-09-11  Tom Tromey  <tom@tromey.com>
2258
2259         * cli/cli-script.c (class scoped_restore_hook_in): New.
2260         (clear_hook_in_cleanup): Remove.
2261         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2262         scoped_restore_hook_in.
2263
2264 2017-09-11  Tom Tromey  <tom@tromey.com>
2265
2266         * cli/cli-script.c (restore_interp): Remove.
2267         (read_command_lines): Use scoped_restore_interp.
2268         * interps.c (scoped_restore_interp::set_temp): Rename from
2269         interp_set_temp.
2270         * interps.h (class scoped_restore_interp): New.
2271         (interp_set_temp): Remove.
2272
2273 2017-09-11  Tom Tromey  <tom@tromey.com>
2274
2275         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2276         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2277         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2278         scoped_restore.
2279         (mi_cmd_break_insert_1): Update.
2280         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2281         scoped_restore.
2282
2283 2017-09-11  Tom Tromey  <tom@tromey.com>
2284
2285         * demangle.c (demangle_command): Update.
2286         * breakpoint.c (disable_command): Update.
2287         (enable_command): Update.
2288         (find_location_by_number): Make "number" const.  Use
2289         get_number_trailer.
2290         * cli/cli-utils.c (extract_arg): Return std::string.
2291         * probe.c (parse_probe_linespec): Update.  Change types.
2292         (collect_probes): Take string arguments.
2293         (parse_probe_linespec): Likewise.
2294         (info_probes_for_ops): Update.
2295         (enable_probes_command): Update.
2296         (disable_probes_command): Update.
2297         * break-catch-sig.c (catch_signal_split_args): Update.
2298         * mi/mi-parse.c (mi_parse): Update.
2299
2300 2017-09-11  Tom Tromey  <tom@tromey.com>
2301
2302         * language.h (language_enum): Make argument const.
2303         * language.c (language_enum): Make argument const.
2304
2305 2017-09-11  Tom Tromey  <tom@tromey.com>
2306
2307         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2308         as function.
2309         (skip_to_space): Rename from skip_to_space_const.
2310         * common/common-utils.c (skip_to_space): New function.
2311         (skip_to_space): Rename from skip_to_space_const.
2312         * cli/cli-utils.h (get_number): Rename from get_number_const.
2313         (extract_arg): Rename from extract_arg_const.
2314         * cli/cli-utils.c (get_number): Rename from get_number_const.
2315         (extract_arg): Rename from extract_arg_const.
2316         (number_or_range_parser::get_number): Use ::get_number.
2317         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2318         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2319         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2320         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2321         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2322         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2323         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2324         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2325
2326 2017-09-11  Tom Tromey  <tom@tromey.com>
2327
2328         * python/python.c (do_start_initialization): Use
2329         py-event-types.def to initialize types.
2330         Define all object type structures.
2331         * python/python-internal.h: Don't declare event initialization
2332         functions.
2333         * python/py-threadevent.c (thread_event_object_type): Don't
2334         define.
2335         * python/py-stopevent.c (stop_event_object_type): Don't define.
2336         * python/py-signalevent.c (signal_event_object_type): Don't
2337         declare or define.
2338         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2339         (clear_objfiles_event_object_type): Don't declare or define.
2340         * python/py-infevents.c (inferior_call_pre_event_object_type)
2341         (inferior_call_post_event_object_type)
2342         (register_changed_event_object_type)
2343         (memory_changed_event_object_type): Don't declare or define.
2344         * python/py-inferior.c (new_thread_event_object_type)
2345         (new_inferior_event_object_type)
2346         (inferior_deleted_event_object_type): Don't declare or define.
2347         * python/py-exitedevent.c (exited_event_object_type): Don't
2348         declare or define.
2349         * python/py-evts.c (gdbpy_initialize_py_events): Use
2350         py-all-events.def.
2351         * python/py-events.h (thread_event_object_type): Don't declare.
2352         (events_object): Use py-all-events.def.
2353         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2354         py-event-types.def.
2355         * python/py-event-types.def: New file.
2356         * python/py-continueevent.c (create_continue_event_object): Don't
2357         declare or define.
2358         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2359         declare or define.
2360         * python/py-all-events.def: New file.
2361
2362 2017-09-11  Tom Tromey  <tom@tromey.com>
2363
2364         * python/py-threadevent.c (create_thread_event_object): Return
2365         gdbpy_ref.
2366         * python/py-stopevent.h (create_stop_event_object)
2367         (create_breakpoint_event_object, create_signal_event_object):
2368         Update.
2369         * python/py-stopevent.c (create_stop_event_object): Return
2370         gdbpy_ref.
2371         (emit_stop_event): Update.
2372         * python/py-signalevent.c (create_signal_event_object): Return
2373         gdbpy_ref.
2374         * python/py-infevents.c (create_inferior_call_event_object):
2375         Update.
2376         * python/py-event.h (create_event_object)
2377         (create_thread_event_object): Update.
2378         * python/py-event.c (create_event_object): Return gdbpy_ref.
2379         * python/py-continueevent.c: Return gdbpy_ref.
2380         * python/py-bpevent.c (create_breakpoint_event_object): Return
2381         gdbpy_ref.
2382
2383 2017-09-11  Tom Tromey  <tom@tromey.com>
2384
2385         PR python/15622:
2386         * NEWS: Add entry.
2387         * python/python.c (do_start_initialization): Initialize new event
2388         types.
2389         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2390         (gdbpy_initialize_inferior_deleted_event)
2391         (gdbpy_initialize_new_thread_event): Declare.
2392         * python/py-threadevent.c (create_thread_event_object): Add option
2393         "thread" parameter.
2394         * python/py-inferior.c (new_thread_event_object_type)
2395         (new_inferior_event_object_type)
2396         (inferior_deleted_event_object_type): Declare.
2397         (python_new_inferior, python_inferior_deleted): New functions.
2398         (add_thread_object): Emit new_thread event.
2399         (gdbpy_initialize_inferior): Attach new functions to corresponding
2400         observers.
2401         (new_thread, new_inferior, inferior_deleted): Define new event
2402         types.
2403         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2404         registries.
2405         * python/py-events.h (events_object) <new_inferior,
2406         inferior_deleted, new_thread>: New fields.
2407         * python/py-event.h (create_thread_event_breakpoint): Add optional
2408         "thread" parameter.
2409
2410 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2411
2412         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2413         check current_ui instead.
2414         (internal_vproblem): Likewise.
2415
2416 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2417
2418         * thread.c (print_thread_info_1): Remove unnecessary calls to
2419         uiout->is_mi_like_p.
2420
2421 2017-09-09  Tom Tromey  <tom@tromey.com>
2422
2423         * namespace.h (add_using_directive): Update.
2424         * namespace.c (add_using_directive): Change type of excludes to
2425         std::vector.
2426         * dwarf2read.c (read_import_statement): Use std::vector.
2427         (read_namespace): Update.
2428         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2429
2430 2017-09-09  Tom Tromey  <tom@tromey.com>
2431
2432         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2433
2434 2017-09-09  Tom Tromey  <tom@tromey.com>
2435
2436         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2437
2438 2017-09-09  Tom Tromey  <tom@tromey.com>
2439
2440         * stack.c (func_command): Use gdb::def_vector.
2441
2442 2017-09-09  Tom Tromey  <tom@tromey.com>
2443
2444         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2445         ui_out_emit_list, ui_out_emit_tuple.
2446         (mi_cmd_var_update): Likewise.
2447
2448 2017-09-09  Tom Tromey  <tom@tromey.com>
2449
2450         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2451         ui_out_redirect_pop.
2452         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2453         ui_out_redirect_pop.
2454         * utils.c (do_ui_out_redirect_pop)
2455         (make_cleanup_ui_out_redirect_pop): Remove.
2456         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2457         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2458         * ui-out.h (ui_out_redirect_pop): New class.
2459
2460 2017-09-09  Tom Tromey  <tom@tromey.com>
2461
2462         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2463         (list_available_thread_groups, mi_cmd_list_thread_groups)
2464         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2465         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2466         Likewise.
2467
2468 2017-09-09  Tom Tromey  <tom@tromey.com>
2469
2470         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2471         ui_out_emit_tuple.
2472
2473 2017-09-09  Tom Tromey  <tom@tromey.com>
2474
2475         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2476         * stack.c (print_frame): Use ui_out_emit_tuple.
2477         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2478         (info_spu_mailbox_command, info_spu_dma_command)
2479         (info_spu_proxydma_command): Likewise.
2480         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2481         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2482         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2483         ui_out_emit_tuple.
2484         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2485
2486 2017-09-09  Tom Tromey  <tom@tromey.com>
2487
2488         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2489         (class ui_out_emit_table): Update comment.
2490         * ui-out.c (do_cleanup_table_end)
2491         (make_cleanup_ui_out_table_begin_end): Remove.
2492         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2493         (info_spu_dma_cmdlist): Likewise.
2494         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2495         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2496         ui_out_emit_table.
2497
2498 2017-09-09  Tom Tromey  <tom@tromey.com>
2499
2500         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2501         ui_out_emit_list, gdb::optional.
2502
2503 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2504
2505         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2506         prototype.
2507         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2508         prototype.
2509         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2510         prototype.
2511         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2512         * ada-exp.y: Remove _initialize_ada_exp prototype.
2513         * ada-lang.c: Remove _initialize_ada_language prototype.
2514         * ada-tasks.c: Remove _initialize_tasks prototype.
2515         * addrmap.c: Remove _initialize_addrmap prototype.
2516         * agent.c: Remove _initialize_agent prototype.
2517         * aix-thread.c: Remove _initialize_aix_thread prototype.
2518         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2519         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2520         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2521         prototype.
2522         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2523         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2524         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2525         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2526         prototype.
2527         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2528         prototype.
2529         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2530         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2531         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2532         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2533         prototype.
2534         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2535         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2536         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2537         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2538         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2539         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2540         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2541         prototype.
2542         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2543         prototype.
2544         * annotate.c: Remove _initialize_annotate prototype.
2545         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2546         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2547         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2548         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2549         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2550         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2551         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2552         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2553         prototype.
2554         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2555         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2556         * auto-load.c: Remove _initialize_auto_load prototype.
2557         * auxv.c: Remove _initialize_auxv prototype.
2558         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2559         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2560         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2561         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2562         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2563         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2564         prototype.
2565         * break-catch-throw.c: Remove _initialize_break_catch_throw
2566         prototype.
2567         * breakpoint.c: Remove _initialize_breakpoint prototype.
2568         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2569         * btrace.c: Remove _initialize_btrace prototype.
2570         * charset.c: Remove _initialize_charset prototype.
2571         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2572         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2573         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2574         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2575         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2576         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2577         * coffread.c: Remove _initialize_coffread prototype.
2578         * compile/compile.c: Remove _initialize_compile prototype.
2579         * complaints.c: Remove _initialize_complaints prototype.
2580         * completer.c: Remove _initialize_completer prototype.
2581         * copying.awk: Remove _initialize_copying prototype.
2582         * copying.c: Regenerate.
2583         * core-regset.c: Remove _initialize_core_regset prototype.
2584         * corefile.c: Remove _initialize_core prototype.
2585         * corelow.c: Remove _initialize_corelow prototype.
2586         * cp-abi.c: Remove _initialize_cp_abi prototype.
2587         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2588         * cp-support.c: Remove _initialize_cp_support prototype.
2589         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2590         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2591         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2592         * ctf.c: Remove _initialize_ctf prototype.
2593         * d-lang.c: Remove _initialize_d_language prototype.
2594         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2595         prototype.
2596         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2597         * dbxread.c: Remove _initialize_dbxread prototype.
2598         * dcache.c: Remove _initialize_dcache prototype.
2599         * demangle.c: Remove _initialize_demangler prototype.
2600         * disasm-selftests.c: Remove _initialize_disasm_selftests
2601         prototype.
2602         * disasm.c: Remove _initialize_disasm prototype.
2603         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2604         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2605         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2606         prototype.
2607         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2608         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2609         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2610         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2611         * elfread.c: Remove _initialize_elfread prototype.
2612         * exec.c: Remove _initialize_exec prototype.
2613         * extension.c: Remove _initialize_extension prototype.
2614         * f-lang.c: Remove _initialize_f_language prototype.
2615         * f-valprint.c: Remove _initialize_f_valprint prototype.
2616         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2617         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2618         * filesystem.c: Remove _initialize_filesystem prototype.
2619         * findcmd.c: Remove _initialize_mem_search prototype.
2620         * fork-child.c: Remove _initialize_fork_child prototype.
2621         * frame-base.c: Remove _initialize_frame_base prototype.
2622         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2623         * frame.c: Remove _initialize_frame prototype.
2624         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2625         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2626         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2627         * gcore.c: Remove _initialize_gcore prototype.
2628         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2629         * gdbarch.c: Regenerate.
2630         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2631         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2632         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2633         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2634         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2635         * go-lang.c: Remove _initialize_go_language prototype.
2636         * go32-nat.c: Remove _initialize_go32_nat prototype.
2637         * guile/guile.c: Remove _initialize_guile prototype.
2638         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2639         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2640         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2641         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2642         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2643         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2644         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2645         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2646         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2647         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2648         prototype.
2649         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2650         prototype.
2651         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2652         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2653         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2654         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2655         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2656         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2657         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2658         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2659         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2660         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2661         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2662         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2663         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2664         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2665         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2666         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2667         prototype.
2668         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2669         prototype.
2670         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2671         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2672         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2673         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2674         * infcall.c: Remove _initialize_infcall prototype.
2675         * infcmd.c: Remove _initialize_infcmd prototype.
2676         * inferior.c: Remove _initialize_inferiors prototype.
2677         * inflow.c: Remove _initialize_inflow prototype.
2678         * infrun.c: Remove _initialize_infrun prototype.
2679         * interps.c: Remove _initialize_interpreter prototype.
2680         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2681         * jit.c: Remove _initialize_jit prototype.
2682         * language.c: Remove _initialize_language prototype.
2683         * linux-fork.c: Remove _initialize_linux_fork prototype.
2684         * linux-nat.c: Remove _initialize_linux_nat prototype.
2685         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2686         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2687         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2688         * m2-lang.c: Remove _initialize_m2_language prototype.
2689         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2690         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2691         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2692         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2693         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2694         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2695         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2696         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2697         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
2698         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
2699         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2700         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2701         * machoread.c: Remove _initialize_machoread prototype.
2702         * macrocmd.c: Remove _initialize_macrocmd prototype.
2703         * macroscope.c: Remove _initialize_macroscope prototype.
2704         * maint.c: Remove _initialize_maint_cmds prototype.
2705         * mdebugread.c: Remove _initialize_mdebugread prototype.
2706         * memattr.c: Remove _initialize_mem prototype.
2707         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
2708         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
2709         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
2710         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
2711         * mi/mi-main.c: Remove _initialize_mi_main prototype.
2712         * microblaze-linux-tdep.c: Remove
2713         _initialize_microblaze_linux_tdep prototype.
2714         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
2715         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
2716         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
2717         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
2718         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
2719         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
2720         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
2721         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
2722         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
2723         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
2724         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
2725         prototype.
2726         * mipsread.c: Remove _initialize_mipsread prototype.
2727         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
2728         prototype.
2729         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
2730         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
2731         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
2732         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
2733         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
2734         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
2735         prototype.
2736         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
2737         * nto-procfs.c: Remove _initialize_procfs prototype.
2738         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
2739         * objc-lang.c: Remove _initialize_objc_language prototype.
2740         * objfiles.c: Remove _initialize_objfiles prototype.
2741         * observer.c: Remove observer_test_first_notification_function,
2742         observer_test_second_notification_function,
2743         observer_test_third_notification_function, and
2744         _initialize_observer prototypes.
2745         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
2746         * osabi.c: Remove _initialize_gdb_osabi prototype.
2747         * osdata.c: Remove _initialize_osdata prototype.
2748         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
2749         * parse.c: Remove _initialize_parse prototype.
2750         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
2751         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
2752         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
2753         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
2754         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
2755         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
2756         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2757         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2758         * printcmd.c: Remove _initialize_printcmd prototype.
2759         * probe.c: Remove _initialize_probe prototype.
2760         * proc-api.c: Remove _initialize_proc_api prototype.
2761         * proc-events.c: Remove _initialize_proc_events prototype.
2762         * proc-service.c: Remove _initialize_proc_service prototype.
2763         * procfs.c: Remove _initialize_procfs prototype.
2764         * psymtab.c: Remove _initialize_psymtab prototype.
2765         * python/python.c: Remove _initialize_python prototype.
2766         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2767         * record-btrace.c: Remove _initialize_record_btrace prototype.
2768         * record-full.c: Remove _initialize_record_full prototype.
2769         * record.c: Remove _initialize_record prototype.
2770         * regcache.c: Remove _initialize_regcache prototype.
2771         * reggroups.c: Remove _initialize_reggroup prototype.
2772         * remote-notif.c: Remove _initialize_notif prototype.
2773         * remote-sim.c: Remove _initialize_remote_sim prototype.
2774         * remote.c: Remove _initialize_remote prototype.
2775         * reverse.c: Remove _initialize_reverse prototype.
2776         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2777         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2778         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2779         prototype.
2780         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2781         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2782         * rust-exp.y: Remove _initialize_rust_exp prototype.
2783         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2784         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2785         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2786         * score-tdep.c: Remove _initialize_score_tdep prototype.
2787         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2788         prototype.
2789         * ser-go32.c: Remove _initialize_ser_dos prototype.
2790         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2791         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2792         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2793         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2794         * serial.c: Remove _initialize_serial prototype.
2795         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2796         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2797         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2798         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2799         * skip.c: Remove _initialize_step_skip prototype.
2800         * sol-thread.c: Remove _initialize_sol_thread prototype.
2801         * solib-aix.c: Remove _initialize_solib_aix prototype.
2802         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2803         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2804         * solib-frv.c: Remove _initialize_frv_solib prototype.
2805         * solib-spu.c: Remove _initialize_spu_solib prototype.
2806         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2807         * solib-target.c: Remove _initialize_solib_target prototype.
2808         * solib.c: Remove _initialize_solib prototype.
2809         * source.c: Remove _initialize_source prototype.
2810         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2811         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2812         prototype.
2813         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2814         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2815         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2816         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2817         prototype.
2818         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2819         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2820         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2821         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2822         prototype.
2823         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2824         prototype.
2825         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2826         prototype.
2827         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2828         prototype.
2829         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2830         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2831         prototype.
2832         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2833         prototype.
2834         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2835         prototype.
2836         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2837         prototype.
2838         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2839         prototype.
2840         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2841         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2842         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2843         * stabsread.c: Remove _initialize_stabsread prototype.
2844         * stack.c: Remove _initialize_stack prototype.
2845         * stap-probe.c: Remove _initialize_stap_probe prototype.
2846         * std-regs.c: Remove _initialize_frame_reg prototype.
2847         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2848         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2849         * symfile.c: Remove _initialize_symfile prototype.
2850         * symmisc.c: Remove _initialize_symmisc prototype.
2851         * symtab.c: Remove _initialize_symtab prototype.
2852         * target-dcache.c: Remove _initialize_target_dcache prototype.
2853         * target-descriptions.c: Remove _initialize_target_descriptions
2854         prototype.
2855         * thread.c: Remove _initialize_thread prototype.
2856         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2857         prototype.
2858         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2859         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2860         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2861         prototype.
2862         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2863         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2864         * tracefile.c: Remove _initialize_tracefile prototype.
2865         * tracepoint.c: Remove _initialize_tracepoint prototype.
2866         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2867         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2868         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2869         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2870         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2871         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2872         * tui/tui.c: Remove _initialize_tui prototype.
2873         * typeprint.c: Remove _initialize_typeprint prototype.
2874         * user-regs.c: Remove _initialize_user_regs prototype.
2875         * utils.c: Remove _initialize_utils prototype.
2876         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2877         * valarith.c: Remove _initialize_valarith prototype.
2878         * valops.c: Remove _initialize_valops prototype.
2879         * valprint.c: Remove _initialize_valprint prototype.
2880         * value.c: Remove _initialize_values prototype.
2881         * varobj.c: Remove _initialize_varobj prototype.
2882         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2883         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2884         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2885         * windows-nat.c: Remove _initialize_windows_nat,
2886         _initialize_check_for_gdb_ini, and _initialize_loadable
2887         prototypes.
2888         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2889         * xcoffread.c: Remove _initialize_xcoffread prototype.
2890         * xml-support.c: Remove _initialize_xml_support prototype.
2891         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2892         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2893         prototype.
2894         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2895         prototype.
2896         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2897
2898 2017-09-08  Keith Seitz  <keiths@redhat.com>
2899
2900         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2901         field.
2902
2903 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2904
2905         * f-valprint.c (f_val_print): Remove check for one byte
2906         sized integers. Remove printing of character type.
2907
2908 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2909             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2910             Bernhard Heckel  <bernhard.heckel@intel.com>
2911
2912         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2913         to maintain proper indentation when printing pointers/refs.
2914
2915 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2916
2917         GDB 8.0.1 released.
2918
2919 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2920
2921         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2922
2923 2017-09-05  Tom Tromey  <tom@tromey.com>
2924
2925         * parse.c (funcall_chain): Now a std::vector.
2926         (start_arglist, end_arglist): Simplify.
2927         (free_funcalls): Remove.
2928         (parse_exp_in_context_1): Remove cleanup.
2929
2930 2017-09-05  Tom Tromey  <tom@tromey.com>
2931
2932         * go-exp.y (go_parse): Don't create a cleanup.
2933
2934 2017-09-05  Tom Tromey  <tom@tromey.com>
2935
2936         * d-exp.y (PrimaryExpression): Use std::string.
2937         (d_parse): Don't create a cleanup.
2938
2939 2017-09-05  Tom Tromey  <tom@tromey.com>
2940
2941         * utils.c (do_clear_parser_state): Remove.
2942         (make_cleanup_clear_parser_state): Remove.
2943         * p-exp.y (pascal_parse): Use scoped_restore.
2944         * m2-exp.y (m2_parse): Use scoped_restore.
2945         * f-exp.y (f_parse): Use scoped_restore.
2946         * d-exp.y (d_parse): Use scoped_restore.
2947         * c-exp.y (c_parse): Use scoped_restore.
2948         * ada-exp.y (ada_parse): Use scoped_restore.
2949         * utils.h (make_cleanup_clear_parser_state): Remove.
2950
2951 2017-09-06  Keith Seitz  <keiths@redhat.com>
2952
2953         * dwarf2read.c (dw2_linkage_name_attr): New function.
2954         (dw2_linkage_name): New function.
2955         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2956         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2957         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2958
2959 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2960
2961         * config/djgpp/djconfig.sh: Correct shell portability issue.
2962
2963 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2964
2965         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2966
2967 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2968
2969         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2970         * NEWS: Mention new FreeBSD/mips native configuration.
2971         * configure.host: Add aarch64*-*-freebsd*.
2972         * configure.nat: Likewise.
2973         * aarch64-fbsd-nat.c: New file.
2974
2975 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2976
2977         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2978         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2979         * NEWS: Mention new FreeBSD/aarch64 target.
2980         * configure.tgt: Add aarch64*-*-freebsd*.
2981         * aarch64-fbsd-tdep.c: New file.
2982         * aarch64-fbsd-tdep.h: New file.
2983
2984 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2985
2986         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2987
2988 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2989
2990         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2991         of TLS symbols.
2992
2993 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2994
2995         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2996         call.
2997
2998 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2999
3000         * infrun.c (follow_exec): Call add_thread after
3001         target_find_description.
3002
3003 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3004
3005         * infrun.c (handle_inferior_event_1): When exec'ing, read
3006         stop_pc after follow_exec.
3007
3008 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3009
3010         * remote.c (process_g_packet): Update error message.
3011
3012 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3013
3014         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3015         targets.
3016
3017 2017-09-05  Pedro Alves  <palves@redhat.com>
3018
3019         * eval.c (eval_call, evaluate_funcall): New functions, factored
3020         out from ...
3021         (evaluate_subexp_standard): ... this.
3022
3023 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3024
3025         * amd64-tdep.c (amd64_target_description): Create target
3026         descriptions.
3027         (_initialize_amd64_tdep): Don't call functions
3028         initialize_tdesc_amd64_*.  Add self tests.
3029         * arch/amd64.c (amd64_create_target_description): Add parameter
3030         is_linux.  Call set_tdesc_osabi if is_linux is true.
3031         * arch/amd64.h (amd64_create_target_description): Update the
3032         declaration.
3033         * arch/i386.c (i386_create_target_description): Add parameter
3034         is_linux.  Call set_tdesc_osabi if is_linux is true.
3035         * arch/i386.h (i386_create_target_description): Update
3036         declaration.
3037         * configure.tgt: Add i386.o to gdb_target_obs.
3038         * features/Makefile (XMLTOC): Remove i386/*.xml.
3039         * features/i386/amd64-avx-avx512.c: Remove.
3040         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3041         * features/i386/amd64-avx-mpx.c: Remove.
3042         * features/i386/amd64-avx.c: Remove.
3043         * features/i386/amd64-mpx.c: Remove.
3044         * features/i386/amd64.c: Remove.
3045         * features/i386/i386-avx-avx512.c: Remove.
3046         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3047         * features/i386/i386-avx-mpx.c: Remove.
3048         * features/i386/i386-avx.c: Remove.
3049         * features/i386/i386-mmx.c: Remove.
3050         * features/i386/i386-mpx.c: Remove.
3051         * features/i386/i386.c: Remove.
3052         * i386-tdep.c: Don't include features/i386/i386*.c., include
3053         target-descriptions.h and arch/i386.h.
3054         (i386_target_description): Create target descriptions.
3055         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3056         functions.  Do self tests.
3057
3058 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3059
3060         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3061         * features/i386/amd64-avx-avx512-linux.c: Removed.
3062         * features/i386/amd64-avx-linux.c: Removed.
3063         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3064         * features/i386/amd64-avx-mpx-linux.c: Removed.
3065         * features/i386/amd64-linux.c: Removed.
3066         * features/i386/amd64-mpx-linux.c: Removed.
3067         * features/i386/x32-avx-avx512-linux.c: Removed.
3068         * features/i386/x32-avx-linux.c: Removed.
3069         * features/i386/x32-linux.c: Removed.
3070
3071 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3072
3073         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
3074         features/i386/*.c.
3075         (amd64_linux_read_description): Call
3076         amd64_create_target_description.
3077         * arch/amd64.c: New file.
3078         * arch/amd64.h: New file.
3079         * configure.tgt (x86_64-*-linux*): Append amd64.o.
3080         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3081
3082 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3083
3084         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3085         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
3086         (amd64_linux_read_description): Create target descriptions.
3087         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3088         functions.  Add unit tests.
3089         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3090         x32-core.xml.
3091         * features/i386/64bit-avx.c: Generated.
3092         * features/i386/64bit-avx512.c: Generated.
3093         * features/i386/64bit-core.c: Generated.
3094         * features/i386/64bit-linux.c: Generated.
3095         * features/i386/64bit-mpx.c: Generated.
3096         * features/i386/64bit-pkeys.c: Generated.
3097         * features/i386/64bit-segments.c: Generated.
3098         * features/i386/64bit-sse.c: Generated.
3099         * features/i386/x32-core.c: Generated.
3100         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3101         c files for amd64-linux and x32-linux.
3102
3103 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3104
3105         * amd64-linux-tdep.c (amd64_linux_read_description): New
3106         function.
3107         (amd64_linux_core_read_description): Call
3108         amd64_linux_read_description.
3109         (amd64_linux_init_abi): Likewise.
3110         (amd64_x32_linux_init_abi): Likewise.
3111         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3112         * x86-linux-nat.c (x86_linux_read_description): Call
3113         amd64_linux_read_description.
3114
3115 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3116
3117         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3118         comments.
3119
3120 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3121
3122         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3123         * features/i386/i386-avx-avx512-linux.c: Remove.
3124         * features/i386/i386-avx-linux.c: Remove.
3125         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3126         * features/i386/i386-avx-mpx-linux.c: Remove.
3127         * features/i386/i386-linux.c: Remove.
3128         * features/i386/i386-mmx-linux.c: Remove.
3129         * features/i386/i386-mpx-linux.c: Remove.
3130
3131 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3132
3133         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3134         (SFILES): Add arch/i386.c.
3135         (HFILES_NO_SRCDIR): Add arch/i386.h.
3136         * arch/i386.c: New file.
3137         * arch/i386.h: New file.
3138         * arch/tdesc.h (allocate_target_description): Declare.
3139         (set_tdesc_architecture): Declare.
3140         (set_tdesc_osabi): Declare.
3141         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3142         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3143         include arch/i386.h.
3144         (i386_linux_read_description): Remove code and call
3145         i386_create_target_description.
3146         (set_tdesc_architecture): New function.
3147         (set_tdesc_osabi): New function.
3148         * target-descriptions.h (allocate_target_description): Remove.
3149
3150 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3151
3152         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3153         * target-descriptions.c (tdesc_create_feature): Likewise, and
3154         adjust code.
3155         * features/i386/32bit-avx.c: Re-generated.
3156         * features/i386/32bit-avx512.c: Re-generated.
3157         * features/i386/32bit-core.c: Re-generated.
3158         * features/i386/32bit-linux.c: Re-generated.
3159         * features/i386/32bit-mpx.c: Re-generated.
3160         * features/i386/32bit-pkeys.c: Re-generated.
3161         * features/i386/32bit-sse.c: Re-generated.
3162
3163 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3164
3165         * regformats/regdef.h (struct reg): Override operator == and !=.
3166
3167 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3168
3169         * arch/tdesc.h: New file.
3170         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3171         * target-descriptions.c: Update comments.
3172         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3173         declarations.
3174         * features/i386/32bit-avx.c: Re-generated.
3175         * features/i386/32bit-avx512.c: Re-generated.
3176         * features/i386/32bit-core.c: Re-generated.
3177         * features/i386/32bit-linux.c: Re-generated.
3178         * features/i386/32bit-mpx.c: Re-generated.
3179         * features/i386/32bit-pkeys.c: Re-generated.
3180         * features/i386/32bit-sse.c: Re-generated.
3181
3182 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3183
3184         * regformats/regdat.sh: Update generated code.
3185
3186 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3187
3188         * regformats/regdat.sh: Adjust code order.
3189
3190 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3191
3192         * expprint.c (dump_subexp_body_standard): Use constant format
3193         string in fprintf_filtered call.
3194
3195 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3196
3197         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3198         NetBSD/i386.
3199         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3200
3201 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3202
3203         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3204
3205 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3206
3207         * bsd-kvm.o: Define _KMEMUSER.
3208         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3209         * configure: Regenerate.
3210
3211 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3212
3213         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3214         * i386-fbsd-nat.c: Likewise.
3215
3216 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3217
3218         * unittests/array-view-selftests.c: Add include of <array>.
3219
3220 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3221
3222         * spu-tdep.c (flush_ea_cache): Add missing argument to
3223         call_function_by_hand.
3224
3225 2017-09-04  Pedro Alves  <palves@redhat.com>
3226
3227         * NEWS (Safer support for debugging with no debug info): New.
3228
3229 2017-09-04  Pedro Alves  <palves@redhat.com>
3230
3231         * c-exp.y (function_method, function_method_void): Add current
3232         instance flags to TYPE_INSTANCE.
3233         * dwarf2read.c (check_modifier): New.
3234         (compute_delayed_physnames): Assert that only C++ adds delayed
3235         physnames.  Mark fn_fields as const/volatile depending on
3236         physname.
3237         * eval.c (make_params): New type_instance_flags parameter.  Use
3238         it as the new type's instance flags.
3239         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3240         flags element and pass it to make_params.
3241         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3242         instance flags element.
3243         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3244         * gdbtypes.h: Include "enum-flags.h".
3245         (type_instance_flags): New enum-flags type.
3246         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3247         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3248         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3249         (follow_type_instance_flags): New function.
3250         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3251         * parser-defs.h (follow_type_instance_flags): Declare.
3252         * valops.c (value_struct_elt_for_reference): const/volatile must
3253         match too.
3254
3255 2017-09-04  Pedro Alves  <palves@redhat.com>
3256
3257         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3258         function/method scopes; lookup the nested name as a function local
3259         static variable.
3260
3261 2017-09-04  Pedro Alves  <palves@redhat.com>
3262
3263         (%type <voidval>): Add function_method.
3264         * c-exp.y (exp): New production for calls with no arguments.
3265         (function_method, function_method_void_or_typelist): New
3266         productions.
3267         (exp): New production for "method()::static_var".
3268         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3269         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3270         Handle OP_FUNC_STATIC_VAR.
3271         * parse.c (operator_length_standard):
3272         Handle OP_FUNC_STATIC_VAR.
3273
3274 2017-09-04  Pedro Alves  <palves@redhat.com>
3275
3276         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3277         handling.
3278         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3279         Ditto.
3280         * parse.c (operator_length_standard, operator_check_standard):
3281         Ditto.
3282         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3283
3284 2017-09-04  Pedro Alves  <palves@redhat.com>
3285
3286         * ax-gdb.c: Include "typeprint.h".
3287         (gen_expr_for_cast): New function.
3288         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3289         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3290         type is unknown.
3291         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3292         nodebug_data_symbol.
3293         * eval.c: Include "typeprint.h".
3294         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3295         Error out if symbol has unknown type.
3296         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3297         evaluate_subexp_for_cast.
3298         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3299         OP_VAR_MSYM_VALUE.
3300         (evaluate_subexp_for_cast): New function.
3301         * gdbtypes.c (init_nodebug_var_type): New function.
3302         (objfile_type): Use it to initialize types of variables with no
3303         debug info.
3304         * typeprint.c (error_unknown_type): New.
3305         * typeprint.h (error_unknown_type): New declaration.
3306         * compile/compile-c-types.c (convert_type_basic): Handle
3307         TYPE_CODE_ERROR; warn and fallback to int for variables with
3308         unknown type.
3309
3310 2017-09-04  Pedro Alves  <palves@redhat.com>
3311
3312         * eval.c (evaluate_var_value): New function, factored out from ...
3313         (evaluate_subexp_standard): ... here.
3314
3315 2017-09-04  Pedro Alves  <palves@redhat.com>
3316
3317         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3318         Remove useless assignments to 'op'.
3319
3320 2017-09-04  Pedro Alves  <palves@redhat.com>
3321
3322         * eval.c (eval_skip_value): New function.
3323         (evaluate_subexp_standard): Use it.
3324
3325 2017-09-04  Pedro Alves  <palves@redhat.com>
3326
3327         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3328         function name from symbol/minsym and pass it to
3329         error_call_unknown_return_type.
3330
3331 2017-09-04  Pedro Alves  <palves@redhat.com>
3332
3333         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3334         * ax-gdb.c (gen_msym_var_ref): New function.
3335         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3336         * eval.c (evaluate_var_msym_value): New function.
3337         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3338         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3339         to call_function_by_hand.
3340         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3341         Handle OP_VAR_MSYM_VALUE.
3342         (union exp_element) <msymbol>: New field.
3343         * minsyms.h (struct type): Forward declare.
3344         (find_minsym_type_and_address): Declare.
3345         * parse.c (write_exp_elt_msym): New function.
3346         (write_exp_msymbol): Delete, refactored as ...
3347         (find_minsym_type_and_address): ... this new function.
3348         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3349         (operator_length_standard, operator_check_standard): Handle
3350         OP_VAR_MSYM_VALUE.
3351         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3352
3353 2017-09-04  Pedro Alves  <palves@redhat.com>
3354
3355         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3356         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3357         unknown.
3358         * ada-typeprint.c (print_func_type): Handle functions with unknown
3359         return type.
3360         * c-typeprint.c (c_type_print_base): Handle functions and methods
3361         with unknown return type.
3362         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3363         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3364         * compile/compile-c-types.c: Include "objfiles.h".
3365         (convert_func): For functions with unknown return type, warn and
3366         default to int.
3367         * compile/compile-object-run.c (compile_object_run): Adjust call
3368         to call_function_by_hand_dummy.
3369         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3370         call_function_by_hand.
3371         * eval.c (evaluate_subexp_standard): Adjust calls to
3372         call_function_by_hand.  Handle functions and methods with unknown
3373         return type.  Pass expect_type to call_function_by_hand.
3374         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3375         return type.
3376         * gcore.c (call_target_sbrk): Adjust call to
3377         call_function_by_hand.
3378         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3379         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3380         an integer address type instead of nodebug.
3381         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3382         call_function_by_hand.
3383         * infcall.c (error_call_unknown_return_type): New function.
3384         (call_function_by_hand): New "default_return_type" parameter.
3385         Pass it down.
3386         (call_function_by_hand_dummy): New "default_return_type"
3387         parameter.  Use it instead of defaulting to int.  If there's no
3388         default and the return type is unknown, throw an error.  If
3389         there's a default return type, and the called function has no
3390         debug info, then assume the function is prototyped.
3391         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3392         New "default_return_type" parameter.
3393         (error_call_unknown_return_type): New declaration.
3394         * linux-fork.c (call_lseek): Cast return type of lseek.
3395         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3396         call_function_by_hand.
3397         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3398         calls to call_function_by_hand.
3399         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3400         return type.
3401         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3402         (value_nsstring, print_object_command): Adjust calls to
3403         call_function_by_hand.
3404         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3405         functions with unknown return type.
3406         (pascal_type_print_func_varspec_suffix): New function.
3407         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3408         TYPE_CODE_METHOD>: Use it.
3409         * python/py-value.c (valpy_call): Adjust call to
3410         call_function_by_hand.
3411         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3412         call_function_by_hand.
3413         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3414         call_function_by_hand.
3415         * valops.c (value_allocate_space_in_inferior): Adjust call to
3416         call_function_by_hand.
3417         * typeprint.c (type_print_unknown_return_type): New function.
3418         * typeprint.h (type_print_unknown_return_type): New declaration.
3419
3420 2017-09-04  Pedro Alves  <palves@redhat.com>
3421
3422         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3423         types with more than one parameter as prototyped.
3424
3425 2017-09-04  Pedro Alves  <palves@redhat.com>
3426
3427         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3428         (disassemble_command): Use gdb_disassembly_flags instead of bare
3429         int.
3430         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3431         (dump_insns, do_mixed_source_and_assembly_deprecated)
3432         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3433         Use gdb_disassembly_flags instead of bare int.
3434         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3435         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3436         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3437         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3438         (enum gdb_disassembly_flag): ... values of this new enumeration.
3439         (gdb_disassembly_flags): Define.
3440         (gdb_disassembly)
3441         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3442         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3443         gdb_disassembly_flags instead of bare int.
3444         * record-btrace.c (btrace_insn_history)
3445         (record_btrace_insn_history, record_btrace_insn_history_range)
3446         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3447         instead of bare int.
3448         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3449         Use gdb_disassembly_flags instead of bare int.
3450         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3451         Define.
3452         * target-delegates.c: Regenerate.
3453         * target.c (target_insn_history, target_insn_history_from)
3454         (target_insn_history_range): Use gdb_disassembly_flags instead of
3455         bare int.
3456         * target.h: Include "disasm.h".
3457         (struct target_ops) <to_insn_history, to_insn_history_from,
3458         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3459         int.
3460         (target_insn_history, target_insn_history_from)
3461         (target_insn_history_range): Use gdb_disassembly_flags instead of
3462         bare int.
3463
3464 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3465
3466         * cli/cli-script.c (build_command_line): For if/while commands,
3467         check whether args is empty.
3468
3469 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3470
3471         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3472         (enum command_control_type): Likewise.
3473         (struct command_line): Likewise.
3474         (free_command_lines): Likewise.
3475         (struct command_lines_deleter): Likewise.
3476         (command_line_up): Likewise.
3477         (read_command_lines): Likewise.
3478         (read_command_lines_1): Likewise.
3479         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3480         (enum command_control_type): Likewise.
3481         (struct command_line): Likewise.
3482         (free_command_lines): Likewise.
3483         (struct command_lines_deleter): Likewise.
3484         (command_line_up): Likewise.
3485         (read_command_lines): Likewise.
3486         (read_command_lines_1): Likewise.
3487         * breakpoint.h: Include cli/cli-script.h.
3488         * extension-priv.h: Likewise.
3489         * gdbcmd.h: Likewise.
3490
3491 2017-09-04  Pedro Alves  <palves@redhat.com>
3492
3493         * ada-lang.c (is_known_support_routine): Move sal declaration to
3494         where it is initialized.
3495         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3496         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3497         (clear_command, update_static_tracepoint): Remove init_sal
3498         references.  Move declarations closer to initializations.
3499         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3500         initializations.
3501         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3502         references.  Move sal declarations closer to initializations.
3503         * frame.c (find_frame_sal): Return a symtab_and_line via function
3504         return instead of output parameter.  Remove init_sal references.
3505         * frame.h (find_frame_sal): Return a symtab_and_line via function
3506         return instead of output parameter.
3507         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3508         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3509         instead of memset.
3510         (gdbscm_find_pc_line): Remove init_sal reference.
3511         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3512         references.  Move declarations closer to initializations.
3513         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3514         initializations.
3515         (finish_backward): Remove init_sal references.  Move declarations
3516         closer to initializations.
3517         * infrun.c (process_event_stop_test, handle_step_into_function)
3518         (insert_hp_step_resume_breakpoint_at_frame)
3519         (insert_step_resume_breakpoint_at_caller): Likewise.
3520         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3521         (symbol_to_sal): Likewise.
3522         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3523         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3524         to its initialization.
3525         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3526         init_sal references.  Move declarations closer to initializations.
3527         * source.c (get_current_source_symtab_and_line): Remove brace
3528         initialization.
3529         (set_current_source_symtab_and_line): Now takes the sal by const
3530         reference.  Remove brace initialization.
3531         (line_info): Remove init_sal reference.
3532         * source.h (set_current_source_symtab_and_line): Now takes a
3533         symtab_and_line via const reference.
3534         * stack.c (set_current_sal_from_frame): Adjust.
3535         (print_frame_info): Adjust.
3536         (get_last_displayed_sal): Return the sal via function return
3537         instead of via output parameter.  Simplify.
3538         (frame_info): Adjust.
3539         * stack.h (get_last_displayed_sal): Return the sal via function
3540         return instead of via output parameter.
3541         * symtab.c (init_sal): Delete.
3542         (find_pc_sect_line): Remove init_sal references.  Move
3543         declarations closer to initializations.
3544         (find_function_start_sal): Remove init_sal references.  Move
3545         declarations closer to initializations.
3546         * symtab.h (struct symtab_and_line): In-class initialize all
3547         fields.
3548         * tracepoint.c (set_traceframe_context)
3549         (print_one_static_tracepoint_marker): Remove init_sal references.
3550         Move declarations closer to initializations.
3551         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3552         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3553         declarations closer to initializations.
3554         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3555         init_sal references.  Adjust.
3556
3557 2017-09-04  Pedro Alves  <palves@redhat.com>
3558
3559         * ax-gdb.c (agent_command_1): Use range-for.
3560         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3561         * breakpoint.c: Include "common/array-view.h".
3562         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3563         parameter from struct symtabs_and_lines to
3564         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3565         (breakpoint_sals_to_pc): Change sals parameter from struct
3566         symtabs_and_lines to std::vector reference.
3567         (check_fast_tracepoint_sals): Change sals parameter from struct
3568         symtabs_and_lines to std::array_view.  Use range-for.
3569         (decode_static_tracepoint_spec): Return a std::vector instead of
3570         symtabs_and_lines.  Update.
3571         (create_breakpoint): Update.
3572         (break_range_command, until_break_command, clear_command): Update.
3573         (base_breakpoint_decode_location, bkpt_decode_location)
3574         (bkpt_probe_create_sals_from_location)
3575         (bkpt_probe_decode_location, tracepoint_decode_location)
3576         (tracepoint_probe_decode_location)
3577         (strace_marker_create_sals_from_location): Return a std::vector
3578         instead of symtabs_and_lines.
3579         (strace_marker_create_breakpoints_sal): Update.
3580         (strace_marker_decode_location): Return a std::vector instead of
3581         symtabs_and_lines.  Update.
3582         (update_breakpoint_locations): Change struct symtabs_and_lines
3583         parameters to gdb::array_view.  Adjust.
3584         (location_to_sals): Return a std::vector instead of
3585         symtabs_and_lines.  Update.
3586         (breakpoint_re_set_default): Use std::vector instead of struct
3587         symtabs_and_lines.
3588         (decode_location_default): Return a std::vector instead of
3589         symtabs_and_lines.  Update.
3590         * breakpoint.h: Include "common/array-view.h".
3591         (struct breakpoint_ops) <decode_location>: Now returns a
3592         std::vector instead of returning a symtabs_and_lines via output
3593         parameter.
3594         (update_breakpoint_locations): Change sals parameters to use
3595         gdb::array_view.
3596         * cli/cli-cmds.c (edit_command, list_command): Update to use
3597         std::vector and gdb::array_view.
3598         (ambiguous_line_spec): Adjust to use gdb::array_view and
3599         range-for.
3600         (compare_symtabs): Rename to ...
3601         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3602         const reference and adjust.
3603         (filter_sals): Rewrite using std::vector and standard algorithms.
3604         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3605         (jump_command): Update to use std::vector.
3606         * linespec.c (struct linespec_state) <canonical_names>: Update
3607         comment.
3608         (add_sal_to_sals_basic): Delete.
3609         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3610         (decode_line_2, create_sals_line_offset)
3611         (convert_address_location_to_sals, convert_linespec_to_sals)
3612         (convert_explicit_location_to_sals, parse_linespec)
3613         (event_location_to_sals, decode_line_full, decode_line_1)
3614         (decode_line_with_current_source)
3615         (decode_line_with_last_displayed, decode_objc)
3616         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3617         (linespec_result::~linespec_result): Adjust to use std::vector
3618         instead of symtabs_and_lines.
3619         * linespec.h (linespec_sals::sals): Now a std::vector.
3620         (struct linespec_result): Use std::vector, bool, and in-class
3621         initialization.
3622         (decode_line_1, decode_line_with_current_source)
3623         (decode_line_with_last_displayed): Return std::vector.
3624         * macrocmd.c (info_macros_command): Use std::vector.
3625         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3626         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3627         std::vector.
3628         * probe.h (parse_probes): Return a std::vector.
3629         * python/python.c (gdbpy_decode_line): Use std::vector and
3630         gdb::array_view.
3631         * source.c (select_source_symtab, line_info): Use std::vector.
3632         * stack.c (func_command): Use std::vector.
3633         * symtab.h (struct symtabs_and_lines): Delete.
3634         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3635
3636 2017-09-04  Pedro Alves  <palves@redhat.com>
3637
3638         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3639         unittests/array-view-selftests.c.
3640         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3641         * common/array-view.h: New file.
3642         * unittests/array-view-selftests.c: New file.
3643
3644 2017-09-04  Pedro Alves  <palves@redhat.com>
3645
3646         * cli/cli-cmds.c (edit_command): Pass message to
3647         ambiguous_line_spec.
3648         (list_command): Pass message to ambiguous_line_spec.  Say
3649         "first"/"last" instead of "start" and "end" to be consistent with
3650         the manual.
3651         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3652         them to print formatted message.
3653
3654 2017-09-04  Pedro Alves  <palves@redhat.com>
3655
3656         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3657         ftrace_update_insns by reference instead of pointer.
3658
3659 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3660
3661         * i386-go32-tdep.c: Include x86-xstate.h.
3662         (i386_go32_init_abi): Call i386_target_description.
3663         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3664         if xcr0 is X86_XSTATE_X87_MASK.
3665         * i386-tdep.h (tdesc_i386): Remove the declaration.
3666         (tdesc_i386_mmx): Likewise.
3667
3668 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3669
3670         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3671         X86_XSTATE_SSE_MASK instead of 0.
3672
3673 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3674
3675         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3676         i386_target_description.
3677         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3678         i386_target_description.
3679         * i386-tdep.c (i386_gdbarch_init): Likewise.
3680
3681 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3682
3683         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3684         (x86_darwin_init_abi_64): Call amd64_target_description.
3685         * amd64-dicos-tdep.c: Likewise.
3686         * amd64-fbsd-nat.c: Likewise.
3687         * amd64-fbsd-tdep.c: Likewise.
3688         * amd64-nbsd-tdep.c: Likewise.
3689         * amd64-obsd-tdep.c: Likewise.
3690         * amd64-sol2-tdep.c: Likewise.
3691         * amd64-windows-tdep.c: Likewise.
3692         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3693
3694 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3695
3696         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3697         (btrace_function) <insn>: Change type to use std::vector.
3698         * btrace.c (ftrace_debug, ftrace_call_num_insn,
3699         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
3700         ftrace_update_insns, ftrace_compute_global_level_offset,
3701         btrace_stitch_bts, btrace_clear, btrace_insn_get,
3702         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
3703         change to std::vector.
3704         (ftrace_update_insns): Adjust to change to std::vector, change
3705         type of INSN parameter.
3706         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
3707         * record-btrace.c (btrace_call_history_insn_range,
3708         btrace_compute_src_line_range,
3709         record_btrace_frame_prev_register): Adjust to change to
3710         std::vector.
3711         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
3712         to change to std::vector.
3713
3714 2017-09-03  Tom Tromey  <tom@tromey.com>
3715
3716         * corefile.c (reopen_exec_file): Use std::string.
3717
3718 2017-09-03  Tom Tromey  <tom@tromey.com>
3719
3720         * compile/compile.c (compile_register_name_mangled): Return
3721         std::string.
3722         * compile/compile-loc2c.c (pushf_register_address): Update.
3723         (pushf_register): Update.
3724         * compile/compile-c-types.c (convert_array): Update.
3725         * compile/compile-c-symbols.c (generate_vla_size): Update.
3726         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
3727         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
3728         (convert_one_symbol): Update.
3729         (generate_c_for_for_one_variable): Update.
3730         * compile/compile-c-support.c (c_get_range_decl_name): Return a
3731         std::string.
3732         (generate_register_struct): Update.
3733         * compile/compile-internal.h (c_get_range_decl_name): Return a
3734         std::string.
3735         (compile_register_name_mangled): Return std::string.
3736
3737 2017-09-03  Tom Tromey  <tom@tromey.com>
3738
3739         * utils.c (perror_string): Return a std::string.
3740         (throw_perror_with_name, perror_warning_with_name): Update.
3741
3742 2017-09-03  Tom Tromey  <tom@tromey.com>
3743
3744         * demangle.c (demangle_command): Use std::string,
3745         unique_xmalloc_ptr.
3746
3747 2017-09-03  Tom Tromey  <tom@tromey.com>
3748
3749         * cli/cli-setshow.c (do_set_command): Use std::string.
3750
3751 2017-09-03  Tom Tromey  <tom@tromey.com>
3752
3753         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
3754
3755 2017-09-03  Tom Tromey  <tom@tromey.com>
3756
3757         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3758
3759 2017-09-03  Tom Tromey  <tom@tromey.com>
3760
3761         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3762         gdb::unique_xmalloc_ptr.
3763
3764 2017-09-03  Tom Tromey  <tom@tromey.com>
3765
3766         * thread.c (print_thread_info_1): Use string_printf.
3767         (thread_apply_command, thread_apply_all_command): Use
3768         std::string.
3769
3770 2017-09-03  Tom Tromey  <tom@tromey.com>
3771
3772         * valprint.c (val_print_string): Update.
3773         * gdbcore.h (memory_error_message): Return std::string.
3774         * corefile.c (memory_error_message): Return std::string.
3775         (memory_error): Update.
3776         * breakpoint.c (insert_bp_location): Update.
3777
3778 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3779
3780         * target/waitstatus.h (target_waitstatus_to_string): Change
3781         return type to std::string.
3782         * target/waitstatus.c (target_waitstatus_to_string): Return
3783         std::string.
3784         * target.h (target_waitstatus_to_string): Remove declaration.
3785         * infrun.c (resume, clear_proceed_status_thread,
3786         print_target_wait_results, do_target_wait, save_waitstatus,
3787         stop_all_threads): Adjust.
3788         * record-btrace.c (record_btrace_wait): Adjust.
3789         * target-debug.h
3790         (target_debug_print_struct_target_waitstatus_p): Adjust.
3791
3792 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3793
3794         PR gdb/22046
3795         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3796         detection.
3797
3798 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3799
3800         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3801         for setting/unsetting environment variables on the remote target.
3802         (New remote packets): Add entries for QEnvironmentHexEncoded,
3803         QEnvironmentUnset and QEnvironmentReset.
3804         * common/environ.c (gdb_environ::operator=): Extend method to
3805         handle m_user_set_env_list and m_user_unset_env_list.
3806         (gdb_environ::clear): Likewise.
3807         (match_var_in_string): Change type of first parameter from 'char
3808         *' to 'const char *'.
3809         (gdb_environ::set): Extend method to handle
3810         m_user_set_env_list and m_user_unset_env_list.
3811         (gdb_environ::unset): Likewise.
3812         (gdb_environ::clear_user_set_env): New method.
3813         (gdb_environ::user_set_envp): Likewise.
3814         (gdb_environ::user_unset_envp): Likewise.
3815         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3816         m_user_unset_env_list on move constructor/assignment.
3817         (unset): Add new default parameter 'update_unset_list = true'.
3818         (clear_user_set_env): New method.
3819         (user_set_envp): Likewise.
3820         (user_unset_envp): Likewise.
3821         (m_user_set_env_list): New std::set.
3822         (m_user_unset_env_list): Likewise.
3823         * common/rsp-low.c (hex2str): New function.
3824         (bin2hex): New overload for bin2hex function.
3825         * common/rsp-low.c (hex2str): New prototype.
3826         (str2hex): New overload prototype.
3827         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3828         QEnvironmentUnset and QEnvironmentReset.
3829         (remote_protocol_features): Add QEnvironmentHexEncoded,
3830         QEnvironmentUnset and QEnvironmentReset packets.
3831         (send_environment_packet): New function.
3832         (extended_remote_environment_support): Likewise.
3833         (extended_remote_create_inferior): Call
3834         extended_remote_environment_support.
3835         (_initialize_remote): Add QEnvironmentHexEncoded,
3836         QEnvironmentUnset and QEnvironmentReset packet configs.
3837         * unittests/environ-selftests.c (gdb_selftest_env_var):
3838         New variable.
3839         (test_vector_initialization): New function.
3840         (test_init_from_host_environ): Likewise.
3841         (test_reinit_from_host_environ): Likewise.
3842         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3843         Likewise.
3844         (test_unset_set_empty_vector): Likewise.
3845         (test_vector_clear): Likewise.
3846         (test_std_move): Likewise.
3847         (test_move_constructor):
3848         (test_self_move): Likewise.
3849         (test_set_unset_reset): Likewise.
3850         (run_tests): Rewrite in terms of the functions above.
3851
3852 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3853
3854         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3855         (adi_available): Use a temp variable of type CORE_ADDR as argument
3856         3 when calling target_auxv_search.
3857         (adi_normalize_address): Use masks and xor operators to calculate
3858         normalized address.
3859         (adi_read_versions, adi_write_versions, adi_print_versions)
3860         (do_examine, do_assign): Use paddress.
3861
3862 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3863
3864         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3865         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3866         out of loop and add supply of FIR.
3867         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3868         add collect of FIR.
3869
3870 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3871
3872         PR gdb/21827
3873         * cli/cli-script.c (define_command): Don't convert command name
3874         to lower case.
3875
3876 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3877
3878         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3879         Update all callers accordingly. Remove all code blocks handling
3880         the case where DISPP is not NULL.
3881
3882 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3883
3884         PR symtab/22003
3885         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3886         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3887         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3888
3889 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3890
3891         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3892         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3893         (read_comp_units_from_section): New parameter abbrev_section, use
3894         read_and_check_comp_unit_head, allocate signatured_type if needed.
3895         (create_all_comp_units): Update read_comp_units_from_section caller.
3896
3897 2017-08-23  Pedro Alves  <palves@redhat.com>
3898
3899         PR remote/21852
3900         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3901         to null_ptid and switch to thread without reading the registers
3902         after adding the inferior.
3903
3904 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3905
3906         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3907         compile-gcc.
3908         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3909         (compile_to_object): Implement compile_gcc.
3910         (_initialize_compile): Install "set compile-gcc".  Initialize
3911         compile_gcc.
3912
3913 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3914
3915         * compile/compile.c (compile_to_object): Conditionally call
3916         set_verbose.  Conditionally call compile or compile_v0.
3917
3918 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3919
3920         * sparc64-tdep.h: (adi_normalize_address): New export.
3921         * sparc-nat.h: (open_adi_tag_fd): New export.
3922         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3923         * sparc64-linux-tdep.c:
3924         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3925         (sparc64_linux_handle_segmentation_fault): New function.
3926         (sparc64_linux_init_abi): Register
3927         sparc64_linux_handle_segmentation_fault
3928         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3929         (sparc64_addr_bits_remove): New function.
3930         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3931         (MAX_PROC_NAME_SIZE): New macro.
3932         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3933         (sparc64adilist): New variable.
3934         (adi_proc_list): New variable.
3935         (find_adi_info): New function.
3936         (add_adi_info): New function.
3937         (get_adi_info_proc): New function.
3938         (get_adi_info): New function.
3939         (info_adi_command): New function.
3940         (read_maps_entry): New function.
3941         (adi_available): New function.
3942         (adi_normalize_address): New function.
3943         (adi_align_address): New function.
3944         (adi_convert_byte_count): New function.
3945         (adi_tag_fd): New function.
3946         (adi_is_addr_mapped): New function.
3947         (adi_read_versions): New function.
3948         (adi_write_versions): New function.
3949         (adi_print_versions): New function.
3950         (do_examine): New function.
3951         (do_assign): New function.
3952         (adi_examine_command): New function.
3953         (adi_assign_command): New function.
3954         (_initialize_sparc64_adi_tdep): New function.
3955
3956 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3957
3958         * breakpoint.c (breakpoints_info): Rename to ...
3959         (info_breakpoints_command): ... this.
3960         (watchpoints_info): Rename to ...
3961         (info_watchpoints_command): ... this.
3962         (tracepoints_info): Rename to ...
3963         (info_tracepoints_command): ... this.
3964         (_initialize_breakpoint): Adjust.
3965         * dcache.c (dcache_info): Rename to ...
3966         (info_display_command): ... this.
3967         (_initialize_dcache): Adjust.
3968         * frame.h (args_info): Rename to ...
3969         (info_args_command): ... this.
3970         (locals_info): Rename to ...
3971         (info_locals_command): ... this.
3972         * infcmd.c (nofp_registers_info): Rename to ...
3973         (info_registers_command): ... this.
3974         (float_info): Rename to ...
3975         (info_float_command): ... this.
3976         (program_info): Rename to ...
3977         (info_program_command): ... this.
3978         (all_registers_info): Rename to ...
3979         (info_all_registers_command): ... this.
3980         (vector_info): Rename to ...
3981         (info_vector_command): ... this.
3982         (float_info): Rename to ...
3983         (info_float_command): ... this.
3984         (_initialize_infcmd): Adjust.
3985         * inferior.h (term_info): Rename to ...
3986         (info_terminal_command): ... this.
3987         * inflow.c (term_info): Rename to ...
3988         (info_terminal_command): ... this.
3989         (_initialize_inflow): Adjust.
3990         * infrun.c (signals_info): Rename to ...
3991         (info_signals_command): ... this.
3992         (_initialize_infrun): Adjust.
3993         * objc-lang.c (classes_info): Rename to ...
3994         (info_classes_command): ... this.
3995         (selectors_info): Rename to ...
3996         (info_selectors_command): ... this.
3997         (_initialize_objc_language): Adjust.
3998         * printcmd.c (sym_info): Rename to ...
3999         (info_symbol_command): ... this.
4000         (address_info): Rename to ...
4001         (info_address_command): ... this.
4002         (display_info): Rename to ...
4003         (info_display_command): ... this.
4004         (_initialize_printcmd): Adjust.
4005         * reverse.c (bookmarks_info): Rename to ...
4006         (info_breakpoints_command): ... this.
4007         (_initialize_reverse): Adjust.
4008         * ser-go32.c (dos_info): Rename to ...
4009         (info_serial_command): ... this.
4010         (_initialize_ser_dos): Adjust.
4011         * skip.c (skip_info): Rename to ...
4012         (info_skip_command): ... this.
4013         (_initialize_step_skip): Adjust.
4014         * source.c (line_info): Rename to ...
4015         (info_line_command): ... this.
4016         (source_info): Rename to ...
4017         (info_source_command)
4018         * stack.c (frame_info): Rename to ...
4019         (info_frame_command): ... this.
4020         (locals_info): Rename to ...
4021         (info_locals_command): ... this.
4022         (args_info): Rename to ...
4023         (info_args_command): ... this.
4024         (_initialize_stack): Adjust.
4025         * symtab.c (sources_info): Rename to ...
4026         (info_sources_command): ... this.
4027         (variables_info): Rename to ...
4028         (info_variables_command): ... this.
4029         (functions_info): Rename to ...
4030         (info_functions_command): ... this.
4031         (types_info): Rename to ...
4032         (info_types_command): ... this.
4033         (_initialize_symtab): Adjust.
4034         * target.c (target_info): Rename to ...
4035         (info_target_command): ... this.
4036         (initialize_targets): Adjust.
4037         * tracepoint.c (tvariables_info): Rename to ...
4038         (info_tvariables_command): ... this.
4039         (scope_info): Rename to ...
4040         (info_scope_command): ... this.
4041         (trace_dump_actions): Adjust.
4042         (_initialize_tracepoint): Adjust.
4043
4044 2017-08-22  Tom Tromey  <tom@tromey.com>
4045
4046         * breakpoint.h (install_breakpoint): Update.
4047         * breakpoint.c (add_solib_catchpoint): Update.
4048         (install_breakpoint): Change argument to a std::unique_ptr.
4049         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4050         (create_breakpoint_sal, create_breakpoint): Update.
4051         (watch_command_1, catch_exec_command_1)
4052         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4053         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4054         Return the breakpoint.
4055         (set_raw_breakpoint_without_location, set_raw_breakpoint)
4056         (new_single_step_breakpoint): Update.
4057         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4058         std::unique_ptr.
4059         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4060         std::unique_ptr.
4061         * break-catch-sig.c (create_signal_catchpoint): Use
4062         std::unique_ptr.
4063         * ada-lang.c (create_ada_exception_catchpoint): Use
4064         std::unique_ptr.
4065
4066 2017-08-22  Tom Tromey  <tom@tromey.com>
4067
4068         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4069
4070 2017-08-22  Tom Tromey  <tom@tromey.com>
4071
4072         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4073         (lookup_partial_symbol): Update.
4074
4075 2017-08-22  Tom Tromey  <tom@tromey.com>
4076
4077         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4078         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4079         (find_and_open_source, symtab_to_fullname): Update.
4080         * psymtab.c (psymtab_to_fullname): Update.
4081
4082 2017-08-22  Tom Tromey  <tom@tromey.com>
4083
4084         * exec.c (exec_file_attach): Update.
4085         * linux-thread-db.c (try_thread_db_load): Update.
4086         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4087         * utils.c (gdb_realpath): Change return type.
4088         (gdb_realpath_keepfile): Update.
4089         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4090         (_initialize_utils): Register the new self test.
4091         * source.c (openp): Update.
4092         (find_and_open_source): Update.
4093         * nto-tdep.c (nto_find_and_open_solib): Update.
4094         * main.c (set_gdb_data_directory): Update.
4095         (captured_main_1): Update.
4096         * dwarf2read.c (dwarf2_get_dwz_file): Update
4097         (dw2_map_symbol_filenames): Update.
4098         * auto-load.c (auto_load_safe_path_vec_update): Update.
4099         (filename_is_in_auto_load_safe_path_vec): Change type of
4100         "filename_realp".
4101         (auto_load_objfile_script): Update.
4102         (file_is_auto_load_safe): Update.  Use std::string.
4103         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4104
4105 2017-08-22  Tom Tromey  <tom@tromey.com>
4106
4107         * utils.c (gdb_realpath_keepfile): Return a
4108         gdb::unique_xmalloc_ptr.
4109         * exec.c (exec_file_attach): Update.
4110         * utils.h (gdb_realpath_keepfile): Return a
4111         gdb::unique_xmalloc_ptr.
4112
4113 2017-08-22  Tom Tromey  <tom@tromey.com>
4114
4115         * compile/compile.c (compile_file_command): Use
4116         gdb::unique_xmalloc_ptr, std::string.
4117         * utils.c (gdb_abspath): Change return type.
4118         * source.c (openp): Update.
4119         * objfiles.c (allocate_objfile): Update.
4120         * main.c (set_gdb_data_directory): Update.
4121         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4122
4123 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4124
4125         * cli-cmds.c (list_commands): List actual code around more than
4126         one location.
4127
4128 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4129
4130         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4131
4132 2017-08-21  Pedro Alves  <palves@redhat.com>
4133
4134         PR gdb/19487
4135         * c-exp.y (variable production): Handle function aliases.
4136         * minsyms.c (msymbol_is_text): New function.
4137         * minsyms.h (msymbol_is_text): Declare.
4138         * symtab.c (find_function_alias_target): New function.
4139         * symtab.h (find_function_alias_target): Declare.
4140
4141 2017-08-21  Pedro Alves  <palves@redhat.com>
4142
4143         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4144         typedefs.
4145         * typeprint.c (whatis_exp): If handling "whatis", and expression
4146         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4147         typedefs here.
4148         * valops.c (value_cast): Save "to" type before resolving
4149         stubs/typedefs.  Use that type as resulting value's type.
4150
4151 2017-08-18  Tom Tromey  <tom@tromey.com>
4152             Pedro Alves  <palves@redhat.com>
4153
4154         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4155         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4156         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4157         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4158         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4159         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4160         (linux_get_siginfo_data): Add "thread" argument.  Use
4161         scoped_restore.
4162         * linux-nat.c (linux_child_follow_fork)
4163         (check_stopped_by_watchpoint): Use scoped_restore.
4164         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4165         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4166         (restore_inferior_ptid, save_inferior_ptid): Remove.
4167         * btrace.c (btrace_fetch): Use scoped_restore.
4168         * bsd-uthread.c (bsd_uthread_fetch_registers)
4169         (bsd_uthread_store_registers): Use scoped_restore.
4170         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4171         scoped_restore.
4172         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4173         (aix_thread_xfer_partial): Use scoped_restore.
4174         * inferior.h (save_inferior_ptid): Remove.
4175
4176 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4177
4178         PR tdep/21818
4179         * arm-tdep.c (gdb_print_insn_arm): Mark
4180         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4181
4182 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4183
4184         * NEWS: Mention GDBserver's new option "--selftest".
4185         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4186         * selftest.c: Move it to common/selftest.c.
4187         * selftest.h: Move it to common/selftest.h.
4188         * selftest-arch.c (reset): New function.
4189         (tests_with_arch): Call reset.
4190
4191 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4192
4193         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4194         instead of exception_fprintf and printf_filtered.
4195
4196 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4197
4198         * selftest.c (register_self_test): Rename it to
4199         selftests::register_test.
4200         (run_self_tests): selftest::run_tests.
4201         * selftest.h: Update declarations.
4202         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4203         selftests::register_test_foreach_arch.
4204         * selftest-arch.h: Update declaration.
4205         * aarch64-tdep.c: Update.
4206         * arm-tdep.c: Likewise.
4207         * disasm-selftests.c: Likewise.
4208         * dwarf2loc.c: Likewise.
4209         * dwarf2-frame.c: Likewise.
4210         * findvar.c: Likewise.
4211         * gdbarch-selftests.c: Likewise.
4212         * maint.c (maintenance_selftest): Likewise.
4213         * regcache.c: Likewise.
4214         * rust-exp.y: Likewise.
4215         * selftest-arch.c: Likewise.
4216         * unittests/environ-selftests.c: Likewise.
4217         * unittests/function-view-selftests.c: Likewise.
4218         * unittests/offset-type-selftests.c: Likewise.
4219         * unittests/optional-selftests.c: Likewise.
4220         * unittests/scoped_restore-selftests.c: Likewise.
4221         * utils-selftests.c: Likewise.
4222
4223 2017-08-17  Pedro Alves  <palves@redhat.com>
4224
4225         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4226         local.
4227
4228 2017-08-17  Pedro Alves  <palves@redhat.com>
4229
4230         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4231         field.
4232         (reset_die_in_process): Delete, replaced by ...
4233         (process_die_scope): ... this new class.  Make it responsible for
4234         freeing cu->line_header too.
4235         (process_die): Use process_die_scope.
4236         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4237         cu->line_header_die_owner.  Don't release the line header if it's
4238         owned by the CU.
4239         (setup_type_unit_groups): Make the CU/DIE own the line header.
4240         Don't release the line header here.
4241
4242 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4243
4244         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4245
4246 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4247
4248         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4249         Single-Key mode
4250
4251 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4252
4253         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4254         mode command list.
4255
4256 2017-08-15  Stafford Horne  <shorne@gmail.com>
4257
4258         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4259
4260 2017-08-15  Stafford Horne  <shorne@gmail.com>
4261
4262         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4263
4264 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4265
4266         PR gdb/21954
4267         * infcmd.c (unset_environment_command): Use the 'clear' method on
4268         the environment instead of resetting it.
4269
4270 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4271
4272         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4273         platforms.
4274
4275 2017-08-14  Tom Tromey  <tom@tromey.com>
4276
4277         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4278         (print_binary_chars): Likewise.
4279         (BITS_IN_BYTES): Remove.
4280
4281 2017-08-14  Tom Tromey  <tom@tromey.com>
4282
4283         PR gdb/21675
4284         * valprint.c (LOW_ZERO): Change value to 034.
4285         (print_octal_chars): Add static_asserts for octal constants.
4286         * printcmd.c (print_scalar_formatted): Add 'd' case.
4287
4288 2017-08-11  Tom Tromey  <tom@tromey.com>
4289
4290         * symfile.c (add_symbol_file_command): Use std::vector.
4291
4292 2017-08-14  Tom Tromey  <tom@tromey.com>
4293
4294         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4295         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4296         std::move.
4297         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4298
4299 2017-08-11  Pedro Alves  <palves@redhat.com>
4300
4301         * infrun.c (process_event_stop_test): Adjust
4302         function_name_is_marked_for_skip call.
4303         * skip.c: Include <list>.
4304         (skiplist_entry): Make it a class with private fields, and
4305         getters/setters.
4306         (skiplist_entry_chain): Delete.
4307         (skiplist_entries): New.
4308         (skiplist_entry_count): Delete.
4309         (highest_skiplist_entry_num): New.
4310         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4311         (add_skiplist_entry): Delete.
4312         (skiplist_entry::skiplist_entry): New.
4313         (skiplist_entry::add_entry): New.
4314         (skip_file_command, skip_function): Adjust.
4315         (compile_skip_regexp): Delete.
4316         (skip_command): Don't compile regexp here.  Adjust to use
4317         skiplist_entry::add_entry.
4318         (skip_info): Adjust to use range-for and getters.
4319         (skip_enable_command, skip_disable_command): Adjust to use
4320         range-for and setters.
4321         (skip_delete_command): Adjust to use std::list.
4322         (add_skiplist_entry): Delete.
4323         (skip_file_p): Delete, refactored as ...
4324         (skiplist_entry::do_skip_file_p): ... this new method.
4325         (skip_gfile_p): Delete, refactored as ...
4326         (skiplist_entry::do_gskip_file_p): ... this new method.
4327         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4328         (skiplist_entry::skip_function_p): ... this new method.
4329         (function_name_is_marked_for_skip): Now returns bool, and takes
4330         the function sal by const reference.  Adjust to use range-for and
4331         skiplist_entry methods.
4332         (_initialize_step_skip): Remove references to
4333         skiplist_entry_chain, skiplist_entry_count.
4334         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4335         takes the function sal by const reference.
4336
4337 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4338
4339         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4340         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4341         (dwarf2_frame_cache):
4342         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4343         RETURN_MASK_ALL and set *this_case to NULL.
4344         * frame-unwind.h: Update comments.
4345
4346 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4347
4348         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4349         (dwarf2_frame_state_copy_regs): Remove.
4350         (dwarf2_frame_state_free_regs): Remove.
4351         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4352         (dwarf2_restore_rule): Call method .alloc_regs instead of
4353         dwarf2_frame_state_alloc_regs.
4354         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4355         constructor.  Call std::move.
4356         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4357         (dwarf2_frame_cache): Likewise.
4358
4359         [GDB_SELF_TEST]: Include selftest.h and
4360         selftest-arch.h.
4361         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4362         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4363         execute_cfa_program_test.
4364
4365         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4366         copy ctor, assignment operator, move assignment.
4367         <alloc_regs>: New method.
4368         <swap>: New method.
4369         (struct dwarf2_frame_state): Delete dtor.
4370         (dwarf2_frame_state_alloc_regs): Remove declaration.
4371         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4372         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4373
4374 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4375
4376         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4377         (dwarf2_frame_state::dwarf2_frame_state): New.
4378         (dwarf2_frame_state::~dwarf2_frame_state): New.
4379         (dwarf2_fetch_cfa_info): Update.
4380         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4381         rather than a pointer.  Update code.
4382         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4383         dtor.
4384         <data_align, code_align, retaddr_column>: Change them to const.
4385         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4386         to bool.
4387
4388 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4389
4390         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4391         <loc.exp>: New field.
4392         * dwarf2-frame.c (execute_cfa_program): Update.
4393         (dwarf2_frame_prev_register): Update.
4394
4395 2017-08-10  Pedro Alves  <palves@redhat.com>
4396
4397         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4398
4399 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4400
4401         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4402         (fbsd_pending_children): Use std::list.
4403         (fbsd_remember_child): Likewise.
4404         (fbsd_is_child_pending): Likewise.
4405         (fbsd_pending_vfork_done): Use std::forward_list.
4406         (fbsd_add_vfork_done): Likewise.
4407         (fbsd_is_vfork_done_pending): Likewise.
4408         (fbsd_next_vfork_done): Likewise.
4409
4410 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4411
4412         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4413         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4414         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4415         for `mapfilename'.
4416         (fbsd_xfer_partial): Use gdb::byte_vector.
4417         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4418
4419 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4420
4421         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4422         "filestuff.h".
4423         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4424
4425 2017-08-09  Tom Tromey  <tom@tromey.com>
4426
4427         * skip.c (skiplist_entry): New constructor.
4428         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4429         (skiplist_entry::file_is_glob): Now bool.
4430         (skiplist_entry::file, skiplist_entry::function): Now
4431         std::string.
4432         (make_skip_entry): Return a unique_ptr.  Use new.
4433         (free_skiplist_entry, free_skiplist_entry_cleanup)
4434         (make_free_skiplist_entry_cleanup): Remove.
4435         (skip_command, skip_disable_command, add_skiplist_entry)
4436         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4437         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4438         (function_name_is_marked_for_skip): Update.
4439         (skip_delete_command): Update.  Use delete.
4440
4441 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4442
4443         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4444         (aarch64_linux_core_read_description): New function.
4445         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4446
4447 2017-08-09  Pedro Alves  <palves@redhat.com>
4448
4449         * cp-name-parser.y (cp_comp_to_string): Return a
4450         gdb::unique_xmalloc_ptr<char>.
4451         * cp-support.c (replace_typedefs_qualified_name)
4452         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4453         (cp_canonicalize_string_full): Use op= instead of explicit
4454         convertion.
4455         (cp_class_name_from_physname, method_name_from_physname)
4456         (cp_func_name, cp_remove_params): Adjust to use
4457         gdb::unique_xmalloc_ptr<char>.
4458         * cp-support.h (cp_comp_to_string): Return a
4459         gdb::unique_xmalloc_ptr<char>.
4460         * python/py-type.c (typy_lookup_type): Adjust to use
4461         gdb::unique_xmalloc_ptr<char>.
4462
4463 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4464
4465         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4466
4467 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4468             Yao Qi  <yao.qi@linaro.org>
4469
4470         * cp-support.c (cp_canonicalize_string_full): Use
4471         gdb::unique_xmalloc_ptr<char>.
4472         (cp_canonicalize_string): Likewise.
4473
4474 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4475
4476         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4477         * regformats/i386/amd64-avx-avx512.dat: Remove.
4478         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4479         * regformats/i386/amd64-avx-mpx.dat:Remove.
4480         * regformats/i386/amd64-avx.dat: Remove.
4481         * regformats/i386/amd64-mpx.dat: Remove.
4482         * regformats/i386/i386-avx-avx512.dat: Remove.
4483         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4484         * regformats/i386/i386-avx-mpx.dat: Remove.
4485         * regformats/i386/i386-mmx.dat: Remove.
4486         * regformats/i386/i386-mpx.dat: Remove.
4487
4488 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4489
4490         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4491         * amd64-tdep.c: Don't include features/i386/x32*.c.
4492         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4493         functions.
4494         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4495         and i386/x32-avx-avx512.
4496         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4497         and i386/x32.xml.
4498         * features/i386/x32-avx-avx512.c: Removed.
4499         * features/i386/x32-avx-avx512.xml: Removed.
4500         * features/i386/x32-avx.c: Removed.
4501         * features/i386/x32-avx.xml: Removed.
4502         * features/i386/x32.c: Removed.
4503         * features/i386/x32.xml: Removed.
4504         * regformats/i386/x32-avx-avx512.dat: Removed.
4505         * regformats/i386/x32-avx.dat: Removed.
4506         * regformats/i386/x32.dat: Removed.
4507
4508 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4509
4510         PR breakpoints/21886
4511         * mem-break.c (default_memory_insert_breakpoint): Use
4512         `->placed_address' rather than `->reqstd_address' for the
4513         breakpoint location.
4514
4515 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4516
4517         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4518         assertions.
4519
4520 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4521
4522         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4523         a union of `tdep_info', `tdesc_data' and `id'.
4524         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4525         rather than `info.tdep_info'.
4526         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4527         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4528         * i386-tdep.c (i386_gdbarch_init): Likewise.
4529         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4530         * mips-tdep.c (mips_gdbarch_init): Likewise.
4531         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4532         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4533         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4534         `info.tdep_info'.
4535         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4536         `info.tdep_info'.
4537         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4538         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4539         `info.tdep_info'.
4540         * spu-tdep.c (spu_gdbarch_init): Likewise.
4541         * gdbarch.h: Regenerate.
4542
4543 2017-08-07  Leszek Swirski  <leszeks@google.com>
4544
4545         PR symtab/20899
4546         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4547
4548 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4549
4550         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4551         (gdbsim_open): Rename gdb_argv args object to argv.
4552
4553 2017-08-05  Tom Tromey  <tom@tromey.com>
4554
4555         * compile/compile-object-load.c (compile_object_load): Use
4556         gdb::unique_xmalloc_ptr.
4557         * cli/cli-dump.c (scan_filename): Rename from
4558         scan_filename_with_cleanup.  Change return type.
4559         (scan_expression): Rename from scan_expression_with_cleanup.
4560         Change return type.
4561         (dump_memory_to_file, dump_value_to_file, restore_command):
4562         Use gdb::unique_xmalloc_ptr.  Update.
4563         * cli/cli-cmds.c (find_and_open_script): Use
4564         gdb::unique_xmalloc_ptr.
4565         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4566         * symmisc.c (maintenance_print_symbols)
4567         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4568         * symfile.c (symfile_bfd_open, generic_load)
4569         (add_symbol_file_command, remove_symbol_file_command): Use
4570         gdb::unique_xmalloc_ptr.
4571         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4572         * psymtab.c (maintenance_print_psymbols): Use
4573         gdb::unique_xmalloc_ptr.
4574         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4575         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4576         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4577         (reload_shared_libraries_1): Likewise.
4578
4579 2017-08-05  Tom Tromey  <tom@tromey.com>
4580
4581         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4582         (rust_op_vector, rust_set_vector): New typedefs.
4583         (current_parser): New global.
4584         (work_obstack): Change to pointer type.  Update all users.
4585         (rust_ast, pstate): Remove globals.
4586         (struct rust_parser): New.
4587         (%union) <params, field_inits>: Change type.
4588         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4589         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4590         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4591         (convert_params_to_types, convert_params_to_expression): Change
4592         type of "params".
4593         (ast_string): Change type of "fields".
4594         (rust_parse): Make a rust_parser.  Remove cleanups.
4595         (rust_lex_tests): Make and install an auto_obstack.
4596
4597 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4598
4599         * configure.srv (ipa_x32_linux_regobj): New.
4600         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4601         instead of X86_TDESC_AVX512.
4602         (initialize_low_tracepoint): Call
4603         init_registers_x32_avx_avx512_linux.
4604
4605 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4606
4607         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4608
4609 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4610
4611         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4612
4613 2017-08-03  Tom Tromey  <tom@tromey.com>
4614
4615         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4616         Remove.
4617         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4618
4619 2017-08-03  Tom Tromey  <tom@tromey.com>
4620
4621         * python/py-param.c (compute_enum_values): Use gdb_argv.
4622
4623 2017-08-03  Tom Tromey  <tom@tromey.com>
4624
4625         * utils.h (struct gdb_argv_deleter): New.
4626         (gdb_argv): New class.
4627         * utils.c (gdb_argv::reset): New method.
4628         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4629         * tracefile.c (tsave_command): Use gdb_argv.
4630         * top.c (new_ui_command): Use gdb_argv.
4631         * symmisc.c (maintenance_print_symbols)
4632         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4633         * symfile.c (symbol_file_command, generic_load)
4634         (remove_symbol_file_command): Use gdb_argv.
4635         * stack.c (backtrace_command): Use gdb_argv.
4636         * source.c (add_path, show_substitute_path_command)
4637         (unset_substitute_path_command, set_substitute_path_command):
4638         Use gdb_argv.
4639         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4640         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4641         * remote.c (extended_remote_run, remote_put_command)
4642         (remote_get_command, remote_delete_command): Use gdb_argv.
4643         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4644         (gdbsim_open): Use gdb_argv.
4645         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4646         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4647         * procfs.c (procfs_info_proc): Use gdb_argv.
4648         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4649         * infrun.c (handle_command): Use gdb_argv.
4650         * inferior.c (add_inferior_command, clone_inferior_command):
4651         Use gdb_argv.
4652         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4653         * exec.c (exec_file_command): Use gdb_argv.
4654         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4655         * compile/compile.c (build_argc_argv): Use gdb_argv.
4656
4657 2017-08-03  Tom Tromey  <tom@tromey.com>
4658
4659         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4660
4661 2017-08-03  Tom Tromey  <tom@tromey.com>
4662
4663         * python/python.c (compute_python_string): Return std::string.
4664         (gdbpy_eval_from_control_command): Update.
4665         (do_start_initialization): Use std::string.
4666         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4667         xstrprintf.
4668         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4669         xstrprintf.
4670
4671 2017-08-03  Tom Tromey  <tom@tromey.com>
4672
4673         * top.h (do_restore_instream_cleanup): Remove.
4674         * top.c (do_restore_instream_cleanup): Remove.
4675         (read_command_file): Use scoped_restore.
4676         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4677
4678 2017-08-03  Tom Tromey  <tom@tromey.com>
4679
4680         * cli/cli-script.c (execute_user_command)
4681         (execute_control_command): Use scoped_restore.
4682
4683 2017-08-03  Tom Tromey  <tom@tromey.com>
4684
4685         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4686         (execute_user_command): Remove user_call_depth; use
4687         user_args_stack's size instead.
4688
4689 2017-08-03  Tom Tromey  <tom@tromey.com>
4690
4691         * top.h (in_user_command): Remove.
4692         * top.c (in_user_command): Remove.
4693         * cli/cli-script.c (do_restore_user_call_depth)
4694         (execute_user_command): Update.
4695
4696 2017-08-03  Tom Tromey  <tom@tromey.com>
4697
4698         * valops.c (search_struct_method): Use gdb::byte_vector.
4699         * valarith.c (value_concat): Use std::vector.
4700         * target.c (memory_xfer_partial): Use gdb::byte_vector.
4701         (simple_search_memory): Likewise.
4702         * printcmd.c (find_string_backward): Use gdb::byte_vector.
4703         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
4704         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
4705         * elfread.c (elf_rel_plt_read): Use std::string.
4706         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
4707         * cli/cli-dump.c (restore_section_callback): Use
4708         gdb::byte_vector.
4709
4710 2017-08-03  Tom Tromey  <tom@tromey.com>
4711
4712         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
4713
4714 2017-08-03  Tom Tromey  <tom@tromey.com>
4715
4716         * tui/tui-regs.c (tui_restore_gdbout): Remove.
4717         (tui_register_format): Use scoped_restore.
4718
4719 2017-08-03  Tom Tromey  <tom@tromey.com>
4720
4721         * reverse.c (exec_direction_default): Remove.
4722         (exec_reverse_once): Use scoped_restore.
4723         * remote.c (restore_remote_timeout): Remove.
4724         (remote_flash_erase, remote_flash_write, remote_flash_done)
4725         (readchar, remote_serial_write): Use scoped_restore.
4726         * cli/cli-script.c (struct source_cleanup_lines_args)
4727         (source_cleanup_lines): Remove.
4728         (script_from_file): Use scoped_restore.
4729         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
4730         (source_command): Use scoped_restore.
4731
4732 2017-08-03  Tom Tromey  <tom@tromey.com>
4733
4734         * utils.h (make_cleanup_free_so): Remove.
4735         * utils.c (do_free_so, make_cleanup_free_so): Remove.
4736         * solist.h (struct so_deleter): New.
4737         (so_list_up): New typedef.
4738         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
4739
4740 2017-08-03  Tom Tromey  <tom@tromey.com>
4741
4742         * utils.h (make_cleanup_restore_current_language): Remove.
4743         * utils.c (do_restore_current_language)
4744         (make_cleanup_restore_current_language): Remove.
4745         * parse.c (parse_exp_in_context_1)
4746         (parse_expression_with_language): Use
4747         scoped_restore_current_language.
4748         * mi/mi-main.c (mi_cmd_execute): Use
4749         scoped_restore_current_language.
4750         * language.h (scoped_restore_current_language): New class.
4751
4752 2017-08-03  Tom Tromey  <tom@tromey.com>
4753
4754         * compile/compile.c (cleanup_unlink_file): Remove.
4755         (compile_to_object): Use gdb::unlinker.
4756         (eval_compile_command): Likewise.
4757
4758 2017-08-03  Tom Tromey  <tom@tromey.com>
4759
4760         * utils.h (make_cleanup_fclose): Remove.
4761         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4762
4763 2017-08-03  Tom Tromey  <tom@tromey.com>
4764
4765         * top.c (open_terminal_stream): Return gdb_file_up.
4766         (new_ui_command): Update.
4767
4768 2017-08-03  Tom Tromey  <tom@tromey.com>
4769
4770         * source.c (print_source_lines_base, forward_search_command)
4771         (reverse_search_command): Use gdb_file_up.
4772
4773 2017-08-03  Tom Tromey  <tom@tromey.com>
4774
4775         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4776
4777 2017-08-03  Tom Tromey  <tom@tromey.com>
4778
4779         * cli/cli-cmds.c (find_and_open_script): Change return type.
4780         Remove "streamp" and "full_path" parameters.
4781         (source_script_with_search): Update.
4782         * auto-load.c (source_script_file): Update.
4783         * cli/cli-cmds.h (find_and_open_script): Change type.
4784         (open_script): New struct.
4785
4786 2017-08-03  Tom Tromey  <tom@tromey.com>
4787
4788         * xml-support.c (xml_fetch_content_from_file): Update.
4789         * ui-file.c (stdio_file::open): Update.
4790         * tracefile-tfile.c (tfile_start): Update.
4791         * remote.c (remote_file_put, remote_file_get): Update.
4792         * nat/linux-procfs.c (linux_proc_get_int)
4793         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4794         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4795         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4796         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4797         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4798         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4799         * linux-nat.c (linux_proc_pending_signals): Update.
4800         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4801         (file_closer): Remove.
4802         * compile/compile.c (compile_to_object): Update.
4803         * common/filestuff.h (struct gdb_file_deleter): New.
4804         (gdb_file_up): New typedef.
4805         (gdb_fopen_cloexec): Change return type.
4806         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4807         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4808         (dump_binary_file, restore_binary_file): Update.
4809         * auto-load.c (auto_load_objfile_script_1): Update.
4810
4811 2017-08-03  Tom Tromey  <tom@tromey.com>
4812
4813         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4814         (info_static_tracepoint_markers_command): Likewise.
4815         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4816         * skip.c (skip_info): Use ui_out_emit_table.
4817         * progspace.c (print_program_space): Use ui_out_emit_table.
4818         * osdata.c (info_osdata): Use ui_out_emit_table.
4819         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4820         ui_out_emit_table.
4821         * linux-thread-db.c (info_auto_load_libthread_db): Use
4822         ui_out_emit_table.
4823         * inferior.c (print_inferior): Use ui_out_emit_table.
4824         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4825         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4826         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4827         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4828         * ui-out.h (class ui_out_emit_table): New.
4829
4830 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4831
4832         * mips-tdep.c (mips_fpu_type_str): New function.
4833         (mips_dump_tdep): Call it.
4834
4835 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4836
4837         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4838         `->mips_fpu_type'.
4839
4840 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4841
4842         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4843
4844 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4845
4846         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4847
4848 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4849
4850         * cli/cli-cmds.c (maintenancechecklist): New variable.
4851         * gdbcmd.h (maintenancechecklist): Declare it.
4852         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4853         Call i386_linux_read_description with different masks.
4854         * maint.c (maintenance_check_command): New function.
4855         (_initialize_maint_cmds): Call add_prefix_cmd.
4856         * target-descriptions.c (tdesc_reg): override operator != and ==.
4857         (tdesc_type): Likewise.
4858         (tdesc_feature): Likewise.
4859         (target_desc): Likewise.
4860         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4861         (maintenance_check_xml_descriptions): New function.
4862         (_initialize_target_descriptions) Add command "xml-descriptions".
4863         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4864
4865 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4866
4867         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4868         Include features/i386/32bit-*.c.
4869         (i386_linux_read_description): Generate target description if it
4870         doesn't exist.
4871         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4872         functions.
4873         * features/i386/32bit-linux.c: Re-generated.
4874         * features/i386/32bit-sse.c: Likewise.
4875         * target-descriptions.c (print_c_feature::visit): Print code to
4876         set register number if needed.
4877         (print_c_feature) <m_next_regnum>: New field.
4878
4879 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4880
4881         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4882         (FEATURE_XMLFILES): New.
4883         (FEATURE_CFILES): New.
4884         New rules.
4885         (clean-cfiles): Remove generated c files.
4886         * features/i386/32bit-avx.c: Generated.
4887         * features/i386/32bit-avx512.c: Generated.
4888         * features/i386/32bit-core.c: Generated.
4889         * features/i386/32bit-linux.c: Generated.
4890         * features/i386/32bit-mpx.c: Generated.
4891         * features/i386/32bit-pkeys.c: Generated.
4892         * features/i386/32bit-sse.c: Generated.
4893         * target-descriptions.c: Include algorithm.
4894         (tdesc_element_visitor): Add method visit_end.
4895         (print_c_tdesc): Implement visit_end.
4896         (print_c_tdesc:: m_filename_after_features): Move it to
4897         protected.
4898         (print_c_feature): New class.
4899         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4900         name starts with "i386/32bit-".
4901
4902 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4903
4904         * target-descriptions.c (tdesc_element_visitor): New class.
4905         (tdesc_element): New class.
4906         (tdesc_reg): Inherit from tdesc_element.
4907         (tdesc_reg::accept): New function.
4908         (tdesc_type): Inherit from tdesc_element.
4909         (tdesc_type::accept): New function.
4910         (tdesc_feature): Inherit from tdesc_element.
4911         (tdesc_feature::accept): New function.
4912         (target_desc): Inherit from tdesc_element.
4913         (target_desc::target_desc): New.
4914         (target_desc::~target_desc): New.
4915         (target_desc::accept): New.
4916         (allocate_target_description): Use new.
4917         (free_target_description): Use delete.
4918         (print_c_tdesc): New class.
4919         (maint_print_c_tdesc_cmd): Adjust.
4920
4921         * features/aarch64.c: Re-generated.
4922         * features/arc-arcompact.c: Re-generated.
4923         * features/arc-v2.c: Re-generated.
4924         * features/arm/arm-with-iwmmxt.c: Re-generated.
4925         * features/arm/arm-with-m.c: Re-generated.
4926         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4927         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4928         * features/arm/arm-with-neon.c: Re-generated.
4929         * features/arm/arm-with-vfpv2.c: Re-generated.
4930         * features/arm/arm-with-vfpv3.c: Re-generated.
4931         * features/i386/amd64-avx-avx512.c: Re-generated.
4932         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4933         * features/i386/amd64-avx.c: Re-generated.
4934         * features/i386/amd64-avx-linux.c: Re-generated.
4935         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4936         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4937         * features/i386/amd64-avx-mpx.c: Re-generated.
4938         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4939         * features/i386/amd64.c: Re-generated.
4940         * features/i386/amd64-linux.c: Re-generated.
4941         * features/i386/amd64-mpx.c: Re-generated.
4942         * features/i386/amd64-mpx-linux.c: Re-generated.
4943         * features/i386/i386-avx-avx512.c: Re-generated.
4944         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4945         * features/i386/i386-avx.c: Re-generated.
4946         * features/i386/i386-avx-linux.c: Re-generated.
4947         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4948         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4949         * features/i386/i386-avx-mpx.c: Re-generated.
4950         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4951         * features/i386/i386.c: Re-generated.
4952         * features/i386/i386-linux.c: Re-generated.
4953         * features/i386/i386-mmx.c: Re-generated.
4954         * features/i386/i386-mmx-linux.c: Re-generated.
4955         * features/i386/i386-mpx.c: Re-generated.
4956         * features/i386/i386-mpx-linux.c: Re-generated.
4957         * features/i386/x32-avx-avx512.c: Re-generated.
4958         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4959         * features/i386/x32-avx.c: Re-generated.
4960         * features/i386/x32-avx-linux.c: Re-generated.
4961         * features/i386/x32.c: Re-generated.
4962         * features/i386/x32-linux.c: Re-generated.
4963         * features/microblaze.c: Re-generated.
4964         * features/microblaze-with-stack-protect.c: Re-generated.
4965         * features/mips64-dsp-linux.c: Re-generated.
4966         * features/mips64-linux.c: Re-generated.
4967         * features/mips-dsp-linux.c: Re-generated.
4968         * features/mips-linux.c: Re-generated.
4969         * features/nds32.c: Re-generated.
4970         * features/nios2.c: Re-generated.
4971         * features/nios2-linux.c: Re-generated.
4972         * features/rs6000/powerpc-32.c: Re-generated.
4973         * features/rs6000/powerpc-32l.c: Re-generated.
4974         * features/rs6000/powerpc-403.c: Re-generated.
4975         * features/rs6000/powerpc-403gc.c : Re-generated.
4976         * features/rs6000/powerpc-405.c: Re-generated.
4977         * features/rs6000/powerpc-505.c: Re-generated.
4978         * features/rs6000/powerpc-601.c: Re-generated.
4979         * features/rs6000/powerpc-602.c: Re-generated.
4980         * features/rs6000/powerpc-603.c: Re-generated.
4981         * features/rs6000/powerpc-604.c: Re-generated.
4982         * features/rs6000/powerpc-64.c: Re-generated.
4983         * features/rs6000/powerpc-64l.c: Re-generated.
4984         * features/rs6000/powerpc-7400.c: Re-generated.
4985         * features/rs6000/powerpc-750.c: Re-generated.
4986         * features/rs6000/powerpc-860.c: Re-generated.
4987         * features/rs6000/powerpc-altivec32.c: Re-generated.
4988         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4989         * features/rs6000/powerpc-altivec64.c: Re-generated.
4990         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4991         * features/rs6000/powerpc-cell32l.c: Re-generated.
4992         * features/rs6000/powerpc-cell64l.c: Re-generated.
4993         * features/rs6000/powerpc-e500.c: Re-generated.
4994         * features/rs6000/powerpc-e500l.c: Re-generated.
4995         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4996         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4997         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4998         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4999         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5000         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5001         * features/rs6000/powerpc-vsx32.c: Re-generated.
5002         * features/rs6000/powerpc-vsx32l.c: Re-generated.
5003         * features/rs6000/powerpc-vsx64.c: Re-generated.
5004         * features/rs6000/powerpc-vsx64l.c: Re-generated.
5005         * features/rs6000/rs6000.c: Re-generated.
5006         * features/s390-linux32.c: Re-generated.
5007         * features/s390-linux32v1.c: Re-generated.
5008         * features/s390-linux32v2.c: Re-generated.
5009         * features/s390-linux64.c: Re-generated.
5010         * features/s390-linux64v1.c: Re-generated.
5011         * features/s390-linux64v2.c: Re-generated.
5012         * features/s390-te-linux64.c: Re-generated.
5013         * features/s390-tevx-linux64.c: Re-generated.
5014         * features/s390-vx-linux64.c: Re-generated.
5015         * features/s390x-linux64.c: Re-generated.
5016         * features/s390x-linux64v1.c: Re-generated.
5017         * features/s390x-linux64v2.c: Re-generated.
5018         * features/s390x-te-linux64.c: Re-generated.
5019         * features/s390x-tevx-linux64.c: Re-generated.
5020         * features/s390x-vx-linux64.c: Re-generated.
5021         * features/sparc/sparc32-solaris.c: Re-generated.
5022         * features/sparc/sparc64-solaris.c: Re-generated.
5023         * features/tic6x-c62x.c: Re-generated.
5024         * features/tic6x-c62x-linux.c: Re-generated.
5025         * features/tic6x-c64x.c: Re-generated.
5026         * features/tic6x-c64x-linux.c: Re-generated.
5027         * features/tic6x-c64xp.c: Re-generated.
5028         * features/tic6x-c64xp-linux.c: Re-generated.
5029
5030 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5031
5032         * i386-linux-tdep.c (i386_linux_read_description): New function.
5033         (i386_linux_core_read_description): Call
5034         i386_linux_read_description.
5035         * i386-linux-tdep.h (i386_linux_read_description): Declare.
5036         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5037         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5038         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5039         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5040         * x86-linux-nat.c (x86_linux_read_description): Call
5041         i386_linux_read_description.
5042
5043 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5044
5045         * NEWS: Mention it.
5046         * features/Makefile (%.c: %.xml): Pass the xml file name to
5047         command "maint print c-tdesc".
5048         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5049         name from 'arg'.
5050
5051 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5052
5053         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
5054         in-class initialization.
5055         (tdesc_create_feature): Call new instead of XCNEW.
5056         (free_target_description): Ue delete.
5057
5058 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
5059
5060         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5061
5062 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5063
5064         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5065         constant.
5066         (amd64_x32_init_abi): Likewise.
5067         * amd64-tdep.h (amd64_init_abi): Update declaration.
5068         (amd64_x32_init_abi): Likewise.
5069
5070 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5071
5072         PR tdep/21717
5073         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5074         condition for FPSCR.
5075         (arm_linux_store_inferior_registers): Likewise.
5076
5077 2017-07-22  Tom Tromey  <tom@tromey.com>
5078
5079         * break-catch-syscall.c (struct catch_syscall_inferior_data)
5080         <syscalls_counts>: Now a std::vector.
5081         (get_catch_syscall_inferior_data): Use "new".
5082         (catch_syscall_inferior_data_cleanup): Use "delete".
5083         (insert_catch_syscall, remove_catch_syscall)
5084         (clear_syscall_counts): Update.
5085
5086 2017-07-22  Tom Tromey  <tom@tromey.com>
5087
5088         * break-catch-syscall.c (syscall_catchpoint)
5089         <syscalls_to_be_caught>: Now a std::vector<int>
5090         (~syscall_catchpoint): Remove.
5091         (insert_catch_syscall, remove_catch_syscall)
5092         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5093         (print_mention_catch_syscall, print_recreate_catch_syscall):
5094         Update.
5095         (create_syscall_event_catchpoint): Change type of "filter"
5096         parameter.
5097         (catch_syscall_split_args): Return a std::vector.
5098         (catch_syscall_command_1, catching_syscall_number_1): Update.
5099
5100 2017-07-22  Tom Tromey  <tom@tromey.com>
5101
5102         * break-catch-throw.c (struct exception_catchpoint)
5103         <exception_rx>: Now a std::string.
5104         (~exception_catchpoint): Remove.
5105         (print_one_detail_exception_catchpoint): Update.
5106         (handle_gnu_v3_exceptions): Change type of except_rx.
5107         (extract_exception_regexp): Return a std::string.
5108         (catch_exception_command_1): Update.
5109
5110 2017-07-22  Tom Tromey  <tom@tromey.com>
5111
5112         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5113         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5114         std::vector.
5115         <catch_all>: Now a bool.
5116         (~signal_catchpoint): Remove.
5117         (signal_catchpoint_insert_location)
5118         (signal_catchpoint_remove_location)
5119         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5120         (signal_catchpoint_print_mention)
5121         (signal_catchpoint_print_recreate)
5122         (signal_catchpoint_explains_signal): Update.
5123         (create_signal_catchpoint): Change type of "filter" and
5124         "catch_all".
5125         (catch_signal_split_args): Return a std::vector.  Change type of
5126         "catch_all".
5127         (catch_signal_command): Update.
5128
5129 2017-07-20  Pedro Alves  <palves@redhat.com>
5130
5131         * ada-lang.c (ada_language_defn): Make extern.
5132         (_initialize_ada_language): Remove add_language call.
5133         * c-lang.c (c_language_defn, cplus_language_defn)
5134         (asm_language_defn, minimal_language_defn): Make extern.
5135         (_initialize_c_language): Delete.
5136         * completer.c (compare_cstrings): Delete, moved to utils.h.
5137         * d-lang.c (d_language_defn): Make extern.
5138         (_initialize_d_language): Remove add_language calls.
5139         * defs.h (enum language): Add comment.
5140         * f-lang.c (f_language_defn): Make extern.
5141         (_initialize_f_language): Remove add_language call.
5142         * go-lang.c (go_language_defn): Make extern.
5143         (_initialize_go_language): Remove add_language call.
5144         * language.c: Include <algorithm>.
5145         (languages): Redefine as const array.
5146         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5147         (set_language_command): Handle "local".  Use for-range loop.
5148         (set_language): Remove loop.
5149         (language_enum): Rewrite.
5150         (language_def, language_str): Remove loops.
5151         (add_language): Delete.
5152         (add_set_language_command): New, based on add_languages.
5153         (skip_language_trampoline): Adjust.
5154         (local_language_defn): Delete.
5155         (language_gdbarch_post_init): Adjust.
5156         (_initialize_language): Remove add_language calls.  Call
5157         add_set_language_command.
5158         * language.h (add_language): Delete.
5159         (auto_language_defn)
5160         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5161         (asm_language_defn, c_language_defn, cplus_language_defn)
5162         (d_language_defn, f_language_defn, go_language_defn)
5163         (m2_language_defn, objc_language_defn, opencl_language_defn)
5164         (pascal_language_defn, rust_language_defn): Declare.
5165         * m2-lang.c (m2_language_defn): Make extern.
5166         (_initialize_m2_language): Remove add_language call.
5167         * objc-lang.c (objc_language_defn): Make extern.
5168         (_initialize_objc_language): Remove add_language call.
5169         * opencl-lang.c (opencl_language_defn): Make extern.
5170         (_initialize_opencl_language): Remove add_language call.
5171         * p-lang.c (pascal_language_defn): Make extern.
5172         (_initialize_pascal_language): Delete.
5173         * rust-lang.c (rust_language_defn): Make extern.
5174         (_initialize_rust_language): Delete.
5175         * utils.h (compare_cstrings): New static inline function.
5176
5177 2017-07-20  Pedro Alves  <palves@redhat.com>
5178
5179         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5180         (get_var_value): Constify parameters.
5181         (get_int_var_value): Change prototype.
5182         (to_fixed_range_type): Adjust.
5183         * ada-lang.h (get_int_var_value): Change prototype.
5184
5185 2017-07-20  Pedro Alves  <palves@redhat.com>
5186
5187         * dwarf2read.c (dw2_lookup_symbol): Use
5188         SYMBOL_MATCHES_SEARCH_NAME.
5189         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5190
5191 2017-07-20  Pedro Alves  <palves@redhat.com>
5192
5193         * block.c (block_iter_name_step, block_iter_name_first)
5194         (block_iter_name_next): Delete.
5195         (block_lookup_symbol_primary): Adjust to use
5196         dict_iter_match_first/dict_iter_match_next.
5197         * block.h (block_iter_name_first, block_iter_name_next): Delete
5198         declarations.
5199         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5200         dict_iter_match_first/dict_iter_match_next.
5201
5202 2017-07-20  Pedro Alves  <palves@redhat.com>
5203
5204         * cp-support.c (cp_find_first_component_aux): Add missing case for
5205         end of string.
5206
5207 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5208
5209         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5210         of dwo_cu's dwo_file.
5211
5212 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5213
5214         * remote.c (store_registers_using_G): Remove one line comment.
5215
5216 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5217
5218         * regcache.c (regcache_cpy): Simplify it.
5219         (regcache::cpy_no_passthrough): Remove it.
5220         * regcache.h (cpy_no_passthrough): Remove it.
5221         (regcache_dup, regcache_cpy): Update comments.
5222
5223 2017-07-18  Pedro Alves  <palves@redhat.com>
5224
5225         * remote-sim.c (sim_command_completer): Adjust to work with a
5226         completion_tracker instead of a VEC.
5227
5228 2017-07-17  Pedro Alves  <palves@redhat.com>
5229
5230         * completer.c (complete_source_filenames): New function.
5231         (complete_address_and_linespec_locations): New function.
5232         (location_completer): Use complete_address_and_linespec_locations.
5233         (completion_tracker::build_completion_result): Honor the tracker's
5234         request to suppress append.
5235         * completer.h (completion_tracker::suppress_append_ws)
5236         (completion_tracker::set_suppress_append_ws): New methods.
5237         (completion_tracker::m_suppress_append_ws): New field.
5238         (complete_source_filenames): New declaration.
5239         * linespec.c (linespec_complete_what): New.
5240         (struct ls_parser) <complete_what, completion_word,
5241         completion_quote_char, completion_quote_end, completion_tracker>:
5242         New fields.
5243         (string_find_incomplete_keyword_at_end): New.
5244         (linespec_lexer_lex_string): Record quote char.  If in completion
5245         mode, don't throw.
5246         (linespec_lexer_consume_token): Advance the completion word point.
5247         (linespec_lexer_peek_token): Save/restore completion info.
5248         (save_stream_and_consume_token): New.
5249         (set_completion_after_number): New.
5250         (linespec_parse_basic): Set what to complete next depending on
5251         token.  Handle function and label completions specially.
5252         (parse_linespec): Disable objc shortcut in completion mode.  Set
5253         what to complete next depending on token type.  Skip keyword if in
5254         completion mode.
5255         (complete_linespec_component, linespec_complete): New.
5256         * linespec.h (linespec_complete): Declare.
5257
5258 2017-07-17  Pedro Alves  <palves@redhat.com>
5259
5260         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5261         Handle 'operator<' / 'operator<<'.
5262
5263 2017-07-17  Pedro Alves  <palves@redhat.com>
5264
5265         * completer.c (collect_explicit_location_matches): Handle
5266         MATCH_LABEL.
5267         (convert_explicit_location_to_linespec): New, factored out from
5268         ...
5269         (convert_explicit_location_to_sals): ... this.
5270         (complete_label): New.
5271         (linespec_complete_label, find_label_symbols_in_block): New.
5272         (find_label_symbols): Add completion_mode parameter and adjust to
5273         call find_label_symbols_in_block.
5274         * linespec.h (linespec_complete_label): Declare.
5275
5276 2017-07-17  Pedro Alves  <palves@redhat.com>
5277
5278         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5279         complete_symbol_mode parameter.
5280         * cli/cli-cmds.c (complete_command): Get the completion result out
5281         of the handle_brkchars tracker if used a custom word point.
5282         * completer.c: Include "linespec.h".
5283         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5284         (advance_to_expression_complete_word_point): New.
5285         (completion_tracker::completes_to_completion_word): New.
5286         (complete_files_symbols): Pass down
5287         complete_symbol_mode::EXPRESSION.
5288         (explicit_options, probe_options): New.
5289         (collect_explicit_location_matches): Complete on the
5290         explictit_loc->foo instead of word.  Use
5291         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5292         keyword and options completions.
5293         (backup_text_ptr): Delete.
5294         (skip_keyword): New.
5295         (complete_explicit_location): Remove 'word' parameter.  Add
5296         language, quoted_arg_start and quoted_arg_end parameters.
5297         Rewrite, parsing left to right.
5298         (location_completer): Rewrite.
5299         (location_completer_handle_brkchars): New function.
5300         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5301         (enum complete_line_internal_reason): Adjust comments.
5302         (completion_tracker::discard_completions): New.
5303         (completer_handle_brkchars_func_for_completer): Handle
5304         location_completer.
5305         (gdb_custom_word_point_brkchars)
5306         (gdb_org_rl_basic_quote_characters): New.
5307         (gdb_completion_word_break_characters_throw)
5308         (completion_find_completion_word): Handle trackers that use a
5309         custom word point.
5310         (completion_tracker::advance_custom_word_point_by): New.
5311         (completion_tracker::build_completion_result): Don't rely on
5312         readline appending the quote char.
5313         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5314         use a custom word point.
5315         (gdb_rl_attempted_completion_function): Restore
5316         rl_basic_quote_characters.
5317         * completer.h (class completion_tracker): Extend intro comment.
5318         (completion_tracker::set_quote_char)
5319         (completion_tracker::quote_char)
5320         (completion_tracker::set_use_custom_word_point)
5321         (completion_tracker::use_custom_word_point)
5322         (completion_tracker::custom_word_point)
5323         (completion_tracker::set_custom_word_point)
5324         (completion_tracker::advance_custom_word_point_by)
5325         (completion_tracker::completes_to_completion_word)
5326         (completion_tracker::discard_completions): New methods.
5327         (completion_tracker::m_quote_char)
5328         (completion_tracker::m_use_custom_word_point)
5329         (completion_tracker::m_custom_word_point): New fields.
5330         (advance_to_expression_complete_word_point): Declare.
5331         * f-lang.c (f_collect_symbol_completion_matches): Add
5332         complete_symbol_mode parameter.
5333         * language.h (struct language_defn)
5334         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5335         parameter.
5336         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5337         (linespec_complete_function): New function.
5338         (linespec_lexer_lex_keyword): Adjust.
5339         * linespec.h (linespec_keywords, linespec_complete_function): New
5340         declarations.
5341         * location.c (find_end_quote): New function.
5342         (explicit_location_lex_one): Add explicit_completion_info
5343         parameter.  Save quoting info.  Don't throw if being called for
5344         completion.  Don't handle Ada operators here.
5345         (is_cp_operator, skip_op_false_positives, first_of)
5346         (explicit_location_lex_one_function): New function.
5347         (string_to_explicit_location): Replace 'dont_throw' parameter with
5348         an explicit_completion_info pointer parameter.  Handle it.  Don't
5349         use explicit_location_lex_one to lex function names.  Use
5350         explicit_location_lex_one_function instead.
5351         * location.h (struct explicit_completion_info): New.
5352         (string_to_explicit_location): Replace 'dont_throw' parameter with
5353         an explicit_completion_info pointer parameter.
5354         * symtab.c (default_collect_symbol_completion_matches_break_on):
5355         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5356         (default_collect_symbol_completion_matches)
5357         (collect_symbol_completion_matches): Add complete_symbol_mode
5358         parameter.
5359         (collect_symbol_completion_matches_type): Pass down
5360         complete_symbol_mode::EXPRESSION.
5361         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5362         parameter.  Handle LINESPEC mode.
5363         * symtab.h (complete_symbol_mode): New.
5364         (default_collect_symbol_completion_matches_break_on)
5365         (default_collect_symbol_completion_matches)
5366         (collect_symbol_completion_matches)
5367         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5368         parameter.
5369
5370 2017-07-17  Pedro Alves  <palves@redhat.com>
5371
5372         * utils.c (enum class strncmp_iw_mode): New.
5373         (strcmp_iw): Rename to ...
5374         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5375         parameters.  Handle them.
5376         (strncmp_iw): New.
5377         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5378         * utils.h (strncmp_iw): Declare.
5379         (strcmp_iw): Move describing comments here.
5380
5381 2017-07-17  Pedro Alves  <palves@redhat.com>
5382
5383         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5384         CP_OPERATOR_STR.
5385         * c-typeprint.c (is_type_conversion_operator): Use
5386         CP_OPERATOR_STR.
5387         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5388         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5389         CP_OPERATOR_LEN.
5390         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5391         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5392         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5393         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5394         CP_OPERATOR_STR.
5395         * location.c: Include "cp-support.h".
5396         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5397         CP_OPERATOR_STR.
5398         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5399         CP_OPERATOR_LEN.
5400
5401 2017-07-17  Pedro Alves  <palves@redhat.com>
5402
5403         * cli/cli-cmds.c (complete_command): Use a completion tracker
5404         along with completion_find_completion_word for handle_brkchars
5405         phase.
5406         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5407         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5408         (struct gdb_rl_completion_word_info): New.
5409         (gdb_rl_find_completion_word): New.
5410         (completion_find_completion_word): New.
5411         * completer.h (completion_find_completion_word): Declare.
5412
5413 2017-07-17  Pedro Alves  <palves@redhat.com>
5414
5415         * ada-lang.c (symbol_completion_match): Adjust comments.
5416         (symbol_completion_add): Replace vector parameter with
5417         completion_tracker parameter.  Use it.
5418         (ada_make_symbol_completion_list): Rename to...
5419         (ada_collect_symbol_completion_matches): ... this.  Add
5420         completion_tracker parameter and use it.
5421         (ada_language_defn): Adjust.
5422         * break-catch-syscall.c (catch_syscall_completer): Adjust
5423         prototype and work with completion_tracker instead of VEC.
5424         * breakpoint.c (condition_completer): Adjust prototype and work
5425         with completion_tracker instead of VEC.
5426         * c-lang.c (c_language_defn, cplus_language_defn)
5427         (asm_language_defn, minimal_language_defn): Adjust to renames.
5428         * cli/cli-cmds.c (complete_command): Rework using
5429         completion_tracker.  Catch exceptions when completing.
5430         * cli/cli-decode.c (integer_unlimited_completer)
5431         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5432         with completion_tracker instead of VEC.
5433         * command.h (struct completion_tracker): Forward declare.
5434         (completer_ftype, completer_handle_brkchars_ftype): Change
5435         types.
5436         (complete_on_cmdlist, complete_on_enum): Adjust.
5437         * completer.c: Include <algorithm>.
5438         (struct gdb_completer_state): New.
5439         (current_completion): New global.
5440         (readline_line_completion_function): Delete.
5441         (noop_completer, filename_completer)
5442         (filename_completer_handle_brkchars, complete_files_symbols)
5443         (linespec_location_completer): Adjust to work with a
5444         completion_tracker instead of a VEC.
5445         (string_or_empty): New.
5446         (collect_explicit_location_matches): Adjust to work with a
5447         completion_tracker instead of a VEC.
5448         (explicit_location_completer): Rename to ...
5449         (complete_explicit_location): ... this and adjust to work with a
5450         completion_tracker instead of a VEC.
5451         (location_completer): Adjust to work with a completion_tracker
5452         instead of a VEC.
5453         (add_struct_fields): Adjust to work with a completion_list instead
5454         of VEC.
5455         (expression_completer): Rename to ...
5456         (complete_expression): ... this and adjust to work with a
5457         completion_tracker instead of a VEC.  Use complete_files_symbols.
5458         (expression_completer): Reimplement on top of complete_expression.
5459         (symbol_completer): Adjust to work with a completion_tracker
5460         instead of a VEC.
5461         (enum complete_line_internal_reason): Add describing comments.
5462         (complete_line_internal_normal_command): Adjust to work with a
5463         completion_tracker instead of a VEC.
5464         (complete_line_internal): Rename to ...
5465         (complete_line_internal_1): ... this and adjust to work with a
5466         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5467         handle_brkchars phase.
5468         (new_completion_tracker): Delete.
5469         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5470         complete_line_internal_1.
5471         (free_completion_tracker): Delete.
5472         (INITIAL_COMPLETION_HTAB_SIZE): New.
5473         (completion_tracker::completion_tracker)
5474         (completion_tracker::~completion_tracker): New.
5475         (maybe_add_completion): Delete.
5476         (completion_tracker::maybe_add_completion)
5477         (completion_tracker::add_completion)
5478         (completion_tracker::add_completions): New.
5479         (throw_max_completions_reached_error): Delete.
5480         (complete_line): Adjust to work with a completion_tracker instead
5481         of a VEC.  Don't create a completion_tracker_t or check for max
5482         completions here.
5483         (command_completer, command_completer_handle_brkchars)
5484         (signal_completer, reg_or_group_completer_1)
5485         (reg_or_group_completer, default_completer_handle_brkchars):
5486         Adjust to work with a completion_tracker.
5487         (gdb_completion_word_break_characters_throw): New.
5488         (gdb_completion_word_break_characters): Reimplement.
5489         (line_completion_function): Delete.
5490         (completion_tracker::recompute_lowest_common_denominator)
5491         (expand_preserving_ws)
5492         (completion_tracker::build_completion_result)
5493         (completion_result::completion_result)
5494         (completion_result::completion_result)
5495         (completion_result::~completion_result)
5496         (completion_result::completion_result)
5497         (completion_result::release_match_list, compare_cstrings)
5498         (completion_result::sort_match_list)
5499         (completion_result::reset_match_list)
5500         (gdb_rl_attempted_completion_function_throw)
5501         (gdb_rl_attempted_completion_function): New.
5502         * completer.h (completion_list, struct completion_result)
5503         (class completion_tracker): New.
5504         (complete_line): Add completion_tracker parameter.
5505         (readline_line_completion_function): Delete.
5506         (gdb_rl_attempted_completion_function): New.
5507         (noop_completer, filename_completer, expression_completer)
5508         (location_completer, symbol_completer, command_completer)
5509         (signal_completer, reg_or_group_completer): Update prototypes.
5510         (completion_tracker_t, new_completion_tracker)
5511         (make_cleanup_free_completion_tracker): Delete.
5512         (enum maybe_add_completion_enum): Delete.
5513         (maybe_add_completion): Delete.
5514         (throw_max_completions_reached_error): Delete.
5515         * corefile.c (complete_set_gnutarget): Adjust to work with a
5516         completion_tracker instead of a VEC.
5517         * cp-abi.c (cp_abi_completer): Adjust to work with a
5518         completion_tracker instead of a VEC.
5519         * d-lang.c (d_language_defn): Adjust.
5520         * disasm.c (disassembler_options_completer): Adjust to work with a
5521         completion_tracker instead of a VEC.
5522         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5523         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5524         with a completion_tracker instead of a VEC.
5525         (f_language_defn): Adjust.
5526         * go-lang.c (go_language_defn): Adjust.
5527         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5528         Adjust to work with a completion_tracker instead of a VEC.
5529         * infrun.c (handle_completer): Likewise.
5530         * interps.c (interpreter_completer): Likewise.
5531         * interps.h (interpreter_completer): Likewise.
5532         * language.c (unknown_language_defn, auto_language_defn)
5533         (local_language_defn): Adjust.
5534         * language.h (language_defn::la_make_symbol_completion_list):
5535         Rename to ...
5536         (language_defn::la_collect_symbol_completion_matches): ... this
5537         and adjust to work with a completion_tracker instead of a VEC.
5538         * m2-lang.c (m2_language_defn): Adjust.
5539         * objc-lang.c (objc_language_defn): Adjust.
5540         * opencl-lang.c (opencl_language_defn): Adjust.
5541         * p-lang.c (pascal_language_defn): Adjust.
5542         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5543         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5544         with a completion_tracker.
5545         * rust-lang.c (rust_language_defn): Adjust.
5546         * symtab.c (free_completion_list, do_free_completion_list)
5547         (return_val, completion_tracker): Delete.
5548         (completion_list_add_name, completion_list_add_symbol)
5549         (completion_list_add_msymbol, completion_list_objc_symbol)
5550         (completion_list_add_fields, add_symtab_completions): Add
5551         completion_tracker parameter and use it.
5552         (default_make_symbol_completion_list_break_on_1): Rename to...
5553         (default_collect_symbol_completion_matches_break_on): ... this.
5554         Add completion_tracker parameter and use it instead of allocating
5555         a completion tracker here.
5556         (default_make_symbol_completion_list_break_on): Delete old
5557         implementation.
5558         (default_make_symbol_completion_list): Delete.
5559         (default_collect_symbol_completion_matches): New.
5560         (make_symbol_completion_list): Delete.
5561         (collect_symbol_completion_matches): New.
5562         (make_symbol_completion_type): Rename to ...
5563         (collect_symbol_completion_matches_type): ... this.  Add
5564         completion_tracker parameter and use it instead of VEC.
5565         (make_file_symbol_completion_list_1): Rename to...
5566         (collect_file_symbol_completion_matches): ... this.  Add
5567         completion_tracker parameter and use it instead of VEC.
5568         (make_file_symbol_completion_list): Delete.
5569         (add_filename_to_list): Use completion_list instead of a VEC.
5570         (add_partial_filename_data::list): Now a completion_list.
5571         (make_source_files_completion_list): Work with a completion_list
5572         instead of a VEC.
5573         * symtab.h: Include "completer.h".
5574         (default_make_symbol_completion_list_break_on)
5575         (default_make_symbol_completion_list, make_symbol_completion_list)
5576         (make_symbol_completion_type, make_file_symbol_completion_list)
5577         (make_source_files_completion_list): Delete.
5578         (default_collect_symbol_completion_matches_break_on)
5579         (default_collect_symbol_completion_matches)
5580         (collect_symbol_completion_matches)
5581         (collect_symbol_completion_matches_type)
5582         (collect_file_symbol_completion_matches)
5583         (make_source_files_completion_list): New.
5584         * top.c (init_main): Don't install a rl_completion_entry_function
5585         hook.  Install a rl_attempted_completion_function hook instead.
5586         * tui/tui-layout.c (layout_completer): Adjust to work with a
5587         completion_tracker.
5588         * tui/tui-regs.c (tui_reggroup_completer):
5589         * tui/tui-win.c (window_name_completer, focus_completer)
5590         (winheight_completer): Adjust to work with a completion_tracker.
5591         * value.c: Include "completer.h".
5592         (complete_internalvar): Adjust to work with a completion_tracker.
5593         * value.h (complete_internalvar): Likewise.
5594
5595 2017-07-17  Pedro Alves  <palves@redhat.com>
5596
5597         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5598         renames.
5599         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5600         comments to completer_ftype's declaration.
5601         <completer_handle_brkchars>: Change type to
5602         completer_handle_brkchars_ftype.
5603         * command.h (completer_ftype): Add describing comment and give
5604         names to parameters.
5605         (completer_ftype_void): Rename to ...
5606         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5607         (set_cmd_completer_handle_brkchars): Adjust.
5608         * completer.c (filename_completer_handle_brkchars): New function.
5609         (complete_line_internal_normal_command): New function, factored
5610         out from ...
5611         (complete_line_internal): ... here.
5612         (command_completer_handle_brkchars)
5613         (default_completer_handle_brkchars)
5614         (completer_handle_brkchars_func_for_completer): New functions.
5615         * completer.h (set_gdb_completion_word_break_characters): Delete
5616         declaration.
5617         (completer_handle_brkchars_func_for_completer): New declaration.
5618         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5619         completer_handle_brkchars_func_for_completer.
5620
5621 2017-07-17  Pedro Alves  <palves@redhat.com>
5622
5623         * completer.c (symbol_completer): New function, based on
5624         make_symbol_completion_list_fn.
5625         * completer.h (symbol_completer): New declaration.
5626         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5627         * python/py-cmd.c (completers): Adjust.
5628         * symtab.c (make_symbol_completion_list_fn): Delete.
5629         * symtab.h (make_symbol_completion_list_fn): Delete.
5630         * cli/cli-decode.c (add_cmd): Adjust.
5631
5632 2017-07-17  Pedro Alves  <palves@redhat.com>
5633
5634         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5635         * dwarf2read.c: Include "filename-seen-cache.h".
5636         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5637         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5638         * filename-seen-cache.c: New file.
5639         * filename-seen-cache.h: New file.
5640         * symtab.c: Include "filename-seen-cache.h".
5641         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5642         (create_filename_seen_cache, clear_filename_seen_cache)
5643         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5644         to filename-seen-cache.h/filename-seen-cache.c.
5645         (output_source_filename, sources_info)
5646         (maybe_add_partial_symtab_filename)
5647         (make_source_files_completion_list): Adjust to use
5648         filename_seen_cache.
5649
5650 2017-07-17  Pedro Alves  <palves@redhat.com>
5651
5652         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5653         fields.
5654         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5655         dwarf2_debug_sections*)): New.
5656         (dwarf2_per_objfile::dwarf2_per_objfile(const
5657         dwarf2_per_objfile&)): Declare as deleted.
5658         (dwarf2_per_objfile::operator=): Declare as deleted.
5659         (dwarf2_per_objfile::dwarf2_per_objfile)
5660         (dwarf2_per_objfile::~dwarf2_per_objfile)
5661         (dwarf2_per_objfile::free_cached_comp_units): New.
5662         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5663         ctor.  Call dwarf2_per_objfile's ctor manually.
5664         (dwarf2_locate_sections): Deleted/refactored as ...
5665         (dwarf2_per_objfile::locate_sections): ... this new method.
5666         (free_cached_comp_units): Defer to
5667         dwarf2_per_objfile::free_cached_comp_units.
5668         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5669
5670 2017-07-14  Tom Tromey  <tom@tromey.com>
5671
5672         PR rust/21764:
5673         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5674         parameter.
5675         <UNOP_SIZEOF>: Split into separate case.
5676         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5677
5678 2017-07-14  Tom Tromey  <tom@tromey.com>
5679
5680         PR rust/21763:
5681         * symtab.c (symbol_matches_domain): Add language_rust to special
5682         case.
5683         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5684         treat LOC_TYPEDEF symbols as variables.
5685
5686 2017-07-14  Pedro Alves  <palves@redhat.com>
5687
5688         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5689         symtabs matching all symtabs with SRCFILE as file name instead of
5690         only considering the first hit, with lookup_symtab.
5691
5692 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5693
5694         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5695         operator_name parameters.
5696         (gen_expr): Update function call.
5697
5698 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5699
5700         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
5701         parameter.
5702         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
5703         Likewise.
5704         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
5705         parameter, use agent_expr::gdbarch instead, update function
5706         calls.
5707         (locexpr_tracepoint_var_ref): Likewise.
5708         (loclist_tracepoint_var_ref): Likewise.
5709         * ax-gdb.c (gen_trace_static_fields): Likewise.
5710         (gen_traced_pop): Likewise.
5711         (gen_frame_args_address): Likewise.
5712         (gen_frame_locals_address): Likewise.
5713         (gen_var_ref): Likewise.
5714         (gen_struct_ref_recursive): Likewise.
5715         (gen_static_field): Likewise.
5716         (gen_maybe_namespace_elt): Likewise.
5717         (gen_expr): Likewise.
5718         (gen_trace_for_var): Likewise.
5719         (gen_trace_for_expr): Likewise.
5720         (gen_trace_for_return_address): Likewise.
5721
5722 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5723
5724         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
5725         parameter.
5726         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
5727
5728 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5729
5730         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
5731         from ax, update calls.
5732         (gen_usual_arithmetic): Likewise.
5733         (gen_integral_promotions): Likewise.
5734         (gen_bitfield_ref): Likewise.
5735         (gen_primitive_field): Likewise.
5736         (gen_struct_ref_recursive): Likewise.
5737         (gen_struct_ref): Likewise.
5738         (gen_maybe_namespace_elt): Likewise.
5739         (gen_struct_elt_for_reference): Likewise.
5740         (gen_namespace_elt): Likewise.
5741         (gen_aggregate_elt_ref): Likewise.
5742         (gen_expr): Get gdbarch from ax, update calls.
5743         (gen_expr_binop_rest): Likewise.
5744
5745 2017-07-13  Pedro Alves  <palves@redhat.com>
5746
5747         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
5748         as default tdesc.
5749         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
5750         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
5751         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
5752         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
5753         tdep.
5754         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
5755         Get final tdesc from the tdep.
5756         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5757         default tdesc.
5758         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5759         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5760         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5761         Use it as default tdesc.
5762         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5763         down to amd_init_abi.  No longer handle fallback tdesc here.
5764         * amd64-tdep.h (tdesc_x32): Declare.
5765         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5766         parameter.
5767         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5768         as default tdesc.
5769
5770 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5771
5772         * s390-linux-tdep.c (s390_process_record): Add support for
5773         instructions new in arch12.
5774
5775 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5776
5777         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5778         PT_GETFSBASE and PT_GETGSBASE.
5779         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5780         PT_SETGSBASE.
5781
5782 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5783
5784         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5785         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5786         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5787         those rules.
5788         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5789         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5790         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5791         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5792         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5793         * features/i386/amd64.xml: Add 64bit-segments.xml.
5794         * features/i386/amd64-avx-avx512.c: Regenerated.
5795         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5796         * features/i386/amd64-avx-mpx.c: Regenerated.
5797         * features/i386/amd64-avx.c: Regenerated.
5798         * features/i386/amd64-mpx.c: Regenerated.
5799         * features/i386/amd64.c: Regenerated.
5800         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5801         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5802         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5803         * regformats/i386/amd64-avx.dat: Regenerated.
5804         * regformats/i386/amd64-mpx.dat: Regenerated.
5805         * regformats/i386/amd64.dat: Regenerated.
5806
5807 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5808
5809         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5810         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5811
5812 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5813
5814         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5815         unsetenv.
5816         * gnulib/aclocal.m4: Regenerate.
5817         * gnulib/config.in: Regenerate.
5818         * gnulib/configure: Regenerate.
5819         * gnulib/import/Makefile.am: Regenerate.
5820         * gnulib/import/Makefile.in: Regenerate.
5821         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5822         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5823         * gnulib/import/m4/environ.m4: New file.
5824         * gnulib/import/m4/setenv.m4: New file.
5825         * gnulib/import/setenv.c: New file.
5826         * gnulib/import/unsetenv.c: New file.
5827
5828 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5829
5830         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5831         address when op is DW_OP_addr.
5832
5833 2017-07-09  Tom Tromey  <tom@tromey.com>
5834
5835         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5836         check and apply to outer type.
5837
5838 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5839
5840         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5841         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5842         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5843         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5844
5845 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5846
5847         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5848
5849 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5850
5851         * corelow.c (get_core_siginfo): Remove.
5852         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5853         instead of get_core_siginfo.
5854         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5855         * gdbarch.h: Re-generate.
5856         * gdbarch.c: Re-generate.
5857         * linux-tdep.c (linux_core_xfer_siginfo): New.
5858         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5859
5860 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5861
5862         * corelow.c (thread_section_name): Move to ...
5863         * gdbcore.h (thread_section_name): ... here.
5864
5865 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5866
5867         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5868         (struct siginfo32): New.
5869         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5870         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5871         via ptrace(PT_LWPINFO).
5872
5873 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5874
5875         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5876         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5877         (fbsd_get_siginfo_type): New.
5878         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5879         (_initialize_fbsd_tdep): New.
5880
5881 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5882
5883         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5884         a singular dwo_unit*) to support multiple CUs in the same way that
5885         multiple TUs are supported.
5886         (create_cus_hash_table): Replace create_dwo_cu with a function for
5887         parsing multiple CUs from a DWO file.
5888         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5889         create_dwo_cu.
5890         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5891         htab_find, rather than comparing the signature to a singleton CU in
5892         the dwo_file.
5893
5894 2017-07-06  Pedro Alves  <palves@redhat.com>
5895
5896         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5897
5898 2017-07-04  Pedro Alves  <palves@redhat.com>
5899
5900         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5901         * gdbtypes.h (TYPE_STATIC): Delete.
5902         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5903         is_synchronized, is_native>: Delete.
5904         <dummy>: Bump.
5905         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5906         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5907         (TYPE_FN_FIELD_ABSTRACT): Delete.
5908
5909 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5910
5911         * buffer.h (buffer_finish): Fix spelling mistakes.
5912
5913 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5914
5915         * .dir-locals.el: Automatically switch to C-style comments in
5916         versions of Emacs that support the feature.
5917
5918 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5919             Pedro Alves  <palves@redhat.com>
5920
5921         PR cli/21688
5922         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5923         (process_next_line): New variable 'inline_cmd'.
5924         Adjust 'if' clauses for "python", "compile" and "guile" to use
5925         'command_name_equals' and check for '!inline_cmd'.
5926
5927 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5928
5929         PR cli/21688
5930         * cli/cli-script.c (command_name_equals_not_inline): New function.
5931         (process_next_line): Adjust 'if' clauses for "python", "compile"
5932         and "guile" to use command_name_equals_not_inline.
5933
5934 2017-06-29  Pedro Alves  <palves@redhat.com>
5935
5936         * completer.c (expression_completer): Call
5937         linespec_location_completer instead of location_completer.
5938
5939 2017-06-29  Pedro Alves  <palves@redhat.com>
5940
5941         * completer.c (expression_completer): Remove code that recomputes
5942         'text' from 'word'.
5943
5944 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5945
5946         * regformats/regdat.sh: Generate code with
5947         "ifndef IN_PROCESS_AGENT".
5948
5949 2017-06-28  Pedro Alves  <palves@redhat.com>
5950
5951         * command.h: Include "common/scoped_restore.h".
5952
5953 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5954
5955         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5956         instead of obstack_grow.
5957
5958 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5959
5960         PR gdb/21337
5961         * symfile.c (reread_symbols): Call objfiles_changed just before
5962         read_symbols.
5963
5964 2017-06-27  Pedro Alves  <palves@redhat.com>
5965
5966         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5967         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5968         (completion_list_add_symbol, completion_list_add_msymbol):
5969         ... these new functions.
5970         (add_symtab_completions)
5971         (default_make_symbol_completion_list_break_on_1): Adjust.
5972
5973 2017-06-27  Pedro Alves  <palves@redhat.com>
5974
5975         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5976         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5977         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5978         dtor.
5979         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5980         'storage_obstack' field an auto_obstack.  In-class initialize all
5981         non-bitfield fields.  Make minsyms_read bool.
5982         * symfile.c (read_symbols): Adjust.
5983
5984 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5985
5986         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5987         (gdbsim_store_register): Likewise.
5988
5989 2017-06-27  Pedro Alves  <palves@redhat.com>
5990
5991         * c-exp.y (name_obstack): Now an auto_obstack.
5992         (yylex): Use auto_obstack::clear.
5993         (c_parse): Use auto_obstack::clear instead of reinitializing and
5994         freeing the obstack.
5995         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5996         * d-exp.y (name_obstack): Now an auto_obstack.
5997         (yylex): Use auto_obstack::clear.
5998         (d_parse): Use auto_obstack::clear instead of reinitializing and
5999         freeing the obstack.
6000         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6001         auto_obstack.
6002         * dwarf2read.c (create_addrmap_from_index)
6003         (dwarf2_build_psymtabs_hard)
6004         (update_enumeration_type_from_children): Likewise.
6005         * gdb_obstack.h (auto_obstack): New type.
6006         * go-exp.y (name_obstack): Now an auto_obstack.
6007         (build_packaged_name): Use auto_obstack::clear.
6008         (go_parse): Use auto_obstack::clear instead of reinitializing and
6009         freeing the obstack.
6010         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6011         auto_obstack.
6012         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6013         * rust-exp.y (work_obstack): Now an auto_obstack.
6014         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6015         reinitializing and freeing the obstack.
6016         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6017         (host_char_to_target): Use auto_obstack.
6018         * utils.h (make_cleanup_obstack_free): Delete declaration.
6019         * valprint.c (generic_emit_char, generic_printstr): Use
6020         auto_obstack.
6021
6022 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6023
6024         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6025         thread.
6026         (darwin_init_thread_list): Don't update dummy thread.
6027         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6028
6029 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6030
6031         * record-full.c (netorder16): Remove.
6032
6033 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6034
6035         * common/diagnostics.h: Define macros for GCC.
6036         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6037         * common/vec.h: Include diagnostics.h.
6038         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6039         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6040         warning.
6041
6042 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6043
6044         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6045         New macro.
6046         * ada-lex.l: Ignore deprecated register warnings.
6047
6048 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6049
6050         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6051         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6052
6053 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6054
6055         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6056         its own line.
6057
6058 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6059
6060         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6061
6062 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
6063
6064         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6065         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6066         (xtensa_register_read_masked): Likewise.
6067
6068 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6069
6070         * common/environ.c (gdb_environ::unset): Update comment.
6071
6072 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6073
6074         * python/py-unwind.c (pyuw_sniffer): Allocate space for
6075         registers.
6076
6077 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6078
6079         * record-full.c (record_full_exec_insn): Use byte_vector.
6080
6081 2017-06-22  Yao Qi  <yao.qi@linaro.org>
6082
6083         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6084         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6085
6086 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6087
6088         * remote.c (cached_reg): Move from here...
6089         * regcache.h (cached_reg): ...to here.
6090         * python/py-unwind.c (struct reg_info): Remove.
6091         (cached_frame_info): Use cached_reg_t.
6092         (pyuw_prev_register): Likewise.
6093         (pyuw_sniffer): Use cached_reg_t and allocate registers.
6094         (pyuw_dealloc_cache): Free all registers.
6095
6096 2017-06-22  Pedro Alves  <palves@redhat.com>
6097             Simon Marchi  <simon.marchi@ericsson.com>
6098
6099         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6100         warning.
6101         * common/diagnostics.h: New file.
6102
6103 2017-06-22  Pedro Alves  <palves@redhat.com>
6104
6105         * common/agent.h: Add include guards.
6106
6107 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6108
6109         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6110         talk about addressable units instead of bytes.
6111
6112 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6113
6114         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6115         of '::const_iterator'.
6116
6117 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6118
6119         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6120         'unittests/environ-selftests.c'.
6121         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6122         * charset.c (find_charset_names): Declare object 'iconv_env'.
6123         Update code to use 'iconv_env' object.  Remove call to
6124         'free_environ'.
6125         * common/environ.c: Include <utility>.
6126         (make_environ): Delete function.
6127         (free_environ): Delete function.
6128         (gdb_environ::clear): New function.
6129         (gdb_environ::operator=): New function.
6130         (gdb_environ::get): Likewise.
6131         (environ_vector): Delete function.
6132         (set_in_environ): Delete function.
6133         (gdb_environ::set): New function.
6134         (unset_in_environ): Delete function.
6135         (gdb_environ::unset): New function.
6136         (gdb_environ::envp): Likewise.
6137         * common/environ.h: Include <vector>.
6138         (struct gdb_environ): Delete; transform into...
6139         (class gdb_environ): ... this class.
6140         (free_environ): Delete prototype.
6141         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6142         environ_vector): Likewise.
6143         * infcmd.c (run_command_1): Update code to call
6144         'envp' from 'gdb_environ' class.
6145         (environment_info): Update code to call methods from 'gdb_environ'
6146         class.
6147         (unset_environment_command): Likewise.
6148         (path_info): Likewise.
6149         (path_command): Likewise.
6150         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6151         (inferior::inferior): Initialize 'environment' using the host's
6152         information.
6153         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6154         Include "environ.h".
6155         (class inferior) <environment>: Change type from 'struct
6156         gdb_environ' to 'gdb_environ'.
6157         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6158         methods from 'gdb_environ' class.
6159         * solib.c (solib_find_1): Likewise
6160         * unittests/environ-selftests.c: New file.
6161
6162 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6163
6164         * features/i386/i386-linux.xml: Exchange the order of including
6165         32bit-linux.xml and 32bit-sse.xml.
6166         * features/i386/i386-linux.c: Regenerated.
6167
6168 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6169
6170         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6171         Delete copy ctor and assignment operator.
6172         (tdesc_type): Likewise.
6173         (tdesc_feature): Likewise.
6174         (tdesc_free_reg): Remove.
6175         (tdesc_create_reg): Use new.
6176         (tdesc_free_type): Remove.
6177         (tdesc_create_vector): Use new.
6178         (tdesc_create_union): Likewise.
6179         (tdesc_create_flags): Likewise.
6180         (tdesc_create_enum): Likewise.
6181         (tdesc_free_feature): Delete.
6182         (free_target_description): Use delete.
6183
6184 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6185
6186         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6187         registers.
6188
6189 2017-06-19  Pedro Alves  <palves@redhat.com>
6190
6191         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6192         after gdb::unlinker.
6193
6194 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6195
6196         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6197         gdb_environ to access an environment variable.
6198
6199 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6200
6201         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6202         gdb_byte*.
6203
6204 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6205
6206         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6207
6208 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6209
6210         * configure: Re-generate.
6211         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6212
6213 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6214
6215         * configure: Re-generate.
6216         * warning.m4: Pass -Werror to compiler when checking for
6217         supported warning flags.
6218
6219 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6220
6221         * Makefile.in (COMPILE.pre): Add "-x c++".
6222
6223 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6224             Pedro Alves  <palves@redhat.com>
6225             Yao Qi  <yao.qi@linaro.org>
6226
6227         * defs.h (RequireLongest): New.
6228         (extract_integer): Declare function template.
6229         (extract_signed_integer): Remove the declaration, but define it
6230         static inline.
6231         (extract_unsigned_integer): Likewise.
6232         (store_integer): Declare function template.
6233         (store_signed_integer): Remove the declaration, but define it
6234         static inline.
6235         (store_unsigned_integer): Likewise.
6236         * findvar.c (extract_integer): New function template.
6237         (extract_signed_integer): Remove.
6238         (extract_unsigned_integer): Remove.
6239         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6240         instantiations.
6241         (store_integer): New function template.
6242         (store_signed_integer): Remove.
6243         (store_unsigned_integer): Remove.
6244         (store_integer): Explicit instantiations.
6245         * regcache.c (regcache_raw_read_signed): Update.
6246         (regcache::raw_read): New function.
6247         (regcache::raw_read_signed): Remove.
6248         (regcache::raw_read_unsigned): Remove.
6249         (regcache_raw_read_unsigned): Update.
6250         (regcache_raw_write_unsigned): Update.
6251         (regcache::raw_write_signed): Remove.
6252         (regcache::raw_write): New function.
6253         (regcache_cooked_read_signed): Update.
6254         (regcache::raw_write_unsigned): Remove.
6255         (regcache::cooked_read_signed): Remove.
6256         (regcache_cooked_read_unsigned): Update.
6257         (regcache::cooked_read_unsigned): Remove.
6258         (regcache_cooked_write_signed): Update.
6259         (regcache_cooked_write_unsigned): Update.
6260         * regcache.h (regcache) <raw_read_signed>: Remove.
6261         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6262         <raw_read, raw_write>: New.
6263         <cooked_read_signed, cooked_write_signed>: Remove.
6264         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6265         <cooked_read, cooked_write>: New.
6266         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6267         (sh64_pseudo_register_write): Update.
6268
6269 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6270
6271         * arc-tdep.c (arc_disassembler_options): New variable.
6272         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6273         of default_print_insn.
6274         (arc_delayed_print_insn): Set info->section when needed,
6275         use default_print_insn to retrieve a disassembler.
6276
6277 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6278
6279         PR gdb/21574
6280         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6281         to mention $SHELL and startup-with-shell.
6282
6283 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6284
6285         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6286
6287 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6288
6289         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6290         default_print_insn instead of print_insn_aarch64.
6291         * arm-tdep.c (gdb_print_insn_arm): Call
6292         default_print_insn instead of print_insn_big_arm
6293         and print_insn_little_arm.
6294         * i386-tdep.c (i386_print_insn): Call default_print_insn
6295         instead of print_insn_i386.
6296         * ia64-tdep.c (ia64_print_insn): Call
6297         default_print_insn instead of print_insn_ia64.
6298         * mips-tdep.c (gdb_print_insn_mips): Call
6299         default_print_insn instead of print_insn_big_mips
6300         and print_insn_little_mips.
6301         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6302         instead of print_insn_spu.
6303
6304 2017-06-14  Pedro Alves  <palves@redhat.com>
6305
6306         * ada-lang.c: Include "common/byte-vector.h".
6307         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6308         * charset.c (wchar_iterator::iterate): Resize the vector instead
6309         of reserving it.
6310         * common/byte-vector.h: Include "common/def-vector.h".
6311         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6312         * cli/cli-dump.c: Include "common/byte-vector.h".
6313         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6314         * common/byte-vector.h: New file.
6315         * common/def-vector.h: New file.
6316         * common/default-init-alloc.h: New file.
6317         * dwarf2loc.c: Include "common/byte-vector.h".
6318         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6319         instead of reserving it.
6320         * dwarf2read.c: Include "common/byte-vector.h".
6321         (data_buf::m_vec): Now a gdb::byte_vector.
6322         * gdb_regex.c: Include "common/def-vector.h".
6323         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6324         * mi/mi-main.c: Include "common/byte-vector.h".
6325         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6326         * printcmd.c: Include "common/byte-vector.h".
6327         (print_scalar_formatted): Use gdb::byte_vector.
6328         * valprint.c: Include "common/byte-vector.h".
6329         (maybe_negate_by_bytes, print_decimal_chars): Use
6330         gdb::byte_vector.
6331
6332 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6333
6334         * darwin-nat.c: Include "nat/fork-inferior.h".
6335
6336 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6337
6338         * configure.nat: Factor out Darwin bits that are not
6339         architecture-specific.  Add fork-inferior.o.
6340
6341 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6342
6343         * configure.nat: Factor out AIX bits that are not
6344         architecture-specific.  Add fork-inferior.o.
6345
6346 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6347
6348         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6349         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6350         wrappers that just call rw_pieced_value.
6351
6352 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6353
6354         * dwarf2loc.c (write_pieced_value): When writing the data for a
6355         memory piece, use write_memory_with_notification instead of
6356         write_memory.
6357
6358 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6359
6360         * valops.c (read_value_memory): Change embedded_offset to
6361         represent a bit offset instead of a byte offset.
6362         * value.h (read_value_memory): Adjust comment.
6363
6364 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6365
6366         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6367         dest_offset_bits and source_offset_bits.
6368         (write_pieced_value): Likewise.
6369
6370 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6371
6372         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6373         given by DW_OP_bit_piece.
6374         (write_pieced_value): Likewise.
6375
6376 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6377
6378         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6379         some other preparations to the places where sufficient information
6380         is available.
6381         (write_pieced_value): Likewise.
6382
6383 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6384
6385         * dwarf2loc.c (bits_to_bytes): New function.
6386         (read_pieced_value): Fix offset calculations for register pieces
6387         on big-endian targets.
6388         (write_pieced_value): Likewise.
6389
6390 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6391
6392         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6393         (write_pieced_value): Likewise.
6394
6395 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6396
6397         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6398         transfer the source value's least significant bits, instead of its
6399         lowest-addressed ones.  Rename type_len to max_offset.
6400         (read_pieced_value): Mirror above changes to write_pieced_value as
6401         applicable.
6402
6403 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6404
6405         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6406         truncate full bytes from dest_offset_bits before using it as an
6407         offset into the buffer.
6408
6409 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6410
6411         * dwarf2loc.c (write_pieced_value): Include transfer size in
6412         byte-wise check.
6413
6414 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6415
6416         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6417         calculation of this_size.
6418
6419 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6420
6421         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6422         when targeting a bit-field.
6423         (write_pieced_value): Likewise.
6424
6425 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6426
6427         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6428         (allocate_piece_closure): Drop addr_size parameter.
6429         (dwarf2_evaluate_loc_desc_full): Adjust call to
6430         allocate_piece_closure.
6431
6432 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6433
6434         PR gdb/21226
6435         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6436         the LSB end, independent of endianness.
6437
6438 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6439
6440         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6441         size capping.
6442
6443 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6444
6445         * mips-linux-nat.c: Move include features/mips*-linux.c to
6446         mips-linux-tdep.c.
6447         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6448         to mips-linux-tdep.c.
6449         * mips-linux-tdep.c: Include features/mips*-linux.c
6450         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6451         functions.
6452         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6453         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6454         (tdesc_mips64_dsp_linux): Declare.
6455
6456 2017-06-12  Tom Tromey  <tom@tromey.com>
6457
6458         * valprint.h (val_print_type_code_int): Remove.
6459         * valprint.c (generic_val_print_int): Always call
6460         val_print_scalar_formatted.
6461         (val_print_type_code_int): Remove.
6462         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6463         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6464         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6465         * ada-valprint.c (ada_val_print_num): Use
6466         val_print_scalar_formatted.
6467
6468 2017-06-12  Tom Tromey  <tom@tromey.com>
6469
6470         * printcmd.c (print_scalar_formatted): Unify the two switches.
6471         Don't convert scalars to LONGEST.
6472
6473 2017-06-12  Tom Tromey  <tom@tromey.com>
6474
6475         PR exp/16225:
6476         * valprint.h (print_decimal_chars): Update.
6477         * valprint.c (maybe_negate_by_bytes): New function.
6478         (print_decimal_chars): Add "is_signed" argument.
6479         * printcmd.c (print_scalar_formatted): Update.
6480
6481 2017-06-12  Tom Tromey  <tom@tromey.com>
6482
6483         PR exp/16225:
6484         * valprint.h (print_binary_chars, print_hex_chars): Update.
6485         * valprint.c (val_print_type_code_int): Update.
6486         (print_binary_chars): Add "zero_pad" argument.
6487         (emit_octal_digit): New function.
6488         (print_octal_chars): Don't zero-pad.
6489         (print_decimal_chars): Likewise.
6490         (print_hex_chars): Add "zero_pad" argument.
6491         * sh64-tdep.c (sh64_do_fp_register): Update.
6492         * regcache.c (regcache::dump): Update.
6493         * printcmd.c (print_scalar_formatted): Update.
6494         * infcmd.c (default_print_one_register_info): Update.
6495
6496 2017-06-12  Pedro Alves  <palves@redhat.com>
6497             Alan Hayward  <alan.hayward@arm.com>
6498
6499         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6500         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6501         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6502         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6503         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6504
6505 2017-06-12  Pedro Alves  <palves@redhat.com>
6506
6507         * dwarf2read.c (mapped_symtab::data): Now a vector of
6508         symtab_index_entry instead of vector of
6509         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6510         whether an element's name is NULL instead of checking whether the
6511         element itself is NULL.
6512         (find_slot): Change return type.  Adjust.
6513         (hash_expand, , add_index_entry, uniquify_cu_indices)
6514         (write_hash_table): Adjust.
6515
6516 2017-06-12  Pedro Alves  <palves@redhat.com>
6517
6518         * dwarf2read.c (recursively_count_psymbols): New function.
6519         (write_psymtabs_to_index): Call it to compute number of psyms and
6520         pass estimate size of psyms_seen to unordered_set's ctor.
6521
6522 2017-06-12  Pedro Alves  <palves@redhat.com>
6523
6524         * dwarf2read.c (write_hash_table): Check if key already exists
6525         before emplacing.
6526
6527 2017-06-12  Pedro Alves  <palves@redhat.com>
6528
6529         * dwarf2read.c (data_buf::append_space): Rename to...
6530         (data_buf::grow): ... this, and make private.  Adjust all callers.
6531         (data_buf::append_uint): New method.
6532         (add_address_entry, write_one_signatured_type)
6533         (write_psymtabs_to_index): Use it.
6534
6535 2017-06-12  Pedro Alves  <palves@redhat.com>
6536
6537         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6538         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6539         (data_buf::file_write): Call ::fwrite directly.
6540
6541 2017-06-12  Pedro Alves  <palves@redhat.com>
6542
6543         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6544         std::vector::erase.
6545
6546 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6547
6548         Code cleanup: C++ify .gdb_index producer.
6549         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6550         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6551         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6552         (create_strtab, add_string): Remove.
6553         (file_write, data_buf): New.
6554         (struct symtab_index_entry): Use std::vector for cu_indices.
6555         (struct mapped_symtab): Use std::vector for data.
6556         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6557         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6558         Remove.
6559         (find_slot): Change return type.  Update it to the new data structures.
6560         (hash_expand, add_index_entry): Update it to the new data structures.
6561         (offset_type_compare): Remove.
6562         (uniquify_cu_indices): Update it to the new data structures.
6563         (c_str_view, c_str_view_hasher, vector_hasher): New.
6564         (add_indices_to_cpool): Remove.
6565         (write_hash_table): Update it to the new data structures.
6566         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6567         (eq_psymtab_cu_index): Remove.
6568         (psym_index_map): New typedef.
6569         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6570         reference and std::unordered_map for cu_index_htab.
6571         (add_address_entry, add_address_entry_worker, write_address_map)
6572         (write_psymbols): Update it to the new data structures.
6573         (write_obstack): Remove.
6574         (struct signatured_type_index_data): Change types_list to a data_buf
6575         reference and psyms_seen to a std::unordered_set reference.
6576         (write_one_signatured_type, recursively_write_psymbols)
6577         (write_psymtabs_to_index): Update it to the new data structures.
6578
6579 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6580
6581         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6582         separate-debug-file commands.
6583         * symfile.h (separate_debug_file_debug): New global.
6584         * symfile.c (separate_debug_file_debug): New global.
6585         (separate_debug_file_exists, find_separate_debug_file): Add
6586         debug output.
6587         (_initialize_symfile): Add "set debug separate-debug-file"
6588         command.
6589         * build-id.c (build_id_to_debug_bfd,
6590         find_separate_debug_file_by_buildid): Add debug output.
6591
6592 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6593
6594         * gdbarch.sh (displaced_step_free_closure): Remove.
6595         * gdbarch.h, gdbarch.c: Re-generate.
6596         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6597         displaced_step_free_closure.
6598         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6599         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6600         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6601         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6602         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6603         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6604         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6605         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6606         * infrun.c (displaced_step_clear): Call xfree instead of
6607         gdbarch_displaced_step_free_closure.
6608
6609 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6610
6611         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6612         NULL".
6613
6614 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6615
6616         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6617         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6618         (mn10300_push_dummy_call): Likewise.
6619
6620 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6621
6622         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6623
6624 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6625
6626         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6627
6628 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6629
6630         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6631         able to start inferiors using a shell.
6632         (New remote packets): Announce new packet "QStartupWithShell".
6633         * remote.c: Add PACKET_QStartupWithShell.
6634         (extended_remote_create_inferior): Handle new
6635         PACKET_QStartupWithShell.
6636         (remote_protocol_features) <QStartupWithShell>: New entry for
6637         PACKET_QStartupWithShell.
6638         (_initialize_remote): Call "add_packet_config_cmd" for
6639         QStartupShell.
6640
6641 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6642             Pedro Alves  <palves@redhat.com>
6643
6644         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6645         and "nat/fork-inferior.h".
6646         * common/common-inferior.h: New file, with contents from
6647         "gdb/inferior.h".
6648         * commom/common-utils.c: Include "common-utils.h".
6649         (stringify_argv): New function.
6650         * common/common-utils.h (stringify_argv): New prototype.
6651         * configure.nat: Add "fork-inferior.o" as a dependency for
6652         "*linux*", "fbsd*" and "nbsd*" hosts.
6653         * corefile.c (get_exec_file): Update comment.
6654         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6655         instead of "startup_inferior".
6656         (darwin_create_inferior): Call "add_thread_silent" after
6657         "fork_inferior".
6658         * fork-child.c: Cleanup unnecessary includes.
6659         (SHELL_FILE): Move to "common/common-fork-child.c".
6660         (environ): Likewise.
6661         (exec_wrapper): Initialize.
6662         (get_exec_wrapper): New function.
6663         (breakup_args): Move to "common/common-fork-child.c"; rename to
6664         "breakup_args_for_exec".
6665         (escape_bang_in_quoted_argument): Move to
6666         "common/common-fork-child.c".
6667         (saved_ui): New variable.
6668         (prefork_hook): New function.
6669         (postfork_hook): Likewise.
6670         (postfork_child_hook): Likewise.
6671         (gdb_startup_inferior): Likewise.
6672         (fork_inferior): Move to "common/common-fork-child.c".  Update
6673         function to support gdbserver.
6674         (startup_inferior): Likewise.
6675         * gdbcore.h (get_exec_file): Remove declaration.
6676         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6677         instead of "startup_inferior".  Call "add_thread_silent" after
6678         "fork_inferior".
6679         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6680         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6681         instead of "startup_inferior".  Call "add_thread_silent" after
6682         "fork_inferior".
6683         * inferior.h: Include "common-inferior.h".
6684         (trace_start_error): Move to "common/common-utils.h".
6685         (trace_start_error_with_name): Likewise.
6686         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6687         (startup_inferior): Likewise.
6688         (gdb_startup_inferior): New prototype.
6689         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6690         * nat/fork-inferior.h: New file.
6691         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6692         instead of "startup_inferior".  Call "add_thread_silent" after
6693         "fork_inferior".
6694         * target.h (target_terminal_init): Move prototype to
6695         "target/target.h".
6696         (target_terminal_inferior): Likewise.
6697         (target_terminal_ours): Likewise.
6698         * target/target.h (target_terminal_init): New prototype, moved
6699         from "target.h".
6700         (target_terminal_inferior): Likewise.
6701         (target_terminal_ours): Likewise.
6702         * utils.c (gdb_flush_out_err): New function.
6703
6704 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6705
6706         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
6707         * common/common-gdbthread.h: New file, with parts from
6708         "gdb/gdbthread.h".
6709         * gdbthread.h: Include "common-gdbthread.h".
6710         (switch_to_thread): Moved to "common/common-gdbthread.h".
6711
6712 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6713
6714         * Makefile.in (SFILES): Add "common/job-control.c".
6715         (HFILES_NO_SRCDIR): Add "common/job-control.h".
6716         (COMMON_OBS): Add "job-control.o".
6717         * common/job-control.c: New file, with contents from
6718         "gdb/inflow.c".
6719         * common/job-control.h: New file, with contents from "terminal.h".
6720         * fork-child.c: Include "job-control.h".
6721         * inflow.c: Include "job-control.h".
6722         (gdb_setpgid): Move to "common/common-inflow.c".
6723         (_initialize_inflow): Move setting of "job_control" to
6724         "handle_job_control".
6725         * terminal.h (job_control): Moved to "common/common-terminal.h".
6726         (gdb_setpgid): Likewise.
6727         * top.c: Include "job_control.h".
6728         * utils.c: Likewise.
6729         (job_control): Moved to "job-control.c".
6730
6731 2017-06-07  Pedro Alves  <palves@redhat.com>
6732
6733         * Makefile.in (SFILES): Add gdb_regex.c.
6734         (COMMON_OBS): Add gdb_regex.o.
6735         * ada-lang.c (ada_add_standard_exceptions)
6736         (ada_add_exceptions_from_frame, name_matches_regex)
6737         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
6738         parameter type to compiled_regex.  Adjust.
6739         (ada_exceptions_list): Use compiled_regex.
6740         * break-catch-throw.c (exception_catchpoint::pattern): Now a
6741         std::unique_ptr<compiled_regex>.
6742         (exception_catchpoint::~exception_catchpoint): Remove regfree
6743         call.
6744         (check_status_exception_catchpoint): Adjust to use compiled_regex.
6745         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
6746         * breakpoint.c (solib_catchpoint::compiled): Now a
6747         std::unique_ptr<compiled_regex>.
6748         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
6749         (check_status_catch_solib): Adjust to use compiled_regex.
6750         (add_solib_catchpoint): Adjust to use compiled_regex.
6751         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
6752         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
6753         compiled_regex reference.  Adjust to use it.
6754         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
6755         declaration.  Include "gdb_regex.h".
6756         (apropos_cmd): Change regex parameter to compiled_regex reference.
6757         * gdb_regex.c: New file.
6758         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6759         declarations.
6760         (class compiled_regex): New.
6761         * linux-tdep.c: Include "common/gdb_optional.h".
6762         (struct mapping_regexes): New, factored out from
6763         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6764         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6765         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6766         * probe.c: Include "common/gdb_optional.h".
6767         (collect_probes): Use compiled_regex and gdb::optional and remove
6768         cleanups.
6769         * skip.c: Include "common/gdb_optional.h".
6770         (skiplist_entry::compiled_function_regexp): Now a
6771         gdb::optional<compiled_regex>.
6772         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6773         (free_skiplist_entry): Remove regfree call.
6774         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6775         compiled_regex and gdb::optional.
6776         * symtab.c: Include "common/gdb_optional.h".
6777         (search_symbols): Use compiled_regex and gdb::optional.
6778         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6779         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6780         to gdb_regex.c.
6781
6782 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6783
6784         * regcache.c (regcache::save): Avoid buffer use.
6785         (regcache::dump): Likewise.
6786
6787 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6788
6789         * sh-tdep.c (sh_pseudo_register_read): Remove
6790         MAX_REGISTER_SIZE.
6791         (sh_pseudo_register_write): Likewise.
6792         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6793         (sh64_pseudo_register_write): Likewise
6794
6795 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6796
6797         * aarch64-tdep.c (aarch64_store_return_value): Use
6798         V_REGISTER_SIZE.
6799         (aarch64_pseudo_read_value): Likewise.
6800         (aarch64_pseudo_write): Likewise.
6801
6802 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6803
6804         * regformats/regdef.h (set_register_cache): Remove the
6805         declaration.
6806
6807 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6808
6809         * frame.c (frame_unwind_register_signed): Use
6810         frame_unwind_register_value.
6811
6812 2017-06-06  Pedro Alves  <palves@redhat.com>
6813
6814         PR breakpoints/21553
6815         * breakpoint.c (create_breakpoints_sal_default)
6816         (init_breakpoint_sal, create_breakpoint_sal): Use
6817         gdb::unique_xmalloc_ptr for string parameters.
6818         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6819         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6820         (base_breakpoint_create_breakpoints_sal)
6821         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6822         (strace_marker_create_breakpoints_sal)
6823         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6824         string parameters.
6825         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6826         gdb::unique_xmalloc_ptr for string parameters.
6827         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6828         parameters.
6829
6830 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6831
6832         * alpha-tdep.c (alpha_register_to_value): Use
6833         get_frame_register_value.
6834         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6835
6836 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6837
6838         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6839         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6840         (ia64_value_to_register): Likewise.
6841         (ia64_extract_return_value): Likewise.
6842         (ia64_store_return_value): Likewise.
6843         (ia64_push_dummy_call): Likewise.
6844
6845 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6846
6847         GDB 8.0 released.
6848
6849 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6850
6851         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6852
6853 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6854
6855         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6856         parameter.
6857         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6858
6859 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6860
6861         * event-loop.c (poll_timers): Unallocate timer using delete
6862         instead of xfree.
6863
6864 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6865
6866         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6867         (struct breakpoint) <~breakpoint>: New.
6868         (struct watchpoint): Inherit from breakpoint.
6869         <~watchpoint>: New.
6870         <base>: Remove.
6871         (struct tracepoint): Inherit from breakpoint.
6872         <base>: Remove.
6873         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6874         (struct longjmp_breakpoint): Inherit from breakpoint.
6875         <~longjmp_breakpoint>: New.
6876         <base>: Remove.
6877         (new_breakpoint_from_type): Remove casts.
6878         (watchpoint_in_thread_scope): Remove reference to base field.
6879         (watchpoint_del_at_next_stop): Likewise.
6880         (update_watchpoint): Likewise.
6881         (watchpoint_check): Likewise.
6882         (bpstat_check_watchpoint): Likewise.
6883         (set_longjmp_breakpoint): Likewise.
6884         (struct fork_catchpoint): Inherit from breakpoint.
6885         <base>: Remove.
6886         (struct solib_catchpoint): Inherit from breakpoint.
6887         <~solib_catchpoint>: New.
6888         <base>: Remove.
6889         (dtor_catch_solib): Change to ...
6890         (solib_catchpoint::~solib_catchpoint): ... this.
6891         (breakpoint_hit_catch_solib): Remove reference to base field.
6892         (add_solib_catchpoint): Likewise.
6893         (create_fork_vfork_event_catchpoint): Likewise.
6894         (struct exec_catchpoint): Inherit from breakpoint.
6895         <~exec_catchpoint>: New.
6896         <base>: Remove.
6897         (dtor_catch_exec): Change to ...
6898         (exec_catchpoint::~exec_catchpoint): ... this.
6899         (dtor_watchpoint): Change to ...
6900         (watchpoint::~watchpoint): ... this.
6901         (watch_command_1): Remove reference to base field.
6902         (catch_exec_command_1): Likewise.
6903         (base_breakpoint_dtor): Change to ...
6904         (breakpoint::~breakpoint): ... this.
6905         (base_breakpoint_ops): Remove dtor field value.
6906         (longjmp_bkpt_dtor): Change to ...
6907         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6908         (strace_marker_create_breakpoints_sal): Remove reference to base
6909         field.
6910         (delete_breakpoint): Don't manually call breakpoint destructor.
6911         (create_tracepoint_from_upload): Remove reference to base field.
6912         (trace_pass_set_count): Likewise.
6913         (initialize_breakpoint_ops): Don't initialize
6914         momentary_breakpoint_ops, don't set dtors.
6915         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6916         <~ada_catchpoint>: New.
6917         <base>: Remove.
6918         (create_excep_cond_exprs): Remove reference to base field.
6919         (dtor_exception): Change to ...
6920         (ada_catchpoint::~ada_catchpoint): ... this.
6921         (dtor_catch_exception): Remove.
6922         (dtor_catch_exception_unhandled): Remove.
6923         (dtor_catch_assert): Remove.
6924         (create_ada_exception_catchpoint): Remove reference to base
6925         field.
6926         (initialize_ada_catchpoint_ops): Don't set dtors.
6927         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6928         breakpoint.
6929         <~signal_catchpoint>: New.
6930         <base>: Remove.
6931         (signal_catchpoint_dtor): Change to ...
6932         (signal_catchpoint::~signal_catchpoint): ... this.
6933         (create_signal_catchpoint): Remove reference to base field.
6934         (initialize_signal_catchpoint_ops): Don't set dtor.
6935         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6936         from breakpoint.
6937         <~syscall_catchpoint>: New.
6938         <base>: Remove.
6939         (dtor_catch_syscall): Change to ...
6940         (syscall_catchpoint::~syscall_catchpoint): ... this.
6941         (create_syscall_event_catchpoint): Remove reference to base
6942         field.
6943         (initialize_syscall_catchpoint_ops): Don't set dtor.
6944         * break-catch-throw.c (struct exception_catchpoint): Inherit
6945         from breakpoint.
6946         <~exception_catchpoint>: New.
6947         <base>: Remove.
6948         (dtor_exception_catchpoint): Change to ...
6949         (exception_catchpoint::~exception_catchpoint): ... this.
6950         (handle_gnu_v3_exceptions): Remove reference to base field.
6951         (initialize_throw_catchpoint_ops): Don't set dtor.
6952         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6953         field.
6954         * remote.c (remote_get_tracepoint_status): Likewise.
6955         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6956         * tracefile.c (tracefile_fetch_registers): Likewise.
6957         * tracepoint.c (actions_command): Likewise.
6958         (validate_actionline): Likewise.
6959         (tfind_1): Likewise.
6960         (get_traceframe_location): Likewise.
6961         (find_matching_tracepoint_location): Likewise.
6962         (parse_tracepoint_status): Likewise.
6963         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6964
6965 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6966
6967         * breakpoint.c (struct longjmp_breakpoint): New struct.
6968         (is_tracepoint_type): Change return type to bool.
6969         (is_longjmp_type): New function.
6970         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6971         (set_raw_breakpoint_without_location): Use
6972         new_breakpoint_from_type.
6973         (set_raw_breakpoint): Likewise.
6974
6975 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6976
6977         * breakpoint.c (new_breakpoint_from_type): New function.
6978         (create_breakpoint_sal): Use new_breakpoint_from_type and
6979         unique_ptr.
6980         (create_breakpoint): Likewise.
6981
6982 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6983
6984         * memattr.c (mem_info_command): Rename to ...
6985         (info_mem_command): ... this.
6986         (mem_enable_command): Rename to ...
6987         (enable_mem_command): ... this.
6988         (mem_disable_command): Rename to ...
6989         (disable_mem_command): ... this.
6990         (mem_delete_command): Rename to ...
6991         (delete_mem_command): ... this.
6992         (_initialize_mem): Adjust function names.
6993
6994 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6995
6996         * btrace.c (handle_pt_insn_events): New.
6997         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6998         STATUS.  Split into this and ...
6999         (handle_pt_insn_event_flags): ... this.
7000
7001 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7002
7003         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7004         and struct pt_insn.resynced.
7005         * configure: Regenerated.
7006         * config.in: Regenerated.
7007
7008 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7009
7010         * btrace.c (ftrace_find_call_by_number): New function.
7011         (ftrace_new_function): Store objects, not pointers.
7012         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7013         ftrace_new_gap, ftrace_update_function,
7014         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7015         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7016         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7017         btrace_ends_with_single_insn, btrace_call_get): Account for
7018         btrace_thread_info::functions now storing objects.
7019         * btrace.h (struct btrace_thread_info): Add constructor.
7020         (struct btrace_thread_info) <functions>: Make std::vector.
7021         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7022         Initialize with default values.
7023         * record-btrace.c (record_btrace_frame_sniffer): Account for
7024         btrace_thread_info::functions now storing objects.
7025
7026 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7027
7028         * btrace.c: Remove typedef bfun_s.
7029         (ftrace_new_gap): Directly add gaps to the list of gaps.
7030         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7031         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7032         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7033         instead of gdb VEC.
7034
7035 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7036
7037         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7038         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7039         with btrace_thread_info::next_segment and
7040         btrace_thread_info::prev_segment.
7041         * btrace.h: Remove struct btrace_func_link.
7042         (struct btrace_function): Replace pair of function segment pointers
7043         with pair of indices.
7044         * python/py-record-btrace.c (btpy_call_prev_sibling,
7045         btpy_call_next_sibling): Replace references to
7046         btrace_thread_info::segment with btrace_thread_info::next_segment and
7047         btrace_thread_info::prev_segment.
7048         * record-btrace.c (record_btrace_frame_this_id): Use
7049         btrace_find_call_by_number.
7050
7051 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7052
7053         * btrace.c (ftrace_new_function, ftrace_fixup_level,
7054         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7055         btrace_insn_next, btrace_insn_prev): Remove references to
7056         btrace_thread_info::flow.
7057         * btrace.h (struct btrace_function): Remove FLOW.
7058
7059 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7060
7061         * btrace.c (ftrace_find_call_by_number): New function.
7062         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7063         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7064         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7065         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7066         index.
7067         * btrace.h (struct btrace_function): Turn UP into an index.
7068         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7069         as an index.
7070         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7071         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7072         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7073
7074 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7075
7076         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7077         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7078         ftrace_update_function, ftrace_compute_global_level_offset,
7079         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7080         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7081         btrace_insn_end, btrace_is_empty): Remove references to
7082         btrace_thread_info::begin and btrace_thread_info::end.
7083         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7084         (struct btrace_thread_info) <functions>: Adjust comment.
7085         * record-btrace.c (record_btrace_start_replaying): Remove reference to
7086         btrace_thread_info::begin.
7087
7088 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7089
7090         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7091         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7092         ftrace_update_function): Remove arguments that implicitly were always
7093         BTINFO->END.
7094         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7095         Don't pass BTINFO->END.
7096
7097 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7098
7099         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7100         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7101         btrace_find_insn_by_number): Replace function segment pointer with
7102         index.
7103         (btrace_insn_cmp): Simplify.
7104         * btrace.h: (struct btrace_insn_iterator) Rename index to
7105         insn_index.  Replace function segment pointer with index into function
7106         segment vector.
7107         * record-btrace.c (record_btrace_call_history): Replace function
7108         segment pointer use with index.
7109         (record_btrace_frame_sniffer): Retrieve function call segment through
7110         vector.
7111         (record_btrace_set_replay): Remove defunc't safety check.
7112
7113 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7114
7115         * btrace.c (btrace_ends_with_single_insn): New function.
7116         (btrace_call_get, btrace_call_number, btrace_call_begin,
7117         btrace_call_end, btrace_call_next, btrace_call_prev,
7118         btrace_find_call_by_number): Use index into call segment vector
7119         instead of pointer.
7120         (btrace_call_cmp): Simplify.
7121         * btrace.h (struct btrace_call_iterator): Replace function call segment
7122         pointer with index into vector.
7123         * record-btrace.c (record_btrace_call_history): Use index instead of
7124         pointer.
7125
7126 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7127
7128         * btrace.c (btrace_insn_begin, btrace_insn_end,
7129         btrace_find_insn_by_number): Add btinfo to iterator.
7130         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7131
7132 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7133
7134         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7135         and save pointers directly.
7136         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7137         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7138         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7139         changed signature of functions.
7140         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7141         (btrace_fetch): Remove code that adds btrace_function pointers to
7142         vector of btrace_functions.
7143         (btrace_clear): Simplify freeing vector of btrace_functions.
7144
7145 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7146
7147         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7148         Replace VEC_* with std::vector functions.
7149         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7150         (struct btrace_thread_info)<functions>: Change type to std::vector.
7151
7152 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7153
7154         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7155         "Removed targets and native configurations" up.  Merge duplicate
7156         "New commands" sub-sections.  Add "New options" sub-sections.
7157
7158 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7159
7160         * defs.h (copy_integer_to_size): New declaration.
7161         * findvar.c (copy_integer_to_size): New function.
7162         (do_cint_test): New selftest function.
7163         (copy_integer_to_size_test): Likewise.
7164         (_initialize_findvar): Likewise.
7165         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7166         (mips_fbsd_collect_reg): Use raw_collect_integer.
7167         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7168         (mips64_fill_gregset): Use raw_collect_integer
7169         (mips64_fill_fpregset): Use raw_supply_integer.
7170         * regcache.c (regcache::raw_supply_integer): New function.
7171         (regcache::raw_collect_integer): Likewise.
7172         * regcache.h: (regcache::raw_supply_integer): New declaration.
7173         (regcache::raw_collect_integer): Likewise.
7174
7175 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7176
7177         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7178         (COMMON_OBS): Add gdbarch-selftests.o.
7179         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7180         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7181         * gdbarch-selftests.c: New file.
7182         * regcache.h (regcache) <~regcache>: Mark it virtual if
7183         GDB_SELF_TEST.
7184         <raw_write>: Likewise.
7185
7186 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7187
7188         * regcache.c (current_regcache): Change it to
7189         regcache::current_regcache.
7190         (regcache_observer_target_changed): Update.
7191         (regcache_thread_ptid_changed): Make it a regcache static
7192         method.
7193         (regcache_thread_ptid_changed): Update.
7194         (class regcache_access): New.
7195         (current_regcache_test): Update.
7196         (_initialize_regcache): Update.
7197         * regcache.h: Include forward_list.
7198         (regcache): Declare regcache_thread_ptid_changed and declare
7199         registers_changed_ptid as friend.
7200
7201 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7202
7203         * i387-tdep.c (i387_register_to_value): Use register_size
7204         instead of TYPE_LENGTH.
7205         * m68k-tdep.c (m68k_register_to_value): Likewise.
7206
7207 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7208
7209         * i387-tdep.c (i387_convert_register_p): Return false if type
7210         code isn't TYPE_CODE_FLT.
7211
7212 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7213
7214         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7215         length is 4.
7216         (alpha_register_to_value): Remove type length check.
7217         (alpha_value_to_register): Likewise.
7218
7219 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7220
7221         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7222         TYPE_CODE_FLT.
7223
7224 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7225
7226         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7227         TYPE_CODE_FLT or not.
7228
7229 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7230
7231         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7232         * avr-tdep.c (avr_gdbarch_init): Likewise.
7233         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7234         * cris-tdep.c (cris_gdbarch_init): Likewise.
7235         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7236         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7237         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7238         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7239         * mep-tdep.c (mep_gdbarch_init): Likewise.
7240         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7241         * mips-tdep.c (mips_gdbarch_init): Likewise.
7242         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7243         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7244         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7245         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7246         * v850-tdep.c (v850_gdbarch_init): Likewise.
7247
7248 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7249
7250         * selftest-arch.c (tests_with_arch): Call registers_changed
7251         and reinit_frame_cache.
7252         * selftest.c (run_self_tests): Likewise.
7253
7254 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7255
7256         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7257         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7258
7259 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7260
7261         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7262         set_gdbarch_print_insn.
7263
7264 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7265
7266         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7267         set_gdbarch_print_insn.
7268
7269 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7270
7271         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7272         set_gdbarch_print_insn.
7273         * arc-tdep.c (arc_gdbarch_init): Likewise.
7274         * arch-utils.c: include dis-asm.h.
7275         (default_print_insn): New function.
7276         * arch-utils.h (default_print_insn): Declare.
7277         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7278         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7279         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7280         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7281         * frv-tdep.c (frv_gdbarch_init): Likewise.
7282         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7283         * gdbarch.sh (print_insn): Use default_print_insn.
7284         * gdbarch.c: Regenerated.
7285         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7286         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7287         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7288         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7289         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7290         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7291         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7292         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7293         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7294         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7295         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7296         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7297         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7298         * mt-tdep.c (mt_gdbarch_init): Likewise.
7299         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7300         * nios2-tdep.c (nios2_print_insn): Remove.
7301         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7302         * rx-tdep.c (rx_gdbarch_init): Likewise.
7303         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7304         * score-tdep.c (score_print_insn): Remove.
7305         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7306         * sh-tdep.c (sh_gdbarch_init): Likewise.
7307         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7308         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7309         * tic6x-tdep.c (tic6x_print_insn): Remove.
7310         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7311         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7312         * v850-tdep.c (v850_gdbarch_init): Likewise.
7313         * vax-tdep.c (vax_gdbarch_init): Likewise.
7314         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7315         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7316
7317 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7318
7319         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7320         (MIPS_FP0_REGNUM): Remove.
7321         (MIPS_FSR_REGNUM): Remove.
7322         (mips_fbsd_supply_fpregs): Use mips_regnum.
7323         (mips_fbsd_supply_gregs): Likewise.
7324         (mips_fbsd_collect_fpregs): Likewise.
7325         (mips_fbsd_collect_gregs): Likewise.
7326
7327 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7328
7329         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7330         (getpfpregs_supplies): New function.
7331         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7332         getfpregs_supplies.
7333         (mips_fbsd_store_inferior_registers): Likewise.
7334
7335 2017-05-22  Pedro Alves <palves@redhat.com>
7336
7337         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7338         maintainer.
7339
7340 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7341
7342         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7343         (store_register): Likewise.
7344         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7345         (get_decimal_float_return_value): Likewise.
7346         (do_ppc_sysv_return_value): Likewise.
7347         (ppc64_sysv_abi_push_integer): Likewise.
7348         (ppc64_sysv_abi_push_freg): Likewise.
7349         (ppc64_sysv_abi_return_value_base): Likewise.
7350         (ppc64_sysv_abi_return_value): Likewise.
7351         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7352         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7353         * rs6000-nat.c: Likewise.
7354         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7355         (rs6000_value_to_register): Likewise.
7356         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7357
7358 2017-05-21  Tom Tromey  <tom@tromey.com>
7359
7360         PR rust/21466:
7361         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7362         arrays as "[T]", not "[T; ]".
7363
7364 2017-05-19  Tom Tromey  <tom@tromey.com>
7365
7366         PR rust/21484:
7367         * rust-lang.c (exp_descriptor_rust): New function.
7368         (rust_language_defn): Use it.
7369         * p-lang.c (pascal_language_defn): Update.
7370         * opencl-lang.c (opencl_language_defn): Update.
7371         * objc-lang.c (objc_language_defn): Update.
7372         * m2-lang.c (m2_language_defn): Update.
7373         * language.h (struct language_defn)
7374         <la_watch_location_expression>: New member.
7375         * language.c (unknown_language_defn, auto_language_defn)
7376         (local_language_defn): Update.
7377         * go-lang.c (go_language_defn): Update.
7378         * f-lang.c (f_language_defn): Update.
7379         * d-lang.c (d_language_defn): Update.
7380         * c-lang.h (c_watch_location_expression): Declare.
7381         * c-lang.c (c_watch_location_expression): New function.
7382         (c_language_defn, cplus_language_defn, asm_language_defn)
7383         (minimal_language_defn): Use it.
7384         * breakpoint.c (watch_command_1): Call
7385         la_watch_location_expression.
7386         * ada-lang.c (ada_language_defn): Update.
7387
7388 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7389
7390         PR tui/21482
7391         * gdb_curses.h (NOMACROS): Define.
7392         (NCURSES_NOMACROS): Define.
7393
7394 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7395
7396         PR tui/21482
7397         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7398         arg to char *.
7399         * tui/tui-wingeneral.c (box_win): Likewise.
7400         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7401         (tui_show_source_line): Likewise.
7402         (tui_show_exec_info_content): Likewise.
7403
7404 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7405
7406         * sparc-tdep.c (sparc_structure_return_p)
7407         (sparc_arg_on_registers_p): New functions.
7408         (sparc32_store_arguments): Use them.
7409         * sparc64-tdep.c (sparc64_16_byte_align_p)
7410         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7411         Handle TYPE_CODE_ARRAY.
7412
7413 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7414
7415         * cli/cli-decode.c (add_alias_cmd): New function.
7416         * command.h (add_alias_cmd): Declare.
7417         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7418         instead call add_alias_cmd.
7419
7420 2017-05-17  Pedro Alves  <palves@redhat.com>
7421
7422         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7423         (nat_makefile_frag): ... this.  All references updated.
7424         * configure.ac: Likewise.
7425         * configure.nat: Likewise.  Enhance comments.
7426         * configure: Regenerate.
7427
7428 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7429
7430         * procfs.c (procfs_create_inferior): Change prototype to match
7431         definition.
7432
7433 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7434
7435         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7436         C++ compiler warning.
7437
7438 2017-05-12  Tom Tromey  <tom@tromey.com>
7439
7440         PR rust/21483:
7441         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7442         recurse, just call value_struct_elt directly.
7443
7444 2017-05-12  Tom Tromey  <tom@tromey.com>
7445
7446         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7447         OP_RUST_ARRAY>: Fix.
7448
7449 2017-05-12  Tom Tromey  <tom@tromey.com>
7450
7451         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7452
7453 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7454
7455         * regcache.c: Include <forward_list>.
7456         (struct regcache_list): Remove.
7457         (current_regcache): Update.
7458         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7459         (regcache_thread_ptid_changed): Likewise.
7460         (registers_changed_ptid): Likewise.
7461         (current_regcache_size): Likewise.
7462
7463 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7464
7465         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7466         (current_regcache_size): New function.
7467         (current_regcache_test): New function.
7468         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7469
7470 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7471
7472         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7473         (print_gp_register_row): Use get_frame_register_value.
7474
7475 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7476
7477         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7478         (mips_supply_fpregset): Likewise.
7479         (mips64_supply_gregset): Likewise.
7480
7481 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7482
7483         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7484         regcache->raw_supply_zeroed.
7485
7486 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7487
7488         * configure.nat: Rearrange 'case' statements to match
7489         host before cpu.
7490
7491 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7492
7493         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7494         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7495         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7496         "@nat_extra_makefile_frag@".
7497         (Makefile): Remove dependency on "@frags@".
7498         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7499         (data-directory/Makefile): Likewise.
7500         * config/aarch64/linux.mh: Deleted; moved contents to
7501         "gdb/configure.nat".
7502         * config/alpha/alpha-linux.mh: Likewise.
7503         * config/alpha/nbsd.mh: Likewise.
7504         * config/arm/linux.mh: Likewise.
7505         * config/arm/nbsdelf.mh: Likewise.
7506         * config/i386/cygwin.mh: Likewise.
7507         * config/i386/cygwin64.mh: Likewise.
7508         * config/i386/darwin.mh: Likewise.
7509         * config/i386/fbsd.mh: Likewise.
7510         * config/i386/fbsd64.mh: Likewise.
7511         * config/i386/go32.mh: Likewise.
7512         * config/i386/i386gnu.mh: Likewise.
7513         * config/i386/i386sol2.mh: Likewise.
7514         * config/i386/linux.mh: Likewise.
7515         * config/i386/linux64.mh: Likewise.
7516         * config/i386/mingw.mh: Likewise.
7517         * config/i386/mingw64.mh: Likewise.
7518         * config/i386/nbsd64.mh: Likewise.
7519         * config/i386/nbsdelf.mh: Likewise.
7520         * config/i386/nto.mh: Likewise.
7521         * config/i386/obsd.mh: Likewise.
7522         * config/i386/obsd64.mh: Likewise.
7523         * config/i386/sol2-64.mh: Likewise.
7524         * config/ia64/linux.mh: Likewise.
7525         * config/m32r/linux.mh: Likewise.
7526         * config/m68k/linux.mh: Likewise.
7527         * config/m68k/nbsdelf.mh: Likewise.
7528         * config/m68k/obsd.mh: Likewise.
7529         * config/m88k/obsd.mh: Likewise.
7530         * config/mips/fbsd.mh: Likewise.
7531         * config/mips/linux.mh: Likewise.
7532         * config/mips/nbsd.mh: Likewise.
7533         * config/mips/obsd64.mh: Likewise.
7534         * config/pa/linux.mh: Likewise.
7535         * config/pa/nbsd.mh: Likewise.
7536         * config/pa/obsd.mh: Likewise.
7537         * config/powerpc/aix.mh: Likewise.
7538         * config/powerpc/fbsd.mh: Likewise.
7539         * config/powerpc/linux.mh: Likewise.
7540         * config/powerpc/nbsd.mh: Likewise.
7541         * config/powerpc/obsd.mh: Likewise.
7542         * config/powerpc/ppc64-linux.mh: Likewise.
7543         * config/powerpc/spu-linux.mh: Likewise.
7544         * config/s390/linux.mh: Likewise.
7545         * config/sh/nbsd.mh: Likewise.
7546         * config/sparc/fbsd.mh: Likewise.
7547         * config/sparc/linux.mh: Likewise.
7548         * config/sparc/linux64.mh: Likewise.
7549         * config/sparc/nbsd64.mh: Likewise.
7550         * config/sparc/nbsdelf.mh: Likewise.
7551         * config/sparc/obsd64.mh: Likewise.
7552         * config/sparc/sol2.mh: Likewise.
7553         * config/tilegx/linux.mh: Likewise.
7554         * config/vax/nbsdelf.mh: Likewise.
7555         * config/vax/obsd.mh: Likewise.
7556         * config/xtensa/linux.mh: Likewise.
7557         * config/i386/i386gnu.mn: New file, with excerpts from
7558         "config/i386/i386gnu.mh".
7559         * configure: Regenerate.
7560         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7561         *.mh files under "gdb/config".
7562         * configure.nat: New file, with contents from the
7563         "gdb/config/*/*.mh" files.
7564
7565 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7566
7567         * btrace.c (btrace_clear): Free insn vector.
7568
7569 2017-05-05  Pedro Alves  <palves@redhat.com>
7570
7571         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7572         * configure: Regenerate.
7573
7574 2017-05-04  Pedro Alves  <palves@redhat.com>
7575
7576         * Makefile.in (SFILES): Add progspace-and-thread.c.
7577         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7578         (COMMON_OBS): Add progspace-and-thread.o.
7579         * breakpoint.c: Include "progspace-and-thread.h".
7580         (update_inserted_breakpoint_locations)
7581         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7582         Use scoped_restore_current_pspace_and_thread.
7583         (create_std_terminate_master_breakpoint): Use
7584         scoped_restore_current_program_space.
7585         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7586         (print_breakpoint_location): Use
7587         scoped_restore_current_program_space.
7588         (bp_loc_is_permanent): Use
7589         scoped_restore_current_pspace_and_thread.
7590         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7591         (download_tracepoint_locations): Use
7592         scoped_restore_current_pspace_and_thread.
7593         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7594         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7595         (enum step_over_calls_kind): Moved from inferior.h.
7596         (class scoped_restore_current_thread): New class.
7597         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7598         declaration.
7599         (scoped_restore_current_thread): New class.
7600         * infcmd.c: Include "common/gdb_optional.h".
7601         (continue_1, proceed_after_attach): Use
7602         scoped_restore_current_thread.
7603         (notice_new_inferior): Use scoped_restore_current_thread.
7604         * inferior.c: Include "progspace-and-thread.h".
7605         (restore_inferior, save_current_inferior): Delete.
7606         (add_inferior_command, clone_inferior_command): Use
7607         scoped_restore_current_pspace_and_thread.
7608         * inferior.h (scoped_restore_current_inferior): New class.
7609         * infrun.c: Include "progspace-and-thread.h" and
7610         "common/gdb_optional.h".
7611         (follow_fork_inferior): Use
7612         scoped_restore_current_pspace_and_thread.
7613         (scoped_restore_exited_inferior): New class.
7614         (handle_vfork_child_exec_or_exit): Use
7615         scoped_restore_exited_inferior,
7616         scoped_restore_current_pspace_and_thread,
7617         scoped_restore_current_thread and scoped_restore.
7618         (fetch_inferior_event): Use scoped_restore_current_thread.
7619         * linespec.c (decode_line_full, decode_line_1): Use
7620         scoped_restore_current_program_space.
7621         * mi/mi-main.c: Include "progspace-and-thread.h".
7622         (exec_continue): Use scoped_restore_current_thread.
7623         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7624         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7625         * proc-service.c (ps_pglobal_lookup): Use
7626         scoped_restore_current_program_space.
7627         * progspace-and-thread.c: New file.
7628         * progspace-and-thread.h: New file.
7629         * progspace.c (release_program_space, clone_program_space): Use
7630         scoped_restore_current_program_space.
7631         (restore_program_space, save_current_program_space)
7632         (save_current_space_and_thread): Delete.
7633         (switch_to_program_space_and_thread): Moved to
7634         progspace-and-thread.c.
7635         * progspace.h (save_current_program_space)
7636         (save_current_space_and_thread): Delete declarations.
7637         (scoped_restore_current_program_space): New class.
7638         * remote.c (remote_btrace_maybe_reopen): Use
7639         scoped_restore_current_thread.
7640         * symtab.c: Include "progspace-and-thread.h".
7641         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7642         * thread.c (print_thread_info_1): Use
7643         scoped_restore_current_thread.
7644         (struct current_thread_cleanup): Delete.
7645         (do_restore_current_thread_cleanup)
7646         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7647         (scoped_restore_current_thread::~scoped_restore_current_thread):
7648         ... this new dtor.
7649         (make_cleanup_restore_current_thread): Rename/convert to ...
7650         (scoped_restore_current_thread::scoped_restore_current_thread):
7651         ... this new ctor.
7652         (thread_apply_all_command): Use scoped_restore_current_thread.
7653         (thread_apply_command): Use scoped_restore_current_thread.
7654         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7655         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7656
7657 2017-05-04  Pedro Alves  <palves@redhat.com>
7658
7659         * thread.c (make_cleanup_restore_current_thread): Move
7660         find_thread_ptid call before the is_stopped call.  Assert that the
7661         thread is found.  Replace is_stopped call by checking the thread's
7662         state directly.  Remove unnecessary NULL-thread check.
7663
7664 2017-05-04  Pedro Alves  <palves@redhat.com>
7665
7666         * corelow.c (thread_section_name): New class.
7667         (get_core_register_section, get_core_siginfo): Use it.
7668
7669 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7670
7671         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7672         (get_core_register_section): Remove xfree of NULL pointer.
7673
7674 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7675
7676         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7677         * regcache.c (regcache::raw_supply_zeroed): New function.
7678         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7679
7680 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7681
7682         * gdbarch.sh: Remove commented out definition of
7683         TARGET_CHAR_BIT.
7684         * gdbarch.h: Re-generate.
7685
7686 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7687
7688         * configure: Regenerate.
7689
7690 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7691
7692         * solib-target.c (solib_target_relocate_section_addresses):
7693         Remove num_section_bases, num_bases, segment_bases variables.
7694
7695 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7696
7697         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
7698
7699 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7700
7701         * solib-target.c: Include <vector>
7702         (struct lm_info_target) <~lm_info_target>: Remove.
7703         <segment_bases, section_bases>: Change type to
7704         std::vector<CORE_ADDR>.
7705         (library_list_start_segment, library_list_start_section,
7706         library_list_end_library,
7707         solib_target_relocate_section_addresses): Adjust.
7708
7709 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7710
7711         * gdbarch.sh (software_single_step): Change return type to
7712         std::vector<CORE_ADDR>.
7713         * gdbarch.c, gdbarch.h: Re-generate.
7714         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
7715         Adjust.
7716         (arm_deal_with_atomic_sequence_raw): Adjust.
7717         (thumb_get_next_pcs_raw): Adjust.
7718         (arm_get_next_pcs_raw): Adjust.
7719         (arm_get_next_pcs): Adjust.
7720         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
7721         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
7722         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
7723         (alpha_software_single_step): Adjust.
7724         * alpha-tdep.h (alpha_software_single_step): Adjust.
7725         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
7726         * arm-tdep.c (arm_software_single_step): Adjust.
7727         (arm_breakpoint_kind_from_current_state): Adjust.
7728         * arm-tdep.h (arm_software_single_step): Adjust.
7729         * breakpoint.c (insert_single_step_breakpoint): Adjust.
7730         * cris-tdep.c (cris_software_single_step): Adjust.
7731         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
7732         (micromips_deal_with_atomic_sequence): Adjust.
7733         (deal_with_atomic_sequence): Adjust.
7734         (mips_software_single_step): Adjust.
7735         * mips-tdep.h (mips_software_single_step): Adjust.
7736         * moxie-tdep.c (moxie_software_single_step): Adjust.
7737         * nios2-tdep.c (nios2_software_single_step): Adjust.
7738         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
7739         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
7740         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
7741         * s390-linux-tdep.c (s390_software_single_step): Adjust.
7742         * sparc-tdep.c (sparc_software_single_step): Adjust.
7743         * spu-tdep.c (spu_software_single_step): Adjust.
7744         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
7745
7746 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7747
7748         * gdbarch.sh: Use semi-colon as field separator instead of colon.
7749         * gdbarch.h: Re-generate.
7750
7751 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7752
7753         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
7754         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
7755         * python/py-instruction.c, python/py-instruction.h: New file.
7756         * python/py-record.c: Add py-instruction.h include.
7757         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7758         gdb.RecordInstruction.
7759         * python/python-internal.h: Add gdbpy_initialize_instruction
7760         declaration.
7761         * python/python.c (do_start_initialization): Add
7762         gdbpy_initialize_instruction.
7763
7764 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7765
7766         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7767         Remove.
7768         (btrace_func_from_recpy_func): New function.
7769         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7770         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7771         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7772         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7773         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7774         Also, use new helper functions.
7775         (btpy_list_item): Use new helper functions.
7776         (recpy_bt_function_call_history): Use new type name.
7777         (btpy_call_getset): Remove.
7778         (gdbpy_initialize_btrace): Remove code to initialize
7779         gdb.BtraceFunctionCall.
7780         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7781         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7782         recpy_bt_func_prev, recpy_bt_func_next): New export.
7783         * python/py-record.c (recpy_func_type): New static object.
7784         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7785         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7786         recpy_func_next): New function.
7787         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7788         (recpy_func_getset): New static object.
7789         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7790         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7791
7792 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7793
7794         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7795         (btpy_object, btpy_insn_type, btpy_new): Remove.
7796         (btpy_list_object): Use gdb.RecordInstruction type instead of
7797         gdb.BtraceInstruction type.
7798         (btrace_insn_from_recpy_insn): New function.
7799         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7800         btpy_new.
7801         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7802         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7803         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7804         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7805         instead of btpy_object.
7806         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7807         btpy_insn_data, btpy_insn_decode): Rename to ...
7808         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7809         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7810         recpy_bt_insn_decode): This.  Also, use new helper functions.
7811         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7812         recpy_insn_type.
7813         (btpy_insn_getset): Remove.
7814         (gdbpy_initialize_btrace): Remove code to initialize
7815         gdb.BtraceInstruction.  Use recpy_element_object.
7816         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7817         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7818         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7819         * python/py-record.c (recpy_insn_type): New static object.
7820         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7821         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7822         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7823         New function.
7824         (recpy_insn_getset): New static object.
7825         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7826         * python/py-record.h (recpy_element_object): New typedef.
7827         (recpy_insn_type, recpy_insn_new): New export.
7828
7829 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7830
7831         * py-record-btrace.c (btpy_insn_new): Removed.
7832         (btpy_insn_or_gap_new): New function.
7833         (btpy_insn_error): Removed.
7834         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7835         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7836         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7837         btpy_insn_or_gap_new instead of btpy_insn_new.
7838         (btpy_insn_getset): Remove btpy_insn_error.
7839         * py-record.c (recpy_gap_type): New static object.
7840         (recpy_gap_object): New typedef.
7841         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7842         recpy_gap_reason_string): New function.
7843         (recpy_gap_getset): New static object.
7844         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7845         * py-record.h (recpy_gap_new): New export.
7846
7847 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7848
7849         * python/py-record.c (recpy_ptid): Remove.
7850         (recpy_record_getset): Remove recpy_ptid.
7851
7852 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7853
7854         * btrace.c (btrace_fetch): Set inferior_ptid.
7855         * python/py-record-btrace.c: Add "py-record.h" include.
7856         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7857         recpy_bt_end, recpy_bt_instruction_history,
7858         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7859         in gdb.Record object instead of current ptid.
7860         * python/py-record.c: Include new "py-record.h" file.
7861         (recpy_record_object): Moved to py-record.h.
7862         * python/py-record.h: New file.
7863
7864 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7865
7866         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7867         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7868         indentation.
7869
7870 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7871
7872         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7873         the past maintainers section.
7874
7875 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7876
7877         * infcmd.c (get_return_value): Use regcache ctor, and remove
7878         cleanup.
7879
7880 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7881             Pedro Alves  <palves@redhat.com>
7882
7883         * regcache.c (regcache::regcache): New tag dispatch ctor.
7884         (do_cooked_read): Moved above.
7885         (regcache_dup): Use the tag dispatch ctor..
7886         * regcache.h (regcache): Declare ctor, delete copy ctor and
7887         assignment operator, remove friend regcache_dup.
7888
7889 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7890
7891         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7892         call method save instead of regcache_cpy.
7893         * regcache.h (struct regcache): Make regcache_dup a friend.
7894
7895 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7896
7897         * regcache.c (struct regcache): Move to regcache.h
7898         (regcache::arch): New method.
7899         (regcache_get_ptid): Update.
7900         (get_regcache_arch): Call arch method.
7901         (get_regcache_aspace): Call method aspace.
7902         (register_buffer): Change it to method.
7903         (regcache_save): Change it to regcache::save.
7904         (regcache_restore): Likewise.
7905         (regcache_cpy_no_passthrough): Remove the declaration.
7906         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7907         (regcache_cpy_no_passthrough): Change it to method
7908         cpy_no_passthrough.
7909         (regcache_register_status): Change it to method
7910         get_register_status.
7911         (regcache_invalidate): Change it to method invalidate.
7912         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7913         (regcache_raw_update): Change it to method raw_update.
7914         (regcache_raw_read): Likewise.
7915         (regcache_raw_read_signed): Likewise.
7916         (regcache_raw_read_unsigned): Likewise.
7917         (regcache_raw_write_signed): Likewise.
7918         (regcache_raw_write_unsigned): Likewise.
7919         (regcache_cooked_read): Likewise.
7920         (regcache_cooked_read_value): Likewise.
7921         (regcache_cooked_read_signed): Likewise.
7922         (regcache_cooked_read_unsigned): Likewise.
7923         (regcache_cooked_write_signed): Likewise.
7924         (regcache_cooked_write_unsigned): Likewise.
7925         (regcache_raw_set_cached_value): Likewise.
7926         (regcache_raw_write): Likewise.
7927         (regcache_cooked_write): Likewise.
7928         (regcache_xfer_part): Likewise.
7929         (regcache_raw_read_part): Likewise.
7930         (regcache_raw_write_part): Likewise.
7931         (regcache_cooked_read_part): Likewise.
7932         (regcache_cooked_write_part): Likewise.
7933         (regcache_raw_supply): Likewise.
7934         (regcache_raw_collect): Likewise.
7935         (regcache_transfer_regset): Likewise.
7936         (regcache_supply_regset): Likewise.
7937         (regcache_collect_regset): Likewise.
7938         (regcache_debug_print_register): Likewise.
7939         (enum regcache_dump_what): Move it to regcache.h.
7940         (regcache_dump): Change it to method dump.
7941         * regcache.h (enum regcache_dump_what): New.
7942         (class regcache): New.
7943         * target.c (target_fetch_registers): Call method
7944         debug_print_register.
7945         (target_store_registers): Likewise.
7946
7947 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7948
7949         * windows-nat.c (struct lm_info_windows): Initialize field.
7950         (windows_make_so): Allocate lm_info_windows with new.
7951         (windows_free_so): Free lm_info_windows with delete.
7952
7953 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7954
7955         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7956         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7957         cleanup.
7958         (darwin_free_so): Free lm_info_darwin with delete.
7959
7960 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7961
7962         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7963         <l_addr_p>: Change type to bool.
7964         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7965         (svr4_free_so): Free lm_info_svr4 with delete.
7966         (svr4_copy_library_list): Replace memcpy with call to copy
7967         constructor.
7968         (library_list_start_library, svr4_default_sos): Allocate
7969         lm_info_svr4 with new.
7970
7971 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7972
7973         * solib-target.c (struct lm_info_target): Add destructor,
7974         initialize fields.
7975         <name>: Change type to std::string.
7976         (library_list_start_library): Allocate lm_info_target with new.
7977         (solib_target_free_library_list): Free lm_info_target with
7978         delete.
7979         (solib_target_current_sos): Adapt to std::string.
7980         (solib_target_free_so): Free lm_info_target with delete.
7981
7982 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7983
7984         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7985         fields.
7986         (frv_current_sos): Allocate lm_info_frv with new.
7987         (frv_relocate_main_executable): Free lm_info_frv with delete,
7988         allocate with new.
7989         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7990
7991 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7992
7993         * solib-frv.c (struct lm_info_frv): Fix indentation.
7994
7995 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7996
7997         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7998         map field.
7999         (dsbt_current_sos): Allocate lm_info_dsbt with new.
8000         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8001         and allocate with new.
8002         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8003
8004 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8005
8006         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8007         <filename, member_name>: Change type to std::string.
8008         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8009         (library_list_start_library): Allocate lm_info_aix with new.
8010         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8011         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8012         with copy constructor.
8013
8014 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8015
8016         * solist.h (struct lm_info): Remove.
8017         (struct lm_info_base): New class.
8018         (struct so_list) <lm_info>: Change type to lm_info_base *.
8019         * nto-tdep.c (struct lm_info): Remove.
8020         (lm_addr): Adjust.
8021         * solib-aix.c (struct lm_info): Rename to ...
8022         (struct lm_info_aix): ... this.  Extend lm_info_base.
8023         (lm_info_p): Rename to ...
8024         (lm_info_aix_p): ... this, and adjust.
8025         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8026         solib_aix_parse_libraries, library_list_start_library,
8027         solib_aix_free_library_list, solib_aix_parse_libraries,
8028         solib_aix_get_library_list,
8029         solib_aix_relocate_section_addresses, solib_aix_free_so,
8030         solib_aix_get_section_offsets,
8031         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8032         Adjust.
8033         (struct solib_aix_inferior_data) <library_list>: Adjust.
8034         * solib-darwin.c (struct lm_info): Rename to ...
8035         (struct lm_info_darwin): ... this.  Extend lm_info_base.
8036         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8037         * solib-dsbt.c (struct lm_info): Rename to ...
8038         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
8039         (struct dsbt_info) <main_executable_lm_info): Adjust.
8040         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8041         dsbt_relocate_section_addresses): Adjust.
8042         * solib-frv.c (struct lm_info): Rename to ...
8043         (struct lm_info_frv): ... this.  Extend lm_info_base.
8044         (main_executable_lm_info): Adjust.
8045         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8046         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8047         find_canonical_descriptor_in_load_object,
8048         frv_fdpic_find_canonical_descriptor): Adjust.
8049         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8050         to lm_info_svr4.
8051         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8052         svr4_clear_so, svr4_copy_library_list,
8053         library_list_start_library, svr4_default_sos, svr4_read_so_list,
8054         svr4_current_sos, svr4_fetch_objfile_link_map,
8055         solist_update_incremental): Adjust.
8056         * solib-svr4.h (struct lm_info_svr4): Move here from
8057         solib-svr4.c.
8058         * solib-target.c (struct lm_info): Rename to ...
8059         (struct lm_info_target): ... this.  Extend lm_info_base.
8060         (lm_info_p): Rename to ...
8061         (lm_info_target_p): ... this.
8062         (solib_target_parse_libraries, library_list_start_segment,
8063         library_list_start_section, library_list_start_library,
8064         library_list_end_library, solib_target_free_library_list,
8065         solib_target_current_sos, solib_target_free_so,
8066         solib_target_relocate_section_addresses): Adjust.
8067         * windows-nat.c (struct lm_info): Rename to ...
8068         (struct lm_info_windows): ... this.  Extend lm_info_base.
8069         (windows_make_so, handle_load_dll, handle_unload_dll,
8070         windows_xfer_shared_libraries): Adjust.
8071
8072 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8073
8074         * solib-darwin.c (struct darwin_so_list): Remove.
8075         (darwin_current_sos): Allocate an so_list object instead of a
8076         darwin_so_list, separately allocate an lm_info object.
8077         (darwin_free_so): Free lm_info.
8078
8079 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
8080
8081         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8082         with fprintf_filtered.
8083
8084 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8085
8086         * regcache.c (regcache::regcache): New function.
8087         (regcache::~regcache): New function.
8088         (regcache_xmalloc_1): Remove.
8089         (regcache_xmalloc): Call new regcache.
8090         (regcache_xfree): Call delete regcache.
8091         (get_thread_arch_aspace_regcache): Call new regcache.
8092
8093 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8094
8095         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8096         lwp instead of ptid_get_lwp.
8097
8098 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8099
8100         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8101         lwp_info instead of getting from inferior_ptid.
8102
8103 2017-04-27  Keith Seitz  <keiths@redhat.com>
8104
8105         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8106         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8107         (CV_CONVERSION_BADNESS): Define.
8108         (rank_one_type): Remove overly restrictive rvalue reference
8109         rank checks.
8110         Add cv-qualifier checks and subranks for type equality.
8111         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8112         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8113         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8114
8115 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8116
8117         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8118         count when creating the object.
8119
8120 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8121             Ulrich Weigand  <uweigand@de.ibm.com>
8122
8123         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8124         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8125         is used in AIX.
8126         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8127         (process_xcoff_symbol): Likewise.
8128         (scan_xcoff_symtab): Likewise.
8129
8130 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8131
8132         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8133         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8134         (ia64_access_reg): Use get_frame_register_unsigned.
8135         (ia64_access_rse_reg): Likewise.
8136         (ia64_libunwind_frame_prev_register): Likewise.
8137
8138 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8139
8140         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8141         * gdbarch.c: Regenerated.
8142         * gdbarch.h: Regenerated.
8143         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8144         visibility external.
8145         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8146         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8147         (enum cfa_how_kind): Move to ...
8148         (struct dwarf2_frame_state_reg_info): Likewise.
8149         (struct dwarf2_frame_state): Likewise.
8150         * dwarf2-frame.h: ... here.
8151         (dwarf2_frame_state_alloc_regs): New declaration.
8152         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8153         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8154
8155 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8156
8157         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8158         regcache_raw_read_unsigned.
8159         (xtensa_pseudo_register_write): Likewise.
8160
8161 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8162
8163         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8164         (nds32_pseudo_register_write): Likewise.
8165
8166 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8167
8168         * regcache.c (struct regcache) <readonly_p>: Change its type
8169         to bool.
8170         (regcache_xmalloc_1): Update parameter type and callers update.
8171
8172 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8173
8174         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8175         set_gdbarch_wchar_bit.
8176         * arm-tdep.c (arm_gdbarch_init): Likewise.
8177
8178 2017-04-25  Pedro Alves  <palves@redhat.com>
8179
8180         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8181         (BothAreRelocatable, memcopy, memmove): Don't define.
8182         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8183         macros.
8184
8185 2017-04-25  Pedro Alves  <palves@redhat.com>
8186
8187         * common/common-defs.h: Include "common/poison.h".
8188         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8189         and adjust.
8190         * common/poison.h: New file.
8191         * common/traits.h: Include <type_traits>.
8192         (Not, Or, Requires): New, moved from common/function-view.h.
8193
8194 2017-04-25  Pedro Alves  <palves@redhat.com>
8195
8196         * breakpoint.h (struct breakpoint): In-class initialize all
8197         fields.  Make boolean fields "bool".
8198         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8199         memset call and initializations no longer necessary.
8200
8201 2017-04-25  Pedro Alves  <palves@redhat.com>
8202
8203         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8204         reference.
8205         (pt_btrace_insn): New function.
8206         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8207
8208 2017-04-25  Pedro Alves  <palves@redhat.com>
8209
8210         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8211         "base" field and inherit from "bp_location" instead.  Add
8212         non-default ctor.
8213         (allocate_location_exception): Use new non-default ctor.
8214         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8215         (init_bp_location): Convert to ...
8216         (bp_location::bp_location): ... this new ctor, and remove memset
8217         call.
8218         (base_breakpoint_allocate_location): Use the new non-default ctor.
8219         * breakpoint.h (bp_location): Now a class.  Declare default and
8220         non-default ctors.  In-class initialize all members.
8221         (init_bp_location): Remove declaration.
8222
8223 2017-04-25  Pedro Alves  <palves@redhat.com>
8224
8225         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8226         assignment operator.
8227
8228 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8229
8230         * doublest.c (convert_doublest_to_floatformat): Call
8231         floatformat_totalsize_bytes.
8232
8233 2017-04-22  Tom Tromey  <tom@tromey.com>
8234
8235         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8236         ui_out_emit_list.
8237         * stack.c (print_frame): Use ui_out_emit_list.
8238         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8239         ui_out_emit_list.
8240         * mi/mi-main.c (print_one_inferior)
8241         (mi_cmd_data_list_register_names)
8242         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8243         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8244         ui_out_emit_list.
8245         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8246         (mi_output_solib_attribs): Use ui_out_emit_list,
8247         ui_out_emit_tuple.
8248         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8249         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8250         (mi_cmd_stack_list_args, list_args_or_locals): Use
8251         ui_out_emit_list.
8252         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8253         * breakpoint.c (print_solib_event, output_thread_groups): Use
8254         ui_out_emit_list.
8255
8256 2017-04-22  Tom Tromey  <tom@tromey.com>
8257
8258         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8259         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8260         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8261
8262 2017-04-22  Tom Tromey  <tom@tromey.com>
8263
8264         * tracepoint.c (tvariables_info_1)
8265         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8266
8267 2017-04-22  Tom Tromey  <tom@tromey.com>
8268
8269         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8270         annotate_arg_emitter.
8271         * breakpoint.c (print_mention_watchpoint)
8272         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8273         * annotate.h (struct annotate_arg_emitter): New.
8274
8275 2017-04-22  Tom Tromey  <tom@tromey.com>
8276
8277         * record-btrace.c (record_btrace_insn_history)
8278         (record_btrace_insn_history_range, record_btrace_call_history)
8279         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8280         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8281         ui_out_emit_tuple.
8282         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8283         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8284         * skip.c (skip_info): Use ui_out_emit_tuple.
8285         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8286         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8287         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8288         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8289         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8290         ui_out_emit_tuple.
8291         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8292         (output_register, mi_cmd_data_read_memory)
8293         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8294         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8295         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8296         Use ui_out_emit_tuple.
8297         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8298         ui_out_emit_tuple.
8299         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8300         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8301         * linux-thread-db.c (info_auto_load_libthread_db): Use
8302         ui_out_emit_tuple.
8303         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8304         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8305         * disasm.c (do_mixed_source_and_assembly_deprecated)
8306         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8307         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8308         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8309         * breakpoint.c (print_one_breakpoint_location)
8310         (print_one_breakpoint): Use ui_out_emit_tuple.
8311         * auto-load.c (print_script, info_auto_load_cmd): Use
8312         ui_out_emit_tuple.
8313         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8314
8315 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8316
8317         * thread.c (print_thread_info_1): Remove dead code.
8318
8319 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8320
8321         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8322         GDB_SELF_TEST.
8323         * arm-tdep.c (selftests::arm_record_test): Likewise.
8324
8325 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8326
8327         * regcache.c (regcache_restore): Remove argument 2.  Replace
8328         argument 3 with regcache.  Get register status from
8329         src->register_status and get register contents from
8330         register_buffer (src, regnum).
8331         (regcache_cpy): Update.
8332
8333 2017-04-19  Pedro Alves  <palves@redhat.com>
8334
8335         * gdbthread.h (thread): Add missing closing parenthesis in
8336         comment.
8337
8338 2017-04-19  Pedro Alves  <palves@redhat.com>
8339
8340         * common/refcounted-object.h: New file.
8341         * gdbthread.h: Include "common/refcounted-object.h".
8342         (thread_info): Inherit from refcounted_object and add comments.
8343         (thread_info::incref, thread_info::decref)
8344         (thread_info::m_refcount): Delete.
8345         (thread_info::deletable): Use the refcounted_object::refcount()
8346         method.
8347         * inferior.c (current_inferior_): Add comment.
8348         (set_current_inferior): Increment/decrement refcounts.
8349         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8350         not-deletable instead of comparing with the current inferior.
8351         (initialize_inferiors): Increment the initial inferior's refcount.
8352         * inferior.h (struct inferior): Forward declare.
8353         Include "common/refcounted-object.h".
8354         (current_inferior, set_current_inferior): Move declaration to
8355         before struct inferior's definition, and fix comment.
8356         (inferior): Inherit from refcounted_object.  Add comments.
8357         * thread.c (switch_to_thread_no_regs): Reference the thread's
8358         inferior pointer directly instead of doing a ptid lookup.
8359         (switch_to_no_thread): New function.
8360         (switch_to_thread(thread_info *)): New function, factored out
8361         from ...
8362         (switch_to_thread(ptid_t)): ... this.
8363         (restore_current_thread): Delete.
8364         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8365         fields, and add 'inf' field.
8366         (do_restore_current_thread_cleanup): Check whether old->inf is
8367         alive instead of looking up an inferior by ptid.  Use
8368         switch_to_thread and switch_to_no_thread.
8369         (restore_current_thread_cleanup_dtor): Use old->inf directly
8370         instead of lookup up an inferior by id.  Decref the inferior.
8371         Don't restore 'removable'.
8372         (make_cleanup_restore_current_thread): Same the inferior pointer
8373         in old, instead of the inferior number.  Incref the inferior.
8374         Don't save/clear 'removable'.
8375
8376 2017-04-19  Pedro Alves  <palves@redhat.com>
8377
8378         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8379         unittests/scoped_restore-selftests.c.
8380         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8381         * common/scoped_restore.h (scoped_restore_base): Make "class".
8382         (scoped_restore_base::release): New public method.
8383         (scoped_restore_base::scoped_restore_base): New protected ctor.
8384         (scoped_restore_base::m_saved_var): New protected field.
8385         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8386         scoped_restore_base base class instead of m_saved_var directly.
8387         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8388         (scoped_restore_tmpl::scoped_restore_tmpl(const
8389         scoped_restore_tmpl<T>&)): Likewise.
8390         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8391         method.
8392         (scoped_restore_tmpl::saved_var): New method.
8393         (scoped_restore_tmpl::m_saved_var): Delete.
8394         * inferior.h (inferior::detaching): Now a bool.
8395         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8396         cleanup.
8397         * unittests/scoped_restore-selftests.c: New file.
8398
8399 2017-04-19  Pedro Alves  <palves@redhat.com>
8400
8401         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8402         Re-sort in alphabetic order.
8403
8404 2017-04-18  Pedro Alves  <palves@redhat.com>
8405
8406         * xml-support.c (obstack_xml_printf): Delete.
8407         * xml-support.h (obstack_xml_printf): Delete.
8408
8409 2017-04-18  Pedro Alves  <palves@redhat.com>
8410
8411         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8412         vdebug, verror, body_text, start_element, end_element, name,
8413         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8414         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8415         is_xinclude>: Make private and add m_ prefix.
8416         (gdb_xml_parser::body_text): New method, based on ...
8417         (gdb_xml_body_text): ... this.  Adjust.
8418         (gdb_xml_parser::vdebug): New method, based on ...
8419         (gdb_xml_debug): ... this.  Adjust.
8420         (gdb_xml_parser::verror): New method, based on ...
8421         (gdb_xml_error): ... this.  Adjust.
8422         (gdb_xml_parser::start_element): New method, based on ...
8423         (gdb_xml_start_element): ... this.  Adjust.
8424         (gdb_xml_start_element_wrapper): Defer to
8425         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8426         (gdb_xml_parser::end_element): New method, based on ...
8427         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8428         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8429         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8430         (gdb_xml_parser::use_dtd): New method, based on ...
8431         (gdb_xml_use_dtd): ... this.  Adjust.
8432         (gdb_xml_parser::parse): New method, based on ...
8433         (gdb_xml_parse): ... this.  Adjust.
8434         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8435         (xinclude_start_include): Adjust to call the parser's name method.
8436         (xml_xinclude_default, xml_xinclude_start_doctype)
8437         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8438         method.
8439         (xml_process_xincludes): Adjust to call parser methods.
8440         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8441         declarations.
8442
8443 2017-04-18  Pedro Alves  <palves@redhat.com>
8444
8445         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8446         gdb::optional<std::string>.
8447         * xml-support.c: Include <string>.
8448         (scope_level::scope_level(scope_level &&))
8449         (scope_level::~scope_level): Delete.
8450         (scope_level::body): Now a std::string.
8451         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8452         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8453         parameter.
8454         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8455         (xinclude_parsing_data::output): Now a std::string reference.
8456         (xinclude_start_include): Adjust.
8457         (xml_xinclude_default): Adjust.
8458         (xml_process_xincludes): Add 'output' parameter, and return bool.
8459         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8460         and return bool.
8461         * xml-tdesc.c: Include <unordered_map> and <string>.
8462         (tdesc_xml_cache): Delete.
8463         (tdesc_xml_cache_s): Delete.
8464         (xml_cache): Now an std::unordered_map.
8465         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8466         (target_fetch_description_xml): Change return type to
8467         gdb::optional<std::string>, and adjust.
8468         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8469         (target_fetch_description_xml): Change return type to
8470         gdb::optional<std::string>.
8471
8472 2017-04-18  Pedro Alves  <palves@redhat.com>
8473
8474         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8475         unittests/optional-selftests.c.
8476         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8477         * unittests/optional-selftests.c: New file.
8478         * unittests/optional/assignment/1.cc: New file.
8479         * unittests/optional/assignment/2.cc: New file.
8480         * unittests/optional/assignment/3.cc: New file.
8481         * unittests/optional/assignment/4.cc: New file.
8482         * unittests/optional/assignment/5.cc: New file.
8483         * unittests/optional/assignment/6.cc: New file.
8484         * unittests/optional/assignment/7.cc: New file.
8485         * unittests/optional/cons/copy.cc: New file.
8486         * unittests/optional/cons/default.cc: New file.
8487         * unittests/optional/cons/move.cc: New file.
8488         * unittests/optional/cons/value.cc: New file.
8489         * unittests/optional/in_place.cc: New file.
8490         * unittests/optional/observers/1.cc: New file.
8491         * unittests/optional/observers/2.cc: New file.
8492
8493 2017-04-18  Pedro Alves  <palves@redhat.com>
8494
8495         * common/gdb_optional.h: Include common/traits.h.
8496         (in_place_t): New type.
8497         (in_place): New constexpr variable.
8498         (optional::optional): Remove member initialization of
8499         m_instantiated.
8500         (optional::optional(in_place_t...)): New constructor.
8501         (optional::~optional): Use reset.
8502         (optional::optional(const optional&)): New.
8503         (optional::optional(const optional&&)): New.
8504         (optional::optional(T &)): New.
8505         (optional::optional(T &&)): New.
8506         (operator::operator=(const optional &)): New.
8507         (operator::operator=(optional &&)): New.
8508         (operator::operator= (const T &))
8509         (operator::operator= (T &&))
8510         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8511         (operator::reset): New.
8512         (operator::m_instantiated):: Add in-class initializer.
8513         * common/traits.h: Include <type_traits>.
8514         (struct And): New types.
8515
8516 2017-04-18  Pedro Alves  <palves@redhat.com>
8517
8518         * xml-support.c: Include <vector>.
8519         (scope_level::scope_level(const gdb_xml_element *))
8520         (scope_level::scope_level(scope_level&&)): New.
8521         (scope_level::~scope_level): New.
8522         (scope_level_s): Delete.
8523         (gdb_xml_parser::scopes): Now a std::vector.
8524         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8525         Use std::vector.
8526         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8527         scope cleanup code.
8528         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8529         of the scopes member.  Use std::vector::emplace_back.
8530
8531 2017-04-18  Pedro Alves  <palves@redhat.com>
8532
8533         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8534         a bool.
8535         (gdb_xml_end_element): Change type of first parameter.
8536         (gdb_xml_cleanup): Rename to ...
8537         (gdb_xml_parser::~gdb_xml_parser): ... this.
8538         (gdb_xml_create_parser_and_cleanup): Delete with ...
8539         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8540         to this new ctor.
8541         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8542         using gdb_xml_create_parser_and_cleanup.
8543         (xinclude_parsing_data): Add ctor/dtor.
8544         (xml_xinclude_cleanup): Delete.
8545         (xml_process_xincludes): Create a local xinclude_parsing_data
8546         instead of heap-allocating one.  Create a local gdb_xml_parser
8547         instead of heap-allocating one with
8548         gdb_xml_create_parser_and_cleanup.
8549
8550 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8551
8552         PR threads/20743
8553         * fbsd-nat.c (resume_one_thread_cb): Remove.
8554         (resume_all_threads_cb): Remove.
8555         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8556         iterate_over_threads.
8557
8558 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8559
8560         * NEWS: Create a new section for the next release branch.
8561         Rename the section of the current branch, now that it has
8562         been cut.
8563
8564 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8565
8566         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8567         * version.in: Bump version to 8.0.50.DATE-git.
8568
8569 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8570
8571         PR gdb/21385
8572         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8573         independently of the host, and fix build breakage on Cygwin.
8574
8575 2017-04-13  Pedro Alves  <palves@redhat.com>
8576
8577         * inferior.c (free_inferior): Convert to ...
8578         (inferior::~inferior): ... this dtor.
8579         (inferior::inferior): New ctor, factored out from ...
8580         (add_inferior_silent): ... here.  Allocate the inferior with a new
8581         expression.
8582         (delete_inferior): Call delete instead of free_inferior.
8583         * inferior.h (gdb_environ, continuation): Forward declare.
8584         (inferior): Now a class.  Add in-class initialization to all
8585         members.  Make boolean fields bool, except 'detaching'.
8586         (inferior::inferior): New explicit ctor.
8587         (inferior::~inferior): New.
8588
8589 2017-04-13  Pedro Alves  <palves@redhat.com>
8590
8591         * inferior.c (init_inferior_list): Delete.
8592         * inferior.h (init_inferior_list): Delete.
8593
8594 2017-04-13  Pedro Alves  <palves@redhat.com>
8595
8596         PR threads/13217
8597         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8598         (top level): Call it twice, with different thread sets.
8599
8600 2017-04-13  Pedro Alves  <palves@redhat.com>
8601
8602         * thread.c: Include <algorithm>.
8603         (thread_array_cleanup): Delete.
8604         (scoped_inc_dec_ref): New class.
8605         (live_threads_count): New function.
8606         (set_thread_refcount): Delete.
8607         (tp_array_compar_ascending): Now a bool.
8608         (tp_array_compar): Convert to a std::sort comparison function.
8609         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8610         and live_threads_count.
8611
8612 2017-04-13  Pedro Alves  <palves@redhat.com>
8613
8614         * infrun.c (follow_fork_inferior): Also switch the current
8615         inferior.
8616
8617 2017-04-13  Pedro Alves  <palves@redhat.com>
8618
8619         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8620         before calling create_internal_breakpoint.
8621
8622 2017-04-13  Pedro Alves  <palves@redhat.com>
8623
8624         * fork-child.c (execv_argv): New class.
8625         (breakup_args): Refactored as ...
8626         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8627         Copy arguments to storage and replace separators with NULL
8628         terminators in place.
8629         (escape_bang_in_quoted_argument): Adjust to return bool.
8630         (execv_argv::execv_argv): New ctor.
8631         (execv_argv::init_for_shell): New method, factored out from
8632         fork_inferior.  Don't strdup strings into the vector.
8633         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8634         Remove free_vector_argv call.
8635
8636 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8637
8638         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8639         tdep->rx_psw_type.
8640
8641 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8642
8643         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8644         * rx-tdep.c (rx_gdbarch_init): Likewise.
8645
8646 2017-04-13  Pedro Alves  <palves@redhat.com>
8647
8648         * breakpoint.h (struct breakpoint): Reindent.
8649
8650 2017-04-13  Pedro Alves  <palves@redhat.com>
8651
8652         * breakpoint.c (bp_location): Rename to ...
8653         (bp_locations): ... this.  All references updated.
8654         (bp_location_count): Rename to ...
8655         (bp_locations_count): ... this.  All references updated.
8656         (bp_location_placed_address_before_address_max): Rename to ...
8657         (bp_locations_placed_address_before_address_max): ... this.  All
8658         references updated.
8659         (bp_location_shadow_len_after_address_max): Rename to ...
8660         (bp_locations_shadow_len_after_address_max): ... this.  All
8661         references updated.
8662         (bp_location_compare_addrs): Rename to ...
8663         (bp_locations_compare_addrs): ... this.  All references updated.
8664         (bp_location_compare):Rename to ...
8665         (bp_locations_compare): ... this.  All references updated.
8666         (bp_location_target_extensions_update): Rename to ...
8667         (bp_locations_target_extensions_update): ... this.  All references
8668         updated.
8669
8670 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8671
8672         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8673         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8674         'sgtty.h'.
8675         * common/gdb_termios.h: New file, with parts of "terminal.h".
8676         * inflow.c: Include "gdb_termios.h".
8677         * ser-unix.c: Include "gdb_termios.h".
8678         * terminal.h: Move terminal-related defines to
8679         "common/gdb_termios.h".
8680
8681 2017-04-12  Tom Tromey  <tom@tromey.com>
8682
8683         * probe.c (parse_probes): Update.
8684         * location.h (delete_event_location): Don't declare.
8685         (event_location_deleter::operator()): Update.
8686         * location.c (event_location_deleter::operator()): Rename from
8687         delete_event_location.
8688         * linespec.h (linespec_result) <location>: Change type to
8689         event_location_up.
8690         * linespec.c (canonicalize_linespec, event_location_to_sals)
8691         (decode_objc): Update.
8692         (linespec_result): Don't call delete_event_location.
8693         * breakpoint.c (create_breakpoints_sal)
8694         (bkpt_probe_create_sals_from_location)
8695         (strace_marker_create_sals_from_location): Update.
8696
8697 2017-04-12  Tom Tromey  <tom@tromey.com>
8698
8699         * linespec.h (struct linespec_result): Add constructor and
8700         destructor.
8701         (init_linespec_result, destroy_linespec_result)
8702         (make_cleanup_destroy_linespec_result): Don't declare.
8703         * linespec.c (init_linespec_result): Remove.
8704         (linespec_result::~linespec_result): Rename from
8705         destroy_linespec_result.  Update.
8706         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
8707         Remove.
8708         * breakpoint.c (create_breakpoint, break_range_command)
8709         (decode_location_default): Update.
8710         * ax-gdb.c (agent_command_1): Update.
8711
8712 2017-04-12  Tom Tromey  <tom@tromey.com>
8713
8714         * remote.c (remote_download_tracepoint): Update.
8715         * python/py-breakpoint.c (bppy_get_location): Update.
8716         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
8717         (gdbscm_breakpoint_location): Update.
8718         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
8719         * breakpoint.h (struct breakpoint) <location, location_range_end>:
8720         Change type to event_location_up.
8721         * breakpoint.c (create_overlay_event_breakpoint)
8722         (create_longjmp_master_breakpoint)
8723         (create_std_terminate_master_breakpoint)
8724         (create_exception_master_breakpoint)
8725         (breakpoint_event_location_empty_p, print_breakpoint_location)
8726         (print_one_breakpoint_location, create_thread_event_breakpoint)
8727         (init_breakpoint_sal, create_breakpoint)
8728         (print_recreate_ranged_breakpoint, break_range_command)
8729         (init_ada_exception_breakpoint, say_where): Update.
8730         (base_breakpoint_dtor): Don't call delete_event_location.
8731         (bkpt_print_recreate, tracepoint_print_recreate)
8732         (dprintf_print_recreate, update_static_tracepoint)
8733         (breakpoint_re_set_default): Update.
8734
8735 2017-04-12  Tom Tromey  <tom@tromey.com>
8736
8737         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
8738         type of "to_do".  Update.
8739         (compute_stack_depth): Use std::vector.
8740
8741 2017-04-12  Tom Tromey  <tom@tromey.com>
8742
8743         * printcmd.c (find_instruction_backward): Use std::vector.
8744
8745 2017-04-12  Tom Tromey  <tom@tromey.com>
8746
8747         * symfile.c (objfilep): Remove typedef.
8748         (reread_symbols): Use a std::vector.
8749
8750 2017-04-12  Tom Tromey  <tom@tromey.com>
8751
8752         * mi/mi-main.c (exec_direction_forward): Remove.
8753         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
8754         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8755         scoped_restore.
8756         * guile/guile.c (guile_repl_command, guile_command)
8757         (gdbscm_execute_gdb_command): Use scoped_restore.
8758         * go-exp.y (go_parse): Use scoped_restore.
8759         * d-exp.y (d_parse): Use scoped_restore.
8760         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8761         * c-exp.y (c_parse): Use scoped_restore.
8762
8763 2017-04-12  Tom Tromey  <tom@tromey.com>
8764
8765         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8766         (mi_parse): Update return type.
8767         (mi_parse_free): Remove.
8768         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8769         (mi_parse::~mi_parse): Rename from mi_parse_free.
8770         (mi_parse_cleanup): Remove.
8771         (mi_parse): Return a unique_ptr.  Use new.
8772         * mi/mi-main.c (mi_execute_command): Update.
8773
8774 2017-04-12  Tom Tromey  <tom@tromey.com>
8775
8776         * location.c (explicit_location_lex_one): Return a
8777         unique_xmalloc_ptr.
8778         (string_to_explicit_location): Update.  Remove cleanups.
8779
8780 2017-04-12  Tom Tromey  <tom@tromey.com>
8781
8782         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8783         (compare_value_and_voffset): Change type.  Update.
8784         (compute_vtable_size): Change type of "offset_vec".
8785         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8786         (gnuv3_get_typeid): Remove extraneous declaration.
8787
8788 2017-04-12  Tom Tromey  <tom@tromey.com>
8789
8790         * charset.h (wchar_iterator): Fix comment.
8791
8792 2017-04-12  Tom Tromey  <tom@tromey.com>
8793
8794         * charset.c (iconv_wrapper): New class.
8795         (cleanup_iconv): Remove.
8796         (convert_between_encodings): Use it.
8797
8798 2017-04-12  Tom Tromey  <tom@tromey.com>
8799
8800         * symfile.h (increment_reading_symtab): Update type.
8801         * symfile.c (decrement_reading_symtab): Remove.
8802         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8803         * psymtab.c (psymtab_to_symtab): Update.
8804         * dwarf2read.c (dw2_instantiate_symtab): Update.
8805
8806 2017-04-12  Tom Tromey  <tom@tromey.com>
8807
8808         * jit.c (struct jit_reader): Declare separately.  Add constructor
8809         and destructor.  Change type of "handle".
8810         (loaded_jit_reader): Define separately.
8811         (jit_reader_load): Update.  New "new".
8812         (jit_reader_unload_command): Use "delete".
8813         * gdb-dlfcn.h (struct dlclose_deleter): New.
8814         (gdb_dlhandle_up): New typedef.
8815         (gdb_dlopen, gdb_dlsym): Update types.
8816         (gdb_dlclose): Remove.
8817         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8818         (gdb_dlsym): Change type of "handle".
8819         (make_cleanup_dlclose): Remove.
8820         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8821         * compile/compile-c-support.c (load_libcc): Update.
8822
8823 2017-04-12  Tom Tromey  <tom@tromey.com>
8824
8825         * symtab.h (find_pcs_for_symtab_line): Change return type.
8826         * symtab.c (find_pcs_for_symtab_line): Change return type.
8827         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8828         type of "vec".  Update.
8829         (ltpy_get_pcs_for_line): Update.
8830         * linespec.c (decode_digits_ordinary): Update.
8831
8832 2017-04-12  Tom Tromey  <tom@tromey.com>
8833
8834         * tracepoint.c (actions_command): Update.
8835         * python/python.c (python_command, python_interactive_command):
8836         Update.
8837         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8838         * guile/guile.c (guile_command): Update.
8839         * defs.h (read_command_lines, read_command_lines_1): Return
8840         command_line_up.
8841         (command_lines_deleter): New struct.
8842         (command_line_up): New typedef.
8843         * compile/compile.c (compile_code_command)
8844         (compile_print_command): Update.
8845         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8846         command_line_up.
8847         (make_cleanup_free_command_lines): Remove.
8848         * cli/cli-script.c (get_command_line, read_command_lines_1)
8849         (copy_command_lines): Return command_line_up.
8850         (while_command, if_command, read_command_lines, define_command)
8851         (document_command): Update.
8852         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8853         Remove.
8854         * breakpoint.h (breakpoint_set_commands): Change type of
8855         "commands".
8856         * breakpoint.c (breakpoint_set_commands): Change type of
8857         "commands".  Update.
8858         (do_map_commands_command, update_dprintf_command_list)
8859         (create_tracepoint_from_upload): Update.
8860
8861 2017-04-12  Tom Tromey  <tom@tromey.com>
8862
8863         * tracepoint.c (scope_info): Update.
8864         * spu-tdep.c (spu_catch_start): Update.
8865         * python/python.c (gdbpy_decode_line): Update.
8866         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8867         * python/py-breakpoint.c (bppy_init): Update.
8868         * probe.c (parse_probes): Update.
8869         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8870         * location.h (event_location_deleter): New struct.
8871         (event_location_up): New typedef.
8872         (new_linespec_location, new_address_location, new_probe_location)
8873         (new_explicit_location, copy_event_location)
8874         (string_to_event_location, string_to_event_location_basic)
8875         (string_to_explicit_location): Update return type.
8876         (make_cleanup_delete_event_location): Remove.
8877         * location.c (new_linespec_location, new_address_location)
8878         (new_probe_location, new_explicit_location, copy_event_location):
8879         Return event_location_up.
8880         (delete_event_location_cleanup)
8881         (make_cleanup_delete_event_location): Remove.
8882         (string_to_explicit_location, string_to_event_location_basic)
8883         (string_to_event_location): Return event_location_up.
8884         * linespec.c (canonicalize_linespec, event_location_to_sals)
8885         (decode_line_with_current_source)
8886         (decode_line_with_last_displayed, decode_objc): Update.
8887         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8888         * completer.c (location_completer): Update.
8889         * cli/cli-cmds.c (edit_command, list_command): Update.
8890         * breakpoint.c (create_overlay_event_breakpoint)
8891         (create_longjmp_master_breakpoint)
8892         (create_std_terminate_master_breakpoint)
8893         (create_exception_master_breakpoint)
8894         (create_thread_event_breakpoint): Update.
8895         (init_breakpoint_sal): Update.  Remove some dead code.
8896         (create_breakpoint_sal): Change type of "location".  Update.
8897         (create_breakpoints_sal, create_breakpoint, break_command_1)
8898         (dprintf_command, break_range_command, until_break_command)
8899         (init_ada_exception_breakpoint)
8900         (strace_marker_create_sals_from_location)
8901         (update_static_tracepoint, trace_command, ftrace_command)
8902         (strace_command, create_tracepoint_from_upload): Update.
8903         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8904         * ax-gdb.c (agent_command_1): Update.
8905
8906 2017-04-12  Pedro Alves  <palves@redhat.com>
8907
8908         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8909         * configure.tgt: Handle i[34567]86-*-go32* and
8910         i[34567]86-*-msdosdjgpp*.
8911         * i386-tdep.c (i386_svr4_reg_to_regnum):
8912         Make extern.
8913         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8914         i386-go32-tdep.c.
8915         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8916         * i386-go32-tdep.c: New file.
8917         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8918         declarations.
8919
8920 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8921
8922         * aix-thread.c (pd_status2str): Change return type to const char *.
8923
8924 2017-04-12  Pedro Alves  <palves@redhat.com>
8925
8926         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8927         calls to set_gdbarch_gnu_triplet_regexp.
8928
8929 2017-04-12  Pedro Alves  <palves@redhat.com>
8930
8931         PR gdb/21323
8932         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8933         New enum value.
8934         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8935         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8936         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8937         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8938         * gdbarch.h, gdbarch.c: Regenerate.
8939         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8940         gdbarch_wchar_bit and gdbarch_wchar_signed.
8941         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8942         * arm-tdep.c (arm_gdbarch_init): Likewise.
8943         * avr-tdep.c (avr_gdbarch_init): Likewise.
8944         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8945         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8946         * i386-tdep.c (i386_go32_init_abi): Likewise.
8947         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8948         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8949         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8950         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8951         * sh-tdep.c (sh_gdbarch_init): Likewise.
8952         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8953         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8954         * windows-tdep.c (windows_init_abi): Likewise.
8955         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8956
8957 2017-04-12  Pedro Alves  <palves@redhat.com>
8958
8959         PR c++/21323
8960         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8961         cplus_primitive_type_char32_t>: New enum values.
8962         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8963         and cplus_primitive_type_char32_t.
8964         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8965         32, use the archtecture's built-in type for char16_t and char32_t,
8966         respectively.  Otherwise, fallback to init_integer_type as before,
8967         but make the type unsigned, and issue a complaint.
8968         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8969
8970 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8971
8972         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8973         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8974
8975 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8976
8977         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8978         'const char *'.
8979
8980 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8981
8982         * common/common-utils.c (free_vector_argv): New function.
8983         * common/common-utils.h: Include <vector>.
8984         (free_vector_argv): New prototype.
8985         * darwin-nat.c (darwin_create_inferior): Rewrite function
8986         prototype in order to constify "exec_file" and accept a
8987         "std::string" for "allargs".
8988         * fork-child.c: Include <vector>.
8989         (breakup_args): Rewrite function, using C++.
8990         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8991         and accept "std::string" for "allargs".  Update the code to
8992         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8993         and "execvp".
8994         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8995         order to constify "exec_file" and accept a "std::string" for
8996         "allargs".
8997         * go32-nat.c (go32_create_inferior): Likewise.
8998         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8999         * infcmd.c (run_command_1): Constify "exec_file".  Use
9000         "std::string" for inferior arguments.
9001         * inferior.h (fork_inferior): Update prototype.
9002         * linux-nat.c (linux_nat_create_inferior): Rewrite function
9003         prototype in order to constify "exec_file" and accept a
9004         "std::string" for "allargs".
9005         * nto-procfs.c (procfs_create_inferior): Likewise.
9006         * procfs.c (procfs_create_inferior): Likewise.
9007         * remote-sim.c (gdbsim_create_inferior): Likewise.
9008         * remote.c (extended_remote_run): Update code to accept
9009         "std::string" as argument.
9010         (extended_remote_create_inferior): Rewrite function prototype in
9011         order to constify "exec_file" and accept a "std::string" for
9012         "allargs".
9013         * rs6000-nat.c (super_create_inferior): Likewise.
9014         (rs6000_create_inferior): Likewise.
9015         * target.h (struct target_ops) <to_create_inferior>: Likewise.
9016         * windows-nat.c (windows_create_inferior): Likewise.
9017
9018 2017-04-11  Pedro Alves  <palves@redhat.com>
9019
9020         * thread.c: Fix whitespace throughout.
9021
9022 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9023
9024         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9025
9026 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
9027
9028         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9029
9030 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
9031
9032         PR gdb/21364
9033         * osdata.c (info_osdata): Check if 'type' is an empty string
9034         instead of NULL.
9035
9036 2017-04-10  Pedro Alves  <palves@redhat.com>
9037
9038         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9039         (ptid_to_global_thread_id, in_thread_list)
9040         (do_captured_list_thread_ids, set_resumed, set_running)
9041         (set_executing, set_stop_requested, finish_thread_state)
9042         (validate_registers_access, can_access_registers_ptid)
9043         (print_thread_info_1, switch_to_thread)
9044         (do_restore_current_thread_cleanup)
9045         (make_cleanup_restore_current_thread, thread_command)
9046         (thread_name_command): Use operator== instead of ptid_equal.
9047
9048 2017-04-10  Pedro Alves  <palves@redhat.com>
9049
9050         * thread.c (struct current_thread_cleanup) <next>: Delete field.
9051         (current_thread_cleanup_chain): Delete.
9052         (restore_current_thread_cleanup_dtor)
9053         (make_cleanup_restore_current_thread): Remove references to
9054         current_thread_cleanup_chain.
9055
9056 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
9057
9058         * msp430-tdep.c (msp430_pseudo_register_read): Never return
9059         REG_UNKNOWN.
9060
9061 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9062
9063         PR gdb/19942
9064         * gdbthread.h (thread_info::deletable): New method.
9065         (thread_info::incref): New method.
9066         (thread_info::decref): New method.
9067         (thread_info::refcount): Move it to private.
9068         * infrun.c (save_stop_context): Call inc_refcount.
9069         (release_stop_context_cleanup): Likewise.
9070         * thread.c (set_thread_exited): New function.
9071         (init_thread_list): Delete "tp" only it is deletable, otherwise
9072         call set_thread_exited.
9073         (delete_thread_1): Call set_thread_exited.
9074         (current_thread_cleanup) <inferior_pid>: Remove.
9075         <thread>: New field.
9076         (restore_current_thread_ptid_changed): Removed.
9077         (do_restore_current_thread_cleanup): Adjust.
9078         (restore_current_thread_cleanup_dtor): Don't call
9079         find_thread_ptid.
9080         (set_thread_refcount): Use dec_refcount.
9081         (make_cleanup_restore_current_thread): Adjust.
9082         (thread_apply_all_command): Call inc_refcount.
9083         (_initialize_thread): Don't call
9084         observer_attach_thread_ptid_changed.
9085
9086 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9087
9088         * thread.c (delete_thread_1): Hoist code on marking thread as
9089         exited.
9090
9091 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9092
9093         * windows-nat.c (windows_detach): Initialize ptid with
9094         minus_one_ptid.
9095
9096 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9097
9098         * unittests/ptid-selftests.c: Fix erroneous assert messages.
9099
9100 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
9101
9102         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9103         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9104         (bfin_pseudo_register_write): Likewise
9105
9106 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9107
9108         * common/ptid.h (struct ptid): Change to...
9109         (class ptid_t): ... this.
9110         <ptid_t>: New constructors.
9111         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9112         matches>: New methods.
9113         <make_null, make_minus_one>: New static methods.
9114         <pid>: Rename to...
9115         <m_pid>: ...this.
9116         <lwp>: Rename to...
9117         <m_lwp>: ...this.
9118         <tid>: Rename to...
9119         <m_tid>: ...this.
9120         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9121         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9122         as references, move comment to class ptid_t.
9123         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9124         ptid_t static methods.
9125         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9126         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9127         Take ptid arguments as references, implement using ptid_t methods.
9128         * unittests/ptid-selftests.c: New file.
9129         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9130         unittests/ptid-selftests.c.
9131         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9132
9133 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9134
9135         * python/python.c (python_run_simple_file): Cast mode literal to
9136         non-const char pointer as expected by PyFile_FromString.
9137
9138 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9139
9140         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9141         minus_one_ptid and null_ptid.
9142
9143 2017-04-05  Pedro Alves  <palves@redhat.com>
9144
9145         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9146         * configure: Regenerate.
9147
9148 2017-04-05  Pedro Alves  <palves@redhat.com>
9149
9150         * ada-exp.y (yyerror): Constify.
9151         * ada-lang.c (bound_name, get_selections)
9152         (ada_variant_discrim_type)
9153         (ada_variant_discrim_name, ada_value_struct_elt)
9154         (ada_lookup_struct_elt_type, is_unchecked_variant)
9155         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9156         (catch_ada_exception_command_split)
9157         (catch_ada_assert_command_split, catch_assert_command)
9158         (ada_op_name): Constify.
9159         * ada-lang.h (ada_yyerror, get_selections)
9160         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9161         * arc-tdep.c (arc_print_frame_cache): Constify.
9162         * arm-tdep.c (arm_skip_stub): Constify.
9163         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9164         (gen_aggregate_elt_ref): Constify.
9165         * bcache.c (print_bcache_statistics): Constify.
9166         * bcache.h (print_bcache_statistics): Constify.
9167         * break-catch-throw.c (catch_exception_command_1):
9168         * breakpoint.c (struct ep_type_description::description):
9169         Constify.
9170         (add_solib_catchpoint): Constify.
9171         (catch_fork_command_1): Add cast.
9172         (add_catch_command): Constify.
9173         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9174         Constify.
9175         * bsd-uthread.c (bsd_uthread_state): Constify.
9176         * buildsym.c (patch_subfile_names): Constify.
9177         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9178         Constify.
9179         * c-exp.y (yyerror): Constify.
9180         (token::oper): Constify.
9181         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9182         * c-varobj.c (cplus_describe_child): Constify.
9183         * charset.c (find_charset_names): Add cast.
9184         (find_charset_names): Constify array and add const_cast.
9185         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9186         (edit_command): Constify.
9187         * cli/cli-decode.c (lookup_cmd): Constify.
9188         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9189         Constify.
9190         (struct dump_context): Constify.
9191         (add_dump_command, restore_command): Constify.
9192         * cli/cli-script.c (get_command_line): Constify.
9193         * cli/cli-script.h (get_command_line): Constify.
9194         * cli/cli-utils.c (check_for_argument): Constify.
9195         * cli/cli-utils.h (check_for_argument): Constify.
9196         * coff-pe-read.c (struct read_pe_section_data): Constify.
9197         * command.h (lookup_cmd): Constify.
9198         * common/print-utils.c (decimal2str): Constify.
9199         * completer.c (gdb_print_filename): Constify.
9200         * corefile.c (set_gnutarget): Constify.
9201         * cp-name-parser.y (yyerror): Constify.
9202         * cp-valprint.c (cp_print_class_member): Constify.
9203         * cris-tdep.c (cris_register_name, crisv32_register_name):
9204         Constify.
9205         * d-exp.y (yyerror): Constify.
9206         (struct token::oper): Constify.
9207         * d-lang.h (d_yyerror): Constify.
9208         * dbxread.c (struct header_file_location::name): Constify.
9209         (add_old_header_file, add_new_header_file, last_function_name)
9210         (dbx_next_symbol_text, add_bincl_to_list)
9211         (find_corresponding_bincl_psymtab, set_namestring)
9212         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9213         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9214         * defs.h (command_line_input, print_address_symbolic)
9215         (deprecated_readline_begin_hook): Constify.
9216         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9217         Constify.
9218         * event-top.c (handle_line_of_input): Constify and add cast.
9219         * exceptions.c (catch_errors): Constify.
9220         * exceptions.h (catch_errors): Constify.
9221         * expprint.c (print_subexp_standard, op_string, op_name)
9222         (op_name_standard, dump_raw_expression, dump_raw_expression):
9223         * expression.h (op_name, op_string, dump_raw_expression):
9224         Constify.
9225         * f-exp.y (yyerror): Constify.
9226         (struct token::oper): Constify.
9227         (struct f77_boolean_val::name): Constify.
9228         * f-lang.c (f_word_break_characters): Constify.
9229         * f-lang.h (f_yyerror): Constify.
9230         * fork-child.c (fork_inferior): Add cast.
9231         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9232         (new_variant): Constify.
9233         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9234         * gdbarch.c: Regenerate.
9235         * gdbcore.h (set_gnutarget): Constify.
9236         * go-exp.y (yyerror): Constify.
9237         (token::oper): Constify.
9238         * go-lang.h (go_yyerror): Constify.
9239         * go32-nat.c (go32_sysinfo): Constify.
9240         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9241         * guile/scm-cmd.c (cmdscm_function): Constify.
9242         * guile/scm-param.c (pascm_param_value): Constify.
9243         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9244         (h8300sx_register_name): Constify.
9245         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9246         Constify.
9247         * ia64-tdep.c (ia64_register_names): Constify.
9248         * infcmd.c (construct_inferior_arguments): Constify.
9249         (path_command, attach_post_wait): Constify.
9250         * language.c (show_range_command, show_case_command)
9251         (unk_lang_error): Constify.
9252         * language.h (language_defn::la_error)
9253         (language_defn::la_name_of_this): Constify.
9254         * linespec.c (decode_line_2): Constify.
9255         * linux-thread-db.c (thread_db_err_str): Constify.
9256         * lm32-tdep.c (lm32_register_name): Constify.
9257         * m2-exp.y (yyerror): Constify.
9258         * m2-lang.h (m2_yyerror): Constify.
9259         * m32r-tdep.c (m32r_register_names): Constify and make static.
9260         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9261         * m88k-tdep.c (m88k_register_name): Constify.
9262         * macroexp.c (appendmem): Constify.
9263         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9264         (upgrade_type, parse_external, parse_partial_symbols)
9265         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9266         (new_symbol): Constify.
9267         * memattr.c (mem_info_command): Constify.
9268         * mep-tdep.c (register_name_from_keyword): Constify.
9269         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9270         Constify.
9271         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9272         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9273         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9274         cast.
9275         (mi_execute_async_cli_command): Constify.
9276         * mips-tdep.c (mips_register_name): Constify.
9277         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9278         (am33_register_name, am33_2_register_name)
9279         * moxie-tdep.c (moxie_register_names): Constify.
9280         * nat/linux-osdata.c (osdata_type): Constify fields.
9281         * nto-tdep.c (nto_parse_redirection): Constify.
9282         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9283         (lookup_child_selector): Constify.
9284         (objc_methcall::name): Constify.
9285         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9286         (lookup_struct_typedef): Constify.
9287         * objfiles.c (pc_in_section): Constify.
9288         * objfiles.h (pc_in_section): Constify.
9289         * p-exp.y (struct token::oper): Constify.
9290         (yyerror): Constify.
9291         * p-lang.h (pascal_yyerror): Constify.
9292         * parser-defs.h (op_name_standard): Constify.
9293         (op_print::string): Constify.
9294         (exp_descriptor::op_name): Constify.
9295         * printcmd.c (print_address_symbolic): Constify.
9296         * psymtab.c (print_partial_symbols): Constify.
9297         * python/py-breakpoint.c (stop_func): Constify.
9298         (bppy_get_expression): Constify.
9299         * python/py-cmd.c (cmdpy_completer::name): Constify.
9300         (cmdpy_function): Constify.
9301         * python/py-event.c (evpy_add_attribute)
9302         (gdbpy_initialize_event_generic): Constify.
9303         * python/py-event.h (evpy_add_attribute)
9304         (gdbpy_initialize_event_generic): Constify.
9305         * python/py-evts.c (add_new_registry): Constify.
9306         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9307         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9308         * python/py-inferior.c (get_buffer): Add cast.
9309         * python/py-param.c (parm_constant::name): Constify.
9310         * python/py-unwind.c (fprint_frame_id): Constify.
9311         * python/python.c (gdbpy_parameter_value): Constify.
9312         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9313         * remote.c (memory_packet_config::name): Constify.
9314         (show_packet_config_cmd, remote_write_bytes)
9315         (remote_buffer_add_string):
9316         * reverse.c (exec_reverse_once): Constify.
9317         * rs6000-tdep.c (variant::name, variant::description): Constify.
9318         * rust-exp.y (rustyyerror): Constify.
9319         * rust-lang.c (rust_op_name): Constify.
9320         * rust-lang.h (rustyyerror): Constify.
9321         * serial.h (serial_ops::name): Constify.
9322         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9323         (sh_sh3e_register_name, sh_sh2e_register_name)
9324         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9325         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9326         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9327         (sh_sh4al_dsp_register_name): Constify.
9328         * sh64-tdep.c (sh64_register_name): Constify.
9329         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9330         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9331         * stabsread.c (patch_block_stabs, read_type_number)
9332         (ref_map::stabs, ref_add, process_reference)
9333         (symbol_reference_defined, define_symbol, define_symbol)
9334         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9335         (read_one_struct_field, read_struct_fields, read_baseclasses)
9336         (read_tilde_fields, read_struct_type, read_array_type)
9337         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9338         (read_huge_number, read_range_type, read_args, common_block_start)
9339         (find_name_end): Constify.
9340         * stabsread.h (common_block_start, define_symbol)
9341         (process_one_symbol, symbol_reference_defined, ref_add):
9342         * symfile.c (get_section_index, add_symbol_file_command):
9343         * symfile.h (get_section_index): Constify.
9344         * target-descriptions.c (tdesc_type::name): Constify.
9345         (tdesc_free_type): Add cast.
9346         * target.c (find_default_run_target):
9347         (add_deprecated_target_alias, find_default_run_target)
9348         (target_announce_detach): Constify.
9349         (do_option): Constify.
9350         * target.h (add_deprecated_target_alias): Constify.
9351         * thread.c (print_thread_info_1): Constify.
9352         * top.c (deprecated_readline_begin_hook, command_line_input):
9353         Constify.
9354         (init_main): Add casts.
9355         * top.h (handle_line_of_input): Constify.
9356         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9357         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9358         (tfind_command): Rename to ...
9359         (tfind_command_1): ... this and constify.
9360         (tfind_command): New function.
9361         (tfind_end_command, tfind_start_command): Adjust.
9362         (encode_source_string): Constify.
9363         * tracepoint.h (encode_source_string): Constify.
9364         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9365         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9366         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9367         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9368         * tui/tui-win.c (parse_scrolling_args): Constify.
9369         * tui/tui-windata.c (tui_erase_data_content): Constify.
9370         * tui/tui-windata.h (tui_erase_data_content): Constify.
9371         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9372         * tui/tui.c (tui_enable): Add cast.
9373         * utils.c (defaulted_query): Constify.
9374         (init_page_info): Add cast.
9375         (puts_debug, subset_compare): Constify.
9376         * utils.h (subset_compare): Constify.
9377         * varobj.c (varobj_format_string): Constify.
9378         * varobj.h (varobj_format_string): Constify.
9379         * vax-tdep.c (vax_register_name): Constify.
9380         * windows-nat.c (windows_detach): Constify.
9381         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9382         * xml-support.c (gdb_xml_end_element): Constify.
9383         * xml-tdesc.c (tdesc_start_reg): Constify.
9384         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9385         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9386         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9387
9388 2017-04-05  Pedro Alves  <palves@redhat.com>
9389
9390         * proc-api.c (struct trans): Constify.
9391         (procfs_note): Constify.
9392         * proc-events.c (struct trans, syscall_table):
9393         * proc-flags.c (struct trans): Constify.
9394         * proc-utils.h (procfs_note): Constify.
9395         * proc-why.c (struct trans): Constify.
9396         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9397         (procfs_detach): Constify.
9398         * sol-thread.c (struct string_map): Constify.
9399         (td_err_string, td_state_string): Constify.
9400
9401 2017-04-05  Pedro Alves  <palves@redhat.com>
9402
9403         * proc-api.c (procfs_filename): Don't initialize
9404         procfs_filename.
9405         (prepare_to_trace): Assume procfs_filename is non-NULL.
9406         (_initialize_proc_api): Give procfs_filename a default value here.
9407
9408 2017-04-05  Pedro Alves  <palves@redhat.com>
9409
9410         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9411         'cond_string' parameter.
9412         (extract_exception_regexp): Constify 'string' parameter.
9413         (catch_exception_command_1): Constify.
9414         * breakpoint.c (init_catchpoint)
9415         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9416         parameter.
9417         (ep_parse_optional_if_clause, catch_fork_command_1)
9418         (catch_exec_command_1): Constify.
9419         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9420         parameter.
9421         (ep_parse_optional_if_clause): Constify.
9422         * cli/cli-utils.c (remove_trailing_whitespace)
9423         (check_for_argument): Constify.
9424         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9425         non-const overload.
9426         (check_for_argument): Likewise.
9427
9428 2017-04-05  Pedro Alves  <palves@redhat.com>
9429
9430         * event-top.c (command_line_handler): Add cast to execute_command
9431         call.
9432         * record-btrace.c (cmd_record_btrace_bts_start)
9433         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9434         (cmd_record_btrace_start): Add cast to execute_command call.
9435         * record-full.c (record_full_goto_insn):
9436         * record.c (record_start, record_stop): Add cast to
9437         execute_command_to_string calls.
9438         (cmd_record_start): Add cast to execute_command calls.
9439
9440 2017-04-05  Pedro Alves  <palves@redhat.com>
9441
9442         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9443         static inline function.
9444         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9445         array and use gdb_PyArg_ParseTupleAndKeywords.
9446         * python/py-cmd.c (cmdpy_init): Likewise.
9447         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9448         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9449         (infpy_search_memory): Likewise.
9450         * python/py-objfile.c (objfpy_add_separate_debug_file)
9451         (gdbpy_lookup_objfile): Likewise.
9452         * python/py-symbol.c (gdbpy_lookup_symbol)
9453         (gdbpy_lookup_global_symbol): Likewise.
9454         * python/py-type.c (gdbpy_lookup_type): Likewise.
9455         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9456         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9457         Likewise.
9458
9459 2017-04-05  Pedro Alves  <palves@redhat.com>
9460
9461         * python/python-internal.h (gdb_PyGetSetDef): New type.
9462         * python/py-block.c (block_object_getset)
9463         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9464         * python/py-event.c (event_object_getset)
9465         (finish_breakpoint_object_getset): Likewise.
9466         * python/py-inferior.c (inferior_object_getset): Likewise.
9467         * python/py-infthread.c (thread_object_getset): Likewise.
9468         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9469         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9470         * python/py-objfile.c (objfile_getset): Likewise.
9471         * python/py-progspace.c (pspace_getset): Likewise.
9472         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9473         Likewise.
9474         * python/py-record.c (recpy_record_getset): Likewise.
9475         * python/py-symbol.c (symbol_object_getset): Likewise.
9476         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9477         Likewise.
9478         * python/py-type.c (type_object_getset, field_object_getset):
9479         Likewise.
9480         * python/py-value.c (value_object_getset): Likewise.
9481
9482 2017-04-05  Pedro Alves  <palves@redhat.com>
9483
9484         * python/python-internal.h (gdb_PyObject_CallMethod)
9485         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9486         New functions.
9487         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9488         (PySys_GetObject, PySys_SetPath): New macros.
9489
9490 2017-04-05  Pedro Alves  <palves@redhat.com>
9491
9492         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9493         info_osdata_command.
9494         * osdata.c (info_osdata_command): Rename to ...
9495         (info_osdata): ... this.  Constify 'type' parameter, and remove
9496         the 'from_tty' parameter.  Accept NULL TYPE.
9497         (info_osdata_command): New function.
9498         * osdata.h (info_osdata_command): Remove declaration.
9499         (info_osdata): New declaration.
9500
9501 2017-04-05  Pedro Alves  <palves@redhat.com>
9502
9503         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9504         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9505         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9506         parameter.
9507         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9508         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9509         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9510         parameter.
9511         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9512         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9513         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9514         (mi_cmd_file_list_exec_source_files)
9515         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9516         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9517         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9518         parameter.
9519         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9520         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9521         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9522         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9523         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9524         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9525         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9526         'command' parameter.
9527         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9528         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9529         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9530         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9531         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9532         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9533         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9534         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9535         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9536         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9537         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9538         parameter.
9539         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9540         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9541         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9542         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9543         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9544         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9545         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9546         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9547         (mi_cmd_data_list_changed_registers)
9548         (mi_cmd_data_write_register_values)
9549         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9550         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9551         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9552         (mi_cmd_list_features, mi_cmd_list_target_features)
9553         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9554         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9555         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9556         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9557         (mi_cmd_trace_frame_collected): Constify 'command'
9558         parameter.
9559         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9560         'command' parameter.
9561
9562 2017-04-05  Pedro Alves  <palves@redhat.com>
9563
9564         * ada-lang.c (ada_completer_word_break_characters): Now a const
9565         array.
9566         (ada_get_gdb_completer_word_break_characters): Constify.
9567         * completer.c (gdb_completer_command_word_break_characters)
9568         (gdb_completer_file_name_break_characters)
9569         (gdb_completer_quote_characters): Now const arrays.
9570         (get_gdb_completer_quote_characters): Constify.
9571         (set_rl_completer_word_break_characters): New function.
9572         (set_gdb_completion_word_break_characters)
9573         (complete_line_internal): Use it.
9574         * completer.h (get_gdb_completer_quote_characters): Constify.
9575         (set_rl_completer_word_break_characters): Declare.
9576         * f-lang.c (f_word_break_characters): Constify.
9577         * language.c (default_word_break_characters): Constify.
9578         * language.h (language_defn::la_word_break_characters): Constify.
9579         (default_word_break_characters): Constify.
9580         * top.c (init_main): Use set_rl_completer_word_break_characters.
9581
9582 2017-04-05  Pedro Alves  <palves@redhat.com>
9583
9584         * aix-thread.c (aix_thread_pid_to_str)
9585         (aix_thread_extra_thread_info): Constify.
9586         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9587         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9588         (bsd_uthread_pid_to_str): Constify.
9589         * corelow.c (core_pid_to_str): Constify.
9590         * darwin-nat.c (darwin_pid_to_str): Constify.
9591         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9592         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9593         Constify.
9594         * gnu-nat.c (gnu_pid_to_str): Constify.
9595         * go32-nat.c (go32_pid_to_str): Constify.
9596         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9597         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9598         * inferior.c (inferior_pid_to_str): Constify.
9599         * linux-nat.c (linux_nat_pid_to_str): Constify.
9600         * linux-tdep.c (linux_core_pid_to_str): Constify.
9601         * linux-thread-db.c (thread_db_pid_to_str)
9602         (thread_db_extra_thread_info): Constify.
9603         * nto-tdep.c (nto_extra_thread_info): Constify.
9604         * nto-tdep.h (nto_extra_thread_info): Constify.
9605         * obsd-nat.c (obsd_pid_to_str): Constify.
9606         * procfs.c (procfs_pid_to_str): Constify.
9607         * ravenscar-thread.c (ravenscar_extra_thread_info)
9608         (ravenscar_pid_to_str): Constify.
9609         * remote-sim.c (gdbsim_pid_to_str): Constify.
9610         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9611         Constify.
9612         * sol-thread.c (solaris_pid_to_str): Constify.
9613         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9614         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9615         * target.c (default_pid_to_str, target_pid_to_str)
9616         (normal_pid_to_str, default_pid_to_str): Constify.
9617         * target.h (target_ops::to_pid_to_str)
9618         (target_ops::to_extra_thread_info): Constify.
9619         (target_pid_to_str, normal_pid_to_str): Constify.
9620         * windows-nat.c (windows_pid_to_str): Constify.
9621         * gdbarch.sh (core_pid_to_str): Constify.
9622         * target-delegates.c: Regenerate.
9623         * gdbarch.h, gdbarch.c: Regenerate.
9624
9625 2017-04-05  Pedro Alves  <palves@redhat.com>
9626
9627         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9628         the memory of the temporary warning_pre_print override.
9629         * utils.c (warning_pre_print): Constify.
9630         * utils.h (warning_pre_print): Constify.
9631
9632 2017-04-05  Pedro Alves  <palves@redhat.com>
9633
9634         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9635         (shell_command): New function.
9636         (make_command): Use std::string.
9637         (init_cli_cmds): Register shell_command instead of shell_escape.
9638
9639 2017-04-05  Pedro Alves  <palves@redhat.com>
9640
9641         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9642         * tracepoint.c (default_collect): Don't initialize.
9643
9644 2017-04-05  Pedro Alves  <palves@redhat.com>
9645
9646         * macroexp.c (macro_buffer::shared): Now a bool.
9647         (init_buffer): Update.
9648         (init_shared_buffer): Constify 'addr' parameter.
9649         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9650         casts.
9651
9652 2017-04-05  Pedro Alves  <palves@redhat.com>
9653
9654         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9655         * disasm.c (set_disassembler_options): Constify local.
9656         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9657
9658 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9659
9660         PR gdb/21352
9661         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9662         option.
9663
9664 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9665
9666         * frame.c (frame_unwind_register_unsigned): Call
9667         frame_unwind_register_value.
9668
9669 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9670
9671         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9672         Use gdb_test_multiple, and don't match anchor.
9673
9674 2017-04-05  Pedro Alves  <palves@redhat.com>
9675
9676         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9677         (Write After Approval): Remove Simon Marchi.
9678
9679 2017-04-05  Pedro Alves  <palves@redhat.com>
9680
9681         * common/gdb_optional.h (optional::optional): Make constexpr and
9682         initialize m_dummy.
9683
9684 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9685
9686         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9687         (amd64fbsd_jmp_buf_reg_offset): Remove.
9688         (amd64fbsd_supply_uthread): Remove function.
9689         (amd64fbsd_collect_uthread): Remove function.
9690         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9691         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9692         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9693         (fbsd-nat.c): Update comment.
9694         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9695         (i386fbsd_jmp_buf_reg_offset): Remove.
9696         (i386fbsd_supply_uthread): Remove function.
9697         (i386fbsd_collect_uthread): Remove function.
9698         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
9699
9700 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9701
9702         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
9703         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
9704         * NEWS: Mention that support for FreeBSD/alpha was removed.
9705         * alpha-fbsd-tdep.c: Delete file.
9706         * config/alpha/fbsd.mh: Delete file.
9707         * configure.host: Delete alpha*-*-freebsd* and
9708         alpha*-*-kfreebsd*-gnu.
9709         * configure.tgt: Delete alpha*-*-freebsd* and
9710         alpha*-*-kfreebsd*-gnu.
9711
9712 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9713
9714         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
9715         amd64bsd_store_inferior_registers): Use ptid from regcache.
9716
9717 2017-04-04  Pedro Alves  <palves@redhat.com>
9718
9719         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
9720         data fields, make them private and add "m_" prefixes.
9721         (lnp_state_machine::lnp_state_machine): New ctor.
9722         (record_line, check_line_address, handle_set_discriminator)
9723         (handle_set_address, handle_advance_pc, handle_special_opcode)
9724         (handle_advance_line, handle_set_file, handle_negate_stmt)
9725         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
9726         (end_sequence, advance_line): New methods.
9727         (m_gdbarch, m_record_lines_p): New fields.
9728         (lnp_reader_state): Delete.
9729         (dwarf_record_line): Rename to ...
9730         (lnp_state_machine::record_line): ... adjust.
9731         (init_lnp_state_machine): Delete.
9732         (lnp_state_machine::lnp_state_machine): New.
9733         (check_line_address): Rename to ...
9734         (lnp_state_machine::check_line_address): This.
9735         (dwarf_decode_lines_1): Remove reference to "reader_state".
9736         Adjust lnp_state_machine having a non-default ctor.  Use bool.
9737         State machine internal state manipulation moved to
9738         lnp_state_machine methods.
9739
9740 2017-04-04  Pedro Alves  <palves@redhat.com>
9741
9742         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9743         unittests/offset-type-selftests.c.
9744         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
9745         * common/offset-type.h: New file.
9746         * common/preprocessor.h: New file.
9747         * common/traits.h: New file.
9748         * common/valid-expr.h: New file.
9749         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
9750         sect_offset and cu_offset strong typedefs throughout.
9751         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
9752         typedefs throughout.
9753         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
9754         sect_offset and cu_offset strong typedefs throughout.
9755         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
9756         typedefs throughout.
9757         * gdbtypes.h: Include "common/offset-type.h".
9758         (cu_offset): Now an offset type (strong typedef) instead of a
9759         struct.
9760         (sect_offset): Likewise.
9761         (union call_site_parameter_u): Rename "param_offset" field to
9762         "param_cu_off".
9763         * unittests/offset-type-selftests.c: New file.
9764
9765 2017-04-04  Pedro Alves  <palves@redhat.com>
9766
9767         * common/underlying.h: New file.
9768         * dwarf2read.c: Include "common/gdb_optional.h" and
9769         "common/underlying.h".
9770         (dir_index, file_name_index): New types.
9771         (file_entry): Use them.
9772         (file_entry::include): Use to_underlying.
9773         (line_header::add_file_name): Use dir_index.
9774         (read_formatted_entries): Use gdb::optional.  Read form before
9775         writting to file_entry.
9776         (dwarf_decode_line_header): Use dir_index.
9777         (lnp_state_machine::current_file): Use to_underlying.
9778         (lnp_state_machine::file): Change type to file_name_index.
9779         (dwarf_record_line): Use to_underlying.
9780         (init_lnp_state_machine): Use file_name_index.
9781         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9782
9783 2017-04-04  Pedro Alves  <palves@redhat.com>
9784
9785         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9786         operator bool, has_value and get methods.
9787
9788 2017-04-04  Pedro Alves  <palves@redhat.com>
9789
9790         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9791         fields.
9792         (line_header): Initialize all data fields.  Change type of
9793         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9794         Change type of include_dirs to std::vector<const char *>.  Remove
9795         num_include_dirs, include_dirs_size.  Change type of file_names to
9796         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9797         (line_header::line_header): New.
9798         (line_header::add_include_dir, line_header::add_file_name): New
9799         methods.
9800         (line_header::include_dir_at): Remove NULL check.
9801         (line_header::file_name_at): Add const overload.
9802         (line_header_up): New unique_ptr typedef.
9803         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9804         std::vector.  Remove free_line_header call.
9805         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9806         free_line_header call.
9807         (free_cu_line_header): Delete.
9808         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9809         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9810         Adjust to use std::vector.
9811         (free_line_header): Delete.
9812         (free_line_header_voidp): Use delete.
9813         (add_include_dir): Replace with ...
9814         (line_header::add_include_dir): ... this method.  Use std::vector.
9815         (add_file_name): Replace with ...
9816         (line_header::add_file_name): ... this method.  Use std::vector.
9817         (add_include_dir_stub): Delete.
9818         (read_formatted_entries): Remove memset.
9819         (dwarf_decode_line_header): Return a line_header_up instead of a
9820         raw pointer.  Remove cleanup handling.  Pass lambdas to
9821         read_formatted_entries.  Adjust to use line_header methods.
9822         (dwarf_decode_lines_1): Adjust to use line_header methods.
9823         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9824         use std::vector.
9825
9826 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9827
9828         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9829         instead of struct ptid.
9830
9831 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9832
9833         * frame.c (get_frame_register_bytes): Unwind using value.
9834         (put_frame_register_bytes): Likewise.
9835
9836 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9837
9838         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9839         aggregate-like.
9840
9841 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9842
9843         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9844
9845 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9846
9847         * gdbthread.h (struct thread_info): Declare constructor and
9848         destructor.  Add some in-class member initializers.
9849         * thread.c (free_thread): Remove.
9850         (init_thread_list): Call delete instead of free_thread.
9851         (new_thread): Call thread_info constructor.
9852         (thread_info::thread_info): New function.
9853         (thread_info::~thread_info): New function.
9854         (delete_thread_1): Call delete instead of free_thread.
9855         (make_cleanup_restore_current_thread): Move tp and frame to
9856         inner block.
9857
9858 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9859
9860         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9861         (arc_skip_prologue): Likewise.
9862         (arc_make_frame_cache): Likewise.
9863         (arc_pv_get_operand): New function.
9864         (arc_is_in_prologue): Likewise.
9865         (arc_analyze_prologue): Likewise.
9866         (arc_print_frame_cache): Likewise.
9867         (MAX_PROLOGUE_LENGTH): New constant.
9868
9869 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9870
9871         * configure.tgt: Add arc-insn.o.
9872         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9873         (dump_arc_instruction_command): New function.
9874         (arc_fprintf_disasm): Likewise.
9875         (arc_disassemble_info): Likewise.
9876         (arc_insn_get_operand_value): Likewise.
9877         (arc_insn_get_operand_value_signed): Likewise.
9878         (arc_insn_get_memory_base_reg): Likewise.
9879         (arc_insn_get_memory_offset): Likewise.
9880         (arc_insn_get_branch_target): Likewise.
9881         (arc_insn_dump): Likewise.
9882         (arc_insn_get_linear_next_pc): Likewise.
9883         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9884         (arc_disassemble_info): Likewise.
9885         (arc_insn_get_branch_target): Likewise.
9886         (arc_insn_get_linear_next_pc): Likewise.
9887         * NEWS: Mention new "maint print arc arc-instruction".
9888
9889 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9890
9891         * arc-tdep (maintenance_print_arc_list): New variable.
9892         (maintenance_print_arc_command): New function.
9893
9894 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9895
9896         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9897         Add "limm" and "reserved".
9898         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9899         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9900         * arc-tdep.h (arc_regnum): Likewise.
9901
9902 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9903
9904         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9905         for THREADPTR register.
9906         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9907         register.
9908         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9909         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9910         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9911
9912 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9913
9914         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9915         registers above gdbarch_num_regs (gdbarch) as privileged in
9916         call0 ABI.
9917
9918 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9919
9920         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9921         for a single specified register or for all registers in
9922         a0_base..a0_base + C0_NREGS range.
9923         (supply_gregset_reg): Call regcache_raw_supply for a single
9924         specified register or for all registers in a0_base..a0_base +
9925         C0_NREGS range.
9926
9927 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9928
9929         * arch/xtensa.h (C0_NREGS): Add definition.
9930         * xtensa-tdep.c (C0_NREGS): Remove definition.
9931
9932 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9933
9934         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9935         Drop xtensa_default_isa initialization.
9936         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9937
9938 2017-03-27  Pedro Alves  <palves@redhat.com>
9939
9940         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9941         (file_entry::include_dir): New method.
9942         (line_header::include_dir_at, line_header::file_name_at): New
9943         methods.
9944         (setup_type_unit_groups, setup_type_unit_groups)
9945         (psymtab_include_file_name): Simplify using the new methods.
9946         (lnp_state_machine) <the_line_header>: New field.
9947         <file>: Add comment.
9948         (lnp_state_machine::current_file): New method.
9949         (dwarf_record_line): Simplify using the new methods.
9950         (init_lnp_state_machine): Initialize the "the_line_header" field.
9951         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9952         Simplify using the new methods.
9953
9954 2017-03-27  Pedro Alves  <palves@redhat.com>
9955
9956         * cp-name-parser.y (make_empty): Delete.
9957         (demangler_special, nested_name, ptr_operator, array_indicator)
9958         (direct_declarator, declarator_1): Use fill_comp instead of
9959         make_empty.
9960
9961 2017-03-27  Pedro Alves  <palves@redhat.com>
9962
9963         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9964         to ATTRIBUTE_PRINTF.
9965         * solib-target.c (library_list_start_list): Print "string" not
9966         "version".
9967         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9968         gdb_xml_error call.
9969
9970 2017-03-27  Pedro Alves  <palves@redhat.com>
9971
9972         * dwarf2read.c (struct file_and_directory): New.
9973         (dwarf2_get_dwz_file): Adjust to use std::string.
9974         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9975         (find_file_and_directory): Adjust to return a file_and_directory
9976         object.
9977         (read_file_scope): Adjust to use file_and_directory.  Remove
9978         make_cleanup/do_cleanups calls.
9979         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9980         make_cleanup/do_cleanups calls.
9981         * python/python.c (do_start_initialization): Adjust to ldirname
9982         returning a std::string.
9983         * utils.c (ldirname): Now returns a std::string.
9984         * utils.h (ldirname): Change return type to std::string.
9985         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9986         returning a std::string.
9987         * xml-tdesc.c (file_read_description_xml): Likewise.
9988
9989 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9990
9991         * regcache.c (regcache_debug_print_register): New function.
9992         * regcache.h (regcache_debug_print_register): New declaration.
9993         * target.c (debug_print_register): Remove.
9994         (target_fetch_registers): Call regcache_debug_print_register.
9995         (target_store_registers): Likewise.
9996
9997 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9998
9999         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10000         reference beyond the 'lh->include_dirs' array before accessing to
10001         it.
10002         (psymtab_include_file_name): Likewise.
10003         (dwarf_decode_lines_1): Likewise.
10004         (dwarf_decode_lines): Likewise.
10005         (file_file_name): Likewise.
10006
10007 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
10008
10009         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10010         inferior_ptid.
10011         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10012         ps_lsetfpregs): Likewise.
10013         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10014         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10015         ps_lsetfpregs): Likewise.
10016         * target.c (target_fetch_registers, target_store_registers):
10017         Remove asserts.
10018
10019 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
10020
10021         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10022
10023 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10024
10025         * aarch64-tdep.c (aarch64_process_record_test): Declare.
10026         (_initialize_aarch64_tdep): Register it.
10027         (aarch64_record_load_store): Handle PRFM instruction.
10028         (aarch64_process_record_test): New function.
10029
10030 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10031
10032         * aarch64-tdep.c (aarch64_record_load_store): Fix code
10033         indentation.
10034
10035 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10036
10037         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10038
10039 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10040
10041         python/python.c (do_start_initialization): Fix memory leak.
10042
10043 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10044
10045         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10046         using get_ptrace_pid.
10047         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10048         inferior_ptid.
10049         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10050         inferior_ptid instead of pid.
10051
10052 2017-03-22  Yao Qi  <yao.qi@linaro.org>
10053
10054         * aarch64-tdep.c: Wrap locally used classes in anonymous
10055         namespace.
10056         * arm-tdep.c: Likewise.
10057         * linespec.c: Likewise.
10058         * ui-out.c: Likewise.
10059
10060 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
10061
10062         PR gdb/19637
10063         * python/lib/gdb/printer/bound_registers.py: Import sys.
10064
10065 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10066
10067         * windows-nat.c (do_windows_fetch_inferior_registers): Add
10068         windows_thread_info parameter and use it instead of
10069         current_thread.
10070         (windows_fetch_inferior_registers): Don't set current_thread,
10071         pass the thread to do_windows_fetch_inferior_registers.  Use
10072         ptid from regcache instead of inferior_ptid.
10073         (do_windows_store_inferior_registers): Add windows_thread_info
10074         parameter and use it instead of current_thread.
10075         (windows_store_inferior_registers): Don't set current_thread,
10076         pass the thread to do_windows_store_inferior_registers.  Use
10077         ptid from regcache instead of inferior_ptid.
10078
10079 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10080
10081         * ser-mingw.c (ser_windows_raw): Remove reference to
10082         struct serial::current_timeout.
10083
10084 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
10085
10086         PR tdep/20928
10087         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10088         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10089         (sparc64_fsr_type): Fix %fsr decoding.
10090
10091 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
10092
10093         * python/py-record-btrace.c (btpy_insn_data): Change return type
10094         for Python 2.
10095
10096 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10097
10098         * spu-linux-nat.c (spu_fetch_inferior_registers,
10099         spu_store_inferior_registers): Use ptid from regcache, set and
10100         restore inferior_ptid.
10101         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10102         Likewise.
10103
10104 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10105
10106         * i386-linux-nat.c (fetch_register, store_register,
10107         i386_linux_fetch_inferior_registers,
10108         i386_linux_store_inferior_registers): Use ptid from regcache.
10109         * ia64-linux-nat.c (ia64_linux_fetch_register,
10110         ia64_linux_store_register): Likewise.
10111         * inf-ptrace.c (inf_ptrace_fetch_register,
10112         inf_ptrace_store_register): Likewise.
10113         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10114         m32r_linux_store_inferior_registers): Likewise.
10115         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10116         m68kbsd_store_inferior_registers): Likewise.
10117         * m68k-linux-nat.c (fetch_register, store_register,
10118         m68k_linux_fetch_inferior_registers,
10119         m68k_linux_store_inferior_registers): Likewise.
10120         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10121         m88kbsd_store_inferior_registers): Likewise.
10122         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10123         mips_fbsd_store_inferior_registers): Likewise.
10124         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10125         mips64_linux_regsets_store_registers): Likewise.
10126         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10127         mipsnbsd_store_inferior_registers): Likewise.
10128         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10129         mips64obsd_store_inferior_registers): Likewise.
10130         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10131         Likewise.
10132         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10133         ppcfbsd_store_inferior_registers): Likewise.
10134         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10135         ppc_linux_store_inferior_registers): Likewise.
10136         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10137         ppcnbsd_store_inferior_registers): Likewise.
10138         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10139         ppcobsd_store_registers): Likewise.
10140         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10141         Likewise.
10142         * ravenscar-thread.c (ravenscar_fetch_registers,
10143         ravenscar_store_registers, ravenscar_prepare_to_store):
10144         Likewise.
10145         * record-btrace.c (record_btrace_fetch_registers,
10146         record_btrace_store_registers, record_btrace_prepare_to_store):
10147         Likewise.
10148         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10149         Lookup inferior using ptid from regcache, instead of
10150         current_inferior.
10151         * remote.c (remote_fetch_registers, remote_store_registers): Use
10152         ptid from regcache.
10153         * rs6000-nat.c (fetch_register, store_register): Likewise.
10154         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10155         s390_linux_store_inferior_registers): Likewise.
10156         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10157         shnbsd_store_inferior_registers): Likewise.
10158         * sol-thread.c (sol_thread_fetch_registers,
10159         sol_thread_store_registers): Likewise.
10160         * sparc-nat.c (sparc_fetch_inferior_registers,
10161         sparc_store_inferior_registers): Likewise.
10162         * tilegx-linux-nat.c (fetch_inferior_registers,
10163         store_inferior_registers): Likewise.
10164         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10165         vaxbsd_store_inferior_registers): Likewise.
10166         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10167         store_xtregs): Likewise.
10168
10169 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10170
10171         PR gdb/14441
10172         * NEWS: Mention support for rvalue references in GDB and python.
10173         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10174         supports both lvalue and rvalue references.
10175
10176 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10177
10178         PR gdb/14441
10179         * gdbtypes.c (rank_one_type): Implement overloading
10180         resolution rules regarding rvalue references.
10181
10182 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10183
10184         PR gdb/14441
10185         * aarch64-tdep.c (aarch64_type_align)
10186         (aarch64_extract_return_value, aarch64_store_return_value): Change
10187         lvalue reference type checks to general reference type checks.
10188         * amd64-tdep.c (amd64_classify): Likewise.
10189         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10190         Likewise.
10191         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10192         (arm_store_return_value): Likewise.
10193         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10194         * c-typeprint.c (c_print_type): Likewise.
10195         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10196         (cplus_number_of_children, cplus_describe_child): Likewise.
10197         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10198         * completer.c (expression_completer): Likewise.
10199         * cp-support.c (make_symbol_overload_list_adl_namespace):
10200         Likewise.
10201         * darwin-nat-info.c (info_mach_region_command): Likewise.
10202         * dwarf2loc.c (entry_data_value_coerce_ref)
10203         (value_of_dwarf_reg_entry): Likewise.
10204         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10205         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10206         Likewise.
10207         * findvar.c (extract_typed_address, store_typed_address):
10208         Likewise.
10209         * gdbtypes.c (rank_one_type): Likewise.
10210         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10211         * infcall.c (value_arg_coerce): Likewise.
10212         * language.c (pointer_type): Likewise.
10213         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10214         Likewise.
10215         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10216         * mn10300-tdep.c (mn10300_type_align): Likewise.
10217         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10218         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10219         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10220         Likewise.
10221         * printcmd.c (print_formatted, x_command): Likewise.
10222         * python/py-type.c (typy_get_composite, typy_template_argument):
10223         Likewise.
10224         * python/py-value.c (valpy_referenced_value)
10225         (valpy_get_dynamic_type, value_has_field): Likewise.
10226         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10227         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10228         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10229         * spu-tdep.c (spu_scalar_value_p): Likewise.
10230         * symtab.c (lookup_symbol_aux): Likewise.
10231         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10232         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10233         Likewise.
10234         * valops.c (value_cast_pointers, value_cast)
10235         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10236         (value_struct_elt, value_struct_elt_bitpos)
10237         (value_find_oload_method_list, find_overload_match)
10238         (value_rtti_indirect_type): Likewise.
10239         * valprint.c (val_print_scalar_type_p, generic_val_print):
10240         Likewise.
10241         * value.c (value_actual_type, value_as_address, unpack_long)
10242         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10243         (coerce_ref): Likewise.
10244         * varobj.c (varobj_get_value_type): Likewise.
10245
10246 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10247
10248         PR gdb/14441
10249         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10250         table of constants.
10251         * python/lib/gdb/command/explore.py: Support exploring values
10252         of rvalue reference types.
10253         * python/lib/gdb/types.py: Implement get_basic_type() for
10254         rvalue reference types.
10255         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10256         constant.
10257         * python/py-value.c (valpy_getitem): Add an rvalue reference
10258         check.
10259         (valpy_reference_value): Add new parameter "refcode".
10260         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10261         New wrappers for valpy_reference_value().
10262         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10263         (gdbpy_invoke_xmethod): Likewise.
10264
10265 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10266
10267         PR gdb/14441
10268         * dwarf2read.c (process_die, read_type_die_1): Handle the
10269         DW_TAG_rvalue_reference_type DIE.
10270         (read_tag_reference_type): Add new parameter "refcode".
10271
10272 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10273
10274         PR gdb/14441
10275         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10276         (c_type_print_modifier, c_type_print_varspec_suffix)
10277         (c_type_print_base): Support printing rvalue reference types.
10278         * c-valprint.c (c_val_print, c_value_print): Support printing
10279         rvalue reference values.
10280
10281 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10282
10283         PR gdb/14441
10284         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10285         typename.
10286         * cp-support.c (replace_typedefs): Handle
10287         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10288         * python/py-type.c (typy_lookup_type): Likewise.
10289
10290 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10291
10292         PR gdb/14441
10293         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10294         * parse.c (insert_type): Change assert statement.
10295         (follow_types): Handle rvalue reference types.
10296         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10297         constant.
10298
10299 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10300
10301         PR gdb/14441
10302         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10303         value_ref() interface.
10304         * c-valprint.c (c_value_print): Likewise.
10305         * infcall.c (value_arg_coerce): Likewise.
10306         * python/py-value.c (valpy_reference_value): Likewise.
10307         * valops.c (value_cast, value_reinterpret_cast)
10308         (value_dynamic_cast, typecmp): Likewise.
10309         (value_ref): Parameterize by kind of return value reference type.
10310         * value.h (value_ref): Add new parameter "refcode".
10311
10312 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10313
10314         PR gdb/14441
10315         * dwarf2read.c (read_tag_reference_type): Use
10316         lookup_lvalue_reference_type() instead of lookup_reference_type().
10317         * eval.c (evaluate_subexp_standard): Likewise.
10318         * f-exp.y: Likewise.
10319         * gdbtypes.c (make_reference_type, lookup_reference_type):
10320         Generalize with rvalue reference types.
10321         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10322         convenience wrappers for lookup_reference_type().
10323         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10324         reference kind parameter.
10325         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10326         wrappers for lookup_reference_type().
10327         * guile/scm-type.c (gdbscm_type_reference): Use
10328         lookup_lvalue_reference_type() instead of lookup_reference_type().
10329         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10330         * parse.c (follow_types): Likewise.
10331         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10332         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10333         Likewise.
10334         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10335         (gdbpy_invoke_xmethod): Likewise.
10336         * stabsread.c: Provide extra argument to make_reference_type()
10337         call.
10338         * valops.c (value_ref, value_rtti_indirect_type): Use
10339         lookup_lvalue_reference_type() instead of lookup_reference_type().
10340
10341 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10342
10343         PR gdb/14441
10344         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10345         (TYPE_IS_REFERENCE): New macro.
10346         (struct type): Add rvalue_reference_type field.
10347         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10348
10349 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10350
10351         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10352         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10353         New function definition.
10354         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10355         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10356         New function declaration.
10357         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10358         * mi/mi-interp.h: New file.
10359         * solib.c (info_sharedlibrary_command): Replace for loop with
10360         ALL_SO_LIBS macro
10361         * solib.h (update_solib_list): New function declaration.
10362         (so_list_head): Move macro.
10363         * solist.h (ALL_SO_LIBS): New macro.
10364
10365 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10366
10367         * infcmd.c (post_create_inferior): Remove unused argument in
10368         call to solib_add.
10369         * remote.c (remote_start_remote): Likewise.
10370         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10371         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10372         (enable_break): Likewise.
10373         * solib.c (update_solib_list): Remove unused target argument
10374         and its documentation.
10375         (solib_add): Remove unused target argument.  Remove unused
10376         argument in call to update_solib_list.
10377         (info_sharedlibrary_command): Remove unused argument in call
10378         to update_solib_list.
10379         (sharedlibrary_command): Remove unused argument in call to
10380         solib_add.
10381         (handle_solib_event): Likewise.
10382         (reload_shared_libraries): Likewise.
10383         * solib.h (solib_add): Remove unused target argument.
10384
10385 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10386
10387         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10388         (s390_displaced_step_fixup): Cover relative branches with the
10389         default fixup handling.  This fixes lack of support for some
10390         relative branch instructions.
10391
10392 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10393
10394         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10395         ptid from regcache.
10396
10397 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10398
10399         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10400         i386_darwin_store_inferior_registers): Use ptid from regcache.
10401
10402 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10403
10404         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10405         i386bsd_store_inferior_registers): Use ptid from regcache.
10406
10407 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10408
10409         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10410         hppaobsd_store_registers): Use ptid from regcache.
10411
10412 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10413
10414         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10415         hppanbsd_store_registers): Use ptid from regcache.
10416
10417 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10418
10419         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10420         from regcache.  Use get_ptrace_pid.
10421
10422 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10423
10424         * corelow.c (get_core_register_section): Use ptid from regcache,
10425         update doc.
10426
10427 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10428
10429         * bsd-uthread.c (bsd_uthread_fetch_registers,
10430         bsd_uthread_store_registers): Use ptid from regcache, set and
10431         restore inferior_ptid.
10432
10433 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10434
10435         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10436         fetch_fp_regs, store_register, store_regs, store_fp_register,
10437         store_fp_regs): Use ptid from regcache.
10438
10439 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10440
10441         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10442         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10443         store_vfp_regs): Use ptid from regcache.
10444
10445 2017-03-17  Pedro Alves  <palves@redhat.com>
10446
10447         PR remote/21188
10448         * ser-base.c (ser_base_wait_for): Add comment.
10449         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10450         version.
10451         * ser-unix.c (hardwire_raw): Remove reference to
10452         scb->current_timeout.
10453         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10454         (hardwire_ops): Install ser_base_readchar instead of
10455         hardwire_readchar.
10456         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10457         Remove fields.
10458
10459 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10460
10461         PR gdb/19637
10462         * python/lib/gdb/printer/bound_registers.py: Add support for
10463         Python 3.
10464
10465 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10466
10467         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10468         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10469         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10470         byte_offset to subobj_byte_offset.  Fix the handling of
10471         DWARF_VALUE_STACK on big-endian targets when coming via an
10472         implicit pointer.
10473         (dwarf2_evaluate_loc_desc): Adjust call to
10474         dwarf2_evaluate_loc_desc_full.
10475         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10476         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10477
10478 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10479
10480         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10481         and REVSH instructions.
10482
10483 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10484
10485         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10486         (arm_record_test): Declare.
10487         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10488         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10489         align with the manual.
10490         (thumb_record_misc): Adjust the code order to align with the
10491         manual.
10492         (thumb2_record_decode_insn_handler): Fix instruction matching.
10493         (instruction_reader_thumb): New class.
10494         (arm_record_test): New function.
10495
10496 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10497
10498         * arm-tdep.c (abstract_memory_reader): New class.
10499         (instruction_reader): New class.
10500         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10501         (decode_insn): Likewise.
10502
10503 2017-03-16  Doug Evans  <dje@google.com>
10504
10505         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10506         member.  Change type of TYPE member to SCM.  All uses updated.
10507         (lsscm_make_lazy_string_smob): Add assert.
10508         (lsscm_make_lazy_string): Flag bad length values.
10509         (lsscm_elt_type): New function.
10510         (gdbscm_lazy_string_to_value): Rewrite to use
10511         lsscm_safe_lazy_string_to_value.
10512         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10513         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10514         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10515         in incoming type.
10516         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10517         * guile/scm-type.c (tyscm_scm_to_type): New function.
10518
10519 2017-03-15  Doug Evans  <dje@google.com>
10520
10521         PR python/17728, python/18439, python/18779
10522         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10523         member.  Change type of TYPE member to PyObject *.  All uses updated.
10524         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10525         (gdbpy_create_lazy_string_object): Flag bad length values.
10526         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10527         Handle typedefs in incoming type.
10528         (stpy_lazy_string_elt_type): New function.
10529         (gdbpy_extract_lazy_string): Call it.
10530         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10531         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10532         typedefs in incoming type.
10533
10534 2017-03-16  Doug Evans  <dje@google.com>
10535
10536         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10537         * guile/scm-type.c (tyscm_scm_to_type): New function.
10538
10539 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10540
10541         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10542         "ULONGEST" for "skip".
10543
10544 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10545
10546         PR gdb/21220
10547         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10548         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10549         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10550         over ptrace peek/poke until end of buffer or error.
10551
10552 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10553
10554         * parse.c (length_of_subexp): Make static.
10555         * parser-defs.h (length_of_subexp): Remove.
10556
10557 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10558
10559         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10560         as well.
10561
10562 2017-03-14  Pedro Alves  <palves@redhat.com>
10563
10564         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10565         (main): Use std::unique_ptr.  Remove calls to
10566         cp_demangled_name_parse_free.
10567
10568 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10569
10570         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10571         alphabsd_store_inferior_registers): Use regcache->ptid instead
10572         of inferior_ptid.
10573
10574 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10575
10576         * aix-thread.c (aix_thread_fetch_registers,
10577         aix_thread_store_registers): Use regcache->ptid instead of
10578         inferior_ptid.
10579
10580 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10581
10582         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10583         store_gregs_to_thread, fetch_fpregs_from_thread,
10584         store_fpregs_to_thread): Use regcache->ptid instead of
10585         inferior_ptid.
10586
10587 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10588
10589         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10590         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10591         instead of inferior_ptid.
10592
10593 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10594
10595         * target.c (target_fetch_registers, target_store_registers): Add
10596         assert.
10597
10598 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10599
10600         * regcache.h (regcache_get_ptid): New function.
10601         * regcache.c (regcache_get_ptid): New function.
10602
10603 2017-03-13  Mark Wielaard  <mark@klomp.org>
10604
10605         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10606
10607 2017-03-10  Keith Seitz  <keiths@redhat.com>
10608
10609         PR c++/8218
10610         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10611
10612 2017-03-08  Pedro Alves  <palves@redhat.com>
10613
10614         PR gdb/18360
10615         * infrun.c (start_step_over, do_target_resume, resume)
10616         (restart_threads): Assert we're not resuming a thread that is
10617         meant to be stopped.
10618         (infrun_thread_stop_requested_callback): Delete.
10619         (infrun_thread_stop_requested): If the thread is internally
10620         stopped, queue a pending stop event and clear the thread's
10621         inline-frame state.
10622         (handle_stop_requested): New function.
10623         (handle_syscall_event, handle_inferior_event_1): Use
10624         handle_stop_requested.
10625         (handle_stop_requested): New function.
10626         (handle_signal_stop): Set the thread's stop_signal here instead of
10627         at caller.
10628         (finish_step_over): Clear step over info unconditionally.
10629         (handle_signal_stop): If the user had interrupted the event
10630         thread, consider the stop a random signal.
10631         (handle_signal_stop) <signal arrived while stepping over
10632         breakpoint>: Don't restart threads here.
10633         (stop_waiting): Don't clear step-over info here.
10634
10635 2017-03-08  Pedro Alves  <palves@redhat.com>
10636
10637         PR 21206
10638         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10639         goes to argument 2, not 1.
10640
10641 2017-03-08  Pedro Alves  <palves@redhat.com>
10642
10643         PR cli/21218
10644         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10645         display_gdb_prompt.
10646         (command_line_input): Add comment.
10647
10648 2017-03-08  Pedro Alves  <palves@redhat.com>
10649
10650         PR tui/21216
10651         * tui/tui-file.c (tui_file::write): New.
10652         * tui/tui-file.h (tui_file): Override "write".
10653         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10654         factored out from ...
10655         (tui_puts): ... here.
10656         (tui_putc): Use them.
10657         (tui_write): New function.
10658         * tui/tui-io.h (tui_write): Declare.
10659
10660 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10661
10662         * Makefile.in (SFILES): Replace "environ.c" with
10663         "common/environ.c".
10664         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10665         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10666         to...
10667         * common/environ.c: ... here.
10668         * environ.h: Moved to...
10669         * common/environ.h: ... here.
10670
10671 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10672
10673         * gdbarch.sh (pstring_ptr): New static function.
10674         (gdbarch_disassembler_options): Use it.
10675         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10676         not valid_disassembler_option->name.
10677         * gdbarch.c: Regenerate.
10678
10679 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10680
10681         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10682
10683 2017-03-07  Pedro Alves  <palves@redhat.com>
10684
10685         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10686
10687 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10688
10689         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10690         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10691         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10692         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10693
10694 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10695
10696         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10697
10698 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
10699
10700         * remote.c (remote_add_target_side_commands): Use range-based
10701         for loop.
10702
10703 2017-03-03  Yao Qi  <yao.qi@linaro.org>
10704
10705         PR gdb/21165
10706         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
10707         value is lazy.
10708         * valprint.c (common_val_print): Likewise.
10709
10710 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
10711
10712         * NEWS: Mention new set/show disassembler-options commands.
10713         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
10714         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
10715         (prospective_options): New static variable.
10716         (gdb_disassembler::gdb_disassembler): Initialize
10717         m_di.disassembler_options.
10718         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
10719         (get_disassembler_options): New function.
10720         (set_disassembler_options): Likewise.
10721         (set_disassembler_options_sfunc): Likewise.
10722         (show_disassembler_options_sfunc): Likewise.
10723         (disassembler_options_completer): Likewise.
10724         (_initialize_disasm): Likewise.
10725         * disasm.h (get_disassembler_options): New prototype.
10726         (set_disassembler_options): Likewise.
10727         * gdbarch.sh (gdbarch_disassembler_options): New variable.
10728         (gdbarch_verify_disassembler_options): Likewise.
10729         * gdbarch.c: Regenerate.
10730         * gdbarch.h: Likewise.
10731         * arm-tdep.c (num_disassembly_options): Delete.
10732         (set_disassembly_style): Likewise.
10733         (arm_disassembler_options): New static variable.
10734         (set_disassembly_style_sfunc): Convert short style name into long
10735         option name.  Call set_disassembler_options.
10736         (show_disassembly_style_sfunc): New function.
10737         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
10738         set_gdbarch_verify_disassembler_options.
10739         (_initialize_arm_tdep): Delete regnames variable and update callers.
10740         (arm_disassembler_options): Initialize.
10741         (disasm_options): New variable.
10742         (num_disassembly_options): Rename from this...
10743         (num_disassembly_styles): ...to this.  Compute by scanning through
10744         disasm_options.
10745         (valid_disassembly_styles): Initialize using disasm_options.
10746         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
10747         set_arm_regname_option.
10748         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
10749         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
10750         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
10751         set_gdbarch_verify_disassembler_options.
10752         * s390-tdep.c (s390_disassembler_options): New static variable.
10753         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
10754         set_gdbarch_verify_disassembler_options.
10755
10756 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10757
10758         * remote.c (remote_add_target_side_condition): Remove "struct"
10759         keyword from range-based for loop.
10760
10761 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10762
10763         * remote.c (remote_add_target_side_condition): Use range-based
10764         for loop.  Update comment.
10765
10766 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10767
10768         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10769
10770 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10771
10772         * regcache.c (regcache_raw_update): New function.
10773         (regcache_raw_read): Move code to regcache_raw_update.
10774         * regcache.h (regcache_raw_update): New declaration.
10775         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10776
10777 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10778
10779         * dwarf2read.c (create_debug_type_hash_table): Initialize
10780         header.signature and header.type_offset_in_tu.
10781
10782 2017-02-24  Pedro Alves  <palves@redhat.com>
10783
10784         * symtab.c (make_file_symbol_completion_list_1): Use
10785         add_symtab_completions.
10786
10787 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10788
10789         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10790
10791 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10792
10793         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10794         I386_MAX_REGISTER_SIZE.
10795         (i386_pseudo_register_write): Likewise.
10796         (i386_process_record): Likewise.
10797         * i387-tdep.c (i387_supply_xsave): Likewise.
10798         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10799         (store_register): Likewise.
10800
10801 2017-02-23  Pedro Alves  <palves@redhat.com>
10802
10803         * ada-lang.c: Include "common/function-view.h".
10804         (ada_iterate_over_symbols): Adjust to use function_view as
10805         callback type.
10806         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10807         (ada_make_symbol_completion_list): Use a lambda.
10808         (ada_exc_search_name_matches): Delete.
10809         (name_matches_regex): New.
10810         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10811         * compile/compile-c-support.c: Include "common/function-view.h".
10812         (print_one_macro): Change prototype to accept a ui_file pointer.
10813         (write_macro_definitions): Use a lambda.
10814         * dwarf2read.c: Include "common/function-view.h".
10815         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10816         (dw2_expand_symtabs_matching): Adjust to use function_view as
10817         callback type.
10818         * language.h: Include "common/function-view.h".
10819         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10820         function_view as callback type.
10821         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10822         * linespec.c: Include "common/function-view.h".
10823         (collect_info::add_symbol): New method.
10824         (struct symbol_and_data_callback, iterate_inline_only, struct
10825         symbol_matcher_data, iterate_name_matcher): Delete.
10826         (iterate_over_all_matching_symtabs): Adjust to use function_view
10827         as callback type and lambdas.
10828         (iterate_over_file_blocks): Adjust to use function_view as
10829         callback type.
10830         (decode_compound_collector): Now a class with private fields.
10831         (decode_compound_collector::release_symbols): New method.
10832         (collect_one_symbol): Rename to...
10833         (decode_compound_collector::operator()): ... this and adjust.
10834         (lookup_prefix_sym): decode_compound_collector construction bits
10835         move to decode_compound_collector ctor.  Pass the
10836         decode_compound_collector object directly as callback.  Remove
10837         cleanups and use decode_compound_collector::release_symbols
10838         instead.
10839         (symtab_collector): Now a class with private fields.
10840         (symtab_collector::release_symtabs): New method.
10841         (add_symtabs_to_list): Rename to...
10842         (symtab_collector::operator()): ... this and adjust.
10843         (collect_symtabs_from_filename): symtab_collector construction
10844         bits move to symtab_collector ctor.  Pass the symtab_collector
10845         object directly as callback.  Remove cleanups and use
10846         symtab_collector::release_symtabs instead.
10847         (collect_symbols): Delete.
10848         (add_matching_symbols_to_info): Use lambdas.
10849         * macrocmd.c (print_macro_callback): Delete.
10850         (info_macro_command): Use a lambda.
10851         (info_macros_command): Pass print_macro_definition as callable
10852         directly.
10853         (print_one_macro): Remove 'ignore' parameter.
10854         (macro_list_command): Adjust.
10855         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10856         (macro_for_each_data::user_data): Delete field.
10857         (foreach_macro): Adjust to call the function_view.
10858         (macro_for_each): Adjust to use function_view as callback type.
10859         (foreach_macro_in_scope): Adjust to call the function_view.
10860         (macro_for_each_in_scope): Adjust to use function_view as callback
10861         type.
10862         * macrotab.h: Include "common/function-view.h".
10863         (macro_callback_fn): Declare a prototype instead of a pointer.
10864         Remove "user_data" parameter.
10865         (macro_for_each, macro_for_each_in_scope): Adjust to use
10866         function_view as callback type.
10867         * psymtab.c (partial_map_expand_apply)
10868         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10869         Adjust to use function_view as callback type and to return bool.
10870         (psym_expand_symtabs_matching): Adjust to use function_view as
10871         callback types.
10872         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10873         to use function_view as callback type and to return bool.
10874         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10875         callback types.
10876         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10877         as callback types.
10878         * symfile.h: Include "common/function-view.h".
10879         (expand_symtabs_file_matcher_ftype)
10880         (expand_symtabs_symbol_matcher_ftype)
10881         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10882         return bool.
10883         (quick_symbol_functions::map_symtabs_matching_filename)
10884         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10885         function_view as callback type and return bool.
10886         (expand_symtabs_matching): Adjust to use function_view as callback
10887         type.
10888         (maintenance_expand_name_matcher)
10889         (maintenance_expand_file_matcher): Delete.
10890         (maintenance_expand_symtabs): Use lambdas.
10891         * symtab.c (iterate_over_some_symtabs): Adjust to use
10892         function_view as callback types and return bool.
10893         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10894         of a cleanup.
10895         (lookup_symtab_callback): Delete.
10896         (lookup_symtab): Use a lambda.
10897         (iterate_over_symbols): Adjust to use function_view as callback
10898         type.
10899         (struct search_symbols_data, search_symbols_file_matches)
10900         (search_symbols_name_matches): Delete.
10901         (search_symbols): Use a pair of lambdas.
10902         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10903         (symtab_expansion_callback): Delete.
10904         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10905         * symtab.h: Include "common/function-view.h".
10906         (iterate_over_some_symtabs): Adjust to use function_view as
10907         callback type and return bool.
10908         (iterate_over_symtabs): Adjust to use function_view as callback
10909         type.
10910         (symbol_found_callback_ftype): Remove 'data' parameter and return
10911         bool.
10912         (iterate_over_symbols): Adjust to use function_view as callback
10913         type.
10914
10915 2017-02-23  Pedro Alves  <palves@redhat.com>
10916
10917         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10918         (%.o) <unittests/%.c>: New pattern.
10919         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10920         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10921         * common/function-view.h: New file.
10922         * unittests/function-view-selftests.c: New file.
10923         * configure: Regenerate.
10924
10925 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10926
10927         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10928         inferior_ptid.
10929         * go32-nat.c (go32_thread_alive): Likewise.
10930
10931 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10932
10933         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10934         delete.
10935
10936 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10937
10938         * varobj.c (varobj_clear_saved_item): Use delete instead of
10939         xfree.
10940         (update_dynamic_varobj_children): Likewise.
10941
10942 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10943
10944         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10945
10946 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10947
10948         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10949         m_enum_value to 0 in default constructor.
10950
10951 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10952
10953         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10954         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10955         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10956         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10957         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10958         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10959         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10960         IS_STORE_CONDITIONAL_INSN.
10961
10962 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10963
10964         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10965
10966 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10967
10968         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10969
10970 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10971
10972         * dwarf2read.c (skip_one_die, read_attribute_value)
10973         (dwarf2_const_value_attr, dump_die_shallow)
10974         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10975         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10976
10977 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10978
10979         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10980         (dwarf_parse_macro_header): Accept DWARF version 5.
10981         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10982
10983 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10984
10985         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10986         DW_AT_GNU_*.
10987         * common/common-exceptions.h (enum errors): Likewise.
10988         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10989         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10990         (dwarf_expr_context::execute_stack_op): Likewise.
10991         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10992         Likewise.
10993         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10994         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10995         (show_entry_values_debug, call_site_to_target_addr)
10996         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10997         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10998         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10999         (value_of_dwarf_block_entry, indirect_pieced_value)
11000         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11001         (disassemble_dwarf_expression): Likewise.
11002         * dwarf2read.c (process_die, inherit_abstract_dies)
11003         (read_call_site_scope): Likewise.
11004         * gdbtypes.h (struct func_type, struct call_site_parameter)
11005         (struct call_site): Likewise.
11006         * stack.c (read_frame_arg): Likewise.
11007         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11008
11009 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11010
11011         * defs.h (read_unsigned_leb128): New declaration.
11012         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11013         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11014         (dwarf2_find_location_expression): Call also
11015         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
11016         * dwarf2loc.h (dwarf2_version): New declaration.
11017         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11018         rnglists.
11019         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11020         .debug_rnglists.
11021         (struct dwop_section_names): Add loclists_dwo.
11022         (dwop_section_names): Add .debug_loclists.dwo.
11023         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11024         (struct dwarf2_per_cu_data): Add dwarf_version.
11025         (struct dwo_sections): Add loclists.
11026         (struct attr_abbrev): Add implicit_const.
11027         (read_indirect_line_string): New declaration.
11028         (read_unsigned_leb128): Delete declaration.
11029         (rcuh_kind): New definition.
11030         (read_and_check_comp_unit_head): Change parameter
11031         is_debug_types_section to section_kind.
11032         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11033         (read_comp_unit_head): Change parameter abfd to section, add parameter
11034         section_kind.  Handle DWARF-5.
11035         (error_check_comp_unit_head): Accept also DWARF version 5.
11036         (read_and_check_comp_unit_head): Change parameter
11037         is_debug_types_section to section_kind.
11038         (read_and_check_type_unit_head): Delete function.
11039         (read_abbrev_offset): Handle DWARF-5.
11040         (create_debug_type_hash_table): Add parameter section_kind.  Process
11041         only DW_UT_type.  Use signature and type_offset_in_tu from struct
11042         comp_unit_head.
11043         (create_debug_types_hash_table): Update create_debug_type_hash_table
11044         caller.
11045         (create_all_type_units): Call create_debug_type_hash_table.
11046         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11047         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11048         caller.
11049         (skip_one_die): Handle DW_FORM_implicit_const.
11050         (dwarf2_rnglists_process): New function.
11051         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11052         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11053         (read_attribute_value): Handle DW_FORM_implicit_const,
11054         DW_FORM_line_strp.
11055         (read_attribute): Handle DW_FORM_implicit_const.
11056         (read_indirect_string_at_offset_from): New function from
11057         read_indirect_string_at_offset.
11058         (read_indirect_string_at_offset): Call
11059         read_indirect_string_at_offset_from.
11060         (read_indirect_line_string_at_offset): New function.
11061         (read_indirect_string): New function comment.
11062         (read_indirect_line_string): New function.
11063         (read_unsigned_leb128): Make it global.
11064         (dwarf2_string_attr): Handle DWARF-5.
11065         (add_include_dir_stub, read_formatted_entries): New functions.
11066         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11067         Handle DWARF-5.
11068         (per_cu_header_read_in): Update read_comp_unit_head caller.
11069         (dwarf2_version): New function.
11070         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11071         rnglists.
11072         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11073         fields.
11074
11075 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11076
11077         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11078
11079 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11080
11081         * dwarf2read.c (dwarf2_ranges_process): New function from
11082         dwarf2_ranges_read.
11083         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11084         dwarf2_ranges_process.
11085
11086 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11087
11088         * dwarf2read.c (create_debug_type_hash_table): New function from
11089         create_debug_types_hash_table.
11090         (create_debug_types_hash_table): Call create_debug_type_hash_table.
11091         (create_all_type_units, open_and_init_dwo_file): Update
11092         create_debug_types_hash_table callers.
11093
11094 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11095
11096         PR gdb/16188
11097         * fork-child.c (trace_start_error): Fix thinko.  va_end should
11098         refer to 'ap', not 'args'.
11099
11100 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11101             Pedro Alves  <palves@redhat.com>
11102
11103         PR gdb/16188
11104         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11105         calls succeeded.
11106         * fork-child.c (trace_start_error): New function.
11107         (trace_start_error_with_name): Likewise.
11108         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11109         * inf-ptrace.c (inf_ptrace_me): Likewise.
11110         * inferior.h (trace_start_error): New prototype.
11111         (trace_start_error_with_name): Likewise.
11112
11113 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11114
11115         PR gdb/21164
11116         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11117         NULL before using it.
11118         * symmisc.c (maintenance_print_symbols): Likewise.
11119         (maintenance_print_msymbols): Likewise.
11120
11121 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11122
11123         * NEWS: Add record Python bindings entry.
11124
11125 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11126
11127         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11128         py-record-full.o.
11129         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11130         * python/py-record-btrace.c, python/py-record-btrace.h,
11131         python/py-record-full.c, python/py-record-full.h: New file.
11132         * python/py-record.c: Add include for py-record-btrace.h and
11133         py-record-full.h.
11134         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11135         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11136         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11137         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11138         New definition.
11139         (gdbpy_initialize_btrace): New export.
11140         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11141
11142 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11143
11144         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11145         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11146         * python/py-record.c: New file.
11147         * python/python-internal.h (gdbpy_start_recording,
11148         gdbpy_current_recording, gdpy_stop_recording,
11149         gdbpy_initialize_record): New export.
11150         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11151         (python_GdbMethods): Add gdbpy_start_recording,
11152         gdbpy_current_recording and gdbpy_stop_recording.
11153
11154 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11155
11156         * record-btrace.c (record_btrace_record_method): New function.
11157         (init_record_btrace_ops): Initialize to_record_method.
11158         * record-full.c (record_full_record_method): New function.
11159         (init_record_full_ops, init_record_full_core_ops): Add
11160         record_full_record_method.
11161         * record.h (enum record_method): New enum.
11162         * target-debug.h (target_debug_print_enum_record_method: New define.
11163         * target-delegates.c: Regenerate.
11164         * target.c (target_record_method): New function.
11165         * target.h: Include record.h.
11166         (struct target_ops) <to_record_method>: New field.
11167         (target_record_method): New export.
11168
11169 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11170
11171         * record.h (record_start, record_stop): New export.
11172         * record.c (record_start, record_stop): New function.
11173
11174 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11175
11176         * btrace.c (btrace_fetch): Copy function call segments pointer
11177         into a vector.
11178         (btrace_clear): Clear the vector.
11179         (btrace_find_insn_by_number): Use binary search to find the correct
11180         function call segment.
11181         * btrace.h (brace_fun_p): New typedef.
11182         (struct btrace_thread_info) <functions>: New field.
11183
11184 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11185
11186         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11187         * btrace.c (btrace_decode_error): ... here.  New function.
11188         * btrace.h (btrace_decode_error): New export.
11189
11190 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11191
11192         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11193         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11194         btrace_find_insn_by_number): Remove special case for gaps.
11195         * btrace.h (btrace_insn_get_error): New export.
11196         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11197         * record-btrace.c (btrace_insn_history): Print number for gaps.
11198         (record_btrace_info, record_btrace_goto): Handle gaps.
11199
11200 2017-02-14  Tom Tromey  <tom@tromey.com>
11201
11202         PR python/13598:
11203         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11204         event.
11205         * python/py-evts.c (gdbpy_initialize_py_events): Add
11206         before_prompt registry.
11207         * python/py-events.h (events_object) <before_prompt>: New field.
11208
11209 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11210
11211         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11212
11213 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11214
11215         * symfile (_initialize_symfile): Add usage text to the load command's
11216         help text.
11217
11218 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11219
11220         * utils.c (defaulted_query): Don't query on secondary UIs.
11221
11222 2017-02-10  Tom Tromey  <tom@tromey.com>
11223
11224         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11225
11226 2017-02-10  Tom Tromey  <tom@tromey.com>
11227
11228         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11229         "cleanup" local.
11230         * python/py-type.c (typy_legacy_template_argument): Remove
11231         unnecessary "cleanup" local.
11232
11233 2017-02-10  Tom Tromey  <tom@tromey.com>
11234
11235         * python/python.c (do_start_initialization): New function, from
11236         _initialize_python.
11237         (_initialize_python): Call do_start_initialization.
11238         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11239         goto.
11240
11241 2017-02-10  Tom Tromey  <tom@tromey.com>
11242
11243         * python/py-prettyprint.c (pretty_print_one_value): Use
11244         gdbpy_ref.
11245
11246 2017-02-10  Tom Tromey  <tom@tromey.com>
11247
11248         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11249         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11250         gdbpy_ref.
11251         * python/py-type.c (field_new): Use gdbpy_ref.
11252         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11253         gdbpy_ref.
11254         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11255         (py_free_pspace): Likewise.
11256         (pspace_to_pspace_object): Likewise.
11257         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11258         (py_free_objfile): Likewise.
11259         (objfile_to_objfile_object): Likewise.
11260         * python/py-inferior.c (delete_thread_object): Use
11261         gdbpy_ref.
11262         (infpy_read_memory): Likewise.
11263         (py_free_inferior): Likewise.
11264         * python/py-evtregistry.c (create_eventregistry_object): Use
11265         gdbpy_ref.
11266         * python/py-event.c (create_event_object): Use gdbpy_ref.
11267
11268 2017-02-10  Tom Tromey  <tom@tromey.com>
11269
11270         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11271         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11272         used.
11273         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11274         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11275         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11276         python/py-framefilter.c, python/py-function.c,
11277         python/py-inferior.c, python/py-infevents.c,
11278         python/py-linetable.c, python/py-newobjfileevent.c,
11279         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11280         python/py-signalevent.c, python/py-stopevent.c,
11281         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11282         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11283         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11284         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11285
11286 2017-02-10  Tom Tromey  <tom@tromey.com>
11287
11288         * ui-out.h (ui_out_emit_type): New class.
11289         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11290         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11291         and ui_out_emit_tuple.
11292         (enumerate_locals): Likewise.
11293         (py_mi_print_variables, py_print_locals, py_print_args): Use
11294         ui_out_emit_list.
11295         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11296         ui_out_emit_list.
11297         * common/gdb_optional.h: New file.
11298
11299 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11300
11301         * MAINTAINERS (Write After Approval): Update my e-mail address.
11302
11303 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11304
11305         PR gdb/21122
11306         * breakpoint.c (_initialize_breakpoint): Update the help description
11307         of the 'commands' command to indicate that it takes a list argument.
11308
11309 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11310
11311         * interps.c (current_interp_set_logging): Remove "return".
11312
11313 2017-02-09  Gary Benson  <gbenson@redhat.com>
11314
11315         * symtab.c (add_symtab_completions): Prevent NULL pointer
11316         dereference.
11317
11318 2017-02-08  Pedro Alves  <palves@redhat.com>
11319
11320         * interps.c (interp::interp): Remove reference to quiet_p.
11321         (interp_set): Make static.  Remove dead "Switching to" output
11322         code.
11323         (interp_quiet_p, interp_set_quiet): Delete.
11324         (interpreter_exec_cmd): Don't set the interpreter quiet.
11325         * interps.h (interp_quiet_p): Make static.
11326         (class interp) <quiet_p>: Remove field
11327
11328 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11329
11330         * cli/cli-decode.c (find_command_name_length): Make it extern.
11331         * cli/cli-decode.h (find_command_name_length): Declare.
11332         * cli/cli-script.c (command_name_equals, line_first_arg):
11333         New functions.
11334         (process_next_line): Use cli-decode to parse command names.
11335         (build_command_line): Make args a constant pointer.
11336
11337 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11338
11339         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11340         Remove case-insensitive search.
11341
11342 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11343
11344         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11345         at the end of the line.  Avoids an ARI warning.
11346
11347 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11348
11349         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11350         rdseed instructions.
11351         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11352
11353 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11354
11355         PR tdep/20936
11356         Provide and use sparc32 and sparc64 target description XML files.
11357         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11358         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11359         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11360         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11361         * features/sparc/sparc32-solaris.xml: New file.
11362         * features/sparc/sparc64-solaris.xml: New file.
11363         * features/sparc/sparc32-solaris.c: Generated.
11364         * features/sparc/sparc64-solaris.c: Generated.
11365         * sparc-tdep.h: Account for differences in target descriptions.
11366         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11367         (sparc32_register_type): Use target provided registers.
11368         (validate_tdesc_registers): New function.
11369         (sparc32_gdbarch_init): Use tdesc_has_registers.
11370         Set pseudoregister functions.
11371         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11372         (sparc64_register_type): Use target provided registers.
11373         (sparc64_init_abi): Set pseudoregister functions.
11374
11375 2017-02-03  Tom Tromey  <tom@tromey.com>
11376
11377         PR rust/21097:
11378         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11379         with a single member.
11380
11381 2017-02-03  Pedro Alves  <palves@redhat.com>
11382
11383         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11384         (cli_interp_base::~cli_interp_base): New.
11385         (cli_interp): New struct.
11386         (as_cli_interp): Cast the interp itself to cli_interp.
11387         (cli_interpreter_pre_command_loop): Rename to ...
11388         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11389         parameter.
11390         (cli_interpreter_init): Rename to ...
11391         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11392         boolean.  Make extern.
11393         (cli_interpreter_resume): Rename to ...
11394         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11395         extern.
11396         (cli_interpreter_suspend): Rename to ...
11397         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11398         extern.
11399         (cli_interpreter_exec): Rename to ...
11400         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11401         extern.
11402         (cli_interpreter_supports_command_editing): Rename to ...
11403         (cli_interp_base::supports_command_editing): ... this.  Remove
11404         'interp' parameter.  Make extern.
11405         (cli_ui_out): Rename to ...
11406         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11407         Make extern.
11408         (cli_set_logging): Rename to ...
11409         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11410         parameter.  Make extern.
11411         (cli_interp_procs): Delete.
11412         (cli_interp_factory): Adjust to use "new".
11413         * cli/cli-interp.h: Include "interps.h".
11414         (struct cli_interp_base): New struct.
11415         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11416         (interp_new): Delete.
11417         (interp::interp, interp::~interp): New.
11418         (interp_set): Use bool, and return void.  Assume the interpreter
11419         has suspend, init and resume methods, and that the all return
11420         void.
11421         (set_top_level_interpreter): interp_set returns void.
11422         (interp_ui_out): Adapt.
11423         (current_interp_set_logging): Adapt.
11424         (interp_data): Delete.
11425         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11426         (interp_exec): Adapt.
11427         (top_level_interpreter_data): Delete.
11428         * interps.h (interp_init_ftype, interp_resume_ftype)
11429         (interp_suspend_ftype, interp_exec_ftype)
11430         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11431         (class interp): New.
11432         (interp_new): Delete.
11433         (interp_set): Now returns void.  Use bool.
11434         (interp_data, top_level_interpreter_data): Delete.
11435         * mi/mi-common.h: Include interps.h.
11436         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11437         init, resume, suspect, exec, interp_ui_out, set_logging and
11438         pre_command_loop methods.
11439         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11440         (mi_interpreter_init): Rename to ...
11441         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11442         bool, return void and make extern.  Adjust.
11443         (mi_interpreter_resume): ... Rename to ...
11444         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11445         return void and make extern.  Adjust.
11446         (mi_interpreter_suspend): ... Rename to ...
11447         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11448         return void and make extern.  Adjust.
11449         (mi_interpreter_exec): ... Rename to ...
11450         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11451         extern.  Adjust.
11452         (mi_interpreter_pre_command_loop): ... Rename to ...
11453         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11454         parameter and make extern.
11455         (mi_on_normal_stop_1): Adjust.
11456         (mi_ui_out): Rename to ...
11457         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11458         parameter and make extern.  Adjust.
11459         (mi_set_logging): Rename to ...
11460         (mi_interp::set_logging): ... this.  Remove the 'interp'
11461         parameter and make extern.  Adjust.
11462         (mi_interp_procs): Delete.
11463         (mi_interp_factory): Adjust to use 'new'.
11464         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11465         (mi_print_exception, mi_execute_command, mi_load_progress):
11466         Adjust.
11467         * tui/tui-interp.c (tui_interp): New class.
11468         (as_tui_interp): Return a tui_interp pointer.
11469         (tui_on_normal_stop, tui_on_signal_received)
11470         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11471         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11472         to use interp::interp_ui_out.
11473         (tui_init): Rename to ...
11474         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11475         bool, return void and make extern.  Adjust.
11476         (tui_resume): Rename to ...
11477         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11478         return void and make extern.  Adjust.
11479         (tui_suspend): Rename to ...
11480         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11481         return void and make extern.  Adjust.
11482         (tui_ui_out): Rename to ...
11483         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11484         parameter, and make extern.  Adjust.
11485         (tui_exec): Rename to ...
11486         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11487         make extern.
11488         (tui_interp_procs): Delete.
11489         (tui_interp_factory): Use "new".
11490
11491 2017-02-02  Tom Tromey  <tom@tromey.com>
11492
11493         * rust-exp.y (ends_raw_string, space_then_number)
11494         (rust_identifier_start_p): Return bool.
11495         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11496         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11497         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11498         (rust_chartype_p): Return bool.
11499         (val_print_struct, rust_print_struct_def, rust_print_type):
11500         Update.
11501         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11502         Return bool.
11503
11504 2017-02-02  Tom Tromey  <tom@tromey.com>
11505
11506         * rust-lang.c: Reindent.
11507
11508 2017-02-02  Tom Tromey  <tom@tromey.com>
11509
11510         * rust-lang.h (rust_crate_for_block): Update.
11511         * rust-lang.c (rust_crate_for_block): Return std::string.
11512         (rust_get_disr_info): Use std:;string, not
11513         gdb::unique_xmalloc_ptr.
11514         * rust-exp.y (crate_name): Update.
11515
11516 2017-02-02  Pedro Alves  <palves@redhat.com>
11517
11518         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11519         field out of gdb_disassembler_test and make it static.
11520
11521 2017-02-02  Pedro Alves  <palves@redhat.com>
11522
11523         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11524         mi1_interp and mi_interp fields.
11525
11526 2017-02-02  Pedro Alves  <palves@redhat.com>
11527
11528         * cli/cli-interp.c (struct saved_output_files, saved_output):
11529         Moved from cli/cli-logging.c.
11530         (cli_set_logging): New function.
11531         (cli_interp_procs): Install cli_set_logging.
11532         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11533         Declare.
11534         * cli/cli-logging.c (struct saved_output_files, saved_output):
11535         Moved to cli/cli-interp.c.
11536         (pop_output_files): Don't save outputs here.
11537         (make_logging_output): New function.
11538         (handle_redirections): Don't build tee nor save previous outputs
11539         here.
11540         * interps.c (current_interp_set_logging): Change prototype.
11541         Assume there's always a set_logging_proc method installed.
11542         * interps.h (interp_set_logging_ftype): Change prototype.
11543         (current_interp_set_logging): Change prototype and adjust comment.
11544         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11545         use make_logging_output.
11546         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11547 2017-02-02  Pedro Alves  <palves@redhat.com>
11548
11549         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11550         from ...
11551         (set_logging_overwrite): ... here.
11552         (logging_no_redirect_file): Delete.
11553         (set_logging_redirect): Don't handle redirection on the fly.
11554         Instead warn that "logging off" / "logging on" is necessary.
11555         (pop_output_files): Delete references to logging_no_redirect_file.
11556         (show_logging_command): Always speak in terms of what will happen
11557         once logging is reenabled.
11558
11559 2017-02-02  Pedro Alves  <palves@redhat.com>
11560
11561         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11562
11563 2017-02-02  Pedro Alves  <palves@redhat.com>
11564
11565         * disasm.c (gdb_pretty_print_insn): Rename to ...
11566         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11567         Remove gdbarch parameter.  Adapt to clear the object's buffers
11568         instead of allocating new buffers, and to print using the object's
11569         gdb_disassembler instead of calling gdb_print_insn.
11570         (dump_insns): Use gdb_pretty_print_disassembler.
11571         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11572         (gdb_pretty_print_disassembler): New class.
11573         * record-btrace.c (btrace_insn_history): Use
11574         gdb_pretty_print_disassembler.
11575
11576 2017-02-02  Pedro Alves  <palves@redhat.com>
11577
11578         * ada-lang.c (type_as_string): Use string_file.
11579         * ada-valprint.c (ada_print_floating): Use string_file.
11580         * ada-varobj.c (ada_varobj_scalar_image)
11581         (ada_varobj_get_value_image): Use string_file.
11582         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11583         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11584         * breakpoint.c (update_inserted_breakpoint_locations)
11585         (insert_breakpoint_locations, reattach_breakpoints)
11586         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11587         (print_it_watchpoint): Use string_file.
11588         (save_breakpoints): Use stdio_file.
11589         * c-exp.y (oper): Use string_file.
11590         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11591         tee_file.
11592         (pop_output_files): Use delete.
11593         (handle_redirections): Use stdio_file and tee_file.
11594         * cli/cli-setshow.c (do_show_command): Use string_file.
11595         * compile/compile-c-support.c (c_compute_program): Use
11596         string_file.
11597         * compile/compile-c-symbols.c (generate_vla_size): Take a
11598         'string_file &' instead of a 'ui_file *'.
11599         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11600         of a 'ui_file *'.  Use string_file.
11601         (generate_c_for_variable_locations): Take a 'string_file &'
11602         instead of a 'ui_file *'.
11603         * compile/compile-internal.h (generate_c_for_for_one_variable):
11604         Take a 'string_file &' instead of a 'ui_file *'.
11605         * compile/compile-loc2c.c (push, pushf, unary, binary)
11606         (print_label, pushf_register_address, pushf_register)
11607         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11608         'ui_file *'.  Adjust.
11609         * compile/compile.c (compile_to_object): Use string_file.
11610         * compile/compile.h (compile_dwarf_expr_to_c)
11611         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11612         'ui_file *'.
11613         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11614         (replace_typedefs_qualified_name): Use string_file and
11615         obstack_copy0.
11616         * disasm.c (gdb_pretty_print_insn): Use string_file.
11617         (gdb_disassembly): Adjust reference the null_stream global.
11618         (do_ui_file_delete): Delete.
11619         (gdb_insn_length): Use null_stream.
11620         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11621         * dwarf2loc.c (dwarf2_compile_property_to_c)
11622         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11623         'string_file &' instead of a 'ui_file *'.
11624         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11625         * dwarf2read.c (do_ui_file_peek_last): Delete.
11626         (dwarf2_compute_name): Use string_file.
11627         * event-top.c (gdb_setup_readline): Use stdio_file.
11628         * gdbarch.sh (verify_gdbarch): Use string_file.
11629         * gdbtypes.c (safe_parse_type): Use null_stream.
11630         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11631         string_file.
11632         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11633         'string_file *' instead of a 'ui_file *'.
11634         (gdbscm_arch_disassemble): Use string_file.
11635         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11636         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11637         inherits from ui_file.
11638         (ioscm_file_port_delete, ioscm_file_port_rewind)
11639         (ioscm_file_port_put): Delete.
11640         (ioscm_file_port_write): Rename to ...
11641         (ioscm_file_port::write): ... this.  Remove file_port_magic
11642         checks.
11643         (ioscm_file_port_new): Delete.
11644         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11645         ui_file_up.
11646         * guile/scm-type.c (tyscm_type_name): Use string_file.
11647         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11648         Use string_file.
11649         * infcmd.c (print_return_value_1): Use string_file.
11650         * infrun.c (print_target_wait_results): Use string_file.
11651         * language.c (add_language): Use string_file.
11652         * location.c (explicit_to_string_internal): Use string_file.
11653         * main.c (captured_main_1): Use null_file.
11654         * maint.c (maintenance_print_architecture): Use stdio_file.
11655         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11656         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11657         event_channel>: Change type to mi_console_file pointer.
11658         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11659         (mi_console_file_delete): Delete.
11660         (struct mi_console_file): Delete.
11661         (mi_console_file_magic): Delete.
11662         (mi_console_file_new): Delete.
11663         (mi_console_file::mi_console_file): New.
11664         (mi_console_file_delete): Delete.
11665         (mi_console_file_fputs): Delete.
11666         (mi_console_file::write): New.
11667         (mi_console_raw_packet): Delete.
11668         (mi_console_file::flush): New.
11669         (mi_console_file_flush): Delete.
11670         (mi_console_set_raw): Rename to ...
11671         (mi_console_file::set_raw): ... this.
11672         * mi/mi-console.h (class mi_console_file): New class.
11673         (mi_console_file_new, mi_console_set_raw): Delete.
11674         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11675         (mi_set_logging): Use delete and tee_file.  Adjust.
11676         * mi/mi-main.c (output_register): Use string_file.
11677         (mi_cmd_data_evaluate_expression): Use string_file.
11678         (mi_cmd_data_read_memory): Use string_file.
11679         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11680         * mi/mi-out.c (mi_ui_out::main_stream): New.
11681         (mi_ui_out::rewind): Use main_stream and
11682         string_file.
11683         (mi_ui_out::put): Use main_stream and string_file.
11684         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11685         Allocate a 'string_file' instead.
11686         (mi_out_new): Don't allocate a mem_fileopen stream here.
11687         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11688         (mi_ui_out::main_stream): Declare method.
11689         * printcmd.c (eval_command): Use string_file.
11690         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11691         * python/py-arch.c (archpy_disassemble): Use string_file.
11692         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11693         * python/py-frame.c (frapy_str): Use string_file.
11694         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11695         Use string_file.
11696         * python/py-type.c (typy_str): Use string_file.
11697         * python/py-unwind.c (unwind_infopy_str): Use string_file.
11698         * python/py-value.c (valpy_str): Use string_file.
11699         * record-btrace.c (btrace_insn_history): Use string_file.
11700         * regcache.c (regcache_print): Use stdio_file.
11701         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
11702         * remote.c (escape_buffer): Use string_file.
11703         * rust-lang.c (rust_get_disr_info): Use string_file.
11704         * serial.c (serial_open_ops_1): Use stdio_file.
11705         (do_serial_close): Use delete.
11706         * stack.c (print_frame_arg): Use string_file.
11707         (print_frame_args): Remove local mem_fileopen stream, not used.
11708         (print_frame): Use string_file.
11709         * symmisc.c (maintenance_print_symbols): Use stdio_file.
11710         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
11711         Take a 'string_file *' instead of a 'ui_file *'.
11712         * top.c (new_ui): Use stdio_file and stderr_file.
11713         (free_ui): Use delete.
11714         (execute_command_to_string): Use string_file.
11715         (quit_confirm): Use string_file.
11716         * tracepoint.c (collection_list::append_exp): Use string_file.
11717         * tui/tui-disasm.c (tui_disassemble): Use string_file.
11718         * tui/tui-file.c: Don't include "ui-file.h".
11719         (enum streamtype, struct tui_stream): Delete.
11720         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
11721         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
11722         (tui_file::tui_file): New method.
11723         (tui_file_fputs): Delete.
11724         (tui_file_get_strbuf): Delete.
11725         (tui_file::puts): New method.
11726         (tui_file_adjust_strbuf): Delete.
11727         (tui_file_flush): Delete.
11728         (tui_file::flush): New method.
11729         * tui/tui-file.h: Tweak intro comment.
11730         Include ui-file.h.
11731         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
11732         (tui_file_adjust_strbuf): Delete declarations.
11733         (class tui_file): New class.
11734         * tui/tui-io.c (tui_initialize_io): Use tui_file.
11735         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
11736         (tui_register_format): Use string_stream.
11737         * tui/tui-stack.c (tui_make_status_line): Use string_file.
11738         (tui_get_function_from_frame): Use string_file.
11739         * typeprint.c (type_to_string): Use string_file.
11740         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
11741         (null_stream): New global.
11742         (ui_file_delete): Delete.
11743         (ui_file::ui_file): New.
11744         (null_file_isatty): Delete.
11745         (ui_file::~ui_file): New.
11746         (null_file_rewind): Delete.
11747         (ui_file::printf): New.
11748         (null_file_put): Delete.
11749         (null_file_flush): Delete.
11750         (ui_file::putstr): New.
11751         (null_file_write): Delete.
11752         (ui_file::putstrn): New.
11753         (null_file_read): Delete.
11754         (ui_file::putc): New.
11755         (null_file_fputs): Delete.
11756         (null_file_write_async_safe): Delete.
11757         (ui_file::vprintf): New.
11758         (null_file_delete): Delete.
11759         (null_file::write): New.
11760         (null_file_fseek): Delete.
11761         (null_file::puts): New.
11762         (ui_file_data): Delete.
11763         (null_file::write_async_safe): New.
11764         (gdb_flush, ui_file_isatty): Adjust.
11765         (ui_file_put, ui_file_rewind): Delete.
11766         (ui_file_write): Adjust.
11767         (ui_file_write_for_put): Delete.
11768         (ui_file_write_async_safe, ui_file_read): Adjust.
11769         (ui_file_fseek): Delete.
11770         (fputs_unfiltered): Adjust.
11771         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11772         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11773         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11774         (set_ui_file_data): Delete.
11775         (string_file::~string_file, string_file::write)
11776         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11777         (do_ui_file_as_string, ui_file_as_string): Delete.
11778         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11779         (struct mem_file): Delete.
11780         (mem_file_new): Delete.
11781         (stdio_file::stdio_file): New.
11782         (mem_file_delete): Delete.
11783         (stdio_file::stdio_file): New.
11784         (mem_fileopen): Delete.
11785         (stdio_file::~stdio_file): New.
11786         (mem_file_rewind): Delete.
11787         (stdio_file::set_stream): New.
11788         (mem_file_put): Delete.
11789         (stdio_file::open): New.
11790         (mem_file_write): Delete.
11791         (stdio_file_magic, struct stdio_file): Delete.
11792         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11793         (stdio_file::flush): New.
11794         (stdio_file_read): Rename to ...
11795         (stdio_file::read): ... this.  Adjust.
11796         (stdio_file_write): Rename to ...
11797         (stdio_file::write): ... this.  Adjust.
11798         (stdio_file_write_async_safe): Rename to ...
11799         (stdio_file::write_async_safe) ... this.  Adjust.
11800         (stdio_file_fputs): Rename to ...
11801         (stdio_file::puts) ... this.  Adjust.
11802         (stdio_file_isatty): Delete.
11803         (stdio_file_fseek): Delete.
11804         (stdio_file::isatty): New.
11805         (stderr_file_write): Rename to ...
11806         (stderr_file::write) ... this.  Adjust.
11807         (stderr_file_fputs): Rename to ...
11808         (stderr_file::puts) ... this.  Adjust.
11809         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11810         (stderr_file::stderr_file): New.
11811         (tee_file_magic): Delete.
11812         (struct tee_file): Delete.
11813         (tee_file::tee_file): New.
11814         (tee_file_new): Delete.
11815         (tee_file::~tee_file): New.
11816         (tee_file_delete): Delete.
11817         (tee_file_flush): Rename to ...
11818         (tee_file::flush): ... this.  Adjust.
11819         (tee_file_write): Rename to ...
11820         (tee_file::write): ... this.  Adjust.
11821         (tee_file::write_async_safe): New.
11822         (tee_file_fputs): Rename to ...
11823         (tee_file::puts): ... this.  Adjust.
11824         (tee_file_isatty): Rename to ...
11825         (tee_file::isatty): ... this.  Adjust.
11826         * ui-file.h (struct obstack, struct ui_file): Don't
11827         forward-declare.
11828         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11829         (ui_file_write_ftype)
11830         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11831         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11832         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11833         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11834         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11835         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11836         (set_ui_file_fseek): Delete.
11837         (ui_file_data, ui_file_delete, ui_file_rewind)
11838         (struct ui_file): New.
11839         (ui_file_up): New.
11840         (class null_file): New.
11841         (null_stream): Declare.
11842         (ui_file_write_for_put, ui_file_put): Delete.
11843         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11844         Delete.
11845         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11846         (gdb_fopen, tee_file_new): Delete.
11847         (struct string_file): New.
11848         (struct stdio_file): New.
11849         (stdio_file_up): New.
11850         (struct stderr_file): New.
11851         (class tee_file): New.
11852         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11853         of a 'ui_file *'.  Adjust.
11854         * ui-out.h (class ui_out) <field_stream>: Likewise.
11855         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11856         (null_stream): Delete.
11857         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11858         Adjust.
11859         * utils.h (struct ui_file): Delete forward declaration..
11860         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11861         (error_stream): Take a 'string_file &' instead of a
11862         'ui_file *'.
11863         * varobj.c (varobj_value_get_print_value): Use string_file.
11864         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11865         * gdbarch.c: Regenerate.
11866
11867 2017-02-02  Pedro Alves  <palves@redhat.com>
11868
11869         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11870         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11871         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11872         Adjust to call gdb_print_insn instead of
11873         gdb_disassembler::print_insn.
11874         (dump_insns, do_mixed_source_and_assembly_deprecated)
11875         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11876         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11877         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11878         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11879         declaration.
11880         (gdb_pretty_print_insn): Re-add declaration.
11881         * record-btrace.c (btrace_insn_history): Don't allocate a
11882         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11883
11884 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11885
11886         * disasm.h (gdb_disassembly): Remove file_string parameter.
11887         * disasm.c (gdb_disassembly): Likewise.
11888         * cli/cli-cmds.c (print_disassembly): Adapt.
11889         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11890         * stack.c (do_gdb_disassembly): Likewise.
11891
11892 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11893
11894         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11895         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11896         targets.  And if the implicit value is longer than needed, extract
11897         the first bytes instead of the "least significant" ones.
11898
11899 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11900
11901         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11902         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11903         (btrace_fetch): Assert can_access_registers_ptid.
11904         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11905         validate_registers_access.
11906
11907 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11908
11909         * gdbthread.h (can_access_registers_ptid): New.
11910         * thread.c (can_access_registers_ptid): New.
11911
11912 2017-02-01  Pedro Alves  <palves@redhat.com>
11913
11914         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11915
11916 2017-01-31  Pedro Alves  <palves@redhat.com>
11917
11918         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11919         Fix typos.
11920
11921 2017-01-31  Pedro Alves  <palves@redhat.com>
11922
11923         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11924         not used.
11925
11926 2017-01-31  Pedro Alves  <palves@redhat.com>
11927
11928         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11929
11930 2017-01-31  Pedro Alves  <palves@redhat.com>
11931
11932         * common/scoped_restore.h
11933         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11934         change the value's parameter type to T2.
11935         (make_scoped_restore): Likewise.
11936
11937 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11938             Richard Henderson  <rth@redhat.com>
11939
11940         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11941         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11942         GS_BASE for older kernels.
11943         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11944         GS_BASE for older kernels.
11945         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11946         and GS_BASE to the offset table.
11947         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11948         system register group.
11949         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11950         for older kernels.
11951         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11952         amd64 ABI.
11953         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11954         AMD64_GSBASE_REGNUM.
11955         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11956         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11957         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11958         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11959         i386/64bit-segments.xml in those rules.
11960         * features/i386/64bit-segments.xml: New file.
11961         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11962         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11963         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11964         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11965         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11966         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11967         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11968         * features/i386/amd64-avx-linux.c: Regenerated.
11969         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11970         * features/i386/amd64-avx-mpx.c: Regenerated.
11971         * features/i386/amd64-avx512-linux.c: Regenerated.
11972         * features/i386/amd64-linux.c: Regenerated.
11973         * features/i386/amd64-mpx-linux.c: Regenerated.
11974         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11975         * features/i386/i386-avx-mpx.c: Regenerated.
11976         * features/i386/x32-avx-linux.c: Regenerated.
11977         * features/i386/x32-avx512-linux.c: Regenerated.
11978         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11979         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11980         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11981         * regformats/i386/amd64-linux.dat: Regenerated.
11982         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11983         * regformats/i386/x32-avx-linux.dat: Regenerated.
11984         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11985         * regformats/i386/x32-linux.dat: Regenerated.
11986
11987 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11988
11989         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11990         Set to AMD64_NUM_REGS.
11991
11992 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11993
11994         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11995         that checks validity of a register number.
11996
11997 2017-01-27  Kees Cook  <keescook@google.com>
11998
11999         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12000         fetch_fpregs if target has fpa registers.
12001         (arm_linux_store_inferior_registers): Call store_fpregs if target
12002         has fpa registers.
12003
12004 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12005
12006         * cris-tdep.c (cris_gdbarch_init): Remove check for
12007         info.byte_order and force it to BFD_ENDIAN_LITTLE.
12008
12009 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
12010
12011         * corelow.c (get_core_register_section): Check for regset
12012         existence before checking for REGSET_VARIABLE_SIZE.
12013
12014 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12015             Pedro Alves  <palves@redhat.com>
12016
12017         PR gdb/20939
12018         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12019         call memory_error, save memaddr instead.
12020         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12021         negative, cal memory_error.
12022         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12023
12024 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12025
12026         * disasm-selftests.c (memory_error_test): New function.
12027         (_initialize_disasm_selftests): Register memory_error_test.
12028
12029 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12030
12031         * Makefile.in (SFILES): Add disasm-selftests.c and
12032         selftest-arch.c.
12033         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12034         * disasm-selftests.c: New file.
12035         * selftest-arch.c: New file.
12036         * selftest-arch.h: New file.
12037
12038 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12039
12040         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12041         to bfd_arch_mep.  Don't return 0 if section is not
12042         found.  Call print_insn_mep.
12043
12044 2017-01-26  Pedro Alves  <palves@redhat.com>
12045             Yao Qi  <yao.qi@linaro.org>
12046
12047         * arm-tdep.c: Include "disasm.h".
12048         (gdb_print_insn_arm): Update code to get gdbarch.
12049         * disasm.c (dis_asm_read_memory): Change it to
12050         gdb_disassembler::dis_asm_read_memory.
12051         (dis_asm_memory_error): Likewise.
12052         (dis_asm_print_address): Likewise.
12053         (gdb_pretty_print_insn): Change it to
12054         gdb_disassembler::pretty_print_insn.
12055         (dump_insns): Add one argument gdb_disassemlber.  All
12056         callers updated.
12057         (do_mixed_source_and_assembly_deprecated): Likewise.
12058         (do_mixed_source_and_assembly): Likewise.
12059         (do_assembly_only): Likewise.
12060         (gdb_disassembler::gdb_disassembler): New.
12061         (gdb_disassembler::print_insn): New.
12062         * disasm.h (class gdb_disassembler): New.
12063         (gdb_pretty_print_insn): Remove declaration.
12064         (gdb_disassemble_info): Likewise.
12065         * guile/scm-disasm.c (class gdbscm_disassembler): New.
12066         (gdbscm_disasm_read_memory_worker): Update.
12067         (gdbscm_disasm_read_memory): Update.
12068         (gdbscm_disasm_memory_error): Remove.
12069         (gdbscm_disasm_print_address): Remove.
12070         (gdbscm_disassembler::gdbscm_disassembler): New.
12071         (gdbscm_print_insn_from_port): Update.
12072         * mips-tdep.c: Include disasm.h.
12073         (gdb_print_insn_mips): Update code to get gdbarch.
12074         * record-btrace.c (btrace_insn_history): Update.
12075         * spu-tdep.c: Include disasm.h.
12076         (struct spu_dis_asm_data): Remove.
12077         (struct spu_dis_asm_info): New.
12078         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12079         SPU id.
12080         (gdb_print_insn_spu): Cast disassemble_info to
12081         spu_dis_asm_info.
12082
12083 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12084
12085         * disasm.c (do_ui_file_delete): Delete.
12086         (gdb_insn_length): Move code creating stream to ...
12087         * utils.c (null_stream): ... here.  New function.
12088         * utils.h (null_stream): Declare.
12089
12090 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
12091
12092         * python/py-inferior.c (find_thread_object): Return directly
12093         from the loop.  Remove "found" variable.
12094
12095 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
12096
12097         GDB 7.12.1 released.
12098
12099 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12100
12101         * python/py-function.c (fnpy_call): Reorder declarations to have
12102         the gdbpy_enter object declared first.
12103         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12104
12105 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12106
12107         PR python/21068
12108         * python/python-internal.h (PyMem_RawMalloc): Define for
12109         Python < 3.4.
12110         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12111         PyMem_RawMalloc instead of PyMem_Malloc.
12112
12113 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12114             Luis Machado  <lgustavo@codesourcery.com>
12115
12116         * NEWS (New commands): Mention flash-erase.
12117         (New MI commands): Mention target-flash-erase.
12118         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12119         command.
12120         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12121         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12122         * target.c (flash_erase_command): New function.
12123         (initialize_targets): Add new flash-erase command.
12124         * target.h (flash_erase_command): New declaration.
12125
12126 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12127
12128         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12129         HAVE_SYS_PROCFS_H is defined.
12130
12131 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12132
12133         * remote.c (struct cached_reg): Change data into a pointer.
12134         * (stop_reply_dtr): Free data pointers before deleting vector.
12135         (process_stop_reply): Likewise.
12136         (remote_parse_stop_reply): Allocate space for data
12137
12138 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12139
12140         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12141         MAX_REGISTER_SIZE.
12142         (amd64_pseudo_register_read_value): Likewise.
12143         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12144         (store_register_using_P): Likewise.
12145         * regcache.c (regcache_xfer_part): Likewise.
12146
12147 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12148
12149         Split real and pseudo registers.
12150         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12151         (sparc32_pseudo_regnum): New enum.
12152         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12153         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12154         (SPARC32_CP0_REGISTERS): New macro.
12155         (sparc32_pseudo_register_name): New function.
12156         (sparc32_register_name): Use sparc32_pseudo_register_name.
12157         (sparc32_pseudo_register_type): New function.
12158         (sparc32_register_type): Use sparc32_pseudo_register_type.
12159         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12160         pseudo register numbers.
12161         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12162         (SPARC64_CP0_REGISTERS): New macro.
12163         (sparc64_pseudo_register_name): New function.
12164         (sparc64_register_name): Use sparc64_pseudo_register_name.
12165         (sparc64_pseudo_register_type): New function.
12166         (sparc64_register_type): Use sparc64_pseudo_register_type.
12167         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12168         pseudo register numbers.
12169         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12170         sparc64_store_arguments): Handle pseudo register numbers.
12171
12172 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12173
12174         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12175         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12176         output.
12177         (getpkt_or_notif_sane_1): Likewise.
12178
12179 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12180
12181         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12182         of CC.  Pass "-x c++-header" instead of "-x c".
12183
12184 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12185
12186         * remote.c (remote_can_async_p): Update comment.
12187
12188 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12189
12190         * linux-nat.c (linux_nat_can_async_p): Update comment.
12191
12192 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12193
12194         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12195
12196 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12197
12198         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12199
12200 2017-01-10  Tom Tromey  <tom@tromey.com>
12201
12202         * python/py-type.c (typy_legacy_template_argument): Update.
12203         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12204         ~demangle_parse_info): Declare new members.
12205         (cp_demangled_name_to_comp): Return unique_ptr.
12206         (cp_demangled_name_parse_free)
12207         (make_cleanup_cp_demangled_name_parse_free)
12208         (cp_new_demangle_parse_info): Remove.
12209         * cp-support.c (do_demangled_name_parse_free_cleanup)
12210         (make_cleanup_cp_demangled_name_parse_free): Remove.
12211         (inspect_type, cp_canonicalize_string_full)
12212         (cp_canonicalize_string): Update.
12213         (mangled_name_to_comp): Change return type.
12214         (cp_class_name_from_physname, method_name_from_physname)
12215         (cp_func_name, cp_remove_params): Update.
12216         * cp-name-parser.y (demangle_parse_info): New constructor, from
12217         cp_new_demangle_parse_info.
12218         (~demangle_parse_info): New destructor, from
12219         cp_demangled_name_parse_free.
12220         (cp_merge_demangle_parse_infos): Update.
12221         (cp_demangled_name_to_comp): Change return type.
12222
12223 2017-01-10  Tom Tromey  <tom@tromey.com>
12224
12225         * top.c (prevent_dont_repeat): Change return type.
12226         * python/python.c (execute_gdb_command): Use std::string.
12227         Update.
12228         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12229         * command.h (prevent_dont_repeat): Change return type.
12230         * breakpoint.c (bpstat_do_actions_1): Update.
12231
12232 2017-01-10  Tom Tromey  <tom@tromey.com>
12233
12234         * value.h (scoped_value_mark::~scoped_value_mark): Call
12235         free_to_mark.
12236         (scoped_value_mark::free_to_mark): New method.
12237         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12238         scoped_value_mark.
12239
12240 2017-01-10  Tom Tromey  <tom@tromey.com>
12241
12242         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12243         (valpy_reference_value, valpy_const_value, valpy_get_address)
12244         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12245         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12246         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12247         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12248         scoped_value_mark.
12249         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12250         * value.h (scoped_value_mark): New class.
12251
12252 2017-01-10  Tom Tromey  <tom@tromey.com>
12253
12254         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12255         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12256         * psymtab.c (discard_psymtabs_upto): Remove.
12257         (make_cleanup_discard_psymtabs): Remove.
12258         (struct psymtab_state): Remove.
12259
12260 2017-01-10  Tom Tromey  <tom@tromey.com>
12261
12262         * record-full.c (record_full_save_cleanups): Remove.
12263         (record_full_save): Use gdb::unlinker.
12264         * gcore.c (do_bfd_delete_cleanup): Remove.
12265         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12266         cleanups.
12267         * dwarf2read.c (unlink_if_set): Remove.
12268         (write_psymtabs_to_index): Use gdb::unlinker.
12269         * common/gdb_unlinker.h: New file.
12270
12271 2017-01-10  Tom Tromey  <tom@tromey.com>
12272
12273         * windows-tdep.c (windows_xfer_shared_library): Update.
12274         * windows-nat.c (windows_make_so): Update.
12275         * utils.h (make_cleanup_bfd_unref): Remove.
12276         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12277         * symfile.h (symfile_bfd_open)
12278         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12279         * symfile.c (read_symbols, symbol_file_add)
12280         (separate_debug_file_exists): Update.
12281         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12282         (generic_load, reread_symbols): Update.
12283         * symfile-mem.c (symbol_file_add_from_memory): Update.
12284         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12285         (spu_symbol_file_add_from_memory): Update.
12286         * solist.h (struct target_so_ops) <bfd_open>: Return
12287         gdb_bfd_ref_ptr.
12288         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12289         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12290         gdb_bfd_ref_ptr.
12291         (solib_map_sections, reload_shared_libraries_1): Update.
12292         * solib-svr4.c (enable_break): Update.
12293         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12294         * solib-frv.c (enable_break2): Update.
12295         * solib-dsbt.c (enable_break): Update.
12296         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12297         gdb_bfd_ref_ptr.
12298         (darwin_solib_get_all_image_info_addr_at_init): Update.
12299         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12300         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12301         * record-full.c (record_full_save): Update.
12302         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12303         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12304         * minidebug.c (find_separate_debug_file_in_section): Return
12305         gdb_bfd_ref_ptr.
12306         * machoread.c (macho_add_oso_symfile): Change abfd to
12307         gdb_bfd_ref_ptr.
12308         (macho_symfile_read_all_oso): Update.
12309         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12310         (macho_symfile_read): Update.
12311         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12312         (jit_bfd_try_read_symtab): Update.
12313         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12314         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12315         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12316         gdb_bfd_ref_ptr.
12317         (gdb_bfd_ref_policy): New struct.
12318         (gdb_bfd_ref_ptr): New typedef.
12319         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12320         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12321         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12322         gdb_bfd_ref_ptr.
12323         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12324         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12325         (gcore_command): Update.
12326         * exec.c (exec_file_attach): Update.
12327         * elfread.c (elf_symfile_read): Update.
12328         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12329         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12330         (open_and_init_dwo_file): Update.
12331         (open_dwp_file): Return gdb_bfd_ref_ptr.
12332         (open_and_init_dwp_file): Update.
12333         * corelow.c (core_open): Update.
12334         * compile/compile-object-load.c (compile_object_load): Update.
12335         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12336         * coffread.c (coff_symfile_read): Update.
12337         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12338         gdb_bfd_ref_ptr.  Rename.
12339         (dump_bfd_file, restore_command): Update.
12340         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12341         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12342         (find_separate_debug_file_by_buildid): Update.
12343
12344 2017-01-10  Tom Tromey  <tom@tromey.com>
12345
12346         * common/gdb_ref_ptr.h: New file.
12347         * python/py-ref.h (struct gdbpy_ref_policy): New.
12348         (gdbpy_ref): Now a typedef.
12349
12350 2017-01-10  Tom Tromey  <tom@tromey.com>
12351
12352         * utils.h (make_cleanup_htab_delete): Don't declare.
12353         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12354         Remove.
12355         * linespec.c (decode_compound_collector): Add constructor,
12356         destructor.
12357         (lookup_prefix_sym): Remove cleanup.
12358         (symtab_collector): Add constructor, destructor.
12359         (collect_symtabs_from_filename): Remove cleanup.
12360         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12361         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12362         Use htab_up.
12363         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12364         * dwarf2read.c (dw2_expand_symtabs_matching)
12365         (dw2_map_symbol_filenames, dwarf_decode_macros)
12366         (write_psymtabs_to_index): Use htab_up.
12367         * dwarf2loc.c (func_verify_no_selftailcall)
12368         (call_site_find_chain_1, func_verify_no_selftailcall)
12369         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12370         std::vector, gdb::unique_xmalloc_ptr.
12371         (call_sitep): Remove typedef.
12372         (dwarf2_locexpr_baton_eval): Remove unused variable.
12373
12374 2017-01-10  Tom Tromey  <tom@tromey.com>
12375
12376         * python/python-internal.h (make_cleanup_py_decref)
12377         (make_cleanup_py_xdecref): Don't declare.
12378         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12379         (py_xdecref, make_cleanup_py_xdecref): Remove.
12380
12381 2017-01-10  Tom Tromey  <tom@tromey.com>
12382
12383         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12384         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12385
12386 2017-01-10  Tom Tromey  <tom@tromey.com>
12387
12388         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12389
12390 2017-01-10  Tom Tromey  <tom@tromey.com>
12391
12392         * python/py-utils.c (unicode_to_encoded_string)
12393         (python_string_to_target_string)
12394         (python_string_to_target_python_string)
12395         (python_string_to_host_string, gdbpy_obj_to_string)
12396         (get_addr_from_python): Use gdbpy_ref.
12397
12398 2017-01-10  Tom Tromey  <tom@tromey.com>
12399
12400         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12401         gdbpy_ref.
12402
12403 2017-01-10  Tom Tromey  <tom@tromey.com>
12404
12405         * python/python.c (eval_python_command, gdbpy_decode_line)
12406         (gdbpy_run_events, gdbpy_start_type_printers)
12407         (gdbpy_apply_type_printers): Use gdbpy_ref.
12408
12409 2017-01-10  Tom Tromey  <tom@tromey.com>
12410
12411         * python/py-param.c (get_doc_string, compute_enum_values): Use
12412         gdbpy_ref.
12413
12414 2017-01-10  Tom Tromey  <tom@tromey.com>
12415
12416         * python/py-inferior.c (find_thread_object, build_inferior_list):
12417         Use gdbpy_ref.
12418
12419 2017-01-10  Tom Tromey  <tom@tromey.com>
12420
12421         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12422
12423 2017-01-10  Tom Tromey  <tom@tromey.com>
12424
12425         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12426         gdbpy_ref.
12427
12428 2017-01-10  Tom Tromey  <tom@tromey.com>
12429
12430         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12431         extra incref.
12432         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12433         Use gdbpy_ref.
12434
12435 2017-01-10  Tom Tromey  <tom@tromey.com>
12436
12437         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12438         gdbpy_ref.
12439
12440 2017-01-10  Tom Tromey  <tom@tromey.com>
12441
12442         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12443         decref results of PyArg_ParseTupleAndKeywords.
12444
12445 2017-01-10  Tom Tromey  <tom@tromey.com>
12446
12447         * python/python.c (python_run_simple_file): Use
12448         unique_xmalloc_ptr, gdbpy_ref.
12449
12450 2017-01-10  Tom Tromey  <tom@tromey.com>
12451
12452         * python/py-prettyprint.c (print_stack_unless_memory_error)
12453         (print_string_repr, print_children): Use gdbpy_ref.
12454         (dummy_python_frame): New class.
12455         (dummy_python_frame::dummy_python_frame): Rename from
12456         push_dummy_python_frame.
12457         (py_restore_tstate): Remove.
12458
12459 2017-01-10  Tom Tromey  <tom@tromey.com>
12460
12461         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12462
12463 2017-01-10  Tom Tromey  <tom@tromey.com>
12464
12465         * python/python.c (ensure_python_env, restore_python_env):
12466         Remove.
12467         * python/python-internal.h (ensure_python_env): Don't declare.
12468         * varobj.h (varobj_ensure_python_env): Don't declare.
12469         * varobj.c (varobj_ensure_python_env): Remove.
12470
12471 2017-01-10  Tom Tromey  <tom@tromey.com>
12472
12473         * varobj.c (varobj_value_get_print_value): Use
12474         gdbpy_enter_varobj.
12475
12476 2017-01-10  Tom Tromey  <tom@tromey.com>
12477
12478         * python/py-prettyprint.c (print_string_repr, print_children):
12479         Update.
12480         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12481         of "encoding".
12482         * varobj.c (varobj_value_get_print_value): Update.
12483         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12484
12485 2017-01-10  Tom Tromey  <tom@tromey.com>
12486
12487         * varobj.c (varobj_get_display_hint)
12488         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12489         (varobj_set_visualizer, free_variable): Use
12490         gdbpy_enter_varobj.
12491
12492 2017-01-10  Tom Tromey  <tom@tromey.com>
12493
12494         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12495         (do_finish_initialization): New function.  Use gdbpy_ref.
12496         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12497         do_finish_initialization.
12498
12499 2017-01-10  Tom Tromey  <tom@tromey.com>
12500
12501         * python/py-param.c (get_set_value, get_show_value): Use
12502         gdbpy_enter, gdbpy_ref.
12503
12504 2017-01-10  Tom Tromey  <tom@tromey.com>
12505
12506         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12507
12508 2017-01-10  Tom Tromey  <tom@tromey.com>
12509
12510         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12511
12512 2017-01-10  Tom Tromey  <tom@tromey.com>
12513
12514         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12515         Use gdbpy_enter_varobj.
12516
12517 2017-01-10  Tom Tromey  <tom@tromey.com>
12518
12519         * varobj.c (gdbpy_enter_varobj): New constructor.
12520         * python/python-internal.h (gdbpy_enter_varobj): New class.
12521         * python/py-varobj.c (py_varobj_get_iterator): Use
12522         gdbpy_enter_varobj.
12523
12524 2017-01-10  Tom Tromey  <tom@tromey.com>
12525
12526         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12527         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12528         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12529         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12530         unique_xmalloc_ptr.
12531         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12532
12533 2017-01-10  Tom Tromey  <tom@tromey.com>
12534
12535         * python/py-xmethods.c (invoke_match_method): Use
12536         gdbpy_ref.
12537
12538 2017-01-10  Tom Tromey  <tom@tromey.com>
12539
12540         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12541         gdbpy_enter, gdbpy_ref.
12542
12543 2017-01-10  Tom Tromey  <tom@tromey.com>
12544
12545         * python/python.c (python_interactive_command): Use gdbpy_enter.
12546
12547 2017-01-10  Tom Tromey  <tom@tromey.com>
12548
12549         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12550         gdbpy_ref.
12551
12552 2017-01-10  Tom Tromey  <tom@tromey.com>
12553
12554         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12555         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12556
12557 2017-01-10  Tom Tromey  <tom@tromey.com>
12558
12559         * utils.h (htab_deleter): New struct.
12560         (htab_up): New typedef.
12561         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12562         gdbpy_enter, gdbpy_ref, htab_up.
12563
12564 2017-01-10  Tom Tromey  <tom@tromey.com>
12565
12566         * python/py-unwind.c (pending_frame_invalidate): Remove.
12567         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12568
12569 2017-01-10  Tom Tromey  <tom@tromey.com>
12570
12571         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12572         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12573
12574 2017-01-10  Tom Tromey  <tom@tromey.com>
12575
12576         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12577
12578 2017-01-10  Tom Tromey  <tom@tromey.com>
12579
12580         * python/python.c (gdbpy_eval_from_control_command)
12581         (gdbpy_source_script, gdbpy_run_events)
12582         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12583         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12584         gdbpy_enter.
12585
12586 2017-01-10  Tom Tromey  <tom@tromey.com>
12587
12588         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12589
12590 2017-01-10  Tom Tromey  <tom@tromey.com>
12591
12592         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12593
12594 2017-01-10  Tom Tromey  <tom@tromey.com>
12595
12596         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12597         (python_on_inferior_call_pre, python_on_inferior_call_post)
12598         (python_on_memory_change, python_on_register_change)
12599         (python_inferior_exit, python_new_objfile, add_thread_object)
12600         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12601
12602 2017-01-10  Tom Tromey  <tom@tromey.com>
12603
12604         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12605         (bpfinishpy_handle_exit): Use gdbpy_enter.
12606
12607 2017-01-10  Tom Tromey  <tom@tromey.com>
12608
12609         * python/py-cmd.c (cmdpy_destroyer)
12610         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12611         gdbpy_enter.
12612
12613 2017-01-10  Tom Tromey  <tom@tromey.com>
12614
12615         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12616         gdbpy_enter.
12617         (gdbpy_breakpoint_has_cond): Likewise.
12618
12619 2017-01-10  Tom Tromey  <tom@tromey.com>
12620
12621         * python/python.c (gdbpy_enter): New constructor.
12622         (~gdbpy_enter): New destructor.
12623         (restore_python_env, ensure_python_env): Rewrite.
12624         * python/python-internal.h (gdbpy_enter): New class.
12625
12626 2017-01-10  Tom Tromey  <tom@tromey.com>
12627
12628         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12629
12630 2017-01-10  Tom Tromey  <tom@tromey.com>
12631
12632         * python/py-value.c (value_has_field, get_field_flag)
12633         (get_field_type, valpy_getitem, convert_value_from_python): Use
12634         gdbpy_ref.
12635
12636 2017-01-10  Tom Tromey  <tom@tromey.com>
12637
12638         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12639         gdbpy_ref.
12640
12641 2017-01-10  Tom Tromey  <tom@tromey.com>
12642
12643         * python/py-prettyprint.c (search_pp_list)
12644         (find_pretty_printer_from_objfiles)
12645         (find_pretty_printer_from_progspace)
12646         (find_pretty_printer_from_gdb, find_pretty_printer)
12647         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12648         gdbpy_ref.
12649
12650 2017-01-10  Tom Tromey  <tom@tromey.com>
12651
12652         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12653
12654 2017-01-10  Tom Tromey  <tom@tromey.com>
12655
12656         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12657         (ltpy_get_all_source_lines): Use gdbpy_ref.
12658
12659 2017-01-10  Tom Tromey  <tom@tromey.com>
12660
12661         * python/py-framefilter.c (extract_sym, extract_value)
12662         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12663         gdbpy_ref.
12664
12665 2017-01-10  Tom Tromey  <tom@tromey.com>
12666
12667         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12668
12669 2017-01-10  Tom Tromey  <tom@tromey.com>
12670
12671         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12672
12673 2017-01-10  Tom Tromey  <tom@tromey.com>
12674
12675         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12676         gdbpy_ref.
12677
12678 2017-01-10  Tom Tromey  <tom@tromey.com>
12679
12680         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12681
12682 2017-01-10  Tom Tromey  <tom@tromey.com>
12683
12684         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12685         (typy_range): Use gdbpy_ref.
12686
12687 2017-01-10  Tom Tromey  <tom@tromey.com>
12688
12689         * python/py-threadevent.c (create_thread_event_object): Use
12690         gdbpy_ref.
12691         * python/py-stopevent.c (create_stop_event_object): Simplify.
12692         (emit_stop_event): Use gdbpy_ref.
12693         * python/py-signalevent.c (create_signal_event_object): Use
12694         gdbpy_ref.
12695         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12696         (emit_new_objfile_event, create_clear_objfiles_event_object)
12697         (emit_clear_objfiles_event): Use gdbpy_ref.
12698         * python/py-infevents.c (create_inferior_call_event_object)
12699         (create_register_changed_event_object)
12700         (create_memory_changed_event_object, emit_inferior_call_event)
12701         (emit_memory_changed_event, emit_register_changed_event): Use
12702         gdbpy_ref.
12703         * python/py-exitedevent.c (create_exited_event_object)
12704         (emit_exited_event): Use gdbpy_ref.
12705         * python/py-event.h (evpy_emit_event): Remove
12706         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
12707         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
12708         * python/py-continueevent.c (emit_continue_event): Use
12709         gdbpy_ref.
12710         * python/py-breakpoint.c (gdbpy_breakpoint_created)
12711         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
12712         gdbpy_ref.
12713         * python/py-bpevent.c (create_breakpoint_event_object): Use
12714         gdbpy_ref.
12715
12716 2017-01-10  Tom Tromey  <tom@tromey.com>
12717
12718         * python/py-ref.h: New file.
12719
12720 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12721
12722         * cli-out.c (cli_ui_out::do_redirect): Change return type to
12723         void.
12724         * cli-out.h (cli_ui_out::do_redirect): Likewise.
12725         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
12726         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
12727         * ui-out.c (ui_out::redirect): Likewise.
12728         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
12729         * cli/cli-logging.c (set_logging_redirect): Update call site of
12730         ui_out::redirect.
12731         (handle_redirections): Likewise.
12732         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
12733         * top.c (execute_command_to_string): Likewise.
12734         * utils.c (do_ui_out_redirect_pop): Likewise.
12735
12736 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
12737
12738         * stack.c (_initialize_stack): Update "frame" command help message.
12739
12740 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
12741
12742         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
12743
12744 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12745
12746         * x86-linux-nat.h: Include gdb_proc_service.h.
12747
12748 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12749
12750         * ser-base.h: Include serial.h.
12751
12752 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12753
12754         * ppc-linux-tdep.h: Include ppc-tdep.h.
12755
12756 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12757
12758         * nat/amd64-linux-siginfo.h: Include signal.h.
12759
12760 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12761
12762         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12763
12764 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12765
12766         * mi/mi-parse.h: Include mi-cmds.h.
12767
12768 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12769
12770         * inf-loop.c: Don't include "target.h".
12771         * inf-loop.h: Include it here.
12772
12773 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12774
12775         * dfp.h: Include "dboulest.h" and "expression.h".
12776
12777 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12778
12779         * ax-gdb.h: Include "ax.h".
12780
12781 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12782
12783         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12784         with nat/gdb_ptrace.h.
12785
12786 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12787
12788         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12789         new line.
12790         (mips64_fbsd_sigframe_init): Likewise.
12791
12792 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12793
12794         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12795         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12796
12797 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12798
12799         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12800         * NEWS: Mention new FreeBSD/mips native configuration.
12801         * config/mips/fbsd.mh: New file.
12802         * configure.host: Add mips*-*-freebsd*.
12803         * mips-fbsd-nat.c: New file.
12804
12805 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12806
12807         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12808         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12809         * NEWS: Mention new FreeBSD/mips target.
12810         * configure.tgt: Add mips*-*-freebsd*.
12811         * mips-fbsd-tdep.c: New file.
12812         * mips-fbsd-tdep.h: New file.
12813
12814 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12815
12816         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12817         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12818
12819 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12820
12821         Update copyright year range in all GDB files.
12822
12823 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12824
12825         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12826
12827 For older changes see ChangeLog-2016.
12828 \f
12829 Local Variables:
12830 mode: change-log
12831 left-margin: 8
12832 fill-column: 74
12833 version-control: never
12834 coding: utf-8
12835 End: