Constify execute_command
[external/binutils.git] / gdb / ChangeLog
1 2017-11-07  Tom Tromey  <tom@tromey.com>
2
3         * event-top.h (command_handler): Constify.
4         * record-full.c (cmd_record_full_start): Update.
5         * thread.c (thread_apply_all_command): Update.
6         * printcmd.c (eval_command): Update.
7         * mi/mi-main.c (mi_execute_cli_command): Update.
8         (mi_execute_async_cli_command): Update.
9         * tui/tui-stack.c (tui_update_command): Update.
10         * cli/cli-interp.c (safe_execute_command): Constify.
11         * record.c (record_start): Update.
12         (record_start, record_stop, cmd_record_start): Update.
13         * record-btrace.c (cmd_record_btrace_bts_start): Update.
14         (cmd_record_btrace_pt_start): Update.
15         (cmd_record_btrace_start): Update.
16         (cmd_record_btrace_start): Update.
17         * reverse.c (exec_reverse_once): Update.
18         * python/python.c (execute_gdb_command): Don't copy the command.
19         * event-top.c (command_line_handler): Update.
20         (command_handler): Constify.
21         * defs.h (deprecated_call_command_hook): Constify.
22         * cli/cli-script.h (execute_user_command): Constify.
23         * cli/cli-script.c (execute_user_command): Constify.
24         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
25         (enum command_control_type): Update.
26         * main.c (catch_command_errors): Remove non-const overload.
27         (catch_command_errors_ftype): Remove.
28         * python/py-cmd.c (cmdpy_function): Constify.
29         * guile/scm-cmd.c (cmdscm_function): Constify.
30         * cli/cli-dump.c (call_dump_func): Constify.
31         * cli/cli-decode.c (do_const_cfunc): Constify.
32         (do_sfunc): Constify.
33         (cmd_func): Constify.
34         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
35         * top.h (execute_command): Constify.
36         * top.c (execute_command): Constify.
37         (execute_command_to_string): Constify.
38         (deprecated_call_command_hook): Constify.
39         * command.h (cmd_func): Constify.
40         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
41
42 2017-11-07  Tom Tromey  <tom@tromey.com>
43
44         * ada-lang.c (catch_ada_exception_command): Constify.
45         (catch_assert_command): Constify.
46         * break-catch-throw.c (catch_catch_command, catch_throw_command)
47         (catch_rethrow_command): Constify.
48         (catch_exception_command_1): Constify.
49         * breakpoint.h (add_catch_command): Constify.
50         * break-catch-syscall.c (catch_syscall_command_1): Constify.
51         (catch_syscall_split_args): Constify.
52         * break-catch-sig.c (catch_signal_command): Constify.
53         (catch_signal_split_args): Constify.
54         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
55         cmd_const_sfunc_ftype.
56         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
57         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
58         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
59         (add_setshow_string_cmd, struct cmd_list_element)
60         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
61         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
62         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
63         Constify.
64         (set_cmd_sfunc): Constify.
65         (empty_sfunc): Constify.
66         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
67         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
68         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
69         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
70         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
71         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
72         Constify.
73         (set_cmd_sfunc): Constify.
74         (cmd_sfunc_ftype): Remove.
75         * compile/compile.c (set_compile_args): Constify.
76         * infrun.c (set_disable_randomization): Constify.
77         * infcmd.c (set_args_command, set_cwd_command): Constify.
78         * breakpoint.c (set_condition_evaluation_mode): Constify.
79         (add_catch_command): Constify.
80         (catch_fork_command_1, catch_exec_command_1)
81         (catch_load_command_1, catch_unload_command_1): Constify.
82         (catch_load_or_unload): Constify.
83         * guile/scm-param.c (pascm_set_func): Constify.
84         (add_setshow_generic): Constify.
85         * python/py-param.c (get_set_value): Constify.
86         * top.h (set_verbose): Constify.
87         * tui/tui-win.c (tui_set_var_cmd): Constify.
88         * mi/mi-main.c (set_mi_async_command): Constify.
89         * cli/cli-logging.c (set_logging_overwrite)
90         (set_logging_redirect): Constify.
91         * value.c (set_max_value_size): Constify.
92         * valprint.c (set_input_radix, set_output_radix): Constify.
93         * utils.c (set_width_command, set_height_command): Constify.
94         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
95         * tracepoint.c (set_disconnected_tracing)
96         (set_circular_trace_buffer, set_trace_buffer_size)
97         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
98         * top.c (set_history_size_command, set_verbose, set_editing)
99         (set_gdb_datadir, set_history_filename): Constify.
100         * target.c (set_targetdebug, maint_set_target_async_command)
101         (maint_set_target_non_stop_command, set_target_permissions)
102         (set_write_memory_permission): Constify.
103         (open_target): Constify.
104         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
105         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
106         * symtab.c (set_symbol_cache_size_handler): Constify.
107         * symfile.c (set_ext_lang_command): Constify.
108         * symfile-debug.c (set_debug_symfile): Constify.
109         * source.c (set_directories_command): Constify.
110         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
111         * serial.c (set_parity): Constify.
112         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
113         * remote.c (set_remote_exec_file, set_remotebreak)
114         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
115         * record.c (set_record_insn_history_size)
116         (set_record_call_history_size): Constify.
117         * record-full.c (set_record_full_insn_max_num): Constify.
118         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
119         * osabi.c (set_osabi): Constify.
120         * mips-tdep.c (set_mips64_transfers_32bit_regs)
121         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
122         * maint.c (maintenance_set_profile_cmd): Constify.
123         * linux-thread-db.c (set_libthread_db_search_path): Constify.
124         * language.c (set_language_command, set_range_command)
125         (set_case_command): Constify.
126         * infrun.c (set_non_stop, set_observer_mode)
127         (set_stop_on_solib_events, set_schedlock_func)
128         (set_exec_direction_func): Constify.
129         * infcmd.c (set_inferior_tty_command): Constify.
130         * disasm.c (set_disassembler_options_sfunc): Constify.
131         * demangle.c (set_demangling_command): Constify.
132         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
133         * cris-tdep.c (set_cris_version, set_cris_mode)
134         (set_cris_dwarf2_cfi): Constify.
135         * corefile.c (set_gnutarget_command): Constify.
136         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
137         (set_target_wide_charset_sfunc): Constify.
138         * breakpoint.c (update_dprintf_commands): Constify.
139         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
140         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
141         (set_disassembly_style_sfunc): Constify.
142         * arch-utils.c (set_endian, set_architecture): Constify.
143         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
144         * agent.c (set_can_use_agent): Constify.
145
146 2017-11-07  Tom Tromey  <tom@tromey.com>
147
148         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
149         (go32_pde, go32_pte, go32_pte_for_address): Constify.
150         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
151         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
152         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
153         (parse_int_arg, show_thread_default_detach_sc_cmd)
154         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
155         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
156         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
157         (show_task_pause_cmd, set_task_detach_sc_cmd)
158         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
159         (set_noninvasive_cmd, set_thread_pause_cmd)
160         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
161         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
162         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
163         * windows-nat.c (display_selectors): Constify.
164         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
165         non-const "cfunc".
166         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
167         (cmd_cfunc_eq): Likewise.
168         (struct cmd_list_element): Likewise.
169         (do_cfunc): Remove.
170         (cli_user_command_p): Update.
171         * command.h (add_cmd): Remove non-const overload.
172         (cmd_cfunc_ftype): Remove typedef.
173         (cmd_cfunc_eq): Remove non-const overload.
174         * value.c (show_values): Constify.
175         * thread.c (thread_apply_all_command): Constify.
176         * symfile.c (load_command): Constify.
177         * source.c (directory_command): Constify.
178         * maint.c (maintenance_internal_error)
179         (maintenance_demangler_warning, maintenance_space_display)
180         (maintenance_print_architecture, maintenance_translate_address)
181         (maintenance_info_selftests, maintenance_internal_warning):
182         Constify.
183         * breakpoint.c (disable_trace_command, enable_trace_command):
184         Constify.
185         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
186         Constify.
187         (add_auto_load_safe_path): Constify.
188         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
189         * top.h (show_commands): Constify.
190         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
191         * sparc64-tdep.c (adi_examine_command): Constify.
192         (adi_assign_command): Constify.
193
194 2017-11-07  Tom Tromey  <tom@tromey.com>
195
196         * frame.h (info_locals_command, info_args_command): Constify.
197         * auto-load.h (auto_load_info_scripts): Constify.
198         * inferior.h (registers_info): Constify.
199         * copying.c: Rebuild.
200         * copying.awk: Constify generated commands.
201         * auto-load.c (auto_load_info_scripts)
202         (info_auto_load_gdb_scripts): Constify.
203         * cli/cli-decode.c (struct cmd_list_element): Take a
204         cmd_const_cfunc_ftype.
205         * command.h (add_info): Take a cmd_const_cfunc_ftype.
206         * tui/tui-win.c (tui_all_windows_info): Constify.
207         * python/py-auto-load.c (info_auto_load_python_scripts):
208         Constify.
209         * cli/cli-cmds.c (show_command): Remove non-const overload.
210         * tracepoint.c (info_tvariables_command, info_scope_command):
211         Constify.
212         (info_static_tracepoint_markers_command): Constify.
213         * thread.c (info_threads_command): Constify.
214         (print_thread_info_1): Constify.
215         * target.c (info_target_command): Constify.
216         * symtab.c (info_sources_command, info_functions_command)
217         (info_types_command): Constify.
218         (info_variables_command): Remove non-const overload.
219         * symfile.c (info_ext_lang_command): Constify.
220         * stack.c (info_frame_command, info_locals_command)
221         (info_args_command): Constify.
222         (backtrace_command): Remove non-const overload.
223         * source.c (info_source_command, info_line_command): Constify.
224         * solib.c (info_sharedlibrary_command): Constify.
225         * skip.c (info_skip_command): Constify.
226         * ser-go32.c (info_serial_command): Constify.
227         * reverse.c (info_bookmarks_command): Constify.
228         * printcmd.c (info_symbol_command, info_address_command)
229         (info_display_command): Constify.
230         * osdata.c (info_osdata_command): Constify.
231         * objc-lang.c (info_selectors_command, info_classes_command):
232         Constify.
233         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
234         * memattr.c (info_mem_command): Constify.
235         * macrocmd.c (info_macro_command, info_macros_command): Constify.
236         * linux-fork.c (info_checkpoints_command): Constify.
237         * infrun.c (info_signals_command): Constify.
238         * inflow.c (info_terminal_command): Constify.
239         * inferior.c (info_inferiors_command): Constify.
240         (print_inferior): Constify.
241         * infcmd.c (info_program_command, info_all_registers_command)
242         (info_registers_command, info_vector_command)
243         (info_float_command): Constify.
244         (registers_info): Constify.
245         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
246         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
247         Constify.
248         * f-valprint.c (info_common_command): Constify.
249         * dcache.c (info_dcache_command): Constify.
250         (dcache_info_1): Constify.
251         * darwin-nat-info.c (info_mach_tasks_command)
252         (info_mach_task_command, info_mach_ports_command)
253         (info_mach_port_command, info_mach_threads_command)
254         (info_mach_thread_command, info_mach_regions_command)
255         (info_mach_regions_recurse_command, info_mach_region_command)
256         (info_mach_exceptions_command): Constify.
257         (get_task_from_args): Constify.
258         * cp-support.c (info_vtbl_command): Constify.
259         * breakpoint.c (info_watchpoints_command)
260         (info_tracepoints_command): Constify.
261         (info_breakpoints_command): Remove non-const overload.
262         * avr-tdep.c (avr_io_reg_read_command): Constify.
263         * auxv.c (info_auxv_command): Constify.
264         * ada-tasks.c (info_tasks_command): Constify.
265         (info_task): Constify.
266         * ada-lang.c (info_exceptions_command): Constify.
267
268 2017-11-07  Tom Tromey  <tom@tromey.com>
269
270         * solib.h (no_shared_libraries): Constify.
271         * frame.h (return_command): Constify.
272         * cli/cli-cmds.h (quit_command): Constify.
273         * top.h (quit_command, execute_command): Constify.
274         * target.h (flash_erase_command): Constify.
275         * inferior.h (set_inferior_args, attach_command): Constify.
276         * tracepoint.h (start_tracing, stop_tracing): Constify.
277         * breakpoint.h (break_command, tbreak_command)
278         (hbreak_command_wrapper, thbreak_command_wrapper)
279         (rbreak_command_wrapper, watch_command_wrapper)
280         (awatch_command_wrapper, rwatch_command_wrapper)
281         (get_tracepoint_by_number): Constify.
282         * symtab.c (info_variables_command, rbreak_command)
283         (symtab_symbol_info): Constify.
284         (info_variables_command): Add non-const overload.
285         * top.c (dont_repeat_command): Constify.
286         * breakpoint.c (ignore_command, commands_command)
287         (condition_command, tbreak_command, hbreak_command)
288         (thbreak_command, clear_command, break_command)
289         (info_breakpoints_command, watch_command, rwatch_command)
290         (awatch_command, trace_command, ftrace_command, strace_command)
291         (trace_pass_command, break_range_command, dprintf_command)
292         (agent_printf_command, get_tracepoint_by_number)
293         (watch_maybe_just_location, trace_pass_command): Constify.
294         (info_breakpoints_command): Add non-const overload.
295         * tracefile.c (tsave_command): Constify.
296         * infcmd.c (attach_command, disconnect_command, signal_command)
297         (queue_signal_command, stepi_command, nexti_command)
298         (finish_command, next_command, step_command, until_command)
299         (advance_command, jump_command, continue_command, run_command)
300         (start_command, starti_command, interrupt_command)
301         (run_command_1, set_inferior_args, step_1): Constify.
302         * inferior.c (add_inferior_command, remove_inferior_command)
303         (clone_inferior_command): Constify.
304         * linux-fork.c (checkpoint_command, restart_command): Constify.
305         * windows-nat.c (signal_event_command): Constify.
306         * guile/guile.c (guile_repl_command, guile_command): Constify.
307         * printcmd.c (x_command, display_command, printf_command)
308         (output_command, set_command, call_command, print_command)
309         (eval_command): Constify.
310         (non_const_set_command): Remove.
311         (_initialize_printcmd): Update.
312         * source.c (forward_search_command, reverse_search_command):
313         Constify.
314         * jit.c (jit_reader_load_command, jit_reader_unload_command):
315         Constify.
316         * infrun.c (handle_command): Constify.
317         * memattr.c (mem_command): Constify.
318         * stack.c (return_command, up_command, up_silently_command)
319         (down_command, down_silently_command, frame_command)
320         (backtrace_command, func_command, backtrace_command_1): Constify.
321         (backtrace_command): Add non-const overload.
322         * remote-sim.c (simulator_command): Constify.
323         * exec.c (set_section_command): Constify.
324         * tracepoint.c (tdump_command, trace_variable_command)
325         (tstatus_command, tstop_command, tstart_command)
326         (end_actions_pseudocommand, while_stepping_pseudocommand)
327         (collect_pseudocommand, teval_pseudocommand, actions_command)
328         (start_tracing, stop_tracing): Constify.
329         * value.c (init_if_undefined_command): Constify.
330         * tui/tui-stack.c (tui_update_command): Constify.
331         * tui/tui-win.c (tui_refresh_all_command)
332         (tui_set_tab_width_command, tui_set_win_height_command)
333         (tui_set_focus_command, tui_scroll_forward_command)
334         (tui_scroll_backward_command, tui_scroll_left_command)
335         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
336         (tui_set_win_height): Constify.
337         * tui/tui-layout.c (tui_layout_command): Constify.
338         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
339         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
340         (proc_untrace_sysexit_cmd): Constify.
341         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
342         (threadset_test_cmd, threadlist_update_test_cmd)
343         (threadalive_test): Constify.
344         * objc-lang.c (print_object_command): Constify.
345         * command.h (add_com): Constify.
346         * cli/cli-dump.c (restore_command): Constify.
347         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
348         (help_command, complete_command, shell_command, edit_command)
349         (list_command, disassemble_command, make_command)
350         (apropos_command, alias_command): Constify.
351         * cli/cli-script.c (document_command, define_command)
352         (while_command, if_command, validate_comname): Constify.
353         * cli/cli-decode.c (struct cmd_list_element): Change type of
354         "fun".
355         * target.c (do_monitor_command, flash_erase_command): Constify.
356         * regcache.c (reg_flush_command): Constify.
357         * reverse.c (reverse_step, reverse_next, reverse_stepi)
358         (reverse_nexti, reverse_continue, reverse_finish)
359         (save_bookmark_command, goto_bookmark_command)
360         (exec_reverse_once): Constify.
361         * python/python.c (python_interactive_command, python_command):
362         Constify.
363         * typeprint.c (ptype_command, whatis_command, whatis_exp):
364         Constify.
365         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
366         * gcore.c (gcore_command): Constify.
367
368 2017-11-07  Tom Tromey  <tom@tromey.com>
369
370         * printcmd.c (x_command): Call set_repeat_arguments.
371         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
372         * top.c (repeat_arguments): New global.
373         (set_repeat_arguments): New function.
374         (execute_command): Handle repeat_arguments.
375         (show_commands): Calls set_repeat_arguments.
376         * command.h (set_repeat_arguments): Declare.
377
378 2017-11-07  Tom Tromey  <tom@tromey.com>
379
380         * stack.c (backtrace_command): Use std::string.
381         (backtrace_command_1): Make "count_exp" const.
382
383 2017-11-07  Tom Tromey  <tom@tromey.com>
384
385         * source.c (directory_switch, mod_path, add_path): Constify.
386         * defs.h (add_path, mod_path, directory_switch): Constify.
387         * mi/mi-cmd-env.c (env_mod_path): Constify.
388
389 2017-11-07  Tom Tromey  <tom@tromey.com>
390
391         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
392         (run_command_1, continue_command, step_1, jump_command)
393         (signal_command, until_command, advance_command, finish_command)
394         (attach_command): Update.
395
396 2017-11-07  Tom Tromey  <tom@tromey.com>
397
398         * command.h (set_cmd_cfunc): Don't declare.
399         * cli/cli-decode.c (set_cmd_cfunc): Now static.
400
401 2017-11-07  Tom Tromey  <tom@tromey.com>
402
403         * stack.c (select_frame_command): Constify.
404         * cli/cli-decode.c (add_com_suppress_notification): Constify.
405         * command.h (add_com_suppress_notification): Constify.
406
407 2017-11-07  Tom Tromey  <tom@tromey.com>
408
409         * breakpoint.c (stop_command): Constify.
410         * cli/cli-decode.c (struct cmd_list_element): Constify.
411         * command.h (add_abbrev_prefix_cmd): Constify.
412
413 2017-11-07  Pedro Alves  <palves@redhat.com>
414
415         * breakpoint.c (extract_bp_kind): New enum.
416         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
417         factored out from ...
418         (extract_bp_number_and_location): ... here.
419         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
420
421 2017-11-07  Pedro Alves  <palves@redhat.com>
422
423         * breakpoint.c (extract_bp_number_and_location): Change return
424         type to void.  Throw error instead of warning.
425         (enable_disable_command): Adjust.
426
427 2017-11-07  Xavier Roirand  <roirand@adacore.com>
428             Pedro Alves  <palves@redhat.com>
429
430         * breakpoint.c (map_breakpoint_number_range): New, factored out
431         from ...
432         (map_breakpoint_numbers): ... here.
433         (find_location_by_number): Change parameters from string to
434         breakpoint number and location.
435         (extract_bp_number_and_location): New function.
436         (enable_disable_bp_num_loc)
437         (enable_disable_breakpoint_location_range)
438         (enable_disable_command): New functions, factored out ...
439         (enable_command, disable_command): ... these functions, and
440         adjusted to support ranges.
441         * NEWS: Document enable/disable breakpoint location range feature.
442
443 2017-11-06  Luis Machado  <luis.machado@linaro.org>
444
445         * MAINTAINERS (Write After Approval): Update my e-mail address.
446
447 2017-11-06  Pedro Alves  <palves@redhat.com>
448
449         * gnu-nat.c (gnu_terminal_init): Delete.
450         (gnu_target): Don't install gnu_terminal_init.
451         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
452         (child_terminal_init): ... this function.
453
454 2017-11-06  Pedro Alves  <palves@redhat.com>
455
456         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
457         sgtty.h.
458         * config.in, configure: Regenerate.
459
460 2017-11-06  Pedro Alves  <palves@redhat.com>
461
462         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
463         (async_init_signals): Adjust.
464         (handle_stop_sig): Rename to ...
465         (handle_sigtstp): ... this.
466         (async_stop_sig): Rename to ...
467         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
468         SIGTSTP path.
469         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
470         instead of STOP_SIGNAL thoughout.
471         (handle_stop_sig): Rename to ...
472         (handle_sigtstp): ... this.
473         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
474
475 2017-11-06  Pedro Alves  <palves@redhat.com>
476
477         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
478         longer set flags twice in row.
479
480 2017-11-06  Pedro Alves  <palves@redhat.com>
481
482         * Makefile.in (SER_HARDWIRE): Update comment.
483         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
484         * common/gdb_termios.h: Delete file.
485         * common/job-control.c: Include termios.h and unistd.h instead of
486         gdb_termios.h.
487         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
488         check.
489         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
490         Remove sgtty code.
491         * configure.ac: No longer check for termio.h and sgtty.h.
492         * configure: Regenerate.
493         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
494         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
495         Replace PROCESS_GROUP_TYPE references with pid_t references
496         throughout.
497         (gdb_getpgrp): Delete.
498         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
499         (child_terminal_inferior): Remove comment.  Remove sgtty code.
500         (child_terminal_ours_1): Use tcgetpgrp directly instead of
501         gdb_getpgrp.  Use serial_set_tty_state instead aof
502         serial_noflush_set_tty_state.  Remove sgtty code.
503         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
504         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
505         (inferior_process_group): Now returns pid_t.
506         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
507         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
508         * ser-event.c (serial_event_ops): Update.
509         * ser-go32.c (dos_noflush_set_tty_state): Delete.
510         (dos_ops): Update.
511         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
512         * ser-pipe.c (pipe_ops): Update.
513         * ser-tcp.c (tcp_ops): Update.
514         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
515         HAVE_TERMIOS checks.
516         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
517         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
518         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
519         assume termios.
520         (hardwire_noflush_set_tty_state): Delete.
521         (hardwire_print_tty_state, hardwire_drain_output)
522         (hardwire_flush_output, hardwire_flush_input)
523         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
524         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
525         code, and assume termios.
526         (hardwire_ops): Update.
527         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
528         * serial.c (serial_noflush_set_tty_state): Delete.
529         * serial.h (serial_noflush_set_tty_state): Delete.
530         (serial_ops::noflush_set_tty_state): Delete.
531
532 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
533
534         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
535         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
536         (COMMON_OBS): Remove doublest.o and dfp.o.
537         Do not build target-float.c (instead of doublest.c)
538         with -Wformat-nonliteral.
539
540         * doublest.c: Remove file.
541         * doublest.h: Remove file.
542         * dfp.c: Remove file.
543         * dfp.h: Remove file.
544
545         * target-float.c: Do not include "doublest.h" and "dfp.h".
546         (DOUBLEST): Move here from doublest.h.
547         (enum float_kind): Likewise.
548         (FLOATFORMAT_CHAR_BIT): Likewise.
549         (FLOATFORMAT_LARGEST_BYTES): Likewise.
550         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
551         (floatformat_precision): Likewise.
552         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
553         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
554         Likewise.
555         (host_float_format, host_double_format, host_long_double_format):
556         Likewise.
557         (floatformat_to_string, floatformat_from_string): Likewise.
558         (floatformat_to_doublest): Likewise.  Also, inline the original
559         convert_floatformat_to_doublest.
560         (floatformat_from_doublest): Likewise.  Also, inline the original
561         convert_floatformat_from_doublest.
562
563         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
564         (MAX_DECIMAL_STRING): Move here from dfp.c.
565         (match_endianness): Likewise.
566         (set_decnumber_context, decimal_check_errors): Likewise.
567         (decimal_from_number, decimal_to_number): Likewise.
568         (decimal_to_string, decimal_from_string): Likewise.  Make static.
569         (decimal_from_longest, decimal_from_ulongest): Likewise.
570         (decimal_to_longest): Likewise.
571         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
572         (decimal_convert): Likewise.
573
574 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
575
576         * doublest.c: Do not include "gdbtypes.h".
577         (extract_typed_floating): Remove.
578         (store_typed_floating): Remove.
579         (convert_typed_floating): Remove.
580         * doublest.h (struct type): Remove.
581         (DOUBLEST_PRINT_FORMAT): Remove.
582         (DOUBLEST_SCAN_FORMAT): Remove.
583         (extract_typed_floating): Remove.
584         (store_typed_floating): Remove.
585         (convert_typed_floating): Remove.
586
587         * dfp.c (decimal_from_doublest): Remove.
588         (decimal_to_doublest): Remove.
589         * dfp.h: Do not include "doublest.h".
590         (decimal_from_doublest): Remove.
591         (decimal_to_doublest): Remove.
592
593         * value.c: Do not include "doublest.h" and "dfp.h".
594         (value_as_double): Remove.
595         (unpack_double): Remove.
596         (value_from_double): Remove.
597         (value_from_decfloat): Remove.
598         * value.h: Do not include "doublest.h".
599         (value_as_double): Remove.
600         (unpack_double): Remove.
601         (value_from_double): Remove.
602         (value_from_decfloat): Remove.
603
604 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
605
606         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
607         (i386_extract_return_value): Use target_float_convert.
608         (i386_store_return_value): Likewise.
609         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
610         (i387_value_to_register): Likewise.
611         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
612         (ia64_register_to_value): Use target_float_convert.
613         (ia64_value_to_register): Likewise.
614         (ia64_extract_return_value): Likewise.
615         (ia64_store_return_value): Likewise.
616         (ia64_push_dummy_call): Likewise.
617         * m68k-tdep.c: Include "target-float.h".
618         (m68k_register_to_value): Use target_float_convert.
619         (m68k_value_to_register): Likewise.
620         (m68k_svr4_extract_return_value): Likewise.
621         (m68k_svr4_store_return_value): Likewise.
622         * ppc-sysv-tdep.c: Include "target-float.h".
623         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
624         (do_ppc_sysv_return_value): Likewise.
625         (ppc64_sysv_abi_push_freg): Likewise.
626         (ppc64_sysv_abi_return_value_base): Likewise.
627         * rs6000-aix-tdep.c: Include "target-float.h".
628         (rs6000_push_dummy_call): Use target_float_convert.
629         (rs6000_return_value): Likewise.
630         * rs6000-lynx178-tdep.c: Include "target-float.h".
631         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
632         (rs6000_lynx178_return_value): Likewise.
633         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
634         (rs6000_register_to_value): Use target_float_convert.
635         (rs6000_value_to_register): Likewise.
636         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
637         (arm_extract_return_value): Use target_float_convert.
638         (arm_store_return_value): Likewise.
639         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
640         (sh_register_convert_to_virtual): Use target_float_convert.
641         (sh_register_convert_to_raw): Likewise.
642         * sh64-tdep.c: Include "target-float.h".
643         (sh64_extract_return_value): Use target_float_convert.
644         (sh64_register_convert_to_virtual): Likewise.
645         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
646
647 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
648
649         * target-float.c (floatformat_to_host_double): New function.
650         (floatformat_from_host_double): Likewise.
651         (target_float_to_host_double): Likewise.
652         (target_float_from_host_double): Likewise.
653         * target-float.h (target_float_to_host_double): Add prototype.
654         (target_float_from_host_double): Likewise.
655
656         * guile/scm-value.c: Include "target-float.h".
657         (gdbscm_value_to_real): Use target_float_to_host_double.
658         Handle integer source values via value_as_long.
659         * guile/scm-math.c: Include "target-float.h".  Do not include
660         "doublest.h", "dfp.h", and "expression.h".
661         (vlscm_convert_typed_number): Use target_float_from_host_double.
662         (vlscm_convert_number): Likewise.
663
664         * python/py-value.c (valpy_float): Use target_float_to_host_double.
665         (convert_value_from_python): Use target_float_from_host_double.
666
667 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
668
669         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
670         (cast_from_fixed): Likewise.
671         (ada_scaling_type): New function.
672         (ada_delta): Return value instead of DOUBLEST.  Perform target
673         arithmetic instead of host arithmetic.
674         (scaling_factor): Rename to ...
675         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
676         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
677         (ada_fixed_to_float): Remove.
678         (ada_float_to_fixed): Remove.
679         * ada-lang.h (ada_fixed_to_float): Remove.
680         (ada_float_to_fixed): Remove.
681         (ada_delta): Return value instead of DOUBLEST.
682         (ada_scaling_factor): Add prototype.
683
684         * ada-typeprint.c: Include "target-float.h".
685         (print_fixed_point_type): Perform target arithmetic instead of
686         host arithmetic.
687         * ada-valprint.c: Include "target-float.h".
688         (ada_val_print_num): Perform target arithmetic instead of
689         host arithmetic for fixed-point types.
690
691 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
692
693         * target-float.c: Include <math.h>.
694         (floatformat_binop): New function.
695         (floatformat_compare): Likewise.
696         (target_float_binop): Likewise.
697         (target_float_compare): Likewise.
698         * target-float.h: Include "expression.h".
699         (target_float_binop): Add prototype.
700         (target_float_compare): Likewise.
701
702         * valarith.c: Do not include "doublest.h" and "dfp.h".
703         Include "common/byte-vector.h".
704         (value_args_as_decimal): Remove, replace by ...
705         (value_args_as_target_float): ... this function.  Handle both
706         binary and decimal target floating-point formats.
707         (scalar_binop): Handle both binary and decimal FP using
708         value_args_as_target_float and target_float_binop.
709         (value_equal): Handle both binary and decimal FP using
710         value_args_as_target_float and target_float_compare.
711         (value_less): Likewise.
712         (value_pos): Handle all scalar types as simple copy.
713         (value_neg): Handle all scalar types via BINOP_SUB from 0.
714         * dfp.c (decimal_binop): Throw error instead of internal_error
715         when called with an unsupported operation code.
716
717 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
718
719         * target-float.c (target_float_to_string): New function.
720         (target_float_from_string): New function.
721         * target-float.h (target_float_to_string): Add prototype.
722         (target_float_from_string): Add prototype.
723
724         * valprint.c: Include "target-float.h".  Do not include
725         "doublest.h" and "dfp.h".
726         (print_floating): Use target_float_to_string.
727         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
728         (printf_floating): Use target_float_to_string.
729         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
730         (print_i387_value): Use target_float_to_string.
731         * mips-tdep.c: Include "target-float.h".
732         (mips_print_fp_register): Use target_float_to_string.
733         * sh64-tdep.c: Include "target-float.h".
734         (sh64_do_fp_register): Use target_float_to_string.
735
736         * parse.c: Include "target-float.h".  Do not include
737         "doublest.h" and "dfp.h".
738         (parse_float): Use target_float_from_string.
739         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
740         (define_symbol): Use target_float_from_string.
741         * gdbarch-selftests.c: Include "target-float.h".
742         (register_to_value_test): Use target_float_from_string.
743
744 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
745
746         * Makefile.c (SFILES): Add target-float.c.
747         (HFILES_NO_SRCDIR): Add target-float.h.
748         (COMMON_OBS): Add target-float.o.
749         * target-float.h: New file.
750         * target-float.c: New file.
751
752         * doublest.c (floatformat_classify): Fix detection of float_zero.
753
754         * gdbtypes.c (is_floating_type): New function.
755         * gdbtypes.h (is_floating_type): Add prototype.
756
757         * value.c: Do not include "floatformat.h".
758         (unpack_double): Use target_float_is_valid.
759         (is_floating_value): New function.
760         * value.h (is_floating_value): Add prototype-
761
762         * valarith.c: Include "target-float.h".
763         (value_logical_not): Use target_float_is_zero.
764
765         * python/py-value.c: Include "target-float.h".
766         (valpy_nonzero): Use target_float_is_zero.
767
768 2017-11-04  Tom Tromey  <tom@tromey.com>
769
770         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
771
772 2017-11-04  Tom Tromey  <tom@tromey.com>
773
774         * breakpoint.c (set_momentary_breakpoint): Return
775         breakpoint_up.
776         (until_break_command): Update.
777         (new_until_break_fsm): Change argument types to
778         breakpoint_up.
779         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
780         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
781         Remove.
782         * infcmd.c (finish_forward): Update.
783         * breakpoint.h (set_momentary_breakpoint)
784         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
785         (make_cleanup_delete_breakpoint): Remove.
786         (struct breakpoint_deleter): New.
787         (breakpoint_up): New typedef.
788         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
789         (insert_exception_resume_breakpoint): Update.
790         (insert_exception_resume_from_probe): Update.
791         (insert_longjmp_resume_breakpoint): Update.
792         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
793         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
794         * infcall.c (call_function_by_hand_dummy): Update
795
796 2017-11-04  Tom Tromey  <tom@tromey.com>
797
798         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
799
800 2017-11-04  Tom Tromey  <tom@tromey.com>
801
802         * linux-tdep.c (linux_core_info_proc_mappings): Use
803         gdb::def_vector.
804         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
805         "size" argument.
806         (linux_corefile_thread): Update.
807         (linux_make_corefile_notes): Remove unused variable.
808
809 2017-11-04  Tom Tromey  <tom@tromey.com>
810
811         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
812         gdb::byte_vector.
813
814 2017-11-04  Tom Tromey  <tom@tromey.com>
815
816         * objfiles.c (do_free_objfile_cleanup): Remove.
817         * compile/compile-object-load.c (compile_object_load): Update.
818         * objfiles.h (make_cleanup_free_objfile): Remove.
819
820 2017-11-04  Tom Tromey  <tom@tromey.com>
821
822         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
823         (adi_read_versions): Change "tags" to "gdb_byte *".
824         (adi_print_versions): Likewise.
825
826 2017-11-04  Tom Tromey  <tom@tromey.com>
827
828         * breakpoint.c
829         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
830         from start_rbreak_breakpoints.
831         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
832         * breakpoint.h (class scoped_rbreak_breakpoints): New.
833         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
834         * symtab.c (do_end_rbreak_breakpoints): Remove.
835         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
836
837 2017-11-04  Tom Tromey  <tom@tromey.com>
838
839         * cp-namespace.c (reset_directive_searched): Remove.
840         (cp_lookup_symbol_via_imports): Use scoped_restore.
841         * cp-support.c (reset_directive_searched): Remove.
842         (make_symbol_overload_list_using): Use scoped_restore.
843         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
844         (reset_directive_searched): Remove.
845
846 2017-11-04  Tom Tromey  <tom@tromey.com>
847
848         * symfile.c (find_separate_debug_file_by_debuglink): Use
849         unique_xmalloc_ptr.
850
851 2017-11-04  Tom Tromey  <tom@tromey.com>
852
853         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
854         type of "info".
855         (compute_stack_depth): Likewise.
856         (do_compile_dwarf_expr_to_c): Use std::vector.
857
858 2017-11-04  Tom Tromey  <tom@tromey.com>
859
860         * compile/compile-object-load.c (link_callbacks_einfo): Use
861         std::string.
862
863 2017-11-04  Tom Tromey  <tom@tromey.com>
864
865         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
866         Use scoped_free_pendings.
867         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
868         scoped_free_pendings.
869         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
870         (xcoff_initial_scan): Likewise.
871         * buildsym.c (reset_symtab_globals): Update comment.
872         (scoped_free_pendings): Rename from really_free_pendings.
873         (prepare_for_building): Update comment.
874         (buildsym_init): Likewise.
875         * buildsym.h (class scoped_free_pendings): New class.
876         (really_free_pendings): Don't declare.
877
878 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
879
880         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
881         output when converting a zero value to a special byteorder format.
882
883 2017-11-02  Yao Qi  <yao.qi@linaro.org>
884
885         * frame.c (do_frame_register_read): Remove aspace.
886         * jit.c (jit_frame_sniffer): Likwise.
887         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
888         * regcache.c (regcache::regcache): Pass nullptr.
889         (regcache_print): Caller updated.
890         * regcache.h (regcache::regcache): Remove one constructor
891         parameter aspace.
892
893 2017-11-02  Yao Qi  <yao.qi@linaro.org>
894
895         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
896
897 2017-11-02  Yao Qi  <yao.qi@linaro.org>
898
899         * breakpoint.c (insert_single_step_breakpoints): Update.
900         * frame.c (struct frame_info) <aspace>: Add const.
901         (frame_save_as_regcache): Add const.
902         (get_frame_address_space): Return const address_space *.
903         * frame.h (get_frame_address_space): Update declaration.
904         * infrun.c (struct step_over_info) <aspace>: Add const.
905         (set_step_over_info): Make aspace const.
906         (displaced_step_prepare_throw): Change variable const.
907         (resume): Likewise.
908         (proceed): Likewise.
909         (adjust_pc_after_break): Likewise.
910         (save_waitstatus): Likewise.
911         (handle_signal_stop): Likewise.
912         (keep_going_pass_signal): Likewise.
913         * jit.c (jit_frame_sniffer): Add const.
914         * mips-tdep.c (mips_single_step_through_delay): Likewise.
915         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
916         * record-full.c (record_full_wait_1): Likewise.
917         * regcache.c (regcache::regcache): Change parameter to const.
918         * regcache.h (regcache::regcache): Likewise.
919         (regcache::aspace): Return const address_space *.
920         (regcache) <m_aspace>: Add const.
921
922 2017-11-02  Yao Qi  <yao.qi@linaro.org>
923
924         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
925         * frame.c (create_sentinel_frame): Likewise.
926         * infrun.c (displaced_step_prepare_throw): Likewise.
927         (resume): Likewise.
928         (thread_still_needs_step_over_bp): Likewise.
929         (proceed): Likewise.
930         (do_target_wait): Likewise.
931         (adjust_pc_after_break): Likewise.
932         (handle_syscall_event): Likewise.
933         (save_waitstatus): Likewise.
934         (handle_inferior_event_1): Likewise.
935         (handle_signal_stop): Likewise.
936         (keep_going_pass_signal): Likewise.
937         * linux-nat.c (status_callback): Likewise.
938         (save_stop_reason): Likewise.
939         (resume_stopped_resumed_lwps): Likewise.
940         * record-full.c (record_full_exec_insn): Likewise.
941         (record_full_wait_1): Likewise.
942         * regcache.c (get_regcache_aspace): Remove.
943         * regcache.h (get_regcache_aspace): Remove.
944
945 2017-11-02  Yao Qi  <yao.qi@linaro.org>
946
947         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
948         (init_regcache_descr): Use gdbarch_num_regs.
949         (regcache::regcache): Likewise.
950         (regcache::get_register_status): Likewise.
951         (regcache::assert_raw_regnum): Likewise.
952         (regcache::cooked_read): Likewise.
953         (regcache::cooked_read_value): Likewise.
954         (regcache::cooked_write): Likewise.
955         (regcache::dump): Likewise.
956         (regcache::num_raw_registers): New method.
957         * regcache.h (class regcache) <num_raw_registers>: New.
958
959 2017-11-02  Yao Qi  <yao.qi@linaro.org>
960
961         * regcache.c (regcache::assert_regnum): New method.
962         (regcache::invalidate): Call assert_regnum.
963         (regcache::raw_update): Likewise.
964         (regcache::raw_write): Likewise.
965         (regcache::raw_read_part): Likewise.
966         (regcache::raw_write_part): Likewise.
967         (regcache::raw_supply): Likewise.
968         (regcache::raw_supply_integer): Likewise.
969         (regcache::raw_supply_zeroed): Likewise.
970         (regcache::raw_collect): Likewise.
971         (regcache::raw_collect_integer): Likewise.
972         * regcache.h (regcache::assert_regnum): Declare.
973
974 2017-11-02  Yao Qi  <yao.qi@linaro.org>
975
976         * regcache.c (regcache::dump): Remove code.
977
978 2017-11-02  Yao Qi  <yao.qi@linaro.org>
979
980         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
981         Remove.
982         <sizeof_cooked_register_status>: Remove.
983         (init_regcache_descr): Update.
984         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
985         (regcache::save): Likewise.
986         (regcache::dump): Likewise.
987
988 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
989
990         * ft32-tdep.c (ft32_fetch_instruction): New function.
991         (ft32_analyze_prologue): Use ft32_fetch_instruction().
992
993 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
994
995         * cli/cli-script.c (execute_control_command): Rename to ...
996         (execute_control_command_1): ... this.
997         (execute_control_command): New function.
998
999 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1000
1001         * tracepoint.c (tfind_command): Remove const_cast.
1002
1003 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1004
1005         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1006
1007 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1008
1009         * common/common-utils.h (in_inclusive_range): New function.
1010         * arm-tdep.c (arm_record_extension_space): Use
1011         in_inclusive_range.
1012         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1013         * cris-tdep.c (cris_spec_reg_applicable): Use
1014         in_inclusive_range.
1015
1016 2017-10-30  Pedro Alves  <palves@redhat.com>
1017             Simon Marchi <simon.marchi@ericsson.com>
1018
1019         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1020         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1021
1022 2017-10-30  Pedro Alves  <palves@redhat.com>
1023
1024         * common/common-utils.c (string_appendf, string_vappendf): New
1025         functions.
1026         * common/common-utils.h (string_appendf, string_vappendf): New
1027         declarations.
1028         * unittests/common-utils-selftests.c (string_appendf_func)
1029         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1030         (string_vappendf_tests): New functions.
1031         (_initialize_common_utils_selftests): Register "string_appendf" and
1032         "string_vappendf tests".
1033
1034 2017-10-30  Pedro Alves  <palves@redhat.com>
1035
1036         * unittests/common-utils-selftests.c (format_func): New typedef.
1037         (string_printf_tests, string_vprintf_tests): Tests factored out
1038         and merged to ...
1039         (test_format_func): ... this new function.
1040         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1041         test_format_func.
1042
1043 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1044
1045         * darwin-nat.c: Remove include of gdb.h.
1046
1047 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1048
1049         * xtensa-xtregs.c: Fix formatting issues.
1050
1051 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1052
1053         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1054
1055 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1056
1057         PR python/21213
1058         * python/py-infthread.c (thpy_get_inferior): Increment reference
1059         of inferior before returning it.
1060
1061 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1062
1063         * unittests/common-utils-selftests.c (format): Add
1064         ATTRIBUTE_PRINTF.
1065
1066 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1067
1068         * xml-syscall.c (struct syscall_desc): Add constructor.
1069         <name>: Change type to std::string.
1070         (syscall_desc_up): New typedef.
1071         (syscall_desc_p): Remove typeder.
1072         (DEF_VEC_P(syscall_desc_p)): Remove.
1073         (struct syscall_group_desc): Add constructor.
1074         <name>: Change type to std::string.
1075         <syscalls>: Change type to std::vector.
1076         (syscall_group_desc_up): New typedef.
1077         (syscall_group_desc_p): Remove typedef.
1078         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1079         (struct syscalls_info) <syscalls>: Change type to std::vector of
1080         unique_ptr.
1081         <groups>: Likewise.
1082         <my_gdb_datadir>: Change type to std::string.
1083         (syscalls_info_up): New typedef.
1084         (allocate_syscalls_info): Remove.
1085         (syscalls_info_free_syscalls_desc): Remove.
1086         (syscalls_info_free_syscall_group_desc): Remove.
1087         (free_syscalls_info): Remove.
1088         (make_cleanup_free_syscalls_info): Remove.
1089         (syscall_group_create_syscall_group_desc): Adjust.
1090         (syscall_group_add_syscall): Adjust.
1091         (syscall_create_syscall_desc): Adjust.
1092         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1093         (init_syscalls_info): Adjust.
1094         (syscall_group_get_group_by_name): Adjust.
1095         (xml_get_syscall_number): Adjust.
1096         (xml_get_syscall_name): Adjust.
1097         (xml_list_of_syscalls): Adjust.
1098         (xml_list_syscalls_by_group): Adjust.
1099         (xml_list_of_groups): Adjust.
1100
1101 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1102
1103         * probe.h: Don't include gdb_vecs.h.
1104         (DEF_VEC_P (probe_p)): Remove.
1105         (find_probes_in_objfile): Return an std::vector.
1106         * probe.c (find_probes_in_objfile): Likewise.
1107         * breakpoint.c (breakpoint_objfile_data)
1108         <longjmp_probes>: Change type to std::vector.
1109         <exception_probes>: Likewise.
1110         (free_breakpoint_probes): Don't manually free vectors.
1111         (create_longjmp_master_breakpoint): Adjust.
1112         (create_exception_master_breakpoint): Adjust.
1113         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1114         parameter type, adjust.
1115         (svr4_create_solib_event_breakpoints): Adjust.
1116
1117 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1118
1119         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1120         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1121         with new.
1122         (free_breakpoint_probes): Rename to ...
1123         (free_breakpoint_objfile_data): ... this, and call delete on
1124         bp_objfile_data..
1125
1126 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1127
1128         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1129         (loaded_script_ptr): Remove typedef.
1130         (DEF_VEC_P (loaded_script_ptr)): Remove.
1131         (struct collect_matching_scripts_data): Add constructor.
1132         <scripts_p>: Change type to (pointer to) std::vector.
1133         (collect_matching_scripts_data): Adjust.
1134         (sort_scripts_by_name): Make suitable for std::sort.
1135         (print_scripts): Don't sort vector, adjust to std::vector.
1136         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1137
1138 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1139
1140         * symfile.c (filename_language): Make struct, not typedef.  Add
1141         constructor.
1142         <ext>: Change type to std::string.
1143         (DEF_VEC_O (filename_language)): Remove.
1144         (filename_language_table): Change type to std::vector.
1145         (add_filename_language): Adjust.
1146         (set_ext_lang_command): Adjust.
1147         (info_ext_lang_command): Adjust.
1148         (deduce_language_from_filename): Adjust.
1149         (class scoped_restore_filename_language_table): Remove.
1150         (test_filename_language): Use scoped_restore.
1151         (test_set_ext_lang_command): Use scoped_restore, adjust to
1152         std::vector change.
1153
1154 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1155
1156         * symfile.c: Include selftest.h.
1157         (class scoped_restore_filename_language_table): New.
1158         (test_filename_language): New test.
1159         (test_set_ext_lang_command): New test.
1160         (_initialize_symfile): Register tests.
1161
1162 2017-10-27  Keith Seitz  <keiths@redhat.com>
1163
1164         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1165         in the bp_location, falling back to find_pc_sect_function when
1166         needed.
1167         (add_location_to_breakpoint): Save sal->symbol.
1168         * breakpoint.h (struct bp_location) <symbol>: New field.
1169         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1170         * symtab.h (struct symtab_and_line) <symbol>: New field.
1171
1172 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1173
1174         PR gdb/13669
1175         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1176         to rewind obstack.
1177
1178 2017-10-26  Pedro Alves  <palves@redhat.com>
1179
1180         * remote.c (remote_async_terminal_ours_p): Delete.
1181         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1182         Remove references to 'remote_async_terminal_ours_p'.
1183
1184 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1185
1186         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1187
1188 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1189
1190         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1191         aspace const.
1192         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1193         Likewise.
1194         * breakpoint.c (bpstat_check_location): Remove cast.
1195         (breakpoint_hit_catch_fork): Make aspce const.
1196         (breakpoint_hit_catch_solib): Likewise.
1197         (breakpoint_hit_catch_exec): Likewise.
1198         (breakpoint_hit_ranged_breakpoint): Likewise.
1199         (breakpoint_hit_watchpoint): Likewise.
1200         (base_breakpoint_breakpoint_hit): Likewise.
1201         (bkpt_breakpoint_hit): Likewise.
1202         (dprintf_breakpoint_hit): Likewise.
1203         (tracepoint_breakpoint_hit): Likewise.
1204         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1205
1206 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1207
1208         * breakpoint.c (breakpoint_location_address_match): Change
1209         "struct address_space *" to "const address_space".
1210         (breakpoint_location_address_range_overlap): Likewise.
1211         (breakpoint_here_p): Likewise.
1212         (breakpoint_in_range_p): Likewise.
1213         (moribund_breakpoint_here_p): Likewise.
1214         (bp_location_inserted_here_p): Likewise.
1215         (software_breakpoint_inserted_here_p): Likewise.
1216         (hardware_breakpoint_inserted_here_p): Likewise.
1217         (hardware_watchpoint_inserted_in_range): Likewise.
1218         (bpstat_check_location): Likewise.
1219         (bpstat_stop_status): Likewise.
1220         (breakpoint_address_match): Likewise.
1221         (breakpoint_address_match_range): Likewise.
1222         (breakpoint_location_address_match): Likewise.
1223         (breakpoint_location_address_range_overlap): Likewise.
1224         (insert_single_step_breakpoint): Likewise.
1225         (breakpoint_has_location_inserted_here): Likewise.
1226         (single_step_breakpoint_inserted_here_p): Likewise.
1227         (pc_at_non_inline_function): Likewise.
1228         * breakpoint.h (bpstat_stop_status): Update declaration.
1229         (breakpoint_here_p): Likewise.
1230         (breakpoint_in_range_p): Likewise.
1231         (moribund_breakpoint_here_p): Likewise.
1232         (breakpoint_inserted_here_p): Likewise.
1233         (software_breakpoint_inserted_here_p): Likewise.
1234         (hardware_breakpoint_inserted_here_p): Likewise.
1235         (breakpoint_has_location_inserted_here): Likewise.
1236         (single_step_breakpoint_inserted_here_p): Likewise.
1237         (hardware_watchpoint_inserted_in_range): Likewise.
1238         (breakpoint_address_match): Likewise.
1239         (insert_single_step_breakpoint): Likewise.
1240         (pc_at_non_inline_function): Likewise.
1241         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1242         * record.c (record_check_stopped_by_breakpoint): Likewise.
1243         * record.h (record_check_stopped_by_breakpoint): Likewise.
1244         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1245
1246 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1247
1248         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1249         regcache->arch () instead get_regcache_arch.
1250         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1251         Likewise.
1252         (aarch64_fbsd_store_inferior_registers): Likewise.
1253         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1254         (store_gregs_to_thread): Likewise.
1255         (fetch_fpregs_from_thread): Likewise.
1256         (store_fpregs_to_thread): Likewise.
1257         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1258         (aarch64_store_return_value): Likewise.
1259         (aarch64_software_single_step): Likewise.
1260         * aix-thread.c (aix_thread_wait): Likewise.
1261         (supply_reg32): Likewise.
1262         (supply_sprs64): Likewise.
1263         (supply_sprs32): Likewise.
1264         (fill_gprs64): Likewise.
1265         (fill_gprs32): Likewise.
1266         (fill_sprs64): Likewise.
1267         (fill_sprs32): Likewise.
1268         (store_regs_user_thread): Likewise.
1269         (store_regs_kernel_thread): Likewise.
1270         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1271         (alphabsd_store_inferior_registers): Likewise.
1272         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1273         (alpha_store_return_value): Likewise.
1274         (alpha_deal_with_atomic_sequence): Likewise.
1275         (alpha_next_pc): Likewise.
1276         (alpha_software_single_step): Likewise.
1277         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1278         (amd64bsd_store_inferior_registers): Likewise.
1279         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1280         Likewise.
1281         (amd64_linux_store_inferior_registers): Likewise.
1282         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1283         (amd64_collect_native_gregset): Likewise.
1284         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1285         (amd64obsd_collect_uthread): Likewise.
1286         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1287         (amd64_collect_fpregset): Likewise.
1288         (amd64_supply_fxsave): Likewise.
1289         (amd64_supply_xsave): Likewise.
1290         (amd64_collect_fxsave): Likewise.
1291         (amd64_collect_xsave): Likewise.
1292         * arc-tdep.c (arc_write_pc): Likewise.
1293         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1294         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1295         (arm_fbsd_store_inferior_registers): Likewise.
1296         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1297         (store_vfp_regs): Likewise.
1298         (arm_linux_fetch_inferior_registers): Likewise.
1299         (arm_linux_store_inferior_registers): Likewise.
1300         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1301         (arm_linux_sigreturn_next_pc): Likewise.
1302         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1303         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1304         (fetch_register): Likewise.
1305         (store_register): Likewise.
1306         * arm-tdep.c (arm_is_thumb): Likewise.
1307         (displaced_in_arm_mode): Likewise.
1308         (bx_write_pc): Likewise.
1309         (arm_get_next_pcs_addr_bits_remove): Likewise.
1310         (arm_software_single_step): Likewise.
1311         (arm_extract_return_value): Likewise.
1312         (arm_store_return_value): Likewise.
1313         (arm_write_pc): Likewise.
1314         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1315         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1316         (bsd_uthread_store_registers): Likewise.
1317         * core-regset.c (fetch_core_registers): Likewise.
1318         * corelow.c (get_core_registers): Likewise.
1319         * cris-tdep.c (cris_store_return_value): Likewise.
1320         (cris_extract_return_value): Likewise.
1321         (find_step_target): Likewise.
1322         (find_step_target): Likewise.
1323         (cris_software_single_step): Likewise.
1324         * ctf.c (ctf_fetch_registers): Likewise.
1325         * darwin-nat.c (cancel_breakpoint): Likewise.
1326         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1327         * frv-tdep.c (frv_extract_return_value): Likewise.
1328         * ft32-tdep.c (ft32_store_return_value): Likewise.
1329         (ft32_extract_return_value): Likewise.
1330         * go32-nat.c (fetch_register): Likewise.
1331         (go32_fetch_registers): Likewise.
1332         (go32_store_registers): Likewise.
1333         (store_register): Likewise.
1334         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1335         (h8300_store_return_value): Likewise.
1336         * hppa-linux-nat.c (fetch_register): Likewise.
1337         (store_register): Likewise.
1338         (hppa_linux_fetch_inferior_registers): Likewise.
1339         (hppa_linux_store_inferior_registers): Likewise.
1340         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1341         (i386_darwin_store_inferior_registers): Likewise.
1342         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1343         (gnu_store_registers): Likewise.
1344         * i386-linux-nat.c (fetch_register): Likewise.
1345         (store_register): Likewise.
1346         (supply_gregset): Likewise.
1347         (fill_gregset): Likewise.
1348         (i386_linux_fetch_inferior_registers): Likewise.
1349         (i386_linux_store_inferior_registers): Likewise.
1350         (i386_linux_resume): Likewise.
1351         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1352         Likewise.
1353         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1354         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1355         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1356         (i386obsd_collect_uthread): Likewise.
1357         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1358         (i386_supply_gregset): Likewise.
1359         (i386_collect_gregset): Likewise.
1360         (i386_supply_fpregset): Likewise.
1361         (i386_collect_fpregset): Likewise.
1362         (i386_mpx_bd_base): Likewise.
1363         * i386-v4-nat.c (supply_fpregset): Likewise.
1364         (fill_fpregset): Likewise.
1365         * i387-tdep.c (i387_supply_fsave): Likewise.
1366         (i387_collect_fsave): Likewise.
1367         (i387_supply_fxsave): Likewise.
1368         (i387_collect_fxsave): Likewise.
1369         (i387_supply_xsave): Likewise.
1370         (i387_collect_xsave): Likewise.
1371         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1372         (ia64_linux_store_registers): Likewise.
1373         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1374         (ia64_extract_return_value): Likewise.
1375         (ia64_store_return_value): Likewise.
1376         (find_func_descr): Likewise.
1377         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1378         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1379         (inf_ptrace_store_registers): Likewise.
1380         * infrun.c (use_displaced_stepping): Likewise.
1381         (displaced_step_prepare_throw): Likewise.
1382         (resume): Likewise.
1383         (proceed): Likewise.
1384         (do_target_wait): Likewise.
1385         (adjust_pc_after_break): Likewise.
1386         (handle_inferior_event_1): Likewise.
1387         (handle_signal_stop): Likewise.
1388         (save_infcall_suspend_state): Likewise.
1389         (restore_infcall_suspend_state): Likewise.
1390         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1391         * jit.c (jit_frame_prev_register): Likewise.
1392         * linux-nat.c (save_stop_reason): Likewise.
1393         (linux_nat_wait_1): Likewise.
1394         (resume_stopped_resumed_lwps): Likewise.
1395         * linux-record.c (record_linux_sockaddr): Likewise.
1396         (record_linux_msghdr): Likewise.
1397         (record_linux_system_call): Likewise.
1398         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1399         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1400         (lm32_store_return_value): Likewise.
1401         * m32c-tdep.c (m32c_read_flg): Likewise.
1402         (m32c_pseudo_register_read): Likewise.
1403         (m32c_pseudo_register_write): Likewise.
1404         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1405         (m32r_linux_collect_gregset): Likewise.
1406         * m32r-tdep.c (m32r_store_return_value): Likewise.
1407         (m32r_extract_return_value): Likewise.
1408         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1409         (m68kbsd_collect_fpregset): Likewise.
1410         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1411         * m68k-linux-nat.c (fetch_register): Likewise.
1412         (old_fetch_inferior_registers): Likewise.
1413         (old_store_inferior_registers): Likewise.
1414         (store_regs): Likewise.
1415         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1416         (m68k_svr4_store_return_value): Likewise.
1417         * m88k-tdep.c (m88k_store_arguments): Likewise.
1418         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1419         (mi_cmd_data_write_register_values): Likewise.
1420         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1421         (mips_fbsd_store_inferior_registers): Likewise.
1422         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1423         (mips_fbsd_supply_gregs): Likewise.
1424         (mips_fbsd_collect_fpregs): Likewise.
1425         (mips_fbsd_collect_gregs): Likewise.
1426         (mips_fbsd_supply_fpregset): Likewise.
1427         (mips_fbsd_collect_fpregset): Likewise.
1428         (mips_fbsd_supply_gregset): Likewise.
1429         (mips_fbsd_collect_gregset): Likewise.
1430         * mips-linux-nat.c (supply_gregset): Likewise.
1431         (fill_gregset): Likewise.
1432         (supply_fpregset): Likewise.
1433         (fill_fpregset): Likewise.
1434         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1435         (mips_fill_gregset): Likewise.
1436         (mips_supply_fpregset): Likewise.
1437         (mips_fill_fpregset): Likewise.
1438         (mips64_supply_gregset): Likewise.
1439         (micromips_linux_sigframe_validate): Likewise.
1440         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1441         (mipsnbsd_fetch_inferior_registers): Likewise.
1442         (mipsnbsd_store_inferior_registers): Likewise.
1443         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1444         (mipsnbsd_supply_gregset): Likewise.
1445         (mipsnbsd_iterate_over_regset_sections): Likewise.
1446         (mipsnbsd_supply_reg): Likewise.
1447         (mipsnbsd_supply_fpreg): Likewise.
1448         * mips-tdep.c (mips_in_frame_stub): Likewise.
1449         (mips_dummy_id): Likewise.
1450         (is_octeon_bbit_op): Likewise.
1451         (micromips_bc1_pc): Likewise.
1452         (extended_mips16_next_pc): Likewise.
1453         (mips16_next_pc): Likewise.
1454         (deal_with_atomic_sequence): Likewise.
1455         * moxie-tdep.c (moxie_process_readu): Likewise.
1456         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1457         * nto-procfs.c (procfs_store_registers): Likewise.
1458         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1459         (ppcfbsd_store_inferior_registers): Likewise.
1460         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1461         (fetch_altivec_register): Likewise.
1462         (get_spe_registers): Likewise.
1463         (fetch_spe_register): Likewise.
1464         (fetch_altivec_registers): Likewise.
1465         (fetch_all_gp_regs): Likewise.
1466         (fetch_all_fp_regs): Likewise.
1467         (store_vsx_register): Likewise.
1468         (store_altivec_register): Likewise.
1469         (set_spe_registers): Likewise.
1470         (store_spe_register): Likewise.
1471         (store_altivec_registers): Likewise.
1472         (store_all_gp_regs): Likewise.
1473         (store_all_fp_regs): Likewise.
1474         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1475         (ppc_linux_collect_gregset): Likewise.
1476         (ppc_canonicalize_syscall): Likewise.
1477         (ppc_linux_record_signal): Likewise.
1478         (ppu2spu_prev_register): Likewise.
1479         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1480         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1481         (ppcobsd_store_registers): Likewise.
1482         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1483         Likewise.
1484         (ppc_ravenscar_generic_store_registers): Likewise.
1485         * procfs.c (procfs_fetch_registers): Likewise.
1486         (procfs_store_registers): Likewise.
1487         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1488         (ravenscar_store_registers): Likewise.
1489         (ravenscar_prepare_to_store): Likewise.
1490         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1491         * record-full.c (record_full_wait_1): Likewise.
1492         (record_full_registers_change): Likewise.
1493         (record_full_store_registers): Likewise.
1494         (record_full_core_fetch_registers): Likewise.
1495         (record_full_save): Likewise.
1496         (record_full_goto_insn): Likewise.
1497         * regcache.c (regcache_register_size): Likewise.
1498         (get_regcache_arch): Remove.
1499         (regcache_read_pc): Likewise.
1500         * regcache.h (get_regcache_arch): Remove.
1501         * remote-sim.c (gdbsim_fetch_register): Likewise.
1502         (gdbsim_store_register): Likewise.
1503         * remote.c (fetch_register_using_p): Likewise.
1504         (send_g_packet): Likewise.
1505         (remote_prepare_to_store): Likewise.
1506         (store_registers_using_G): Likewise.
1507         * reverse.c (save_bookmark_command): Likewise.
1508         (goto_bookmark_command): Likewise.
1509         * rs6000-aix-tdep.c (branch_dest): Likewise.
1510         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1511         (fetch_register): Likewise.
1512         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1513         (ppc_collect_reg): Likewise.
1514         (ppc_collect_gregset): Likewise.
1515         (ppc_collect_fpregset): Likewise.
1516         (ppc_collect_vsxregset): Likewise.
1517         (ppc_collect_vrregset): Likewise.
1518         (ppc_displaced_step_hw_singlestep): Likewise.
1519         (rs6000_pseudo_register_read): Likewise.
1520         (rs6000_pseudo_register_write): Likewise.
1521         * s390-linux-nat.c (supply_gregset): Likewise.
1522         (fill_gregset): Likewise.
1523         (s390_linux_fetch_inferior_registers): Likewise.
1524         * s390-linux-tdep.c (s390_write_pc): Likewise.
1525         (s390_software_single_step): Likewise.
1526         (s390_all_but_pc_registers_record): Likewise.
1527         (s390_linux_syscall_record): Likewise.
1528         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1529         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1530         (shnbsd_store_inferior_registers): Likewise.
1531         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1532         (sh_extract_return_value_fpu): Likewise.
1533         (sh_store_return_value_nofpu): Likewise.
1534         (sh_corefile_supply_regset): Likewise.
1535         (sh_corefile_collect_regset): Likewise.
1536         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1537         (sh64_store_return_value): Likewise.
1538         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1539         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1540         (sparc_store_inferior_registers): Likewise.
1541         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1542         (sparc_ravenscar_prepare_to_store): Likewise.
1543         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1544         (sparc_analyze_control_transfer): Likewise.
1545         (sparc_step_trap): Likewise.
1546         (sparc_software_single_step): Likewise.
1547         (sparc32_gdbarch_init): Likewise.
1548         (sparc_supply_rwindow): Likewise.
1549         (sparc_collect_rwindow): Likewise.
1550         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1551         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1552         (sparc64nbsd_collect_gregset): Likewise.
1553         (sparc64nbsd_supply_fpregset): Likewise.
1554         (sparc64nbsd_collect_fpregset): Likewise.
1555         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1556         (sparc64_supply_gregset): Likewise.
1557         (sparc64_collect_gregset): Likewise.
1558         (sparc64_supply_fpregset): Likewise.
1559         (sparc64_collect_fpregset): Likewise.
1560         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1561         * spu-tdep.c (spu_unwind_sp): Likewise.
1562         (spu2ppu_prev_register): Likewise.
1563         (spu_memory_remove_breakpoint): Likewise.
1564         * stack.c (return_command): Likewise.
1565         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1566         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1567         * tracefile.c (trace_save_ctf): Likewise.
1568         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1569         (do_windows_store_inferior_registers): Likewise.
1570         (windows_resume): Likewise.
1571         * xtensa-linux-nat.c (fill_gregset): Likewise.
1572         (supply_gregset_reg): Likewise.
1573         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1574         (xtensa_register_read_masked): Likewise.
1575         (xtensa_supply_gregset): Likewise.
1576         (xtensa_extract_return_value): Likewise.
1577         (xtensa_store_return_value): Likewise.
1578
1579 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1580
1581         * doublest.c (floatformat_from_string): New function.
1582         * doublest.h (floatformat_from_string): Add prototype.
1583
1584         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1585         (OP_FLOAT): ... this.
1586         * expression.h: Do not include "doublest.h".
1587         (union exp_element): Replace doubleconst and decfloatconst by
1588         new element floatconst.
1589         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1590         (ada_evaluate_subexp): Likewise.
1591         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1592         OP_DOUBLE and OP_DECFLOAT.
1593         * expprint.c (print_subexp_standard): Likewise.
1594         (dump_subexp_body_standard): Likewise.
1595         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1596
1597         * parse.c: Include "dfp.h".
1598         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1599         (write_exp_elt_floatcst): New function.
1600         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1601         and OP_DECFLOAT.
1602         (operator_check_standard): Likewise.
1603         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1604         Return target format buffer instead of host DOUBLEST.
1605         Use floatformat_from_string and decimal_from_string to parse
1606         either binary or decimal floating-point types.
1607         (parse_c_float): Remove.
1608         * parser-defs.h: Do not include "doublest.h".
1609         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1610         (write_exp_elt_floatcst): Add prototype.
1611         (parse_float): Update prototype.
1612         (parse_c_float): Remove.
1613
1614         * c-exp.y: Do not include "dfp.h".
1615         (typed_val_float): Use byte buffer instead of DOUBLEST.
1616         (typed_val_decfloat): Remove.
1617         (DECFLOAT): Remove.
1618         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1619         (parse_number): Update to new parse_float interface.
1620         Parse suffixes and determine type before calling parse_float.
1621         Handle decimal and binary FP types the same way.
1622
1623         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1624         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1625         (parse_number): Update to new parse_float interface.
1626         Parse suffixes and determine type before calling parse_float.
1627
1628         * f-exp.y: Replace dval by typed_val_float.
1629         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1630         (parse_number): Use parse_float instead of atof.
1631
1632         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1633         (parse_go_float): Remove.
1634         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1635         (parse_number): Call parse_float instead of parse_go_float.
1636         Parse suffixes and determine type before calling parse_float.
1637
1638         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1639         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1640         (parse_number): Update to new parse_float interface.
1641         Parse suffixes and determine type before calling parse_float.
1642
1643         * m2-exp.y: Replace dval by byte buffer val.
1644         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1645         (parse_number): Call parse_float instead of atof.
1646
1647         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1648         (lex_number): Call parse_float instead of strtod.
1649         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1650         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1651         Use write_exp_elt_floatcst.
1652         (unit_testing): Remove static variable.
1653         (rust_type): Do not check unit_testing.
1654         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1655
1656         * ada-exp.y (type_float, type_double): Remove.
1657         (typed_val_float): Use byte buffer instead of DOUBLEST.
1658         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1659         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1660
1661 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1662
1663         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1664         * arch/aarch64.h: New file.
1665
1666 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1667
1668         * dfp.h (decimal_from_string): Use const reference for argument.
1669         * dfp.c (decimal_from_string): Likewise.
1670
1671 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1672
1673         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1674         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1675         * mips-tdep.c (mips_print_fp_register): Likewise.
1676
1677 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1678
1679         * common/format.h (enum argclass): Replace decfloat_arg by
1680         dec32float_arg, dec64float_arg, and dec128float_arg.
1681         * common/format.c (parse_format_string): Update to return
1682         new decimal float argument classes.
1683
1684         * printcmd.c (printf_decfloat): Rename to ...
1685         (printf_floating): ... this.  Add argclass argument, and use it
1686         instead of parsing the format string again.  Add support for
1687         binary floating-point values, using floatformat_to_string.
1688         Convert value to the target format if it doesn't already match.
1689         (ui_printf): Call printf_floating instead of printf_decfloat,
1690         also for double_arg / long_double_arg.  Pass argclass.
1691
1692         * dfp.c (decimal_to_string): Add format string argument.
1693         * dfp.h (decimal_to_string): Likewise.
1694
1695         * doublest.c (floatformat_to_string): Add format string argument.
1696         * doublest.h (floatformat_to_string): Likewise.
1697
1698 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1699
1700         * doublest.c (floatformat_precision): New routine.
1701         (floatformat_to_string): Likewise.
1702         * doublest.c (floatformat_to_string): Add prototype.
1703
1704         * printcmd.c (print_scalar_formatted): Only call print_floating
1705         on floating-point types.
1706         * valprint.c: Do not include "floatformat.h".
1707         (generic_val_print_decfloat): Remove.
1708         (generic_val_print): Call generic_val_print_float for both
1709         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1710         (print_floating): Use floatformat_to_string.  Handle decimal float.
1711         (print_decimal_floating): Remove, merge into floatformat_to_string.
1712         * value.h (print_decimal_floating): Remove.
1713
1714         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1715
1716 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1717
1718         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1719
1720 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1721
1722         * memattr.h: Don't include vec.h.
1723         (struct mem_attrib): Initialize fields.
1724         <unknown>: New static method.
1725         (struct mem_region): Add constructors, operator<, initialize
1726         fields.
1727         * memattr.c: Include algorithm.
1728         (default_mem_attrib, unknown_mem_attrib): Remove.
1729         (user_mem_region_list): New global.
1730         (target_mem_region_list, mem_region_list): Change type to
1731         std::vector<mem_region>.
1732         (mem_use_target): Now a function.
1733         (target_mem_regions_valid): Change type to bool.
1734         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1735         (require_user_regions): Adjust.
1736         (require_target_regions): Adjust.
1737         (create_mem_region): Adjust.
1738         (lookup_mem_region): Adjust.
1739         (invalidate_target_mem_regions): Adjust.
1740         (mem_clear): Rename to...
1741         (user_mem_clear): ... this, and adjust.
1742         (mem_command): Adjust.
1743         (info_mem_command): Adjust.
1744         (mem_enable, enable_mem_command, mem_disable,
1745         disable_mem_command): Adjust.
1746         (mem_delete): Adjust.
1747         (delete_mem_command): Adjust.
1748         * memory-map.h (parse_memory_map): Return an std::vector.
1749         * memory-map.c (parse_memory_map): Likewise.
1750         (struct memory_map_parsing_data): Add constructor.
1751         <memory_map>: Point to std::vector.
1752         (memory_map_start_memory): Adjust.
1753         (memory_map_end_memory): Adjust.
1754         (memory_map_end_property): Adjust.
1755         (clear_result): Remove.
1756         * remote.c (remote_memory_map): Return an std::vector.
1757         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1758         Remove.
1759         (target_debug_print_mem_region_vector): New.
1760         * target-delegates.c: Regenerate.
1761         * target.h (mem_region_vector): New typedef.
1762         (to_memory_map): Return mem_region_vector.
1763         (target_memory_map): Return an std::vector.
1764         * target.c (target_memory_map): Return an std::vector.
1765         (flash_erase_command): Adjust.
1766
1767 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1768
1769         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1770         Change type to std::string.
1771         (memory_map_start_property): Adjust.
1772         (memory_map_end_property): Adjust.
1773
1774 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1775
1776         * infrun.h: Include common/byte-vector.h.
1777         (struct displaced_step_closure): New struct.
1778         (struct buf_displaced_step_closure): New struct.
1779         * infrun.c (displaced_step_closure::~displaced_step_closure):
1780         Provide default implementation.
1781         (displaced_step_clear): Deallocate step closure with delete.
1782         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1783         (aarch64_displaced_step_closure): ... this, extend
1784         displaced_step_closure.
1785         (aarch64_displaced_step_data) <dsc>: Change type to
1786         aarch64_displaced_step_closure.
1787         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1788         unique_ptr.
1789         (aarch64_displaced_step_fixup): Add cast for displaced step
1790         closure.
1791         * amd64-tdep.c (displaced_step_closure): Rename to ...
1792         (amd64_displaced_step_closure): ... this, extend
1793         displaced_step_closure.
1794         <insn_buf>: Change type to std::vector<gdb_byte>.
1795         <max_len>: Remove.
1796         (fixup_riprel): Change type of DSC parameter, adjust to type
1797         change of insn_buf.
1798         (fixup_displaced_copy): Change type of DSC parameter.
1799         (amd64_displaced_step_copy_insn): Instantiate
1800         amd64_displaced_step_closure.
1801         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1802         to type change of insn_buf.
1803         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1804         parameter DSC.
1805         (arm_linux_copy_svc): Likewise.
1806         (cleanup_kernel_helper_return): Likewise.
1807         (arm_catch_kernel_helper_return): Likewise.
1808         (arm_linux_displaced_step_copy_insn): Instantiate
1809         arm_displaced_step_closure.
1810         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1811         (displaced_read_reg): Change type of parameter DSC.
1812         (branch_write_pc): Likewise.
1813         (load_write_pc): Likewise.
1814         (alu_write_pc): Likewise.
1815         (displaced_write_reg): Likewise.
1816         (arm_copy_unmodified): Likewise.
1817         (thumb_copy_unmodified_32bit): Likewise.
1818         (thumb_copy_unmodified_16bit): Likewise.
1819         (cleanup_preload): Likewise.
1820         (install_preload): Likewise.
1821         (arm_copy_preload): Likewise.
1822         (thumb2_copy_preload): Likewise.
1823         (install_preload_reg): Likewise.
1824         (arm_copy_preload_reg): Likewise.
1825         (cleanup_copro_load_store): Likewise.
1826         (install_copro_load_store): Likewise.
1827         (arm_copy_copro_load_store) Likewise.
1828         (thumb2_copy_copro_load_store): Likewise.
1829         (cleanup_branch): Likewise.
1830         (install_b_bl_blx): Likewise.
1831         (arm_copy_b_bl_blx): Likewise.
1832         (thumb2_copy_b_bl_blx): Likewise.
1833         (thumb_copy_b): Likewise.
1834         (install_bx_blx_reg): Likewise.
1835         (arm_copy_bx_blx_reg): Likewise.
1836         (thumb_copy_bx_blx_reg): Likewise.
1837         (cleanup_alu_imm): Likewise.
1838         (arm_copy_alu_imm): Likewise.
1839         (thumb2_copy_alu_imm): Likewise.
1840         (cleanup_alu_reg): Likewise.
1841         (install_alu_reg): Likewise.
1842         (arm_copy_alu_reg): Likewise.
1843         (thumb_copy_alu_reg): Likewise.
1844         (cleanup_alu_shifted_reg): Likewise.
1845         (install_alu_shifted_reg): Likewise.
1846         (arm_copy_alu_shifted_reg): Likewise.
1847         (cleanup_load): Likewise.
1848         (cleanup_store): Likewise.
1849         (arm_copy_extra_ld_st): Likewise.
1850         (install_load_store): Likewise.
1851         (thumb2_copy_load_literal): Likewise.
1852         (thumb2_copy_load_reg_imm): Likewise.
1853         (arm_copy_ldr_str_ldrb_strb): Likewise.
1854         (cleanup_block_load_all): Likewise.
1855         (cleanup_block_store_pc): Likewise.
1856         (cleanup_block_load_pc): Likewise.
1857         (arm_copy_block_xfer): Likewise.
1858         (thumb2_copy_block_xfer): Likewise.
1859         (cleanup_svc): Likewise.
1860         (install_svc): Likewise.
1861         (arm_copy_svc): Likewise.
1862         (thumb_copy_svc): Likewise.
1863         (arm_copy_undef): Likewise.
1864         (thumb_32bit_copy_undef): Likewise.
1865         (arm_copy_unpred): Likewise.
1866         (arm_decode_misc_memhint_neon): Likewise.
1867         (arm_decode_unconditional): Likewise.
1868         (arm_decode_miscellaneous): Likewise.
1869         (arm_decode_dp_misc): Likewise.
1870         (arm_decode_ld_st_word_ubyte): Likewise.
1871         (arm_decode_media): Likewise.
1872         (arm_decode_b_bl_ldmstm): Likewise.
1873         (arm_decode_ext_reg_ld_st): Likewise.
1874         (thumb2_decode_dp_shift_reg): Likewise.
1875         (thumb2_decode_ext_reg_ld_st): Likewise.
1876         (arm_decode_svc_copro): Likewise.
1877         (thumb2_decode_svc_copro): Likewise.
1878         (install_pc_relative): Likewise.
1879         (thumb_copy_pc_relative_16bit): Likewise.
1880         (thumb_decode_pc_relative_16bit): Likewise.
1881         (thumb_copy_pc_relative_32bit): Likewise.
1882         (thumb_copy_16bit_ldr_literal): Likewise.
1883         (thumb_copy_cbnz_cbz): Likewise.
1884         (thumb2_copy_table_branch): Likewise.
1885         (cleanup_pop_pc_16bit_all): Likewise.
1886         (thumb_copy_pop_pc_16bit): Likewise.
1887         (thumb_process_displaced_16bit_insn): Likewise.
1888         (decode_thumb_32bit_ld_mem_hints): Likewise.
1889         (thumb_process_displaced_32bit_insn): Likewise.
1890         (thumb_process_displaced_insn): Likewise.
1891         (arm_process_displaced_insn): Likewise.
1892         (arm_displaced_init_closure): Likewise.
1893         (arm_displaced_step_fixup): Add cast for closure.
1894         * arm-tdep.h: Include infrun.h.
1895         (displaced_step_closure): Rename to ...
1896         (arm_displaced_step_closure): ... this, extend
1897         displaced_step_closure.
1898         <u::svc::copy_svc_os>: Change type of parameter DSC.
1899         <cleanup>: Likewise.
1900         (arm_process_displaced_insn): Likewise.
1901         (arm_displaced_init_closure): Likewise.
1902         (displaced_read_reg): Likewise.
1903         (displaced_write_reg): Likewise.
1904         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1905         Adjust.
1906         * i386-tdep.h: Include infrun.h.
1907         (i386_displaced_step_closure): New typedef.
1908         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1909         i386_displaced_step_closure.
1910         (i386_displaced_step_fixup): Adjust.
1911         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1912         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1913         and unique_ptr.
1914         (ppc_displaced_step_fixup): Adjust.
1915         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1916         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1917         and unique_ptr.
1918         (s390_displaced_step_fixup): Adjust.
1919
1920 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1921
1922         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1923         Remove declarations.
1924
1925 2017-10-20  Tom Tromey  <tom@tromey.com>
1926
1927         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1928         std::vector.
1929         (gdb_bfd_record_inclusion): Update.
1930         (bfdp): Remove typedef.
1931
1932 2017-10-20  Tom Tromey  <tom@tromey.com>
1933
1934         * gdb_bfd.c (gdb_bfd_ref): Use new.
1935         (struct gdb_bfd_data): Add constructor, destructor, and member
1936         initializers.
1937         (gdb_bfd_unref): Use delete.
1938
1939 2017-10-20  Tom Tromey  <tom@tromey.com>
1940
1941         * exec.c (exec_file_attach): Use new_bfd_ref.
1942         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1943         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1944         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1945         new_bfd_ref.
1946         * gdb_bfd.h (new_bfd_ref): New function.
1947
1948 2017-10-20  Pedro Alves  <palves@redhat.com>
1949
1950         * main.c (captured_command_loop): Add attribute noinline.
1951
1952 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1953
1954         * interps.c (struct interp_factory): Add constructor.
1955         (interp_factory_p): Remove typedef.
1956         (DEF_VEC_P(interp_factory_p)): Remove.
1957         (interpreter_factories): Change type to std::vector.
1958         (interp_factory_register): Adjust.
1959         (interp_lookup): Adjust.
1960         (interpreter_completer): Adjust.
1961
1962 2017-10-19  Tom Tromey  <tom@tromey.com>
1963
1964         * break-catch-syscall.c (catch_syscall_completer): Use
1965         std::string, gdb::unique_xmalloc_ptr.
1966
1967 2017-10-19  Tom Tromey  <tom@tromey.com>
1968
1969         * infcall.c (call_function_by_hand_dummy): Use std::string.
1970
1971 2017-10-19  Tom Tromey  <tom@tromey.com>
1972
1973         * mi/mi-main.c (mi_cmd_execute): Update.
1974         * top.h (prepare_execute_command): Return scoped_value_mark.
1975         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1976         Add move constructor.
1977         * top.c (prepare_execute_command): Return scoped_value_mark.
1978         (execute_command): Update.
1979
1980 2017-10-19  Pedro Alves  <palves@redhat.com>
1981
1982         * xml-support.c (xml_fetch_content_from_file): Check fread's
1983         return.
1984
1985 2017-10-19  Pedro Alves  <palves@redhat.com>
1986
1987         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1988         async.
1989         (handle_error_fd): New function.
1990         (ser_base_async): Add/delete an event loop file handler for
1991         error_fd.
1992
1993 2017-10-19  Pedro Alves  <palves@redhat.com>
1994
1995         * xml-support.c (xml_fetch_content_from_file): Don't read in
1996         chunks.  Instead use fseek to determine the file's size, and read
1997         it in one go.
1998
1999 2017-11-18  Keith Seitz  <keiths@redhat.com>
2000
2001         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2002         types.
2003         Add whitespace to front of type name.
2004
2005 2017-10-18  Keith Seitz  <keiths@redhat.com>
2006
2007         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2008         DW_AT_accessibility.
2009
2010 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2011
2012         * features/tic6x-c62x-linux.c: Remove.
2013
2014 2017-10-17  Tom Tromey  <tom@tromey.com>
2015
2016         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2017         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2018         (do_mixed_source_and_assembly): Likewise.
2019
2020 2017-10-17  Tom Tromey  <tom@tromey.com>
2021
2022         * regcache.c (regcache::xfer_part): Remove assertion.
2023
2024 2017-10-17  Pedro Alves  <palves@redhat.com>
2025
2026         * xml-support.c (xml_fetch_content_from_file): Call
2027         unique_ptr::release() instead unique_ptr::get() when passing
2028         through xrealloc.
2029
2030 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2031
2032         * regcache.c (regcache::xfer_part): Remove parameters read and
2033         write, add parameter is_raw.  All callers are updated.
2034
2035 2017-10-16  Keith Seitz  <keiths@redhat.com>
2036
2037         * c-typeprint.c (enum access_specifier): Moved here from
2038         c_type_print_base.
2039         (output_access_specifier): New function.
2040         (c_type_print_base): Consider typedefs when assessing
2041         whether access labels are needed.
2042         Use output_access_specifier as needed.
2043         Output access specifier for typedefs, if needed.
2044         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2045         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2046         fields.
2047         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2048         accessor macros.
2049
2050 2017-10-16  Tom Tromey  <tom@tromey.com>
2051
2052         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2053         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2054         * target.c (target_fileio_read_stralloc): Update.
2055         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2056         * target.h (target_fileio_read_stralloc): Return
2057         unique_xmalloc_ptr.
2058
2059 2017-10-16  Tom Tromey  <tom@tromey.com>
2060
2061         * xml-syscall.c (xml_init_syscalls_info): Update.
2062         * xml-support.c (xinclude_start_include): Update.
2063         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2064         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2065         (xml_fetch_content_from_file): Likewise.
2066         * osdata.c (get_osdata): Update.
2067         * target.h (target_read_stralloc, target_get_osdata): Return
2068         unique_xmalloc_ptr.
2069         * solib-aix.c (solib_aix_get_library_list): Update.
2070         * solib-target.c (solib_target_current_sos): Update.
2071         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2072         * xml-tdesc.c (fetch_available_features_from_target): Update.
2073         (target_fetch_description_xml): Update.
2074         (file_read_description_xml): Update.
2075         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2076         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2077         (remote_pid_to_exec_file): Update.
2078         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2079         (target_get_osdata): Likewise.
2080
2081 2017-10-16  Tom Tromey  <tom@tromey.com>
2082
2083         * remote.c (remote_register_number_and_offset): Use std::vector.
2084         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2085         (putpkt_binary): Use gdb::def_vector.
2086         (compare_sections_command): Use gdb::byte_vector.
2087
2088 2017-10-16  Tom Tromey  <tom@tromey.com>
2089
2090         * ppc-linux-nat.c (hwdebug_insert_point): Use
2091         gdb::unique_xmalloc_ptr, XDUP.
2092
2093 2017-10-16  Tom Tromey  <tom@tromey.com>
2094
2095         * probe.c (parse_probes): Use std::string.
2096         (info_probes_for_ops, enable_probes_command)
2097         (disable_probes_command): Remove cleanups.
2098
2099 2017-10-16  Tom Tromey  <tom@tromey.com>
2100
2101         * buildsym.c (block_compar): Remove.
2102         (end_symtab_get_static_block): Use std::vector.
2103
2104 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2105
2106         * memrange.h (struct mem_range): Define operator< and operator==.
2107         (mem_range_s): Remove.
2108         (DEF_VEC_O (mem_range_s)): Remove.
2109         (normalize_mem_ranges): Change parameter type to std::vector.
2110         * memrange.c (compare_mem_ranges): Remove.
2111         (normalize_mem_ranges): Change parameter type to std::vector,
2112         adjust to vector change.
2113         * exec.c (section_table_available_memory): Return vector, remove
2114         parameter.
2115         (section_table_read_available_memory): Adjust to std::vector
2116         change.
2117         * remote.c (remote_read_bytes): Adjust to std::vector
2118         change.
2119         * tracepoint.h (traceframe_available_memory): Change parameter
2120         type to std::vector.
2121         * tracepoint.c (traceframe_available_memory): Change parameter
2122         type to std::vector, adjust.
2123         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2124         std::vector change.
2125         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2126         unittests/memrange-selftests.c.
2127         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2128         * gdb/unittests/memrange-selftests.c: New file.
2129
2130 2017-10-16  Pedro Alves  <palves@redhat.com>
2131
2132         * elfread.c (probe_key_free): Rename range-for variable.
2133         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2134         (find_probe_by_pc, collect_probes): Rename range-for variable.
2135
2136 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2137
2138         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2139         * features/tic6x-c62x.c: Remove.
2140         * features/tic6x-c64x-linux.c: Remove.
2141         * features/tic6x-c64x.c: Remove.
2142         * features/tic6x-c64xp-linux.c: Remove.
2143         * features/tic6x-c64xp.c: Remove.
2144         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2145         initialize_tdesc_tic6x_*_linux functions.
2146         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2147         initialize_tdesc_tic6x_* functions.
2148
2149 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2150
2151         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2152         tic6x-c62x.
2153         * regformats/tic6x-c62x.dat: Remove.
2154         * regformats/tic6x-c64x.dat: Remove.
2155         * regformats/tic6x-c64xp.dat: Remove.
2156
2157 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2158
2159         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2160         (the !HAVE_LIBEXPAT version).
2161
2162 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2163
2164         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2165         const.
2166
2167 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2168
2169         * target.h: Include tracepoint.h.
2170         (enum trace_find_type): Move to tracepoint.h.
2171         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2172         * tracepoint.h: Don't include target.h
2173         (enum trace_find_type): Move from target.h.
2174         (parse_traceframe_info): Return a unique ptr.
2175         * tracepoint.c (current_traceframe_info): Change type to unique
2176         ptr.
2177         (free_traceframe_info): Remove.
2178         (clear_traceframe_info): Don't manually free
2179         current_traceframe_info.
2180         (free_result): Remove.
2181         (parse_traceframe_info): Return a unique ptr.
2182         (get_traceframe_info): Adjust to unique ptr.
2183         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2184         * remote.c (remote_traceframe_info): Return a unique ptr.
2185         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2186         ptr.
2187         * target-debug.h (target_debug_print_traceframe_info_up): New
2188         macro.
2189         * target-delegates.c: Regenerate.
2190
2191 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2192
2193         * memrange.h (struct mem_range): Add constructors.
2194         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2195         std::vector<mem_range>.
2196         * tracepoint.c (free_traceframe_info): Don't manually free
2197         vector.
2198         (traceframe_info_start_memory): Adjust to vector change.
2199         (traceframe_available_memory): Likewise.
2200         * tracefile-tfile.c (build_traceframe_info): Likewise.
2201         * ctf.c (ctf_traceframe_info): Likewise.
2202
2203 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2204
2205         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2206         std::vector<int>.
2207         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2208         (traceframe_info_start_tvar): Adjust to vector change.
2209         (parse_traceframe_info): Allocate with new.
2210         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2211         vector change.
2212         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2213         change.
2214         tfile_traceframe_info): Allocate with new.
2215         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2216         change.
2217
2218 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2219
2220         * tracepoint.c (traceframe_info): Rename to...
2221         (current_traceframe_info): ...this.
2222         (clear_traceframe_info): Adjust.
2223         (get_traceframe_info): Adjust.
2224
2225 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2226
2227         * nat/linux-osdata.c: Include algorithm.
2228         (compare_processes): Remove.
2229         (struct pid_pgid_entry): New struct.
2230         (linux_xfer_osdata_processgroups): Use std::vector instead of
2231         XNEWVEC.
2232
2233 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2234
2235         * objfiles.h: Don't include symfile.h.
2236         (struct partial_symbol): Remove forward-declaration.
2237         (struct objfile) <global_psymbols, static_psymbols>: Change type
2238         to std::vector<partial_symbol *>.
2239         * objfiles.c (objfile::objfile): Don't memset those fields.
2240         (objfile::~objfile): Don't free those fields.
2241         * psympriv.h (struct psymbol_allocation_list): Remove
2242         forward-declaration.
2243         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2244         to std::vector.
2245         (start_psymtab_common): Change parameters to std::vector.
2246         * psymtab.c: Include algorithm.
2247         (require_partial_symbols): Call shrink_to_fit.
2248         (find_pc_sect_psymbol): Adjust to vector change.
2249         (match_partial_symbol): Likewise.
2250         (lookup_partial_symbol): Likewise.
2251         (psym_relocate): Likewise.
2252         (dump_psymtab): Likewise.
2253         (recursively_search_psymtabs): Likewise.
2254         (compare_psymbols): Remove.
2255         (sort_pst_symbols): Adjust to vector change.
2256         (start_psymtab_common): Likewise.
2257         (end_psymtab_common): Likewise.
2258         (psymbol_bcache_full): De-constify return value.
2259         (add_psymbol_to_bcache): Likewise.
2260         (extend_psymbol_list): Remove.
2261         (append_psymbol_to_list): Adjust to vector change.
2262         (add_psymbol_to_list): Likewise.
2263         (init_psymbol_list): Likewise.
2264         (maintenance_info_psymtabs): Likewise.
2265         (maintenance_check_psymtabs): Likewise.
2266         * symfile.h (struct psymbol_allocation_list): Remove.
2267         * symfile.c (reread_symbols): Adjust to vector change.
2268         * dbxread.c (start_psymtab): Change type of parameters.
2269         (dbx_symfile_read): Adjust to vector change.
2270         (read_dbx_symtab): Likewise.
2271         (start_psymtab): Change type of parameters.
2272         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2273         (create_partial_symtab): Likewise.
2274         (add_partial_symbol): Likewise.
2275         (write_one_signatured_type): Likewise.
2276         (recursively_write_psymbols): Likewise.
2277         * mdebugread.c (parse_partial_symbols): Likewise.
2278         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2279         (scan_xcoff_symtab): Adjust to vector change.
2280         (xcoff_initial_scan): Likewise.
2281
2282 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2283
2284         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2285
2286 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2287
2288         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2289         Remove s390x-*-expedite, add s390x-expedite.
2290
2291 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2292
2293         * features/s390-gs-linux64.c: Regenerated.
2294         * features/s390x-gs-linux64.c: Regenerated.
2295
2296 2017-10-13  Tom Tromey  <tom@tromey.com>
2297
2298         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2299         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2300         delete.
2301         * symfile.c (symbol_file_add_with_addrs): Use new.
2302         (symbol_file_add_separate): Update comment.
2303         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2304         * jit.c (jit_object_close_impl): Use new.
2305         (jit_unregister_code): Use delete.
2306         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2307         (~objfile): Rename from free_objfile.
2308         (free_objfile_separate_debug, do_free_objfile_cleanup)
2309         (free_all_objfiles, objfile_purge_solibs): Use delete.
2310         * objfiles.h (struct objfile): Add constructor and destructor.
2311         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2312         (allocate_objfile, free_objfile): Don't declare.
2313         (struct objstats): Add initializers.
2314
2315 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2316
2317         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2318         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2319         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2320         * gdbarch.h: Regenerate.
2321         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2322         Adjust comment.
2323         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2324         (i386_displaced_step_fixup): Adjust comment.
2325         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2326
2327 2017-10-12  Tom Tromey  <tom@tromey.com>
2328
2329         * prologue-value.h (pv_area::store_would_trash): Return bool.
2330         (pv_area::find_reg): Likewise.
2331         * prologue-value.c (pv_area::store_would_trash): Return bool.
2332         (pv_area::find_reg): Likewise.
2333
2334 2017-10-12  Tom Tromey  <tom@tromey.com>
2335
2336         * s390-linux-tdep.c (s390_store, s390_load)
2337         (s390_check_for_saved, s390_analyze_prologue): Update.
2338         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2339         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2340         * prologue-value.h (class pv_area): Move from prologue-value.c.
2341         Change names of members.  Add constructor, destructor, member
2342         functions.
2343         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2344         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2345         (pv_area_fetch, pv_area_scan): Don't declare.
2346         * prologue-value.c (struct pv_area::area_entry): Now member of
2347         pv_area.
2348         (struct pv_area): Move to prologue-value.h.
2349         (pv_area::pv_area): Rename from make_pv_area.
2350         (pv_area::~pv_area): Rename from free_pv_area.
2351         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2352         (clear_entries, find_entry, overlaps, store_would_trash, store)
2353         (fetch, find_reg, scan): Now member of pv_area.
2354         Remove "area" argument.  Update.
2355         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2356         Update.
2357         * mn10300-tdep.c (push_reg, check_for_saved)
2358         (mn10300_analyze_prologue): Update.
2359         * mep-tdep.c (is_arg_spill, check_for_saved)
2360         (mep_analyze_prologue): Update.
2361         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2362         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2363         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2364         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2365         Update.
2366         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2367         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2368
2369 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2370
2371         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2372         * linux-nat.c (linux_nat_delete_thread): New variable.
2373         (lwp_free): Invoke linux_nat_delete_thread if set.
2374         (linux_nat_set_delete_thread): New function.
2375         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2376         thread delete callback.
2377         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2378         (_initialize_arm_linux_nat): Assign thread delete callback.
2379         * s390-linux-nat.c (s390_delete_thread): New function.
2380         (_initialize_s390_nat): Assign thread delete callback.
2381         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2382         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2383         function.
2384         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2385         declaration.
2386         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2387         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2388
2389 2017-10-09  Tom Tromey  <tom@tromey.com>
2390
2391         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2392         std::string.
2393         * tui/tui-layout.c (enum tui_status): Use std::string.
2394
2395 2017-10-11  Tom Tromey  <tom@tromey.com>
2396
2397         * gdbthread.h (thread_command): Constify.
2398         * inferior.h (detach_command): Constify.
2399         * top.h (set_history, show_history): Constify.
2400         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2401         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2402         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2403         * printcmd.c (set_command): Constify.
2404         (non_const_set_command): New function.
2405         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2406         * breakpoint.c (enable_command, disable_command, delete_command)
2407         (catch_command, tcatch_command, set_breakpoint_cmd)
2408         (show_breakpoint_cmd): Constify.
2409         * macrocmd.c (macro_command): Constify.
2410         * infcmd.c (unset_command, kill_command, detach_command)
2411         (info_proc_cmd): Constify.
2412         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2413         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2414         (info_auto_load_cmd): Constify.
2415         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2416         (unset_tdesc_cmd): Constify.
2417         * ada-lang.c (set_ada_command, show_ada_command)
2418         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2419         * guile/guile.c (set_guile_command, show_guile_command)
2420         (info_guile_command): Constify.
2421         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2422         Constify.
2423         * skip.c (skip_command): Constify.
2424         * compile/compile.c (_initialize_compile): Constify.
2425         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2426         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2427         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2428         (maint_btrace_pt_show_cmd): Constify.
2429         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2430         Constify.
2431         * python/python.c (user_show_python, user_set_python): Constify.
2432         * mips-tdep.c (set_mips_command, show_mips_command)
2433         (set_mipsfpu_command): Constify.
2434         * record-btrace.c (cmd_record_btrace_start)
2435         (cmd_set_record_btrace, cmd_show_record_btrace)
2436         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2437         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2438         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2439         Constify.
2440         * symfile.c (overlay_command): Constify.
2441         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2442         * cli/cli-logging.c (set_logging_command, show_logging_command):
2443         Constify.
2444         * cli/cli-dump.c (dump_command, append_command)
2445         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2446         (tekhex_dump_command, binary_dump_command)
2447         (binary_append_command): Constify.
2448         * cli/cli-decode.c (struct cmd_list_element): Change type of
2449         "fun".
2450         * cli/cli-cmds.c (info_command, show_command, set_debug)
2451         (show_debug): Constify.
2452         (show_command): Add non-const overload.
2453         * top.c (set_history, show_history): Constify.
2454         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2455         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2456         * target.c (target_command): Constify.
2457         * sparc64-tdep.c (info_adi_command): Constify.
2458         * record-full.c (cmd_record_full_start): Constify.
2459         (set_record_full_command): Constify.  Fix typo.
2460         (show_record_full_command): Constify.
2461         * thread.c (thread_command, thread_apply_command): Constify.
2462         * memattr.c (dummy_cmd): Constify.
2463         * value.c (function_command): Constify.
2464         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2465         * probe.c (info_probes_command): Constify.
2466         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2467         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2468         (show_thread_cmd, set_thread_default_cmd)
2469         (show_thread_default_cmd): Constify.
2470         (check_empty): Constify.
2471         * tracepoint.c (tfind_command): Constify.
2472         * cp-support.c (maint_cplus_command): Constify.
2473         * windows-tdep.c (info_w32_command): Constify.
2474         * record.c (cmd_record_start, set_record_command)
2475         (show_record_command, info_record_command, cmd_record_goto):
2476         Constify.
2477         * ravenscar-thread.c (set_ravenscar_command)
2478         (show_ravenscar_command): Constify.
2479         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2480         Constify.
2481         (add_internal_problem_command): Remove casts.
2482         * arc-tdep.c (maintenance_print_arc_command): Constify.
2483         * valprint.c (set_print, show_print, set_print_raw)
2484         (show_print_raw): Constify.
2485         * maint.c (maintenance_command, maintenance_info_command)
2486         (maintenance_print_command, maintenance_set_cmd)
2487         (maintenance_show_cmd, set_per_command_cmd)
2488         (show_per_command_cmd, maintenance_check_command): Constify.
2489         * language.c (set_check, show_check): Constify.
2490         * typeprint.c (show_print_type, set_print_type): Constify.
2491         * go32-nat.c (go32_info_dos_command): Constify.
2492
2493 2017-10-11  Tom Tromey  <tom@tromey.com>
2494
2495         * breakpoint.c (prepare_re_set_context): Remove.
2496         (breakpoint_re_set_one): Update.  Don't use cleanups.
2497         (breakpoint_re_set): Use scoped_restore, std::string, and
2498         scoped_restore_current_language.
2499
2500 2017-10-11  Tom Tromey  <tom@tromey.com>
2501
2502         * breakpoint.c (commands_command_1): Use std::string.
2503         (cleanup_executing_breakpoints): Remove.
2504         (bpstat_do_actions_1): Use scoped_restore.
2505         (bpstat_check_watchpoint): Use std::string.
2506         (decode_static_tracepoint_spec): Likewise.
2507         (break_range_command): Likewise.
2508         (watch_command_1): Likewise.
2509         (compare_breakpoints): Change argument types.
2510         (clear_command): Use std::vector.
2511         (cleanup_executing_breakpoints): Remove.
2512         (update_global_location_list): Use unique_xmalloc_ptr.
2513         (strace_command): Remove unused declaration.
2514
2515 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2516
2517         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2518         * NEWS: Mention new FreeBSD/arm native configuration.
2519         * configure.host: Add arm*-*-freebsd*.
2520         * configure.nat: Likewise.
2521         * arm-fbsd-nat.c: New file.
2522
2523 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2524
2525         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2526         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2527         * NEWS: Mention new FreeBSD/arm target.
2528         * configure.tgt: Add arm*-*-freebsd*.
2529         * arm-fbsd-tdep.c: New file.
2530         * arm-fbsd-tdep.h: New file.
2531
2532 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2533
2534         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2535         `gdbarch_elfcore_write_linux_prpsinfo'.
2536         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2537         method.
2538         (elf_internal_linux_prpsinfo): Remove declaration.
2539         * gdbarch.h: Regenerate.
2540         * gdbarch.c: Regenerate.
2541
2542 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2543
2544         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2545         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2546
2547 2017-10-11  Pedro Alves  <palves@redhat.com>
2548
2549         * breakpoint.c (reattach_breakpoints): Delete.
2550         * breakpoint.h (reattach_breakpoints): Delete.
2551
2552 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2553
2554         * symfile.c (registered_sym_fns): Make struct, not typedef.
2555         (DEF_VEC_O (registered_sym_fns)): Remove.
2556         (symtab_fns): Change type to std::vector.
2557         (add_symtab_fns): Adjust.
2558         (find_sym_fns): Adjust.
2559
2560 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2561
2562         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2563         * arc-tdep.h (arc_arch_is_em): New function.
2564         (arc_arch_is_hs): Likewise.
2565
2566 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2567
2568         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2569         parentheses in the declaration.
2570         (macro_lookup_inclusion): Likewise.
2571         (macro_lookup_definition): Likewise.
2572         * p-lang.h (pascal_builtin_types): Likewise.
2573         * tui/tui-data.c (tui_win_list): Likewise.
2574         * tui/tui-data.h (tui_win_list): Likewise.
2575         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2576
2577 2017-10-11  Mark Rages  <markrages@gmail.com>
2578
2579         * target-memory.c (block_boundaries): Fix for block address not
2580         aligned on block size.
2581
2582 2017-10-10  Pedro Alves <palves@redhat.com>
2583             Tom Tromey  <tom@tromey.com>
2584
2585         * breakpoint.c (struct captured_breakpoint_query_args)
2586         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2587         (print_breakpoint): New.
2588         * breakpoint.h (print_breakpoint): Declare.
2589         * common/common-exceptions.h (enum return_reason): Remove
2590         references to catch_exceptions.
2591         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2592         Delete.
2593         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2594         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2595         * gdb.h: Delete.
2596         * gdbthread.h (thread_select): Declare.
2597         * mi/mi-cmd-break.c: Don't include gdb.h.
2598         (breakpoint_notify): Use print_breakpoint.
2599         * mi/mi-cmd-catch.c: Don't include gdb.h.
2600         * mi/mi-interp.c: Don't include gdb.h.
2601         (mi_print_breakpoint_for_event): New.
2602         (mi_breakpoint_created, mi_breakpoint_modified): Use
2603         mi_print_breakpoint_for_event.
2604         * mi/mi-main.c: Don't include gdb.h.
2605         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2606         thread_select instead of gdb_thread_select.
2607         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2608         of using gdb_list_thread_ids.
2609         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2610         FILEIO_ENOSYS here.
2611         (remote_fileio_request): Use TRY/CATCH instead of
2612         catch_exceptions.
2613         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2614         (symbol_file_add_from_memory_wrapper): Delete.
2615         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2616         * thread.c: Don't include gdb.h.
2617         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2618         (thread_alive): Use thread_select.
2619         (do_captured_thread_select): Delete, parts salvaged as ...
2620         (thread_select): ... this new function.
2621         (gdb_thread_select): Delete.
2622
2623 2017-10-10  Pedro Alves  <palves@redhat.com>
2624             Tom Tromey  <tom@tromey.com>
2625
2626         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2627         and reverse logic.
2628         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2629         No longer macros.  Instead ...
2630         (enum wp_check_result): They're now values of this new
2631         enumeration.
2632         (watchpoint_check): Change return type to wp_check_result and
2633         parameter type to bpstat.
2634         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2635         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2636         catch_errors.  Reverse logic of watchpoint_check call.
2637         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2638         pointer as parameter.
2639         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2640         * common/common-exceptions.c (throw_exception_sjlj): Update
2641         comments to avoid mentioning catch_errors.
2642         * exceptions.c (catch_errors): Delete.
2643         * exceptions.h: Update comments to avoid mentioning catch_errors.
2644         (catch_errors_ftype, catch_errors): Delete.
2645         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2646         (hook_stop_stub): Delete.
2647         (restore_selected_frame): Change return type to void, and
2648         parameter type to const frame_id &.
2649         (restore_infcall_control_state): Use TRY/CATCH instead of
2650         catch_errors.
2651         * main.c (captured_command_loop): Return void and remove
2652         parameter.  Remove references to catch_errors.
2653         (captured_main): Use TRY/CATCH instead of catch_errors.
2654         * objc-lang.c (objc_submethod_helper_data)
2655         (find_objc_msgcall_submethod_helper): Delete.
2656         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2657         catch_errors.
2658         * record-full.c (record_full_message): Return void.
2659         (record_full_message_args, record_full_message_wrapper): Delete.
2660         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2661         instead of catch_errors.
2662         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2663         parameter type to int.
2664         * solib-darwin.c (open_symbol_file_object): Ditto.
2665         * solib-dsbt.c (open_symbol_file_object): Ditto.
2666         * solib-frv.c (open_symbol_file_object): Ditto.
2667         * solib-svr4.c (open_symbol_file_object): Ditto.
2668         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2669         * solib.c (update_solib_list): Use TRY/CATCH instead of
2670         catch_errors.
2671         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2672         Change type.
2673         * symmisc.c (struct print_symbol_args): Remove.
2674         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2675         (print_symbol): Change type.
2676         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2677         and remove parameters.
2678         (catch_errors): New.
2679         (get_windows_debug_event): Adjust.
2680
2681 2017-10-09  Tom Tromey  <tom@tromey.com>
2682
2683         * mi/mi-main.c (free_splay_tree): Remove.
2684         (list_available_thread_groups): Use splay_tree_up.
2685         * common/gdb_splay_tree.h: New file.
2686
2687 2017-10-09  Tom Tromey  <tom@tromey.com>
2688
2689         * mi/mi-main.c (do_nothing): Remove.
2690         (list_available_thread_groups): Update.
2691
2692 2017-10-09  Pedro Alves  <palves@redhat.com>
2693
2694         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2695         reading registers when switching context.
2696
2697 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2698
2699         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2700         (fbsd_convert_siginfo): Likewise.
2701         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2702
2703 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2704
2705         * configure.ac (try_guile_versions): Remove guile-2.2.
2706         * configure: Regenerate.
2707
2708 2017-10-09  Tom Tromey  <tom@tromey.com>
2709
2710         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2711         (COMPILE.pre): Use $(CXX).
2712
2713 2017-10-09  Pedro Alves  <palves@redhat.com>
2714
2715         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2716         Use bool.
2717         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2718         * cp-support.h (cp_remove_params): Now returns a
2719         gdb::unique_xmalloc_ptr.
2720         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2721         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2722         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2723         returning a gdb::unique_xmalloc_ptr.
2724         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2725         * stack.c (find_frame_funname): Adjust to cp_remove_params
2726         returning a gdb::unique_xmalloc_ptr.
2727
2728 2017-10-08  Tom Tromey  <tom@tromey.com>
2729
2730         * dwarf2read.c (dwarf2_get_dwz_file): Use
2731         gdb::unique_xmalloc_ptr.
2732         (find_slot_in_mapped_hash): Likewise.
2733         (dwarf2_physname): Likewise.
2734         (create_dwo_unit_in_dwp_v1): Use std::string.
2735         (create_dwo_unit_in_dwp_v2): Likewise.
2736         (lookup_dwo_cutu): Likewise.
2737         (inherit_abstract_dies): Use std::vector.
2738         (read_array_type): Likewise.
2739         (dwarf_decode_macros): Remove unused declaration.
2740         (unsigned_int_compar): Remove.
2741         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2742         (psymtabs_addrmap_cleanup): Remove.
2743
2744 2017-10-08  Tom Tromey  <tom@tromey.com>
2745
2746         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2747         * frame.h (frame_cleanup_after_sniffer): Declare.
2748         (frame_prepare_for_sniffer): Return void.
2749         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2750         type of argument.
2751         (frame_prepare_for_sniffer): Return void.
2752
2753 2017-10-08  Tom Tromey  <tom@tromey.com>
2754
2755         * utils.h (make_cleanup_value_free): Remove.
2756         * utils.c (do_value_free, struct cleanup): Remove.
2757         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2758         Use gdb_value_up.
2759         * value.h (struct value_deleter): New.
2760         (gdb_value_up): New typedef.
2761
2762 2017-10-08  Tom Tromey  <tom@tromey.com>
2763
2764         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2765         (make_cleanup_free_search_symbols): Remove.
2766         (search_symbols): Return std::vector.
2767         (symbol_search::compare_search_syms): Now member of
2768         symbol_search.  Change arguments.
2769         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2770         (symtab_symbol_info, rbreak_command): Update.
2771         * symtab.h (struct symbol_search) <next>: Remove.
2772         Add constructors.
2773         (symbol_search::operator<): New function.
2774         (symbol_search::operator==): New function.
2775         (search_symbols): Remove std::vector.
2776         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2777         (symbol_search::compare_search_syms): Declare.
2778
2779 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2780
2781         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2782         arch/aarch64-insn.o.
2783         Remove one rule.
2784         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2785
2786 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2787
2788         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2789         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2790         arch/arm-linux.o respectively.
2791         * configure.tgt: Likewise.
2792
2793 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2794
2795         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2796         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2797
2798 2017-10-06  Pedro Alves  <palves@redhat.com>
2799
2800         * windows-nat.c: Include <algorithm>.
2801
2802 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2803
2804         * configure.tgt (i386_tobjs): New variable.
2805         (amd64_tobjs): New variable.
2806         Set $cpu_obs and $os_obs.
2807
2808 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2809
2810         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2811         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2812         (clean): Remove object files and dependency files.
2813         (distclean): Remove the directory.
2814         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2815         * configure: Re-generated.
2816         * configure.tgt: Replace amd64.o with arch/amd64.o.
2817
2818 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2819
2820         PR build/22188
2821         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2822         and SETEND.
2823
2824 2017-10-05  Pedro Alves  <palves@redhat.com>
2825
2826         * linux-nat.c (linux_child_follow_fork): When following the parent
2827         and detaching the child, consult the parent thread's architecture
2828         instead of the child's.
2829
2830 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2831
2832         * ax.h: Do not include "doublest.h".
2833         (union agent_val): Remove.
2834
2835 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2836
2837         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2838         (decimal_to_string): Return std::string object.
2839         (decimal_from_string): Accept std::string object.  Return bool.
2840         (decimal_from_integral, decimal_from_doublest): Remove.
2841         (decimal_from_longest): Add prototype.
2842         (decimal_from_ulongest): Likewise.
2843         (decimal_to_longest): Likewise.
2844         (decimal_from_doublest): Likewise.
2845         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2846         (MAX_DECIMAL_STRING): Move here.
2847         (decimal_to_string): Return std::string object.
2848         (decimal_from_string): Accept std::string object.  Return bool.
2849         (decimal_from_integral): Remove, replace by ...
2850         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2851         (decimal_to_longest): New function.
2852         (decimal_from_floating): Remove, replace by ...
2853         (decimal_from_doublest): ... this new function.
2854         (decimal_to_doublest): Update to new decimal_to_string interface.
2855
2856         * value.c (unpack_long): Use decimal_to_longest.
2857         * valops.c (value_cast): Use decimal_from_doublest instead of
2858         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2859         decimal_from_integral.
2860         * valarith.c (value_args_as_decimal): Likewise.
2861         * valprint.c (print_decimal_floating): Update to new
2862         decimal_to_string interface.
2863         * printcmd.c (printf_decfloat): Likewise.
2864         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2865
2866 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2867
2868         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2869         * gdbtypes.c: Include "floatformat.h".
2870         * value.c: Likewise.
2871         * m68k-tdep.c: Likewise.
2872
2873         * findvar.c: Do not include "floatformat.h".
2874         * amd64-darwin-tdep.c: Likewise.
2875         * arm-linux-tdep.c: Likewise.
2876         * i386-darwin-tdep.c: Likewise.
2877         * i387-tdep.c: Likewise.
2878         * m68k-linux-tdep.c: Likewise.
2879         * mep-tdep.c: Likewise.
2880         * mips-tdep.c: Likewise.
2881         * nios2-tdep.c: Likewise.
2882         * s390-linux-tdep.c: Likewise.
2883         * sparc-obsd-tdep.c: Likewise.
2884         * sparc-tdep.c: Likewise.
2885         * sparc64-tdep.c: Likewise.
2886         * spu-tdep.c: Likewise.
2887         * tic6x-tdep.c: Likewise.
2888         * tilegx-tdep.c: Likewise.
2889         * vax-tdep.c: Likewise.
2890         * xstormy16-tdep.c: Likewise.
2891         * xtensa-tdep.c: Likewise.
2892
2893         * top.c: Do not include "doublest.h".
2894         * aarch64-tdep.c: Likewise.
2895         * alpha-tdep.c: Likewise.
2896         * arm-linux-tdep.c: Likewise.
2897         * m68k-linux-tdep.c: Likewise.
2898         * tilegx-tdep.c: Likewise.
2899         * xstormy16-tdep.c: Likewise.
2900
2901 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2902
2903         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2904         (mipsn32_fbsd_sigframe): Define.
2905         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2906         for FreeBSD/mipsn32.
2907
2908 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2909
2910         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2911         AT_HWCAP.
2912
2913 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2914
2915         * MAINTAINERS (Misc): Update my email address.
2916
2917 2017-10-04  Pedro Alves  <palves@redhat.com>
2918
2919         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2920         it instead of target_gdbarch.
2921         (get_remote_state, get_remote_packet_size): Adjust
2922         get_remote_arch_state calls, passing down target_gdbarch
2923         explicitly.
2924         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2925         'gdbarch' and use it instead of target_gdbarch.
2926         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2927         passing down target_gdbarch explicitly.
2928         (struct stop_reply) <arch>: New field.
2929         (remote_parse_stop_reply): Use the stopped thread's architecture,
2930         not the current inferior's.  Save the architecture in the
2931         stop_reply.
2932         (process_stop_reply): Use the stop reply's architecture.
2933         (process_g_packet, remote_fetch_registers)
2934         (remote_prepare_to_store, store_registers_using_G)
2935         (remote_store_registers): Adjust get_remote_arch_state calls,
2936         using the regcache's architecture.
2937         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2938         passing down target_gdbarch explicitly.
2939         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2940         beneath instead of calling target_gdbarch.
2941         * target.c (default_thread_architecture): Use the specified
2942         inferior's architecture, instead of the current inferior's
2943         architecture (via target_gdbarch).
2944
2945 2017-10-04  Pedro Alves  <palves@redhat.com>
2946
2947         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2948         case.
2949         (regcache_print): Handle !target_has_registers here instead.
2950
2951 2017-10-04  Pedro Alves  <palves@redhat.com>
2952
2953         * frame.c (create_test_frame): Delete.
2954         * frame.h (create_test_frame): Delete.
2955         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2956         (class regcache_test): Delete.
2957         (test_target_has_registers, test_target_has_stack)
2958         (test_target_has_memory, test_target_prepare_to_store)
2959         (test_target_store_registers): New functions.
2960         (test_target_ops): New class.
2961         (register_to_value_test): Error out if there's already a
2962         process_stratum (or higher) target pushed.  Create a fuller mock
2963         environment, with mock target_ops, inferior, address space, thread
2964         and inferior_ptid.
2965         * progspace.c (struct address_space): Move to ...
2966         * progspace.h (struct address_space): ... here.
2967         * regcache.h (regcache::~regcache, regcache::raw_write)
2968         [GDB_SELF_TEST]: No longer virtual.
2969
2970 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2971
2972         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2973
2974 2017-10-04  Pedro Alves  <palves@redhat.com>
2975
2976         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2977         out of 'between TRY and CATCH'.
2978
2979 2017-10-04  Pedro Alves  <palves@redhat.com>
2980
2981         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2982         * common/common-exceptions.h (TRY): Open an outermost scope.
2983         Expand intro comment.
2984         (CATCH): Reindent.
2985         (END_CATCH): Close the outermost scope.
2986         * completer.c (complete_line_internal): Add missing END_CATCH.
2987
2988 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2989
2990         * NEWS (Changes since GDB 8.0): Add entry about new
2991         'set-cwd-on-gdbserver' feature.
2992         (New remote packets): Add entry for QSetWorkingDir.
2993         * common/common-inferior.h (set_inferior_cwd): New prototype.
2994         * infcmd.c (set_inferior_cwd): Remove "static".
2995         (show_cwd_command): Expand text to include remote debugging.
2996         * remote.c: Add PACKET_QSetWorkingDir.
2997         (remote_protocol_features) <QSetWorkingDir>: New entry for
2998         PACKET_QSetWorkingDir.
2999         (extended_remote_set_inferior_cwd): New function.
3000         (extended_remote_create_inferior): Call
3001         "extended_remote_set_inferior_cwd".
3002         (_initialize_remote): Call "add_packet_config_cmd" for
3003         QSetWorkingDir.
3004
3005 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3006
3007         * NEWS (New commands): Mention "set/show cwd".
3008         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3009         "cd" command's help text.
3010         * common/common-inferior.h (get_inferior_cwd): New prototype.
3011         * infcmd.c (inferior_cwd_scratch): New global variable.
3012         (set_inferior_cwd): New function.
3013         (get_inferior_cwd): Likewise.
3014         (set_cwd_command): Likewise.
3015         (show_cwd_command): Likewise.
3016         (_initialize_infcmd): Add "set/show cwd" commands.
3017         * inferior.h (class inferior) <cwd>: New field.
3018         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3019         (fork_inferior): Change inferior's cwd before its execution.
3020         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3021         to CreateProcess.
3022
3023 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3024
3025         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3026         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3027         (COMMON_OBS): Add gdb_tilde_expand.o.
3028         * common/gdb_tilde_expand.c: New file.
3029         * common/gdb_tilde_expand.h: Likewise.
3030
3031 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3032
3033         * gdbarch.sh (objfile): Remove duplicate declaration.
3034         * gdbarch.h: Regenerate.
3035
3036 2017-10-03  Tom Tromey  <tom@tromey.com>
3037
3038         * utils.c (internal_vproblem): Use string_vprintf.
3039
3040 2017-10-03  Tom Tromey  <tom@tromey.com>
3041
3042         * printcmd.c (info_symbol_command): Use std::string.
3043
3044 2017-10-03  Tom Tromey  <tom@tromey.com>
3045
3046         * top.c (gdb_safe_append_history): Use std::string.
3047
3048 2017-10-03  Tom Tromey  <tom@tromey.com>
3049
3050         * event-top.c (stdin_event_handler): Update.
3051         * main.c (captured_main_1): Update.
3052         * top.h (make_delete_ui_cleanup): Remove.
3053         (struct ui): Add constructor and destructor.
3054         (new_ui, delete_ui): Remove.
3055         * top.c (make_delete_ui_cleanup): Remove.
3056         (new_ui_command): Use std::unique_ptr.
3057         (delete_ui_cleanup): Remove.
3058         (ui::ui): Rename from new_ui.  Update.
3059         (free_ui): Remove.
3060         (ui::~ui): Rename from delete_ui.  Update.
3061
3062 2017-10-03  Tom Tromey  <tom@tromey.com>
3063
3064         * symfile.c (load_progress): Use gdb::byte_vector.
3065
3066 2017-10-03  Tom Tromey  <tom@tromey.com>
3067
3068         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3069         declaration.
3070         * printcmd.c (x_command): Remove unused declaration.
3071         * symfile.c (symbol_file_command): Remove unused declaration.
3072
3073 2017-10-03  Tom Tromey  <tom@tromey.com>
3074
3075         * utils.c (internal_vproblem): Use std::string.
3076         (defaulted_query): Likewise.
3077
3078 2017-10-03  Tom Tromey  <tom@tromey.com>
3079
3080         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3081         * top.c (execute_command_to_string): Update.
3082         * utils.c (make_cleanup_restore_page_info): Remove.
3083         (do_restore_page_info_cleanup): Remove.
3084         (set_batch_flag_and_restore_page_info):
3085         New.
3086         (make_cleanup_restore_page_info): Remove.
3087         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3088         (~set_batch_flag_and_restore_page_info): New
3089         (make_cleanup_restore_uinteger): Remove.
3090         (make_cleanup_restore_integer): Remove.
3091         (struct restore_integer_closure): Remove.
3092         (restore_integer): Remove.
3093         * utils.h (struct set_batch_flag_and_restore_page_info): New
3094         class.
3095         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3096         (make_cleanup_restore_page_info): Remove.
3097         (make_cleanup_restore_uinteger) Remove.
3098         (make_cleanup_restore_integer) Remove.
3099
3100 2017-10-03  Tom Tromey  <tom@tromey.com>
3101
3102         * record-full.h (record_full_gdb_operation_disable_set): Return
3103         scoped_restore_tmpl<int>.
3104         * infrun.c (adjust_pc_after_break): Update.
3105         (handle_signal_stop): Update.
3106         * record-full.c (record_full_gdb_operation_disable_set): Return
3107         scoped_restore_tmpl<int>.
3108         (record_full_wait_1, record_full_insert_breakpoint)
3109         (record_full_remove_breakpoint, record_full_save)
3110         (record_full_goto_insn): Update.
3111
3112 2017-10-02  Tom Tromey  <tom@tromey.com>
3113
3114         PR rust/22236:
3115         * rust-lang.c (rust_val_print_str): New function.
3116         (val_print_struct): Call it.
3117         (rust_subscript): Preserve name of slice type.
3118
3119 2017-10-02  Tom Tromey  <tom@tromey.com>
3120
3121         * rust-lang.c (rust_subscript): Handle slices in
3122         EVAL_AVOID_SIDE_EFFECTS case.
3123
3124 2017-10-02  Tom Tromey  <tom@tromey.com>
3125
3126         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3127
3128 2017-10-02  Tom Tromey  <tom@tromey.com>
3129
3130         * rust-lang.h (rust_slice_type): Add "extern".
3131
3132 2017-10-02  Tom Tromey  <tom@tromey.com>
3133             Pedro Alves  <palves@redhat.com>
3134
3135         * ada-lang.h (ada_exc_info::operator<): Make const.
3136         (ada_exc_info::operator==): Make const.
3137         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3138         Make const.
3139
3140 2017-09-29  Tom Tromey  <tom@tromey.com>
3141
3142         * target.c (read_whatever_is_readable): Change type of "result".
3143         Update.
3144         (free_memory_read_result_vector): Remove.
3145         (read_memory_robust): Change return type.  Update.
3146         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3147         bin2hex, std::string.
3148         * target.h (memory_read_result_s): Remove typedef.
3149         (free_memory_read_result_vector): Remove.
3150         (read_memory_robust): Return std::vector.
3151
3152 2017-09-29  Tom Tromey  <tom@tromey.com>
3153
3154         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3155
3156 2017-09-29  Tom Tromey  <tom@tromey.com>
3157
3158         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3159         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3160         operator< and operator==.
3161         (ada_exceptions_list): Return a std::vector.
3162         * ada-lang.c (ada_exc_info::operator<): Rename from
3163         compare_ada_exception_info.
3164         (ada_exc_info::operator==): New.
3165         (sort_remove_dups_ada_exceptions_list): Change type of
3166         "exceptions".
3167         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3168         (ada_add_global_exceptions): Likewise.
3169         (ada_exceptions_list_1): Return a std::vector.
3170         (ada_exceptions_list): Likewise.
3171
3172 2017-09-29  Tom Tromey  <tom@tromey.com>
3173
3174         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3175         'std::set *'.
3176         (print_one_inferior): Update.
3177         (free_vector_of_ints): Remove.
3178         (list_available_thread_groups): Change "ids" to std::set.
3179         (mi_cmd_list_thread_groups): Update.
3180         (struct collect_cores_data) <core>: Now a std::set.
3181         (collect_cores): Update.
3182         (unique): Remove.
3183         (print_one_inferior): Update.
3184
3185 2017-09-29  Tom Tromey  <tom@tromey.com>
3186
3187         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3188         (mi_execute_async_cli_command): Likewise.
3189         (mi_cmd_trace_frame_collected): Use field_fmt.
3190
3191 2017-09-29  Tom Tromey  <tom@tromey.com>
3192
3193         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3194         gdb::byte_vector.
3195
3196 2017-09-29  Tom Tromey  <tom@tromey.com>
3197
3198         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3199
3200 2017-09-29  Tom Tromey  <tom@tromey.com>
3201
3202         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3203
3204 2017-09-29  Tom Tromey  <tom@tromey.com>
3205
3206         * varobj.h (varobj_gen_name): Return std::string.
3207         * varobj.c (varobj_gen_name): Return std::string.
3208         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3209         (mi_cmd_var_delete): Don't copy "name".
3210
3211 2017-09-29  Tom Tromey  <tom@tromey.com>
3212
3213         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3214         (mi_cmd_break_insert_1): Update.
3215
3216 2017-09-29  Tom Tromey  <tom@tromey.com>
3217
3218         * target.h (make_scoped_defer_target_commit_resume): Update.
3219         * target.c (make_scoped_defer_target_commit_resume): Rename from
3220         make_cleanup_defer_target_commit_resume.  Return a
3221         scoped_restore.
3222         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3223
3224 2017-09-29  Tom Tromey  <tom@tromey.com>
3225
3226         * main.c (captured_main_1): Remove unused declaration.
3227         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3228
3229 2017-09-29  Tom Tromey  <tom@tromey.com>
3230
3231         * symtab.c (search_symbols): Remove unused outer cleanup.
3232         (make_source_files_completion_list): Remove unused declaration.
3233
3234 2017-09-29  Tom Tromey  <tom@tromey.com>
3235
3236         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3237
3238 2017-09-29  Tom Tromey  <tom@tromey.com>
3239
3240         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3241         gdb::byte_vector.
3242
3243 2017-09-29  Tom Tromey  <tom@tromey.com>
3244
3245         * complaints.c (vcomplaint): Use std::string.
3246
3247 2017-09-29  Tom Tromey  <tom@tromey.com>
3248
3249         * tracepoint.c (trace_variable_command): Use std::string.
3250         (encode_actions_1): Remove unused declarations.
3251         (create_tsv_from_upload): Use std::string.
3252
3253 2017-09-29  Tom Tromey  <tom@tromey.com>
3254
3255         * cp-support.c (gdb_demangle): Use std::string.
3256
3257 2017-09-29  Tom Tromey  <tom@tromey.com>
3258
3259         * stack.c (parse_frame_specification): Use std::string
3260         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3261
3262 2017-09-29  Tom Tromey  <tom@tromey.com>
3263
3264         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3265
3266 2017-09-29  Tom Tromey  <tom@tromey.com>
3267
3268         * utils.c (vfprintf_maybe_filtered): Use std::string.
3269         (vfprintf_unfiltered): Likewise.
3270
3271 2017-09-29  Tom Tromey  <tom@tromey.com>
3272
3273         * event-top.c (top_level_prompt): Return std::string.
3274         (display_gdb_prompt): Update.
3275
3276 2017-09-29  Tom Tromey  <tom@tromey.com>
3277
3278         * unittests/common-utils-selftests.c (format): New function.
3279         (string_vprintf_tests): New function.
3280         (_initialize_common_utils_selftests): Register new tests.
3281         * common/common-utils.c (string_vprintf): New function.
3282         * common/common-utils.h (string_vprintf): Declare.
3283
3284 2017-09-29  Pedro Alves  <palves@redhat.com>
3285
3286         * common/rsp-low.c (unpack_varlen_hex): Constify.
3287         * common/rsp-low.h (unpack_varlen_hex): Constify.
3288         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3289         Constify.
3290         * remote.c (remote_set_permissions, read_ptid)
3291         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3292         (remote_static_tracepoint_marker_at)
3293         (remote_static_tracepoint_markers_by_strid)
3294         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3295         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3296         (parse_tracepoint_definition, parse_tsv_definition)
3297         (parse_static_tracepoint_marker_definition): Constify.
3298         * tracepoint.h (parse_static_tracepoint_marker_definition)
3299         (parse_trace_status, parse_tracepoint_status)
3300         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3301
3302 2017-09-29  Pedro Alves  <palves@redhat.com>
3303
3304         * remote.c (target_buf, target_buf_size): Delete.
3305         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3306         Use the connection's packet buffer instead.
3307         All callers adjusted.
3308         (_initialize_remote): Remove references to target_buf and
3309         target_buf_size.
3310
3311 2017-09-28  Pedro Alves  <palves@redhat.com>
3312
3313         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3314         unittests/common-utils-selftests.c.
3315         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3316         (COMMON_OBS): Remove utils-selftests.o.
3317         * utils-selftests.c: Move to ...
3318         * unittests/common-utils-selftests.c: ... here and rename self
3319         test to "string_printf".
3320
3321 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3322
3323         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3324         having NULL cus or tus.
3325
3326 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3327
3328         * arm-tdep.c: (convert_from_extended): Remove.
3329         (convert_to_extended): Likewise.
3330         (arm_extract_return_value): Use convert_typed_floating.
3331         (arm_store_return_value): Likewise.
3332
3333         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3334         * sh-tdep.c: Do not include "floatformat.h".
3335         (sh_littlebyte_bigword_type): New function.
3336         (sh_register_convert_to_virtual): Use convert_typed_floating.
3337         (sh_register_convert_to_raw): Likewise.
3338         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3339         (sh64_littlebyte_bigword_type): New function.
3340         (sh64_extract_return_value): Use convert_typed_floating.
3341         (sh64_register_convert_to_virtual): Likewise.
3342         (sh64_register_convert_to_raw): Likewise.
3343
3344 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3345
3346         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3347         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3348
3349         * gdbtypes.h (union type_specific): Make field floatformat hold
3350         just a single struct floatformat, not an array.
3351         (floatformat_from_type): Move here.
3352         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3353         changed TYPE_FLOATFORMAT definition.
3354         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3355         (recursive_dump_type): Likewise.
3356         (init_float_type): Install correct floatformat for byte order.
3357         (arch_float_type): Likewise.
3358
3359 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3360
3361         * gdbtypes.c (init_type): Change incoming argument from
3362         length-in-bytes to length-in-bits.  Assert length is a
3363         multiple of TARGET_CHAR_BITS.
3364         (arch_type, arch_flags_type): Likewise.
3365         (init_integer_type): Update call to init_type.
3366         (init_character_type): Likewise.
3367         (init_boolean_type): Likewise.
3368         (init_float_type): Likewise.
3369         (init_decfloat_type): Likewise.
3370         (init_complex_type): Likewise.
3371         (init_pointer_type): Likewise.
3372         (objfile_type): Likewise.
3373         (arch_integer_type): Update call to arch_type.
3374         (arch_character_type): Likewise.
3375         (arch_boolean_type): Likewise.
3376         (arch_float_type): Likewise.
3377         (arch_decfloat_type): Likewise.
3378         (arch_complex_type): Likewise.
3379         (arch_pointer_type): Likewise.
3380         (gdbtypes_post_init): Likewise.
3381
3382         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3383         (read_base_type): Likewise.
3384         * mdebugread.c (basic_type): Likewise.
3385         * stabsread.c (dbx_init_float_type): Likewise.
3386         (rs6000_builtin_type): Likewise.
3387         (read_range_type): Likewise.  Also, fix call to init_integer_type
3388         with erroneous length argument.
3389
3390         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3391         * d-lang.c (build_d_types): Likewise.
3392         * f-lang.c (build_fortran_types): Likewise.
3393         * go-lang.c (build_go_types): Likewise.
3394         * opencl-lang.c (build_opencl_types): Likewise.
3395         * jit.c (finalize_symtab): Likewise.
3396         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3397         (build_std_type_info_type): Likewise.
3398         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3399         update call to arch_flags_type.
3400
3401         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3402         arch_type.
3403         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3404         * windows-tdep.c (windows_get_tlb_type): Likewise.
3405
3406         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3407         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3408         * m32c-tdep.c (make_types): Likewise.
3409         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3410         (rl78_psw_type): Update call to arch_flags_type.
3411         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3412         * rx-tdep.c (rx_psw_type): Likewise.
3413         (rx_fpsw_type): Likewise.
3414         * sparc-tdep.c (sparc_psr_type): Likewise.
3415         (sparc_fsr_type): Likewise.
3416         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3417         (sparc64_ccr_type): Likewise.
3418         (sparc64_fsr_type): Likewise.
3419         (sparc64_fprs_type): Likewise.
3420
3421 2017-09-27  Tom Tromey  <tom@tromey.com>
3422
3423         * findcmd.c (find_command): Constify.
3424
3425 2017-09-27  Tom Tromey  <tom@tromey.com>
3426
3427         * ada-tasks.c (task_command_1, task_command): Constify.
3428
3429 2017-09-27  Tom Tromey  <tom@tromey.com>
3430
3431         * symtab.c (maintenance_print_symbol_cache)
3432         (maintenance_flush_symbol_cache)
3433         (maintenance_print_symbol_cache_statistics): Constify.
3434
3435 2017-09-27  Tom Tromey  <tom@tromey.com>
3436
3437         * inferior.c (detach_inferior_command, kill_inferior_command)
3438         (inferior_command): Constify.
3439
3440 2017-09-27  Tom Tromey  <tom@tromey.com>
3441
3442         * regcache.c (regcache_print, maintenance_print_registers)
3443         (maintenance_print_raw_registers)
3444         (maintenance_print_cooked_registers)
3445         (maintenance_print_register_groups)
3446         (maintenance_print_remote_registers): Constify.
3447
3448 2017-09-27  Tom Tromey  <tom@tromey.com>
3449
3450         * printcmd.c (map_display_numbers, undisplay_command)
3451         (enable_disable_display_command, enable_display_command)
3452         (disable_display_command): Constify.
3453
3454 2017-09-27  Tom Tromey  <tom@tromey.com>
3455
3456         * breakpoint.h (delete_command): Don't declare.
3457         * breakpoint.c (delete_command, enable_once_command)
3458         (enable_count_command, enable_delete_command, breakpoint_1)
3459         (maintenance_info_breakpoints, stopin_command, stopat_command)
3460         (delete_command, delete_trace_command, save_breakpoints)
3461         (save_breakpoints_command, save_tracepoints_command): Constify.
3462
3463 2017-09-27  Tom Tromey  <tom@tromey.com>
3464
3465         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3466         (skip_ws, extract_identifier, macro_define_command)
3467         (macro_undef_command, macro_list_command): Constify.
3468
3469 2017-09-27  Tom Tromey  <tom@tromey.com>
3470
3471         * infcmd.c (environment_info, set_environment_command)
3472         (unset_environment_command, path_info, info_proc_cmd_1)
3473         (info_proc_cmd_mappings, info_proc_cmd_stat)
3474         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3475         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3476
3477 2017-09-27  Tom Tromey  <tom@tromey.com>
3478
3479         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3480         Constify.
3481
3482 2017-09-27  Tom Tromey  <tom@tromey.com>
3483
3484         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3485
3486 2017-09-27  Tom Tromey  <tom@tromey.com>
3487
3488         * demangle.c (demangle_command): Constify.
3489
3490 2017-09-27  Tom Tromey  <tom@tromey.com>
3491
3492         * progspace.c (maintenance_info_program_spaces_command):
3493         Constify.
3494
3495 2017-09-27  Tom Tromey  <tom@tromey.com>
3496
3497         * compile/compile.c (check_raw_argument, compile_file_command)
3498         (compile_code_command, compile_print_command): Constify.
3499
3500 2017-09-27  Tom Tromey  <tom@tromey.com>
3501
3502         * reggroups.c (maintenance_print_reggroups): Constify.
3503
3504 2017-09-27  Tom Tromey  <tom@tromey.com>
3505
3506         * dwarf2read.c (save_gdb_index_command): Constify.
3507
3508 2017-09-27  Tom Tromey  <tom@tromey.com>
3509
3510         * stap-probe.c (info_probes_stap_command): Constify.
3511
3512 2017-09-27  Tom Tromey  <tom@tromey.com>
3513
3514         * fork-child.c (unset_exec_wrapper_command): Constify.
3515
3516 2017-09-27  Tom Tromey  <tom@tromey.com>
3517
3518         * btrace.c (get_uint, get_context_size, no_chunk)
3519         (maint_btrace_packet_history_cmd)
3520         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3521         (maint_info_btrace_cmd): Constify.
3522
3523 2017-09-27  Tom Tromey  <tom@tromey.com>
3524
3525         * reverse.c (delete_bookmark_command): Constify.
3526
3527 2017-09-27  Tom Tromey  <tom@tromey.com>
3528
3529         * remote.c (set_memory_packet_size)
3530         (set_memory_write_packet_size, show_memory_write_packet_size)
3531         (set_memory_read_packet_size, show_memory_read_packet_size)
3532         (compare_sections_command, packet_command, remote_put_command)
3533         (remote_get_command, remote_delete_command): Constify.
3534
3535 2017-09-27  Tom Tromey  <tom@tromey.com>
3536
3537         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3538         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3539         (set_mipsfpu_auto_command): Constify.
3540
3541 2017-09-27  Tom Tromey  <tom@tromey.com>
3542
3543         * cli/cli-cmds.h (cd_command): Constify.
3544         * cli/cli-cmds.c (cd_command): Constify.
3545
3546 2017-09-27  Tom Tromey  <tom@tromey.com>
3547
3548         * thread.c (thread_name_command, thread_find_command): Constify.
3549
3550 2017-09-27  Tom Tromey  <tom@tromey.com>
3551
3552         * probe.c (enable_probes_command, disable_probes_command):
3553         Constify.
3554
3555 2017-09-27  Tom Tromey  <tom@tromey.com>
3556
3557         * symfile.c (symbol_file_command): Constify.
3558         * gdbcore.h (deprecated_file_changed_hook): Constify.
3559         * exec.c (deprecated_file_changed_hook, exec_file_command)
3560         (file_command): Constify.
3561         * defs.h (symbol_file_command): Constify.
3562
3563 2017-09-27  Tom Tromey  <tom@tromey.com>
3564
3565         * remote-fileio.c (set_system_call_allowed)
3566         (show_system_call_allowed): Constify.
3567
3568 2017-09-27  Tom Tromey  <tom@tromey.com>
3569
3570         * tracepoint.c (delete_trace_variable_command)
3571         (tfind_end_command, tfind_start_command, tfind_pc_command)
3572         (tfind_tracepoint_command, tfind_line_command)
3573         (tfind_range_command, tfind_outside_command): Constify.
3574
3575 2017-09-27  Tom Tromey  <tom@tromey.com>
3576
3577         * ax-gdb.c (maint_agent_printf_command, agent_command)
3578         (agent_eval_command): Constify.
3579
3580 2017-09-27  Tom Tromey  <tom@tromey.com>
3581
3582         * tracepoint.c (info_scope_command): Constify.
3583         * python/python.c (gdbpy_decode_line): Constify.
3584         * python/py-breakpoint.c (bppy_init): Constify.
3585         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3586         * location.h: (new_linespec_location)
3587         (string_to_event_location_basic, string_to_event_location):
3588         Constify.
3589         * location.c (new_linespec_location)
3590         (string_to_event_location_basic, string_to_event_location):
3591         Constify.
3592         * linespec.h (decode_line_with_current_source)
3593         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3594         * linespec.c (linespec_lex_to_end)
3595         (decode_line_with_current_source)
3596         (decode_line_with_last_displayed): Constify.
3597         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3598         Constify.
3599         * cli/cli-cmds.c (edit_command, list_command): Constify.
3600         * breakpoint.h (until_break_command, watch_command_wrapper)
3601         (awatch_command_wrapper, rwatch_command_wrapper)
3602         (init_ada_exception_breakpoint): Constify.
3603         * breakpoint.c (break_command_1, dprintf_command)
3604         (break_range_command, watch_command_wrapper)
3605         (rwatch_command_wrapper, awatch_command_wrapper)
3606         (until_break_command, init_ada_exception_breakpoint)
3607         (strace_marker_create_sals_from_location, trace_command)
3608         (ftrace_command, strace_command, struct tracepoint): Constify.
3609         * ax-gdb.c (agent_command_1): Constify.
3610         * ada-lang.c (ada_exception_sal): Constify.
3611
3612 2017-09-27  Tom Tromey  <tom@tromey.com>
3613
3614         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3615         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3616         (get_context_size, no_chunk, get_insn_history_modifiers)
3617         (cmd_record_insn_history, get_call_history_modifiers)
3618         (cmd_record_call_history): Constify.
3619
3620 2017-09-27  Tom Tromey  <tom@tromey.com>
3621
3622         * source.c (show_substitute_path_command)
3623         (unset_substitute_path_command, set_substitute_path_command):
3624         Constify.
3625
3626 2017-09-27  Tom Tromey  <tom@tromey.com>
3627
3628         * typeprint.c (maintenance_print_type): Constify.
3629         * maint.c (maintenance_dump_me, maintenance_demangle)
3630         (maintenance_time_display, maintenance_info_sections)
3631         (maintenance_print_statistics, maintenance_deprecate)
3632         (maintenance_undeprecate): Constify.
3633         (maintenance_do_deprecate): Constify.  Use std::string.
3634         (maintenance_selftest): Constify.
3635         * gdbtypes.h (maintenance_print_type): Constify.
3636
3637 2017-09-27  Tom Tromey  <tom@tromey.com>
3638
3639         * hppa-tdep.c (unwind_command): Constify.
3640
3641 2017-09-27  Tom Tromey  <tom@tromey.com>
3642
3643         * target-descriptions.c (unset_tdesc_filename_cmd)
3644         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3645         Constify.
3646
3647 2017-09-27  Tom Tromey  <tom@tromey.com>
3648
3649         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3650
3651 2017-09-27  Tom Tromey  <tom@tromey.com>
3652
3653         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3654
3655 2017-09-27  Tom Tromey  <tom@tromey.com>
3656
3657         * tui/tui-regs.c (tui_reg_command): Constify.
3658
3659 2017-09-27  Tom Tromey  <tom@tromey.com>
3660
3661         * skip.c (skip_file_command, skip_function_command)
3662         (skip_enable_command, skip_disable_command, skip_delete_command):
3663         Constify.
3664
3665 2017-09-27  Tom Tromey  <tom@tromey.com>
3666
3667         * record-btrace.c (cmd_record_btrace_bts_start)
3668         (cmd_record_btrace_pt_start): Constify.
3669
3670 2017-09-27  Tom Tromey  <tom@tromey.com>
3671
3672         * symmisc.c (maintenance_print_symbols)
3673         (maintenance_print_msymbols, maintenance_print_objfiles)
3674         (maintenance_info_symtabs, maintenance_check_symtabs)
3675         (maintenance_expand_symtabs, maintenance_info_line_tables):
3676         Constify.
3677
3678 2017-09-27  Tom Tromey  <tom@tromey.com>
3679
3680         * top.c (new_ui_command): Constify.
3681
3682 2017-09-27  Tom Tromey  <tom@tromey.com>
3683
3684         * symfile.c (add_symbol_file_command)
3685         (remove_symbol_file_command, list_overlays_command)
3686         (map_overlay_command, unmap_overlay_command)
3687         (overlay_auto_command, overlay_manual_command)
3688         (overlay_off_command, overlay_load_command): Constify.
3689
3690 2017-09-27  Tom Tromey  <tom@tromey.com>
3691
3692         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3693         (info_spu_mailbox_command, info_spu_dma_command)
3694         (info_spu_proxydma_command): Constify.
3695
3696 2017-09-27  Tom Tromey  <tom@tromey.com>
3697
3698         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3699
3700 2017-09-27  Tom Tromey  <tom@tromey.com>
3701
3702         * cli/cli-script.c (user_defined_command): Constify.
3703
3704 2017-09-27  Tom Tromey  <tom@tromey.com>
3705
3706         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3707         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3708         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3709         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3710         (dump_binary_value, append_binary_memory, append_binary_value):
3711         Constify.
3712         (struct dump_context) <func>: Constify.
3713         (add_dump_command): Update.
3714
3715 2017-09-27  Tom Tromey  <tom@tromey.com>
3716
3717         * cli/cli-cmds.c (show_version, show_configuration)
3718         (source_command, show_user): Constify.
3719
3720 2017-09-27  Tom Tromey  <tom@tromey.com>
3721
3722         * target.c (maintenance_print_target_stack): Constify.
3723
3724 2017-09-27  Tom Tromey  <tom@tromey.com>
3725
3726         * interps.c (interpreter_exec_cmd): Constify.
3727
3728 2017-09-27  Tom Tromey  <tom@tromey.com>
3729
3730         * record-full.c (cmd_record_full_restore): Constify.
3731
3732 2017-09-27  Tom Tromey  <tom@tromey.com>
3733
3734         * memattr.c (enable_mem_command, disable_mem_command)
3735         (delete_mem_command): Constify.
3736
3737 2017-09-27  Tom Tromey  <tom@tromey.com>
3738
3739         * value.c (show_convenience): Constify.
3740
3741 2017-09-27  Tom Tromey  <tom@tromey.com>
3742
3743         * gdbcore.h (core_file_command): Update.
3744         * corefile.c (core_file_command): Constify.
3745
3746 2017-09-27  Tom Tromey  <tom@tromey.com>
3747
3748         * user-regs.c (maintenance_print_user_registers): Constify.
3749
3750 2017-09-27  Tom Tromey  <tom@tromey.com>
3751
3752         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3753
3754 2017-09-27  Tom Tromey  <tom@tromey.com>
3755
3756         * cp-support.c (first_component_command): Constify.
3757
3758 2017-09-27  Tom Tromey  <tom@tromey.com>
3759
3760         * psymtab.c (maintenance_print_psymbols)
3761         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3762         Constify.
3763
3764 2017-09-27  Tom Tromey  <tom@tromey.com>
3765
3766         * windows-tdep.c (display_tib): Constify.
3767
3768 2017-09-27  Tom Tromey  <tom@tromey.com>
3769
3770         * linux-fork.c (delete_checkpoint_command)
3771         (detach_checkpoint_command): Constify.
3772
3773 2017-09-27  Tom Tromey  <tom@tromey.com>
3774
3775         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3776
3777 2017-09-27  Tom Tromey  <tom@tromey.com>
3778
3779         * arc-tdep.c (dump_arc_instruction_command): Constify.
3780
3781 2017-09-27  Tom Tromey  <tom@tromey.com>
3782
3783         * valprint.c (set_radix, show_radix): Constify.
3784
3785 2017-09-27  Tom Tromey  <tom@tromey.com>
3786
3787         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3788
3789 2017-09-27  Tom Tromey  <tom@tromey.com>
3790
3791         * command.h (not_just_help_class_command): Update.
3792         * cli/cli-decode.h (not_just_help_class_command): Update.
3793         * cli/cli-decode.c (not_just_help_class_command): Constify.
3794
3795 2017-09-27  Tom Tromey  <tom@tromey.com>
3796
3797         * gdb_bfd.c (maintenance_info_bfds): Constify.
3798
3799 2017-09-27  Tom Tromey  <tom@tromey.com>
3800
3801         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3802         overloads.
3803         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3804         (do_const_cfunc): New function.
3805         (cmd_cfunc_eq): New overload.
3806         (cli_user_command_p): Check do_const_cfunc.
3807         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3808         const_cfunc.
3809         * command.h (add_cmd): Add const overload and no-function
3810         overload.
3811         (set_cmd_cfunc): Add const overload.
3812         (cmd_const_cfunc_ftype): Declare.
3813         (cmd_cfunc_eq): Add const overload.
3814         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3815         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3816         overload.
3817
3818 2017-09-27  Tom Tromey  <tom@tromey.com>
3819
3820         * macroexp.c (get_next_token_for_substitution): New function.
3821         (substitute_args): Call it.  Check for __VA_OPT__.
3822
3823 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3824             Pedro Alves <palves@redhat.com>
3825
3826         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3827         producer_is_icc_lt_14.
3828         (producer_is_icc_lt_14): New function.
3829         (check_producer): Add code for checking version of ICC.
3830         (producer_is_icc): Move to producer.c.
3831         (read_structure_type): Restrict ICC workaround to ICC<14.
3832         * producer.c: Include selftest.h.
3833         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3834         New functions.
3835         * producer.h (producer_is_icc): New declaration.
3836
3837 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3838
3839         * Makefile.in (SFILES): Add producer.c.
3840         (COMMON_OBS): Add producer.o
3841         * amd64-tdep.c (producer.h): Add new include.
3842         * dwarf2read.c (producer.h): Add new include.
3843         * producer.c: New file.
3844         * producer.h: New file.
3845         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3846         producer.c.
3847         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3848         producer.h.
3849
3850 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3851
3852         * configure.ac: Search ncursesw before ncurses.
3853         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3854         * gdb_curses.h: Include <ncursesw/ncurses.h>
3855         * config.in, configure: Regenerate.
3856
3857 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3858
3859         PR gdb/22185
3860         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3861         obsolete.
3862         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3863         Remove i386sol2 support.
3864         * configure.nat <i386sol2>: Remove.
3865         <sol2-64>: Fold into ...
3866         <sol2>: ... this.
3867         Move common settings to default section.
3868         Add sol-thread.o.
3869         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3870         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3871         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3872         <i[34567]86-*-solaris*>: Remove.
3873         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3874
3875         * configure.ac: Remove wctype in libw check.
3876         (_MSE_INT_H): Don't define on Solaris 7-9.
3877         <solaris*>: Remove libthread_db.so.1 check.
3878         * configure: Regenerate.
3879         * config.in: Regenerate.
3880
3881         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3882         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3883         (gdb_ps_size_t): Remove.
3884         Use base types in users.
3885         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3886
3887         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3888
3889 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3890
3891         PR build/22206
3892         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3893         (adi_is_addr_mapped): Likewise.
3894         (PSR_ICC): Don't redefine.
3895         (PSR_IMPL): Likewise.
3896
3897 2017-09-25  Tom Tromey  <tom@tromey.com>
3898
3899         * regcache.c (regcache::dump): Use string_printf.
3900
3901 2017-09-25  Tom Tromey  <tom@tromey.com>
3902
3903         * regcache.c (class regcache_invalidator): New.
3904         (struct register_to_invalidate): Remove.
3905         (make_cleanup_regcache_invalidate): Remove.
3906         (regcache::raw_write): Use regcache_invalidator.
3907
3908 2017-09-25  Tom Tromey  <tom@tromey.com>
3909
3910         * spu-tdep.c (spu2ppu_sniffer): Update.
3911         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3912         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3913         Remove.
3914         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3915         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3916         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3917         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3918         (frame_pop): Update.
3919
3920 2017-09-25  Tom Tromey  <tom@tromey.com>
3921
3922         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3923         * regcache.h (regcache_xfree): Don't declare.
3924         * regcache.c (regcache_xfree): Remove.
3925         (do_regcache_xfree): Use delete.
3926         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3927         * linux-fork.c (free_fork): Use delete.
3928         (fork_save_infrun_state): Likewise.
3929         * jit.c (jit_dealloc_cache): Use delete.
3930         * infrun.c (discard_infcall_suspend_state): Use delete.
3931
3932 2017-09-25  Tom Tromey  <tom@tromey.com>
3933
3934         * regcache.h (regcache_xmalloc): Don't declare.
3935         (regcache_raw_set_cached_value): Update comment.
3936         * regcache.c (regcache_xmalloc): Remove.
3937         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3938         * jit.c (jit_frame_sniffer): Use new.
3939         * frame.c (frame_save_as_regcache): Use new.
3940
3941 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3942
3943         * NEWS: Advertise support for guarded-storage registers on IBM z.
3944
3945 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3946
3947         * s390-linux-nat.c (have_regset_gs): New static variable.
3948         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3949         control block and guarded-storage broadcast control regsets.
3950         (s390_read_description): Detect whether the target has
3951         guarded-storage support, return appropriate tdesc.
3952         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3953         (features/s390x-gs-linux64.c): Likewise.
3954         (struct gdbarch_tdep) <have_gs>: New field.
3955         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3956         (s390_gsbc_regset): New variables.
3957         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3958         and s390_gsbc_regset, if applicable.
3959         (s390_core_read_description): Check whether core file was from a
3960         target with guarded-storage support; include appropriate regsets.
3961         (s390_gdbarch_init): Add registers for guarded-storage support.
3962         (_initialize_s390_tdep): Initialize new target descriptions that
3963         include registers for guarded-storage support.
3964         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3965         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3966         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3967         (S390_NUM_REGS): Adjust macro definition.
3968         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3969         (tdesc_s390x_gs_linux64): New declarations.
3970
3971 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3972
3973         * features/s390-gs-linux64.xml: New file.
3974         * features/s390-gs.xml: New file.
3975         * features/s390-gsbc.xml: New file.
3976         * features/s390x-gs-linux64.xml: New file.
3977         * features/Makefile (WHICH): Add s390-gs-linux64 and
3978         s390x-gs-linux64.
3979         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3980         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3981         * features/s390-gs-linux64.c: New generated file.
3982         * features/s390x-gs-linux64.c: New file.
3983         * regformats/s390-gs-linux64.dat: New file.
3984         * regformats/s390x-gs-linux64.dat: New file.
3985
3986 2017-09-23  Tom Tromey  <tom@tromey.com>
3987
3988         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3989
3990 2017-09-22  Tom Tromey  <tom@tromey.com>
3991
3992         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3993         type to scoped_restore_tmpl.
3994         <scoped_input_handler>: Initialize m_quit_handler directly.
3995
3996 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3997
3998         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3999         (cd_command): Likewise.  Free "current_directory" before
4000         assigning to it.
4001         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4002         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4003         * top.c (gdb_dirbuf): Remove global declaration.
4004         * top.h (gdb_dirbuf): Likewise.
4005
4006 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4007
4008         * gnulib/aclocal.m4: Regenerate.
4009         * gnulib/config.in: Regenerate.
4010         * gnulib/configure: Regenerate.
4011         * gnulib/import/Makefile.am: Regenerate.
4012         * gnulib/import/Makefile.in: Regenerate.
4013         * gnulib/import/assure.h: New file.
4014         * gnulib/import/at-func.c: Likewise
4015         * gnulib/import/chdir-long.c: New file.
4016         * gnulib/import/chdir-long.h: New file.
4017         * gnulib/import/cloexec.c: New file.
4018         * gnulib/import/cloexec.h: New file.
4019         * gnulib/import/close.c: New file.
4020         * gnulib/import/closedir.c: New file.
4021         * gnulib/import/dirent-private.h: New file.
4022         * gnulib/import/dup-safer.c: New file.
4023         * gnulib/import/dup.c: New file.
4024         * gnulib/import/dup2.c: New file.
4025         * gnulib/import/error.c: New file.
4026         * gnulib/import/error.h: New file.
4027         * gnulib/import/exitfail.c: New file.
4028         * gnulib/import/exitfail.h: New file.
4029         * gnulib/import/fchdir.c: New file.
4030         * gnulib/import/fcntl.c: New file.
4031         * gnulib/import/fcntl.in.h: New file.
4032         * gnulib/import/fd-hook.c: New file.
4033         * gnulib/import/fd-hook.h: New file.
4034         * gnulib/import/fd-safer.c: New file.
4035         * gnulib/import/fdopendir.c: New file.
4036         * gnulib/import/filename.h: New file.
4037         * gnulib/import/filenamecat-lgpl.c: New file.
4038         * gnulib/import/filenamecat.h: New file.
4039         * gnulib/import/fstat.c: New file.
4040         * gnulib/import/fstatat.c: New file.
4041         * gnulib/import/getcwd-lgpl.c: New file.
4042         * gnulib/import/getcwd.c: New file.
4043         * gnulib/import/getdtablesize.c: New file.
4044         * gnulib/import/getlogin_r.c: New file.
4045         * gnulib/import/getprogname.c: New file.
4046         * gnulib/import/getprogname.h: New file.
4047         * gnulib/import/gettext.h: New file.
4048         * gnulib/import/glob-libc.h: New file.
4049         * gnulib/import/glob.c: New file.
4050         * gnulib/import/glob.in.h: New file.
4051         * gnulib/import/intprops.h: New file.
4052         * gnulib/import/m4/chdir-long.m4: New file.
4053         * gnulib/import/m4/close.m4: New file.
4054         * gnulib/import/m4/closedir.m4: New file.
4055         * gnulib/import/m4/d-ino.m4: New file.
4056         * gnulib/import/m4/d-type.m4: New file.
4057         * gnulib/import/m4/dup.m4: New file.
4058         * gnulib/import/m4/dup2.m4: New file.
4059         * gnulib/import/m4/error.m4: New file.
4060         * gnulib/import/m4/fchdir.m4: New file.
4061         * gnulib/import/m4/fcntl.m4: New file.
4062         * gnulib/import/m4/fcntl_h.m4: New file.
4063         * gnulib/import/m4/fdopendir.m4: New file.
4064         * gnulib/import/m4/filenamecat.m4: New file.
4065         * gnulib/import/m4/fstat.m4: New file.
4066         * gnulib/import/m4/fstatat.m4: New file.
4067         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4068         * gnulib/import/m4/getcwd-path-max.m4: New file.
4069         * gnulib/import/m4/getcwd.m4: New file.
4070         * gnulib/import/m4/getdtablesize.m4: New file.
4071         * gnulib/import/m4/getlogin_r.m4: New file.
4072         * gnulib/import/m4/getprogname.m4: New file.
4073         * gnulib/import/m4/glob.m4: New file.
4074         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4075         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4076         * gnulib/import/m4/mempcpy.m4: New file.
4077         * gnulib/import/m4/memrchr.m4: New file.
4078         * gnulib/import/m4/mode_t.m4: New file.
4079         * gnulib/import/m4/msvc-inval.m4: New file.
4080         * gnulib/import/m4/msvc-nothrow.m4: New file.
4081         * gnulib/import/m4/open.m4: New file.
4082         * gnulib/import/m4/openat.m4: New file.
4083         * gnulib/import/m4/opendir.m4: New file.
4084         * gnulib/import/m4/readdir.m4: New file.
4085         * gnulib/import/m4/realloc.m4: New file.
4086         * gnulib/import/m4/rewinddir.m4: New file.
4087         * gnulib/import/m4/save-cwd.m4: New file.
4088         * gnulib/import/m4/strdup.m4: New file.
4089         * gnulib/import/m4/strerror.m4: New file.
4090         * gnulib/import/m4/unistd-safer.m4: New file.
4091         * gnulib/import/mempcpy.c: New file.
4092         * gnulib/import/memrchr.c: New file.
4093         * gnulib/import/msvc-inval.c: New file.
4094         * gnulib/import/msvc-inval.h: New file.
4095         * gnulib/import/msvc-nothrow.c: New file.
4096         * gnulib/import/msvc-nothrow.h: New file.
4097         * gnulib/import/open.c: New file.
4098         * gnulib/import/openat-die.c: New file.
4099         * gnulib/import/openat-priv.h: New file.
4100         * gnulib/import/openat-proc.c: New file.
4101         * gnulib/import/openat.c: New file.
4102         * gnulib/import/openat.h: New file.
4103         * gnulib/import/opendir.c: New file.
4104         * gnulib/import/pipe-safer.c: New file.
4105         * gnulib/import/readdir.c: New file.
4106         * gnulib/import/realloc.c: New file.
4107         * gnulib/import/rewinddir.c: New file.
4108         * gnulib/import/save-cwd.c: New file.
4109         * gnulib/import/save-cwd.h: New file.
4110         * gnulib/import/strdup.c: New file.
4111         * gnulib/import/strerror-override.c: New file.
4112         * gnulib/import/strerror-override.h: New file.
4113         * gnulib/import/strerror.c: New file.
4114         * gnulib/import/unistd--.h: New file.
4115         * gnulib/import/unistd-safer.h: New file.
4116         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4117         "getcwd" and "glob".
4118         * ser-tcp.c: Undefine "close" before redefining it.
4119
4120 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4121
4122         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4123         get rid of res_val.
4124
4125 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4126
4127         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4128         <sol2,sparc>: Likewise.
4129         <sol2-64,i386>: Likewise.
4130
4131         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4132         -Wdeprecated-declarations on *-*-solaris*.
4133         * configure: Regenerate.
4134
4135         * procfs.c: Include "nat/inferior.h".
4136         (procfs_info_proc): Fix typo.
4137
4138 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4139
4140         * remote.c (vector): Include.
4141         (struct private_thread_info): Add field, thread_handle.
4142         (free_private_thread_info): Deallocate storage associated with
4143         thread handle.
4144         (get_private_info_thread): Initialize `thread_handle' field.
4145         (struct thread_item): Add field, thread_handle.
4146         (clear_threads_listing_context): Deallocate storage associated
4147         with thread handle.
4148         (start_thread): Add support for "handle" attribute.
4149         (thread_attributes): Add "handle".
4150         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4151         field.
4152         (remote_update_thread_list): Update thread_handle.
4153         (remote_thread_handle_to_thread_info): New function.
4154         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4155
4156 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4157
4158         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4159         function.
4160         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4161         * python/python-internal.h (thread_object_type): Declare.
4162
4163 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4164
4165         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4166         (target_thread_handle_to_thread_info): Declare.
4167         * target.c (target_thread_handle_to_thread_info): New function.
4168         * target-delegates.c: Regenerate.
4169         * gdbthread.h (find_thread_by_handle): Declare.
4170         * thread.c (find_thread_by_handle): New function.
4171         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4172         function.
4173         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4174
4175 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4176
4177         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4178
4179 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4180
4181         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4182
4183 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4184
4185         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4186         to gdb_target_obs.
4187
4188 2017-09-20  Tom Tromey  <tom@tromey.com>
4189
4190         * breakpoint.c (struct counted_command_line): Remove.
4191         (breakpoint_commands): Update.
4192         (alloc_counted_command_line, incref_counted_command_line)
4193         (decref_counted_command_line, do_cleanup_counted_command_line)
4194         (make_cleanup_decref_counted_command_line): Remove.
4195         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4196         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4197         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4198         (save_breakpoints): Update.
4199         * breakpoint.h (counted_command_line): Now a typedef to
4200         shared_ptr.
4201         (struct breakpoint) <commands>: Now a counted_command_line.
4202         (struct bpstats) <command>: Likewise.
4203
4204 2017-09-20  Tom Tromey  <tom@tromey.com>
4205
4206         * breakpoint.c (struct commands_info, do_map_commands_command):
4207         Remove.
4208         (commands_command_1): Update.
4209         (iterate_over_related_breakpoints): Take a function_view.
4210         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4211         (delete_command): Update.
4212         (map_breakpoint_numbers): Take a function_view.
4213         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4214         (disable_command): Update.
4215         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4216         (enable_command): Update.
4217         (struct disp_data, do_enable_breakpoint_disp)
4218         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4219         (do_map_enable_delete_breakpoint): Remove.
4220         (enable_once_command, enable_count_command, enable_delete_command)
4221         (delete_trace_variable_command): Update.
4222
4223 2017-09-20  Tom Tromey  <tom@tromey.com>
4224
4225         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4226         (bpstat_clear): Use delete.
4227         (bpstats): New constructors.
4228         (bpstat_copy, bpstat_stop_status): Use new.
4229         (dprintf_after_condition_true): Update.
4230         * breakpoint.h (bpstats::bpstats): Add constructors.
4231         (bpstats::~bpstats): Add destructor.
4232
4233 2017-09-20  Pedro Alves  <palves@redhat.com>
4234
4235         * eval.c (make_params): Delete, refactored as ...
4236         (class fake_method): ... this new type's ctor.
4237         (fake_method::~fake_method): New.
4238         (evaluate_subexp_standard): Use 'fake_method'.
4239
4240 2017-09-20  Tom Tromey  <tom@tromey.com>
4241
4242         * windows-nat.c (get_windows_debug_event, windows_wait)
4243         (do_initial_windows_stuff, windows_attach): Update.
4244         * utils.c (vwarning, internal_vproblem): Update.
4245         (ui_unregister_input_event_handler_cleanup)
4246         (prepare_to_handle_input): Remove.
4247         (class scoped_input_handler): New.
4248         (defaulted_query, prompt_for_continue): Update.
4249         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4250         Update.
4251         * top.c (undo_terminal_modifications_before_exit): Update.
4252         * target/target.h (target_terminal_init, target_terminal_inferior)
4253         (target_terminal_ours): Don't declare.
4254         (class target_terminal): New.
4255         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4256         (target_terminal_ours_for_output)
4257         (make_cleanup_restore_target_terminal): Don't declare.
4258         (target_terminal_info): Remove.
4259         * target.c (enum terminal_state, terminal_state): Remove.
4260         (target_terminal::terminal_state): Define.
4261         (target_terminal::init): Rename from target_terminal_init.
4262         (target_terminal::inferior): Rename from
4263         target_terminal_inferior.
4264         (target_terminal::ours): Rename from target_terminal_ours.
4265         (target_terminal::ours_for_output): Rename from
4266         target_terminal_ours_for_output.
4267         (target_terminal::info): New method.
4268         (cleanup_restore_target_terminal)
4269         (make_cleanup_restore_target_terminal): Remove.
4270         * solib.c (handle_solib_event): Update.
4271         * remote.c (remote_serial_quit_handler): Update.
4272         (remote_terminal_inferior, remote_wait_as): Update.
4273         * record-full.c (record_full_wait_1): Update.
4274         * nto-procfs.c (procfs_create_inferior): Update.
4275         * nat/fork-inferior.c (startup_inferior): Update.
4276         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4277         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4278         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4279         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4280         (mi_breakpoint_created, mi_breakpoint_deleted)
4281         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4282         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4283         (mi_user_selected_context_changed, report_initial_inferior):
4284         Update.
4285         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4286         (linux_nat_terminal_inferior): Update.
4287         * infrun.c (follow_fork_inferior)
4288         (handle_vfork_child_exec_or_exit, do_target_resume)
4289         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4290         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4291         Update.
4292         * inflow.c (child_terminal_init, info_terminal_command): Update.
4293         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4294         (attach_command): Update.
4295         * infcall.c (call_thread_fsm_should_stop): Update.
4296         * gnu-nat.c (gnu_attach): Update.
4297         * extension.c (struct active_ext_lang_state)
4298         (restore_active_ext_lang): Update.
4299         * exceptions.c (print_flush): Update.
4300         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4301         (struct quit_handler_cleanup_data, restore_quit_handler)
4302         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4303         Remove.
4304         * cp-support.c (gdb_demangle): Update.
4305         * breakpoint.c (update_inserted_breakpoint_locations)
4306         (insert_breakpoint_locations, handle_jit_event)
4307         (disable_breakpoints_in_unloaded_shlib): Update.
4308         * annotate.c (annotate_breakpoints_invalid)
4309         (annotate_frames_invalid): Update.
4310
4311 2017-09-20  Tom Tromey  <tom@tromey.com>
4312
4313         * main.c (catch_command_errors): Rename from
4314         catch_command_errors_const.
4315         (captured_main_1): Update.
4316
4317 2017-09-20  Pedro Alves  <palves@redhat.com>
4318
4319         * cli/cli-cmds.c (list_command): Use print_sal_location.
4320         (print_sal_location): New function.
4321         (ambiguous_line_spec): Use print_sal_location.
4322         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4323         * symtab.c (find_function_start_sal): Likewise.
4324         * symtab.h (symtab_and_line::symbol): New field.
4325
4326 2017-09-20  Pedro Alves  <palves@redhat.com>
4327
4328         * linespec.c (minsym_found): Handle non-text minsyms.
4329         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4330
4331 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4332
4333         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4334         backslash.
4335
4336 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4337
4338         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4339         vmovups instead vmovaps.
4340         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4341
4342 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4343
4344         * NEWS (Changes since GDB 8.0): Add starti.
4345         * infcmd.c (enum run_break): New.
4346         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4347         case.
4348         (run_command): Use enum run_how.
4349         (start_command): Likewise.
4350         (starti_command): New function.
4351         (RUN_ARGS_HELP): New macro.
4352         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4353         commands.  Add starti command.
4354
4355 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4356
4357         * Makefile.in (monitor.o): Remove the rule.
4358
4359 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4360
4361         * annotate.h (struct annotate_arg_emitter): Use
4362         DISABLE_COPY_AND_ASSIGN.
4363         * common/refcounted-object.h (refcounted_object): Likewise.
4364         * completer.h (struct completion_result): Likewise.
4365         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4366         * filename-seen-cache.h (filename_seen_cache): Likewise.
4367         * gdbcore.h (thread_section_name): Likewise.
4368         * gdb_regex.h (compiled_regex): Likewise.
4369         * gdbthread.h (scoped_restore_current_thread): Likewise.
4370         * inferior.h (scoped_restore_current_inferior): Likewise.
4371         * jit.c (jit_reader): Likewise.
4372         * linespec.h (struct linespec_result): Likewise.
4373         * mi/mi-parse.h (struct mi_parse): Likewise.
4374         * nat/fork-inferior.c (execv_argv): Likewise.
4375         * progspace.h (scoped_restore_current_program_space): Likewise.
4376         * python/python-internal.h (class gdbpy_enter): Likewise.
4377         * regcache.h (regcache): Likewise.
4378         * target-descriptions.c (struct tdesc_reg): Likewise.
4379         (struct tdesc_type): Likewise.
4380         (struct tdesc_feature): Likewise.
4381         * ui-out.h (ui_out_emit_type): Likewise.
4382
4383 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4384
4385         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4386         label abort_expression.
4387
4388 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4389
4390         * common/buffer.c (buffer_xml_printf): Adjust.
4391         * common/xml-utils.c (xml_escape_text): Change return type to
4392         std::string, update code accordingly.
4393         * common/xml-utils.h (xml_escape_text): Change return type to
4394         std::string.
4395         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4396         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4397         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4398         Adjust.
4399
4400 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4401
4402         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4403         (SUBDIR_UNITTESTS_OBS): Add new object file.
4404         * unittests/xml-utils-selftests.c: New file.
4405
4406 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4407
4408         * common/selftest.h (selftest): New struct/interface.
4409         (register_test): Add name parameter, add new overload.
4410         (run_tests): Add filter parameter.
4411         (for_each_selftest_ftype): New typedef.
4412         (for_each_selftest): New declaration.
4413         * common/selftest.c (tests): Change type to
4414         map<string, unique_ptr<selftest>>.
4415         (simple_selftest): New struct.
4416         (register_test): New function.
4417         (register_test): Add name parameter and use it.
4418         (run_tests): Add filter parameter and use it.  Add prints.
4419         Adjust to vector -> map change.
4420         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4421         registering selftests.
4422         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4423         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4424         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4425         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4426         * findvar.c (_initialize_findvar): Likewise.
4427         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4428         * maint.c (maintenance_selftest): Update call to run_tests.
4429         (maintenance_info_selftests): New function.
4430         (_initialize_maint_cmds): Register "maintenance info selftests"
4431         command.  Update "maintenance selftest" doc.
4432         * regcache.c (_initialize_regcache): Add names when registering
4433         selftests.
4434         * rust-exp.y (_initialize_rust_exp): Likewise.
4435         * selftest-arch.c (gdbarch_selftest): New struct.
4436         (gdbarch_tests): Remove.
4437         (register_test_foreach_arch): Add name parameter.  Call
4438         register_test.
4439         (tests_with_arch): Remove, move most content to
4440         gdbarch_selftest::operator().
4441         (_initialize_selftests_foreach_arch): Remove.
4442         * selftest-arch.h (register_test_foreach_arch): Add name
4443         parameter.
4444         (run_tests_with_arch): New declaration.
4445         * utils-selftests.c (_initialize_utils_selftests): Add names
4446         when registering selftests.
4447         * utils.c (_initialize_utils): Likewise.
4448         * unittests/array-view-selftests.c
4449         (_initialize_array_view_selftests): Likewise.
4450         * unittests/environ-selftests.c (_initialize_environ_selftests):
4451         Likewise.
4452         * unittests/function-view-selftests.c
4453         (_initialize_function_view_selftests): Likewise.
4454         * unittests/offset-type-selftests.c
4455         (_initialize_offset_type_selftests): Likewise.
4456         * unittests/optional-selftests.c
4457         (_initialize_optional_selftests): Likewise.
4458         * unittests/scoped_restore-selftests.c
4459         (_initialize_scoped_restore_selftests): Likewise.
4460         * NEWS: Document "maintenance selftest" and "maint info
4461         selftests".
4462
4463 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4464
4465         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4466         scoped_restore.
4467
4468 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4469
4470         * mi/mi-main.c (mi_load_progress): Make uiout variable
4471         a unique_ptr.
4472
4473 2017-09-15  Pedro Alves  <palves@redhat.com>
4474
4475         * compile/compile-c-types.c (convert_enum, convert_int)
4476         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4477
4478 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4479
4480         * dwarf2read.c (copy_string): Remove.
4481         (parse_macro_definition): Replace copy_string with savestring.
4482
4483 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4484
4485         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4486         gdb_target_obs.
4487         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4488         Likewise.
4489         (i[34567]86-*-linux*): Likewise.
4490
4491 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4492
4493         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4494         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4495         <stack>: Change type to std::vector.
4496         <stack_len, stack_allocated>: Remove.
4497         <grow_stack>: Remove.
4498         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4499         (dwarf_expr_context::~dwarf_expr_context): Remove.
4500         (dwarf_expr_context::grow_stack): Remove.
4501         (dwarf_expr_context::push): Adjust.
4502         (dwarf_expr_context::pop): Adjust.
4503         (dwarf_expr_context::fetch): Adjust.
4504         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4505         (dwarf_expr_context::stack_empty_p): Adjust.
4506         (dwarf_expr_context::execute_stack_op): Adjust.
4507
4508 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4509
4510         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4511         return type to bool.
4512         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4513
4514 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4515
4516         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4517         Change type to bool.
4518         (dwarf_stack_value) <in_stack_memory>: Likewise.
4519         (dwarf_expr_context) <push_address>: Change parameter type to
4520         bool.
4521         <fetch_in_stack_memory>: Change return type to bool.
4522         <push>: Change parameter type to bool.
4523         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4524         to bool.
4525         (dwarf_expr_context::push_address): Likewise.
4526         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4527         to bool.
4528         (dwarf_expr_context::execute_stack_op): Adjust.
4529         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4530
4531 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4532
4533         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4534         (struct dwarf_expr_context) <n_pieces>: Remove.
4535         <pieces>: Change type to std::vector.
4536         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4537         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4538         pieces.
4539         (dwarf_expr_context::add_piece): Adjust.
4540         * dwarf2loc.c (struct piece_closure): Initialize fields.
4541         <n_pieces>: Remove.
4542         <pieces>: Change type to std::vector.
4543         (allocate_piece_closure): Adjust, change parameter to
4544         std::vector rvalue and std::move it to piece_closure.
4545         (rw_pieced_value): Adjust.
4546         (check_pieced_synthetic_pointer): Adjust.
4547         (indirect_synthetic_pointer): Adjust.
4548         (coerce_pieced_ref): Adjust.
4549         (free_pieced_value_closure):  Adjust.  Use delete to free
4550         piece_closure.
4551         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4552         to allocate_piece_closure.
4553         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4554
4555 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4556
4557         * probe.h (probe_ops_cp): Remove typedef.
4558         (DEF_VEC_P (probe_ops_cp)): Remove.
4559         (all_probe_ops): Change type to std::vector.
4560         * probe.c (info_probes_for_ops): Adjust to vector change.
4561         (probe_linespec_to_ops): Likewise.
4562         (all_probe_ops): Change type to std::vector.
4563         (_initialize_probe): Adjust to vector change.
4564         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4565         * elfread.c (elf_get_probes): Likewise.
4566         * stap-probe.c (_initialize_stap_probe): Likewise.
4567
4568 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4569
4570         * probe.h (struct bound_probe): Define constructors.
4571         * probe.c (bound_probe_s): Remove typedef.
4572         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4573         (collect_probes): Change return type to std::vector, remove
4574         cleanup.
4575         (compare_probes): Return bool, change parameter type.  Change
4576         semantic to "less than".
4577         (gen_ui_out_table_header_info): Change parameter to std::vector
4578         and update.
4579         (exists_probe_with_pops): Likewise.
4580         (info_probes_for_ops): Update to std::vector change.
4581         (enable_probes_command): Likewise.
4582         (disable_probes_command): Likewise.
4583
4584 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4585
4586         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4587         vec to std::vector.
4588         * probe.c (parse_probes_in_pspace): Update.
4589         (find_probes_in_objfile): Update.
4590         (find_probe_by_pc): Update.
4591         (collect_probes): Update.
4592         (probe_any_get_probes): Update.
4593         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4594         return type to reference to std::vector.
4595         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4596         std::vector and update.
4597         (dtrace_process_dof): Likewise.
4598         (dtrace_get_probes): Likewise.
4599         * elfread.c (elf_get_probes): Change return type to std::vector,
4600         store an std::vector in bfd_data.
4601         (probe_key_free): Update to std::vector.
4602         * stap-probe.c (handle_stap_probe): Change parameter to
4603         std::vector and update.
4604         (stap_get_probes): Likewise.
4605         * symfile-debug.c (debug_sym_get_probes): Change return type to
4606         std::vector and update.
4607
4608 2017-09-11  Tom Tromey  <tom@tromey.com>
4609
4610         * breakpoint.c (program_breakpoint_here_p): Update.
4611         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4612         from make_show_memory_breakpoints_cleanup.  Return a
4613         scoped_restore_tmpl<int>.
4614         (restore_show_memory_breakpoints): Remove.
4615         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4616         * mem-break.c (memory_validate_breakpoint): Update.
4617         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4618         (ia64_memory_remove_breakpoint): Update.
4619         (ia64_breakpoint_from_pc): Update.
4620         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4621         from make_show_memory_breakpoints_cleanup.
4622
4623 2017-09-11  Tom Tromey  <tom@tromey.com>
4624
4625         * d-namespace.c (d_lookup_symbol): Use std::string.
4626         (find_symbol_in_baseclass): Likewise.
4627
4628 2017-09-11  Tom Tromey  <tom@tromey.com>
4629
4630         * ctf.c (ctf_start): Use std::string.
4631
4632 2017-09-11  Tom Tromey  <tom@tromey.com>
4633
4634         * ada-lang.c (is_known_support_routine): Update.
4635         (ada_unhandled_exception_name_addr_from_raise): Update.
4636         * guile/scm-frame.c (gdbscm_frame_name): Update.
4637         * python/py-frame.c (frapy_name): Update.
4638         (frapy_function): Update.
4639         * stack.h (find_frame_funname): Update.
4640         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4641         (print_frame): Update.
4642
4643 2017-09-11  Tom Tromey  <tom@tromey.com>
4644
4645         * findcmd.c (put_bits): Take a gdb::byte_vector.
4646         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4647         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4648         cleanups.
4649         (find_command): Update.
4650
4651 2017-09-11  Tom Tromey  <tom@tromey.com>
4652
4653         * cli/cli-script.c (class scoped_restore_hook_in): New.
4654         (clear_hook_in_cleanup): Remove.
4655         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4656         scoped_restore_hook_in.
4657
4658 2017-09-11  Tom Tromey  <tom@tromey.com>
4659
4660         * cli/cli-script.c (restore_interp): Remove.
4661         (read_command_lines): Use scoped_restore_interp.
4662         * interps.c (scoped_restore_interp::set_temp): Rename from
4663         interp_set_temp.
4664         * interps.h (class scoped_restore_interp): New.
4665         (interp_set_temp): Remove.
4666
4667 2017-09-11  Tom Tromey  <tom@tromey.com>
4668
4669         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4670         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4671         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4672         scoped_restore.
4673         (mi_cmd_break_insert_1): Update.
4674         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4675         scoped_restore.
4676
4677 2017-09-11  Tom Tromey  <tom@tromey.com>
4678
4679         * demangle.c (demangle_command): Update.
4680         * breakpoint.c (disable_command): Update.
4681         (enable_command): Update.
4682         (find_location_by_number): Make "number" const.  Use
4683         get_number_trailer.
4684         * cli/cli-utils.c (extract_arg): Return std::string.
4685         * probe.c (parse_probe_linespec): Update.  Change types.
4686         (collect_probes): Take string arguments.
4687         (parse_probe_linespec): Likewise.
4688         (info_probes_for_ops): Update.
4689         (enable_probes_command): Update.
4690         (disable_probes_command): Update.
4691         * break-catch-sig.c (catch_signal_split_args): Update.
4692         * mi/mi-parse.c (mi_parse): Update.
4693
4694 2017-09-11  Tom Tromey  <tom@tromey.com>
4695
4696         * language.h (language_enum): Make argument const.
4697         * language.c (language_enum): Make argument const.
4698
4699 2017-09-11  Tom Tromey  <tom@tromey.com>
4700
4701         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4702         as function.
4703         (skip_to_space): Rename from skip_to_space_const.
4704         * common/common-utils.c (skip_to_space): New function.
4705         (skip_to_space): Rename from skip_to_space_const.
4706         * cli/cli-utils.h (get_number): Rename from get_number_const.
4707         (extract_arg): Rename from extract_arg_const.
4708         * cli/cli-utils.c (get_number): Rename from get_number_const.
4709         (extract_arg): Rename from extract_arg_const.
4710         (number_or_range_parser::get_number): Use ::get_number.
4711         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4712         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4713         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4714         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4715         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4716         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4717         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4718         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4719
4720 2017-09-11  Tom Tromey  <tom@tromey.com>
4721
4722         * python/python.c (do_start_initialization): Use
4723         py-event-types.def to initialize types.
4724         Define all object type structures.
4725         * python/python-internal.h: Don't declare event initialization
4726         functions.
4727         * python/py-threadevent.c (thread_event_object_type): Don't
4728         define.
4729         * python/py-stopevent.c (stop_event_object_type): Don't define.
4730         * python/py-signalevent.c (signal_event_object_type): Don't
4731         declare or define.
4732         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4733         (clear_objfiles_event_object_type): Don't declare or define.
4734         * python/py-infevents.c (inferior_call_pre_event_object_type)
4735         (inferior_call_post_event_object_type)
4736         (register_changed_event_object_type)
4737         (memory_changed_event_object_type): Don't declare or define.
4738         * python/py-inferior.c (new_thread_event_object_type)
4739         (new_inferior_event_object_type)
4740         (inferior_deleted_event_object_type): Don't declare or define.
4741         * python/py-exitedevent.c (exited_event_object_type): Don't
4742         declare or define.
4743         * python/py-evts.c (gdbpy_initialize_py_events): Use
4744         py-all-events.def.
4745         * python/py-events.h (thread_event_object_type): Don't declare.
4746         (events_object): Use py-all-events.def.
4747         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4748         py-event-types.def.
4749         * python/py-event-types.def: New file.
4750         * python/py-continueevent.c (create_continue_event_object): Don't
4751         declare or define.
4752         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4753         declare or define.
4754         * python/py-all-events.def: New file.
4755
4756 2017-09-11  Tom Tromey  <tom@tromey.com>
4757
4758         * python/py-threadevent.c (create_thread_event_object): Return
4759         gdbpy_ref.
4760         * python/py-stopevent.h (create_stop_event_object)
4761         (create_breakpoint_event_object, create_signal_event_object):
4762         Update.
4763         * python/py-stopevent.c (create_stop_event_object): Return
4764         gdbpy_ref.
4765         (emit_stop_event): Update.
4766         * python/py-signalevent.c (create_signal_event_object): Return
4767         gdbpy_ref.
4768         * python/py-infevents.c (create_inferior_call_event_object):
4769         Update.
4770         * python/py-event.h (create_event_object)
4771         (create_thread_event_object): Update.
4772         * python/py-event.c (create_event_object): Return gdbpy_ref.
4773         * python/py-continueevent.c: Return gdbpy_ref.
4774         * python/py-bpevent.c (create_breakpoint_event_object): Return
4775         gdbpy_ref.
4776
4777 2017-09-11  Tom Tromey  <tom@tromey.com>
4778
4779         PR python/15622:
4780         * NEWS: Add entry.
4781         * python/python.c (do_start_initialization): Initialize new event
4782         types.
4783         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4784         (gdbpy_initialize_inferior_deleted_event)
4785         (gdbpy_initialize_new_thread_event): Declare.
4786         * python/py-threadevent.c (create_thread_event_object): Add option
4787         "thread" parameter.
4788         * python/py-inferior.c (new_thread_event_object_type)
4789         (new_inferior_event_object_type)
4790         (inferior_deleted_event_object_type): Declare.
4791         (python_new_inferior, python_inferior_deleted): New functions.
4792         (add_thread_object): Emit new_thread event.
4793         (gdbpy_initialize_inferior): Attach new functions to corresponding
4794         observers.
4795         (new_thread, new_inferior, inferior_deleted): Define new event
4796         types.
4797         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4798         registries.
4799         * python/py-events.h (events_object) <new_inferior,
4800         inferior_deleted, new_thread>: New fields.
4801         * python/py-event.h (create_thread_event_breakpoint): Add optional
4802         "thread" parameter.
4803
4804 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4805
4806         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4807         check current_ui instead.
4808         (internal_vproblem): Likewise.
4809
4810 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4811
4812         * thread.c (print_thread_info_1): Remove unnecessary calls to
4813         uiout->is_mi_like_p.
4814
4815 2017-09-09  Tom Tromey  <tom@tromey.com>
4816
4817         * namespace.h (add_using_directive): Update.
4818         * namespace.c (add_using_directive): Change type of excludes to
4819         std::vector.
4820         * dwarf2read.c (read_import_statement): Use std::vector.
4821         (read_namespace): Update.
4822         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4823
4824 2017-09-09  Tom Tromey  <tom@tromey.com>
4825
4826         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4827
4828 2017-09-09  Tom Tromey  <tom@tromey.com>
4829
4830         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4831
4832 2017-09-09  Tom Tromey  <tom@tromey.com>
4833
4834         * stack.c (func_command): Use gdb::def_vector.
4835
4836 2017-09-09  Tom Tromey  <tom@tromey.com>
4837
4838         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4839         ui_out_emit_list, ui_out_emit_tuple.
4840         (mi_cmd_var_update): Likewise.
4841
4842 2017-09-09  Tom Tromey  <tom@tromey.com>
4843
4844         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4845         ui_out_redirect_pop.
4846         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4847         ui_out_redirect_pop.
4848         * utils.c (do_ui_out_redirect_pop)
4849         (make_cleanup_ui_out_redirect_pop): Remove.
4850         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4851         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4852         * ui-out.h (ui_out_redirect_pop): New class.
4853
4854 2017-09-09  Tom Tromey  <tom@tromey.com>
4855
4856         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4857         (list_available_thread_groups, mi_cmd_list_thread_groups)
4858         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4859         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4860         Likewise.
4861
4862 2017-09-09  Tom Tromey  <tom@tromey.com>
4863
4864         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4865         ui_out_emit_tuple.
4866
4867 2017-09-09  Tom Tromey  <tom@tromey.com>
4868
4869         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4870         * stack.c (print_frame): Use ui_out_emit_tuple.
4871         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4872         (info_spu_mailbox_command, info_spu_dma_command)
4873         (info_spu_proxydma_command): Likewise.
4874         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4875         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4876         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4877         ui_out_emit_tuple.
4878         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4879
4880 2017-09-09  Tom Tromey  <tom@tromey.com>
4881
4882         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4883         (class ui_out_emit_table): Update comment.
4884         * ui-out.c (do_cleanup_table_end)
4885         (make_cleanup_ui_out_table_begin_end): Remove.
4886         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4887         (info_spu_dma_cmdlist): Likewise.
4888         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4889         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4890         ui_out_emit_table.
4891
4892 2017-09-09  Tom Tromey  <tom@tromey.com>
4893
4894         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4895         ui_out_emit_list, gdb::optional.
4896
4897 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4898
4899         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4900         prototype.
4901         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4902         prototype.
4903         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4904         prototype.
4905         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4906         * ada-exp.y: Remove _initialize_ada_exp prototype.
4907         * ada-lang.c: Remove _initialize_ada_language prototype.
4908         * ada-tasks.c: Remove _initialize_tasks prototype.
4909         * addrmap.c: Remove _initialize_addrmap prototype.
4910         * agent.c: Remove _initialize_agent prototype.
4911         * aix-thread.c: Remove _initialize_aix_thread prototype.
4912         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4913         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4914         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4915         prototype.
4916         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4917         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4918         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4919         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4920         prototype.
4921         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4922         prototype.
4923         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4924         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4925         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4926         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4927         prototype.
4928         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4929         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4930         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4931         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4932         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4933         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4934         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4935         prototype.
4936         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4937         prototype.
4938         * annotate.c: Remove _initialize_annotate prototype.
4939         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4940         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4941         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4942         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4943         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4944         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4945         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4946         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4947         prototype.
4948         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4949         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4950         * auto-load.c: Remove _initialize_auto_load prototype.
4951         * auxv.c: Remove _initialize_auxv prototype.
4952         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4953         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4954         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4955         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4956         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4957         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4958         prototype.
4959         * break-catch-throw.c: Remove _initialize_break_catch_throw
4960         prototype.
4961         * breakpoint.c: Remove _initialize_breakpoint prototype.
4962         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4963         * btrace.c: Remove _initialize_btrace prototype.
4964         * charset.c: Remove _initialize_charset prototype.
4965         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4966         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4967         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4968         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4969         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4970         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4971         * coffread.c: Remove _initialize_coffread prototype.
4972         * compile/compile.c: Remove _initialize_compile prototype.
4973         * complaints.c: Remove _initialize_complaints prototype.
4974         * completer.c: Remove _initialize_completer prototype.
4975         * copying.awk: Remove _initialize_copying prototype.
4976         * copying.c: Regenerate.
4977         * core-regset.c: Remove _initialize_core_regset prototype.
4978         * corefile.c: Remove _initialize_core prototype.
4979         * corelow.c: Remove _initialize_corelow prototype.
4980         * cp-abi.c: Remove _initialize_cp_abi prototype.
4981         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4982         * cp-support.c: Remove _initialize_cp_support prototype.
4983         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4984         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4985         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4986         * ctf.c: Remove _initialize_ctf prototype.
4987         * d-lang.c: Remove _initialize_d_language prototype.
4988         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4989         prototype.
4990         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4991         * dbxread.c: Remove _initialize_dbxread prototype.
4992         * dcache.c: Remove _initialize_dcache prototype.
4993         * demangle.c: Remove _initialize_demangler prototype.
4994         * disasm-selftests.c: Remove _initialize_disasm_selftests
4995         prototype.
4996         * disasm.c: Remove _initialize_disasm prototype.
4997         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4998         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4999         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5000         prototype.
5001         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5002         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5003         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5004         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5005         * elfread.c: Remove _initialize_elfread prototype.
5006         * exec.c: Remove _initialize_exec prototype.
5007         * extension.c: Remove _initialize_extension prototype.
5008         * f-lang.c: Remove _initialize_f_language prototype.
5009         * f-valprint.c: Remove _initialize_f_valprint prototype.
5010         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5011         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5012         * filesystem.c: Remove _initialize_filesystem prototype.
5013         * findcmd.c: Remove _initialize_mem_search prototype.
5014         * fork-child.c: Remove _initialize_fork_child prototype.
5015         * frame-base.c: Remove _initialize_frame_base prototype.
5016         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5017         * frame.c: Remove _initialize_frame prototype.
5018         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5019         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5020         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5021         * gcore.c: Remove _initialize_gcore prototype.
5022         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5023         * gdbarch.c: Regenerate.
5024         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5025         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5026         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5027         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5028         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5029         * go-lang.c: Remove _initialize_go_language prototype.
5030         * go32-nat.c: Remove _initialize_go32_nat prototype.
5031         * guile/guile.c: Remove _initialize_guile prototype.
5032         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5033         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5034         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5035         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5036         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5037         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5038         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5039         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5040         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5041         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5042         prototype.
5043         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5044         prototype.
5045         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5046         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5047         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5048         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5049         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5050         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5051         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5052         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5053         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5054         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5055         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5056         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5057         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5058         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5059         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5060         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5061         prototype.
5062         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5063         prototype.
5064         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5065         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5066         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5067         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5068         * infcall.c: Remove _initialize_infcall prototype.
5069         * infcmd.c: Remove _initialize_infcmd prototype.
5070         * inferior.c: Remove _initialize_inferiors prototype.
5071         * inflow.c: Remove _initialize_inflow prototype.
5072         * infrun.c: Remove _initialize_infrun prototype.
5073         * interps.c: Remove _initialize_interpreter prototype.
5074         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5075         * jit.c: Remove _initialize_jit prototype.
5076         * language.c: Remove _initialize_language prototype.
5077         * linux-fork.c: Remove _initialize_linux_fork prototype.
5078         * linux-nat.c: Remove _initialize_linux_nat prototype.
5079         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5080         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5081         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5082         * m2-lang.c: Remove _initialize_m2_language prototype.
5083         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5084         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5085         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5086         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5087         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5088         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5089         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5090         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5091         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5092         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5093         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5094         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5095         * machoread.c: Remove _initialize_machoread prototype.
5096         * macrocmd.c: Remove _initialize_macrocmd prototype.
5097         * macroscope.c: Remove _initialize_macroscope prototype.
5098         * maint.c: Remove _initialize_maint_cmds prototype.
5099         * mdebugread.c: Remove _initialize_mdebugread prototype.
5100         * memattr.c: Remove _initialize_mem prototype.
5101         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5102         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5103         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5104         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5105         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5106         * microblaze-linux-tdep.c: Remove
5107         _initialize_microblaze_linux_tdep prototype.
5108         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5109         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5110         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5111         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5112         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5113         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5114         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5115         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5116         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5117         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5118         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5119         prototype.
5120         * mipsread.c: Remove _initialize_mipsread prototype.
5121         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5122         prototype.
5123         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5124         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5125         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5126         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5127         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5128         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5129         prototype.
5130         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5131         * nto-procfs.c: Remove _initialize_procfs prototype.
5132         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5133         * objc-lang.c: Remove _initialize_objc_language prototype.
5134         * objfiles.c: Remove _initialize_objfiles prototype.
5135         * observer.c: Remove observer_test_first_notification_function,
5136         observer_test_second_notification_function,
5137         observer_test_third_notification_function, and
5138         _initialize_observer prototypes.
5139         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5140         * osabi.c: Remove _initialize_gdb_osabi prototype.
5141         * osdata.c: Remove _initialize_osdata prototype.
5142         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5143         * parse.c: Remove _initialize_parse prototype.
5144         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5145         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5146         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5147         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5148         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5149         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5150         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5151         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5152         * printcmd.c: Remove _initialize_printcmd prototype.
5153         * probe.c: Remove _initialize_probe prototype.
5154         * proc-api.c: Remove _initialize_proc_api prototype.
5155         * proc-events.c: Remove _initialize_proc_events prototype.
5156         * proc-service.c: Remove _initialize_proc_service prototype.
5157         * procfs.c: Remove _initialize_procfs prototype.
5158         * psymtab.c: Remove _initialize_psymtab prototype.
5159         * python/python.c: Remove _initialize_python prototype.
5160         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5161         * record-btrace.c: Remove _initialize_record_btrace prototype.
5162         * record-full.c: Remove _initialize_record_full prototype.
5163         * record.c: Remove _initialize_record prototype.
5164         * regcache.c: Remove _initialize_regcache prototype.
5165         * reggroups.c: Remove _initialize_reggroup prototype.
5166         * remote-notif.c: Remove _initialize_notif prototype.
5167         * remote-sim.c: Remove _initialize_remote_sim prototype.
5168         * remote.c: Remove _initialize_remote prototype.
5169         * reverse.c: Remove _initialize_reverse prototype.
5170         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5171         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5172         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5173         prototype.
5174         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5175         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5176         * rust-exp.y: Remove _initialize_rust_exp prototype.
5177         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5178         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5179         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5180         * score-tdep.c: Remove _initialize_score_tdep prototype.
5181         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5182         prototype.
5183         * ser-go32.c: Remove _initialize_ser_dos prototype.
5184         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5185         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5186         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5187         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5188         * serial.c: Remove _initialize_serial prototype.
5189         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5190         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5191         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5192         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5193         * skip.c: Remove _initialize_step_skip prototype.
5194         * sol-thread.c: Remove _initialize_sol_thread prototype.
5195         * solib-aix.c: Remove _initialize_solib_aix prototype.
5196         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5197         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5198         * solib-frv.c: Remove _initialize_frv_solib prototype.
5199         * solib-spu.c: Remove _initialize_spu_solib prototype.
5200         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5201         * solib-target.c: Remove _initialize_solib_target prototype.
5202         * solib.c: Remove _initialize_solib prototype.
5203         * source.c: Remove _initialize_source prototype.
5204         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5205         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5206         prototype.
5207         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5208         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5209         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5210         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5211         prototype.
5212         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5213         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5214         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5215         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5216         prototype.
5217         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5218         prototype.
5219         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5220         prototype.
5221         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5222         prototype.
5223         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5224         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5225         prototype.
5226         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5227         prototype.
5228         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5229         prototype.
5230         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5231         prototype.
5232         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5233         prototype.
5234         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5235         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5236         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5237         * stabsread.c: Remove _initialize_stabsread prototype.
5238         * stack.c: Remove _initialize_stack prototype.
5239         * stap-probe.c: Remove _initialize_stap_probe prototype.
5240         * std-regs.c: Remove _initialize_frame_reg prototype.
5241         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5242         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5243         * symfile.c: Remove _initialize_symfile prototype.
5244         * symmisc.c: Remove _initialize_symmisc prototype.
5245         * symtab.c: Remove _initialize_symtab prototype.
5246         * target-dcache.c: Remove _initialize_target_dcache prototype.
5247         * target-descriptions.c: Remove _initialize_target_descriptions
5248         prototype.
5249         * thread.c: Remove _initialize_thread prototype.
5250         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5251         prototype.
5252         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5253         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5254         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5255         prototype.
5256         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5257         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5258         * tracefile.c: Remove _initialize_tracefile prototype.
5259         * tracepoint.c: Remove _initialize_tracepoint prototype.
5260         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5261         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5262         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5263         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5264         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5265         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5266         * tui/tui.c: Remove _initialize_tui prototype.
5267         * typeprint.c: Remove _initialize_typeprint prototype.
5268         * user-regs.c: Remove _initialize_user_regs prototype.
5269         * utils.c: Remove _initialize_utils prototype.
5270         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5271         * valarith.c: Remove _initialize_valarith prototype.
5272         * valops.c: Remove _initialize_valops prototype.
5273         * valprint.c: Remove _initialize_valprint prototype.
5274         * value.c: Remove _initialize_values prototype.
5275         * varobj.c: Remove _initialize_varobj prototype.
5276         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5277         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5278         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5279         * windows-nat.c: Remove _initialize_windows_nat,
5280         _initialize_check_for_gdb_ini, and _initialize_loadable
5281         prototypes.
5282         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5283         * xcoffread.c: Remove _initialize_xcoffread prototype.
5284         * xml-support.c: Remove _initialize_xml_support prototype.
5285         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5286         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5287         prototype.
5288         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5289         prototype.
5290         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5291
5292 2017-09-08  Keith Seitz  <keiths@redhat.com>
5293
5294         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5295         field.
5296
5297 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5298
5299         * f-valprint.c (f_val_print): Remove check for one byte
5300         sized integers. Remove printing of character type.
5301
5302 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5303             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5304             Bernhard Heckel  <bernhard.heckel@intel.com>
5305
5306         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5307         to maintain proper indentation when printing pointers/refs.
5308
5309 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5310
5311         GDB 8.0.1 released.
5312
5313 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5314
5315         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5316
5317 2017-09-05  Tom Tromey  <tom@tromey.com>
5318
5319         * parse.c (funcall_chain): Now a std::vector.
5320         (start_arglist, end_arglist): Simplify.
5321         (free_funcalls): Remove.
5322         (parse_exp_in_context_1): Remove cleanup.
5323
5324 2017-09-05  Tom Tromey  <tom@tromey.com>
5325
5326         * go-exp.y (go_parse): Don't create a cleanup.
5327
5328 2017-09-05  Tom Tromey  <tom@tromey.com>
5329
5330         * d-exp.y (PrimaryExpression): Use std::string.
5331         (d_parse): Don't create a cleanup.
5332
5333 2017-09-05  Tom Tromey  <tom@tromey.com>
5334
5335         * utils.c (do_clear_parser_state): Remove.
5336         (make_cleanup_clear_parser_state): Remove.
5337         * p-exp.y (pascal_parse): Use scoped_restore.
5338         * m2-exp.y (m2_parse): Use scoped_restore.
5339         * f-exp.y (f_parse): Use scoped_restore.
5340         * d-exp.y (d_parse): Use scoped_restore.
5341         * c-exp.y (c_parse): Use scoped_restore.
5342         * ada-exp.y (ada_parse): Use scoped_restore.
5343         * utils.h (make_cleanup_clear_parser_state): Remove.
5344
5345 2017-09-06  Keith Seitz  <keiths@redhat.com>
5346
5347         * dwarf2read.c (dw2_linkage_name_attr): New function.
5348         (dw2_linkage_name): New function.
5349         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5350         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5351         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5352
5353 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5354
5355         * config/djgpp/djconfig.sh: Correct shell portability issue.
5356
5357 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5358
5359         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5360
5361 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5362
5363         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5364         * NEWS: Mention new FreeBSD/mips native configuration.
5365         * configure.host: Add aarch64*-*-freebsd*.
5366         * configure.nat: Likewise.
5367         * aarch64-fbsd-nat.c: New file.
5368
5369 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5370
5371         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5372         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5373         * NEWS: Mention new FreeBSD/aarch64 target.
5374         * configure.tgt: Add aarch64*-*-freebsd*.
5375         * aarch64-fbsd-tdep.c: New file.
5376         * aarch64-fbsd-tdep.h: New file.
5377
5378 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5379
5380         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5381
5382 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5383
5384         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5385         of TLS symbols.
5386
5387 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5388
5389         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5390         call.
5391
5392 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5393
5394         * infrun.c (follow_exec): Call add_thread after
5395         target_find_description.
5396
5397 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5398
5399         * infrun.c (handle_inferior_event_1): When exec'ing, read
5400         stop_pc after follow_exec.
5401
5402 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5403
5404         * remote.c (process_g_packet): Update error message.
5405
5406 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5407
5408         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5409         targets.
5410
5411 2017-09-05  Pedro Alves  <palves@redhat.com>
5412
5413         * eval.c (eval_call, evaluate_funcall): New functions, factored
5414         out from ...
5415         (evaluate_subexp_standard): ... this.
5416
5417 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5418
5419         * amd64-tdep.c (amd64_target_description): Create target
5420         descriptions.
5421         (_initialize_amd64_tdep): Don't call functions
5422         initialize_tdesc_amd64_*.  Add self tests.
5423         * arch/amd64.c (amd64_create_target_description): Add parameter
5424         is_linux.  Call set_tdesc_osabi if is_linux is true.
5425         * arch/amd64.h (amd64_create_target_description): Update the
5426         declaration.
5427         * arch/i386.c (i386_create_target_description): Add parameter
5428         is_linux.  Call set_tdesc_osabi if is_linux is true.
5429         * arch/i386.h (i386_create_target_description): Update
5430         declaration.
5431         * configure.tgt: Add i386.o to gdb_target_obs.
5432         * features/Makefile (XMLTOC): Remove i386/*.xml.
5433         * features/i386/amd64-avx-avx512.c: Remove.
5434         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5435         * features/i386/amd64-avx-mpx.c: Remove.
5436         * features/i386/amd64-avx.c: Remove.
5437         * features/i386/amd64-mpx.c: Remove.
5438         * features/i386/amd64.c: Remove.
5439         * features/i386/i386-avx-avx512.c: Remove.
5440         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5441         * features/i386/i386-avx-mpx.c: Remove.
5442         * features/i386/i386-avx.c: Remove.
5443         * features/i386/i386-mmx.c: Remove.
5444         * features/i386/i386-mpx.c: Remove.
5445         * features/i386/i386.c: Remove.
5446         * i386-tdep.c: Don't include features/i386/i386*.c., include
5447         target-descriptions.h and arch/i386.h.
5448         (i386_target_description): Create target descriptions.
5449         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5450         functions.  Do self tests.
5451
5452 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5453
5454         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5455         * features/i386/amd64-avx-avx512-linux.c: Removed.
5456         * features/i386/amd64-avx-linux.c: Removed.
5457         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5458         * features/i386/amd64-avx-mpx-linux.c: Removed.
5459         * features/i386/amd64-linux.c: Removed.
5460         * features/i386/amd64-mpx-linux.c: Removed.
5461         * features/i386/x32-avx-avx512-linux.c: Removed.
5462         * features/i386/x32-avx-linux.c: Removed.
5463         * features/i386/x32-linux.c: Removed.
5464
5465 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5466
5467         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5468         features/i386/*.c.
5469         (amd64_linux_read_description): Call
5470         amd64_create_target_description.
5471         * arch/amd64.c: New file.
5472         * arch/amd64.h: New file.
5473         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5474         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5475
5476 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5477
5478         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5479         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5480         (amd64_linux_read_description): Create target descriptions.
5481         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5482         functions.  Add unit tests.
5483         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5484         x32-core.xml.
5485         * features/i386/64bit-avx.c: Generated.
5486         * features/i386/64bit-avx512.c: Generated.
5487         * features/i386/64bit-core.c: Generated.
5488         * features/i386/64bit-linux.c: Generated.
5489         * features/i386/64bit-mpx.c: Generated.
5490         * features/i386/64bit-pkeys.c: Generated.
5491         * features/i386/64bit-segments.c: Generated.
5492         * features/i386/64bit-sse.c: Generated.
5493         * features/i386/x32-core.c: Generated.
5494         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5495         c files for amd64-linux and x32-linux.
5496
5497 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5498
5499         * amd64-linux-tdep.c (amd64_linux_read_description): New
5500         function.
5501         (amd64_linux_core_read_description): Call
5502         amd64_linux_read_description.
5503         (amd64_linux_init_abi): Likewise.
5504         (amd64_x32_linux_init_abi): Likewise.
5505         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5506         * x86-linux-nat.c (x86_linux_read_description): Call
5507         amd64_linux_read_description.
5508
5509 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5510
5511         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5512         comments.
5513
5514 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5515
5516         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5517         * features/i386/i386-avx-avx512-linux.c: Remove.
5518         * features/i386/i386-avx-linux.c: Remove.
5519         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5520         * features/i386/i386-avx-mpx-linux.c: Remove.
5521         * features/i386/i386-linux.c: Remove.
5522         * features/i386/i386-mmx-linux.c: Remove.
5523         * features/i386/i386-mpx-linux.c: Remove.
5524
5525 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5526
5527         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5528         (SFILES): Add arch/i386.c.
5529         (HFILES_NO_SRCDIR): Add arch/i386.h.
5530         * arch/i386.c: New file.
5531         * arch/i386.h: New file.
5532         * arch/tdesc.h (allocate_target_description): Declare.
5533         (set_tdesc_architecture): Declare.
5534         (set_tdesc_osabi): Declare.
5535         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5536         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5537         include arch/i386.h.
5538         (i386_linux_read_description): Remove code and call
5539         i386_create_target_description.
5540         (set_tdesc_architecture): New function.
5541         (set_tdesc_osabi): New function.
5542         * target-descriptions.h (allocate_target_description): Remove.
5543
5544 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5545
5546         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5547         * target-descriptions.c (tdesc_create_feature): Likewise, and
5548         adjust code.
5549         * features/i386/32bit-avx.c: Re-generated.
5550         * features/i386/32bit-avx512.c: Re-generated.
5551         * features/i386/32bit-core.c: Re-generated.
5552         * features/i386/32bit-linux.c: Re-generated.
5553         * features/i386/32bit-mpx.c: Re-generated.
5554         * features/i386/32bit-pkeys.c: Re-generated.
5555         * features/i386/32bit-sse.c: Re-generated.
5556
5557 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5558
5559         * regformats/regdef.h (struct reg): Override operator == and !=.
5560
5561 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5562
5563         * arch/tdesc.h: New file.
5564         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5565         * target-descriptions.c: Update comments.
5566         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5567         declarations.
5568         * features/i386/32bit-avx.c: Re-generated.
5569         * features/i386/32bit-avx512.c: Re-generated.
5570         * features/i386/32bit-core.c: Re-generated.
5571         * features/i386/32bit-linux.c: Re-generated.
5572         * features/i386/32bit-mpx.c: Re-generated.
5573         * features/i386/32bit-pkeys.c: Re-generated.
5574         * features/i386/32bit-sse.c: Re-generated.
5575
5576 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5577
5578         * regformats/regdat.sh: Update generated code.
5579
5580 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5581
5582         * regformats/regdat.sh: Adjust code order.
5583
5584 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5585
5586         * expprint.c (dump_subexp_body_standard): Use constant format
5587         string in fprintf_filtered call.
5588
5589 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5590
5591         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5592         NetBSD/i386.
5593         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5594
5595 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5596
5597         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5598
5599 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5600
5601         * bsd-kvm.o: Define _KMEMUSER.
5602         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5603         * configure: Regenerate.
5604
5605 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5606
5607         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5608         * i386-fbsd-nat.c: Likewise.
5609
5610 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5611
5612         * unittests/array-view-selftests.c: Add include of <array>.
5613
5614 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5615
5616         * spu-tdep.c (flush_ea_cache): Add missing argument to
5617         call_function_by_hand.
5618
5619 2017-09-04  Pedro Alves  <palves@redhat.com>
5620
5621         * NEWS (Safer support for debugging with no debug info): New.
5622
5623 2017-09-04  Pedro Alves  <palves@redhat.com>
5624
5625         * c-exp.y (function_method, function_method_void): Add current
5626         instance flags to TYPE_INSTANCE.
5627         * dwarf2read.c (check_modifier): New.
5628         (compute_delayed_physnames): Assert that only C++ adds delayed
5629         physnames.  Mark fn_fields as const/volatile depending on
5630         physname.
5631         * eval.c (make_params): New type_instance_flags parameter.  Use
5632         it as the new type's instance flags.
5633         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5634         flags element and pass it to make_params.
5635         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5636         instance flags element.
5637         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5638         * gdbtypes.h: Include "enum-flags.h".
5639         (type_instance_flags): New enum-flags type.
5640         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5641         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5642         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5643         (follow_type_instance_flags): New function.
5644         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5645         * parser-defs.h (follow_type_instance_flags): Declare.
5646         * valops.c (value_struct_elt_for_reference): const/volatile must
5647         match too.
5648
5649 2017-09-04  Pedro Alves  <palves@redhat.com>
5650
5651         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5652         function/method scopes; lookup the nested name as a function local
5653         static variable.
5654
5655 2017-09-04  Pedro Alves  <palves@redhat.com>
5656
5657         (%type <voidval>): Add function_method.
5658         * c-exp.y (exp): New production for calls with no arguments.
5659         (function_method, function_method_void_or_typelist): New
5660         productions.
5661         (exp): New production for "method()::static_var".
5662         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5663         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5664         Handle OP_FUNC_STATIC_VAR.
5665         * parse.c (operator_length_standard):
5666         Handle OP_FUNC_STATIC_VAR.
5667
5668 2017-09-04  Pedro Alves  <palves@redhat.com>
5669
5670         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5671         handling.
5672         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5673         Ditto.
5674         * parse.c (operator_length_standard, operator_check_standard):
5675         Ditto.
5676         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5677
5678 2017-09-04  Pedro Alves  <palves@redhat.com>
5679
5680         * ax-gdb.c: Include "typeprint.h".
5681         (gen_expr_for_cast): New function.
5682         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5683         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5684         type is unknown.
5685         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5686         nodebug_data_symbol.
5687         * eval.c: Include "typeprint.h".
5688         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5689         Error out if symbol has unknown type.
5690         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5691         evaluate_subexp_for_cast.
5692         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5693         OP_VAR_MSYM_VALUE.
5694         (evaluate_subexp_for_cast): New function.
5695         * gdbtypes.c (init_nodebug_var_type): New function.
5696         (objfile_type): Use it to initialize types of variables with no
5697         debug info.
5698         * typeprint.c (error_unknown_type): New.
5699         * typeprint.h (error_unknown_type): New declaration.
5700         * compile/compile-c-types.c (convert_type_basic): Handle
5701         TYPE_CODE_ERROR; warn and fallback to int for variables with
5702         unknown type.
5703
5704 2017-09-04  Pedro Alves  <palves@redhat.com>
5705
5706         * eval.c (evaluate_var_value): New function, factored out from ...
5707         (evaluate_subexp_standard): ... here.
5708
5709 2017-09-04  Pedro Alves  <palves@redhat.com>
5710
5711         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5712         Remove useless assignments to 'op'.
5713
5714 2017-09-04  Pedro Alves  <palves@redhat.com>
5715
5716         * eval.c (eval_skip_value): New function.
5717         (evaluate_subexp_standard): Use it.
5718
5719 2017-09-04  Pedro Alves  <palves@redhat.com>
5720
5721         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5722         function name from symbol/minsym and pass it to
5723         error_call_unknown_return_type.
5724
5725 2017-09-04  Pedro Alves  <palves@redhat.com>
5726
5727         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5728         * ax-gdb.c (gen_msym_var_ref): New function.
5729         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5730         * eval.c (evaluate_var_msym_value): New function.
5731         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5732         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5733         to call_function_by_hand.
5734         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5735         Handle OP_VAR_MSYM_VALUE.
5736         (union exp_element) <msymbol>: New field.
5737         * minsyms.h (struct type): Forward declare.
5738         (find_minsym_type_and_address): Declare.
5739         * parse.c (write_exp_elt_msym): New function.
5740         (write_exp_msymbol): Delete, refactored as ...
5741         (find_minsym_type_and_address): ... this new function.
5742         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5743         (operator_length_standard, operator_check_standard): Handle
5744         OP_VAR_MSYM_VALUE.
5745         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5746
5747 2017-09-04  Pedro Alves  <palves@redhat.com>
5748
5749         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5750         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5751         unknown.
5752         * ada-typeprint.c (print_func_type): Handle functions with unknown
5753         return type.
5754         * c-typeprint.c (c_type_print_base): Handle functions and methods
5755         with unknown return type.
5756         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5757         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5758         * compile/compile-c-types.c: Include "objfiles.h".
5759         (convert_func): For functions with unknown return type, warn and
5760         default to int.
5761         * compile/compile-object-run.c (compile_object_run): Adjust call
5762         to call_function_by_hand_dummy.
5763         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5764         call_function_by_hand.
5765         * eval.c (evaluate_subexp_standard): Adjust calls to
5766         call_function_by_hand.  Handle functions and methods with unknown
5767         return type.  Pass expect_type to call_function_by_hand.
5768         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5769         return type.
5770         * gcore.c (call_target_sbrk): Adjust call to
5771         call_function_by_hand.
5772         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5773         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5774         an integer address type instead of nodebug.
5775         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5776         call_function_by_hand.
5777         * infcall.c (error_call_unknown_return_type): New function.
5778         (call_function_by_hand): New "default_return_type" parameter.
5779         Pass it down.
5780         (call_function_by_hand_dummy): New "default_return_type"
5781         parameter.  Use it instead of defaulting to int.  If there's no
5782         default and the return type is unknown, throw an error.  If
5783         there's a default return type, and the called function has no
5784         debug info, then assume the function is prototyped.
5785         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5786         New "default_return_type" parameter.
5787         (error_call_unknown_return_type): New declaration.
5788         * linux-fork.c (call_lseek): Cast return type of lseek.
5789         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5790         call_function_by_hand.
5791         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5792         calls to call_function_by_hand.
5793         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5794         return type.
5795         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5796         (value_nsstring, print_object_command): Adjust calls to
5797         call_function_by_hand.
5798         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5799         functions with unknown return type.
5800         (pascal_type_print_func_varspec_suffix): New function.
5801         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5802         TYPE_CODE_METHOD>: Use it.
5803         * python/py-value.c (valpy_call): Adjust call to
5804         call_function_by_hand.
5805         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5806         call_function_by_hand.
5807         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5808         call_function_by_hand.
5809         * valops.c (value_allocate_space_in_inferior): Adjust call to
5810         call_function_by_hand.
5811         * typeprint.c (type_print_unknown_return_type): New function.
5812         * typeprint.h (type_print_unknown_return_type): New declaration.
5813
5814 2017-09-04  Pedro Alves  <palves@redhat.com>
5815
5816         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5817         types with more than one parameter as prototyped.
5818
5819 2017-09-04  Pedro Alves  <palves@redhat.com>
5820
5821         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5822         (disassemble_command): Use gdb_disassembly_flags instead of bare
5823         int.
5824         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5825         (dump_insns, do_mixed_source_and_assembly_deprecated)
5826         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5827         Use gdb_disassembly_flags instead of bare int.
5828         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5829         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5830         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5831         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5832         (enum gdb_disassembly_flag): ... values of this new enumeration.
5833         (gdb_disassembly_flags): Define.
5834         (gdb_disassembly)
5835         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5836         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5837         gdb_disassembly_flags instead of bare int.
5838         * record-btrace.c (btrace_insn_history)
5839         (record_btrace_insn_history, record_btrace_insn_history_range)
5840         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5841         instead of bare int.
5842         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5843         Use gdb_disassembly_flags instead of bare int.
5844         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5845         Define.
5846         * target-delegates.c: Regenerate.
5847         * target.c (target_insn_history, target_insn_history_from)
5848         (target_insn_history_range): Use gdb_disassembly_flags instead of
5849         bare int.
5850         * target.h: Include "disasm.h".
5851         (struct target_ops) <to_insn_history, to_insn_history_from,
5852         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5853         int.
5854         (target_insn_history, target_insn_history_from)
5855         (target_insn_history_range): Use gdb_disassembly_flags instead of
5856         bare int.
5857
5858 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5859
5860         * cli/cli-script.c (build_command_line): For if/while commands,
5861         check whether args is empty.
5862
5863 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5864
5865         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5866         (enum command_control_type): Likewise.
5867         (struct command_line): Likewise.
5868         (free_command_lines): Likewise.
5869         (struct command_lines_deleter): Likewise.
5870         (command_line_up): Likewise.
5871         (read_command_lines): Likewise.
5872         (read_command_lines_1): Likewise.
5873         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5874         (enum command_control_type): Likewise.
5875         (struct command_line): Likewise.
5876         (free_command_lines): Likewise.
5877         (struct command_lines_deleter): Likewise.
5878         (command_line_up): Likewise.
5879         (read_command_lines): Likewise.
5880         (read_command_lines_1): Likewise.
5881         * breakpoint.h: Include cli/cli-script.h.
5882         * extension-priv.h: Likewise.
5883         * gdbcmd.h: Likewise.
5884
5885 2017-09-04  Pedro Alves  <palves@redhat.com>
5886
5887         * ada-lang.c (is_known_support_routine): Move sal declaration to
5888         where it is initialized.
5889         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5890         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5891         (clear_command, update_static_tracepoint): Remove init_sal
5892         references.  Move declarations closer to initializations.
5893         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5894         initializations.
5895         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5896         references.  Move sal declarations closer to initializations.
5897         * frame.c (find_frame_sal): Return a symtab_and_line via function
5898         return instead of output parameter.  Remove init_sal references.
5899         * frame.h (find_frame_sal): Return a symtab_and_line via function
5900         return instead of output parameter.
5901         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5902         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5903         instead of memset.
5904         (gdbscm_find_pc_line): Remove init_sal reference.
5905         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5906         references.  Move declarations closer to initializations.
5907         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5908         initializations.
5909         (finish_backward): Remove init_sal references.  Move declarations
5910         closer to initializations.
5911         * infrun.c (process_event_stop_test, handle_step_into_function)
5912         (insert_hp_step_resume_breakpoint_at_frame)
5913         (insert_step_resume_breakpoint_at_caller): Likewise.
5914         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5915         (symbol_to_sal): Likewise.
5916         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5917         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5918         to its initialization.
5919         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5920         init_sal references.  Move declarations closer to initializations.
5921         * source.c (get_current_source_symtab_and_line): Remove brace
5922         initialization.
5923         (set_current_source_symtab_and_line): Now takes the sal by const
5924         reference.  Remove brace initialization.
5925         (line_info): Remove init_sal reference.
5926         * source.h (set_current_source_symtab_and_line): Now takes a
5927         symtab_and_line via const reference.
5928         * stack.c (set_current_sal_from_frame): Adjust.
5929         (print_frame_info): Adjust.
5930         (get_last_displayed_sal): Return the sal via function return
5931         instead of via output parameter.  Simplify.
5932         (frame_info): Adjust.
5933         * stack.h (get_last_displayed_sal): Return the sal via function
5934         return instead of via output parameter.
5935         * symtab.c (init_sal): Delete.
5936         (find_pc_sect_line): Remove init_sal references.  Move
5937         declarations closer to initializations.
5938         (find_function_start_sal): Remove init_sal references.  Move
5939         declarations closer to initializations.
5940         * symtab.h (struct symtab_and_line): In-class initialize all
5941         fields.
5942         * tracepoint.c (set_traceframe_context)
5943         (print_one_static_tracepoint_marker): Remove init_sal references.
5944         Move declarations closer to initializations.
5945         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5946         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5947         declarations closer to initializations.
5948         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5949         init_sal references.  Adjust.
5950
5951 2017-09-04  Pedro Alves  <palves@redhat.com>
5952
5953         * ax-gdb.c (agent_command_1): Use range-for.
5954         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5955         * breakpoint.c: Include "common/array-view.h".
5956         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5957         parameter from struct symtabs_and_lines to
5958         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5959         (breakpoint_sals_to_pc): Change sals parameter from struct
5960         symtabs_and_lines to std::vector reference.
5961         (check_fast_tracepoint_sals): Change sals parameter from struct
5962         symtabs_and_lines to std::array_view.  Use range-for.
5963         (decode_static_tracepoint_spec): Return a std::vector instead of
5964         symtabs_and_lines.  Update.
5965         (create_breakpoint): Update.
5966         (break_range_command, until_break_command, clear_command): Update.
5967         (base_breakpoint_decode_location, bkpt_decode_location)
5968         (bkpt_probe_create_sals_from_location)
5969         (bkpt_probe_decode_location, tracepoint_decode_location)
5970         (tracepoint_probe_decode_location)
5971         (strace_marker_create_sals_from_location): Return a std::vector
5972         instead of symtabs_and_lines.
5973         (strace_marker_create_breakpoints_sal): Update.
5974         (strace_marker_decode_location): Return a std::vector instead of
5975         symtabs_and_lines.  Update.
5976         (update_breakpoint_locations): Change struct symtabs_and_lines
5977         parameters to gdb::array_view.  Adjust.
5978         (location_to_sals): Return a std::vector instead of
5979         symtabs_and_lines.  Update.
5980         (breakpoint_re_set_default): Use std::vector instead of struct
5981         symtabs_and_lines.
5982         (decode_location_default): Return a std::vector instead of
5983         symtabs_and_lines.  Update.
5984         * breakpoint.h: Include "common/array-view.h".
5985         (struct breakpoint_ops) <decode_location>: Now returns a
5986         std::vector instead of returning a symtabs_and_lines via output
5987         parameter.
5988         (update_breakpoint_locations): Change sals parameters to use
5989         gdb::array_view.
5990         * cli/cli-cmds.c (edit_command, list_command): Update to use
5991         std::vector and gdb::array_view.
5992         (ambiguous_line_spec): Adjust to use gdb::array_view and
5993         range-for.
5994         (compare_symtabs): Rename to ...
5995         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5996         const reference and adjust.
5997         (filter_sals): Rewrite using std::vector and standard algorithms.
5998         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5999         (jump_command): Update to use std::vector.
6000         * linespec.c (struct linespec_state) <canonical_names>: Update
6001         comment.
6002         (add_sal_to_sals_basic): Delete.
6003         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6004         (decode_line_2, create_sals_line_offset)
6005         (convert_address_location_to_sals, convert_linespec_to_sals)
6006         (convert_explicit_location_to_sals, parse_linespec)
6007         (event_location_to_sals, decode_line_full, decode_line_1)
6008         (decode_line_with_current_source)
6009         (decode_line_with_last_displayed, decode_objc)
6010         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6011         (linespec_result::~linespec_result): Adjust to use std::vector
6012         instead of symtabs_and_lines.
6013         * linespec.h (linespec_sals::sals): Now a std::vector.
6014         (struct linespec_result): Use std::vector, bool, and in-class
6015         initialization.
6016         (decode_line_1, decode_line_with_current_source)
6017         (decode_line_with_last_displayed): Return std::vector.
6018         * macrocmd.c (info_macros_command): Use std::vector.
6019         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6020         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6021         std::vector.
6022         * probe.h (parse_probes): Return a std::vector.
6023         * python/python.c (gdbpy_decode_line): Use std::vector and
6024         gdb::array_view.
6025         * source.c (select_source_symtab, line_info): Use std::vector.
6026         * stack.c (func_command): Use std::vector.
6027         * symtab.h (struct symtabs_and_lines): Delete.
6028         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6029
6030 2017-09-04  Pedro Alves  <palves@redhat.com>
6031
6032         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6033         unittests/array-view-selftests.c.
6034         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6035         * common/array-view.h: New file.
6036         * unittests/array-view-selftests.c: New file.
6037
6038 2017-09-04  Pedro Alves  <palves@redhat.com>
6039
6040         * cli/cli-cmds.c (edit_command): Pass message to
6041         ambiguous_line_spec.
6042         (list_command): Pass message to ambiguous_line_spec.  Say
6043         "first"/"last" instead of "start" and "end" to be consistent with
6044         the manual.
6045         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6046         them to print formatted message.
6047
6048 2017-09-04  Pedro Alves  <palves@redhat.com>
6049
6050         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6051         ftrace_update_insns by reference instead of pointer.
6052
6053 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6054
6055         * i386-go32-tdep.c: Include x86-xstate.h.
6056         (i386_go32_init_abi): Call i386_target_description.
6057         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6058         if xcr0 is X86_XSTATE_X87_MASK.
6059         * i386-tdep.h (tdesc_i386): Remove the declaration.
6060         (tdesc_i386_mmx): Likewise.
6061
6062 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6063
6064         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6065         X86_XSTATE_SSE_MASK instead of 0.
6066
6067 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6068
6069         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6070         i386_target_description.
6071         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6072         i386_target_description.
6073         * i386-tdep.c (i386_gdbarch_init): Likewise.
6074
6075 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6076
6077         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6078         (x86_darwin_init_abi_64): Call amd64_target_description.
6079         * amd64-dicos-tdep.c: Likewise.
6080         * amd64-fbsd-nat.c: Likewise.
6081         * amd64-fbsd-tdep.c: Likewise.
6082         * amd64-nbsd-tdep.c: Likewise.
6083         * amd64-obsd-tdep.c: Likewise.
6084         * amd64-sol2-tdep.c: Likewise.
6085         * amd64-windows-tdep.c: Likewise.
6086         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6087
6088 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6089
6090         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6091         (btrace_function) <insn>: Change type to use std::vector.
6092         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6093         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6094         ftrace_update_insns, ftrace_compute_global_level_offset,
6095         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6096         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6097         change to std::vector.
6098         (ftrace_update_insns): Adjust to change to std::vector, change
6099         type of INSN parameter.
6100         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6101         * record-btrace.c (btrace_call_history_insn_range,
6102         btrace_compute_src_line_range,
6103         record_btrace_frame_prev_register): Adjust to change to
6104         std::vector.
6105         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6106         to change to std::vector.
6107
6108 2017-09-03  Tom Tromey  <tom@tromey.com>
6109
6110         * corefile.c (reopen_exec_file): Use std::string.
6111
6112 2017-09-03  Tom Tromey  <tom@tromey.com>
6113
6114         * compile/compile.c (compile_register_name_mangled): Return
6115         std::string.
6116         * compile/compile-loc2c.c (pushf_register_address): Update.
6117         (pushf_register): Update.
6118         * compile/compile-c-types.c (convert_array): Update.
6119         * compile/compile-c-symbols.c (generate_vla_size): Update.
6120         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6121         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6122         (convert_one_symbol): Update.
6123         (generate_c_for_for_one_variable): Update.
6124         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6125         std::string.
6126         (generate_register_struct): Update.
6127         * compile/compile-internal.h (c_get_range_decl_name): Return a
6128         std::string.
6129         (compile_register_name_mangled): Return std::string.
6130
6131 2017-09-03  Tom Tromey  <tom@tromey.com>
6132
6133         * utils.c (perror_string): Return a std::string.
6134         (throw_perror_with_name, perror_warning_with_name): Update.
6135
6136 2017-09-03  Tom Tromey  <tom@tromey.com>
6137
6138         * demangle.c (demangle_command): Use std::string,
6139         unique_xmalloc_ptr.
6140
6141 2017-09-03  Tom Tromey  <tom@tromey.com>
6142
6143         * cli/cli-setshow.c (do_set_command): Use std::string.
6144
6145 2017-09-03  Tom Tromey  <tom@tromey.com>
6146
6147         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6148
6149 2017-09-03  Tom Tromey  <tom@tromey.com>
6150
6151         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6152
6153 2017-09-03  Tom Tromey  <tom@tromey.com>
6154
6155         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6156         gdb::unique_xmalloc_ptr.
6157
6158 2017-09-03  Tom Tromey  <tom@tromey.com>
6159
6160         * thread.c (print_thread_info_1): Use string_printf.
6161         (thread_apply_command, thread_apply_all_command): Use
6162         std::string.
6163
6164 2017-09-03  Tom Tromey  <tom@tromey.com>
6165
6166         * valprint.c (val_print_string): Update.
6167         * gdbcore.h (memory_error_message): Return std::string.
6168         * corefile.c (memory_error_message): Return std::string.
6169         (memory_error): Update.
6170         * breakpoint.c (insert_bp_location): Update.
6171
6172 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6173
6174         * target/waitstatus.h (target_waitstatus_to_string): Change
6175         return type to std::string.
6176         * target/waitstatus.c (target_waitstatus_to_string): Return
6177         std::string.
6178         * target.h (target_waitstatus_to_string): Remove declaration.
6179         * infrun.c (resume, clear_proceed_status_thread,
6180         print_target_wait_results, do_target_wait, save_waitstatus,
6181         stop_all_threads): Adjust.
6182         * record-btrace.c (record_btrace_wait): Adjust.
6183         * target-debug.h
6184         (target_debug_print_struct_target_waitstatus_p): Adjust.
6185
6186 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6187
6188         PR gdb/22046
6189         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6190         detection.
6191
6192 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6193
6194         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6195         for setting/unsetting environment variables on the remote target.
6196         (New remote packets): Add entries for QEnvironmentHexEncoded,
6197         QEnvironmentUnset and QEnvironmentReset.
6198         * common/environ.c (gdb_environ::operator=): Extend method to
6199         handle m_user_set_env_list and m_user_unset_env_list.
6200         (gdb_environ::clear): Likewise.
6201         (match_var_in_string): Change type of first parameter from 'char
6202         *' to 'const char *'.
6203         (gdb_environ::set): Extend method to handle
6204         m_user_set_env_list and m_user_unset_env_list.
6205         (gdb_environ::unset): Likewise.
6206         (gdb_environ::clear_user_set_env): New method.
6207         (gdb_environ::user_set_envp): Likewise.
6208         (gdb_environ::user_unset_envp): Likewise.
6209         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6210         m_user_unset_env_list on move constructor/assignment.
6211         (unset): Add new default parameter 'update_unset_list = true'.
6212         (clear_user_set_env): New method.
6213         (user_set_envp): Likewise.
6214         (user_unset_envp): Likewise.
6215         (m_user_set_env_list): New std::set.
6216         (m_user_unset_env_list): Likewise.
6217         * common/rsp-low.c (hex2str): New function.
6218         (bin2hex): New overload for bin2hex function.
6219         * common/rsp-low.c (hex2str): New prototype.
6220         (str2hex): New overload prototype.
6221         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6222         QEnvironmentUnset and QEnvironmentReset.
6223         (remote_protocol_features): Add QEnvironmentHexEncoded,
6224         QEnvironmentUnset and QEnvironmentReset packets.
6225         (send_environment_packet): New function.
6226         (extended_remote_environment_support): Likewise.
6227         (extended_remote_create_inferior): Call
6228         extended_remote_environment_support.
6229         (_initialize_remote): Add QEnvironmentHexEncoded,
6230         QEnvironmentUnset and QEnvironmentReset packet configs.
6231         * unittests/environ-selftests.c (gdb_selftest_env_var):
6232         New variable.
6233         (test_vector_initialization): New function.
6234         (test_init_from_host_environ): Likewise.
6235         (test_reinit_from_host_environ): Likewise.
6236         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6237         Likewise.
6238         (test_unset_set_empty_vector): Likewise.
6239         (test_vector_clear): Likewise.
6240         (test_std_move): Likewise.
6241         (test_move_constructor):
6242         (test_self_move): Likewise.
6243         (test_set_unset_reset): Likewise.
6244         (run_tests): Rewrite in terms of the functions above.
6245
6246 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6247
6248         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6249         (adi_available): Use a temp variable of type CORE_ADDR as argument
6250         3 when calling target_auxv_search.
6251         (adi_normalize_address): Use masks and xor operators to calculate
6252         normalized address.
6253         (adi_read_versions, adi_write_versions, adi_print_versions)
6254         (do_examine, do_assign): Use paddress.
6255
6256 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6257
6258         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6259         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6260         out of loop and add supply of FIR.
6261         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6262         add collect of FIR.
6263
6264 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6265
6266         PR gdb/21827
6267         * cli/cli-script.c (define_command): Don't convert command name
6268         to lower case.
6269
6270 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6271
6272         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6273         Update all callers accordingly. Remove all code blocks handling
6274         the case where DISPP is not NULL.
6275
6276 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6277
6278         PR symtab/22003
6279         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6280         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6281         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6282
6283 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6284
6285         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6286         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6287         (read_comp_units_from_section): New parameter abbrev_section, use
6288         read_and_check_comp_unit_head, allocate signatured_type if needed.
6289         (create_all_comp_units): Update read_comp_units_from_section caller.
6290
6291 2017-08-23  Pedro Alves  <palves@redhat.com>
6292
6293         PR remote/21852
6294         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6295         to null_ptid and switch to thread without reading the registers
6296         after adding the inferior.
6297
6298 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6299
6300         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6301         compile-gcc.
6302         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6303         (compile_to_object): Implement compile_gcc.
6304         (_initialize_compile): Install "set compile-gcc".  Initialize
6305         compile_gcc.
6306
6307 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6308
6309         * compile/compile.c (compile_to_object): Conditionally call
6310         set_verbose.  Conditionally call compile or compile_v0.
6311
6312 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6313
6314         * sparc64-tdep.h: (adi_normalize_address): New export.
6315         * sparc-nat.h: (open_adi_tag_fd): New export.
6316         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6317         * sparc64-linux-tdep.c:
6318         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6319         (sparc64_linux_handle_segmentation_fault): New function.
6320         (sparc64_linux_init_abi): Register
6321         sparc64_linux_handle_segmentation_fault
6322         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6323         (sparc64_addr_bits_remove): New function.
6324         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6325         (MAX_PROC_NAME_SIZE): New macro.
6326         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6327         (sparc64adilist): New variable.
6328         (adi_proc_list): New variable.
6329         (find_adi_info): New function.
6330         (add_adi_info): New function.
6331         (get_adi_info_proc): New function.
6332         (get_adi_info): New function.
6333         (info_adi_command): New function.
6334         (read_maps_entry): New function.
6335         (adi_available): New function.
6336         (adi_normalize_address): New function.
6337         (adi_align_address): New function.
6338         (adi_convert_byte_count): New function.
6339         (adi_tag_fd): New function.
6340         (adi_is_addr_mapped): New function.
6341         (adi_read_versions): New function.
6342         (adi_write_versions): New function.
6343         (adi_print_versions): New function.
6344         (do_examine): New function.
6345         (do_assign): New function.
6346         (adi_examine_command): New function.
6347         (adi_assign_command): New function.
6348         (_initialize_sparc64_adi_tdep): New function.
6349
6350 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6351
6352         * breakpoint.c (breakpoints_info): Rename to ...
6353         (info_breakpoints_command): ... this.
6354         (watchpoints_info): Rename to ...
6355         (info_watchpoints_command): ... this.
6356         (tracepoints_info): Rename to ...
6357         (info_tracepoints_command): ... this.
6358         (_initialize_breakpoint): Adjust.
6359         * dcache.c (dcache_info): Rename to ...
6360         (info_display_command): ... this.
6361         (_initialize_dcache): Adjust.
6362         * frame.h (args_info): Rename to ...
6363         (info_args_command): ... this.
6364         (locals_info): Rename to ...
6365         (info_locals_command): ... this.
6366         * infcmd.c (nofp_registers_info): Rename to ...
6367         (info_registers_command): ... this.
6368         (float_info): Rename to ...
6369         (info_float_command): ... this.
6370         (program_info): Rename to ...
6371         (info_program_command): ... this.
6372         (all_registers_info): Rename to ...
6373         (info_all_registers_command): ... this.
6374         (vector_info): Rename to ...
6375         (info_vector_command): ... this.
6376         (float_info): Rename to ...
6377         (info_float_command): ... this.
6378         (_initialize_infcmd): Adjust.
6379         * inferior.h (term_info): Rename to ...
6380         (info_terminal_command): ... this.
6381         * inflow.c (term_info): Rename to ...
6382         (info_terminal_command): ... this.
6383         (_initialize_inflow): Adjust.
6384         * infrun.c (signals_info): Rename to ...
6385         (info_signals_command): ... this.
6386         (_initialize_infrun): Adjust.
6387         * objc-lang.c (classes_info): Rename to ...
6388         (info_classes_command): ... this.
6389         (selectors_info): Rename to ...
6390         (info_selectors_command): ... this.
6391         (_initialize_objc_language): Adjust.
6392         * printcmd.c (sym_info): Rename to ...
6393         (info_symbol_command): ... this.
6394         (address_info): Rename to ...
6395         (info_address_command): ... this.
6396         (display_info): Rename to ...
6397         (info_display_command): ... this.
6398         (_initialize_printcmd): Adjust.
6399         * reverse.c (bookmarks_info): Rename to ...
6400         (info_breakpoints_command): ... this.
6401         (_initialize_reverse): Adjust.
6402         * ser-go32.c (dos_info): Rename to ...
6403         (info_serial_command): ... this.
6404         (_initialize_ser_dos): Adjust.
6405         * skip.c (skip_info): Rename to ...
6406         (info_skip_command): ... this.
6407         (_initialize_step_skip): Adjust.
6408         * source.c (line_info): Rename to ...
6409         (info_line_command): ... this.
6410         (source_info): Rename to ...
6411         (info_source_command)
6412         * stack.c (frame_info): Rename to ...
6413         (info_frame_command): ... this.
6414         (locals_info): Rename to ...
6415         (info_locals_command): ... this.
6416         (args_info): Rename to ...
6417         (info_args_command): ... this.
6418         (_initialize_stack): Adjust.
6419         * symtab.c (sources_info): Rename to ...
6420         (info_sources_command): ... this.
6421         (variables_info): Rename to ...
6422         (info_variables_command): ... this.
6423         (functions_info): Rename to ...
6424         (info_functions_command): ... this.
6425         (types_info): Rename to ...
6426         (info_types_command): ... this.
6427         (_initialize_symtab): Adjust.
6428         * target.c (target_info): Rename to ...
6429         (info_target_command): ... this.
6430         (initialize_targets): Adjust.
6431         * tracepoint.c (tvariables_info): Rename to ...
6432         (info_tvariables_command): ... this.
6433         (scope_info): Rename to ...
6434         (info_scope_command): ... this.
6435         (trace_dump_actions): Adjust.
6436         (_initialize_tracepoint): Adjust.
6437
6438 2017-08-22  Tom Tromey  <tom@tromey.com>
6439
6440         * breakpoint.h (install_breakpoint): Update.
6441         * breakpoint.c (add_solib_catchpoint): Update.
6442         (install_breakpoint): Change argument to a std::unique_ptr.
6443         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6444         (create_breakpoint_sal, create_breakpoint): Update.
6445         (watch_command_1, catch_exec_command_1)
6446         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6447         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6448         Return the breakpoint.
6449         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6450         (new_single_step_breakpoint): Update.
6451         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6452         std::unique_ptr.
6453         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6454         std::unique_ptr.
6455         * break-catch-sig.c (create_signal_catchpoint): Use
6456         std::unique_ptr.
6457         * ada-lang.c (create_ada_exception_catchpoint): Use
6458         std::unique_ptr.
6459
6460 2017-08-22  Tom Tromey  <tom@tromey.com>
6461
6462         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6463
6464 2017-08-22  Tom Tromey  <tom@tromey.com>
6465
6466         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6467         (lookup_partial_symbol): Update.
6468
6469 2017-08-22  Tom Tromey  <tom@tromey.com>
6470
6471         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6472         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6473         (find_and_open_source, symtab_to_fullname): Update.
6474         * psymtab.c (psymtab_to_fullname): Update.
6475
6476 2017-08-22  Tom Tromey  <tom@tromey.com>
6477
6478         * exec.c (exec_file_attach): Update.
6479         * linux-thread-db.c (try_thread_db_load): Update.
6480         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6481         * utils.c (gdb_realpath): Change return type.
6482         (gdb_realpath_keepfile): Update.
6483         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6484         (_initialize_utils): Register the new self test.
6485         * source.c (openp): Update.
6486         (find_and_open_source): Update.
6487         * nto-tdep.c (nto_find_and_open_solib): Update.
6488         * main.c (set_gdb_data_directory): Update.
6489         (captured_main_1): Update.
6490         * dwarf2read.c (dwarf2_get_dwz_file): Update
6491         (dw2_map_symbol_filenames): Update.
6492         * auto-load.c (auto_load_safe_path_vec_update): Update.
6493         (filename_is_in_auto_load_safe_path_vec): Change type of
6494         "filename_realp".
6495         (auto_load_objfile_script): Update.
6496         (file_is_auto_load_safe): Update.  Use std::string.
6497         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6498
6499 2017-08-22  Tom Tromey  <tom@tromey.com>
6500
6501         * utils.c (gdb_realpath_keepfile): Return a
6502         gdb::unique_xmalloc_ptr.
6503         * exec.c (exec_file_attach): Update.
6504         * utils.h (gdb_realpath_keepfile): Return a
6505         gdb::unique_xmalloc_ptr.
6506
6507 2017-08-22  Tom Tromey  <tom@tromey.com>
6508
6509         * compile/compile.c (compile_file_command): Use
6510         gdb::unique_xmalloc_ptr, std::string.
6511         * utils.c (gdb_abspath): Change return type.
6512         * source.c (openp): Update.
6513         * objfiles.c (allocate_objfile): Update.
6514         * main.c (set_gdb_data_directory): Update.
6515         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6516
6517 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6518
6519         * cli-cmds.c (list_commands): List actual code around more than
6520         one location.
6521
6522 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6523
6524         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6525
6526 2017-08-21  Pedro Alves  <palves@redhat.com>
6527
6528         PR gdb/19487
6529         * c-exp.y (variable production): Handle function aliases.
6530         * minsyms.c (msymbol_is_text): New function.
6531         * minsyms.h (msymbol_is_text): Declare.
6532         * symtab.c (find_function_alias_target): New function.
6533         * symtab.h (find_function_alias_target): Declare.
6534
6535 2017-08-21  Pedro Alves  <palves@redhat.com>
6536
6537         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6538         typedefs.
6539         * typeprint.c (whatis_exp): If handling "whatis", and expression
6540         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6541         typedefs here.
6542         * valops.c (value_cast): Save "to" type before resolving
6543         stubs/typedefs.  Use that type as resulting value's type.
6544
6545 2017-08-18  Tom Tromey  <tom@tromey.com>
6546             Pedro Alves  <palves@redhat.com>
6547
6548         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6549         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6550         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6551         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6552         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6553         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6554         (linux_get_siginfo_data): Add "thread" argument.  Use
6555         scoped_restore.
6556         * linux-nat.c (linux_child_follow_fork)
6557         (check_stopped_by_watchpoint): Use scoped_restore.
6558         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6559         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6560         (restore_inferior_ptid, save_inferior_ptid): Remove.
6561         * btrace.c (btrace_fetch): Use scoped_restore.
6562         * bsd-uthread.c (bsd_uthread_fetch_registers)
6563         (bsd_uthread_store_registers): Use scoped_restore.
6564         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6565         scoped_restore.
6566         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6567         (aix_thread_xfer_partial): Use scoped_restore.
6568         * inferior.h (save_inferior_ptid): Remove.
6569
6570 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6571
6572         PR tdep/21818
6573         * arm-tdep.c (gdb_print_insn_arm): Mark
6574         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6575
6576 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6577
6578         * NEWS: Mention GDBserver's new option "--selftest".
6579         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6580         * selftest.c: Move it to common/selftest.c.
6581         * selftest.h: Move it to common/selftest.h.
6582         * selftest-arch.c (reset): New function.
6583         (tests_with_arch): Call reset.
6584
6585 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6586
6587         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6588         instead of exception_fprintf and printf_filtered.
6589
6590 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6591
6592         * selftest.c (register_self_test): Rename it to
6593         selftests::register_test.
6594         (run_self_tests): selftest::run_tests.
6595         * selftest.h: Update declarations.
6596         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6597         selftests::register_test_foreach_arch.
6598         * selftest-arch.h: Update declaration.
6599         * aarch64-tdep.c: Update.
6600         * arm-tdep.c: Likewise.
6601         * disasm-selftests.c: Likewise.
6602         * dwarf2loc.c: Likewise.
6603         * dwarf2-frame.c: Likewise.
6604         * findvar.c: Likewise.
6605         * gdbarch-selftests.c: Likewise.
6606         * maint.c (maintenance_selftest): Likewise.
6607         * regcache.c: Likewise.
6608         * rust-exp.y: Likewise.
6609         * selftest-arch.c: Likewise.
6610         * unittests/environ-selftests.c: Likewise.
6611         * unittests/function-view-selftests.c: Likewise.
6612         * unittests/offset-type-selftests.c: Likewise.
6613         * unittests/optional-selftests.c: Likewise.
6614         * unittests/scoped_restore-selftests.c: Likewise.
6615         * utils-selftests.c: Likewise.
6616
6617 2017-08-17  Pedro Alves  <palves@redhat.com>
6618
6619         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6620         local.
6621
6622 2017-08-17  Pedro Alves  <palves@redhat.com>
6623
6624         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6625         field.
6626         (reset_die_in_process): Delete, replaced by ...
6627         (process_die_scope): ... this new class.  Make it responsible for
6628         freeing cu->line_header too.
6629         (process_die): Use process_die_scope.
6630         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6631         cu->line_header_die_owner.  Don't release the line header if it's
6632         owned by the CU.
6633         (setup_type_unit_groups): Make the CU/DIE own the line header.
6634         Don't release the line header here.
6635
6636 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6637
6638         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6639
6640 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6641
6642         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6643         Single-Key mode
6644
6645 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6646
6647         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6648         mode command list.
6649
6650 2017-08-15  Stafford Horne  <shorne@gmail.com>
6651
6652         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6653
6654 2017-08-15  Stafford Horne  <shorne@gmail.com>
6655
6656         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6657
6658 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6659
6660         PR gdb/21954
6661         * infcmd.c (unset_environment_command): Use the 'clear' method on
6662         the environment instead of resetting it.
6663
6664 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6665
6666         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6667         platforms.
6668
6669 2017-08-14  Tom Tromey  <tom@tromey.com>
6670
6671         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6672         (print_binary_chars): Likewise.
6673         (BITS_IN_BYTES): Remove.
6674
6675 2017-08-14  Tom Tromey  <tom@tromey.com>
6676
6677         PR gdb/21675
6678         * valprint.c (LOW_ZERO): Change value to 034.
6679         (print_octal_chars): Add static_asserts for octal constants.
6680         * printcmd.c (print_scalar_formatted): Add 'd' case.
6681
6682 2017-08-11  Tom Tromey  <tom@tromey.com>
6683
6684         * symfile.c (add_symbol_file_command): Use std::vector.
6685
6686 2017-08-14  Tom Tromey  <tom@tromey.com>
6687
6688         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6689         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6690         std::move.
6691         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6692
6693 2017-08-11  Pedro Alves  <palves@redhat.com>
6694
6695         * infrun.c (process_event_stop_test): Adjust
6696         function_name_is_marked_for_skip call.
6697         * skip.c: Include <list>.
6698         (skiplist_entry): Make it a class with private fields, and
6699         getters/setters.
6700         (skiplist_entry_chain): Delete.
6701         (skiplist_entries): New.
6702         (skiplist_entry_count): Delete.
6703         (highest_skiplist_entry_num): New.
6704         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6705         (add_skiplist_entry): Delete.
6706         (skiplist_entry::skiplist_entry): New.
6707         (skiplist_entry::add_entry): New.
6708         (skip_file_command, skip_function): Adjust.
6709         (compile_skip_regexp): Delete.
6710         (skip_command): Don't compile regexp here.  Adjust to use
6711         skiplist_entry::add_entry.
6712         (skip_info): Adjust to use range-for and getters.
6713         (skip_enable_command, skip_disable_command): Adjust to use
6714         range-for and setters.
6715         (skip_delete_command): Adjust to use std::list.
6716         (add_skiplist_entry): Delete.
6717         (skip_file_p): Delete, refactored as ...
6718         (skiplist_entry::do_skip_file_p): ... this new method.
6719         (skip_gfile_p): Delete, refactored as ...
6720         (skiplist_entry::do_gskip_file_p): ... this new method.
6721         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6722         (skiplist_entry::skip_function_p): ... this new method.
6723         (function_name_is_marked_for_skip): Now returns bool, and takes
6724         the function sal by const reference.  Adjust to use range-for and
6725         skiplist_entry methods.
6726         (_initialize_step_skip): Remove references to
6727         skiplist_entry_chain, skiplist_entry_count.
6728         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6729         takes the function sal by const reference.
6730
6731 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6732
6733         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6734         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6735         (dwarf2_frame_cache):
6736         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6737         RETURN_MASK_ALL and set *this_case to NULL.
6738         * frame-unwind.h: Update comments.
6739
6740 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6741
6742         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6743         (dwarf2_frame_state_copy_regs): Remove.
6744         (dwarf2_frame_state_free_regs): Remove.
6745         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6746         (dwarf2_restore_rule): Call method .alloc_regs instead of
6747         dwarf2_frame_state_alloc_regs.
6748         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6749         constructor.  Call std::move.
6750         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6751         (dwarf2_frame_cache): Likewise.
6752
6753         [GDB_SELF_TEST]: Include selftest.h and
6754         selftest-arch.h.
6755         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6756         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6757         execute_cfa_program_test.
6758
6759         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6760         copy ctor, assignment operator, move assignment.
6761         <alloc_regs>: New method.
6762         <swap>: New method.
6763         (struct dwarf2_frame_state): Delete dtor.
6764         (dwarf2_frame_state_alloc_regs): Remove declaration.
6765         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6766         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6767
6768 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6769
6770         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6771         (dwarf2_frame_state::dwarf2_frame_state): New.
6772         (dwarf2_frame_state::~dwarf2_frame_state): New.
6773         (dwarf2_fetch_cfa_info): Update.
6774         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6775         rather than a pointer.  Update code.
6776         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6777         dtor.
6778         <data_align, code_align, retaddr_column>: Change them to const.
6779         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6780         to bool.
6781
6782 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6783
6784         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6785         <loc.exp>: New field.
6786         * dwarf2-frame.c (execute_cfa_program): Update.
6787         (dwarf2_frame_prev_register): Update.
6788
6789 2017-08-10  Pedro Alves  <palves@redhat.com>
6790
6791         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6792
6793 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6794
6795         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6796         (fbsd_pending_children): Use std::list.
6797         (fbsd_remember_child): Likewise.
6798         (fbsd_is_child_pending): Likewise.
6799         (fbsd_pending_vfork_done): Use std::forward_list.
6800         (fbsd_add_vfork_done): Likewise.
6801         (fbsd_is_vfork_done_pending): Likewise.
6802         (fbsd_next_vfork_done): Likewise.
6803
6804 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6805
6806         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6807         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6808         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6809         for `mapfilename'.
6810         (fbsd_xfer_partial): Use gdb::byte_vector.
6811         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6812
6813 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6814
6815         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6816         "filestuff.h".
6817         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6818
6819 2017-08-09  Tom Tromey  <tom@tromey.com>
6820
6821         * skip.c (skiplist_entry): New constructor.
6822         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6823         (skiplist_entry::file_is_glob): Now bool.
6824         (skiplist_entry::file, skiplist_entry::function): Now
6825         std::string.
6826         (make_skip_entry): Return a unique_ptr.  Use new.
6827         (free_skiplist_entry, free_skiplist_entry_cleanup)
6828         (make_free_skiplist_entry_cleanup): Remove.
6829         (skip_command, skip_disable_command, add_skiplist_entry)
6830         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6831         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6832         (function_name_is_marked_for_skip): Update.
6833         (skip_delete_command): Update.  Use delete.
6834
6835 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6836
6837         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6838         (aarch64_linux_core_read_description): New function.
6839         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6840
6841 2017-08-09  Pedro Alves  <palves@redhat.com>
6842
6843         * cp-name-parser.y (cp_comp_to_string): Return a
6844         gdb::unique_xmalloc_ptr<char>.
6845         * cp-support.c (replace_typedefs_qualified_name)
6846         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6847         (cp_canonicalize_string_full): Use op= instead of explicit
6848         convertion.
6849         (cp_class_name_from_physname, method_name_from_physname)
6850         (cp_func_name, cp_remove_params): Adjust to use
6851         gdb::unique_xmalloc_ptr<char>.
6852         * cp-support.h (cp_comp_to_string): Return a
6853         gdb::unique_xmalloc_ptr<char>.
6854         * python/py-type.c (typy_lookup_type): Adjust to use
6855         gdb::unique_xmalloc_ptr<char>.
6856
6857 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6858
6859         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6860
6861 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6862             Yao Qi  <yao.qi@linaro.org>
6863
6864         * cp-support.c (cp_canonicalize_string_full): Use
6865         gdb::unique_xmalloc_ptr<char>.
6866         (cp_canonicalize_string): Likewise.
6867
6868 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6869
6870         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6871         * regformats/i386/amd64-avx-avx512.dat: Remove.
6872         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6873         * regformats/i386/amd64-avx-mpx.dat:Remove.
6874         * regformats/i386/amd64-avx.dat: Remove.
6875         * regformats/i386/amd64-mpx.dat: Remove.
6876         * regformats/i386/i386-avx-avx512.dat: Remove.
6877         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6878         * regformats/i386/i386-avx-mpx.dat: Remove.
6879         * regformats/i386/i386-mmx.dat: Remove.
6880         * regformats/i386/i386-mpx.dat: Remove.
6881
6882 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6883
6884         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6885         * amd64-tdep.c: Don't include features/i386/x32*.c.
6886         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6887         functions.
6888         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6889         and i386/x32-avx-avx512.
6890         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6891         and i386/x32.xml.
6892         * features/i386/x32-avx-avx512.c: Removed.
6893         * features/i386/x32-avx-avx512.xml: Removed.
6894         * features/i386/x32-avx.c: Removed.
6895         * features/i386/x32-avx.xml: Removed.
6896         * features/i386/x32.c: Removed.
6897         * features/i386/x32.xml: Removed.
6898         * regformats/i386/x32-avx-avx512.dat: Removed.
6899         * regformats/i386/x32-avx.dat: Removed.
6900         * regformats/i386/x32.dat: Removed.
6901
6902 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6903
6904         PR breakpoints/21886
6905         * mem-break.c (default_memory_insert_breakpoint): Use
6906         `->placed_address' rather than `->reqstd_address' for the
6907         breakpoint location.
6908
6909 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6910
6911         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6912         assertions.
6913
6914 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6915
6916         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6917         a union of `tdep_info', `tdesc_data' and `id'.
6918         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6919         rather than `info.tdep_info'.
6920         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6921         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6922         * i386-tdep.c (i386_gdbarch_init): Likewise.
6923         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6924         * mips-tdep.c (mips_gdbarch_init): Likewise.
6925         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6926         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6927         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6928         `info.tdep_info'.
6929         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6930         `info.tdep_info'.
6931         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6932         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6933         `info.tdep_info'.
6934         * spu-tdep.c (spu_gdbarch_init): Likewise.
6935         * gdbarch.h: Regenerate.
6936
6937 2017-08-07  Leszek Swirski  <leszeks@google.com>
6938
6939         PR symtab/20899
6940         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6941
6942 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6943
6944         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6945         (gdbsim_open): Rename gdb_argv args object to argv.
6946
6947 2017-08-05  Tom Tromey  <tom@tromey.com>
6948
6949         * compile/compile-object-load.c (compile_object_load): Use
6950         gdb::unique_xmalloc_ptr.
6951         * cli/cli-dump.c (scan_filename): Rename from
6952         scan_filename_with_cleanup.  Change return type.
6953         (scan_expression): Rename from scan_expression_with_cleanup.
6954         Change return type.
6955         (dump_memory_to_file, dump_value_to_file, restore_command):
6956         Use gdb::unique_xmalloc_ptr.  Update.
6957         * cli/cli-cmds.c (find_and_open_script): Use
6958         gdb::unique_xmalloc_ptr.
6959         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6960         * symmisc.c (maintenance_print_symbols)
6961         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6962         * symfile.c (symfile_bfd_open, generic_load)
6963         (add_symbol_file_command, remove_symbol_file_command): Use
6964         gdb::unique_xmalloc_ptr.
6965         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6966         * psymtab.c (maintenance_print_psymbols): Use
6967         gdb::unique_xmalloc_ptr.
6968         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6969         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6970         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6971         (reload_shared_libraries_1): Likewise.
6972
6973 2017-08-05  Tom Tromey  <tom@tromey.com>
6974
6975         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6976         (rust_op_vector, rust_set_vector): New typedefs.
6977         (current_parser): New global.
6978         (work_obstack): Change to pointer type.  Update all users.
6979         (rust_ast, pstate): Remove globals.
6980         (struct rust_parser): New.
6981         (%union) <params, field_inits>: Change type.
6982         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6983         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6984         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6985         (convert_params_to_types, convert_params_to_expression): Change
6986         type of "params".
6987         (ast_string): Change type of "fields".
6988         (rust_parse): Make a rust_parser.  Remove cleanups.
6989         (rust_lex_tests): Make and install an auto_obstack.
6990
6991 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6992
6993         * configure.srv (ipa_x32_linux_regobj): New.
6994         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6995         instead of X86_TDESC_AVX512.
6996         (initialize_low_tracepoint): Call
6997         init_registers_x32_avx_avx512_linux.
6998
6999 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7000
7001         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7002
7003 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7004
7005         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7006
7007 2017-08-03  Tom Tromey  <tom@tromey.com>
7008
7009         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7010         Remove.
7011         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7012
7013 2017-08-03  Tom Tromey  <tom@tromey.com>
7014
7015         * python/py-param.c (compute_enum_values): Use gdb_argv.
7016
7017 2017-08-03  Tom Tromey  <tom@tromey.com>
7018
7019         * utils.h (struct gdb_argv_deleter): New.
7020         (gdb_argv): New class.
7021         * utils.c (gdb_argv::reset): New method.
7022         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7023         * tracefile.c (tsave_command): Use gdb_argv.
7024         * top.c (new_ui_command): Use gdb_argv.
7025         * symmisc.c (maintenance_print_symbols)
7026         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7027         * symfile.c (symbol_file_command, generic_load)
7028         (remove_symbol_file_command): Use gdb_argv.
7029         * stack.c (backtrace_command): Use gdb_argv.
7030         * source.c (add_path, show_substitute_path_command)
7031         (unset_substitute_path_command, set_substitute_path_command):
7032         Use gdb_argv.
7033         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7034         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7035         * remote.c (extended_remote_run, remote_put_command)
7036         (remote_get_command, remote_delete_command): Use gdb_argv.
7037         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7038         (gdbsim_open): Use gdb_argv.
7039         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7040         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7041         * procfs.c (procfs_info_proc): Use gdb_argv.
7042         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7043         * infrun.c (handle_command): Use gdb_argv.
7044         * inferior.c (add_inferior_command, clone_inferior_command):
7045         Use gdb_argv.
7046         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7047         * exec.c (exec_file_command): Use gdb_argv.
7048         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7049         * compile/compile.c (build_argc_argv): Use gdb_argv.
7050
7051 2017-08-03  Tom Tromey  <tom@tromey.com>
7052
7053         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7054
7055 2017-08-03  Tom Tromey  <tom@tromey.com>
7056
7057         * python/python.c (compute_python_string): Return std::string.
7058         (gdbpy_eval_from_control_command): Update.
7059         (do_start_initialization): Use std::string.
7060         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7061         xstrprintf.
7062         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7063         xstrprintf.
7064
7065 2017-08-03  Tom Tromey  <tom@tromey.com>
7066
7067         * top.h (do_restore_instream_cleanup): Remove.
7068         * top.c (do_restore_instream_cleanup): Remove.
7069         (read_command_file): Use scoped_restore.
7070         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7071
7072 2017-08-03  Tom Tromey  <tom@tromey.com>
7073
7074         * cli/cli-script.c (execute_user_command)
7075         (execute_control_command): Use scoped_restore.
7076
7077 2017-08-03  Tom Tromey  <tom@tromey.com>
7078
7079         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7080         (execute_user_command): Remove user_call_depth; use
7081         user_args_stack's size instead.
7082
7083 2017-08-03  Tom Tromey  <tom@tromey.com>
7084
7085         * top.h (in_user_command): Remove.
7086         * top.c (in_user_command): Remove.
7087         * cli/cli-script.c (do_restore_user_call_depth)
7088         (execute_user_command): Update.
7089
7090 2017-08-03  Tom Tromey  <tom@tromey.com>
7091
7092         * valops.c (search_struct_method): Use gdb::byte_vector.
7093         * valarith.c (value_concat): Use std::vector.
7094         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7095         (simple_search_memory): Likewise.
7096         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7097         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7098         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7099         * elfread.c (elf_rel_plt_read): Use std::string.
7100         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7101         * cli/cli-dump.c (restore_section_callback): Use
7102         gdb::byte_vector.
7103
7104 2017-08-03  Tom Tromey  <tom@tromey.com>
7105
7106         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7107
7108 2017-08-03  Tom Tromey  <tom@tromey.com>
7109
7110         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7111         (tui_register_format): Use scoped_restore.
7112
7113 2017-08-03  Tom Tromey  <tom@tromey.com>
7114
7115         * reverse.c (exec_direction_default): Remove.
7116         (exec_reverse_once): Use scoped_restore.
7117         * remote.c (restore_remote_timeout): Remove.
7118         (remote_flash_erase, remote_flash_write, remote_flash_done)
7119         (readchar, remote_serial_write): Use scoped_restore.
7120         * cli/cli-script.c (struct source_cleanup_lines_args)
7121         (source_cleanup_lines): Remove.
7122         (script_from_file): Use scoped_restore.
7123         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7124         (source_command): Use scoped_restore.
7125
7126 2017-08-03  Tom Tromey  <tom@tromey.com>
7127
7128         * utils.h (make_cleanup_free_so): Remove.
7129         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7130         * solist.h (struct so_deleter): New.
7131         (so_list_up): New typedef.
7132         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7133
7134 2017-08-03  Tom Tromey  <tom@tromey.com>
7135
7136         * utils.h (make_cleanup_restore_current_language): Remove.
7137         * utils.c (do_restore_current_language)
7138         (make_cleanup_restore_current_language): Remove.
7139         * parse.c (parse_exp_in_context_1)
7140         (parse_expression_with_language): Use
7141         scoped_restore_current_language.
7142         * mi/mi-main.c (mi_cmd_execute): Use
7143         scoped_restore_current_language.
7144         * language.h (scoped_restore_current_language): New class.
7145
7146 2017-08-03  Tom Tromey  <tom@tromey.com>
7147
7148         * compile/compile.c (cleanup_unlink_file): Remove.
7149         (compile_to_object): Use gdb::unlinker.
7150         (eval_compile_command): Likewise.
7151
7152 2017-08-03  Tom Tromey  <tom@tromey.com>
7153
7154         * utils.h (make_cleanup_fclose): Remove.
7155         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7156
7157 2017-08-03  Tom Tromey  <tom@tromey.com>
7158
7159         * top.c (open_terminal_stream): Return gdb_file_up.
7160         (new_ui_command): Update.
7161
7162 2017-08-03  Tom Tromey  <tom@tromey.com>
7163
7164         * source.c (print_source_lines_base, forward_search_command)
7165         (reverse_search_command): Use gdb_file_up.
7166
7167 2017-08-03  Tom Tromey  <tom@tromey.com>
7168
7169         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7170
7171 2017-08-03  Tom Tromey  <tom@tromey.com>
7172
7173         * cli/cli-cmds.c (find_and_open_script): Change return type.
7174         Remove "streamp" and "full_path" parameters.
7175         (source_script_with_search): Update.
7176         * auto-load.c (source_script_file): Update.
7177         * cli/cli-cmds.h (find_and_open_script): Change type.
7178         (open_script): New struct.
7179
7180 2017-08-03  Tom Tromey  <tom@tromey.com>
7181
7182         * xml-support.c (xml_fetch_content_from_file): Update.
7183         * ui-file.c (stdio_file::open): Update.
7184         * tracefile-tfile.c (tfile_start): Update.
7185         * remote.c (remote_file_put, remote_file_get): Update.
7186         * nat/linux-procfs.c (linux_proc_get_int)
7187         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7188         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7189         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7190         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7191         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7192         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7193         * linux-nat.c (linux_proc_pending_signals): Update.
7194         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7195         (file_closer): Remove.
7196         * compile/compile.c (compile_to_object): Update.
7197         * common/filestuff.h (struct gdb_file_deleter): New.
7198         (gdb_file_up): New typedef.
7199         (gdb_fopen_cloexec): Change return type.
7200         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7201         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7202         (dump_binary_file, restore_binary_file): Update.
7203         * auto-load.c (auto_load_objfile_script_1): Update.
7204
7205 2017-08-03  Tom Tromey  <tom@tromey.com>
7206
7207         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7208         (info_static_tracepoint_markers_command): Likewise.
7209         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7210         * skip.c (skip_info): Use ui_out_emit_table.
7211         * progspace.c (print_program_space): Use ui_out_emit_table.
7212         * osdata.c (info_osdata): Use ui_out_emit_table.
7213         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7214         ui_out_emit_table.
7215         * linux-thread-db.c (info_auto_load_libthread_db): Use
7216         ui_out_emit_table.
7217         * inferior.c (print_inferior): Use ui_out_emit_table.
7218         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7219         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7220         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7221         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7222         * ui-out.h (class ui_out_emit_table): New.
7223
7224 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7225
7226         * mips-tdep.c (mips_fpu_type_str): New function.
7227         (mips_dump_tdep): Call it.
7228
7229 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7230
7231         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7232         `->mips_fpu_type'.
7233
7234 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7235
7236         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7237
7238 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7239
7240         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7241
7242 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7243
7244         * cli/cli-cmds.c (maintenancechecklist): New variable.
7245         * gdbcmd.h (maintenancechecklist): Declare it.
7246         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7247         Call i386_linux_read_description with different masks.
7248         * maint.c (maintenance_check_command): New function.
7249         (_initialize_maint_cmds): Call add_prefix_cmd.
7250         * target-descriptions.c (tdesc_reg): override operator != and ==.
7251         (tdesc_type): Likewise.
7252         (tdesc_feature): Likewise.
7253         (target_desc): Likewise.
7254         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7255         (maintenance_check_xml_descriptions): New function.
7256         (_initialize_target_descriptions) Add command "xml-descriptions".
7257         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7258
7259 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7260
7261         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7262         Include features/i386/32bit-*.c.
7263         (i386_linux_read_description): Generate target description if it
7264         doesn't exist.
7265         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7266         functions.
7267         * features/i386/32bit-linux.c: Re-generated.
7268         * features/i386/32bit-sse.c: Likewise.
7269         * target-descriptions.c (print_c_feature::visit): Print code to
7270         set register number if needed.
7271         (print_c_feature) <m_next_regnum>: New field.
7272
7273 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7274
7275         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7276         (FEATURE_XMLFILES): New.
7277         (FEATURE_CFILES): New.
7278         New rules.
7279         (clean-cfiles): Remove generated c files.
7280         * features/i386/32bit-avx.c: Generated.
7281         * features/i386/32bit-avx512.c: Generated.
7282         * features/i386/32bit-core.c: Generated.
7283         * features/i386/32bit-linux.c: Generated.
7284         * features/i386/32bit-mpx.c: Generated.
7285         * features/i386/32bit-pkeys.c: Generated.
7286         * features/i386/32bit-sse.c: Generated.
7287         * target-descriptions.c: Include algorithm.
7288         (tdesc_element_visitor): Add method visit_end.
7289         (print_c_tdesc): Implement visit_end.
7290         (print_c_tdesc:: m_filename_after_features): Move it to
7291         protected.
7292         (print_c_feature): New class.
7293         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7294         name starts with "i386/32bit-".
7295
7296 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7297
7298         * target-descriptions.c (tdesc_element_visitor): New class.
7299         (tdesc_element): New class.
7300         (tdesc_reg): Inherit from tdesc_element.
7301         (tdesc_reg::accept): New function.
7302         (tdesc_type): Inherit from tdesc_element.
7303         (tdesc_type::accept): New function.
7304         (tdesc_feature): Inherit from tdesc_element.
7305         (tdesc_feature::accept): New function.
7306         (target_desc): Inherit from tdesc_element.
7307         (target_desc::target_desc): New.
7308         (target_desc::~target_desc): New.
7309         (target_desc::accept): New.
7310         (allocate_target_description): Use new.
7311         (free_target_description): Use delete.
7312         (print_c_tdesc): New class.
7313         (maint_print_c_tdesc_cmd): Adjust.
7314
7315         * features/aarch64.c: Re-generated.
7316         * features/arc-arcompact.c: Re-generated.
7317         * features/arc-v2.c: Re-generated.
7318         * features/arm/arm-with-iwmmxt.c: Re-generated.
7319         * features/arm/arm-with-m.c: Re-generated.
7320         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7321         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7322         * features/arm/arm-with-neon.c: Re-generated.
7323         * features/arm/arm-with-vfpv2.c: Re-generated.
7324         * features/arm/arm-with-vfpv3.c: Re-generated.
7325         * features/i386/amd64-avx-avx512.c: Re-generated.
7326         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7327         * features/i386/amd64-avx.c: Re-generated.
7328         * features/i386/amd64-avx-linux.c: Re-generated.
7329         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7330         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7331         * features/i386/amd64-avx-mpx.c: Re-generated.
7332         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7333         * features/i386/amd64.c: Re-generated.
7334         * features/i386/amd64-linux.c: Re-generated.
7335         * features/i386/amd64-mpx.c: Re-generated.
7336         * features/i386/amd64-mpx-linux.c: Re-generated.
7337         * features/i386/i386-avx-avx512.c: Re-generated.
7338         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7339         * features/i386/i386-avx.c: Re-generated.
7340         * features/i386/i386-avx-linux.c: Re-generated.
7341         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7342         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7343         * features/i386/i386-avx-mpx.c: Re-generated.
7344         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7345         * features/i386/i386.c: Re-generated.
7346         * features/i386/i386-linux.c: Re-generated.
7347         * features/i386/i386-mmx.c: Re-generated.
7348         * features/i386/i386-mmx-linux.c: Re-generated.
7349         * features/i386/i386-mpx.c: Re-generated.
7350         * features/i386/i386-mpx-linux.c: Re-generated.
7351         * features/i386/x32-avx-avx512.c: Re-generated.
7352         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7353         * features/i386/x32-avx.c: Re-generated.
7354         * features/i386/x32-avx-linux.c: Re-generated.
7355         * features/i386/x32.c: Re-generated.
7356         * features/i386/x32-linux.c: Re-generated.
7357         * features/microblaze.c: Re-generated.
7358         * features/microblaze-with-stack-protect.c: Re-generated.
7359         * features/mips64-dsp-linux.c: Re-generated.
7360         * features/mips64-linux.c: Re-generated.
7361         * features/mips-dsp-linux.c: Re-generated.
7362         * features/mips-linux.c: Re-generated.
7363         * features/nds32.c: Re-generated.
7364         * features/nios2.c: Re-generated.
7365         * features/nios2-linux.c: Re-generated.
7366         * features/rs6000/powerpc-32.c: Re-generated.
7367         * features/rs6000/powerpc-32l.c: Re-generated.
7368         * features/rs6000/powerpc-403.c: Re-generated.
7369         * features/rs6000/powerpc-403gc.c : Re-generated.
7370         * features/rs6000/powerpc-405.c: Re-generated.
7371         * features/rs6000/powerpc-505.c: Re-generated.
7372         * features/rs6000/powerpc-601.c: Re-generated.
7373         * features/rs6000/powerpc-602.c: Re-generated.
7374         * features/rs6000/powerpc-603.c: Re-generated.
7375         * features/rs6000/powerpc-604.c: Re-generated.
7376         * features/rs6000/powerpc-64.c: Re-generated.
7377         * features/rs6000/powerpc-64l.c: Re-generated.
7378         * features/rs6000/powerpc-7400.c: Re-generated.
7379         * features/rs6000/powerpc-750.c: Re-generated.
7380         * features/rs6000/powerpc-860.c: Re-generated.
7381         * features/rs6000/powerpc-altivec32.c: Re-generated.
7382         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7383         * features/rs6000/powerpc-altivec64.c: Re-generated.
7384         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7385         * features/rs6000/powerpc-cell32l.c: Re-generated.
7386         * features/rs6000/powerpc-cell64l.c: Re-generated.
7387         * features/rs6000/powerpc-e500.c: Re-generated.
7388         * features/rs6000/powerpc-e500l.c: Re-generated.
7389         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7390         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7391         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7392         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7393         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7394         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7395         * features/rs6000/powerpc-vsx32.c: Re-generated.
7396         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7397         * features/rs6000/powerpc-vsx64.c: Re-generated.
7398         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7399         * features/rs6000/rs6000.c: Re-generated.
7400         * features/s390-linux32.c: Re-generated.
7401         * features/s390-linux32v1.c: Re-generated.
7402         * features/s390-linux32v2.c: Re-generated.
7403         * features/s390-linux64.c: Re-generated.
7404         * features/s390-linux64v1.c: Re-generated.
7405         * features/s390-linux64v2.c: Re-generated.
7406         * features/s390-te-linux64.c: Re-generated.
7407         * features/s390-tevx-linux64.c: Re-generated.
7408         * features/s390-vx-linux64.c: Re-generated.
7409         * features/s390x-linux64.c: Re-generated.
7410         * features/s390x-linux64v1.c: Re-generated.
7411         * features/s390x-linux64v2.c: Re-generated.
7412         * features/s390x-te-linux64.c: Re-generated.
7413         * features/s390x-tevx-linux64.c: Re-generated.
7414         * features/s390x-vx-linux64.c: Re-generated.
7415         * features/sparc/sparc32-solaris.c: Re-generated.
7416         * features/sparc/sparc64-solaris.c: Re-generated.
7417         * features/tic6x-c62x.c: Re-generated.
7418         * features/tic6x-c62x-linux.c: Re-generated.
7419         * features/tic6x-c64x.c: Re-generated.
7420         * features/tic6x-c64x-linux.c: Re-generated.
7421         * features/tic6x-c64xp.c: Re-generated.
7422         * features/tic6x-c64xp-linux.c: Re-generated.
7423
7424 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7425
7426         * i386-linux-tdep.c (i386_linux_read_description): New function.
7427         (i386_linux_core_read_description): Call
7428         i386_linux_read_description.
7429         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7430         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7431         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7432         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7433         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7434         * x86-linux-nat.c (x86_linux_read_description): Call
7435         i386_linux_read_description.
7436
7437 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7438
7439         * NEWS: Mention it.
7440         * features/Makefile (%.c: %.xml): Pass the xml file name to
7441         command "maint print c-tdesc".
7442         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7443         name from 'arg'.
7444
7445 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7446
7447         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7448         in-class initialization.
7449         (tdesc_create_feature): Call new instead of XCNEW.
7450         (free_target_description): Ue delete.
7451
7452 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7453
7454         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7455
7456 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7457
7458         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7459         constant.
7460         (amd64_x32_init_abi): Likewise.
7461         * amd64-tdep.h (amd64_init_abi): Update declaration.
7462         (amd64_x32_init_abi): Likewise.
7463
7464 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7465
7466         PR tdep/21717
7467         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7468         condition for FPSCR.
7469         (arm_linux_store_inferior_registers): Likewise.
7470
7471 2017-07-22  Tom Tromey  <tom@tromey.com>
7472
7473         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7474         <syscalls_counts>: Now a std::vector.
7475         (get_catch_syscall_inferior_data): Use "new".
7476         (catch_syscall_inferior_data_cleanup): Use "delete".
7477         (insert_catch_syscall, remove_catch_syscall)
7478         (clear_syscall_counts): Update.
7479
7480 2017-07-22  Tom Tromey  <tom@tromey.com>
7481
7482         * break-catch-syscall.c (syscall_catchpoint)
7483         <syscalls_to_be_caught>: Now a std::vector<int>
7484         (~syscall_catchpoint): Remove.
7485         (insert_catch_syscall, remove_catch_syscall)
7486         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7487         (print_mention_catch_syscall, print_recreate_catch_syscall):
7488         Update.
7489         (create_syscall_event_catchpoint): Change type of "filter"
7490         parameter.
7491         (catch_syscall_split_args): Return a std::vector.
7492         (catch_syscall_command_1, catching_syscall_number_1): Update.
7493
7494 2017-07-22  Tom Tromey  <tom@tromey.com>
7495
7496         * break-catch-throw.c (struct exception_catchpoint)
7497         <exception_rx>: Now a std::string.
7498         (~exception_catchpoint): Remove.
7499         (print_one_detail_exception_catchpoint): Update.
7500         (handle_gnu_v3_exceptions): Change type of except_rx.
7501         (extract_exception_regexp): Return a std::string.
7502         (catch_exception_command_1): Update.
7503
7504 2017-07-22  Tom Tromey  <tom@tromey.com>
7505
7506         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7507         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7508         std::vector.
7509         <catch_all>: Now a bool.
7510         (~signal_catchpoint): Remove.
7511         (signal_catchpoint_insert_location)
7512         (signal_catchpoint_remove_location)
7513         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7514         (signal_catchpoint_print_mention)
7515         (signal_catchpoint_print_recreate)
7516         (signal_catchpoint_explains_signal): Update.
7517         (create_signal_catchpoint): Change type of "filter" and
7518         "catch_all".
7519         (catch_signal_split_args): Return a std::vector.  Change type of
7520         "catch_all".
7521         (catch_signal_command): Update.
7522
7523 2017-07-20  Pedro Alves  <palves@redhat.com>
7524
7525         * ada-lang.c (ada_language_defn): Make extern.
7526         (_initialize_ada_language): Remove add_language call.
7527         * c-lang.c (c_language_defn, cplus_language_defn)
7528         (asm_language_defn, minimal_language_defn): Make extern.
7529         (_initialize_c_language): Delete.
7530         * completer.c (compare_cstrings): Delete, moved to utils.h.
7531         * d-lang.c (d_language_defn): Make extern.
7532         (_initialize_d_language): Remove add_language calls.
7533         * defs.h (enum language): Add comment.
7534         * f-lang.c (f_language_defn): Make extern.
7535         (_initialize_f_language): Remove add_language call.
7536         * go-lang.c (go_language_defn): Make extern.
7537         (_initialize_go_language): Remove add_language call.
7538         * language.c: Include <algorithm>.
7539         (languages): Redefine as const array.
7540         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7541         (set_language_command): Handle "local".  Use for-range loop.
7542         (set_language): Remove loop.
7543         (language_enum): Rewrite.
7544         (language_def, language_str): Remove loops.
7545         (add_language): Delete.
7546         (add_set_language_command): New, based on add_languages.
7547         (skip_language_trampoline): Adjust.
7548         (local_language_defn): Delete.
7549         (language_gdbarch_post_init): Adjust.
7550         (_initialize_language): Remove add_language calls.  Call
7551         add_set_language_command.
7552         * language.h (add_language): Delete.
7553         (auto_language_defn)
7554         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7555         (asm_language_defn, c_language_defn, cplus_language_defn)
7556         (d_language_defn, f_language_defn, go_language_defn)
7557         (m2_language_defn, objc_language_defn, opencl_language_defn)
7558         (pascal_language_defn, rust_language_defn): Declare.
7559         * m2-lang.c (m2_language_defn): Make extern.
7560         (_initialize_m2_language): Remove add_language call.
7561         * objc-lang.c (objc_language_defn): Make extern.
7562         (_initialize_objc_language): Remove add_language call.
7563         * opencl-lang.c (opencl_language_defn): Make extern.
7564         (_initialize_opencl_language): Remove add_language call.
7565         * p-lang.c (pascal_language_defn): Make extern.
7566         (_initialize_pascal_language): Delete.
7567         * rust-lang.c (rust_language_defn): Make extern.
7568         (_initialize_rust_language): Delete.
7569         * utils.h (compare_cstrings): New static inline function.
7570
7571 2017-07-20  Pedro Alves  <palves@redhat.com>
7572
7573         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7574         (get_var_value): Constify parameters.
7575         (get_int_var_value): Change prototype.
7576         (to_fixed_range_type): Adjust.
7577         * ada-lang.h (get_int_var_value): Change prototype.
7578
7579 2017-07-20  Pedro Alves  <palves@redhat.com>
7580
7581         * dwarf2read.c (dw2_lookup_symbol): Use
7582         SYMBOL_MATCHES_SEARCH_NAME.
7583         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7584
7585 2017-07-20  Pedro Alves  <palves@redhat.com>
7586
7587         * block.c (block_iter_name_step, block_iter_name_first)
7588         (block_iter_name_next): Delete.
7589         (block_lookup_symbol_primary): Adjust to use
7590         dict_iter_match_first/dict_iter_match_next.
7591         * block.h (block_iter_name_first, block_iter_name_next): Delete
7592         declarations.
7593         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7594         dict_iter_match_first/dict_iter_match_next.
7595
7596 2017-07-20  Pedro Alves  <palves@redhat.com>
7597
7598         * cp-support.c (cp_find_first_component_aux): Add missing case for
7599         end of string.
7600
7601 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7602
7603         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7604         of dwo_cu's dwo_file.
7605
7606 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7607
7608         * remote.c (store_registers_using_G): Remove one line comment.
7609
7610 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7611
7612         * regcache.c (regcache_cpy): Simplify it.
7613         (regcache::cpy_no_passthrough): Remove it.
7614         * regcache.h (cpy_no_passthrough): Remove it.
7615         (regcache_dup, regcache_cpy): Update comments.
7616
7617 2017-07-18  Pedro Alves  <palves@redhat.com>
7618
7619         * remote-sim.c (sim_command_completer): Adjust to work with a
7620         completion_tracker instead of a VEC.
7621
7622 2017-07-17  Pedro Alves  <palves@redhat.com>
7623
7624         * completer.c (complete_source_filenames): New function.
7625         (complete_address_and_linespec_locations): New function.
7626         (location_completer): Use complete_address_and_linespec_locations.
7627         (completion_tracker::build_completion_result): Honor the tracker's
7628         request to suppress append.
7629         * completer.h (completion_tracker::suppress_append_ws)
7630         (completion_tracker::set_suppress_append_ws): New methods.
7631         (completion_tracker::m_suppress_append_ws): New field.
7632         (complete_source_filenames): New declaration.
7633         * linespec.c (linespec_complete_what): New.
7634         (struct ls_parser) <complete_what, completion_word,
7635         completion_quote_char, completion_quote_end, completion_tracker>:
7636         New fields.
7637         (string_find_incomplete_keyword_at_end): New.
7638         (linespec_lexer_lex_string): Record quote char.  If in completion
7639         mode, don't throw.
7640         (linespec_lexer_consume_token): Advance the completion word point.
7641         (linespec_lexer_peek_token): Save/restore completion info.
7642         (save_stream_and_consume_token): New.
7643         (set_completion_after_number): New.
7644         (linespec_parse_basic): Set what to complete next depending on
7645         token.  Handle function and label completions specially.
7646         (parse_linespec): Disable objc shortcut in completion mode.  Set
7647         what to complete next depending on token type.  Skip keyword if in
7648         completion mode.
7649         (complete_linespec_component, linespec_complete): New.
7650         * linespec.h (linespec_complete): Declare.
7651
7652 2017-07-17  Pedro Alves  <palves@redhat.com>
7653
7654         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7655         Handle 'operator<' / 'operator<<'.
7656
7657 2017-07-17  Pedro Alves  <palves@redhat.com>
7658
7659         * completer.c (collect_explicit_location_matches): Handle
7660         MATCH_LABEL.
7661         (convert_explicit_location_to_linespec): New, factored out from
7662         ...
7663         (convert_explicit_location_to_sals): ... this.
7664         (complete_label): New.
7665         (linespec_complete_label, find_label_symbols_in_block): New.
7666         (find_label_symbols): Add completion_mode parameter and adjust to
7667         call find_label_symbols_in_block.
7668         * linespec.h (linespec_complete_label): Declare.
7669
7670 2017-07-17  Pedro Alves  <palves@redhat.com>
7671
7672         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7673         complete_symbol_mode parameter.
7674         * cli/cli-cmds.c (complete_command): Get the completion result out
7675         of the handle_brkchars tracker if used a custom word point.
7676         * completer.c: Include "linespec.h".
7677         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7678         (advance_to_expression_complete_word_point): New.
7679         (completion_tracker::completes_to_completion_word): New.
7680         (complete_files_symbols): Pass down
7681         complete_symbol_mode::EXPRESSION.
7682         (explicit_options, probe_options): New.
7683         (collect_explicit_location_matches): Complete on the
7684         explictit_loc->foo instead of word.  Use
7685         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7686         keyword and options completions.
7687         (backup_text_ptr): Delete.
7688         (skip_keyword): New.
7689         (complete_explicit_location): Remove 'word' parameter.  Add
7690         language, quoted_arg_start and quoted_arg_end parameters.
7691         Rewrite, parsing left to right.
7692         (location_completer): Rewrite.
7693         (location_completer_handle_brkchars): New function.
7694         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7695         (enum complete_line_internal_reason): Adjust comments.
7696         (completion_tracker::discard_completions): New.
7697         (completer_handle_brkchars_func_for_completer): Handle
7698         location_completer.
7699         (gdb_custom_word_point_brkchars)
7700         (gdb_org_rl_basic_quote_characters): New.
7701         (gdb_completion_word_break_characters_throw)
7702         (completion_find_completion_word): Handle trackers that use a
7703         custom word point.
7704         (completion_tracker::advance_custom_word_point_by): New.
7705         (completion_tracker::build_completion_result): Don't rely on
7706         readline appending the quote char.
7707         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7708         use a custom word point.
7709         (gdb_rl_attempted_completion_function): Restore
7710         rl_basic_quote_characters.
7711         * completer.h (class completion_tracker): Extend intro comment.
7712         (completion_tracker::set_quote_char)
7713         (completion_tracker::quote_char)
7714         (completion_tracker::set_use_custom_word_point)
7715         (completion_tracker::use_custom_word_point)
7716         (completion_tracker::custom_word_point)
7717         (completion_tracker::set_custom_word_point)
7718         (completion_tracker::advance_custom_word_point_by)
7719         (completion_tracker::completes_to_completion_word)
7720         (completion_tracker::discard_completions): New methods.
7721         (completion_tracker::m_quote_char)
7722         (completion_tracker::m_use_custom_word_point)
7723         (completion_tracker::m_custom_word_point): New fields.
7724         (advance_to_expression_complete_word_point): Declare.
7725         * f-lang.c (f_collect_symbol_completion_matches): Add
7726         complete_symbol_mode parameter.
7727         * language.h (struct language_defn)
7728         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7729         parameter.
7730         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7731         (linespec_complete_function): New function.
7732         (linespec_lexer_lex_keyword): Adjust.
7733         * linespec.h (linespec_keywords, linespec_complete_function): New
7734         declarations.
7735         * location.c (find_end_quote): New function.
7736         (explicit_location_lex_one): Add explicit_completion_info
7737         parameter.  Save quoting info.  Don't throw if being called for
7738         completion.  Don't handle Ada operators here.
7739         (is_cp_operator, skip_op_false_positives, first_of)
7740         (explicit_location_lex_one_function): New function.
7741         (string_to_explicit_location): Replace 'dont_throw' parameter with
7742         an explicit_completion_info pointer parameter.  Handle it.  Don't
7743         use explicit_location_lex_one to lex function names.  Use
7744         explicit_location_lex_one_function instead.
7745         * location.h (struct explicit_completion_info): New.
7746         (string_to_explicit_location): Replace 'dont_throw' parameter with
7747         an explicit_completion_info pointer parameter.
7748         * symtab.c (default_collect_symbol_completion_matches_break_on):
7749         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7750         (default_collect_symbol_completion_matches)
7751         (collect_symbol_completion_matches): Add complete_symbol_mode
7752         parameter.
7753         (collect_symbol_completion_matches_type): Pass down
7754         complete_symbol_mode::EXPRESSION.
7755         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7756         parameter.  Handle LINESPEC mode.
7757         * symtab.h (complete_symbol_mode): New.
7758         (default_collect_symbol_completion_matches_break_on)
7759         (default_collect_symbol_completion_matches)
7760         (collect_symbol_completion_matches)
7761         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7762         parameter.
7763
7764 2017-07-17  Pedro Alves  <palves@redhat.com>
7765
7766         * utils.c (enum class strncmp_iw_mode): New.
7767         (strcmp_iw): Rename to ...
7768         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7769         parameters.  Handle them.
7770         (strncmp_iw): New.
7771         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7772         * utils.h (strncmp_iw): Declare.
7773         (strcmp_iw): Move describing comments here.
7774
7775 2017-07-17  Pedro Alves  <palves@redhat.com>
7776
7777         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7778         CP_OPERATOR_STR.
7779         * c-typeprint.c (is_type_conversion_operator): Use
7780         CP_OPERATOR_STR.
7781         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7782         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7783         CP_OPERATOR_LEN.
7784         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7785         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7786         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7787         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7788         CP_OPERATOR_STR.
7789         * location.c: Include "cp-support.h".
7790         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7791         CP_OPERATOR_STR.
7792         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7793         CP_OPERATOR_LEN.
7794
7795 2017-07-17  Pedro Alves  <palves@redhat.com>
7796
7797         * cli/cli-cmds.c (complete_command): Use a completion tracker
7798         along with completion_find_completion_word for handle_brkchars
7799         phase.
7800         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7801         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7802         (struct gdb_rl_completion_word_info): New.
7803         (gdb_rl_find_completion_word): New.
7804         (completion_find_completion_word): New.
7805         * completer.h (completion_find_completion_word): Declare.
7806
7807 2017-07-17  Pedro Alves  <palves@redhat.com>
7808
7809         * ada-lang.c (symbol_completion_match): Adjust comments.
7810         (symbol_completion_add): Replace vector parameter with
7811         completion_tracker parameter.  Use it.
7812         (ada_make_symbol_completion_list): Rename to...
7813         (ada_collect_symbol_completion_matches): ... this.  Add
7814         completion_tracker parameter and use it.
7815         (ada_language_defn): Adjust.
7816         * break-catch-syscall.c (catch_syscall_completer): Adjust
7817         prototype and work with completion_tracker instead of VEC.
7818         * breakpoint.c (condition_completer): Adjust prototype and work
7819         with completion_tracker instead of VEC.
7820         * c-lang.c (c_language_defn, cplus_language_defn)
7821         (asm_language_defn, minimal_language_defn): Adjust to renames.
7822         * cli/cli-cmds.c (complete_command): Rework using
7823         completion_tracker.  Catch exceptions when completing.
7824         * cli/cli-decode.c (integer_unlimited_completer)
7825         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7826         with completion_tracker instead of VEC.
7827         * command.h (struct completion_tracker): Forward declare.
7828         (completer_ftype, completer_handle_brkchars_ftype): Change
7829         types.
7830         (complete_on_cmdlist, complete_on_enum): Adjust.
7831         * completer.c: Include <algorithm>.
7832         (struct gdb_completer_state): New.
7833         (current_completion): New global.
7834         (readline_line_completion_function): Delete.
7835         (noop_completer, filename_completer)
7836         (filename_completer_handle_brkchars, complete_files_symbols)
7837         (linespec_location_completer): Adjust to work with a
7838         completion_tracker instead of a VEC.
7839         (string_or_empty): New.
7840         (collect_explicit_location_matches): Adjust to work with a
7841         completion_tracker instead of a VEC.
7842         (explicit_location_completer): Rename to ...
7843         (complete_explicit_location): ... this and adjust to work with a
7844         completion_tracker instead of a VEC.
7845         (location_completer): Adjust to work with a completion_tracker
7846         instead of a VEC.
7847         (add_struct_fields): Adjust to work with a completion_list instead
7848         of VEC.
7849         (expression_completer): Rename to ...
7850         (complete_expression): ... this and adjust to work with a
7851         completion_tracker instead of a VEC.  Use complete_files_symbols.
7852         (expression_completer): Reimplement on top of complete_expression.
7853         (symbol_completer): Adjust to work with a completion_tracker
7854         instead of a VEC.
7855         (enum complete_line_internal_reason): Add describing comments.
7856         (complete_line_internal_normal_command): Adjust to work with a
7857         completion_tracker instead of a VEC.
7858         (complete_line_internal): Rename to ...
7859         (complete_line_internal_1): ... this and adjust to work with a
7860         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7861         handle_brkchars phase.
7862         (new_completion_tracker): Delete.
7863         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7864         complete_line_internal_1.
7865         (free_completion_tracker): Delete.
7866         (INITIAL_COMPLETION_HTAB_SIZE): New.
7867         (completion_tracker::completion_tracker)
7868         (completion_tracker::~completion_tracker): New.
7869         (maybe_add_completion): Delete.
7870         (completion_tracker::maybe_add_completion)
7871         (completion_tracker::add_completion)
7872         (completion_tracker::add_completions): New.
7873         (throw_max_completions_reached_error): Delete.
7874         (complete_line): Adjust to work with a completion_tracker instead
7875         of a VEC.  Don't create a completion_tracker_t or check for max
7876         completions here.
7877         (command_completer, command_completer_handle_brkchars)
7878         (signal_completer, reg_or_group_completer_1)
7879         (reg_or_group_completer, default_completer_handle_brkchars):
7880         Adjust to work with a completion_tracker.
7881         (gdb_completion_word_break_characters_throw): New.
7882         (gdb_completion_word_break_characters): Reimplement.
7883         (line_completion_function): Delete.
7884         (completion_tracker::recompute_lowest_common_denominator)
7885         (expand_preserving_ws)
7886         (completion_tracker::build_completion_result)
7887         (completion_result::completion_result)
7888         (completion_result::completion_result)
7889         (completion_result::~completion_result)
7890         (completion_result::completion_result)
7891         (completion_result::release_match_list, compare_cstrings)
7892         (completion_result::sort_match_list)
7893         (completion_result::reset_match_list)
7894         (gdb_rl_attempted_completion_function_throw)
7895         (gdb_rl_attempted_completion_function): New.
7896         * completer.h (completion_list, struct completion_result)
7897         (class completion_tracker): New.
7898         (complete_line): Add completion_tracker parameter.
7899         (readline_line_completion_function): Delete.
7900         (gdb_rl_attempted_completion_function): New.
7901         (noop_completer, filename_completer, expression_completer)
7902         (location_completer, symbol_completer, command_completer)
7903         (signal_completer, reg_or_group_completer): Update prototypes.
7904         (completion_tracker_t, new_completion_tracker)
7905         (make_cleanup_free_completion_tracker): Delete.
7906         (enum maybe_add_completion_enum): Delete.
7907         (maybe_add_completion): Delete.
7908         (throw_max_completions_reached_error): Delete.
7909         * corefile.c (complete_set_gnutarget): Adjust to work with a
7910         completion_tracker instead of a VEC.
7911         * cp-abi.c (cp_abi_completer): Adjust to work with a
7912         completion_tracker instead of a VEC.
7913         * d-lang.c (d_language_defn): Adjust.
7914         * disasm.c (disassembler_options_completer): Adjust to work with a
7915         completion_tracker instead of a VEC.
7916         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7917         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7918         with a completion_tracker instead of a VEC.
7919         (f_language_defn): Adjust.
7920         * go-lang.c (go_language_defn): Adjust.
7921         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7922         Adjust to work with a completion_tracker instead of a VEC.
7923         * infrun.c (handle_completer): Likewise.
7924         * interps.c (interpreter_completer): Likewise.
7925         * interps.h (interpreter_completer): Likewise.
7926         * language.c (unknown_language_defn, auto_language_defn)
7927         (local_language_defn): Adjust.
7928         * language.h (language_defn::la_make_symbol_completion_list):
7929         Rename to ...
7930         (language_defn::la_collect_symbol_completion_matches): ... this
7931         and adjust to work with a completion_tracker instead of a VEC.
7932         * m2-lang.c (m2_language_defn): Adjust.
7933         * objc-lang.c (objc_language_defn): Adjust.
7934         * opencl-lang.c (opencl_language_defn): Adjust.
7935         * p-lang.c (pascal_language_defn): Adjust.
7936         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7937         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7938         with a completion_tracker.
7939         * rust-lang.c (rust_language_defn): Adjust.
7940         * symtab.c (free_completion_list, do_free_completion_list)
7941         (return_val, completion_tracker): Delete.
7942         (completion_list_add_name, completion_list_add_symbol)
7943         (completion_list_add_msymbol, completion_list_objc_symbol)
7944         (completion_list_add_fields, add_symtab_completions): Add
7945         completion_tracker parameter and use it.
7946         (default_make_symbol_completion_list_break_on_1): Rename to...
7947         (default_collect_symbol_completion_matches_break_on): ... this.
7948         Add completion_tracker parameter and use it instead of allocating
7949         a completion tracker here.
7950         (default_make_symbol_completion_list_break_on): Delete old
7951         implementation.
7952         (default_make_symbol_completion_list): Delete.
7953         (default_collect_symbol_completion_matches): New.
7954         (make_symbol_completion_list): Delete.
7955         (collect_symbol_completion_matches): New.
7956         (make_symbol_completion_type): Rename to ...
7957         (collect_symbol_completion_matches_type): ... this.  Add
7958         completion_tracker parameter and use it instead of VEC.
7959         (make_file_symbol_completion_list_1): Rename to...
7960         (collect_file_symbol_completion_matches): ... this.  Add
7961         completion_tracker parameter and use it instead of VEC.
7962         (make_file_symbol_completion_list): Delete.
7963         (add_filename_to_list): Use completion_list instead of a VEC.
7964         (add_partial_filename_data::list): Now a completion_list.
7965         (make_source_files_completion_list): Work with a completion_list
7966         instead of a VEC.
7967         * symtab.h: Include "completer.h".
7968         (default_make_symbol_completion_list_break_on)
7969         (default_make_symbol_completion_list, make_symbol_completion_list)
7970         (make_symbol_completion_type, make_file_symbol_completion_list)
7971         (make_source_files_completion_list): Delete.
7972         (default_collect_symbol_completion_matches_break_on)
7973         (default_collect_symbol_completion_matches)
7974         (collect_symbol_completion_matches)
7975         (collect_symbol_completion_matches_type)
7976         (collect_file_symbol_completion_matches)
7977         (make_source_files_completion_list): New.
7978         * top.c (init_main): Don't install a rl_completion_entry_function
7979         hook.  Install a rl_attempted_completion_function hook instead.
7980         * tui/tui-layout.c (layout_completer): Adjust to work with a
7981         completion_tracker.
7982         * tui/tui-regs.c (tui_reggroup_completer):
7983         * tui/tui-win.c (window_name_completer, focus_completer)
7984         (winheight_completer): Adjust to work with a completion_tracker.
7985         * value.c: Include "completer.h".
7986         (complete_internalvar): Adjust to work with a completion_tracker.
7987         * value.h (complete_internalvar): Likewise.
7988
7989 2017-07-17  Pedro Alves  <palves@redhat.com>
7990
7991         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7992         renames.
7993         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7994         comments to completer_ftype's declaration.
7995         <completer_handle_brkchars>: Change type to
7996         completer_handle_brkchars_ftype.
7997         * command.h (completer_ftype): Add describing comment and give
7998         names to parameters.
7999         (completer_ftype_void): Rename to ...
8000         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8001         (set_cmd_completer_handle_brkchars): Adjust.
8002         * completer.c (filename_completer_handle_brkchars): New function.
8003         (complete_line_internal_normal_command): New function, factored
8004         out from ...
8005         (complete_line_internal): ... here.
8006         (command_completer_handle_brkchars)
8007         (default_completer_handle_brkchars)
8008         (completer_handle_brkchars_func_for_completer): New functions.
8009         * completer.h (set_gdb_completion_word_break_characters): Delete
8010         declaration.
8011         (completer_handle_brkchars_func_for_completer): New declaration.
8012         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8013         completer_handle_brkchars_func_for_completer.
8014
8015 2017-07-17  Pedro Alves  <palves@redhat.com>
8016
8017         * completer.c (symbol_completer): New function, based on
8018         make_symbol_completion_list_fn.
8019         * completer.h (symbol_completer): New declaration.
8020         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8021         * python/py-cmd.c (completers): Adjust.
8022         * symtab.c (make_symbol_completion_list_fn): Delete.
8023         * symtab.h (make_symbol_completion_list_fn): Delete.
8024         * cli/cli-decode.c (add_cmd): Adjust.
8025
8026 2017-07-17  Pedro Alves  <palves@redhat.com>
8027
8028         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8029         * dwarf2read.c: Include "filename-seen-cache.h".
8030         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8031         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8032         * filename-seen-cache.c: New file.
8033         * filename-seen-cache.h: New file.
8034         * symtab.c: Include "filename-seen-cache.h".
8035         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8036         (create_filename_seen_cache, clear_filename_seen_cache)
8037         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8038         to filename-seen-cache.h/filename-seen-cache.c.
8039         (output_source_filename, sources_info)
8040         (maybe_add_partial_symtab_filename)
8041         (make_source_files_completion_list): Adjust to use
8042         filename_seen_cache.
8043
8044 2017-07-17  Pedro Alves  <palves@redhat.com>
8045
8046         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8047         fields.
8048         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8049         dwarf2_debug_sections*)): New.
8050         (dwarf2_per_objfile::dwarf2_per_objfile(const
8051         dwarf2_per_objfile&)): Declare as deleted.
8052         (dwarf2_per_objfile::operator=): Declare as deleted.
8053         (dwarf2_per_objfile::dwarf2_per_objfile)
8054         (dwarf2_per_objfile::~dwarf2_per_objfile)
8055         (dwarf2_per_objfile::free_cached_comp_units): New.
8056         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8057         ctor.  Call dwarf2_per_objfile's ctor manually.
8058         (dwarf2_locate_sections): Deleted/refactored as ...
8059         (dwarf2_per_objfile::locate_sections): ... this new method.
8060         (free_cached_comp_units): Defer to
8061         dwarf2_per_objfile::free_cached_comp_units.
8062         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8063
8064 2017-07-14  Tom Tromey  <tom@tromey.com>
8065
8066         PR rust/21764:
8067         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8068         parameter.
8069         <UNOP_SIZEOF>: Split into separate case.
8070         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8071
8072 2017-07-14  Tom Tromey  <tom@tromey.com>
8073
8074         PR rust/21763:
8075         * symtab.c (symbol_matches_domain): Add language_rust to special
8076         case.
8077         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8078         treat LOC_TYPEDEF symbols as variables.
8079
8080 2017-07-14  Pedro Alves  <palves@redhat.com>
8081
8082         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8083         symtabs matching all symtabs with SRCFILE as file name instead of
8084         only considering the first hit, with lookup_symtab.
8085
8086 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8087
8088         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8089         operator_name parameters.
8090         (gen_expr): Update function call.
8091
8092 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8093
8094         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8095         parameter.
8096         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8097         Likewise.
8098         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8099         parameter, use agent_expr::gdbarch instead, update function
8100         calls.
8101         (locexpr_tracepoint_var_ref): Likewise.
8102         (loclist_tracepoint_var_ref): Likewise.
8103         * ax-gdb.c (gen_trace_static_fields): Likewise.
8104         (gen_traced_pop): Likewise.
8105         (gen_frame_args_address): Likewise.
8106         (gen_frame_locals_address): Likewise.
8107         (gen_var_ref): Likewise.
8108         (gen_struct_ref_recursive): Likewise.
8109         (gen_static_field): Likewise.
8110         (gen_maybe_namespace_elt): Likewise.
8111         (gen_expr): Likewise.
8112         (gen_trace_for_var): Likewise.
8113         (gen_trace_for_expr): Likewise.
8114         (gen_trace_for_return_address): Likewise.
8115
8116 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8117
8118         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8119         parameter.
8120         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8121
8122 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8123
8124         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8125         from ax, update calls.
8126         (gen_usual_arithmetic): Likewise.
8127         (gen_integral_promotions): Likewise.
8128         (gen_bitfield_ref): Likewise.
8129         (gen_primitive_field): Likewise.
8130         (gen_struct_ref_recursive): Likewise.
8131         (gen_struct_ref): Likewise.
8132         (gen_maybe_namespace_elt): Likewise.
8133         (gen_struct_elt_for_reference): Likewise.
8134         (gen_namespace_elt): Likewise.
8135         (gen_aggregate_elt_ref): Likewise.
8136         (gen_expr): Get gdbarch from ax, update calls.
8137         (gen_expr_binop_rest): Likewise.
8138
8139 2017-07-13  Pedro Alves  <palves@redhat.com>
8140
8141         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8142         as default tdesc.
8143         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8144         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8145         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8146         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8147         tdep.
8148         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8149         Get final tdesc from the tdep.
8150         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8151         default tdesc.
8152         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8153         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8154         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8155         Use it as default tdesc.
8156         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8157         down to amd_init_abi.  No longer handle fallback tdesc here.
8158         * amd64-tdep.h (tdesc_x32): Declare.
8159         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8160         parameter.
8161         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8162         as default tdesc.
8163
8164 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8165
8166         * s390-linux-tdep.c (s390_process_record): Add support for
8167         instructions new in arch12.
8168
8169 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8170
8171         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8172         PT_GETFSBASE and PT_GETGSBASE.
8173         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8174         PT_SETGSBASE.
8175
8176 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8177
8178         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8179         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8180         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8181         those rules.
8182         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8183         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8184         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8185         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8186         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8187         * features/i386/amd64.xml: Add 64bit-segments.xml.
8188         * features/i386/amd64-avx-avx512.c: Regenerated.
8189         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8190         * features/i386/amd64-avx-mpx.c: Regenerated.
8191         * features/i386/amd64-avx.c: Regenerated.
8192         * features/i386/amd64-mpx.c: Regenerated.
8193         * features/i386/amd64.c: Regenerated.
8194         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8195         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8196         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8197         * regformats/i386/amd64-avx.dat: Regenerated.
8198         * regformats/i386/amd64-mpx.dat: Regenerated.
8199         * regformats/i386/amd64.dat: Regenerated.
8200
8201 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8202
8203         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8204         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8205
8206 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8207
8208         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8209         unsetenv.
8210         * gnulib/aclocal.m4: Regenerate.
8211         * gnulib/config.in: Regenerate.
8212         * gnulib/configure: Regenerate.
8213         * gnulib/import/Makefile.am: Regenerate.
8214         * gnulib/import/Makefile.in: Regenerate.
8215         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8216         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8217         * gnulib/import/m4/environ.m4: New file.
8218         * gnulib/import/m4/setenv.m4: New file.
8219         * gnulib/import/setenv.c: New file.
8220         * gnulib/import/unsetenv.c: New file.
8221
8222 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8223
8224         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8225         address when op is DW_OP_addr.
8226
8227 2017-07-09  Tom Tromey  <tom@tromey.com>
8228
8229         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8230         check and apply to outer type.
8231
8232 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8233
8234         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8235         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8236         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8237         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8238
8239 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8240
8241         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8242
8243 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8244
8245         * corelow.c (get_core_siginfo): Remove.
8246         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8247         instead of get_core_siginfo.
8248         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8249         * gdbarch.h: Re-generate.
8250         * gdbarch.c: Re-generate.
8251         * linux-tdep.c (linux_core_xfer_siginfo): New.
8252         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8253
8254 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8255
8256         * corelow.c (thread_section_name): Move to ...
8257         * gdbcore.h (thread_section_name): ... here.
8258
8259 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8260
8261         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8262         (struct siginfo32): New.
8263         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8264         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8265         via ptrace(PT_LWPINFO).
8266
8267 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8268
8269         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8270         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8271         (fbsd_get_siginfo_type): New.
8272         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8273         (_initialize_fbsd_tdep): New.
8274
8275 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8276
8277         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8278         a singular dwo_unit*) to support multiple CUs in the same way that
8279         multiple TUs are supported.
8280         (create_cus_hash_table): Replace create_dwo_cu with a function for
8281         parsing multiple CUs from a DWO file.
8282         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8283         create_dwo_cu.
8284         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8285         htab_find, rather than comparing the signature to a singleton CU in
8286         the dwo_file.
8287
8288 2017-07-06  Pedro Alves  <palves@redhat.com>
8289
8290         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8291
8292 2017-07-04  Pedro Alves  <palves@redhat.com>
8293
8294         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8295         * gdbtypes.h (TYPE_STATIC): Delete.
8296         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8297         is_synchronized, is_native>: Delete.
8298         <dummy>: Bump.
8299         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8300         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8301         (TYPE_FN_FIELD_ABSTRACT): Delete.
8302
8303 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8304
8305         * buffer.h (buffer_finish): Fix spelling mistakes.
8306
8307 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8308
8309         * .dir-locals.el: Automatically switch to C-style comments in
8310         versions of Emacs that support the feature.
8311
8312 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8313             Pedro Alves  <palves@redhat.com>
8314
8315         PR cli/21688
8316         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8317         (process_next_line): New variable 'inline_cmd'.
8318         Adjust 'if' clauses for "python", "compile" and "guile" to use
8319         'command_name_equals' and check for '!inline_cmd'.
8320
8321 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8322
8323         PR cli/21688
8324         * cli/cli-script.c (command_name_equals_not_inline): New function.
8325         (process_next_line): Adjust 'if' clauses for "python", "compile"
8326         and "guile" to use command_name_equals_not_inline.
8327
8328 2017-06-29  Pedro Alves  <palves@redhat.com>
8329
8330         * completer.c (expression_completer): Call
8331         linespec_location_completer instead of location_completer.
8332
8333 2017-06-29  Pedro Alves  <palves@redhat.com>
8334
8335         * completer.c (expression_completer): Remove code that recomputes
8336         'text' from 'word'.
8337
8338 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8339
8340         * regformats/regdat.sh: Generate code with
8341         "ifndef IN_PROCESS_AGENT".
8342
8343 2017-06-28  Pedro Alves  <palves@redhat.com>
8344
8345         * command.h: Include "common/scoped_restore.h".
8346
8347 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8348
8349         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8350         instead of obstack_grow.
8351
8352 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8353
8354         PR gdb/21337
8355         * symfile.c (reread_symbols): Call objfiles_changed just before
8356         read_symbols.
8357
8358 2017-06-27  Pedro Alves  <palves@redhat.com>
8359
8360         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8361         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8362         (completion_list_add_symbol, completion_list_add_msymbol):
8363         ... these new functions.
8364         (add_symtab_completions)
8365         (default_make_symbol_completion_list_break_on_1): Adjust.
8366
8367 2017-06-27  Pedro Alves  <palves@redhat.com>
8368
8369         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8370         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8371         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8372         dtor.
8373         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8374         'storage_obstack' field an auto_obstack.  In-class initialize all
8375         non-bitfield fields.  Make minsyms_read bool.
8376         * symfile.c (read_symbols): Adjust.
8377
8378 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8379
8380         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8381         (gdbsim_store_register): Likewise.
8382
8383 2017-06-27  Pedro Alves  <palves@redhat.com>
8384
8385         * c-exp.y (name_obstack): Now an auto_obstack.
8386         (yylex): Use auto_obstack::clear.
8387         (c_parse): Use auto_obstack::clear instead of reinitializing and
8388         freeing the obstack.
8389         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8390         * d-exp.y (name_obstack): Now an auto_obstack.
8391         (yylex): Use auto_obstack::clear.
8392         (d_parse): Use auto_obstack::clear instead of reinitializing and
8393         freeing the obstack.
8394         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8395         auto_obstack.
8396         * dwarf2read.c (create_addrmap_from_index)
8397         (dwarf2_build_psymtabs_hard)
8398         (update_enumeration_type_from_children): Likewise.
8399         * gdb_obstack.h (auto_obstack): New type.
8400         * go-exp.y (name_obstack): Now an auto_obstack.
8401         (build_packaged_name): Use auto_obstack::clear.
8402         (go_parse): Use auto_obstack::clear instead of reinitializing and
8403         freeing the obstack.
8404         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8405         auto_obstack.
8406         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8407         * rust-exp.y (work_obstack): Now an auto_obstack.
8408         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8409         reinitializing and freeing the obstack.
8410         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8411         (host_char_to_target): Use auto_obstack.
8412         * utils.h (make_cleanup_obstack_free): Delete declaration.
8413         * valprint.c (generic_emit_char, generic_printstr): Use
8414         auto_obstack.
8415
8416 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8417
8418         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8419         thread.
8420         (darwin_init_thread_list): Don't update dummy thread.
8421         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8422
8423 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8424
8425         * record-full.c (netorder16): Remove.
8426
8427 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8428
8429         * common/diagnostics.h: Define macros for GCC.
8430         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8431         * common/vec.h: Include diagnostics.h.
8432         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8433         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8434         warning.
8435
8436 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8437
8438         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8439         New macro.
8440         * ada-lex.l: Ignore deprecated register warnings.
8441
8442 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8443
8444         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8445         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8446
8447 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8448
8449         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8450         its own line.
8451
8452 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8453
8454         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8455
8456 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8457
8458         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8459         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8460         (xtensa_register_read_masked): Likewise.
8461
8462 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8463
8464         * common/environ.c (gdb_environ::unset): Update comment.
8465
8466 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8467
8468         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8469         registers.
8470
8471 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8472
8473         * record-full.c (record_full_exec_insn): Use byte_vector.
8474
8475 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8476
8477         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8478         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8479
8480 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8481
8482         * remote.c (cached_reg): Move from here...
8483         * regcache.h (cached_reg): ...to here.
8484         * python/py-unwind.c (struct reg_info): Remove.
8485         (cached_frame_info): Use cached_reg_t.
8486         (pyuw_prev_register): Likewise.
8487         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8488         (pyuw_dealloc_cache): Free all registers.
8489
8490 2017-06-22  Pedro Alves  <palves@redhat.com>
8491             Simon Marchi  <simon.marchi@ericsson.com>
8492
8493         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8494         warning.
8495         * common/diagnostics.h: New file.
8496
8497 2017-06-22  Pedro Alves  <palves@redhat.com>
8498
8499         * common/agent.h: Add include guards.
8500
8501 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8502
8503         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8504         talk about addressable units instead of bytes.
8505
8506 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8507
8508         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8509         of '::const_iterator'.
8510
8511 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8512
8513         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8514         'unittests/environ-selftests.c'.
8515         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8516         * charset.c (find_charset_names): Declare object 'iconv_env'.
8517         Update code to use 'iconv_env' object.  Remove call to
8518         'free_environ'.
8519         * common/environ.c: Include <utility>.
8520         (make_environ): Delete function.
8521         (free_environ): Delete function.
8522         (gdb_environ::clear): New function.
8523         (gdb_environ::operator=): New function.
8524         (gdb_environ::get): Likewise.
8525         (environ_vector): Delete function.
8526         (set_in_environ): Delete function.
8527         (gdb_environ::set): New function.
8528         (unset_in_environ): Delete function.
8529         (gdb_environ::unset): New function.
8530         (gdb_environ::envp): Likewise.
8531         * common/environ.h: Include <vector>.
8532         (struct gdb_environ): Delete; transform into...
8533         (class gdb_environ): ... this class.
8534         (free_environ): Delete prototype.
8535         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8536         environ_vector): Likewise.
8537         * infcmd.c (run_command_1): Update code to call
8538         'envp' from 'gdb_environ' class.
8539         (environment_info): Update code to call methods from 'gdb_environ'
8540         class.
8541         (unset_environment_command): Likewise.
8542         (path_info): Likewise.
8543         (path_command): Likewise.
8544         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8545         (inferior::inferior): Initialize 'environment' using the host's
8546         information.
8547         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8548         Include "environ.h".
8549         (class inferior) <environment>: Change type from 'struct
8550         gdb_environ' to 'gdb_environ'.
8551         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8552         methods from 'gdb_environ' class.
8553         * solib.c (solib_find_1): Likewise
8554         * unittests/environ-selftests.c: New file.
8555
8556 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8557
8558         * features/i386/i386-linux.xml: Exchange the order of including
8559         32bit-linux.xml and 32bit-sse.xml.
8560         * features/i386/i386-linux.c: Regenerated.
8561
8562 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8563
8564         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8565         Delete copy ctor and assignment operator.
8566         (tdesc_type): Likewise.
8567         (tdesc_feature): Likewise.
8568         (tdesc_free_reg): Remove.
8569         (tdesc_create_reg): Use new.
8570         (tdesc_free_type): Remove.
8571         (tdesc_create_vector): Use new.
8572         (tdesc_create_union): Likewise.
8573         (tdesc_create_flags): Likewise.
8574         (tdesc_create_enum): Likewise.
8575         (tdesc_free_feature): Delete.
8576         (free_target_description): Use delete.
8577
8578 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8579
8580         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8581         registers.
8582
8583 2017-06-19  Pedro Alves  <palves@redhat.com>
8584
8585         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8586         after gdb::unlinker.
8587
8588 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8589
8590         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8591         gdb_environ to access an environment variable.
8592
8593 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8594
8595         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8596         gdb_byte*.
8597
8598 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8599
8600         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8601
8602 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8603
8604         * configure: Re-generate.
8605         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8606
8607 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8608
8609         * configure: Re-generate.
8610         * warning.m4: Pass -Werror to compiler when checking for
8611         supported warning flags.
8612
8613 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8614
8615         * Makefile.in (COMPILE.pre): Add "-x c++".
8616
8617 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8618             Pedro Alves  <palves@redhat.com>
8619             Yao Qi  <yao.qi@linaro.org>
8620
8621         * defs.h (RequireLongest): New.
8622         (extract_integer): Declare function template.
8623         (extract_signed_integer): Remove the declaration, but define it
8624         static inline.
8625         (extract_unsigned_integer): Likewise.
8626         (store_integer): Declare function template.
8627         (store_signed_integer): Remove the declaration, but define it
8628         static inline.
8629         (store_unsigned_integer): Likewise.
8630         * findvar.c (extract_integer): New function template.
8631         (extract_signed_integer): Remove.
8632         (extract_unsigned_integer): Remove.
8633         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8634         instantiations.
8635         (store_integer): New function template.
8636         (store_signed_integer): Remove.
8637         (store_unsigned_integer): Remove.
8638         (store_integer): Explicit instantiations.
8639         * regcache.c (regcache_raw_read_signed): Update.
8640         (regcache::raw_read): New function.
8641         (regcache::raw_read_signed): Remove.
8642         (regcache::raw_read_unsigned): Remove.
8643         (regcache_raw_read_unsigned): Update.
8644         (regcache_raw_write_unsigned): Update.
8645         (regcache::raw_write_signed): Remove.
8646         (regcache::raw_write): New function.
8647         (regcache_cooked_read_signed): Update.
8648         (regcache::raw_write_unsigned): Remove.
8649         (regcache::cooked_read_signed): Remove.
8650         (regcache_cooked_read_unsigned): Update.
8651         (regcache::cooked_read_unsigned): Remove.
8652         (regcache_cooked_write_signed): Update.
8653         (regcache_cooked_write_unsigned): Update.
8654         * regcache.h (regcache) <raw_read_signed>: Remove.
8655         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8656         <raw_read, raw_write>: New.
8657         <cooked_read_signed, cooked_write_signed>: Remove.
8658         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8659         <cooked_read, cooked_write>: New.
8660         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8661         (sh64_pseudo_register_write): Update.
8662
8663 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8664
8665         * arc-tdep.c (arc_disassembler_options): New variable.
8666         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8667         of default_print_insn.
8668         (arc_delayed_print_insn): Set info->section when needed,
8669         use default_print_insn to retrieve a disassembler.
8670
8671 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8672
8673         PR gdb/21574
8674         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8675         to mention $SHELL and startup-with-shell.
8676
8677 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8678
8679         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8680
8681 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8682
8683         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8684         default_print_insn instead of print_insn_aarch64.
8685         * arm-tdep.c (gdb_print_insn_arm): Call
8686         default_print_insn instead of print_insn_big_arm
8687         and print_insn_little_arm.
8688         * i386-tdep.c (i386_print_insn): Call default_print_insn
8689         instead of print_insn_i386.
8690         * ia64-tdep.c (ia64_print_insn): Call
8691         default_print_insn instead of print_insn_ia64.
8692         * mips-tdep.c (gdb_print_insn_mips): Call
8693         default_print_insn instead of print_insn_big_mips
8694         and print_insn_little_mips.
8695         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8696         instead of print_insn_spu.
8697
8698 2017-06-14  Pedro Alves  <palves@redhat.com>
8699
8700         * ada-lang.c: Include "common/byte-vector.h".
8701         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8702         * charset.c (wchar_iterator::iterate): Resize the vector instead
8703         of reserving it.
8704         * common/byte-vector.h: Include "common/def-vector.h".
8705         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8706         * cli/cli-dump.c: Include "common/byte-vector.h".
8707         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8708         * common/byte-vector.h: New file.
8709         * common/def-vector.h: New file.
8710         * common/default-init-alloc.h: New file.
8711         * dwarf2loc.c: Include "common/byte-vector.h".
8712         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8713         instead of reserving it.
8714         * dwarf2read.c: Include "common/byte-vector.h".
8715         (data_buf::m_vec): Now a gdb::byte_vector.
8716         * gdb_regex.c: Include "common/def-vector.h".
8717         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8718         * mi/mi-main.c: Include "common/byte-vector.h".
8719         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8720         * printcmd.c: Include "common/byte-vector.h".
8721         (print_scalar_formatted): Use gdb::byte_vector.
8722         * valprint.c: Include "common/byte-vector.h".
8723         (maybe_negate_by_bytes, print_decimal_chars): Use
8724         gdb::byte_vector.
8725
8726 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8727
8728         * darwin-nat.c: Include "nat/fork-inferior.h".
8729
8730 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8731
8732         * configure.nat: Factor out Darwin bits that are not
8733         architecture-specific.  Add fork-inferior.o.
8734
8735 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8736
8737         * configure.nat: Factor out AIX bits that are not
8738         architecture-specific.  Add fork-inferior.o.
8739
8740 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8741
8742         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8743         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8744         wrappers that just call rw_pieced_value.
8745
8746 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8747
8748         * dwarf2loc.c (write_pieced_value): When writing the data for a
8749         memory piece, use write_memory_with_notification instead of
8750         write_memory.
8751
8752 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8753
8754         * valops.c (read_value_memory): Change embedded_offset to
8755         represent a bit offset instead of a byte offset.
8756         * value.h (read_value_memory): Adjust comment.
8757
8758 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8759
8760         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8761         dest_offset_bits and source_offset_bits.
8762         (write_pieced_value): Likewise.
8763
8764 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8765
8766         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8767         given by DW_OP_bit_piece.
8768         (write_pieced_value): Likewise.
8769
8770 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8771
8772         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8773         some other preparations to the places where sufficient information
8774         is available.
8775         (write_pieced_value): Likewise.
8776
8777 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8778
8779         * dwarf2loc.c (bits_to_bytes): New function.
8780         (read_pieced_value): Fix offset calculations for register pieces
8781         on big-endian targets.
8782         (write_pieced_value): Likewise.
8783
8784 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8785
8786         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8787         (write_pieced_value): Likewise.
8788
8789 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8790
8791         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8792         transfer the source value's least significant bits, instead of its
8793         lowest-addressed ones.  Rename type_len to max_offset.
8794         (read_pieced_value): Mirror above changes to write_pieced_value as
8795         applicable.
8796
8797 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8798
8799         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8800         truncate full bytes from dest_offset_bits before using it as an
8801         offset into the buffer.
8802
8803 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8804
8805         * dwarf2loc.c (write_pieced_value): Include transfer size in
8806         byte-wise check.
8807
8808 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8809
8810         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8811         calculation of this_size.
8812
8813 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8814
8815         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8816         when targeting a bit-field.
8817         (write_pieced_value): Likewise.
8818
8819 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8820
8821         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8822         (allocate_piece_closure): Drop addr_size parameter.
8823         (dwarf2_evaluate_loc_desc_full): Adjust call to
8824         allocate_piece_closure.
8825
8826 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8827
8828         PR gdb/21226
8829         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8830         the LSB end, independent of endianness.
8831
8832 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8833
8834         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8835         size capping.
8836
8837 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8838
8839         * mips-linux-nat.c: Move include features/mips*-linux.c to
8840         mips-linux-tdep.c.
8841         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8842         to mips-linux-tdep.c.
8843         * mips-linux-tdep.c: Include features/mips*-linux.c
8844         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8845         functions.
8846         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8847         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8848         (tdesc_mips64_dsp_linux): Declare.
8849
8850 2017-06-12  Tom Tromey  <tom@tromey.com>
8851
8852         * valprint.h (val_print_type_code_int): Remove.
8853         * valprint.c (generic_val_print_int): Always call
8854         val_print_scalar_formatted.
8855         (val_print_type_code_int): Remove.
8856         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8857         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8858         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8859         * ada-valprint.c (ada_val_print_num): Use
8860         val_print_scalar_formatted.
8861
8862 2017-06-12  Tom Tromey  <tom@tromey.com>
8863
8864         * printcmd.c (print_scalar_formatted): Unify the two switches.
8865         Don't convert scalars to LONGEST.
8866
8867 2017-06-12  Tom Tromey  <tom@tromey.com>
8868
8869         PR exp/16225:
8870         * valprint.h (print_decimal_chars): Update.
8871         * valprint.c (maybe_negate_by_bytes): New function.
8872         (print_decimal_chars): Add "is_signed" argument.
8873         * printcmd.c (print_scalar_formatted): Update.
8874
8875 2017-06-12  Tom Tromey  <tom@tromey.com>
8876
8877         PR exp/16225:
8878         * valprint.h (print_binary_chars, print_hex_chars): Update.
8879         * valprint.c (val_print_type_code_int): Update.
8880         (print_binary_chars): Add "zero_pad" argument.
8881         (emit_octal_digit): New function.
8882         (print_octal_chars): Don't zero-pad.
8883         (print_decimal_chars): Likewise.
8884         (print_hex_chars): Add "zero_pad" argument.
8885         * sh64-tdep.c (sh64_do_fp_register): Update.
8886         * regcache.c (regcache::dump): Update.
8887         * printcmd.c (print_scalar_formatted): Update.
8888         * infcmd.c (default_print_one_register_info): Update.
8889
8890 2017-06-12  Pedro Alves  <palves@redhat.com>
8891             Alan Hayward  <alan.hayward@arm.com>
8892
8893         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8894         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8895         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8896         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8897         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8898
8899 2017-06-12  Pedro Alves  <palves@redhat.com>
8900
8901         * dwarf2read.c (mapped_symtab::data): Now a vector of
8902         symtab_index_entry instead of vector of
8903         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8904         whether an element's name is NULL instead of checking whether the
8905         element itself is NULL.
8906         (find_slot): Change return type.  Adjust.
8907         (hash_expand, , add_index_entry, uniquify_cu_indices)
8908         (write_hash_table): Adjust.
8909
8910 2017-06-12  Pedro Alves  <palves@redhat.com>
8911
8912         * dwarf2read.c (recursively_count_psymbols): New function.
8913         (write_psymtabs_to_index): Call it to compute number of psyms and
8914         pass estimate size of psyms_seen to unordered_set's ctor.
8915
8916 2017-06-12  Pedro Alves  <palves@redhat.com>
8917
8918         * dwarf2read.c (write_hash_table): Check if key already exists
8919         before emplacing.
8920
8921 2017-06-12  Pedro Alves  <palves@redhat.com>
8922
8923         * dwarf2read.c (data_buf::append_space): Rename to...
8924         (data_buf::grow): ... this, and make private.  Adjust all callers.
8925         (data_buf::append_uint): New method.
8926         (add_address_entry, write_one_signatured_type)
8927         (write_psymtabs_to_index): Use it.
8928
8929 2017-06-12  Pedro Alves  <palves@redhat.com>
8930
8931         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8932         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8933         (data_buf::file_write): Call ::fwrite directly.
8934
8935 2017-06-12  Pedro Alves  <palves@redhat.com>
8936
8937         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8938         std::vector::erase.
8939
8940 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8941
8942         Code cleanup: C++ify .gdb_index producer.
8943         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8944         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8945         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8946         (create_strtab, add_string): Remove.
8947         (file_write, data_buf): New.
8948         (struct symtab_index_entry): Use std::vector for cu_indices.
8949         (struct mapped_symtab): Use std::vector for data.
8950         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8951         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8952         Remove.
8953         (find_slot): Change return type.  Update it to the new data structures.
8954         (hash_expand, add_index_entry): Update it to the new data structures.
8955         (offset_type_compare): Remove.
8956         (uniquify_cu_indices): Update it to the new data structures.
8957         (c_str_view, c_str_view_hasher, vector_hasher): New.
8958         (add_indices_to_cpool): Remove.
8959         (write_hash_table): Update it to the new data structures.
8960         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8961         (eq_psymtab_cu_index): Remove.
8962         (psym_index_map): New typedef.
8963         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8964         reference and std::unordered_map for cu_index_htab.
8965         (add_address_entry, add_address_entry_worker, write_address_map)
8966         (write_psymbols): Update it to the new data structures.
8967         (write_obstack): Remove.
8968         (struct signatured_type_index_data): Change types_list to a data_buf
8969         reference and psyms_seen to a std::unordered_set reference.
8970         (write_one_signatured_type, recursively_write_psymbols)
8971         (write_psymtabs_to_index): Update it to the new data structures.
8972
8973 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8974
8975         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8976         separate-debug-file commands.
8977         * symfile.h (separate_debug_file_debug): New global.
8978         * symfile.c (separate_debug_file_debug): New global.
8979         (separate_debug_file_exists, find_separate_debug_file): Add
8980         debug output.
8981         (_initialize_symfile): Add "set debug separate-debug-file"
8982         command.
8983         * build-id.c (build_id_to_debug_bfd,
8984         find_separate_debug_file_by_buildid): Add debug output.
8985
8986 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8987
8988         * gdbarch.sh (displaced_step_free_closure): Remove.
8989         * gdbarch.h, gdbarch.c: Re-generate.
8990         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8991         displaced_step_free_closure.
8992         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8993         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8994         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8995         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8996         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8997         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8998         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8999         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9000         * infrun.c (displaced_step_clear): Call xfree instead of
9001         gdbarch_displaced_step_free_closure.
9002
9003 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9004
9005         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9006         NULL".
9007
9008 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9009
9010         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9011         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9012         (mn10300_push_dummy_call): Likewise.
9013
9014 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9015
9016         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9017
9018 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9019
9020         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9021
9022 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9023
9024         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9025         able to start inferiors using a shell.
9026         (New remote packets): Announce new packet "QStartupWithShell".
9027         * remote.c: Add PACKET_QStartupWithShell.
9028         (extended_remote_create_inferior): Handle new
9029         PACKET_QStartupWithShell.
9030         (remote_protocol_features) <QStartupWithShell>: New entry for
9031         PACKET_QStartupWithShell.
9032         (_initialize_remote): Call "add_packet_config_cmd" for
9033         QStartupShell.
9034
9035 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9036             Pedro Alves  <palves@redhat.com>
9037
9038         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9039         and "nat/fork-inferior.h".
9040         * common/common-inferior.h: New file, with contents from
9041         "gdb/inferior.h".
9042         * commom/common-utils.c: Include "common-utils.h".
9043         (stringify_argv): New function.
9044         * common/common-utils.h (stringify_argv): New prototype.
9045         * configure.nat: Add "fork-inferior.o" as a dependency for
9046         "*linux*", "fbsd*" and "nbsd*" hosts.
9047         * corefile.c (get_exec_file): Update comment.
9048         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9049         instead of "startup_inferior".
9050         (darwin_create_inferior): Call "add_thread_silent" after
9051         "fork_inferior".
9052         * fork-child.c: Cleanup unnecessary includes.
9053         (SHELL_FILE): Move to "common/common-fork-child.c".
9054         (environ): Likewise.
9055         (exec_wrapper): Initialize.
9056         (get_exec_wrapper): New function.
9057         (breakup_args): Move to "common/common-fork-child.c"; rename to
9058         "breakup_args_for_exec".
9059         (escape_bang_in_quoted_argument): Move to
9060         "common/common-fork-child.c".
9061         (saved_ui): New variable.
9062         (prefork_hook): New function.
9063         (postfork_hook): Likewise.
9064         (postfork_child_hook): Likewise.
9065         (gdb_startup_inferior): Likewise.
9066         (fork_inferior): Move to "common/common-fork-child.c".  Update
9067         function to support gdbserver.
9068         (startup_inferior): Likewise.
9069         * gdbcore.h (get_exec_file): Remove declaration.
9070         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9071         instead of "startup_inferior".  Call "add_thread_silent" after
9072         "fork_inferior".
9073         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9074         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9075         instead of "startup_inferior".  Call "add_thread_silent" after
9076         "fork_inferior".
9077         * inferior.h: Include "common-inferior.h".
9078         (trace_start_error): Move to "common/common-utils.h".
9079         (trace_start_error_with_name): Likewise.
9080         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9081         (startup_inferior): Likewise.
9082         (gdb_startup_inferior): New prototype.
9083         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9084         * nat/fork-inferior.h: New file.
9085         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9086         instead of "startup_inferior".  Call "add_thread_silent" after
9087         "fork_inferior".
9088         * target.h (target_terminal_init): Move prototype to
9089         "target/target.h".
9090         (target_terminal_inferior): Likewise.
9091         (target_terminal_ours): Likewise.
9092         * target/target.h (target_terminal_init): New prototype, moved
9093         from "target.h".
9094         (target_terminal_inferior): Likewise.
9095         (target_terminal_ours): Likewise.
9096         * utils.c (gdb_flush_out_err): New function.
9097
9098 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9099
9100         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9101         * common/common-gdbthread.h: New file, with parts from
9102         "gdb/gdbthread.h".
9103         * gdbthread.h: Include "common-gdbthread.h".
9104         (switch_to_thread): Moved to "common/common-gdbthread.h".
9105
9106 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9107
9108         * Makefile.in (SFILES): Add "common/job-control.c".
9109         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9110         (COMMON_OBS): Add "job-control.o".
9111         * common/job-control.c: New file, with contents from
9112         "gdb/inflow.c".
9113         * common/job-control.h: New file, with contents from "terminal.h".
9114         * fork-child.c: Include "job-control.h".
9115         * inflow.c: Include "job-control.h".
9116         (gdb_setpgid): Move to "common/common-inflow.c".
9117         (_initialize_inflow): Move setting of "job_control" to
9118         "handle_job_control".
9119         * terminal.h (job_control): Moved to "common/common-terminal.h".
9120         (gdb_setpgid): Likewise.
9121         * top.c: Include "job_control.h".
9122         * utils.c: Likewise.
9123         (job_control): Moved to "job-control.c".
9124
9125 2017-06-07  Pedro Alves  <palves@redhat.com>
9126
9127         * Makefile.in (SFILES): Add gdb_regex.c.
9128         (COMMON_OBS): Add gdb_regex.o.
9129         * ada-lang.c (ada_add_standard_exceptions)
9130         (ada_add_exceptions_from_frame, name_matches_regex)
9131         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9132         parameter type to compiled_regex.  Adjust.
9133         (ada_exceptions_list): Use compiled_regex.
9134         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9135         std::unique_ptr<compiled_regex>.
9136         (exception_catchpoint::~exception_catchpoint): Remove regfree
9137         call.
9138         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9139         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9140         * breakpoint.c (solib_catchpoint::compiled): Now a
9141         std::unique_ptr<compiled_regex>.
9142         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9143         (check_status_catch_solib): Adjust to use compiled_regex.
9144         (add_solib_catchpoint): Adjust to use compiled_regex.
9145         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9146         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9147         compiled_regex reference.  Adjust to use it.
9148         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9149         declaration.  Include "gdb_regex.h".
9150         (apropos_cmd): Change regex parameter to compiled_regex reference.
9151         * gdb_regex.c: New file.
9152         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9153         declarations.
9154         (class compiled_regex): New.
9155         * linux-tdep.c: Include "common/gdb_optional.h".
9156         (struct mapping_regexes): New, factored out from
9157         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9158         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9159         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9160         * probe.c: Include "common/gdb_optional.h".
9161         (collect_probes): Use compiled_regex and gdb::optional and remove
9162         cleanups.
9163         * skip.c: Include "common/gdb_optional.h".
9164         (skiplist_entry::compiled_function_regexp): Now a
9165         gdb::optional<compiled_regex>.
9166         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9167         (free_skiplist_entry): Remove regfree call.
9168         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9169         compiled_regex and gdb::optional.
9170         * symtab.c: Include "common/gdb_optional.h".
9171         (search_symbols): Use compiled_regex and gdb::optional.
9172         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9173         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9174         to gdb_regex.c.
9175
9176 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9177
9178         * regcache.c (regcache::save): Avoid buffer use.
9179         (regcache::dump): Likewise.
9180
9181 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9182
9183         * sh-tdep.c (sh_pseudo_register_read): Remove
9184         MAX_REGISTER_SIZE.
9185         (sh_pseudo_register_write): Likewise.
9186         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9187         (sh64_pseudo_register_write): Likewise
9188
9189 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9190
9191         * aarch64-tdep.c (aarch64_store_return_value): Use
9192         V_REGISTER_SIZE.
9193         (aarch64_pseudo_read_value): Likewise.
9194         (aarch64_pseudo_write): Likewise.
9195
9196 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9197
9198         * regformats/regdef.h (set_register_cache): Remove the
9199         declaration.
9200
9201 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9202
9203         * frame.c (frame_unwind_register_signed): Use
9204         frame_unwind_register_value.
9205
9206 2017-06-06  Pedro Alves  <palves@redhat.com>
9207
9208         PR breakpoints/21553
9209         * breakpoint.c (create_breakpoints_sal_default)
9210         (init_breakpoint_sal, create_breakpoint_sal): Use
9211         gdb::unique_xmalloc_ptr for string parameters.
9212         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9213         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9214         (base_breakpoint_create_breakpoints_sal)
9215         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9216         (strace_marker_create_breakpoints_sal)
9217         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9218         string parameters.
9219         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9220         gdb::unique_xmalloc_ptr for string parameters.
9221         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9222         parameters.
9223
9224 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9225
9226         * alpha-tdep.c (alpha_register_to_value): Use
9227         get_frame_register_value.
9228         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9229
9230 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9231
9232         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9233         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9234         (ia64_value_to_register): Likewise.
9235         (ia64_extract_return_value): Likewise.
9236         (ia64_store_return_value): Likewise.
9237         (ia64_push_dummy_call): Likewise.
9238
9239 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9240
9241         GDB 8.0 released.
9242
9243 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9244
9245         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9246
9247 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9248
9249         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9250         parameter.
9251         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9252
9253 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9254
9255         * event-loop.c (poll_timers): Unallocate timer using delete
9256         instead of xfree.
9257
9258 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9259
9260         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9261         (struct breakpoint) <~breakpoint>: New.
9262         (struct watchpoint): Inherit from breakpoint.
9263         <~watchpoint>: New.
9264         <base>: Remove.
9265         (struct tracepoint): Inherit from breakpoint.
9266         <base>: Remove.
9267         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9268         (struct longjmp_breakpoint): Inherit from breakpoint.
9269         <~longjmp_breakpoint>: New.
9270         <base>: Remove.
9271         (new_breakpoint_from_type): Remove casts.
9272         (watchpoint_in_thread_scope): Remove reference to base field.
9273         (watchpoint_del_at_next_stop): Likewise.
9274         (update_watchpoint): Likewise.
9275         (watchpoint_check): Likewise.
9276         (bpstat_check_watchpoint): Likewise.
9277         (set_longjmp_breakpoint): Likewise.
9278         (struct fork_catchpoint): Inherit from breakpoint.
9279         <base>: Remove.
9280         (struct solib_catchpoint): Inherit from breakpoint.
9281         <~solib_catchpoint>: New.
9282         <base>: Remove.
9283         (dtor_catch_solib): Change to ...
9284         (solib_catchpoint::~solib_catchpoint): ... this.
9285         (breakpoint_hit_catch_solib): Remove reference to base field.
9286         (add_solib_catchpoint): Likewise.
9287         (create_fork_vfork_event_catchpoint): Likewise.
9288         (struct exec_catchpoint): Inherit from breakpoint.
9289         <~exec_catchpoint>: New.
9290         <base>: Remove.
9291         (dtor_catch_exec): Change to ...
9292         (exec_catchpoint::~exec_catchpoint): ... this.
9293         (dtor_watchpoint): Change to ...
9294         (watchpoint::~watchpoint): ... this.
9295         (watch_command_1): Remove reference to base field.
9296         (catch_exec_command_1): Likewise.
9297         (base_breakpoint_dtor): Change to ...
9298         (breakpoint::~breakpoint): ... this.
9299         (base_breakpoint_ops): Remove dtor field value.
9300         (longjmp_bkpt_dtor): Change to ...
9301         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9302         (strace_marker_create_breakpoints_sal): Remove reference to base
9303         field.
9304         (delete_breakpoint): Don't manually call breakpoint destructor.
9305         (create_tracepoint_from_upload): Remove reference to base field.
9306         (trace_pass_set_count): Likewise.
9307         (initialize_breakpoint_ops): Don't initialize
9308         momentary_breakpoint_ops, don't set dtors.
9309         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9310         <~ada_catchpoint>: New.
9311         <base>: Remove.
9312         (create_excep_cond_exprs): Remove reference to base field.
9313         (dtor_exception): Change to ...
9314         (ada_catchpoint::~ada_catchpoint): ... this.
9315         (dtor_catch_exception): Remove.
9316         (dtor_catch_exception_unhandled): Remove.
9317         (dtor_catch_assert): Remove.
9318         (create_ada_exception_catchpoint): Remove reference to base
9319         field.
9320         (initialize_ada_catchpoint_ops): Don't set dtors.
9321         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9322         breakpoint.
9323         <~signal_catchpoint>: New.
9324         <base>: Remove.
9325         (signal_catchpoint_dtor): Change to ...
9326         (signal_catchpoint::~signal_catchpoint): ... this.
9327         (create_signal_catchpoint): Remove reference to base field.
9328         (initialize_signal_catchpoint_ops): Don't set dtor.
9329         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9330         from breakpoint.
9331         <~syscall_catchpoint>: New.
9332         <base>: Remove.
9333         (dtor_catch_syscall): Change to ...
9334         (syscall_catchpoint::~syscall_catchpoint): ... this.
9335         (create_syscall_event_catchpoint): Remove reference to base
9336         field.
9337         (initialize_syscall_catchpoint_ops): Don't set dtor.
9338         * break-catch-throw.c (struct exception_catchpoint): Inherit
9339         from breakpoint.
9340         <~exception_catchpoint>: New.
9341         <base>: Remove.
9342         (dtor_exception_catchpoint): Change to ...
9343         (exception_catchpoint::~exception_catchpoint): ... this.
9344         (handle_gnu_v3_exceptions): Remove reference to base field.
9345         (initialize_throw_catchpoint_ops): Don't set dtor.
9346         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9347         field.
9348         * remote.c (remote_get_tracepoint_status): Likewise.
9349         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9350         * tracefile.c (tracefile_fetch_registers): Likewise.
9351         * tracepoint.c (actions_command): Likewise.
9352         (validate_actionline): Likewise.
9353         (tfind_1): Likewise.
9354         (get_traceframe_location): Likewise.
9355         (find_matching_tracepoint_location): Likewise.
9356         (parse_tracepoint_status): Likewise.
9357         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9358
9359 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9360
9361         * breakpoint.c (struct longjmp_breakpoint): New struct.
9362         (is_tracepoint_type): Change return type to bool.
9363         (is_longjmp_type): New function.
9364         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9365         (set_raw_breakpoint_without_location): Use
9366         new_breakpoint_from_type.
9367         (set_raw_breakpoint): Likewise.
9368
9369 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9370
9371         * breakpoint.c (new_breakpoint_from_type): New function.
9372         (create_breakpoint_sal): Use new_breakpoint_from_type and
9373         unique_ptr.
9374         (create_breakpoint): Likewise.
9375
9376 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9377
9378         * memattr.c (mem_info_command): Rename to ...
9379         (info_mem_command): ... this.
9380         (mem_enable_command): Rename to ...
9381         (enable_mem_command): ... this.
9382         (mem_disable_command): Rename to ...
9383         (disable_mem_command): ... this.
9384         (mem_delete_command): Rename to ...
9385         (delete_mem_command): ... this.
9386         (_initialize_mem): Adjust function names.
9387
9388 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9389
9390         * btrace.c (handle_pt_insn_events): New.
9391         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9392         STATUS.  Split into this and ...
9393         (handle_pt_insn_event_flags): ... this.
9394
9395 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9396
9397         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9398         and struct pt_insn.resynced.
9399         * configure: Regenerated.
9400         * config.in: Regenerated.
9401
9402 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9403
9404         * btrace.c (ftrace_find_call_by_number): New function.
9405         (ftrace_new_function): Store objects, not pointers.
9406         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9407         ftrace_new_gap, ftrace_update_function,
9408         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9409         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9410         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9411         btrace_ends_with_single_insn, btrace_call_get): Account for
9412         btrace_thread_info::functions now storing objects.
9413         * btrace.h (struct btrace_thread_info): Add constructor.
9414         (struct btrace_thread_info) <functions>: Make std::vector.
9415         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9416         Initialize with default values.
9417         * record-btrace.c (record_btrace_frame_sniffer): Account for
9418         btrace_thread_info::functions now storing objects.
9419
9420 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9421
9422         * btrace.c: Remove typedef bfun_s.
9423         (ftrace_new_gap): Directly add gaps to the list of gaps.
9424         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9425         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9426         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9427         instead of gdb VEC.
9428
9429 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9430
9431         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9432         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9433         with btrace_thread_info::next_segment and
9434         btrace_thread_info::prev_segment.
9435         * btrace.h: Remove struct btrace_func_link.
9436         (struct btrace_function): Replace pair of function segment pointers
9437         with pair of indices.
9438         * python/py-record-btrace.c (btpy_call_prev_sibling,
9439         btpy_call_next_sibling): Replace references to
9440         btrace_thread_info::segment with btrace_thread_info::next_segment and
9441         btrace_thread_info::prev_segment.
9442         * record-btrace.c (record_btrace_frame_this_id): Use
9443         btrace_find_call_by_number.
9444
9445 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9446
9447         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9448         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9449         btrace_insn_next, btrace_insn_prev): Remove references to
9450         btrace_thread_info::flow.
9451         * btrace.h (struct btrace_function): Remove FLOW.
9452
9453 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9454
9455         * btrace.c (ftrace_find_call_by_number): New function.
9456         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9457         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9458         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9459         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9460         index.
9461         * btrace.h (struct btrace_function): Turn UP into an index.
9462         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9463         as an index.
9464         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9465         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9466         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9467
9468 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9469
9470         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9471         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9472         ftrace_update_function, ftrace_compute_global_level_offset,
9473         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9474         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9475         btrace_insn_end, btrace_is_empty): Remove references to
9476         btrace_thread_info::begin and btrace_thread_info::end.
9477         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9478         (struct btrace_thread_info) <functions>: Adjust comment.
9479         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9480         btrace_thread_info::begin.
9481
9482 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9483
9484         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9485         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9486         ftrace_update_function): Remove arguments that implicitly were always
9487         BTINFO->END.
9488         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9489         Don't pass BTINFO->END.
9490
9491 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9492
9493         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9494         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9495         btrace_find_insn_by_number): Replace function segment pointer with
9496         index.
9497         (btrace_insn_cmp): Simplify.
9498         * btrace.h: (struct btrace_insn_iterator) Rename index to
9499         insn_index.  Replace function segment pointer with index into function
9500         segment vector.
9501         * record-btrace.c (record_btrace_call_history): Replace function
9502         segment pointer use with index.
9503         (record_btrace_frame_sniffer): Retrieve function call segment through
9504         vector.
9505         (record_btrace_set_replay): Remove defunc't safety check.
9506
9507 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9508
9509         * btrace.c (btrace_ends_with_single_insn): New function.
9510         (btrace_call_get, btrace_call_number, btrace_call_begin,
9511         btrace_call_end, btrace_call_next, btrace_call_prev,
9512         btrace_find_call_by_number): Use index into call segment vector
9513         instead of pointer.
9514         (btrace_call_cmp): Simplify.
9515         * btrace.h (struct btrace_call_iterator): Replace function call segment
9516         pointer with index into vector.
9517         * record-btrace.c (record_btrace_call_history): Use index instead of
9518         pointer.
9519
9520 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9521
9522         * btrace.c (btrace_insn_begin, btrace_insn_end,
9523         btrace_find_insn_by_number): Add btinfo to iterator.
9524         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9525
9526 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9527
9528         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9529         and save pointers directly.
9530         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9531         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9532         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9533         changed signature of functions.
9534         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9535         (btrace_fetch): Remove code that adds btrace_function pointers to
9536         vector of btrace_functions.
9537         (btrace_clear): Simplify freeing vector of btrace_functions.
9538
9539 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9540
9541         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9542         Replace VEC_* with std::vector functions.
9543         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9544         (struct btrace_thread_info)<functions>: Change type to std::vector.
9545
9546 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9547
9548         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9549         "Removed targets and native configurations" up.  Merge duplicate
9550         "New commands" sub-sections.  Add "New options" sub-sections.
9551
9552 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9553
9554         * defs.h (copy_integer_to_size): New declaration.
9555         * findvar.c (copy_integer_to_size): New function.
9556         (do_cint_test): New selftest function.
9557         (copy_integer_to_size_test): Likewise.
9558         (_initialize_findvar): Likewise.
9559         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9560         (mips_fbsd_collect_reg): Use raw_collect_integer.
9561         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9562         (mips64_fill_gregset): Use raw_collect_integer
9563         (mips64_fill_fpregset): Use raw_supply_integer.
9564         * regcache.c (regcache::raw_supply_integer): New function.
9565         (regcache::raw_collect_integer): Likewise.
9566         * regcache.h: (regcache::raw_supply_integer): New declaration.
9567         (regcache::raw_collect_integer): Likewise.
9568
9569 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9570
9571         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9572         (COMMON_OBS): Add gdbarch-selftests.o.
9573         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9574         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9575         * gdbarch-selftests.c: New file.
9576         * regcache.h (regcache) <~regcache>: Mark it virtual if
9577         GDB_SELF_TEST.
9578         <raw_write>: Likewise.
9579
9580 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9581
9582         * regcache.c (current_regcache): Change it to
9583         regcache::current_regcache.
9584         (regcache_observer_target_changed): Update.
9585         (regcache_thread_ptid_changed): Make it a regcache static
9586         method.
9587         (regcache_thread_ptid_changed): Update.
9588         (class regcache_access): New.
9589         (current_regcache_test): Update.
9590         (_initialize_regcache): Update.
9591         * regcache.h: Include forward_list.
9592         (regcache): Declare regcache_thread_ptid_changed and declare
9593         registers_changed_ptid as friend.
9594
9595 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9596
9597         * i387-tdep.c (i387_register_to_value): Use register_size
9598         instead of TYPE_LENGTH.
9599         * m68k-tdep.c (m68k_register_to_value): Likewise.
9600
9601 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9602
9603         * i387-tdep.c (i387_convert_register_p): Return false if type
9604         code isn't TYPE_CODE_FLT.
9605
9606 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9607
9608         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9609         length is 4.
9610         (alpha_register_to_value): Remove type length check.
9611         (alpha_value_to_register): Likewise.
9612
9613 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9614
9615         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9616         TYPE_CODE_FLT.
9617
9618 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9619
9620         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9621         TYPE_CODE_FLT or not.
9622
9623 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9624
9625         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9626         * avr-tdep.c (avr_gdbarch_init): Likewise.
9627         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9628         * cris-tdep.c (cris_gdbarch_init): Likewise.
9629         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9630         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9631         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9632         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9633         * mep-tdep.c (mep_gdbarch_init): Likewise.
9634         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9635         * mips-tdep.c (mips_gdbarch_init): Likewise.
9636         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9637         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9638         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9639         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9640         * v850-tdep.c (v850_gdbarch_init): Likewise.
9641
9642 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9643
9644         * selftest-arch.c (tests_with_arch): Call registers_changed
9645         and reinit_frame_cache.
9646         * selftest.c (run_self_tests): Likewise.
9647
9648 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9649
9650         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9651         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9652
9653 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9654
9655         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9656         set_gdbarch_print_insn.
9657
9658 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9659
9660         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9661         set_gdbarch_print_insn.
9662
9663 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9664
9665         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9666         set_gdbarch_print_insn.
9667         * arc-tdep.c (arc_gdbarch_init): Likewise.
9668         * arch-utils.c: include dis-asm.h.
9669         (default_print_insn): New function.
9670         * arch-utils.h (default_print_insn): Declare.
9671         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9672         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9673         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9674         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9675         * frv-tdep.c (frv_gdbarch_init): Likewise.
9676         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9677         * gdbarch.sh (print_insn): Use default_print_insn.
9678         * gdbarch.c: Regenerated.
9679         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9680         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9681         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9682         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9683         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9684         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9685         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9686         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9687         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9688         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9689         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9690         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9691         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9692         * mt-tdep.c (mt_gdbarch_init): Likewise.
9693         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9694         * nios2-tdep.c (nios2_print_insn): Remove.
9695         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9696         * rx-tdep.c (rx_gdbarch_init): Likewise.
9697         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9698         * score-tdep.c (score_print_insn): Remove.
9699         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9700         * sh-tdep.c (sh_gdbarch_init): Likewise.
9701         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9702         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9703         * tic6x-tdep.c (tic6x_print_insn): Remove.
9704         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9705         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9706         * v850-tdep.c (v850_gdbarch_init): Likewise.
9707         * vax-tdep.c (vax_gdbarch_init): Likewise.
9708         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9709         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9710
9711 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9712
9713         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9714         (MIPS_FP0_REGNUM): Remove.
9715         (MIPS_FSR_REGNUM): Remove.
9716         (mips_fbsd_supply_fpregs): Use mips_regnum.
9717         (mips_fbsd_supply_gregs): Likewise.
9718         (mips_fbsd_collect_fpregs): Likewise.
9719         (mips_fbsd_collect_gregs): Likewise.
9720
9721 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9722
9723         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9724         (getpfpregs_supplies): New function.
9725         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9726         getfpregs_supplies.
9727         (mips_fbsd_store_inferior_registers): Likewise.
9728
9729 2017-05-22  Pedro Alves <palves@redhat.com>
9730
9731         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9732         maintainer.
9733
9734 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9735
9736         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9737         (store_register): Likewise.
9738         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9739         (get_decimal_float_return_value): Likewise.
9740         (do_ppc_sysv_return_value): Likewise.
9741         (ppc64_sysv_abi_push_integer): Likewise.
9742         (ppc64_sysv_abi_push_freg): Likewise.
9743         (ppc64_sysv_abi_return_value_base): Likewise.
9744         (ppc64_sysv_abi_return_value): Likewise.
9745         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9746         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9747         * rs6000-nat.c: Likewise.
9748         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9749         (rs6000_value_to_register): Likewise.
9750         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9751
9752 2017-05-21  Tom Tromey  <tom@tromey.com>
9753
9754         PR rust/21466:
9755         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9756         arrays as "[T]", not "[T; ]".
9757
9758 2017-05-19  Tom Tromey  <tom@tromey.com>
9759
9760         PR rust/21484:
9761         * rust-lang.c (exp_descriptor_rust): New function.
9762         (rust_language_defn): Use it.
9763         * p-lang.c (pascal_language_defn): Update.
9764         * opencl-lang.c (opencl_language_defn): Update.
9765         * objc-lang.c (objc_language_defn): Update.
9766         * m2-lang.c (m2_language_defn): Update.
9767         * language.h (struct language_defn)
9768         <la_watch_location_expression>: New member.
9769         * language.c (unknown_language_defn, auto_language_defn)
9770         (local_language_defn): Update.
9771         * go-lang.c (go_language_defn): Update.
9772         * f-lang.c (f_language_defn): Update.
9773         * d-lang.c (d_language_defn): Update.
9774         * c-lang.h (c_watch_location_expression): Declare.
9775         * c-lang.c (c_watch_location_expression): New function.
9776         (c_language_defn, cplus_language_defn, asm_language_defn)
9777         (minimal_language_defn): Use it.
9778         * breakpoint.c (watch_command_1): Call
9779         la_watch_location_expression.
9780         * ada-lang.c (ada_language_defn): Update.
9781
9782 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9783
9784         PR tui/21482
9785         * gdb_curses.h (NOMACROS): Define.
9786         (NCURSES_NOMACROS): Define.
9787
9788 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9789
9790         PR tui/21482
9791         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9792         arg to char *.
9793         * tui/tui-wingeneral.c (box_win): Likewise.
9794         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9795         (tui_show_source_line): Likewise.
9796         (tui_show_exec_info_content): Likewise.
9797
9798 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9799
9800         * sparc-tdep.c (sparc_structure_return_p)
9801         (sparc_arg_on_registers_p): New functions.
9802         (sparc32_store_arguments): Use them.
9803         * sparc64-tdep.c (sparc64_16_byte_align_p)
9804         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9805         Handle TYPE_CODE_ARRAY.
9806
9807 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9808
9809         * cli/cli-decode.c (add_alias_cmd): New function.
9810         * command.h (add_alias_cmd): Declare.
9811         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9812         instead call add_alias_cmd.
9813
9814 2017-05-17  Pedro Alves  <palves@redhat.com>
9815
9816         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9817         (nat_makefile_frag): ... this.  All references updated.
9818         * configure.ac: Likewise.
9819         * configure.nat: Likewise.  Enhance comments.
9820         * configure: Regenerate.
9821
9822 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9823
9824         * procfs.c (procfs_create_inferior): Change prototype to match
9825         definition.
9826
9827 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9828
9829         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9830         C++ compiler warning.
9831
9832 2017-05-12  Tom Tromey  <tom@tromey.com>
9833
9834         PR rust/21483:
9835         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9836         recurse, just call value_struct_elt directly.
9837
9838 2017-05-12  Tom Tromey  <tom@tromey.com>
9839
9840         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9841         OP_RUST_ARRAY>: Fix.
9842
9843 2017-05-12  Tom Tromey  <tom@tromey.com>
9844
9845         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9846
9847 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9848
9849         * regcache.c: Include <forward_list>.
9850         (struct regcache_list): Remove.
9851         (current_regcache): Update.
9852         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9853         (regcache_thread_ptid_changed): Likewise.
9854         (registers_changed_ptid): Likewise.
9855         (current_regcache_size): Likewise.
9856
9857 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9858
9859         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9860         (current_regcache_size): New function.
9861         (current_regcache_test): New function.
9862         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9863
9864 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9865
9866         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9867         (print_gp_register_row): Use get_frame_register_value.
9868
9869 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9870
9871         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9872         (mips_supply_fpregset): Likewise.
9873         (mips64_supply_gregset): Likewise.
9874
9875 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9876
9877         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9878         regcache->raw_supply_zeroed.
9879
9880 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9881
9882         * configure.nat: Rearrange 'case' statements to match
9883         host before cpu.
9884
9885 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9886
9887         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9888         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9889         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9890         "@nat_extra_makefile_frag@".
9891         (Makefile): Remove dependency on "@frags@".
9892         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9893         (data-directory/Makefile): Likewise.
9894         * config/aarch64/linux.mh: Deleted; moved contents to
9895         "gdb/configure.nat".
9896         * config/alpha/alpha-linux.mh: Likewise.
9897         * config/alpha/nbsd.mh: Likewise.
9898         * config/arm/linux.mh: Likewise.
9899         * config/arm/nbsdelf.mh: Likewise.
9900         * config/i386/cygwin.mh: Likewise.
9901         * config/i386/cygwin64.mh: Likewise.
9902         * config/i386/darwin.mh: Likewise.
9903         * config/i386/fbsd.mh: Likewise.
9904         * config/i386/fbsd64.mh: Likewise.
9905         * config/i386/go32.mh: Likewise.
9906         * config/i386/i386gnu.mh: Likewise.
9907         * config/i386/i386sol2.mh: Likewise.
9908         * config/i386/linux.mh: Likewise.
9909         * config/i386/linux64.mh: Likewise.
9910         * config/i386/mingw.mh: Likewise.
9911         * config/i386/mingw64.mh: Likewise.
9912         * config/i386/nbsd64.mh: Likewise.
9913         * config/i386/nbsdelf.mh: Likewise.
9914         * config/i386/nto.mh: Likewise.
9915         * config/i386/obsd.mh: Likewise.
9916         * config/i386/obsd64.mh: Likewise.
9917         * config/i386/sol2-64.mh: Likewise.
9918         * config/ia64/linux.mh: Likewise.
9919         * config/m32r/linux.mh: Likewise.
9920         * config/m68k/linux.mh: Likewise.
9921         * config/m68k/nbsdelf.mh: Likewise.
9922         * config/m68k/obsd.mh: Likewise.
9923         * config/m88k/obsd.mh: Likewise.
9924         * config/mips/fbsd.mh: Likewise.
9925         * config/mips/linux.mh: Likewise.
9926         * config/mips/nbsd.mh: Likewise.
9927         * config/mips/obsd64.mh: Likewise.
9928         * config/pa/linux.mh: Likewise.
9929         * config/pa/nbsd.mh: Likewise.
9930         * config/pa/obsd.mh: Likewise.
9931         * config/powerpc/aix.mh: Likewise.
9932         * config/powerpc/fbsd.mh: Likewise.
9933         * config/powerpc/linux.mh: Likewise.
9934         * config/powerpc/nbsd.mh: Likewise.
9935         * config/powerpc/obsd.mh: Likewise.
9936         * config/powerpc/ppc64-linux.mh: Likewise.
9937         * config/powerpc/spu-linux.mh: Likewise.
9938         * config/s390/linux.mh: Likewise.
9939         * config/sh/nbsd.mh: Likewise.
9940         * config/sparc/fbsd.mh: Likewise.
9941         * config/sparc/linux.mh: Likewise.
9942         * config/sparc/linux64.mh: Likewise.
9943         * config/sparc/nbsd64.mh: Likewise.
9944         * config/sparc/nbsdelf.mh: Likewise.
9945         * config/sparc/obsd64.mh: Likewise.
9946         * config/sparc/sol2.mh: Likewise.
9947         * config/tilegx/linux.mh: Likewise.
9948         * config/vax/nbsdelf.mh: Likewise.
9949         * config/vax/obsd.mh: Likewise.
9950         * config/xtensa/linux.mh: Likewise.
9951         * config/i386/i386gnu.mn: New file, with excerpts from
9952         "config/i386/i386gnu.mh".
9953         * configure: Regenerate.
9954         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9955         *.mh files under "gdb/config".
9956         * configure.nat: New file, with contents from the
9957         "gdb/config/*/*.mh" files.
9958
9959 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9960
9961         * btrace.c (btrace_clear): Free insn vector.
9962
9963 2017-05-05  Pedro Alves  <palves@redhat.com>
9964
9965         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9966         * configure: Regenerate.
9967
9968 2017-05-04  Pedro Alves  <palves@redhat.com>
9969
9970         * Makefile.in (SFILES): Add progspace-and-thread.c.
9971         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9972         (COMMON_OBS): Add progspace-and-thread.o.
9973         * breakpoint.c: Include "progspace-and-thread.h".
9974         (update_inserted_breakpoint_locations)
9975         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9976         Use scoped_restore_current_pspace_and_thread.
9977         (create_std_terminate_master_breakpoint): Use
9978         scoped_restore_current_program_space.
9979         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9980         (print_breakpoint_location): Use
9981         scoped_restore_current_program_space.
9982         (bp_loc_is_permanent): Use
9983         scoped_restore_current_pspace_and_thread.
9984         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9985         (download_tracepoint_locations): Use
9986         scoped_restore_current_pspace_and_thread.
9987         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9988         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9989         (enum step_over_calls_kind): Moved from inferior.h.
9990         (class scoped_restore_current_thread): New class.
9991         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9992         declaration.
9993         (scoped_restore_current_thread): New class.
9994         * infcmd.c: Include "common/gdb_optional.h".
9995         (continue_1, proceed_after_attach): Use
9996         scoped_restore_current_thread.
9997         (notice_new_inferior): Use scoped_restore_current_thread.
9998         * inferior.c: Include "progspace-and-thread.h".
9999         (restore_inferior, save_current_inferior): Delete.
10000         (add_inferior_command, clone_inferior_command): Use
10001         scoped_restore_current_pspace_and_thread.
10002         * inferior.h (scoped_restore_current_inferior): New class.
10003         * infrun.c: Include "progspace-and-thread.h" and
10004         "common/gdb_optional.h".
10005         (follow_fork_inferior): Use
10006         scoped_restore_current_pspace_and_thread.
10007         (scoped_restore_exited_inferior): New class.
10008         (handle_vfork_child_exec_or_exit): Use
10009         scoped_restore_exited_inferior,
10010         scoped_restore_current_pspace_and_thread,
10011         scoped_restore_current_thread and scoped_restore.
10012         (fetch_inferior_event): Use scoped_restore_current_thread.
10013         * linespec.c (decode_line_full, decode_line_1): Use
10014         scoped_restore_current_program_space.
10015         * mi/mi-main.c: Include "progspace-and-thread.h".
10016         (exec_continue): Use scoped_restore_current_thread.
10017         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10018         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10019         * proc-service.c (ps_pglobal_lookup): Use
10020         scoped_restore_current_program_space.
10021         * progspace-and-thread.c: New file.
10022         * progspace-and-thread.h: New file.
10023         * progspace.c (release_program_space, clone_program_space): Use
10024         scoped_restore_current_program_space.
10025         (restore_program_space, save_current_program_space)
10026         (save_current_space_and_thread): Delete.
10027         (switch_to_program_space_and_thread): Moved to
10028         progspace-and-thread.c.
10029         * progspace.h (save_current_program_space)
10030         (save_current_space_and_thread): Delete declarations.
10031         (scoped_restore_current_program_space): New class.
10032         * remote.c (remote_btrace_maybe_reopen): Use
10033         scoped_restore_current_thread.
10034         * symtab.c: Include "progspace-and-thread.h".
10035         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10036         * thread.c (print_thread_info_1): Use
10037         scoped_restore_current_thread.
10038         (struct current_thread_cleanup): Delete.
10039         (do_restore_current_thread_cleanup)
10040         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10041         (scoped_restore_current_thread::~scoped_restore_current_thread):
10042         ... this new dtor.
10043         (make_cleanup_restore_current_thread): Rename/convert to ...
10044         (scoped_restore_current_thread::scoped_restore_current_thread):
10045         ... this new ctor.
10046         (thread_apply_all_command): Use scoped_restore_current_thread.
10047         (thread_apply_command): Use scoped_restore_current_thread.
10048         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10049         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10050
10051 2017-05-04  Pedro Alves  <palves@redhat.com>
10052
10053         * thread.c (make_cleanup_restore_current_thread): Move
10054         find_thread_ptid call before the is_stopped call.  Assert that the
10055         thread is found.  Replace is_stopped call by checking the thread's
10056         state directly.  Remove unnecessary NULL-thread check.
10057
10058 2017-05-04  Pedro Alves  <palves@redhat.com>
10059
10060         * corelow.c (thread_section_name): New class.
10061         (get_core_register_section, get_core_siginfo): Use it.
10062
10063 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10064
10065         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10066         (get_core_register_section): Remove xfree of NULL pointer.
10067
10068 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10069
10070         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10071         * regcache.c (regcache::raw_supply_zeroed): New function.
10072         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10073
10074 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10075
10076         * gdbarch.sh: Remove commented out definition of
10077         TARGET_CHAR_BIT.
10078         * gdbarch.h: Re-generate.
10079
10080 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10081
10082         * configure: Regenerate.
10083
10084 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10085
10086         * solib-target.c (solib_target_relocate_section_addresses):
10087         Remove num_section_bases, num_bases, segment_bases variables.
10088
10089 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10090
10091         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10092
10093 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10094
10095         * solib-target.c: Include <vector>
10096         (struct lm_info_target) <~lm_info_target>: Remove.
10097         <segment_bases, section_bases>: Change type to
10098         std::vector<CORE_ADDR>.
10099         (library_list_start_segment, library_list_start_section,
10100         library_list_end_library,
10101         solib_target_relocate_section_addresses): Adjust.
10102
10103 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10104
10105         * gdbarch.sh (software_single_step): Change return type to
10106         std::vector<CORE_ADDR>.
10107         * gdbarch.c, gdbarch.h: Re-generate.
10108         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10109         Adjust.
10110         (arm_deal_with_atomic_sequence_raw): Adjust.
10111         (thumb_get_next_pcs_raw): Adjust.
10112         (arm_get_next_pcs_raw): Adjust.
10113         (arm_get_next_pcs): Adjust.
10114         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10115         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10116         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10117         (alpha_software_single_step): Adjust.
10118         * alpha-tdep.h (alpha_software_single_step): Adjust.
10119         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10120         * arm-tdep.c (arm_software_single_step): Adjust.
10121         (arm_breakpoint_kind_from_current_state): Adjust.
10122         * arm-tdep.h (arm_software_single_step): Adjust.
10123         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10124         * cris-tdep.c (cris_software_single_step): Adjust.
10125         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10126         (micromips_deal_with_atomic_sequence): Adjust.
10127         (deal_with_atomic_sequence): Adjust.
10128         (mips_software_single_step): Adjust.
10129         * mips-tdep.h (mips_software_single_step): Adjust.
10130         * moxie-tdep.c (moxie_software_single_step): Adjust.
10131         * nios2-tdep.c (nios2_software_single_step): Adjust.
10132         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10133         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10134         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10135         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10136         * sparc-tdep.c (sparc_software_single_step): Adjust.
10137         * spu-tdep.c (spu_software_single_step): Adjust.
10138         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10139
10140 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10141
10142         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10143         * gdbarch.h: Re-generate.
10144
10145 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10146
10147         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10148         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10149         * python/py-instruction.c, python/py-instruction.h: New file.
10150         * python/py-record.c: Add py-instruction.h include.
10151         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10152         gdb.RecordInstruction.
10153         * python/python-internal.h: Add gdbpy_initialize_instruction
10154         declaration.
10155         * python/python.c (do_start_initialization): Add
10156         gdbpy_initialize_instruction.
10157
10158 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10159
10160         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10161         Remove.
10162         (btrace_func_from_recpy_func): New function.
10163         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10164         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10165         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10166         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10167         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10168         Also, use new helper functions.
10169         (btpy_list_item): Use new helper functions.
10170         (recpy_bt_function_call_history): Use new type name.
10171         (btpy_call_getset): Remove.
10172         (gdbpy_initialize_btrace): Remove code to initialize
10173         gdb.BtraceFunctionCall.
10174         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10175         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10176         recpy_bt_func_prev, recpy_bt_func_next): New export.
10177         * python/py-record.c (recpy_func_type): New static object.
10178         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10179         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10180         recpy_func_next): New function.
10181         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10182         (recpy_func_getset): New static object.
10183         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10184         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10185
10186 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10187
10188         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10189         (btpy_object, btpy_insn_type, btpy_new): Remove.
10190         (btpy_list_object): Use gdb.RecordInstruction type instead of
10191         gdb.BtraceInstruction type.
10192         (btrace_insn_from_recpy_insn): New function.
10193         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10194         btpy_new.
10195         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10196         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10197         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10198         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10199         instead of btpy_object.
10200         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10201         btpy_insn_data, btpy_insn_decode): Rename to ...
10202         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10203         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10204         recpy_bt_insn_decode): This.  Also, use new helper functions.
10205         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10206         recpy_insn_type.
10207         (btpy_insn_getset): Remove.
10208         (gdbpy_initialize_btrace): Remove code to initialize
10209         gdb.BtraceInstruction.  Use recpy_element_object.
10210         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10211         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10212         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10213         * python/py-record.c (recpy_insn_type): New static object.
10214         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10215         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10216         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10217         New function.
10218         (recpy_insn_getset): New static object.
10219         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10220         * python/py-record.h (recpy_element_object): New typedef.
10221         (recpy_insn_type, recpy_insn_new): New export.
10222
10223 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10224
10225         * py-record-btrace.c (btpy_insn_new): Removed.
10226         (btpy_insn_or_gap_new): New function.
10227         (btpy_insn_error): Removed.
10228         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10229         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10230         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10231         btpy_insn_or_gap_new instead of btpy_insn_new.
10232         (btpy_insn_getset): Remove btpy_insn_error.
10233         * py-record.c (recpy_gap_type): New static object.
10234         (recpy_gap_object): New typedef.
10235         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10236         recpy_gap_reason_string): New function.
10237         (recpy_gap_getset): New static object.
10238         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10239         * py-record.h (recpy_gap_new): New export.
10240
10241 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10242
10243         * python/py-record.c (recpy_ptid): Remove.
10244         (recpy_record_getset): Remove recpy_ptid.
10245
10246 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10247
10248         * btrace.c (btrace_fetch): Set inferior_ptid.
10249         * python/py-record-btrace.c: Add "py-record.h" include.
10250         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10251         recpy_bt_end, recpy_bt_instruction_history,
10252         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10253         in gdb.Record object instead of current ptid.
10254         * python/py-record.c: Include new "py-record.h" file.
10255         (recpy_record_object): Moved to py-record.h.
10256         * python/py-record.h: New file.
10257
10258 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10259
10260         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10261         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10262         indentation.
10263
10264 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10265
10266         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10267         the past maintainers section.
10268
10269 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10270
10271         * infcmd.c (get_return_value): Use regcache ctor, and remove
10272         cleanup.
10273
10274 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10275             Pedro Alves  <palves@redhat.com>
10276
10277         * regcache.c (regcache::regcache): New tag dispatch ctor.
10278         (do_cooked_read): Moved above.
10279         (regcache_dup): Use the tag dispatch ctor..
10280         * regcache.h (regcache): Declare ctor, delete copy ctor and
10281         assignment operator, remove friend regcache_dup.
10282
10283 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10284
10285         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10286         call method save instead of regcache_cpy.
10287         * regcache.h (struct regcache): Make regcache_dup a friend.
10288
10289 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10290
10291         * regcache.c (struct regcache): Move to regcache.h
10292         (regcache::arch): New method.
10293         (regcache_get_ptid): Update.
10294         (get_regcache_arch): Call arch method.
10295         (get_regcache_aspace): Call method aspace.
10296         (register_buffer): Change it to method.
10297         (regcache_save): Change it to regcache::save.
10298         (regcache_restore): Likewise.
10299         (regcache_cpy_no_passthrough): Remove the declaration.
10300         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10301         (regcache_cpy_no_passthrough): Change it to method
10302         cpy_no_passthrough.
10303         (regcache_register_status): Change it to method
10304         get_register_status.
10305         (regcache_invalidate): Change it to method invalidate.
10306         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10307         (regcache_raw_update): Change it to method raw_update.
10308         (regcache_raw_read): Likewise.
10309         (regcache_raw_read_signed): Likewise.
10310         (regcache_raw_read_unsigned): Likewise.
10311         (regcache_raw_write_signed): Likewise.
10312         (regcache_raw_write_unsigned): Likewise.
10313         (regcache_cooked_read): Likewise.
10314         (regcache_cooked_read_value): Likewise.
10315         (regcache_cooked_read_signed): Likewise.
10316         (regcache_cooked_read_unsigned): Likewise.
10317         (regcache_cooked_write_signed): Likewise.
10318         (regcache_cooked_write_unsigned): Likewise.
10319         (regcache_raw_set_cached_value): Likewise.
10320         (regcache_raw_write): Likewise.
10321         (regcache_cooked_write): Likewise.
10322         (regcache_xfer_part): Likewise.
10323         (regcache_raw_read_part): Likewise.
10324         (regcache_raw_write_part): Likewise.
10325         (regcache_cooked_read_part): Likewise.
10326         (regcache_cooked_write_part): Likewise.
10327         (regcache_raw_supply): Likewise.
10328         (regcache_raw_collect): Likewise.
10329         (regcache_transfer_regset): Likewise.
10330         (regcache_supply_regset): Likewise.
10331         (regcache_collect_regset): Likewise.
10332         (regcache_debug_print_register): Likewise.
10333         (enum regcache_dump_what): Move it to regcache.h.
10334         (regcache_dump): Change it to method dump.
10335         * regcache.h (enum regcache_dump_what): New.
10336         (class regcache): New.
10337         * target.c (target_fetch_registers): Call method
10338         debug_print_register.
10339         (target_store_registers): Likewise.
10340
10341 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10342
10343         * windows-nat.c (struct lm_info_windows): Initialize field.
10344         (windows_make_so): Allocate lm_info_windows with new.
10345         (windows_free_so): Free lm_info_windows with delete.
10346
10347 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10348
10349         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10350         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10351         cleanup.
10352         (darwin_free_so): Free lm_info_darwin with delete.
10353
10354 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10355
10356         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10357         <l_addr_p>: Change type to bool.
10358         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10359         (svr4_free_so): Free lm_info_svr4 with delete.
10360         (svr4_copy_library_list): Replace memcpy with call to copy
10361         constructor.
10362         (library_list_start_library, svr4_default_sos): Allocate
10363         lm_info_svr4 with new.
10364
10365 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10366
10367         * solib-target.c (struct lm_info_target): Add destructor,
10368         initialize fields.
10369         <name>: Change type to std::string.
10370         (library_list_start_library): Allocate lm_info_target with new.
10371         (solib_target_free_library_list): Free lm_info_target with
10372         delete.
10373         (solib_target_current_sos): Adapt to std::string.
10374         (solib_target_free_so): Free lm_info_target with delete.
10375
10376 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10377
10378         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10379         fields.
10380         (frv_current_sos): Allocate lm_info_frv with new.
10381         (frv_relocate_main_executable): Free lm_info_frv with delete,
10382         allocate with new.
10383         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10384
10385 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10386
10387         * solib-frv.c (struct lm_info_frv): Fix indentation.
10388
10389 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10390
10391         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10392         map field.
10393         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10394         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10395         and allocate with new.
10396         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10397
10398 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10399
10400         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10401         <filename, member_name>: Change type to std::string.
10402         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10403         (library_list_start_library): Allocate lm_info_aix with new.
10404         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10405         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10406         with copy constructor.
10407
10408 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10409
10410         * solist.h (struct lm_info): Remove.
10411         (struct lm_info_base): New class.
10412         (struct so_list) <lm_info>: Change type to lm_info_base *.
10413         * nto-tdep.c (struct lm_info): Remove.
10414         (lm_addr): Adjust.
10415         * solib-aix.c (struct lm_info): Rename to ...
10416         (struct lm_info_aix): ... this.  Extend lm_info_base.
10417         (lm_info_p): Rename to ...
10418         (lm_info_aix_p): ... this, and adjust.
10419         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10420         solib_aix_parse_libraries, library_list_start_library,
10421         solib_aix_free_library_list, solib_aix_parse_libraries,
10422         solib_aix_get_library_list,
10423         solib_aix_relocate_section_addresses, solib_aix_free_so,
10424         solib_aix_get_section_offsets,
10425         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10426         Adjust.
10427         (struct solib_aix_inferior_data) <library_list>: Adjust.
10428         * solib-darwin.c (struct lm_info): Rename to ...
10429         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10430         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10431         * solib-dsbt.c (struct lm_info): Rename to ...
10432         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10433         (struct dsbt_info) <main_executable_lm_info): Adjust.
10434         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10435         dsbt_relocate_section_addresses): Adjust.
10436         * solib-frv.c (struct lm_info): Rename to ...
10437         (struct lm_info_frv): ... this.  Extend lm_info_base.
10438         (main_executable_lm_info): Adjust.
10439         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10440         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10441         find_canonical_descriptor_in_load_object,
10442         frv_fdpic_find_canonical_descriptor): Adjust.
10443         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10444         to lm_info_svr4.
10445         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10446         svr4_clear_so, svr4_copy_library_list,
10447         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10448         svr4_current_sos, svr4_fetch_objfile_link_map,
10449         solist_update_incremental): Adjust.
10450         * solib-svr4.h (struct lm_info_svr4): Move here from
10451         solib-svr4.c.
10452         * solib-target.c (struct lm_info): Rename to ...
10453         (struct lm_info_target): ... this.  Extend lm_info_base.
10454         (lm_info_p): Rename to ...
10455         (lm_info_target_p): ... this.
10456         (solib_target_parse_libraries, library_list_start_segment,
10457         library_list_start_section, library_list_start_library,
10458         library_list_end_library, solib_target_free_library_list,
10459         solib_target_current_sos, solib_target_free_so,
10460         solib_target_relocate_section_addresses): Adjust.
10461         * windows-nat.c (struct lm_info): Rename to ...
10462         (struct lm_info_windows): ... this.  Extend lm_info_base.
10463         (windows_make_so, handle_load_dll, handle_unload_dll,
10464         windows_xfer_shared_libraries): Adjust.
10465
10466 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10467
10468         * solib-darwin.c (struct darwin_so_list): Remove.
10469         (darwin_current_sos): Allocate an so_list object instead of a
10470         darwin_so_list, separately allocate an lm_info object.
10471         (darwin_free_so): Free lm_info.
10472
10473 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10474
10475         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10476         with fprintf_filtered.
10477
10478 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10479
10480         * regcache.c (regcache::regcache): New function.
10481         (regcache::~regcache): New function.
10482         (regcache_xmalloc_1): Remove.
10483         (regcache_xmalloc): Call new regcache.
10484         (regcache_xfree): Call delete regcache.
10485         (get_thread_arch_aspace_regcache): Call new regcache.
10486
10487 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10488
10489         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10490         lwp instead of ptid_get_lwp.
10491
10492 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10493
10494         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10495         lwp_info instead of getting from inferior_ptid.
10496
10497 2017-04-27  Keith Seitz  <keiths@redhat.com>
10498
10499         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10500         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10501         (CV_CONVERSION_BADNESS): Define.
10502         (rank_one_type): Remove overly restrictive rvalue reference
10503         rank checks.
10504         Add cv-qualifier checks and subranks for type equality.
10505         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10506         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10507         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10508
10509 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10510
10511         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10512         count when creating the object.
10513
10514 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10515             Ulrich Weigand  <uweigand@de.ibm.com>
10516
10517         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10518         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10519         is used in AIX.
10520         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10521         (process_xcoff_symbol): Likewise.
10522         (scan_xcoff_symtab): Likewise.
10523
10524 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10525
10526         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10527         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10528         (ia64_access_reg): Use get_frame_register_unsigned.
10529         (ia64_access_rse_reg): Likewise.
10530         (ia64_libunwind_frame_prev_register): Likewise.
10531
10532 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10533
10534         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10535         * gdbarch.c: Regenerated.
10536         * gdbarch.h: Regenerated.
10537         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10538         visibility external.
10539         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10540         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10541         (enum cfa_how_kind): Move to ...
10542         (struct dwarf2_frame_state_reg_info): Likewise.
10543         (struct dwarf2_frame_state): Likewise.
10544         * dwarf2-frame.h: ... here.
10545         (dwarf2_frame_state_alloc_regs): New declaration.
10546         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10547         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10548
10549 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10550
10551         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10552         regcache_raw_read_unsigned.
10553         (xtensa_pseudo_register_write): Likewise.
10554
10555 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10556
10557         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10558         (nds32_pseudo_register_write): Likewise.
10559
10560 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10561
10562         * regcache.c (struct regcache) <readonly_p>: Change its type
10563         to bool.
10564         (regcache_xmalloc_1): Update parameter type and callers update.
10565
10566 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10567
10568         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10569         set_gdbarch_wchar_bit.
10570         * arm-tdep.c (arm_gdbarch_init): Likewise.
10571
10572 2017-04-25  Pedro Alves  <palves@redhat.com>
10573
10574         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10575         (BothAreRelocatable, memcopy, memmove): Don't define.
10576         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10577         macros.
10578
10579 2017-04-25  Pedro Alves  <palves@redhat.com>
10580
10581         * common/common-defs.h: Include "common/poison.h".
10582         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10583         and adjust.
10584         * common/poison.h: New file.
10585         * common/traits.h: Include <type_traits>.
10586         (Not, Or, Requires): New, moved from common/function-view.h.
10587
10588 2017-04-25  Pedro Alves  <palves@redhat.com>
10589
10590         * breakpoint.h (struct breakpoint): In-class initialize all
10591         fields.  Make boolean fields "bool".
10592         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10593         memset call and initializations no longer necessary.
10594
10595 2017-04-25  Pedro Alves  <palves@redhat.com>
10596
10597         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10598         reference.
10599         (pt_btrace_insn): New function.
10600         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10601
10602 2017-04-25  Pedro Alves  <palves@redhat.com>
10603
10604         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10605         "base" field and inherit from "bp_location" instead.  Add
10606         non-default ctor.
10607         (allocate_location_exception): Use new non-default ctor.
10608         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10609         (init_bp_location): Convert to ...
10610         (bp_location::bp_location): ... this new ctor, and remove memset
10611         call.
10612         (base_breakpoint_allocate_location): Use the new non-default ctor.
10613         * breakpoint.h (bp_location): Now a class.  Declare default and
10614         non-default ctors.  In-class initialize all members.
10615         (init_bp_location): Remove declaration.
10616
10617 2017-04-25  Pedro Alves  <palves@redhat.com>
10618
10619         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10620         assignment operator.
10621
10622 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10623
10624         * doublest.c (convert_doublest_to_floatformat): Call
10625         floatformat_totalsize_bytes.
10626
10627 2017-04-22  Tom Tromey  <tom@tromey.com>
10628
10629         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10630         ui_out_emit_list.
10631         * stack.c (print_frame): Use ui_out_emit_list.
10632         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10633         ui_out_emit_list.
10634         * mi/mi-main.c (print_one_inferior)
10635         (mi_cmd_data_list_register_names)
10636         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10637         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10638         ui_out_emit_list.
10639         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10640         (mi_output_solib_attribs): Use ui_out_emit_list,
10641         ui_out_emit_tuple.
10642         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10643         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10644         (mi_cmd_stack_list_args, list_args_or_locals): Use
10645         ui_out_emit_list.
10646         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10647         * breakpoint.c (print_solib_event, output_thread_groups): Use
10648         ui_out_emit_list.
10649
10650 2017-04-22  Tom Tromey  <tom@tromey.com>
10651
10652         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10653         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10654         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10655
10656 2017-04-22  Tom Tromey  <tom@tromey.com>
10657
10658         * tracepoint.c (tvariables_info_1)
10659         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10660
10661 2017-04-22  Tom Tromey  <tom@tromey.com>
10662
10663         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10664         annotate_arg_emitter.
10665         * breakpoint.c (print_mention_watchpoint)
10666         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10667         * annotate.h (struct annotate_arg_emitter): New.
10668
10669 2017-04-22  Tom Tromey  <tom@tromey.com>
10670
10671         * record-btrace.c (record_btrace_insn_history)
10672         (record_btrace_insn_history_range, record_btrace_call_history)
10673         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10674         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10675         ui_out_emit_tuple.
10676         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10677         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10678         * skip.c (skip_info): Use ui_out_emit_tuple.
10679         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10680         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10681         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10682         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10683         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10684         ui_out_emit_tuple.
10685         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10686         (output_register, mi_cmd_data_read_memory)
10687         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10688         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10689         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10690         Use ui_out_emit_tuple.
10691         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10692         ui_out_emit_tuple.
10693         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10694         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10695         * linux-thread-db.c (info_auto_load_libthread_db): Use
10696         ui_out_emit_tuple.
10697         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10698         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10699         * disasm.c (do_mixed_source_and_assembly_deprecated)
10700         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10701         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10702         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10703         * breakpoint.c (print_one_breakpoint_location)
10704         (print_one_breakpoint): Use ui_out_emit_tuple.
10705         * auto-load.c (print_script, info_auto_load_cmd): Use
10706         ui_out_emit_tuple.
10707         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10708
10709 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10710
10711         * thread.c (print_thread_info_1): Remove dead code.
10712
10713 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10714
10715         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10716         GDB_SELF_TEST.
10717         * arm-tdep.c (selftests::arm_record_test): Likewise.
10718
10719 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10720
10721         * regcache.c (regcache_restore): Remove argument 2.  Replace
10722         argument 3 with regcache.  Get register status from
10723         src->register_status and get register contents from
10724         register_buffer (src, regnum).
10725         (regcache_cpy): Update.
10726
10727 2017-04-19  Pedro Alves  <palves@redhat.com>
10728
10729         * gdbthread.h (thread): Add missing closing parenthesis in
10730         comment.
10731
10732 2017-04-19  Pedro Alves  <palves@redhat.com>
10733
10734         * common/refcounted-object.h: New file.
10735         * gdbthread.h: Include "common/refcounted-object.h".
10736         (thread_info): Inherit from refcounted_object and add comments.
10737         (thread_info::incref, thread_info::decref)
10738         (thread_info::m_refcount): Delete.
10739         (thread_info::deletable): Use the refcounted_object::refcount()
10740         method.
10741         * inferior.c (current_inferior_): Add comment.
10742         (set_current_inferior): Increment/decrement refcounts.
10743         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10744         not-deletable instead of comparing with the current inferior.
10745         (initialize_inferiors): Increment the initial inferior's refcount.
10746         * inferior.h (struct inferior): Forward declare.
10747         Include "common/refcounted-object.h".
10748         (current_inferior, set_current_inferior): Move declaration to
10749         before struct inferior's definition, and fix comment.
10750         (inferior): Inherit from refcounted_object.  Add comments.
10751         * thread.c (switch_to_thread_no_regs): Reference the thread's
10752         inferior pointer directly instead of doing a ptid lookup.
10753         (switch_to_no_thread): New function.
10754         (switch_to_thread(thread_info *)): New function, factored out
10755         from ...
10756         (switch_to_thread(ptid_t)): ... this.
10757         (restore_current_thread): Delete.
10758         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10759         fields, and add 'inf' field.
10760         (do_restore_current_thread_cleanup): Check whether old->inf is
10761         alive instead of looking up an inferior by ptid.  Use
10762         switch_to_thread and switch_to_no_thread.
10763         (restore_current_thread_cleanup_dtor): Use old->inf directly
10764         instead of lookup up an inferior by id.  Decref the inferior.
10765         Don't restore 'removable'.
10766         (make_cleanup_restore_current_thread): Same the inferior pointer
10767         in old, instead of the inferior number.  Incref the inferior.
10768         Don't save/clear 'removable'.
10769
10770 2017-04-19  Pedro Alves  <palves@redhat.com>
10771
10772         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10773         unittests/scoped_restore-selftests.c.
10774         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10775         * common/scoped_restore.h (scoped_restore_base): Make "class".
10776         (scoped_restore_base::release): New public method.
10777         (scoped_restore_base::scoped_restore_base): New protected ctor.
10778         (scoped_restore_base::m_saved_var): New protected field.
10779         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10780         scoped_restore_base base class instead of m_saved_var directly.
10781         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10782         (scoped_restore_tmpl::scoped_restore_tmpl(const
10783         scoped_restore_tmpl<T>&)): Likewise.
10784         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10785         method.
10786         (scoped_restore_tmpl::saved_var): New method.
10787         (scoped_restore_tmpl::m_saved_var): Delete.
10788         * inferior.h (inferior::detaching): Now a bool.
10789         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10790         cleanup.
10791         * unittests/scoped_restore-selftests.c: New file.
10792
10793 2017-04-19  Pedro Alves  <palves@redhat.com>
10794
10795         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10796         Re-sort in alphabetic order.
10797
10798 2017-04-18  Pedro Alves  <palves@redhat.com>
10799
10800         * xml-support.c (obstack_xml_printf): Delete.
10801         * xml-support.h (obstack_xml_printf): Delete.
10802
10803 2017-04-18  Pedro Alves  <palves@redhat.com>
10804
10805         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10806         vdebug, verror, body_text, start_element, end_element, name,
10807         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10808         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10809         is_xinclude>: Make private and add m_ prefix.
10810         (gdb_xml_parser::body_text): New method, based on ...
10811         (gdb_xml_body_text): ... this.  Adjust.
10812         (gdb_xml_parser::vdebug): New method, based on ...
10813         (gdb_xml_debug): ... this.  Adjust.
10814         (gdb_xml_parser::verror): New method, based on ...
10815         (gdb_xml_error): ... this.  Adjust.
10816         (gdb_xml_parser::start_element): New method, based on ...
10817         (gdb_xml_start_element): ... this.  Adjust.
10818         (gdb_xml_start_element_wrapper): Defer to
10819         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10820         (gdb_xml_parser::end_element): New method, based on ...
10821         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10822         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10823         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10824         (gdb_xml_parser::use_dtd): New method, based on ...
10825         (gdb_xml_use_dtd): ... this.  Adjust.
10826         (gdb_xml_parser::parse): New method, based on ...
10827         (gdb_xml_parse): ... this.  Adjust.
10828         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10829         (xinclude_start_include): Adjust to call the parser's name method.
10830         (xml_xinclude_default, xml_xinclude_start_doctype)
10831         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10832         method.
10833         (xml_process_xincludes): Adjust to call parser methods.
10834         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10835         declarations.
10836
10837 2017-04-18  Pedro Alves  <palves@redhat.com>
10838
10839         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10840         gdb::optional<std::string>.
10841         * xml-support.c: Include <string>.
10842         (scope_level::scope_level(scope_level &&))
10843         (scope_level::~scope_level): Delete.
10844         (scope_level::body): Now a std::string.
10845         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10846         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10847         parameter.
10848         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10849         (xinclude_parsing_data::output): Now a std::string reference.
10850         (xinclude_start_include): Adjust.
10851         (xml_xinclude_default): Adjust.
10852         (xml_process_xincludes): Add 'output' parameter, and return bool.
10853         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10854         and return bool.
10855         * xml-tdesc.c: Include <unordered_map> and <string>.
10856         (tdesc_xml_cache): Delete.
10857         (tdesc_xml_cache_s): Delete.
10858         (xml_cache): Now an std::unordered_map.
10859         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10860         (target_fetch_description_xml): Change return type to
10861         gdb::optional<std::string>, and adjust.
10862         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10863         (target_fetch_description_xml): Change return type to
10864         gdb::optional<std::string>.
10865
10866 2017-04-18  Pedro Alves  <palves@redhat.com>
10867
10868         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10869         unittests/optional-selftests.c.
10870         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10871         * unittests/optional-selftests.c: New file.
10872         * unittests/optional/assignment/1.cc: New file.
10873         * unittests/optional/assignment/2.cc: New file.
10874         * unittests/optional/assignment/3.cc: New file.
10875         * unittests/optional/assignment/4.cc: New file.
10876         * unittests/optional/assignment/5.cc: New file.
10877         * unittests/optional/assignment/6.cc: New file.
10878         * unittests/optional/assignment/7.cc: New file.
10879         * unittests/optional/cons/copy.cc: New file.
10880         * unittests/optional/cons/default.cc: New file.
10881         * unittests/optional/cons/move.cc: New file.
10882         * unittests/optional/cons/value.cc: New file.
10883         * unittests/optional/in_place.cc: New file.
10884         * unittests/optional/observers/1.cc: New file.
10885         * unittests/optional/observers/2.cc: New file.
10886
10887 2017-04-18  Pedro Alves  <palves@redhat.com>
10888
10889         * common/gdb_optional.h: Include common/traits.h.
10890         (in_place_t): New type.
10891         (in_place): New constexpr variable.
10892         (optional::optional): Remove member initialization of
10893         m_instantiated.
10894         (optional::optional(in_place_t...)): New constructor.
10895         (optional::~optional): Use reset.
10896         (optional::optional(const optional&)): New.
10897         (optional::optional(const optional&&)): New.
10898         (optional::optional(T &)): New.
10899         (optional::optional(T &&)): New.
10900         (operator::operator=(const optional &)): New.
10901         (operator::operator=(optional &&)): New.
10902         (operator::operator= (const T &))
10903         (operator::operator= (T &&))
10904         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10905         (operator::reset): New.
10906         (operator::m_instantiated):: Add in-class initializer.
10907         * common/traits.h: Include <type_traits>.
10908         (struct And): New types.
10909
10910 2017-04-18  Pedro Alves  <palves@redhat.com>
10911
10912         * xml-support.c: Include <vector>.
10913         (scope_level::scope_level(const gdb_xml_element *))
10914         (scope_level::scope_level(scope_level&&)): New.
10915         (scope_level::~scope_level): New.
10916         (scope_level_s): Delete.
10917         (gdb_xml_parser::scopes): Now a std::vector.
10918         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10919         Use std::vector.
10920         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10921         scope cleanup code.
10922         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10923         of the scopes member.  Use std::vector::emplace_back.
10924
10925 2017-04-18  Pedro Alves  <palves@redhat.com>
10926
10927         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10928         a bool.
10929         (gdb_xml_end_element): Change type of first parameter.
10930         (gdb_xml_cleanup): Rename to ...
10931         (gdb_xml_parser::~gdb_xml_parser): ... this.
10932         (gdb_xml_create_parser_and_cleanup): Delete with ...
10933         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10934         to this new ctor.
10935         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10936         using gdb_xml_create_parser_and_cleanup.
10937         (xinclude_parsing_data): Add ctor/dtor.
10938         (xml_xinclude_cleanup): Delete.
10939         (xml_process_xincludes): Create a local xinclude_parsing_data
10940         instead of heap-allocating one.  Create a local gdb_xml_parser
10941         instead of heap-allocating one with
10942         gdb_xml_create_parser_and_cleanup.
10943
10944 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10945
10946         PR threads/20743
10947         * fbsd-nat.c (resume_one_thread_cb): Remove.
10948         (resume_all_threads_cb): Remove.
10949         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10950         iterate_over_threads.
10951
10952 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10953
10954         * NEWS: Create a new section for the next release branch.
10955         Rename the section of the current branch, now that it has
10956         been cut.
10957
10958 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10959
10960         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10961         * version.in: Bump version to 8.0.50.DATE-git.
10962
10963 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10964
10965         PR gdb/21385
10966         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10967         independently of the host, and fix build breakage on Cygwin.
10968
10969 2017-04-13  Pedro Alves  <palves@redhat.com>
10970
10971         * inferior.c (free_inferior): Convert to ...
10972         (inferior::~inferior): ... this dtor.
10973         (inferior::inferior): New ctor, factored out from ...
10974         (add_inferior_silent): ... here.  Allocate the inferior with a new
10975         expression.
10976         (delete_inferior): Call delete instead of free_inferior.
10977         * inferior.h (gdb_environ, continuation): Forward declare.
10978         (inferior): Now a class.  Add in-class initialization to all
10979         members.  Make boolean fields bool, except 'detaching'.
10980         (inferior::inferior): New explicit ctor.
10981         (inferior::~inferior): New.
10982
10983 2017-04-13  Pedro Alves  <palves@redhat.com>
10984
10985         * inferior.c (init_inferior_list): Delete.
10986         * inferior.h (init_inferior_list): Delete.
10987
10988 2017-04-13  Pedro Alves  <palves@redhat.com>
10989
10990         PR threads/13217
10991         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10992         (top level): Call it twice, with different thread sets.
10993
10994 2017-04-13  Pedro Alves  <palves@redhat.com>
10995
10996         * thread.c: Include <algorithm>.
10997         (thread_array_cleanup): Delete.
10998         (scoped_inc_dec_ref): New class.
10999         (live_threads_count): New function.
11000         (set_thread_refcount): Delete.
11001         (tp_array_compar_ascending): Now a bool.
11002         (tp_array_compar): Convert to a std::sort comparison function.
11003         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11004         and live_threads_count.
11005
11006 2017-04-13  Pedro Alves  <palves@redhat.com>
11007
11008         * infrun.c (follow_fork_inferior): Also switch the current
11009         inferior.
11010
11011 2017-04-13  Pedro Alves  <palves@redhat.com>
11012
11013         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11014         before calling create_internal_breakpoint.
11015
11016 2017-04-13  Pedro Alves  <palves@redhat.com>
11017
11018         * fork-child.c (execv_argv): New class.
11019         (breakup_args): Refactored as ...
11020         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11021         Copy arguments to storage and replace separators with NULL
11022         terminators in place.
11023         (escape_bang_in_quoted_argument): Adjust to return bool.
11024         (execv_argv::execv_argv): New ctor.
11025         (execv_argv::init_for_shell): New method, factored out from
11026         fork_inferior.  Don't strdup strings into the vector.
11027         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11028         Remove free_vector_argv call.
11029
11030 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11031
11032         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11033         tdep->rx_psw_type.
11034
11035 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11036
11037         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11038         * rx-tdep.c (rx_gdbarch_init): Likewise.
11039
11040 2017-04-13  Pedro Alves  <palves@redhat.com>
11041
11042         * breakpoint.h (struct breakpoint): Reindent.
11043
11044 2017-04-13  Pedro Alves  <palves@redhat.com>
11045
11046         * breakpoint.c (bp_location): Rename to ...
11047         (bp_locations): ... this.  All references updated.
11048         (bp_location_count): Rename to ...
11049         (bp_locations_count): ... this.  All references updated.
11050         (bp_location_placed_address_before_address_max): Rename to ...
11051         (bp_locations_placed_address_before_address_max): ... this.  All
11052         references updated.
11053         (bp_location_shadow_len_after_address_max): Rename to ...
11054         (bp_locations_shadow_len_after_address_max): ... this.  All
11055         references updated.
11056         (bp_location_compare_addrs): Rename to ...
11057         (bp_locations_compare_addrs): ... this.  All references updated.
11058         (bp_location_compare):Rename to ...
11059         (bp_locations_compare): ... this.  All references updated.
11060         (bp_location_target_extensions_update): Rename to ...
11061         (bp_locations_target_extensions_update): ... this.  All references
11062         updated.
11063
11064 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11065
11066         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11067         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11068         'sgtty.h'.
11069         * common/gdb_termios.h: New file, with parts of "terminal.h".
11070         * inflow.c: Include "gdb_termios.h".
11071         * ser-unix.c: Include "gdb_termios.h".
11072         * terminal.h: Move terminal-related defines to
11073         "common/gdb_termios.h".
11074
11075 2017-04-12  Tom Tromey  <tom@tromey.com>
11076
11077         * probe.c (parse_probes): Update.
11078         * location.h (delete_event_location): Don't declare.
11079         (event_location_deleter::operator()): Update.
11080         * location.c (event_location_deleter::operator()): Rename from
11081         delete_event_location.
11082         * linespec.h (linespec_result) <location>: Change type to
11083         event_location_up.
11084         * linespec.c (canonicalize_linespec, event_location_to_sals)
11085         (decode_objc): Update.
11086         (linespec_result): Don't call delete_event_location.
11087         * breakpoint.c (create_breakpoints_sal)
11088         (bkpt_probe_create_sals_from_location)
11089         (strace_marker_create_sals_from_location): Update.
11090
11091 2017-04-12  Tom Tromey  <tom@tromey.com>
11092
11093         * linespec.h (struct linespec_result): Add constructor and
11094         destructor.
11095         (init_linespec_result, destroy_linespec_result)
11096         (make_cleanup_destroy_linespec_result): Don't declare.
11097         * linespec.c (init_linespec_result): Remove.
11098         (linespec_result::~linespec_result): Rename from
11099         destroy_linespec_result.  Update.
11100         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11101         Remove.
11102         * breakpoint.c (create_breakpoint, break_range_command)
11103         (decode_location_default): Update.
11104         * ax-gdb.c (agent_command_1): Update.
11105
11106 2017-04-12  Tom Tromey  <tom@tromey.com>
11107
11108         * remote.c (remote_download_tracepoint): Update.
11109         * python/py-breakpoint.c (bppy_get_location): Update.
11110         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11111         (gdbscm_breakpoint_location): Update.
11112         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11113         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11114         Change type to event_location_up.
11115         * breakpoint.c (create_overlay_event_breakpoint)
11116         (create_longjmp_master_breakpoint)
11117         (create_std_terminate_master_breakpoint)
11118         (create_exception_master_breakpoint)
11119         (breakpoint_event_location_empty_p, print_breakpoint_location)
11120         (print_one_breakpoint_location, create_thread_event_breakpoint)
11121         (init_breakpoint_sal, create_breakpoint)
11122         (print_recreate_ranged_breakpoint, break_range_command)
11123         (init_ada_exception_breakpoint, say_where): Update.
11124         (base_breakpoint_dtor): Don't call delete_event_location.
11125         (bkpt_print_recreate, tracepoint_print_recreate)
11126         (dprintf_print_recreate, update_static_tracepoint)
11127         (breakpoint_re_set_default): Update.
11128
11129 2017-04-12  Tom Tromey  <tom@tromey.com>
11130
11131         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11132         type of "to_do".  Update.
11133         (compute_stack_depth): Use std::vector.
11134
11135 2017-04-12  Tom Tromey  <tom@tromey.com>
11136
11137         * printcmd.c (find_instruction_backward): Use std::vector.
11138
11139 2017-04-12  Tom Tromey  <tom@tromey.com>
11140
11141         * symfile.c (objfilep): Remove typedef.
11142         (reread_symbols): Use a std::vector.
11143
11144 2017-04-12  Tom Tromey  <tom@tromey.com>
11145
11146         * mi/mi-main.c (exec_direction_forward): Remove.
11147         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11148         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11149         scoped_restore.
11150         * guile/guile.c (guile_repl_command, guile_command)
11151         (gdbscm_execute_gdb_command): Use scoped_restore.
11152         * go-exp.y (go_parse): Use scoped_restore.
11153         * d-exp.y (d_parse): Use scoped_restore.
11154         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11155         * c-exp.y (c_parse): Use scoped_restore.
11156
11157 2017-04-12  Tom Tromey  <tom@tromey.com>
11158
11159         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11160         (mi_parse): Update return type.
11161         (mi_parse_free): Remove.
11162         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11163         (mi_parse::~mi_parse): Rename from mi_parse_free.
11164         (mi_parse_cleanup): Remove.
11165         (mi_parse): Return a unique_ptr.  Use new.
11166         * mi/mi-main.c (mi_execute_command): Update.
11167
11168 2017-04-12  Tom Tromey  <tom@tromey.com>
11169
11170         * location.c (explicit_location_lex_one): Return a
11171         unique_xmalloc_ptr.
11172         (string_to_explicit_location): Update.  Remove cleanups.
11173
11174 2017-04-12  Tom Tromey  <tom@tromey.com>
11175
11176         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11177         (compare_value_and_voffset): Change type.  Update.
11178         (compute_vtable_size): Change type of "offset_vec".
11179         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11180         (gnuv3_get_typeid): Remove extraneous declaration.
11181
11182 2017-04-12  Tom Tromey  <tom@tromey.com>
11183
11184         * charset.h (wchar_iterator): Fix comment.
11185
11186 2017-04-12  Tom Tromey  <tom@tromey.com>
11187
11188         * charset.c (iconv_wrapper): New class.
11189         (cleanup_iconv): Remove.
11190         (convert_between_encodings): Use it.
11191
11192 2017-04-12  Tom Tromey  <tom@tromey.com>
11193
11194         * symfile.h (increment_reading_symtab): Update type.
11195         * symfile.c (decrement_reading_symtab): Remove.
11196         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11197         * psymtab.c (psymtab_to_symtab): Update.
11198         * dwarf2read.c (dw2_instantiate_symtab): Update.
11199
11200 2017-04-12  Tom Tromey  <tom@tromey.com>
11201
11202         * jit.c (struct jit_reader): Declare separately.  Add constructor
11203         and destructor.  Change type of "handle".
11204         (loaded_jit_reader): Define separately.
11205         (jit_reader_load): Update.  New "new".
11206         (jit_reader_unload_command): Use "delete".
11207         * gdb-dlfcn.h (struct dlclose_deleter): New.
11208         (gdb_dlhandle_up): New typedef.
11209         (gdb_dlopen, gdb_dlsym): Update types.
11210         (gdb_dlclose): Remove.
11211         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11212         (gdb_dlsym): Change type of "handle".
11213         (make_cleanup_dlclose): Remove.
11214         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11215         * compile/compile-c-support.c (load_libcc): Update.
11216
11217 2017-04-12  Tom Tromey  <tom@tromey.com>
11218
11219         * symtab.h (find_pcs_for_symtab_line): Change return type.
11220         * symtab.c (find_pcs_for_symtab_line): Change return type.
11221         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11222         type of "vec".  Update.
11223         (ltpy_get_pcs_for_line): Update.
11224         * linespec.c (decode_digits_ordinary): Update.
11225
11226 2017-04-12  Tom Tromey  <tom@tromey.com>
11227
11228         * tracepoint.c (actions_command): Update.
11229         * python/python.c (python_command, python_interactive_command):
11230         Update.
11231         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11232         * guile/guile.c (guile_command): Update.
11233         * defs.h (read_command_lines, read_command_lines_1): Return
11234         command_line_up.
11235         (command_lines_deleter): New struct.
11236         (command_line_up): New typedef.
11237         * compile/compile.c (compile_code_command)
11238         (compile_print_command): Update.
11239         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11240         command_line_up.
11241         (make_cleanup_free_command_lines): Remove.
11242         * cli/cli-script.c (get_command_line, read_command_lines_1)
11243         (copy_command_lines): Return command_line_up.
11244         (while_command, if_command, read_command_lines, define_command)
11245         (document_command): Update.
11246         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11247         Remove.
11248         * breakpoint.h (breakpoint_set_commands): Change type of
11249         "commands".
11250         * breakpoint.c (breakpoint_set_commands): Change type of
11251         "commands".  Update.
11252         (do_map_commands_command, update_dprintf_command_list)
11253         (create_tracepoint_from_upload): Update.
11254
11255 2017-04-12  Tom Tromey  <tom@tromey.com>
11256
11257         * tracepoint.c (scope_info): Update.
11258         * spu-tdep.c (spu_catch_start): Update.
11259         * python/python.c (gdbpy_decode_line): Update.
11260         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11261         * python/py-breakpoint.c (bppy_init): Update.
11262         * probe.c (parse_probes): Update.
11263         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11264         * location.h (event_location_deleter): New struct.
11265         (event_location_up): New typedef.
11266         (new_linespec_location, new_address_location, new_probe_location)
11267         (new_explicit_location, copy_event_location)
11268         (string_to_event_location, string_to_event_location_basic)
11269         (string_to_explicit_location): Update return type.
11270         (make_cleanup_delete_event_location): Remove.
11271         * location.c (new_linespec_location, new_address_location)
11272         (new_probe_location, new_explicit_location, copy_event_location):
11273         Return event_location_up.
11274         (delete_event_location_cleanup)
11275         (make_cleanup_delete_event_location): Remove.
11276         (string_to_explicit_location, string_to_event_location_basic)
11277         (string_to_event_location): Return event_location_up.
11278         * linespec.c (canonicalize_linespec, event_location_to_sals)
11279         (decode_line_with_current_source)
11280         (decode_line_with_last_displayed, decode_objc): Update.
11281         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11282         * completer.c (location_completer): Update.
11283         * cli/cli-cmds.c (edit_command, list_command): Update.
11284         * breakpoint.c (create_overlay_event_breakpoint)
11285         (create_longjmp_master_breakpoint)
11286         (create_std_terminate_master_breakpoint)
11287         (create_exception_master_breakpoint)
11288         (create_thread_event_breakpoint): Update.
11289         (init_breakpoint_sal): Update.  Remove some dead code.
11290         (create_breakpoint_sal): Change type of "location".  Update.
11291         (create_breakpoints_sal, create_breakpoint, break_command_1)
11292         (dprintf_command, break_range_command, until_break_command)
11293         (init_ada_exception_breakpoint)
11294         (strace_marker_create_sals_from_location)
11295         (update_static_tracepoint, trace_command, ftrace_command)
11296         (strace_command, create_tracepoint_from_upload): Update.
11297         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11298         * ax-gdb.c (agent_command_1): Update.
11299
11300 2017-04-12  Pedro Alves  <palves@redhat.com>
11301
11302         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11303         * configure.tgt: Handle i[34567]86-*-go32* and
11304         i[34567]86-*-msdosdjgpp*.
11305         * i386-tdep.c (i386_svr4_reg_to_regnum):
11306         Make extern.
11307         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11308         i386-go32-tdep.c.
11309         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11310         * i386-go32-tdep.c: New file.
11311         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11312         declarations.
11313
11314 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11315
11316         * aix-thread.c (pd_status2str): Change return type to const char *.
11317
11318 2017-04-12  Pedro Alves  <palves@redhat.com>
11319
11320         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11321         calls to set_gdbarch_gnu_triplet_regexp.
11322
11323 2017-04-12  Pedro Alves  <palves@redhat.com>
11324
11325         PR gdb/21323
11326         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11327         New enum value.
11328         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11329         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11330         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11331         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11332         * gdbarch.h, gdbarch.c: Regenerate.
11333         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11334         gdbarch_wchar_bit and gdbarch_wchar_signed.
11335         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11336         * arm-tdep.c (arm_gdbarch_init): Likewise.
11337         * avr-tdep.c (avr_gdbarch_init): Likewise.
11338         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11339         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11340         * i386-tdep.c (i386_go32_init_abi): Likewise.
11341         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11342         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11343         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11344         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11345         * sh-tdep.c (sh_gdbarch_init): Likewise.
11346         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11347         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11348         * windows-tdep.c (windows_init_abi): Likewise.
11349         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11350
11351 2017-04-12  Pedro Alves  <palves@redhat.com>
11352
11353         PR c++/21323
11354         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11355         cplus_primitive_type_char32_t>: New enum values.
11356         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11357         and cplus_primitive_type_char32_t.
11358         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11359         32, use the archtecture's built-in type for char16_t and char32_t,
11360         respectively.  Otherwise, fallback to init_integer_type as before,
11361         but make the type unsigned, and issue a complaint.
11362         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11363
11364 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11365
11366         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11367         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11368
11369 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11370
11371         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11372         'const char *'.
11373
11374 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11375
11376         * common/common-utils.c (free_vector_argv): New function.
11377         * common/common-utils.h: Include <vector>.
11378         (free_vector_argv): New prototype.
11379         * darwin-nat.c (darwin_create_inferior): Rewrite function
11380         prototype in order to constify "exec_file" and accept a
11381         "std::string" for "allargs".
11382         * fork-child.c: Include <vector>.
11383         (breakup_args): Rewrite function, using C++.
11384         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11385         and accept "std::string" for "allargs".  Update the code to
11386         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11387         and "execvp".
11388         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11389         order to constify "exec_file" and accept a "std::string" for
11390         "allargs".
11391         * go32-nat.c (go32_create_inferior): Likewise.
11392         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11393         * infcmd.c (run_command_1): Constify "exec_file".  Use
11394         "std::string" for inferior arguments.
11395         * inferior.h (fork_inferior): Update prototype.
11396         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11397         prototype in order to constify "exec_file" and accept a
11398         "std::string" for "allargs".
11399         * nto-procfs.c (procfs_create_inferior): Likewise.
11400         * procfs.c (procfs_create_inferior): Likewise.
11401         * remote-sim.c (gdbsim_create_inferior): Likewise.
11402         * remote.c (extended_remote_run): Update code to accept
11403         "std::string" as argument.
11404         (extended_remote_create_inferior): Rewrite function prototype in
11405         order to constify "exec_file" and accept a "std::string" for
11406         "allargs".
11407         * rs6000-nat.c (super_create_inferior): Likewise.
11408         (rs6000_create_inferior): Likewise.
11409         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11410         * windows-nat.c (windows_create_inferior): Likewise.
11411
11412 2017-04-11  Pedro Alves  <palves@redhat.com>
11413
11414         * thread.c: Fix whitespace throughout.
11415
11416 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11417
11418         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11419
11420 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11421
11422         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11423
11424 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11425
11426         PR gdb/21364
11427         * osdata.c (info_osdata): Check if 'type' is an empty string
11428         instead of NULL.
11429
11430 2017-04-10  Pedro Alves  <palves@redhat.com>
11431
11432         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11433         (ptid_to_global_thread_id, in_thread_list)
11434         (do_captured_list_thread_ids, set_resumed, set_running)
11435         (set_executing, set_stop_requested, finish_thread_state)
11436         (validate_registers_access, can_access_registers_ptid)
11437         (print_thread_info_1, switch_to_thread)
11438         (do_restore_current_thread_cleanup)
11439         (make_cleanup_restore_current_thread, thread_command)
11440         (thread_name_command): Use operator== instead of ptid_equal.
11441
11442 2017-04-10  Pedro Alves  <palves@redhat.com>
11443
11444         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11445         (current_thread_cleanup_chain): Delete.
11446         (restore_current_thread_cleanup_dtor)
11447         (make_cleanup_restore_current_thread): Remove references to
11448         current_thread_cleanup_chain.
11449
11450 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11451
11452         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11453         REG_UNKNOWN.
11454
11455 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11456
11457         PR gdb/19942
11458         * gdbthread.h (thread_info::deletable): New method.
11459         (thread_info::incref): New method.
11460         (thread_info::decref): New method.
11461         (thread_info::refcount): Move it to private.
11462         * infrun.c (save_stop_context): Call inc_refcount.
11463         (release_stop_context_cleanup): Likewise.
11464         * thread.c (set_thread_exited): New function.
11465         (init_thread_list): Delete "tp" only it is deletable, otherwise
11466         call set_thread_exited.
11467         (delete_thread_1): Call set_thread_exited.
11468         (current_thread_cleanup) <inferior_pid>: Remove.
11469         <thread>: New field.
11470         (restore_current_thread_ptid_changed): Removed.
11471         (do_restore_current_thread_cleanup): Adjust.
11472         (restore_current_thread_cleanup_dtor): Don't call
11473         find_thread_ptid.
11474         (set_thread_refcount): Use dec_refcount.
11475         (make_cleanup_restore_current_thread): Adjust.
11476         (thread_apply_all_command): Call inc_refcount.
11477         (_initialize_thread): Don't call
11478         observer_attach_thread_ptid_changed.
11479
11480 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11481
11482         * thread.c (delete_thread_1): Hoist code on marking thread as
11483         exited.
11484
11485 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11486
11487         * windows-nat.c (windows_detach): Initialize ptid with
11488         minus_one_ptid.
11489
11490 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11491
11492         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11493
11494 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11495
11496         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11497         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11498         (bfin_pseudo_register_write): Likewise
11499
11500 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11501
11502         * common/ptid.h (struct ptid): Change to...
11503         (class ptid_t): ... this.
11504         <ptid_t>: New constructors.
11505         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11506         matches>: New methods.
11507         <make_null, make_minus_one>: New static methods.
11508         <pid>: Rename to...
11509         <m_pid>: ...this.
11510         <lwp>: Rename to...
11511         <m_lwp>: ...this.
11512         <tid>: Rename to...
11513         <m_tid>: ...this.
11514         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11515         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11516         as references, move comment to class ptid_t.
11517         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11518         ptid_t static methods.
11519         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11520         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11521         Take ptid arguments as references, implement using ptid_t methods.
11522         * unittests/ptid-selftests.c: New file.
11523         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11524         unittests/ptid-selftests.c.
11525         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11526
11527 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11528
11529         * python/python.c (python_run_simple_file): Cast mode literal to
11530         non-const char pointer as expected by PyFile_FromString.
11531
11532 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11533
11534         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11535         minus_one_ptid and null_ptid.
11536
11537 2017-04-05  Pedro Alves  <palves@redhat.com>
11538
11539         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11540         * configure: Regenerate.
11541
11542 2017-04-05  Pedro Alves  <palves@redhat.com>
11543
11544         * ada-exp.y (yyerror): Constify.
11545         * ada-lang.c (bound_name, get_selections)
11546         (ada_variant_discrim_type)
11547         (ada_variant_discrim_name, ada_value_struct_elt)
11548         (ada_lookup_struct_elt_type, is_unchecked_variant)
11549         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11550         (catch_ada_exception_command_split)
11551         (catch_ada_assert_command_split, catch_assert_command)
11552         (ada_op_name): Constify.
11553         * ada-lang.h (ada_yyerror, get_selections)
11554         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11555         * arc-tdep.c (arc_print_frame_cache): Constify.
11556         * arm-tdep.c (arm_skip_stub): Constify.
11557         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11558         (gen_aggregate_elt_ref): Constify.
11559         * bcache.c (print_bcache_statistics): Constify.
11560         * bcache.h (print_bcache_statistics): Constify.
11561         * break-catch-throw.c (catch_exception_command_1):
11562         * breakpoint.c (struct ep_type_description::description):
11563         Constify.
11564         (add_solib_catchpoint): Constify.
11565         (catch_fork_command_1): Add cast.
11566         (add_catch_command): Constify.
11567         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11568         Constify.
11569         * bsd-uthread.c (bsd_uthread_state): Constify.
11570         * buildsym.c (patch_subfile_names): Constify.
11571         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11572         Constify.
11573         * c-exp.y (yyerror): Constify.
11574         (token::oper): Constify.
11575         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11576         * c-varobj.c (cplus_describe_child): Constify.
11577         * charset.c (find_charset_names): Add cast.
11578         (find_charset_names): Constify array and add const_cast.
11579         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11580         (edit_command): Constify.
11581         * cli/cli-decode.c (lookup_cmd): Constify.
11582         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11583         Constify.
11584         (struct dump_context): Constify.
11585         (add_dump_command, restore_command): Constify.
11586         * cli/cli-script.c (get_command_line): Constify.
11587         * cli/cli-script.h (get_command_line): Constify.
11588         * cli/cli-utils.c (check_for_argument): Constify.
11589         * cli/cli-utils.h (check_for_argument): Constify.
11590         * coff-pe-read.c (struct read_pe_section_data): Constify.
11591         * command.h (lookup_cmd): Constify.
11592         * common/print-utils.c (decimal2str): Constify.
11593         * completer.c (gdb_print_filename): Constify.
11594         * corefile.c (set_gnutarget): Constify.
11595         * cp-name-parser.y (yyerror): Constify.
11596         * cp-valprint.c (cp_print_class_member): Constify.
11597         * cris-tdep.c (cris_register_name, crisv32_register_name):
11598         Constify.
11599         * d-exp.y (yyerror): Constify.
11600         (struct token::oper): Constify.
11601         * d-lang.h (d_yyerror): Constify.
11602         * dbxread.c (struct header_file_location::name): Constify.
11603         (add_old_header_file, add_new_header_file, last_function_name)
11604         (dbx_next_symbol_text, add_bincl_to_list)
11605         (find_corresponding_bincl_psymtab, set_namestring)
11606         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11607         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11608         * defs.h (command_line_input, print_address_symbolic)
11609         (deprecated_readline_begin_hook): Constify.
11610         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11611         Constify.
11612         * event-top.c (handle_line_of_input): Constify and add cast.
11613         * exceptions.c (catch_errors): Constify.
11614         * exceptions.h (catch_errors): Constify.
11615         * expprint.c (print_subexp_standard, op_string, op_name)
11616         (op_name_standard, dump_raw_expression, dump_raw_expression):
11617         * expression.h (op_name, op_string, dump_raw_expression):
11618         Constify.
11619         * f-exp.y (yyerror): Constify.
11620         (struct token::oper): Constify.
11621         (struct f77_boolean_val::name): Constify.
11622         * f-lang.c (f_word_break_characters): Constify.
11623         * f-lang.h (f_yyerror): Constify.
11624         * fork-child.c (fork_inferior): Add cast.
11625         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11626         (new_variant): Constify.
11627         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11628         * gdbarch.c: Regenerate.
11629         * gdbcore.h (set_gnutarget): Constify.
11630         * go-exp.y (yyerror): Constify.
11631         (token::oper): Constify.
11632         * go-lang.h (go_yyerror): Constify.
11633         * go32-nat.c (go32_sysinfo): Constify.
11634         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11635         * guile/scm-cmd.c (cmdscm_function): Constify.
11636         * guile/scm-param.c (pascm_param_value): Constify.
11637         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11638         (h8300sx_register_name): Constify.
11639         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11640         Constify.
11641         * ia64-tdep.c (ia64_register_names): Constify.
11642         * infcmd.c (construct_inferior_arguments): Constify.
11643         (path_command, attach_post_wait): Constify.
11644         * language.c (show_range_command, show_case_command)
11645         (unk_lang_error): Constify.
11646         * language.h (language_defn::la_error)
11647         (language_defn::la_name_of_this): Constify.
11648         * linespec.c (decode_line_2): Constify.
11649         * linux-thread-db.c (thread_db_err_str): Constify.
11650         * lm32-tdep.c (lm32_register_name): Constify.
11651         * m2-exp.y (yyerror): Constify.
11652         * m2-lang.h (m2_yyerror): Constify.
11653         * m32r-tdep.c (m32r_register_names): Constify and make static.
11654         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11655         * m88k-tdep.c (m88k_register_name): Constify.
11656         * macroexp.c (appendmem): Constify.
11657         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11658         (upgrade_type, parse_external, parse_partial_symbols)
11659         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11660         (new_symbol): Constify.
11661         * memattr.c (mem_info_command): Constify.
11662         * mep-tdep.c (register_name_from_keyword): Constify.
11663         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11664         Constify.
11665         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11666         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11667         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11668         cast.
11669         (mi_execute_async_cli_command): Constify.
11670         * mips-tdep.c (mips_register_name): Constify.
11671         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11672         (am33_register_name, am33_2_register_name)
11673         * moxie-tdep.c (moxie_register_names): Constify.
11674         * nat/linux-osdata.c (osdata_type): Constify fields.
11675         * nto-tdep.c (nto_parse_redirection): Constify.
11676         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11677         (lookup_child_selector): Constify.
11678         (objc_methcall::name): Constify.
11679         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11680         (lookup_struct_typedef): Constify.
11681         * objfiles.c (pc_in_section): Constify.
11682         * objfiles.h (pc_in_section): Constify.
11683         * p-exp.y (struct token::oper): Constify.
11684         (yyerror): Constify.
11685         * p-lang.h (pascal_yyerror): Constify.
11686         * parser-defs.h (op_name_standard): Constify.
11687         (op_print::string): Constify.
11688         (exp_descriptor::op_name): Constify.
11689         * printcmd.c (print_address_symbolic): Constify.
11690         * psymtab.c (print_partial_symbols): Constify.
11691         * python/py-breakpoint.c (stop_func): Constify.
11692         (bppy_get_expression): Constify.
11693         * python/py-cmd.c (cmdpy_completer::name): Constify.
11694         (cmdpy_function): Constify.
11695         * python/py-event.c (evpy_add_attribute)
11696         (gdbpy_initialize_event_generic): Constify.
11697         * python/py-event.h (evpy_add_attribute)
11698         (gdbpy_initialize_event_generic): Constify.
11699         * python/py-evts.c (add_new_registry): Constify.
11700         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11701         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11702         * python/py-inferior.c (get_buffer): Add cast.
11703         * python/py-param.c (parm_constant::name): Constify.
11704         * python/py-unwind.c (fprint_frame_id): Constify.
11705         * python/python.c (gdbpy_parameter_value): Constify.
11706         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11707         * remote.c (memory_packet_config::name): Constify.
11708         (show_packet_config_cmd, remote_write_bytes)
11709         (remote_buffer_add_string):
11710         * reverse.c (exec_reverse_once): Constify.
11711         * rs6000-tdep.c (variant::name, variant::description): Constify.
11712         * rust-exp.y (rustyyerror): Constify.
11713         * rust-lang.c (rust_op_name): Constify.
11714         * rust-lang.h (rustyyerror): Constify.
11715         * serial.h (serial_ops::name): Constify.
11716         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11717         (sh_sh3e_register_name, sh_sh2e_register_name)
11718         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11719         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11720         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11721         (sh_sh4al_dsp_register_name): Constify.
11722         * sh64-tdep.c (sh64_register_name): Constify.
11723         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11724         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11725         * stabsread.c (patch_block_stabs, read_type_number)
11726         (ref_map::stabs, ref_add, process_reference)
11727         (symbol_reference_defined, define_symbol, define_symbol)
11728         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11729         (read_one_struct_field, read_struct_fields, read_baseclasses)
11730         (read_tilde_fields, read_struct_type, read_array_type)
11731         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11732         (read_huge_number, read_range_type, read_args, common_block_start)
11733         (find_name_end): Constify.
11734         * stabsread.h (common_block_start, define_symbol)
11735         (process_one_symbol, symbol_reference_defined, ref_add):
11736         * symfile.c (get_section_index, add_symbol_file_command):
11737         * symfile.h (get_section_index): Constify.
11738         * target-descriptions.c (tdesc_type::name): Constify.
11739         (tdesc_free_type): Add cast.
11740         * target.c (find_default_run_target):
11741         (add_deprecated_target_alias, find_default_run_target)
11742         (target_announce_detach): Constify.
11743         (do_option): Constify.
11744         * target.h (add_deprecated_target_alias): Constify.
11745         * thread.c (print_thread_info_1): Constify.
11746         * top.c (deprecated_readline_begin_hook, command_line_input):
11747         Constify.
11748         (init_main): Add casts.
11749         * top.h (handle_line_of_input): Constify.
11750         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11751         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11752         (tfind_command): Rename to ...
11753         (tfind_command_1): ... this and constify.
11754         (tfind_command): New function.
11755         (tfind_end_command, tfind_start_command): Adjust.
11756         (encode_source_string): Constify.
11757         * tracepoint.h (encode_source_string): Constify.
11758         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11759         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11760         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11761         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11762         * tui/tui-win.c (parse_scrolling_args): Constify.
11763         * tui/tui-windata.c (tui_erase_data_content): Constify.
11764         * tui/tui-windata.h (tui_erase_data_content): Constify.
11765         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11766         * tui/tui.c (tui_enable): Add cast.
11767         * utils.c (defaulted_query): Constify.
11768         (init_page_info): Add cast.
11769         (puts_debug, subset_compare): Constify.
11770         * utils.h (subset_compare): Constify.
11771         * varobj.c (varobj_format_string): Constify.
11772         * varobj.h (varobj_format_string): Constify.
11773         * vax-tdep.c (vax_register_name): Constify.
11774         * windows-nat.c (windows_detach): Constify.
11775         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11776         * xml-support.c (gdb_xml_end_element): Constify.
11777         * xml-tdesc.c (tdesc_start_reg): Constify.
11778         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11779         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11780         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11781
11782 2017-04-05  Pedro Alves  <palves@redhat.com>
11783
11784         * proc-api.c (struct trans): Constify.
11785         (procfs_note): Constify.
11786         * proc-events.c (struct trans, syscall_table):
11787         * proc-flags.c (struct trans): Constify.
11788         * proc-utils.h (procfs_note): Constify.
11789         * proc-why.c (struct trans): Constify.
11790         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11791         (procfs_detach): Constify.
11792         * sol-thread.c (struct string_map): Constify.
11793         (td_err_string, td_state_string): Constify.
11794
11795 2017-04-05  Pedro Alves  <palves@redhat.com>
11796
11797         * proc-api.c (procfs_filename): Don't initialize
11798         procfs_filename.
11799         (prepare_to_trace): Assume procfs_filename is non-NULL.
11800         (_initialize_proc_api): Give procfs_filename a default value here.
11801
11802 2017-04-05  Pedro Alves  <palves@redhat.com>
11803
11804         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11805         'cond_string' parameter.
11806         (extract_exception_regexp): Constify 'string' parameter.
11807         (catch_exception_command_1): Constify.
11808         * breakpoint.c (init_catchpoint)
11809         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11810         parameter.
11811         (ep_parse_optional_if_clause, catch_fork_command_1)
11812         (catch_exec_command_1): Constify.
11813         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11814         parameter.
11815         (ep_parse_optional_if_clause): Constify.
11816         * cli/cli-utils.c (remove_trailing_whitespace)
11817         (check_for_argument): Constify.
11818         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11819         non-const overload.
11820         (check_for_argument): Likewise.
11821
11822 2017-04-05  Pedro Alves  <palves@redhat.com>
11823
11824         * event-top.c (command_line_handler): Add cast to execute_command
11825         call.
11826         * record-btrace.c (cmd_record_btrace_bts_start)
11827         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11828         (cmd_record_btrace_start): Add cast to execute_command call.
11829         * record-full.c (record_full_goto_insn):
11830         * record.c (record_start, record_stop): Add cast to
11831         execute_command_to_string calls.
11832         (cmd_record_start): Add cast to execute_command calls.
11833
11834 2017-04-05  Pedro Alves  <palves@redhat.com>
11835
11836         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11837         static inline function.
11838         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11839         array and use gdb_PyArg_ParseTupleAndKeywords.
11840         * python/py-cmd.c (cmdpy_init): Likewise.
11841         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11842         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11843         (infpy_search_memory): Likewise.
11844         * python/py-objfile.c (objfpy_add_separate_debug_file)
11845         (gdbpy_lookup_objfile): Likewise.
11846         * python/py-symbol.c (gdbpy_lookup_symbol)
11847         (gdbpy_lookup_global_symbol): Likewise.
11848         * python/py-type.c (gdbpy_lookup_type): Likewise.
11849         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11850         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11851         Likewise.
11852
11853 2017-04-05  Pedro Alves  <palves@redhat.com>
11854
11855         * python/python-internal.h (gdb_PyGetSetDef): New type.
11856         * python/py-block.c (block_object_getset)
11857         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11858         * python/py-event.c (event_object_getset)
11859         (finish_breakpoint_object_getset): Likewise.
11860         * python/py-inferior.c (inferior_object_getset): Likewise.
11861         * python/py-infthread.c (thread_object_getset): Likewise.
11862         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11863         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11864         * python/py-objfile.c (objfile_getset): Likewise.
11865         * python/py-progspace.c (pspace_getset): Likewise.
11866         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11867         Likewise.
11868         * python/py-record.c (recpy_record_getset): Likewise.
11869         * python/py-symbol.c (symbol_object_getset): Likewise.
11870         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11871         Likewise.
11872         * python/py-type.c (type_object_getset, field_object_getset):
11873         Likewise.
11874         * python/py-value.c (value_object_getset): Likewise.
11875
11876 2017-04-05  Pedro Alves  <palves@redhat.com>
11877
11878         * python/python-internal.h (gdb_PyObject_CallMethod)
11879         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11880         New functions.
11881         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11882         (PySys_GetObject, PySys_SetPath): New macros.
11883
11884 2017-04-05  Pedro Alves  <palves@redhat.com>
11885
11886         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11887         info_osdata_command.
11888         * osdata.c (info_osdata_command): Rename to ...
11889         (info_osdata): ... this.  Constify 'type' parameter, and remove
11890         the 'from_tty' parameter.  Accept NULL TYPE.
11891         (info_osdata_command): New function.
11892         * osdata.h (info_osdata_command): Remove declaration.
11893         (info_osdata): New declaration.
11894
11895 2017-04-05  Pedro Alves  <palves@redhat.com>
11896
11897         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11898         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11899         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11900         parameter.
11901         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11902         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11903         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11904         parameter.
11905         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11906         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11907         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11908         (mi_cmd_file_list_exec_source_files)
11909         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11910         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11911         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11912         parameter.
11913         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11914         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11915         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11916         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11917         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11918         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11919         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11920         'command' parameter.
11921         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11922         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11923         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11924         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11925         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11926         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11927         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11928         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11929         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11930         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11931         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11932         parameter.
11933         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11934         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11935         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11936         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11937         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11938         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11939         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11940         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11941         (mi_cmd_data_list_changed_registers)
11942         (mi_cmd_data_write_register_values)
11943         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11944         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11945         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11946         (mi_cmd_list_features, mi_cmd_list_target_features)
11947         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11948         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11949         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11950         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11951         (mi_cmd_trace_frame_collected): Constify 'command'
11952         parameter.
11953         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11954         'command' parameter.
11955
11956 2017-04-05  Pedro Alves  <palves@redhat.com>
11957
11958         * ada-lang.c (ada_completer_word_break_characters): Now a const
11959         array.
11960         (ada_get_gdb_completer_word_break_characters): Constify.
11961         * completer.c (gdb_completer_command_word_break_characters)
11962         (gdb_completer_file_name_break_characters)
11963         (gdb_completer_quote_characters): Now const arrays.
11964         (get_gdb_completer_quote_characters): Constify.
11965         (set_rl_completer_word_break_characters): New function.
11966         (set_gdb_completion_word_break_characters)
11967         (complete_line_internal): Use it.
11968         * completer.h (get_gdb_completer_quote_characters): Constify.
11969         (set_rl_completer_word_break_characters): Declare.
11970         * f-lang.c (f_word_break_characters): Constify.
11971         * language.c (default_word_break_characters): Constify.
11972         * language.h (language_defn::la_word_break_characters): Constify.
11973         (default_word_break_characters): Constify.
11974         * top.c (init_main): Use set_rl_completer_word_break_characters.
11975
11976 2017-04-05  Pedro Alves  <palves@redhat.com>
11977
11978         * aix-thread.c (aix_thread_pid_to_str)
11979         (aix_thread_extra_thread_info): Constify.
11980         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11981         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11982         (bsd_uthread_pid_to_str): Constify.
11983         * corelow.c (core_pid_to_str): Constify.
11984         * darwin-nat.c (darwin_pid_to_str): Constify.
11985         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11986         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11987         Constify.
11988         * gnu-nat.c (gnu_pid_to_str): Constify.
11989         * go32-nat.c (go32_pid_to_str): Constify.
11990         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11991         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11992         * inferior.c (inferior_pid_to_str): Constify.
11993         * linux-nat.c (linux_nat_pid_to_str): Constify.
11994         * linux-tdep.c (linux_core_pid_to_str): Constify.
11995         * linux-thread-db.c (thread_db_pid_to_str)
11996         (thread_db_extra_thread_info): Constify.
11997         * nto-tdep.c (nto_extra_thread_info): Constify.
11998         * nto-tdep.h (nto_extra_thread_info): Constify.
11999         * obsd-nat.c (obsd_pid_to_str): Constify.
12000         * procfs.c (procfs_pid_to_str): Constify.
12001         * ravenscar-thread.c (ravenscar_extra_thread_info)
12002         (ravenscar_pid_to_str): Constify.
12003         * remote-sim.c (gdbsim_pid_to_str): Constify.
12004         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12005         Constify.
12006         * sol-thread.c (solaris_pid_to_str): Constify.
12007         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12008         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12009         * target.c (default_pid_to_str, target_pid_to_str)
12010         (normal_pid_to_str, default_pid_to_str): Constify.
12011         * target.h (target_ops::to_pid_to_str)
12012         (target_ops::to_extra_thread_info): Constify.
12013         (target_pid_to_str, normal_pid_to_str): Constify.
12014         * windows-nat.c (windows_pid_to_str): Constify.
12015         * gdbarch.sh (core_pid_to_str): Constify.
12016         * target-delegates.c: Regenerate.
12017         * gdbarch.h, gdbarch.c: Regenerate.
12018
12019 2017-04-05  Pedro Alves  <palves@redhat.com>
12020
12021         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12022         the memory of the temporary warning_pre_print override.
12023         * utils.c (warning_pre_print): Constify.
12024         * utils.h (warning_pre_print): Constify.
12025
12026 2017-04-05  Pedro Alves  <palves@redhat.com>
12027
12028         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12029         (shell_command): New function.
12030         (make_command): Use std::string.
12031         (init_cli_cmds): Register shell_command instead of shell_escape.
12032
12033 2017-04-05  Pedro Alves  <palves@redhat.com>
12034
12035         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12036         * tracepoint.c (default_collect): Don't initialize.
12037
12038 2017-04-05  Pedro Alves  <palves@redhat.com>
12039
12040         * macroexp.c (macro_buffer::shared): Now a bool.
12041         (init_buffer): Update.
12042         (init_shared_buffer): Constify 'addr' parameter.
12043         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12044         casts.
12045
12046 2017-04-05  Pedro Alves  <palves@redhat.com>
12047
12048         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12049         * disasm.c (set_disassembler_options): Constify local.
12050         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12051
12052 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12053
12054         PR gdb/21352
12055         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12056         option.
12057
12058 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12059
12060         * frame.c (frame_unwind_register_unsigned): Call
12061         frame_unwind_register_value.
12062
12063 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12064
12065         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12066         Use gdb_test_multiple, and don't match anchor.
12067
12068 2017-04-05  Pedro Alves  <palves@redhat.com>
12069
12070         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12071         (Write After Approval): Remove Simon Marchi.
12072
12073 2017-04-05  Pedro Alves  <palves@redhat.com>
12074
12075         * common/gdb_optional.h (optional::optional): Make constexpr and
12076         initialize m_dummy.
12077
12078 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12079
12080         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12081         (amd64fbsd_jmp_buf_reg_offset): Remove.
12082         (amd64fbsd_supply_uthread): Remove function.
12083         (amd64fbsd_collect_uthread): Remove function.
12084         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12085         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12086         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12087         (fbsd-nat.c): Update comment.
12088         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12089         (i386fbsd_jmp_buf_reg_offset): Remove.
12090         (i386fbsd_supply_uthread): Remove function.
12091         (i386fbsd_collect_uthread): Remove function.
12092         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12093
12094 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12095
12096         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12097         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12098         * NEWS: Mention that support for FreeBSD/alpha was removed.
12099         * alpha-fbsd-tdep.c: Delete file.
12100         * config/alpha/fbsd.mh: Delete file.
12101         * configure.host: Delete alpha*-*-freebsd* and
12102         alpha*-*-kfreebsd*-gnu.
12103         * configure.tgt: Delete alpha*-*-freebsd* and
12104         alpha*-*-kfreebsd*-gnu.
12105
12106 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12107
12108         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12109         amd64bsd_store_inferior_registers): Use ptid from regcache.
12110
12111 2017-04-04  Pedro Alves  <palves@redhat.com>
12112
12113         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12114         data fields, make them private and add "m_" prefixes.
12115         (lnp_state_machine::lnp_state_machine): New ctor.
12116         (record_line, check_line_address, handle_set_discriminator)
12117         (handle_set_address, handle_advance_pc, handle_special_opcode)
12118         (handle_advance_line, handle_set_file, handle_negate_stmt)
12119         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12120         (end_sequence, advance_line): New methods.
12121         (m_gdbarch, m_record_lines_p): New fields.
12122         (lnp_reader_state): Delete.
12123         (dwarf_record_line): Rename to ...
12124         (lnp_state_machine::record_line): ... adjust.
12125         (init_lnp_state_machine): Delete.
12126         (lnp_state_machine::lnp_state_machine): New.
12127         (check_line_address): Rename to ...
12128         (lnp_state_machine::check_line_address): This.
12129         (dwarf_decode_lines_1): Remove reference to "reader_state".
12130         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12131         State machine internal state manipulation moved to
12132         lnp_state_machine methods.
12133
12134 2017-04-04  Pedro Alves  <palves@redhat.com>
12135
12136         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12137         unittests/offset-type-selftests.c.
12138         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12139         * common/offset-type.h: New file.
12140         * common/preprocessor.h: New file.
12141         * common/traits.h: New file.
12142         * common/valid-expr.h: New file.
12143         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12144         sect_offset and cu_offset strong typedefs throughout.
12145         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12146         typedefs throughout.
12147         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12148         sect_offset and cu_offset strong typedefs throughout.
12149         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12150         typedefs throughout.
12151         * gdbtypes.h: Include "common/offset-type.h".
12152         (cu_offset): Now an offset type (strong typedef) instead of a
12153         struct.
12154         (sect_offset): Likewise.
12155         (union call_site_parameter_u): Rename "param_offset" field to
12156         "param_cu_off".
12157         * unittests/offset-type-selftests.c: New file.
12158
12159 2017-04-04  Pedro Alves  <palves@redhat.com>
12160
12161         * common/underlying.h: New file.
12162         * dwarf2read.c: Include "common/gdb_optional.h" and
12163         "common/underlying.h".
12164         (dir_index, file_name_index): New types.
12165         (file_entry): Use them.
12166         (file_entry::include): Use to_underlying.
12167         (line_header::add_file_name): Use dir_index.
12168         (read_formatted_entries): Use gdb::optional.  Read form before
12169         writting to file_entry.
12170         (dwarf_decode_line_header): Use dir_index.
12171         (lnp_state_machine::current_file): Use to_underlying.
12172         (lnp_state_machine::file): Change type to file_name_index.
12173         (dwarf_record_line): Use to_underlying.
12174         (init_lnp_state_machine): Use file_name_index.
12175         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12176
12177 2017-04-04  Pedro Alves  <palves@redhat.com>
12178
12179         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12180         operator bool, has_value and get methods.
12181
12182 2017-04-04  Pedro Alves  <palves@redhat.com>
12183
12184         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12185         fields.
12186         (line_header): Initialize all data fields.  Change type of
12187         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12188         Change type of include_dirs to std::vector<const char *>.  Remove
12189         num_include_dirs, include_dirs_size.  Change type of file_names to
12190         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12191         (line_header::line_header): New.
12192         (line_header::add_include_dir, line_header::add_file_name): New
12193         methods.
12194         (line_header::include_dir_at): Remove NULL check.
12195         (line_header::file_name_at): Add const overload.
12196         (line_header_up): New unique_ptr typedef.
12197         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12198         std::vector.  Remove free_line_header call.
12199         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12200         free_line_header call.
12201         (free_cu_line_header): Delete.
12202         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12203         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12204         Adjust to use std::vector.
12205         (free_line_header): Delete.
12206         (free_line_header_voidp): Use delete.
12207         (add_include_dir): Replace with ...
12208         (line_header::add_include_dir): ... this method.  Use std::vector.
12209         (add_file_name): Replace with ...
12210         (line_header::add_file_name): ... this method.  Use std::vector.
12211         (add_include_dir_stub): Delete.
12212         (read_formatted_entries): Remove memset.
12213         (dwarf_decode_line_header): Return a line_header_up instead of a
12214         raw pointer.  Remove cleanup handling.  Pass lambdas to
12215         read_formatted_entries.  Adjust to use line_header methods.
12216         (dwarf_decode_lines_1): Adjust to use line_header methods.
12217         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12218         use std::vector.
12219
12220 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12221
12222         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12223         instead of struct ptid.
12224
12225 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12226
12227         * frame.c (get_frame_register_bytes): Unwind using value.
12228         (put_frame_register_bytes): Likewise.
12229
12230 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12231
12232         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12233         aggregate-like.
12234
12235 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12236
12237         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12238
12239 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12240
12241         * gdbthread.h (struct thread_info): Declare constructor and
12242         destructor.  Add some in-class member initializers.
12243         * thread.c (free_thread): Remove.
12244         (init_thread_list): Call delete instead of free_thread.
12245         (new_thread): Call thread_info constructor.
12246         (thread_info::thread_info): New function.
12247         (thread_info::~thread_info): New function.
12248         (delete_thread_1): Call delete instead of free_thread.
12249         (make_cleanup_restore_current_thread): Move tp and frame to
12250         inner block.
12251
12252 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12253
12254         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12255         (arc_skip_prologue): Likewise.
12256         (arc_make_frame_cache): Likewise.
12257         (arc_pv_get_operand): New function.
12258         (arc_is_in_prologue): Likewise.
12259         (arc_analyze_prologue): Likewise.
12260         (arc_print_frame_cache): Likewise.
12261         (MAX_PROLOGUE_LENGTH): New constant.
12262
12263 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12264
12265         * configure.tgt: Add arc-insn.o.
12266         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12267         (dump_arc_instruction_command): New function.
12268         (arc_fprintf_disasm): Likewise.
12269         (arc_disassemble_info): Likewise.
12270         (arc_insn_get_operand_value): Likewise.
12271         (arc_insn_get_operand_value_signed): Likewise.
12272         (arc_insn_get_memory_base_reg): Likewise.
12273         (arc_insn_get_memory_offset): Likewise.
12274         (arc_insn_get_branch_target): Likewise.
12275         (arc_insn_dump): Likewise.
12276         (arc_insn_get_linear_next_pc): Likewise.
12277         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12278         (arc_disassemble_info): Likewise.
12279         (arc_insn_get_branch_target): Likewise.
12280         (arc_insn_get_linear_next_pc): Likewise.
12281         * NEWS: Mention new "maint print arc arc-instruction".
12282
12283 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12284
12285         * arc-tdep (maintenance_print_arc_list): New variable.
12286         (maintenance_print_arc_command): New function.
12287
12288 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12289
12290         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12291         Add "limm" and "reserved".
12292         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12293         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12294         * arc-tdep.h (arc_regnum): Likewise.
12295
12296 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12297
12298         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12299         for THREADPTR register.
12300         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12301         register.
12302         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12303         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12304         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12305
12306 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12307
12308         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12309         registers above gdbarch_num_regs (gdbarch) as privileged in
12310         call0 ABI.
12311
12312 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12313
12314         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12315         for a single specified register or for all registers in
12316         a0_base..a0_base + C0_NREGS range.
12317         (supply_gregset_reg): Call regcache_raw_supply for a single
12318         specified register or for all registers in a0_base..a0_base +
12319         C0_NREGS range.
12320
12321 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12322
12323         * arch/xtensa.h (C0_NREGS): Add definition.
12324         * xtensa-tdep.c (C0_NREGS): Remove definition.
12325
12326 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12327
12328         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12329         Drop xtensa_default_isa initialization.
12330         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12331
12332 2017-03-27  Pedro Alves  <palves@redhat.com>
12333
12334         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12335         (file_entry::include_dir): New method.
12336         (line_header::include_dir_at, line_header::file_name_at): New
12337         methods.
12338         (setup_type_unit_groups, setup_type_unit_groups)
12339         (psymtab_include_file_name): Simplify using the new methods.
12340         (lnp_state_machine) <the_line_header>: New field.
12341         <file>: Add comment.
12342         (lnp_state_machine::current_file): New method.
12343         (dwarf_record_line): Simplify using the new methods.
12344         (init_lnp_state_machine): Initialize the "the_line_header" field.
12345         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12346         Simplify using the new methods.
12347
12348 2017-03-27  Pedro Alves  <palves@redhat.com>
12349
12350         * cp-name-parser.y (make_empty): Delete.
12351         (demangler_special, nested_name, ptr_operator, array_indicator)
12352         (direct_declarator, declarator_1): Use fill_comp instead of
12353         make_empty.
12354
12355 2017-03-27  Pedro Alves  <palves@redhat.com>
12356
12357         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12358         to ATTRIBUTE_PRINTF.
12359         * solib-target.c (library_list_start_list): Print "string" not
12360         "version".
12361         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12362         gdb_xml_error call.
12363
12364 2017-03-27  Pedro Alves  <palves@redhat.com>
12365
12366         * dwarf2read.c (struct file_and_directory): New.
12367         (dwarf2_get_dwz_file): Adjust to use std::string.
12368         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12369         (find_file_and_directory): Adjust to return a file_and_directory
12370         object.
12371         (read_file_scope): Adjust to use file_and_directory.  Remove
12372         make_cleanup/do_cleanups calls.
12373         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12374         make_cleanup/do_cleanups calls.
12375         * python/python.c (do_start_initialization): Adjust to ldirname
12376         returning a std::string.
12377         * utils.c (ldirname): Now returns a std::string.
12378         * utils.h (ldirname): Change return type to std::string.
12379         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12380         returning a std::string.
12381         * xml-tdesc.c (file_read_description_xml): Likewise.
12382
12383 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12384
12385         * regcache.c (regcache_debug_print_register): New function.
12386         * regcache.h (regcache_debug_print_register): New declaration.
12387         * target.c (debug_print_register): Remove.
12388         (target_fetch_registers): Call regcache_debug_print_register.
12389         (target_store_registers): Likewise.
12390
12391 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12392
12393         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12394         reference beyond the 'lh->include_dirs' array before accessing to
12395         it.
12396         (psymtab_include_file_name): Likewise.
12397         (dwarf_decode_lines_1): Likewise.
12398         (dwarf_decode_lines): Likewise.
12399         (file_file_name): Likewise.
12400
12401 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12402
12403         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12404         inferior_ptid.
12405         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12406         ps_lsetfpregs): Likewise.
12407         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12408         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12409         ps_lsetfpregs): Likewise.
12410         * target.c (target_fetch_registers, target_store_registers):
12411         Remove asserts.
12412
12413 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12414
12415         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12416
12417 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12418
12419         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12420         (_initialize_aarch64_tdep): Register it.
12421         (aarch64_record_load_store): Handle PRFM instruction.
12422         (aarch64_process_record_test): New function.
12423
12424 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12425
12426         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12427         indentation.
12428
12429 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12430
12431         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12432
12433 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12434
12435         python/python.c (do_start_initialization): Fix memory leak.
12436
12437 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12438
12439         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12440         using get_ptrace_pid.
12441         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12442         inferior_ptid.
12443         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12444         inferior_ptid instead of pid.
12445
12446 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12447
12448         * aarch64-tdep.c: Wrap locally used classes in anonymous
12449         namespace.
12450         * arm-tdep.c: Likewise.
12451         * linespec.c: Likewise.
12452         * ui-out.c: Likewise.
12453
12454 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12455
12456         PR gdb/19637
12457         * python/lib/gdb/printer/bound_registers.py: Import sys.
12458
12459 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12460
12461         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12462         windows_thread_info parameter and use it instead of
12463         current_thread.
12464         (windows_fetch_inferior_registers): Don't set current_thread,
12465         pass the thread to do_windows_fetch_inferior_registers.  Use
12466         ptid from regcache instead of inferior_ptid.
12467         (do_windows_store_inferior_registers): Add windows_thread_info
12468         parameter and use it instead of current_thread.
12469         (windows_store_inferior_registers): Don't set current_thread,
12470         pass the thread to do_windows_store_inferior_registers.  Use
12471         ptid from regcache instead of inferior_ptid.
12472
12473 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12474
12475         * ser-mingw.c (ser_windows_raw): Remove reference to
12476         struct serial::current_timeout.
12477
12478 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12479
12480         PR tdep/20928
12481         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12482         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12483         (sparc64_fsr_type): Fix %fsr decoding.
12484
12485 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12486
12487         * python/py-record-btrace.c (btpy_insn_data): Change return type
12488         for Python 2.
12489
12490 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12491
12492         * spu-linux-nat.c (spu_fetch_inferior_registers,
12493         spu_store_inferior_registers): Use ptid from regcache, set and
12494         restore inferior_ptid.
12495         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12496         Likewise.
12497
12498 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12499
12500         * i386-linux-nat.c (fetch_register, store_register,
12501         i386_linux_fetch_inferior_registers,
12502         i386_linux_store_inferior_registers): Use ptid from regcache.
12503         * ia64-linux-nat.c (ia64_linux_fetch_register,
12504         ia64_linux_store_register): Likewise.
12505         * inf-ptrace.c (inf_ptrace_fetch_register,
12506         inf_ptrace_store_register): Likewise.
12507         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12508         m32r_linux_store_inferior_registers): Likewise.
12509         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12510         m68kbsd_store_inferior_registers): Likewise.
12511         * m68k-linux-nat.c (fetch_register, store_register,
12512         m68k_linux_fetch_inferior_registers,
12513         m68k_linux_store_inferior_registers): Likewise.
12514         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12515         m88kbsd_store_inferior_registers): Likewise.
12516         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12517         mips_fbsd_store_inferior_registers): Likewise.
12518         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12519         mips64_linux_regsets_store_registers): Likewise.
12520         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12521         mipsnbsd_store_inferior_registers): Likewise.
12522         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12523         mips64obsd_store_inferior_registers): Likewise.
12524         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12525         Likewise.
12526         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12527         ppcfbsd_store_inferior_registers): Likewise.
12528         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12529         ppc_linux_store_inferior_registers): Likewise.
12530         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12531         ppcnbsd_store_inferior_registers): Likewise.
12532         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12533         ppcobsd_store_registers): Likewise.
12534         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12535         Likewise.
12536         * ravenscar-thread.c (ravenscar_fetch_registers,
12537         ravenscar_store_registers, ravenscar_prepare_to_store):
12538         Likewise.
12539         * record-btrace.c (record_btrace_fetch_registers,
12540         record_btrace_store_registers, record_btrace_prepare_to_store):
12541         Likewise.
12542         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12543         Lookup inferior using ptid from regcache, instead of
12544         current_inferior.
12545         * remote.c (remote_fetch_registers, remote_store_registers): Use
12546         ptid from regcache.
12547         * rs6000-nat.c (fetch_register, store_register): Likewise.
12548         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12549         s390_linux_store_inferior_registers): Likewise.
12550         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12551         shnbsd_store_inferior_registers): Likewise.
12552         * sol-thread.c (sol_thread_fetch_registers,
12553         sol_thread_store_registers): Likewise.
12554         * sparc-nat.c (sparc_fetch_inferior_registers,
12555         sparc_store_inferior_registers): Likewise.
12556         * tilegx-linux-nat.c (fetch_inferior_registers,
12557         store_inferior_registers): Likewise.
12558         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12559         vaxbsd_store_inferior_registers): Likewise.
12560         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12561         store_xtregs): Likewise.
12562
12563 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12564
12565         PR gdb/14441
12566         * NEWS: Mention support for rvalue references in GDB and python.
12567         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12568         supports both lvalue and rvalue references.
12569
12570 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12571
12572         PR gdb/14441
12573         * gdbtypes.c (rank_one_type): Implement overloading
12574         resolution rules regarding rvalue references.
12575
12576 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12577
12578         PR gdb/14441
12579         * aarch64-tdep.c (aarch64_type_align)
12580         (aarch64_extract_return_value, aarch64_store_return_value): Change
12581         lvalue reference type checks to general reference type checks.
12582         * amd64-tdep.c (amd64_classify): Likewise.
12583         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12584         Likewise.
12585         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12586         (arm_store_return_value): Likewise.
12587         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12588         * c-typeprint.c (c_print_type): Likewise.
12589         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12590         (cplus_number_of_children, cplus_describe_child): Likewise.
12591         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12592         * completer.c (expression_completer): Likewise.
12593         * cp-support.c (make_symbol_overload_list_adl_namespace):
12594         Likewise.
12595         * darwin-nat-info.c (info_mach_region_command): Likewise.
12596         * dwarf2loc.c (entry_data_value_coerce_ref)
12597         (value_of_dwarf_reg_entry): Likewise.
12598         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12599         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12600         Likewise.
12601         * findvar.c (extract_typed_address, store_typed_address):
12602         Likewise.
12603         * gdbtypes.c (rank_one_type): Likewise.
12604         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12605         * infcall.c (value_arg_coerce): Likewise.
12606         * language.c (pointer_type): Likewise.
12607         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12608         Likewise.
12609         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12610         * mn10300-tdep.c (mn10300_type_align): Likewise.
12611         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12612         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12613         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12614         Likewise.
12615         * printcmd.c (print_formatted, x_command): Likewise.
12616         * python/py-type.c (typy_get_composite, typy_template_argument):
12617         Likewise.
12618         * python/py-value.c (valpy_referenced_value)
12619         (valpy_get_dynamic_type, value_has_field): Likewise.
12620         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12621         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12622         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12623         * spu-tdep.c (spu_scalar_value_p): Likewise.
12624         * symtab.c (lookup_symbol_aux): Likewise.
12625         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12626         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12627         Likewise.
12628         * valops.c (value_cast_pointers, value_cast)
12629         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12630         (value_struct_elt, value_struct_elt_bitpos)
12631         (value_find_oload_method_list, find_overload_match)
12632         (value_rtti_indirect_type): Likewise.
12633         * valprint.c (val_print_scalar_type_p, generic_val_print):
12634         Likewise.
12635         * value.c (value_actual_type, value_as_address, unpack_long)
12636         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12637         (coerce_ref): Likewise.
12638         * varobj.c (varobj_get_value_type): Likewise.
12639
12640 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12641
12642         PR gdb/14441
12643         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12644         table of constants.
12645         * python/lib/gdb/command/explore.py: Support exploring values
12646         of rvalue reference types.
12647         * python/lib/gdb/types.py: Implement get_basic_type() for
12648         rvalue reference types.
12649         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12650         constant.
12651         * python/py-value.c (valpy_getitem): Add an rvalue reference
12652         check.
12653         (valpy_reference_value): Add new parameter "refcode".
12654         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12655         New wrappers for valpy_reference_value().
12656         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12657         (gdbpy_invoke_xmethod): Likewise.
12658
12659 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12660
12661         PR gdb/14441
12662         * dwarf2read.c (process_die, read_type_die_1): Handle the
12663         DW_TAG_rvalue_reference_type DIE.
12664         (read_tag_reference_type): Add new parameter "refcode".
12665
12666 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12667
12668         PR gdb/14441
12669         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12670         (c_type_print_modifier, c_type_print_varspec_suffix)
12671         (c_type_print_base): Support printing rvalue reference types.
12672         * c-valprint.c (c_val_print, c_value_print): Support printing
12673         rvalue reference values.
12674
12675 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12676
12677         PR gdb/14441
12678         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12679         typename.
12680         * cp-support.c (replace_typedefs): Handle
12681         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12682         * python/py-type.c (typy_lookup_type): Likewise.
12683
12684 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12685
12686         PR gdb/14441
12687         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12688         * parse.c (insert_type): Change assert statement.
12689         (follow_types): Handle rvalue reference types.
12690         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12691         constant.
12692
12693 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12694
12695         PR gdb/14441
12696         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12697         value_ref() interface.
12698         * c-valprint.c (c_value_print): Likewise.
12699         * infcall.c (value_arg_coerce): Likewise.
12700         * python/py-value.c (valpy_reference_value): Likewise.
12701         * valops.c (value_cast, value_reinterpret_cast)
12702         (value_dynamic_cast, typecmp): Likewise.
12703         (value_ref): Parameterize by kind of return value reference type.
12704         * value.h (value_ref): Add new parameter "refcode".
12705
12706 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12707
12708         PR gdb/14441
12709         * dwarf2read.c (read_tag_reference_type): Use
12710         lookup_lvalue_reference_type() instead of lookup_reference_type().
12711         * eval.c (evaluate_subexp_standard): Likewise.
12712         * f-exp.y: Likewise.
12713         * gdbtypes.c (make_reference_type, lookup_reference_type):
12714         Generalize with rvalue reference types.
12715         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12716         convenience wrappers for lookup_reference_type().
12717         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12718         reference kind parameter.
12719         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12720         wrappers for lookup_reference_type().
12721         * guile/scm-type.c (gdbscm_type_reference): Use
12722         lookup_lvalue_reference_type() instead of lookup_reference_type().
12723         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12724         * parse.c (follow_types): Likewise.
12725         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12726         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12727         Likewise.
12728         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12729         (gdbpy_invoke_xmethod): Likewise.
12730         * stabsread.c: Provide extra argument to make_reference_type()
12731         call.
12732         * valops.c (value_ref, value_rtti_indirect_type): Use
12733         lookup_lvalue_reference_type() instead of lookup_reference_type().
12734
12735 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12736
12737         PR gdb/14441
12738         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12739         (TYPE_IS_REFERENCE): New macro.
12740         (struct type): Add rvalue_reference_type field.
12741         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12742
12743 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12744
12745         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12746         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12747         New function definition.
12748         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12749         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12750         New function declaration.
12751         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12752         * mi/mi-interp.h: New file.
12753         * solib.c (info_sharedlibrary_command): Replace for loop with
12754         ALL_SO_LIBS macro
12755         * solib.h (update_solib_list): New function declaration.
12756         (so_list_head): Move macro.
12757         * solist.h (ALL_SO_LIBS): New macro.
12758
12759 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12760
12761         * infcmd.c (post_create_inferior): Remove unused argument in
12762         call to solib_add.
12763         * remote.c (remote_start_remote): Likewise.
12764         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12765         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12766         (enable_break): Likewise.
12767         * solib.c (update_solib_list): Remove unused target argument
12768         and its documentation.
12769         (solib_add): Remove unused target argument.  Remove unused
12770         argument in call to update_solib_list.
12771         (info_sharedlibrary_command): Remove unused argument in call
12772         to update_solib_list.
12773         (sharedlibrary_command): Remove unused argument in call to
12774         solib_add.
12775         (handle_solib_event): Likewise.
12776         (reload_shared_libraries): Likewise.
12777         * solib.h (solib_add): Remove unused target argument.
12778
12779 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12780
12781         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12782         (s390_displaced_step_fixup): Cover relative branches with the
12783         default fixup handling.  This fixes lack of support for some
12784         relative branch instructions.
12785
12786 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12787
12788         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12789         ptid from regcache.
12790
12791 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12792
12793         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12794         i386_darwin_store_inferior_registers): Use ptid from regcache.
12795
12796 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12797
12798         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12799         i386bsd_store_inferior_registers): Use ptid from regcache.
12800
12801 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12802
12803         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12804         hppaobsd_store_registers): Use ptid from regcache.
12805
12806 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12807
12808         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12809         hppanbsd_store_registers): Use ptid from regcache.
12810
12811 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12812
12813         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12814         from regcache.  Use get_ptrace_pid.
12815
12816 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12817
12818         * corelow.c (get_core_register_section): Use ptid from regcache,
12819         update doc.
12820
12821 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12822
12823         * bsd-uthread.c (bsd_uthread_fetch_registers,
12824         bsd_uthread_store_registers): Use ptid from regcache, set and
12825         restore inferior_ptid.
12826
12827 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12828
12829         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12830         fetch_fp_regs, store_register, store_regs, store_fp_register,
12831         store_fp_regs): Use ptid from regcache.
12832
12833 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12834
12835         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12836         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12837         store_vfp_regs): Use ptid from regcache.
12838
12839 2017-03-17  Pedro Alves  <palves@redhat.com>
12840
12841         PR remote/21188
12842         * ser-base.c (ser_base_wait_for): Add comment.
12843         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12844         version.
12845         * ser-unix.c (hardwire_raw): Remove reference to
12846         scb->current_timeout.
12847         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12848         (hardwire_ops): Install ser_base_readchar instead of
12849         hardwire_readchar.
12850         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12851         Remove fields.
12852
12853 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12854
12855         PR gdb/19637
12856         * python/lib/gdb/printer/bound_registers.py: Add support for
12857         Python 3.
12858
12859 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12860
12861         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12862         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12863         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12864         byte_offset to subobj_byte_offset.  Fix the handling of
12865         DWARF_VALUE_STACK on big-endian targets when coming via an
12866         implicit pointer.
12867         (dwarf2_evaluate_loc_desc): Adjust call to
12868         dwarf2_evaluate_loc_desc_full.
12869         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12870         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12871
12872 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12873
12874         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12875         and REVSH instructions.
12876
12877 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12878
12879         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12880         (arm_record_test): Declare.
12881         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12882         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12883         align with the manual.
12884         (thumb_record_misc): Adjust the code order to align with the
12885         manual.
12886         (thumb2_record_decode_insn_handler): Fix instruction matching.
12887         (instruction_reader_thumb): New class.
12888         (arm_record_test): New function.
12889
12890 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12891
12892         * arm-tdep.c (abstract_memory_reader): New class.
12893         (instruction_reader): New class.
12894         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12895         (decode_insn): Likewise.
12896
12897 2017-03-16  Doug Evans  <dje@google.com>
12898
12899         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12900         member.  Change type of TYPE member to SCM.  All uses updated.
12901         (lsscm_make_lazy_string_smob): Add assert.
12902         (lsscm_make_lazy_string): Flag bad length values.
12903         (lsscm_elt_type): New function.
12904         (gdbscm_lazy_string_to_value): Rewrite to use
12905         lsscm_safe_lazy_string_to_value.
12906         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12907         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12908         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12909         in incoming type.
12910         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12911         * guile/scm-type.c (tyscm_scm_to_type): New function.
12912
12913 2017-03-15  Doug Evans  <dje@google.com>
12914
12915         PR python/17728, python/18439, python/18779
12916         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12917         member.  Change type of TYPE member to PyObject *.  All uses updated.
12918         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12919         (gdbpy_create_lazy_string_object): Flag bad length values.
12920         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12921         Handle typedefs in incoming type.
12922         (stpy_lazy_string_elt_type): New function.
12923         (gdbpy_extract_lazy_string): Call it.
12924         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12925         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12926         typedefs in incoming type.
12927
12928 2017-03-16  Doug Evans  <dje@google.com>
12929
12930         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12931         * guile/scm-type.c (tyscm_scm_to_type): New function.
12932
12933 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12934
12935         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12936         "ULONGEST" for "skip".
12937
12938 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12939
12940         PR gdb/21220
12941         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12942         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12943         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12944         over ptrace peek/poke until end of buffer or error.
12945
12946 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12947
12948         * parse.c (length_of_subexp): Make static.
12949         * parser-defs.h (length_of_subexp): Remove.
12950
12951 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12952
12953         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12954         as well.
12955
12956 2017-03-14  Pedro Alves  <palves@redhat.com>
12957
12958         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12959         (main): Use std::unique_ptr.  Remove calls to
12960         cp_demangled_name_parse_free.
12961
12962 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12963
12964         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12965         alphabsd_store_inferior_registers): Use regcache->ptid instead
12966         of inferior_ptid.
12967
12968 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12969
12970         * aix-thread.c (aix_thread_fetch_registers,
12971         aix_thread_store_registers): Use regcache->ptid instead of
12972         inferior_ptid.
12973
12974 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12975
12976         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12977         store_gregs_to_thread, fetch_fpregs_from_thread,
12978         store_fpregs_to_thread): Use regcache->ptid instead of
12979         inferior_ptid.
12980
12981 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12982
12983         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12984         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12985         instead of inferior_ptid.
12986
12987 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12988
12989         * target.c (target_fetch_registers, target_store_registers): Add
12990         assert.
12991
12992 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12993
12994         * regcache.h (regcache_get_ptid): New function.
12995         * regcache.c (regcache_get_ptid): New function.
12996
12997 2017-03-13  Mark Wielaard  <mark@klomp.org>
12998
12999         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13000
13001 2017-03-10  Keith Seitz  <keiths@redhat.com>
13002
13003         PR c++/8218
13004         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13005
13006 2017-03-08  Pedro Alves  <palves@redhat.com>
13007
13008         PR gdb/18360
13009         * infrun.c (start_step_over, do_target_resume, resume)
13010         (restart_threads): Assert we're not resuming a thread that is
13011         meant to be stopped.
13012         (infrun_thread_stop_requested_callback): Delete.
13013         (infrun_thread_stop_requested): If the thread is internally
13014         stopped, queue a pending stop event and clear the thread's
13015         inline-frame state.
13016         (handle_stop_requested): New function.
13017         (handle_syscall_event, handle_inferior_event_1): Use
13018         handle_stop_requested.
13019         (handle_stop_requested): New function.
13020         (handle_signal_stop): Set the thread's stop_signal here instead of
13021         at caller.
13022         (finish_step_over): Clear step over info unconditionally.
13023         (handle_signal_stop): If the user had interrupted the event
13024         thread, consider the stop a random signal.
13025         (handle_signal_stop) <signal arrived while stepping over
13026         breakpoint>: Don't restart threads here.
13027         (stop_waiting): Don't clear step-over info here.
13028
13029 2017-03-08  Pedro Alves  <palves@redhat.com>
13030
13031         PR 21206
13032         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13033         goes to argument 2, not 1.
13034
13035 2017-03-08  Pedro Alves  <palves@redhat.com>
13036
13037         PR cli/21218
13038         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13039         display_gdb_prompt.
13040         (command_line_input): Add comment.
13041
13042 2017-03-08  Pedro Alves  <palves@redhat.com>
13043
13044         PR tui/21216
13045         * tui/tui-file.c (tui_file::write): New.
13046         * tui/tui-file.h (tui_file): Override "write".
13047         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13048         factored out from ...
13049         (tui_puts): ... here.
13050         (tui_putc): Use them.
13051         (tui_write): New function.
13052         * tui/tui-io.h (tui_write): Declare.
13053
13054 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13055
13056         * Makefile.in (SFILES): Replace "environ.c" with
13057         "common/environ.c".
13058         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13059         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13060         to...
13061         * common/environ.c: ... here.
13062         * environ.h: Moved to...
13063         * common/environ.h: ... here.
13064
13065 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13066
13067         * gdbarch.sh (pstring_ptr): New static function.
13068         (gdbarch_disassembler_options): Use it.
13069         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13070         not valid_disassembler_option->name.
13071         * gdbarch.c: Regenerate.
13072
13073 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13074
13075         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13076
13077 2017-03-07  Pedro Alves  <palves@redhat.com>
13078
13079         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13080
13081 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13082
13083         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13084         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13085         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13086         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13087
13088 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13089
13090         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13091
13092 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13093
13094         * remote.c (remote_add_target_side_commands): Use range-based
13095         for loop.
13096
13097 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13098
13099         PR gdb/21165
13100         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13101         value is lazy.
13102         * valprint.c (common_val_print): Likewise.
13103
13104 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13105
13106         * NEWS: Mention new set/show disassembler-options commands.
13107         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13108         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13109         (prospective_options): New static variable.
13110         (gdb_disassembler::gdb_disassembler): Initialize
13111         m_di.disassembler_options.
13112         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13113         (get_disassembler_options): New function.
13114         (set_disassembler_options): Likewise.
13115         (set_disassembler_options_sfunc): Likewise.
13116         (show_disassembler_options_sfunc): Likewise.
13117         (disassembler_options_completer): Likewise.
13118         (_initialize_disasm): Likewise.
13119         * disasm.h (get_disassembler_options): New prototype.
13120         (set_disassembler_options): Likewise.
13121         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13122         (gdbarch_verify_disassembler_options): Likewise.
13123         * gdbarch.c: Regenerate.
13124         * gdbarch.h: Likewise.
13125         * arm-tdep.c (num_disassembly_options): Delete.
13126         (set_disassembly_style): Likewise.
13127         (arm_disassembler_options): New static variable.
13128         (set_disassembly_style_sfunc): Convert short style name into long
13129         option name.  Call set_disassembler_options.
13130         (show_disassembly_style_sfunc): New function.
13131         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13132         set_gdbarch_verify_disassembler_options.
13133         (_initialize_arm_tdep): Delete regnames variable and update callers.
13134         (arm_disassembler_options): Initialize.
13135         (disasm_options): New variable.
13136         (num_disassembly_options): Rename from this...
13137         (num_disassembly_styles): ...to this.  Compute by scanning through
13138         disasm_options.
13139         (valid_disassembly_styles): Initialize using disasm_options.
13140         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13141         set_arm_regname_option.
13142         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13143         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13144         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13145         set_gdbarch_verify_disassembler_options.
13146         * s390-tdep.c (s390_disassembler_options): New static variable.
13147         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13148         set_gdbarch_verify_disassembler_options.
13149
13150 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13151
13152         * remote.c (remote_add_target_side_condition): Remove "struct"
13153         keyword from range-based for loop.
13154
13155 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13156
13157         * remote.c (remote_add_target_side_condition): Use range-based
13158         for loop.  Update comment.
13159
13160 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13161
13162         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13163
13164 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13165
13166         * regcache.c (regcache_raw_update): New function.
13167         (regcache_raw_read): Move code to regcache_raw_update.
13168         * regcache.h (regcache_raw_update): New declaration.
13169         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13170
13171 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13172
13173         * dwarf2read.c (create_debug_type_hash_table): Initialize
13174         header.signature and header.type_offset_in_tu.
13175
13176 2017-02-24  Pedro Alves  <palves@redhat.com>
13177
13178         * symtab.c (make_file_symbol_completion_list_1): Use
13179         add_symtab_completions.
13180
13181 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13182
13183         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13184
13185 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13186
13187         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13188         I386_MAX_REGISTER_SIZE.
13189         (i386_pseudo_register_write): Likewise.
13190         (i386_process_record): Likewise.
13191         * i387-tdep.c (i387_supply_xsave): Likewise.
13192         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13193         (store_register): Likewise.
13194
13195 2017-02-23  Pedro Alves  <palves@redhat.com>
13196
13197         * ada-lang.c: Include "common/function-view.h".
13198         (ada_iterate_over_symbols): Adjust to use function_view as
13199         callback type.
13200         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13201         (ada_make_symbol_completion_list): Use a lambda.
13202         (ada_exc_search_name_matches): Delete.
13203         (name_matches_regex): New.
13204         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13205         * compile/compile-c-support.c: Include "common/function-view.h".
13206         (print_one_macro): Change prototype to accept a ui_file pointer.
13207         (write_macro_definitions): Use a lambda.
13208         * dwarf2read.c: Include "common/function-view.h".
13209         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13210         (dw2_expand_symtabs_matching): Adjust to use function_view as
13211         callback type.
13212         * language.h: Include "common/function-view.h".
13213         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13214         function_view as callback type.
13215         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13216         * linespec.c: Include "common/function-view.h".
13217         (collect_info::add_symbol): New method.
13218         (struct symbol_and_data_callback, iterate_inline_only, struct
13219         symbol_matcher_data, iterate_name_matcher): Delete.
13220         (iterate_over_all_matching_symtabs): Adjust to use function_view
13221         as callback type and lambdas.
13222         (iterate_over_file_blocks): Adjust to use function_view as
13223         callback type.
13224         (decode_compound_collector): Now a class with private fields.
13225         (decode_compound_collector::release_symbols): New method.
13226         (collect_one_symbol): Rename to...
13227         (decode_compound_collector::operator()): ... this and adjust.
13228         (lookup_prefix_sym): decode_compound_collector construction bits
13229         move to decode_compound_collector ctor.  Pass the
13230         decode_compound_collector object directly as callback.  Remove
13231         cleanups and use decode_compound_collector::release_symbols
13232         instead.
13233         (symtab_collector): Now a class with private fields.
13234         (symtab_collector::release_symtabs): New method.
13235         (add_symtabs_to_list): Rename to...
13236         (symtab_collector::operator()): ... this and adjust.
13237         (collect_symtabs_from_filename): symtab_collector construction
13238         bits move to symtab_collector ctor.  Pass the symtab_collector
13239         object directly as callback.  Remove cleanups and use
13240         symtab_collector::release_symtabs instead.
13241         (collect_symbols): Delete.
13242         (add_matching_symbols_to_info): Use lambdas.
13243         * macrocmd.c (print_macro_callback): Delete.
13244         (info_macro_command): Use a lambda.
13245         (info_macros_command): Pass print_macro_definition as callable
13246         directly.
13247         (print_one_macro): Remove 'ignore' parameter.
13248         (macro_list_command): Adjust.
13249         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13250         (macro_for_each_data::user_data): Delete field.
13251         (foreach_macro): Adjust to call the function_view.
13252         (macro_for_each): Adjust to use function_view as callback type.
13253         (foreach_macro_in_scope): Adjust to call the function_view.
13254         (macro_for_each_in_scope): Adjust to use function_view as callback
13255         type.
13256         * macrotab.h: Include "common/function-view.h".
13257         (macro_callback_fn): Declare a prototype instead of a pointer.
13258         Remove "user_data" parameter.
13259         (macro_for_each, macro_for_each_in_scope): Adjust to use
13260         function_view as callback type.
13261         * psymtab.c (partial_map_expand_apply)
13262         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13263         Adjust to use function_view as callback type and to return bool.
13264         (psym_expand_symtabs_matching): Adjust to use function_view as
13265         callback types.
13266         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13267         to use function_view as callback type and to return bool.
13268         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13269         callback types.
13270         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13271         as callback types.
13272         * symfile.h: Include "common/function-view.h".
13273         (expand_symtabs_file_matcher_ftype)
13274         (expand_symtabs_symbol_matcher_ftype)
13275         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13276         return bool.
13277         (quick_symbol_functions::map_symtabs_matching_filename)
13278         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13279         function_view as callback type and return bool.
13280         (expand_symtabs_matching): Adjust to use function_view as callback
13281         type.
13282         (maintenance_expand_name_matcher)
13283         (maintenance_expand_file_matcher): Delete.
13284         (maintenance_expand_symtabs): Use lambdas.
13285         * symtab.c (iterate_over_some_symtabs): Adjust to use
13286         function_view as callback types and return bool.
13287         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13288         of a cleanup.
13289         (lookup_symtab_callback): Delete.
13290         (lookup_symtab): Use a lambda.
13291         (iterate_over_symbols): Adjust to use function_view as callback
13292         type.
13293         (struct search_symbols_data, search_symbols_file_matches)
13294         (search_symbols_name_matches): Delete.
13295         (search_symbols): Use a pair of lambdas.
13296         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13297         (symtab_expansion_callback): Delete.
13298         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13299         * symtab.h: Include "common/function-view.h".
13300         (iterate_over_some_symtabs): Adjust to use function_view as
13301         callback type and return bool.
13302         (iterate_over_symtabs): Adjust to use function_view as callback
13303         type.
13304         (symbol_found_callback_ftype): Remove 'data' parameter and return
13305         bool.
13306         (iterate_over_symbols): Adjust to use function_view as callback
13307         type.
13308
13309 2017-02-23  Pedro Alves  <palves@redhat.com>
13310
13311         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13312         (%.o) <unittests/%.c>: New pattern.
13313         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13314         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13315         * common/function-view.h: New file.
13316         * unittests/function-view-selftests.c: New file.
13317         * configure: Regenerate.
13318
13319 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13320
13321         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13322         inferior_ptid.
13323         * go32-nat.c (go32_thread_alive): Likewise.
13324
13325 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13326
13327         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13328         delete.
13329
13330 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13331
13332         * varobj.c (varobj_clear_saved_item): Use delete instead of
13333         xfree.
13334         (update_dynamic_varobj_children): Likewise.
13335
13336 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13337
13338         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13339
13340 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13341
13342         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13343         m_enum_value to 0 in default constructor.
13344
13345 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13346
13347         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13348         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13349         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13350         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13351         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13352         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13353         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13354         IS_STORE_CONDITIONAL_INSN.
13355
13356 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13357
13358         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13359
13360 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13361
13362         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13363
13364 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13365
13366         * dwarf2read.c (skip_one_die, read_attribute_value)
13367         (dwarf2_const_value_attr, dump_die_shallow)
13368         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13369         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13370
13371 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13372
13373         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13374         (dwarf_parse_macro_header): Accept DWARF version 5.
13375         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13376
13377 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13378
13379         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13380         DW_AT_GNU_*.
13381         * common/common-exceptions.h (enum errors): Likewise.
13382         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13383         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13384         (dwarf_expr_context::execute_stack_op): Likewise.
13385         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13386         Likewise.
13387         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13388         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13389         (show_entry_values_debug, call_site_to_target_addr)
13390         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13391         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13392         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13393         (value_of_dwarf_block_entry, indirect_pieced_value)
13394         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13395         (disassemble_dwarf_expression): Likewise.
13396         * dwarf2read.c (process_die, inherit_abstract_dies)
13397         (read_call_site_scope): Likewise.
13398         * gdbtypes.h (struct func_type, struct call_site_parameter)
13399         (struct call_site): Likewise.
13400         * stack.c (read_frame_arg): Likewise.
13401         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13402
13403 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13404
13405         * defs.h (read_unsigned_leb128): New declaration.
13406         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13407         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13408         (dwarf2_find_location_expression): Call also
13409         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13410         * dwarf2loc.h (dwarf2_version): New declaration.
13411         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13412         rnglists.
13413         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13414         .debug_rnglists.
13415         (struct dwop_section_names): Add loclists_dwo.
13416         (dwop_section_names): Add .debug_loclists.dwo.
13417         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13418         (struct dwarf2_per_cu_data): Add dwarf_version.
13419         (struct dwo_sections): Add loclists.
13420         (struct attr_abbrev): Add implicit_const.
13421         (read_indirect_line_string): New declaration.
13422         (read_unsigned_leb128): Delete declaration.
13423         (rcuh_kind): New definition.
13424         (read_and_check_comp_unit_head): Change parameter
13425         is_debug_types_section to section_kind.
13426         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13427         (read_comp_unit_head): Change parameter abfd to section, add parameter
13428         section_kind.  Handle DWARF-5.
13429         (error_check_comp_unit_head): Accept also DWARF version 5.
13430         (read_and_check_comp_unit_head): Change parameter
13431         is_debug_types_section to section_kind.
13432         (read_and_check_type_unit_head): Delete function.
13433         (read_abbrev_offset): Handle DWARF-5.
13434         (create_debug_type_hash_table): Add parameter section_kind.  Process
13435         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13436         comp_unit_head.
13437         (create_debug_types_hash_table): Update create_debug_type_hash_table
13438         caller.
13439         (create_all_type_units): Call create_debug_type_hash_table.
13440         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13441         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13442         caller.
13443         (skip_one_die): Handle DW_FORM_implicit_const.
13444         (dwarf2_rnglists_process): New function.
13445         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13446         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13447         (read_attribute_value): Handle DW_FORM_implicit_const,
13448         DW_FORM_line_strp.
13449         (read_attribute): Handle DW_FORM_implicit_const.
13450         (read_indirect_string_at_offset_from): New function from
13451         read_indirect_string_at_offset.
13452         (read_indirect_string_at_offset): Call
13453         read_indirect_string_at_offset_from.
13454         (read_indirect_line_string_at_offset): New function.
13455         (read_indirect_string): New function comment.
13456         (read_indirect_line_string): New function.
13457         (read_unsigned_leb128): Make it global.
13458         (dwarf2_string_attr): Handle DWARF-5.
13459         (add_include_dir_stub, read_formatted_entries): New functions.
13460         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13461         Handle DWARF-5.
13462         (per_cu_header_read_in): Update read_comp_unit_head caller.
13463         (dwarf2_version): New function.
13464         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13465         rnglists.
13466         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13467         fields.
13468
13469 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13470
13471         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13472
13473 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13474
13475         * dwarf2read.c (dwarf2_ranges_process): New function from
13476         dwarf2_ranges_read.
13477         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13478         dwarf2_ranges_process.
13479
13480 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13481
13482         * dwarf2read.c (create_debug_type_hash_table): New function from
13483         create_debug_types_hash_table.
13484         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13485         (create_all_type_units, open_and_init_dwo_file): Update
13486         create_debug_types_hash_table callers.
13487
13488 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13489
13490         PR gdb/16188
13491         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13492         refer to 'ap', not 'args'.
13493
13494 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13495             Pedro Alves  <palves@redhat.com>
13496
13497         PR gdb/16188
13498         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13499         calls succeeded.
13500         * fork-child.c (trace_start_error): New function.
13501         (trace_start_error_with_name): Likewise.
13502         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13503         * inf-ptrace.c (inf_ptrace_me): Likewise.
13504         * inferior.h (trace_start_error): New prototype.
13505         (trace_start_error_with_name): Likewise.
13506
13507 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13508
13509         PR gdb/21164
13510         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13511         NULL before using it.
13512         * symmisc.c (maintenance_print_symbols): Likewise.
13513         (maintenance_print_msymbols): Likewise.
13514
13515 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13516
13517         * NEWS: Add record Python bindings entry.
13518
13519 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13520
13521         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13522         py-record-full.o.
13523         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13524         * python/py-record-btrace.c, python/py-record-btrace.h,
13525         python/py-record-full.c, python/py-record-full.h: New file.
13526         * python/py-record.c: Add include for py-record-btrace.h and
13527         py-record-full.h.
13528         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13529         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13530         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13531         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13532         New definition.
13533         (gdbpy_initialize_btrace): New export.
13534         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13535
13536 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13537
13538         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13539         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13540         * python/py-record.c: New file.
13541         * python/python-internal.h (gdbpy_start_recording,
13542         gdbpy_current_recording, gdpy_stop_recording,
13543         gdbpy_initialize_record): New export.
13544         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13545         (python_GdbMethods): Add gdbpy_start_recording,
13546         gdbpy_current_recording and gdbpy_stop_recording.
13547
13548 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13549
13550         * record-btrace.c (record_btrace_record_method): New function.
13551         (init_record_btrace_ops): Initialize to_record_method.
13552         * record-full.c (record_full_record_method): New function.
13553         (init_record_full_ops, init_record_full_core_ops): Add
13554         record_full_record_method.
13555         * record.h (enum record_method): New enum.
13556         * target-debug.h (target_debug_print_enum_record_method: New define.
13557         * target-delegates.c: Regenerate.
13558         * target.c (target_record_method): New function.
13559         * target.h: Include record.h.
13560         (struct target_ops) <to_record_method>: New field.
13561         (target_record_method): New export.
13562
13563 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13564
13565         * record.h (record_start, record_stop): New export.
13566         * record.c (record_start, record_stop): New function.
13567
13568 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13569
13570         * btrace.c (btrace_fetch): Copy function call segments pointer
13571         into a vector.
13572         (btrace_clear): Clear the vector.
13573         (btrace_find_insn_by_number): Use binary search to find the correct
13574         function call segment.
13575         * btrace.h (brace_fun_p): New typedef.
13576         (struct btrace_thread_info) <functions>: New field.
13577
13578 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13579
13580         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13581         * btrace.c (btrace_decode_error): ... here.  New function.
13582         * btrace.h (btrace_decode_error): New export.
13583
13584 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13585
13586         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13587         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13588         btrace_find_insn_by_number): Remove special case for gaps.
13589         * btrace.h (btrace_insn_get_error): New export.
13590         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13591         * record-btrace.c (btrace_insn_history): Print number for gaps.
13592         (record_btrace_info, record_btrace_goto): Handle gaps.
13593
13594 2017-02-14  Tom Tromey  <tom@tromey.com>
13595
13596         PR python/13598:
13597         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13598         event.
13599         * python/py-evts.c (gdbpy_initialize_py_events): Add
13600         before_prompt registry.
13601         * python/py-events.h (events_object) <before_prompt>: New field.
13602
13603 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13604
13605         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13606
13607 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13608
13609         * symfile (_initialize_symfile): Add usage text to the load command's
13610         help text.
13611
13612 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13613
13614         * utils.c (defaulted_query): Don't query on secondary UIs.
13615
13616 2017-02-10  Tom Tromey  <tom@tromey.com>
13617
13618         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13619
13620 2017-02-10  Tom Tromey  <tom@tromey.com>
13621
13622         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13623         "cleanup" local.
13624         * python/py-type.c (typy_legacy_template_argument): Remove
13625         unnecessary "cleanup" local.
13626
13627 2017-02-10  Tom Tromey  <tom@tromey.com>
13628
13629         * python/python.c (do_start_initialization): New function, from
13630         _initialize_python.
13631         (_initialize_python): Call do_start_initialization.
13632         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13633         goto.
13634
13635 2017-02-10  Tom Tromey  <tom@tromey.com>
13636
13637         * python/py-prettyprint.c (pretty_print_one_value): Use
13638         gdbpy_ref.
13639
13640 2017-02-10  Tom Tromey  <tom@tromey.com>
13641
13642         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13643         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13644         gdbpy_ref.
13645         * python/py-type.c (field_new): Use gdbpy_ref.
13646         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13647         gdbpy_ref.
13648         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13649         (py_free_pspace): Likewise.
13650         (pspace_to_pspace_object): Likewise.
13651         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13652         (py_free_objfile): Likewise.
13653         (objfile_to_objfile_object): Likewise.
13654         * python/py-inferior.c (delete_thread_object): Use
13655         gdbpy_ref.
13656         (infpy_read_memory): Likewise.
13657         (py_free_inferior): Likewise.
13658         * python/py-evtregistry.c (create_eventregistry_object): Use
13659         gdbpy_ref.
13660         * python/py-event.c (create_event_object): Use gdbpy_ref.
13661
13662 2017-02-10  Tom Tromey  <tom@tromey.com>
13663
13664         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13665         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13666         used.
13667         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13668         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13669         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13670         python/py-framefilter.c, python/py-function.c,
13671         python/py-inferior.c, python/py-infevents.c,
13672         python/py-linetable.c, python/py-newobjfileevent.c,
13673         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13674         python/py-signalevent.c, python/py-stopevent.c,
13675         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13676         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13677         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13678         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13679
13680 2017-02-10  Tom Tromey  <tom@tromey.com>
13681
13682         * ui-out.h (ui_out_emit_type): New class.
13683         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13684         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13685         and ui_out_emit_tuple.
13686         (enumerate_locals): Likewise.
13687         (py_mi_print_variables, py_print_locals, py_print_args): Use
13688         ui_out_emit_list.
13689         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13690         ui_out_emit_list.
13691         * common/gdb_optional.h: New file.
13692
13693 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13694
13695         * MAINTAINERS (Write After Approval): Update my e-mail address.
13696
13697 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13698
13699         PR gdb/21122
13700         * breakpoint.c (_initialize_breakpoint): Update the help description
13701         of the 'commands' command to indicate that it takes a list argument.
13702
13703 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13704
13705         * interps.c (current_interp_set_logging): Remove "return".
13706
13707 2017-02-09  Gary Benson  <gbenson@redhat.com>
13708
13709         * symtab.c (add_symtab_completions): Prevent NULL pointer
13710         dereference.
13711
13712 2017-02-08  Pedro Alves  <palves@redhat.com>
13713
13714         * interps.c (interp::interp): Remove reference to quiet_p.
13715         (interp_set): Make static.  Remove dead "Switching to" output
13716         code.
13717         (interp_quiet_p, interp_set_quiet): Delete.
13718         (interpreter_exec_cmd): Don't set the interpreter quiet.
13719         * interps.h (interp_quiet_p): Make static.
13720         (class interp) <quiet_p>: Remove field
13721
13722 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13723
13724         * cli/cli-decode.c (find_command_name_length): Make it extern.
13725         * cli/cli-decode.h (find_command_name_length): Declare.
13726         * cli/cli-script.c (command_name_equals, line_first_arg):
13727         New functions.
13728         (process_next_line): Use cli-decode to parse command names.
13729         (build_command_line): Make args a constant pointer.
13730
13731 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13732
13733         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13734         Remove case-insensitive search.
13735
13736 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13737
13738         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13739         at the end of the line.  Avoids an ARI warning.
13740
13741 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13742
13743         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13744         rdseed instructions.
13745         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13746
13747 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13748
13749         PR tdep/20936
13750         Provide and use sparc32 and sparc64 target description XML files.
13751         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13752         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13753         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13754         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13755         * features/sparc/sparc32-solaris.xml: New file.
13756         * features/sparc/sparc64-solaris.xml: New file.
13757         * features/sparc/sparc32-solaris.c: Generated.
13758         * features/sparc/sparc64-solaris.c: Generated.
13759         * sparc-tdep.h: Account for differences in target descriptions.
13760         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13761         (sparc32_register_type): Use target provided registers.
13762         (validate_tdesc_registers): New function.
13763         (sparc32_gdbarch_init): Use tdesc_has_registers.
13764         Set pseudoregister functions.
13765         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13766         (sparc64_register_type): Use target provided registers.
13767         (sparc64_init_abi): Set pseudoregister functions.
13768
13769 2017-02-03  Tom Tromey  <tom@tromey.com>
13770
13771         PR rust/21097:
13772         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13773         with a single member.
13774
13775 2017-02-03  Pedro Alves  <palves@redhat.com>
13776
13777         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13778         (cli_interp_base::~cli_interp_base): New.
13779         (cli_interp): New struct.
13780         (as_cli_interp): Cast the interp itself to cli_interp.
13781         (cli_interpreter_pre_command_loop): Rename to ...
13782         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13783         parameter.
13784         (cli_interpreter_init): Rename to ...
13785         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13786         boolean.  Make extern.
13787         (cli_interpreter_resume): Rename to ...
13788         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13789         extern.
13790         (cli_interpreter_suspend): Rename to ...
13791         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13792         extern.
13793         (cli_interpreter_exec): Rename to ...
13794         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13795         extern.
13796         (cli_interpreter_supports_command_editing): Rename to ...
13797         (cli_interp_base::supports_command_editing): ... this.  Remove
13798         'interp' parameter.  Make extern.
13799         (cli_ui_out): Rename to ...
13800         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13801         Make extern.
13802         (cli_set_logging): Rename to ...
13803         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13804         parameter.  Make extern.
13805         (cli_interp_procs): Delete.
13806         (cli_interp_factory): Adjust to use "new".
13807         * cli/cli-interp.h: Include "interps.h".
13808         (struct cli_interp_base): New struct.
13809         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13810         (interp_new): Delete.
13811         (interp::interp, interp::~interp): New.
13812         (interp_set): Use bool, and return void.  Assume the interpreter
13813         has suspend, init and resume methods, and that the all return
13814         void.
13815         (set_top_level_interpreter): interp_set returns void.
13816         (interp_ui_out): Adapt.
13817         (current_interp_set_logging): Adapt.
13818         (interp_data): Delete.
13819         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13820         (interp_exec): Adapt.
13821         (top_level_interpreter_data): Delete.
13822         * interps.h (interp_init_ftype, interp_resume_ftype)
13823         (interp_suspend_ftype, interp_exec_ftype)
13824         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13825         (class interp): New.
13826         (interp_new): Delete.
13827         (interp_set): Now returns void.  Use bool.
13828         (interp_data, top_level_interpreter_data): Delete.
13829         * mi/mi-common.h: Include interps.h.
13830         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13831         init, resume, suspect, exec, interp_ui_out, set_logging and
13832         pre_command_loop methods.
13833         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13834         (mi_interpreter_init): Rename to ...
13835         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13836         bool, return void and make extern.  Adjust.
13837         (mi_interpreter_resume): ... Rename to ...
13838         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13839         return void and make extern.  Adjust.
13840         (mi_interpreter_suspend): ... Rename to ...
13841         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13842         return void and make extern.  Adjust.
13843         (mi_interpreter_exec): ... Rename to ...
13844         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13845         extern.  Adjust.
13846         (mi_interpreter_pre_command_loop): ... Rename to ...
13847         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13848         parameter and make extern.
13849         (mi_on_normal_stop_1): Adjust.
13850         (mi_ui_out): Rename to ...
13851         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13852         parameter and make extern.  Adjust.
13853         (mi_set_logging): Rename to ...
13854         (mi_interp::set_logging): ... this.  Remove the 'interp'
13855         parameter and make extern.  Adjust.
13856         (mi_interp_procs): Delete.
13857         (mi_interp_factory): Adjust to use 'new'.
13858         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13859         (mi_print_exception, mi_execute_command, mi_load_progress):
13860         Adjust.
13861         * tui/tui-interp.c (tui_interp): New class.
13862         (as_tui_interp): Return a tui_interp pointer.
13863         (tui_on_normal_stop, tui_on_signal_received)
13864         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13865         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13866         to use interp::interp_ui_out.
13867         (tui_init): Rename to ...
13868         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13869         bool, return void and make extern.  Adjust.
13870         (tui_resume): Rename to ...
13871         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13872         return void and make extern.  Adjust.
13873         (tui_suspend): Rename to ...
13874         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13875         return void and make extern.  Adjust.
13876         (tui_ui_out): Rename to ...
13877         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13878         parameter, and make extern.  Adjust.
13879         (tui_exec): Rename to ...
13880         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13881         make extern.
13882         (tui_interp_procs): Delete.
13883         (tui_interp_factory): Use "new".
13884
13885 2017-02-02  Tom Tromey  <tom@tromey.com>
13886
13887         * rust-exp.y (ends_raw_string, space_then_number)
13888         (rust_identifier_start_p): Return bool.
13889         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13890         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13891         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13892         (rust_chartype_p): Return bool.
13893         (val_print_struct, rust_print_struct_def, rust_print_type):
13894         Update.
13895         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13896         Return bool.
13897
13898 2017-02-02  Tom Tromey  <tom@tromey.com>
13899
13900         * rust-lang.c: Reindent.
13901
13902 2017-02-02  Tom Tromey  <tom@tromey.com>
13903
13904         * rust-lang.h (rust_crate_for_block): Update.
13905         * rust-lang.c (rust_crate_for_block): Return std::string.
13906         (rust_get_disr_info): Use std:;string, not
13907         gdb::unique_xmalloc_ptr.
13908         * rust-exp.y (crate_name): Update.
13909
13910 2017-02-02  Pedro Alves  <palves@redhat.com>
13911
13912         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13913         field out of gdb_disassembler_test and make it static.
13914
13915 2017-02-02  Pedro Alves  <palves@redhat.com>
13916
13917         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13918         mi1_interp and mi_interp fields.
13919
13920 2017-02-02  Pedro Alves  <palves@redhat.com>
13921
13922         * cli/cli-interp.c (struct saved_output_files, saved_output):
13923         Moved from cli/cli-logging.c.
13924         (cli_set_logging): New function.
13925         (cli_interp_procs): Install cli_set_logging.
13926         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13927         Declare.
13928         * cli/cli-logging.c (struct saved_output_files, saved_output):
13929         Moved to cli/cli-interp.c.
13930         (pop_output_files): Don't save outputs here.
13931         (make_logging_output): New function.
13932         (handle_redirections): Don't build tee nor save previous outputs
13933         here.
13934         * interps.c (current_interp_set_logging): Change prototype.
13935         Assume there's always a set_logging_proc method installed.
13936         * interps.h (interp_set_logging_ftype): Change prototype.
13937         (current_interp_set_logging): Change prototype and adjust comment.
13938         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13939         use make_logging_output.
13940         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13941 2017-02-02  Pedro Alves  <palves@redhat.com>
13942
13943         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13944         from ...
13945         (set_logging_overwrite): ... here.
13946         (logging_no_redirect_file): Delete.
13947         (set_logging_redirect): Don't handle redirection on the fly.
13948         Instead warn that "logging off" / "logging on" is necessary.
13949         (pop_output_files): Delete references to logging_no_redirect_file.
13950         (show_logging_command): Always speak in terms of what will happen
13951         once logging is reenabled.
13952
13953 2017-02-02  Pedro Alves  <palves@redhat.com>
13954
13955         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13956
13957 2017-02-02  Pedro Alves  <palves@redhat.com>
13958
13959         * disasm.c (gdb_pretty_print_insn): Rename to ...
13960         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13961         Remove gdbarch parameter.  Adapt to clear the object's buffers
13962         instead of allocating new buffers, and to print using the object's
13963         gdb_disassembler instead of calling gdb_print_insn.
13964         (dump_insns): Use gdb_pretty_print_disassembler.
13965         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13966         (gdb_pretty_print_disassembler): New class.
13967         * record-btrace.c (btrace_insn_history): Use
13968         gdb_pretty_print_disassembler.
13969
13970 2017-02-02  Pedro Alves  <palves@redhat.com>
13971
13972         * ada-lang.c (type_as_string): Use string_file.
13973         * ada-valprint.c (ada_print_floating): Use string_file.
13974         * ada-varobj.c (ada_varobj_scalar_image)
13975         (ada_varobj_get_value_image): Use string_file.
13976         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13977         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13978         * breakpoint.c (update_inserted_breakpoint_locations)
13979         (insert_breakpoint_locations, reattach_breakpoints)
13980         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13981         (print_it_watchpoint): Use string_file.
13982         (save_breakpoints): Use stdio_file.
13983         * c-exp.y (oper): Use string_file.
13984         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13985         tee_file.
13986         (pop_output_files): Use delete.
13987         (handle_redirections): Use stdio_file and tee_file.
13988         * cli/cli-setshow.c (do_show_command): Use string_file.
13989         * compile/compile-c-support.c (c_compute_program): Use
13990         string_file.
13991         * compile/compile-c-symbols.c (generate_vla_size): Take a
13992         'string_file &' instead of a 'ui_file *'.
13993         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13994         of a 'ui_file *'.  Use string_file.
13995         (generate_c_for_variable_locations): Take a 'string_file &'
13996         instead of a 'ui_file *'.
13997         * compile/compile-internal.h (generate_c_for_for_one_variable):
13998         Take a 'string_file &' instead of a 'ui_file *'.
13999         * compile/compile-loc2c.c (push, pushf, unary, binary)
14000         (print_label, pushf_register_address, pushf_register)
14001         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14002         'ui_file *'.  Adjust.
14003         * compile/compile.c (compile_to_object): Use string_file.
14004         * compile/compile.h (compile_dwarf_expr_to_c)
14005         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14006         'ui_file *'.
14007         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14008         (replace_typedefs_qualified_name): Use string_file and
14009         obstack_copy0.
14010         * disasm.c (gdb_pretty_print_insn): Use string_file.
14011         (gdb_disassembly): Adjust reference the null_stream global.
14012         (do_ui_file_delete): Delete.
14013         (gdb_insn_length): Use null_stream.
14014         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14015         * dwarf2loc.c (dwarf2_compile_property_to_c)
14016         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14017         'string_file &' instead of a 'ui_file *'.
14018         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14019         * dwarf2read.c (do_ui_file_peek_last): Delete.
14020         (dwarf2_compute_name): Use string_file.
14021         * event-top.c (gdb_setup_readline): Use stdio_file.
14022         * gdbarch.sh (verify_gdbarch): Use string_file.
14023         * gdbtypes.c (safe_parse_type): Use null_stream.
14024         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14025         string_file.
14026         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14027         'string_file *' instead of a 'ui_file *'.
14028         (gdbscm_arch_disassemble): Use string_file.
14029         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14030         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14031         inherits from ui_file.
14032         (ioscm_file_port_delete, ioscm_file_port_rewind)
14033         (ioscm_file_port_put): Delete.
14034         (ioscm_file_port_write): Rename to ...
14035         (ioscm_file_port::write): ... this.  Remove file_port_magic
14036         checks.
14037         (ioscm_file_port_new): Delete.
14038         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14039         ui_file_up.
14040         * guile/scm-type.c (tyscm_type_name): Use string_file.
14041         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14042         Use string_file.
14043         * infcmd.c (print_return_value_1): Use string_file.
14044         * infrun.c (print_target_wait_results): Use string_file.
14045         * language.c (add_language): Use string_file.
14046         * location.c (explicit_to_string_internal): Use string_file.
14047         * main.c (captured_main_1): Use null_file.
14048         * maint.c (maintenance_print_architecture): Use stdio_file.
14049         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14050         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14051         event_channel>: Change type to mi_console_file pointer.
14052         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14053         (mi_console_file_delete): Delete.
14054         (struct mi_console_file): Delete.
14055         (mi_console_file_magic): Delete.
14056         (mi_console_file_new): Delete.
14057         (mi_console_file::mi_console_file): New.
14058         (mi_console_file_delete): Delete.
14059         (mi_console_file_fputs): Delete.
14060         (mi_console_file::write): New.
14061         (mi_console_raw_packet): Delete.
14062         (mi_console_file::flush): New.
14063         (mi_console_file_flush): Delete.
14064         (mi_console_set_raw): Rename to ...
14065         (mi_console_file::set_raw): ... this.
14066         * mi/mi-console.h (class mi_console_file): New class.
14067         (mi_console_file_new, mi_console_set_raw): Delete.
14068         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14069         (mi_set_logging): Use delete and tee_file.  Adjust.
14070         * mi/mi-main.c (output_register): Use string_file.
14071         (mi_cmd_data_evaluate_expression): Use string_file.
14072         (mi_cmd_data_read_memory): Use string_file.
14073         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14074         * mi/mi-out.c (mi_ui_out::main_stream): New.
14075         (mi_ui_out::rewind): Use main_stream and
14076         string_file.
14077         (mi_ui_out::put): Use main_stream and string_file.
14078         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14079         Allocate a 'string_file' instead.
14080         (mi_out_new): Don't allocate a mem_fileopen stream here.
14081         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14082         (mi_ui_out::main_stream): Declare method.
14083         * printcmd.c (eval_command): Use string_file.
14084         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14085         * python/py-arch.c (archpy_disassemble): Use string_file.
14086         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14087         * python/py-frame.c (frapy_str): Use string_file.
14088         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14089         Use string_file.
14090         * python/py-type.c (typy_str): Use string_file.
14091         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14092         * python/py-value.c (valpy_str): Use string_file.
14093         * record-btrace.c (btrace_insn_history): Use string_file.
14094         * regcache.c (regcache_print): Use stdio_file.
14095         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14096         * remote.c (escape_buffer): Use string_file.
14097         * rust-lang.c (rust_get_disr_info): Use string_file.
14098         * serial.c (serial_open_ops_1): Use stdio_file.
14099         (do_serial_close): Use delete.
14100         * stack.c (print_frame_arg): Use string_file.
14101         (print_frame_args): Remove local mem_fileopen stream, not used.
14102         (print_frame): Use string_file.
14103         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14104         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14105         Take a 'string_file *' instead of a 'ui_file *'.
14106         * top.c (new_ui): Use stdio_file and stderr_file.
14107         (free_ui): Use delete.
14108         (execute_command_to_string): Use string_file.
14109         (quit_confirm): Use string_file.
14110         * tracepoint.c (collection_list::append_exp): Use string_file.
14111         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14112         * tui/tui-file.c: Don't include "ui-file.h".
14113         (enum streamtype, struct tui_stream): Delete.
14114         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14115         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14116         (tui_file::tui_file): New method.
14117         (tui_file_fputs): Delete.
14118         (tui_file_get_strbuf): Delete.
14119         (tui_file::puts): New method.
14120         (tui_file_adjust_strbuf): Delete.
14121         (tui_file_flush): Delete.
14122         (tui_file::flush): New method.
14123         * tui/tui-file.h: Tweak intro comment.
14124         Include ui-file.h.
14125         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14126         (tui_file_adjust_strbuf): Delete declarations.
14127         (class tui_file): New class.
14128         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14129         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14130         (tui_register_format): Use string_stream.
14131         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14132         (tui_get_function_from_frame): Use string_file.
14133         * typeprint.c (type_to_string): Use string_file.
14134         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14135         (null_stream): New global.
14136         (ui_file_delete): Delete.
14137         (ui_file::ui_file): New.
14138         (null_file_isatty): Delete.
14139         (ui_file::~ui_file): New.
14140         (null_file_rewind): Delete.
14141         (ui_file::printf): New.
14142         (null_file_put): Delete.
14143         (null_file_flush): Delete.
14144         (ui_file::putstr): New.
14145         (null_file_write): Delete.
14146         (ui_file::putstrn): New.
14147         (null_file_read): Delete.
14148         (ui_file::putc): New.
14149         (null_file_fputs): Delete.
14150         (null_file_write_async_safe): Delete.
14151         (ui_file::vprintf): New.
14152         (null_file_delete): Delete.
14153         (null_file::write): New.
14154         (null_file_fseek): Delete.
14155         (null_file::puts): New.
14156         (ui_file_data): Delete.
14157         (null_file::write_async_safe): New.
14158         (gdb_flush, ui_file_isatty): Adjust.
14159         (ui_file_put, ui_file_rewind): Delete.
14160         (ui_file_write): Adjust.
14161         (ui_file_write_for_put): Delete.
14162         (ui_file_write_async_safe, ui_file_read): Adjust.
14163         (ui_file_fseek): Delete.
14164         (fputs_unfiltered): Adjust.
14165         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14166         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14167         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14168         (set_ui_file_data): Delete.
14169         (string_file::~string_file, string_file::write)
14170         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14171         (do_ui_file_as_string, ui_file_as_string): Delete.
14172         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14173         (struct mem_file): Delete.
14174         (mem_file_new): Delete.
14175         (stdio_file::stdio_file): New.
14176         (mem_file_delete): Delete.
14177         (stdio_file::stdio_file): New.
14178         (mem_fileopen): Delete.
14179         (stdio_file::~stdio_file): New.
14180         (mem_file_rewind): Delete.
14181         (stdio_file::set_stream): New.
14182         (mem_file_put): Delete.
14183         (stdio_file::open): New.
14184         (mem_file_write): Delete.
14185         (stdio_file_magic, struct stdio_file): Delete.
14186         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14187         (stdio_file::flush): New.
14188         (stdio_file_read): Rename to ...
14189         (stdio_file::read): ... this.  Adjust.
14190         (stdio_file_write): Rename to ...
14191         (stdio_file::write): ... this.  Adjust.
14192         (stdio_file_write_async_safe): Rename to ...
14193         (stdio_file::write_async_safe) ... this.  Adjust.
14194         (stdio_file_fputs): Rename to ...
14195         (stdio_file::puts) ... this.  Adjust.
14196         (stdio_file_isatty): Delete.
14197         (stdio_file_fseek): Delete.
14198         (stdio_file::isatty): New.
14199         (stderr_file_write): Rename to ...
14200         (stderr_file::write) ... this.  Adjust.
14201         (stderr_file_fputs): Rename to ...
14202         (stderr_file::puts) ... this.  Adjust.
14203         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14204         (stderr_file::stderr_file): New.
14205         (tee_file_magic): Delete.
14206         (struct tee_file): Delete.
14207         (tee_file::tee_file): New.
14208         (tee_file_new): Delete.
14209         (tee_file::~tee_file): New.
14210         (tee_file_delete): Delete.
14211         (tee_file_flush): Rename to ...
14212         (tee_file::flush): ... this.  Adjust.
14213         (tee_file_write): Rename to ...
14214         (tee_file::write): ... this.  Adjust.
14215         (tee_file::write_async_safe): New.
14216         (tee_file_fputs): Rename to ...
14217         (tee_file::puts): ... this.  Adjust.
14218         (tee_file_isatty): Rename to ...
14219         (tee_file::isatty): ... this.  Adjust.
14220         * ui-file.h (struct obstack, struct ui_file): Don't
14221         forward-declare.
14222         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14223         (ui_file_write_ftype)
14224         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14225         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14226         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14227         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14228         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14229         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14230         (set_ui_file_fseek): Delete.
14231         (ui_file_data, ui_file_delete, ui_file_rewind)
14232         (struct ui_file): New.
14233         (ui_file_up): New.
14234         (class null_file): New.
14235         (null_stream): Declare.
14236         (ui_file_write_for_put, ui_file_put): Delete.
14237         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14238         Delete.
14239         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14240         (gdb_fopen, tee_file_new): Delete.
14241         (struct string_file): New.
14242         (struct stdio_file): New.
14243         (stdio_file_up): New.
14244         (struct stderr_file): New.
14245         (class tee_file): New.
14246         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14247         of a 'ui_file *'.  Adjust.
14248         * ui-out.h (class ui_out) <field_stream>: Likewise.
14249         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14250         (null_stream): Delete.
14251         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14252         Adjust.
14253         * utils.h (struct ui_file): Delete forward declaration..
14254         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14255         (error_stream): Take a 'string_file &' instead of a
14256         'ui_file *'.
14257         * varobj.c (varobj_value_get_print_value): Use string_file.
14258         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14259         * gdbarch.c: Regenerate.
14260
14261 2017-02-02  Pedro Alves  <palves@redhat.com>
14262
14263         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14264         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14265         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14266         Adjust to call gdb_print_insn instead of
14267         gdb_disassembler::print_insn.
14268         (dump_insns, do_mixed_source_and_assembly_deprecated)
14269         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14270         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14271         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14272         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14273         declaration.
14274         (gdb_pretty_print_insn): Re-add declaration.
14275         * record-btrace.c (btrace_insn_history): Don't allocate a
14276         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14277
14278 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14279
14280         * disasm.h (gdb_disassembly): Remove file_string parameter.
14281         * disasm.c (gdb_disassembly): Likewise.
14282         * cli/cli-cmds.c (print_disassembly): Adapt.
14283         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14284         * stack.c (do_gdb_disassembly): Likewise.
14285
14286 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14287
14288         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14289         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14290         targets.  And if the implicit value is longer than needed, extract
14291         the first bytes instead of the "least significant" ones.
14292
14293 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14294
14295         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14296         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14297         (btrace_fetch): Assert can_access_registers_ptid.
14298         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14299         validate_registers_access.
14300
14301 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14302
14303         * gdbthread.h (can_access_registers_ptid): New.
14304         * thread.c (can_access_registers_ptid): New.
14305
14306 2017-02-01  Pedro Alves  <palves@redhat.com>
14307
14308         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14309
14310 2017-01-31  Pedro Alves  <palves@redhat.com>
14311
14312         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14313         Fix typos.
14314
14315 2017-01-31  Pedro Alves  <palves@redhat.com>
14316
14317         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14318         not used.
14319
14320 2017-01-31  Pedro Alves  <palves@redhat.com>
14321
14322         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14323
14324 2017-01-31  Pedro Alves  <palves@redhat.com>
14325
14326         * common/scoped_restore.h
14327         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14328         change the value's parameter type to T2.
14329         (make_scoped_restore): Likewise.
14330
14331 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14332             Richard Henderson  <rth@redhat.com>
14333
14334         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14335         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14336         GS_BASE for older kernels.
14337         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14338         GS_BASE for older kernels.
14339         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14340         and GS_BASE to the offset table.
14341         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14342         system register group.
14343         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14344         for older kernels.
14345         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14346         amd64 ABI.
14347         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14348         AMD64_GSBASE_REGNUM.
14349         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14350         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14351         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14352         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14353         i386/64bit-segments.xml in those rules.
14354         * features/i386/64bit-segments.xml: New file.
14355         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14356         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14357         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14358         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14359         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14360         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14361         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14362         * features/i386/amd64-avx-linux.c: Regenerated.
14363         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14364         * features/i386/amd64-avx-mpx.c: Regenerated.
14365         * features/i386/amd64-avx512-linux.c: Regenerated.
14366         * features/i386/amd64-linux.c: Regenerated.
14367         * features/i386/amd64-mpx-linux.c: Regenerated.
14368         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14369         * features/i386/i386-avx-mpx.c: Regenerated.
14370         * features/i386/x32-avx-linux.c: Regenerated.
14371         * features/i386/x32-avx512-linux.c: Regenerated.
14372         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14373         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14374         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14375         * regformats/i386/amd64-linux.dat: Regenerated.
14376         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14377         * regformats/i386/x32-avx-linux.dat: Regenerated.
14378         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14379         * regformats/i386/x32-linux.dat: Regenerated.
14380
14381 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14382
14383         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14384         Set to AMD64_NUM_REGS.
14385
14386 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14387
14388         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14389         that checks validity of a register number.
14390
14391 2017-01-27  Kees Cook  <keescook@google.com>
14392
14393         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14394         fetch_fpregs if target has fpa registers.
14395         (arm_linux_store_inferior_registers): Call store_fpregs if target
14396         has fpa registers.
14397
14398 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14399
14400         * cris-tdep.c (cris_gdbarch_init): Remove check for
14401         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14402
14403 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14404
14405         * corelow.c (get_core_register_section): Check for regset
14406         existence before checking for REGSET_VARIABLE_SIZE.
14407
14408 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14409             Pedro Alves  <palves@redhat.com>
14410
14411         PR gdb/20939
14412         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14413         call memory_error, save memaddr instead.
14414         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14415         negative, cal memory_error.
14416         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14417
14418 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14419
14420         * disasm-selftests.c (memory_error_test): New function.
14421         (_initialize_disasm_selftests): Register memory_error_test.
14422
14423 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14424
14425         * Makefile.in (SFILES): Add disasm-selftests.c and
14426         selftest-arch.c.
14427         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14428         * disasm-selftests.c: New file.
14429         * selftest-arch.c: New file.
14430         * selftest-arch.h: New file.
14431
14432 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14433
14434         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14435         to bfd_arch_mep.  Don't return 0 if section is not
14436         found.  Call print_insn_mep.
14437
14438 2017-01-26  Pedro Alves  <palves@redhat.com>
14439             Yao Qi  <yao.qi@linaro.org>
14440
14441         * arm-tdep.c: Include "disasm.h".
14442         (gdb_print_insn_arm): Update code to get gdbarch.
14443         * disasm.c (dis_asm_read_memory): Change it to
14444         gdb_disassembler::dis_asm_read_memory.
14445         (dis_asm_memory_error): Likewise.
14446         (dis_asm_print_address): Likewise.
14447         (gdb_pretty_print_insn): Change it to
14448         gdb_disassembler::pretty_print_insn.
14449         (dump_insns): Add one argument gdb_disassemlber.  All
14450         callers updated.
14451         (do_mixed_source_and_assembly_deprecated): Likewise.
14452         (do_mixed_source_and_assembly): Likewise.
14453         (do_assembly_only): Likewise.
14454         (gdb_disassembler::gdb_disassembler): New.
14455         (gdb_disassembler::print_insn): New.
14456         * disasm.h (class gdb_disassembler): New.
14457         (gdb_pretty_print_insn): Remove declaration.
14458         (gdb_disassemble_info): Likewise.
14459         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14460         (gdbscm_disasm_read_memory_worker): Update.
14461         (gdbscm_disasm_read_memory): Update.
14462         (gdbscm_disasm_memory_error): Remove.
14463         (gdbscm_disasm_print_address): Remove.
14464         (gdbscm_disassembler::gdbscm_disassembler): New.
14465         (gdbscm_print_insn_from_port): Update.
14466         * mips-tdep.c: Include disasm.h.
14467         (gdb_print_insn_mips): Update code to get gdbarch.
14468         * record-btrace.c (btrace_insn_history): Update.
14469         * spu-tdep.c: Include disasm.h.
14470         (struct spu_dis_asm_data): Remove.
14471         (struct spu_dis_asm_info): New.
14472         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14473         SPU id.
14474         (gdb_print_insn_spu): Cast disassemble_info to
14475         spu_dis_asm_info.
14476
14477 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14478
14479         * disasm.c (do_ui_file_delete): Delete.
14480         (gdb_insn_length): Move code creating stream to ...
14481         * utils.c (null_stream): ... here.  New function.
14482         * utils.h (null_stream): Declare.
14483
14484 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14485
14486         * python/py-inferior.c (find_thread_object): Return directly
14487         from the loop.  Remove "found" variable.
14488
14489 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14490
14491         GDB 7.12.1 released.
14492
14493 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14494
14495         * python/py-function.c (fnpy_call): Reorder declarations to have
14496         the gdbpy_enter object declared first.
14497         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14498
14499 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14500
14501         PR python/21068
14502         * python/python-internal.h (PyMem_RawMalloc): Define for
14503         Python < 3.4.
14504         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14505         PyMem_RawMalloc instead of PyMem_Malloc.
14506
14507 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14508             Luis Machado  <lgustavo@codesourcery.com>
14509
14510         * NEWS (New commands): Mention flash-erase.
14511         (New MI commands): Mention target-flash-erase.
14512         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14513         command.
14514         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14515         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14516         * target.c (flash_erase_command): New function.
14517         (initialize_targets): Add new flash-erase command.
14518         * target.h (flash_erase_command): New declaration.
14519
14520 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14521
14522         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14523         HAVE_SYS_PROCFS_H is defined.
14524
14525 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14526
14527         * remote.c (struct cached_reg): Change data into a pointer.
14528         * (stop_reply_dtr): Free data pointers before deleting vector.
14529         (process_stop_reply): Likewise.
14530         (remote_parse_stop_reply): Allocate space for data
14531
14532 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14533
14534         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14535         MAX_REGISTER_SIZE.
14536         (amd64_pseudo_register_read_value): Likewise.
14537         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14538         (store_register_using_P): Likewise.
14539         * regcache.c (regcache_xfer_part): Likewise.
14540
14541 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14542
14543         Split real and pseudo registers.
14544         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14545         (sparc32_pseudo_regnum): New enum.
14546         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14547         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14548         (SPARC32_CP0_REGISTERS): New macro.
14549         (sparc32_pseudo_register_name): New function.
14550         (sparc32_register_name): Use sparc32_pseudo_register_name.
14551         (sparc32_pseudo_register_type): New function.
14552         (sparc32_register_type): Use sparc32_pseudo_register_type.
14553         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14554         pseudo register numbers.
14555         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14556         (SPARC64_CP0_REGISTERS): New macro.
14557         (sparc64_pseudo_register_name): New function.
14558         (sparc64_register_name): Use sparc64_pseudo_register_name.
14559         (sparc64_pseudo_register_type): New function.
14560         (sparc64_register_type): Use sparc64_pseudo_register_type.
14561         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14562         pseudo register numbers.
14563         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14564         sparc64_store_arguments): Handle pseudo register numbers.
14565
14566 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14567
14568         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14569         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14570         output.
14571         (getpkt_or_notif_sane_1): Likewise.
14572
14573 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14574
14575         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14576         of CC.  Pass "-x c++-header" instead of "-x c".
14577
14578 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14579
14580         * remote.c (remote_can_async_p): Update comment.
14581
14582 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14583
14584         * linux-nat.c (linux_nat_can_async_p): Update comment.
14585
14586 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14587
14588         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14589
14590 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14591
14592         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14593
14594 2017-01-10  Tom Tromey  <tom@tromey.com>
14595
14596         * python/py-type.c (typy_legacy_template_argument): Update.
14597         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14598         ~demangle_parse_info): Declare new members.
14599         (cp_demangled_name_to_comp): Return unique_ptr.
14600         (cp_demangled_name_parse_free)
14601         (make_cleanup_cp_demangled_name_parse_free)
14602         (cp_new_demangle_parse_info): Remove.
14603         * cp-support.c (do_demangled_name_parse_free_cleanup)
14604         (make_cleanup_cp_demangled_name_parse_free): Remove.
14605         (inspect_type, cp_canonicalize_string_full)
14606         (cp_canonicalize_string): Update.
14607         (mangled_name_to_comp): Change return type.
14608         (cp_class_name_from_physname, method_name_from_physname)
14609         (cp_func_name, cp_remove_params): Update.
14610         * cp-name-parser.y (demangle_parse_info): New constructor, from
14611         cp_new_demangle_parse_info.
14612         (~demangle_parse_info): New destructor, from
14613         cp_demangled_name_parse_free.
14614         (cp_merge_demangle_parse_infos): Update.
14615         (cp_demangled_name_to_comp): Change return type.
14616
14617 2017-01-10  Tom Tromey  <tom@tromey.com>
14618
14619         * top.c (prevent_dont_repeat): Change return type.
14620         * python/python.c (execute_gdb_command): Use std::string.
14621         Update.
14622         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14623         * command.h (prevent_dont_repeat): Change return type.
14624         * breakpoint.c (bpstat_do_actions_1): Update.
14625
14626 2017-01-10  Tom Tromey  <tom@tromey.com>
14627
14628         * value.h (scoped_value_mark::~scoped_value_mark): Call
14629         free_to_mark.
14630         (scoped_value_mark::free_to_mark): New method.
14631         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14632         scoped_value_mark.
14633
14634 2017-01-10  Tom Tromey  <tom@tromey.com>
14635
14636         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14637         (valpy_reference_value, valpy_const_value, valpy_get_address)
14638         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14639         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14640         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14641         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14642         scoped_value_mark.
14643         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14644         * value.h (scoped_value_mark): New class.
14645
14646 2017-01-10  Tom Tromey  <tom@tromey.com>
14647
14648         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14649         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14650         * psymtab.c (discard_psymtabs_upto): Remove.
14651         (make_cleanup_discard_psymtabs): Remove.
14652         (struct psymtab_state): Remove.
14653
14654 2017-01-10  Tom Tromey  <tom@tromey.com>
14655
14656         * record-full.c (record_full_save_cleanups): Remove.
14657         (record_full_save): Use gdb::unlinker.
14658         * gcore.c (do_bfd_delete_cleanup): Remove.
14659         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14660         cleanups.
14661         * dwarf2read.c (unlink_if_set): Remove.
14662         (write_psymtabs_to_index): Use gdb::unlinker.
14663         * common/gdb_unlinker.h: New file.
14664
14665 2017-01-10  Tom Tromey  <tom@tromey.com>
14666
14667         * windows-tdep.c (windows_xfer_shared_library): Update.
14668         * windows-nat.c (windows_make_so): Update.
14669         * utils.h (make_cleanup_bfd_unref): Remove.
14670         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14671         * symfile.h (symfile_bfd_open)
14672         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14673         * symfile.c (read_symbols, symbol_file_add)
14674         (separate_debug_file_exists): Update.
14675         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14676         (generic_load, reread_symbols): Update.
14677         * symfile-mem.c (symbol_file_add_from_memory): Update.
14678         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14679         (spu_symbol_file_add_from_memory): Update.
14680         * solist.h (struct target_so_ops) <bfd_open>: Return
14681         gdb_bfd_ref_ptr.
14682         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14683         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14684         gdb_bfd_ref_ptr.
14685         (solib_map_sections, reload_shared_libraries_1): Update.
14686         * solib-svr4.c (enable_break): Update.
14687         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14688         * solib-frv.c (enable_break2): Update.
14689         * solib-dsbt.c (enable_break): Update.
14690         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14691         gdb_bfd_ref_ptr.
14692         (darwin_solib_get_all_image_info_addr_at_init): Update.
14693         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14694         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14695         * record-full.c (record_full_save): Update.
14696         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14697         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14698         * minidebug.c (find_separate_debug_file_in_section): Return
14699         gdb_bfd_ref_ptr.
14700         * machoread.c (macho_add_oso_symfile): Change abfd to
14701         gdb_bfd_ref_ptr.
14702         (macho_symfile_read_all_oso): Update.
14703         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14704         (macho_symfile_read): Update.
14705         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14706         (jit_bfd_try_read_symtab): Update.
14707         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14708         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14709         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14710         gdb_bfd_ref_ptr.
14711         (gdb_bfd_ref_policy): New struct.
14712         (gdb_bfd_ref_ptr): New typedef.
14713         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14714         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14715         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14716         gdb_bfd_ref_ptr.
14717         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14718         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14719         (gcore_command): Update.
14720         * exec.c (exec_file_attach): Update.
14721         * elfread.c (elf_symfile_read): Update.
14722         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14723         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14724         (open_and_init_dwo_file): Update.
14725         (open_dwp_file): Return gdb_bfd_ref_ptr.
14726         (open_and_init_dwp_file): Update.
14727         * corelow.c (core_open): Update.
14728         * compile/compile-object-load.c (compile_object_load): Update.
14729         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14730         * coffread.c (coff_symfile_read): Update.
14731         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14732         gdb_bfd_ref_ptr.  Rename.
14733         (dump_bfd_file, restore_command): Update.
14734         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14735         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14736         (find_separate_debug_file_by_buildid): Update.
14737
14738 2017-01-10  Tom Tromey  <tom@tromey.com>
14739
14740         * common/gdb_ref_ptr.h: New file.
14741         * python/py-ref.h (struct gdbpy_ref_policy): New.
14742         (gdbpy_ref): Now a typedef.
14743
14744 2017-01-10  Tom Tromey  <tom@tromey.com>
14745
14746         * utils.h (make_cleanup_htab_delete): Don't declare.
14747         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14748         Remove.
14749         * linespec.c (decode_compound_collector): Add constructor,
14750         destructor.
14751         (lookup_prefix_sym): Remove cleanup.
14752         (symtab_collector): Add constructor, destructor.
14753         (collect_symtabs_from_filename): Remove cleanup.
14754         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14755         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14756         Use htab_up.
14757         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14758         * dwarf2read.c (dw2_expand_symtabs_matching)
14759         (dw2_map_symbol_filenames, dwarf_decode_macros)
14760         (write_psymtabs_to_index): Use htab_up.
14761         * dwarf2loc.c (func_verify_no_selftailcall)
14762         (call_site_find_chain_1, func_verify_no_selftailcall)
14763         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14764         std::vector, gdb::unique_xmalloc_ptr.
14765         (call_sitep): Remove typedef.
14766         (dwarf2_locexpr_baton_eval): Remove unused variable.
14767
14768 2017-01-10  Tom Tromey  <tom@tromey.com>
14769
14770         * python/python-internal.h (make_cleanup_py_decref)
14771         (make_cleanup_py_xdecref): Don't declare.
14772         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14773         (py_xdecref, make_cleanup_py_xdecref): Remove.
14774
14775 2017-01-10  Tom Tromey  <tom@tromey.com>
14776
14777         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14778         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14779
14780 2017-01-10  Tom Tromey  <tom@tromey.com>
14781
14782         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14783
14784 2017-01-10  Tom Tromey  <tom@tromey.com>
14785
14786         * python/py-utils.c (unicode_to_encoded_string)
14787         (python_string_to_target_string)
14788         (python_string_to_target_python_string)
14789         (python_string_to_host_string, gdbpy_obj_to_string)
14790         (get_addr_from_python): Use gdbpy_ref.
14791
14792 2017-01-10  Tom Tromey  <tom@tromey.com>
14793
14794         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14795         gdbpy_ref.
14796
14797 2017-01-10  Tom Tromey  <tom@tromey.com>
14798
14799         * python/python.c (eval_python_command, gdbpy_decode_line)
14800         (gdbpy_run_events, gdbpy_start_type_printers)
14801         (gdbpy_apply_type_printers): Use gdbpy_ref.
14802
14803 2017-01-10  Tom Tromey  <tom@tromey.com>
14804
14805         * python/py-param.c (get_doc_string, compute_enum_values): Use
14806         gdbpy_ref.
14807
14808 2017-01-10  Tom Tromey  <tom@tromey.com>
14809
14810         * python/py-inferior.c (find_thread_object, build_inferior_list):
14811         Use gdbpy_ref.
14812
14813 2017-01-10  Tom Tromey  <tom@tromey.com>
14814
14815         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14816
14817 2017-01-10  Tom Tromey  <tom@tromey.com>
14818
14819         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14820         gdbpy_ref.
14821
14822 2017-01-10  Tom Tromey  <tom@tromey.com>
14823
14824         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14825         extra incref.
14826         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14827         Use gdbpy_ref.
14828
14829 2017-01-10  Tom Tromey  <tom@tromey.com>
14830
14831         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14832         gdbpy_ref.
14833
14834 2017-01-10  Tom Tromey  <tom@tromey.com>
14835
14836         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14837         decref results of PyArg_ParseTupleAndKeywords.
14838
14839 2017-01-10  Tom Tromey  <tom@tromey.com>
14840
14841         * python/python.c (python_run_simple_file): Use
14842         unique_xmalloc_ptr, gdbpy_ref.
14843
14844 2017-01-10  Tom Tromey  <tom@tromey.com>
14845
14846         * python/py-prettyprint.c (print_stack_unless_memory_error)
14847         (print_string_repr, print_children): Use gdbpy_ref.
14848         (dummy_python_frame): New class.
14849         (dummy_python_frame::dummy_python_frame): Rename from
14850         push_dummy_python_frame.
14851         (py_restore_tstate): Remove.
14852
14853 2017-01-10  Tom Tromey  <tom@tromey.com>
14854
14855         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14856
14857 2017-01-10  Tom Tromey  <tom@tromey.com>
14858
14859         * python/python.c (ensure_python_env, restore_python_env):
14860         Remove.
14861         * python/python-internal.h (ensure_python_env): Don't declare.
14862         * varobj.h (varobj_ensure_python_env): Don't declare.
14863         * varobj.c (varobj_ensure_python_env): Remove.
14864
14865 2017-01-10  Tom Tromey  <tom@tromey.com>
14866
14867         * varobj.c (varobj_value_get_print_value): Use
14868         gdbpy_enter_varobj.
14869
14870 2017-01-10  Tom Tromey  <tom@tromey.com>
14871
14872         * python/py-prettyprint.c (print_string_repr, print_children):
14873         Update.
14874         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14875         of "encoding".
14876         * varobj.c (varobj_value_get_print_value): Update.
14877         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14878
14879 2017-01-10  Tom Tromey  <tom@tromey.com>
14880
14881         * varobj.c (varobj_get_display_hint)
14882         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14883         (varobj_set_visualizer, free_variable): Use
14884         gdbpy_enter_varobj.
14885
14886 2017-01-10  Tom Tromey  <tom@tromey.com>
14887
14888         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14889         (do_finish_initialization): New function.  Use gdbpy_ref.
14890         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14891         do_finish_initialization.
14892
14893 2017-01-10  Tom Tromey  <tom@tromey.com>
14894
14895         * python/py-param.c (get_set_value, get_show_value): Use
14896         gdbpy_enter, gdbpy_ref.
14897
14898 2017-01-10  Tom Tromey  <tom@tromey.com>
14899
14900         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14901
14902 2017-01-10  Tom Tromey  <tom@tromey.com>
14903
14904         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14905
14906 2017-01-10  Tom Tromey  <tom@tromey.com>
14907
14908         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14909         Use gdbpy_enter_varobj.
14910
14911 2017-01-10  Tom Tromey  <tom@tromey.com>
14912
14913         * varobj.c (gdbpy_enter_varobj): New constructor.
14914         * python/python-internal.h (gdbpy_enter_varobj): New class.
14915         * python/py-varobj.c (py_varobj_get_iterator): Use
14916         gdbpy_enter_varobj.
14917
14918 2017-01-10  Tom Tromey  <tom@tromey.com>
14919
14920         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14921         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14922         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14923         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14924         unique_xmalloc_ptr.
14925         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14926
14927 2017-01-10  Tom Tromey  <tom@tromey.com>
14928
14929         * python/py-xmethods.c (invoke_match_method): Use
14930         gdbpy_ref.
14931
14932 2017-01-10  Tom Tromey  <tom@tromey.com>
14933
14934         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14935         gdbpy_enter, gdbpy_ref.
14936
14937 2017-01-10  Tom Tromey  <tom@tromey.com>
14938
14939         * python/python.c (python_interactive_command): Use gdbpy_enter.
14940
14941 2017-01-10  Tom Tromey  <tom@tromey.com>
14942
14943         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14944         gdbpy_ref.
14945
14946 2017-01-10  Tom Tromey  <tom@tromey.com>
14947
14948         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14949         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14950
14951 2017-01-10  Tom Tromey  <tom@tromey.com>
14952
14953         * utils.h (htab_deleter): New struct.
14954         (htab_up): New typedef.
14955         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14956         gdbpy_enter, gdbpy_ref, htab_up.
14957
14958 2017-01-10  Tom Tromey  <tom@tromey.com>
14959
14960         * python/py-unwind.c (pending_frame_invalidate): Remove.
14961         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14962
14963 2017-01-10  Tom Tromey  <tom@tromey.com>
14964
14965         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14966         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14967
14968 2017-01-10  Tom Tromey  <tom@tromey.com>
14969
14970         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14971
14972 2017-01-10  Tom Tromey  <tom@tromey.com>
14973
14974         * python/python.c (gdbpy_eval_from_control_command)
14975         (gdbpy_source_script, gdbpy_run_events)
14976         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14977         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14978         gdbpy_enter.
14979
14980 2017-01-10  Tom Tromey  <tom@tromey.com>
14981
14982         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14983
14984 2017-01-10  Tom Tromey  <tom@tromey.com>
14985
14986         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14987
14988 2017-01-10  Tom Tromey  <tom@tromey.com>
14989
14990         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14991         (python_on_inferior_call_pre, python_on_inferior_call_post)
14992         (python_on_memory_change, python_on_register_change)
14993         (python_inferior_exit, python_new_objfile, add_thread_object)
14994         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14995
14996 2017-01-10  Tom Tromey  <tom@tromey.com>
14997
14998         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14999         (bpfinishpy_handle_exit): Use gdbpy_enter.
15000
15001 2017-01-10  Tom Tromey  <tom@tromey.com>
15002
15003         * python/py-cmd.c (cmdpy_destroyer)
15004         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15005         gdbpy_enter.
15006
15007 2017-01-10  Tom Tromey  <tom@tromey.com>
15008
15009         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15010         gdbpy_enter.
15011         (gdbpy_breakpoint_has_cond): Likewise.
15012
15013 2017-01-10  Tom Tromey  <tom@tromey.com>
15014
15015         * python/python.c (gdbpy_enter): New constructor.
15016         (~gdbpy_enter): New destructor.
15017         (restore_python_env, ensure_python_env): Rewrite.
15018         * python/python-internal.h (gdbpy_enter): New class.
15019
15020 2017-01-10  Tom Tromey  <tom@tromey.com>
15021
15022         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15023
15024 2017-01-10  Tom Tromey  <tom@tromey.com>
15025
15026         * python/py-value.c (value_has_field, get_field_flag)
15027         (get_field_type, valpy_getitem, convert_value_from_python): Use
15028         gdbpy_ref.
15029
15030 2017-01-10  Tom Tromey  <tom@tromey.com>
15031
15032         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15033         gdbpy_ref.
15034
15035 2017-01-10  Tom Tromey  <tom@tromey.com>
15036
15037         * python/py-prettyprint.c (search_pp_list)
15038         (find_pretty_printer_from_objfiles)
15039         (find_pretty_printer_from_progspace)
15040         (find_pretty_printer_from_gdb, find_pretty_printer)
15041         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15042         gdbpy_ref.
15043
15044 2017-01-10  Tom Tromey  <tom@tromey.com>
15045
15046         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15047
15048 2017-01-10  Tom Tromey  <tom@tromey.com>
15049
15050         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15051         (ltpy_get_all_source_lines): Use gdbpy_ref.
15052
15053 2017-01-10  Tom Tromey  <tom@tromey.com>
15054
15055         * python/py-framefilter.c (extract_sym, extract_value)
15056         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15057         gdbpy_ref.
15058
15059 2017-01-10  Tom Tromey  <tom@tromey.com>
15060
15061         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15062
15063 2017-01-10  Tom Tromey  <tom@tromey.com>
15064
15065         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15066
15067 2017-01-10  Tom Tromey  <tom@tromey.com>
15068
15069         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15070         gdbpy_ref.
15071
15072 2017-01-10  Tom Tromey  <tom@tromey.com>
15073
15074         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15075
15076 2017-01-10  Tom Tromey  <tom@tromey.com>
15077
15078         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15079         (typy_range): Use gdbpy_ref.
15080
15081 2017-01-10  Tom Tromey  <tom@tromey.com>
15082
15083         * python/py-threadevent.c (create_thread_event_object): Use
15084         gdbpy_ref.
15085         * python/py-stopevent.c (create_stop_event_object): Simplify.
15086         (emit_stop_event): Use gdbpy_ref.
15087         * python/py-signalevent.c (create_signal_event_object): Use
15088         gdbpy_ref.
15089         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15090         (emit_new_objfile_event, create_clear_objfiles_event_object)
15091         (emit_clear_objfiles_event): Use gdbpy_ref.
15092         * python/py-infevents.c (create_inferior_call_event_object)
15093         (create_register_changed_event_object)
15094         (create_memory_changed_event_object, emit_inferior_call_event)
15095         (emit_memory_changed_event, emit_register_changed_event): Use
15096         gdbpy_ref.
15097         * python/py-exitedevent.c (create_exited_event_object)
15098         (emit_exited_event): Use gdbpy_ref.
15099         * python/py-event.h (evpy_emit_event): Remove
15100         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15101         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15102         * python/py-continueevent.c (emit_continue_event): Use
15103         gdbpy_ref.
15104         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15105         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15106         gdbpy_ref.
15107         * python/py-bpevent.c (create_breakpoint_event_object): Use
15108         gdbpy_ref.
15109
15110 2017-01-10  Tom Tromey  <tom@tromey.com>
15111
15112         * python/py-ref.h: New file.
15113
15114 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15115
15116         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15117         void.
15118         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15119         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15120         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15121         * ui-out.c (ui_out::redirect): Likewise.
15122         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15123         * cli/cli-logging.c (set_logging_redirect): Update call site of
15124         ui_out::redirect.
15125         (handle_redirections): Likewise.
15126         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15127         * top.c (execute_command_to_string): Likewise.
15128         * utils.c (do_ui_out_redirect_pop): Likewise.
15129
15130 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15131
15132         * stack.c (_initialize_stack): Update "frame" command help message.
15133
15134 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15135
15136         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15137
15138 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15139
15140         * x86-linux-nat.h: Include gdb_proc_service.h.
15141
15142 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15143
15144         * ser-base.h: Include serial.h.
15145
15146 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15147
15148         * ppc-linux-tdep.h: Include ppc-tdep.h.
15149
15150 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15151
15152         * nat/amd64-linux-siginfo.h: Include signal.h.
15153
15154 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15155
15156         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15157
15158 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15159
15160         * mi/mi-parse.h: Include mi-cmds.h.
15161
15162 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15163
15164         * inf-loop.c: Don't include "target.h".
15165         * inf-loop.h: Include it here.
15166
15167 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15168
15169         * dfp.h: Include "dboulest.h" and "expression.h".
15170
15171 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15172
15173         * ax-gdb.h: Include "ax.h".
15174
15175 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15176
15177         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15178         with nat/gdb_ptrace.h.
15179
15180 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15181
15182         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15183         new line.
15184         (mips64_fbsd_sigframe_init): Likewise.
15185
15186 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15187
15188         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15189         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15190
15191 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15192
15193         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15194         * NEWS: Mention new FreeBSD/mips native configuration.
15195         * config/mips/fbsd.mh: New file.
15196         * configure.host: Add mips*-*-freebsd*.
15197         * mips-fbsd-nat.c: New file.
15198
15199 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15200
15201         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15202         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15203         * NEWS: Mention new FreeBSD/mips target.
15204         * configure.tgt: Add mips*-*-freebsd*.
15205         * mips-fbsd-tdep.c: New file.
15206         * mips-fbsd-tdep.h: New file.
15207
15208 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15209
15210         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15211         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15212
15213 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15214
15215         Update copyright year range in all GDB files.
15216
15217 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15218
15219         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15220
15221 For older changes see ChangeLog-2016.
15222 \f
15223 Local Variables:
15224 mode: change-log
15225 left-margin: 8
15226 fill-column: 74
15227 version-control: never
15228 coding: utf-8
15229 End: