Fix "make test-cp-name-parser"
[external/binutils.git] / gdb / ChangeLog
1 2017-11-08  Pedro Alves  <palves@redhat.com>
2
3         * cp-name-parser.y (main): Don't initialize extra_chars.
4
5 2017-11-07  Tom Tromey  <tom@tromey.com>
6
7         * event-top.h (command_handler): Constify.
8         * record-full.c (cmd_record_full_start): Update.
9         * thread.c (thread_apply_all_command): Update.
10         * printcmd.c (eval_command): Update.
11         * mi/mi-main.c (mi_execute_cli_command): Update.
12         (mi_execute_async_cli_command): Update.
13         * tui/tui-stack.c (tui_update_command): Update.
14         * cli/cli-interp.c (safe_execute_command): Constify.
15         * record.c (record_start): Update.
16         (record_start, record_stop, cmd_record_start): Update.
17         * record-btrace.c (cmd_record_btrace_bts_start): Update.
18         (cmd_record_btrace_pt_start): Update.
19         (cmd_record_btrace_start): Update.
20         (cmd_record_btrace_start): Update.
21         * reverse.c (exec_reverse_once): Update.
22         * python/python.c (execute_gdb_command): Don't copy the command.
23         * event-top.c (command_line_handler): Update.
24         (command_handler): Constify.
25         * defs.h (deprecated_call_command_hook): Constify.
26         * cli/cli-script.h (execute_user_command): Constify.
27         * cli/cli-script.c (execute_user_command): Constify.
28         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
29         (enum command_control_type): Update.
30         * main.c (catch_command_errors): Remove non-const overload.
31         (catch_command_errors_ftype): Remove.
32         * python/py-cmd.c (cmdpy_function): Constify.
33         * guile/scm-cmd.c (cmdscm_function): Constify.
34         * cli/cli-dump.c (call_dump_func): Constify.
35         * cli/cli-decode.c (do_const_cfunc): Constify.
36         (do_sfunc): Constify.
37         (cmd_func): Constify.
38         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
39         * top.h (execute_command): Constify.
40         * top.c (execute_command): Constify.
41         (execute_command_to_string): Constify.
42         (deprecated_call_command_hook): Constify.
43         * command.h (cmd_func): Constify.
44         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
45
46 2017-11-07  Tom Tromey  <tom@tromey.com>
47
48         * ada-lang.c (catch_ada_exception_command): Constify.
49         (catch_assert_command): Constify.
50         * break-catch-throw.c (catch_catch_command, catch_throw_command)
51         (catch_rethrow_command): Constify.
52         (catch_exception_command_1): Constify.
53         * breakpoint.h (add_catch_command): Constify.
54         * break-catch-syscall.c (catch_syscall_command_1): Constify.
55         (catch_syscall_split_args): Constify.
56         * break-catch-sig.c (catch_signal_command): Constify.
57         (catch_signal_split_args): Constify.
58         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
59         cmd_const_sfunc_ftype.
60         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
61         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
62         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
63         (add_setshow_string_cmd, struct cmd_list_element)
64         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
65         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
66         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
67         Constify.
68         (set_cmd_sfunc): Constify.
69         (empty_sfunc): Constify.
70         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
71         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
72         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
73         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
74         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
75         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
76         Constify.
77         (set_cmd_sfunc): Constify.
78         (cmd_sfunc_ftype): Remove.
79         * compile/compile.c (set_compile_args): Constify.
80         * infrun.c (set_disable_randomization): Constify.
81         * infcmd.c (set_args_command, set_cwd_command): Constify.
82         * breakpoint.c (set_condition_evaluation_mode): Constify.
83         (add_catch_command): Constify.
84         (catch_fork_command_1, catch_exec_command_1)
85         (catch_load_command_1, catch_unload_command_1): Constify.
86         (catch_load_or_unload): Constify.
87         * guile/scm-param.c (pascm_set_func): Constify.
88         (add_setshow_generic): Constify.
89         * python/py-param.c (get_set_value): Constify.
90         * top.h (set_verbose): Constify.
91         * tui/tui-win.c (tui_set_var_cmd): Constify.
92         * mi/mi-main.c (set_mi_async_command): Constify.
93         * cli/cli-logging.c (set_logging_overwrite)
94         (set_logging_redirect): Constify.
95         * value.c (set_max_value_size): Constify.
96         * valprint.c (set_input_radix, set_output_radix): Constify.
97         * utils.c (set_width_command, set_height_command): Constify.
98         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
99         * tracepoint.c (set_disconnected_tracing)
100         (set_circular_trace_buffer, set_trace_buffer_size)
101         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
102         * top.c (set_history_size_command, set_verbose, set_editing)
103         (set_gdb_datadir, set_history_filename): Constify.
104         * target.c (set_targetdebug, maint_set_target_async_command)
105         (maint_set_target_non_stop_command, set_target_permissions)
106         (set_write_memory_permission): Constify.
107         (open_target): Constify.
108         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
109         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
110         * symtab.c (set_symbol_cache_size_handler): Constify.
111         * symfile.c (set_ext_lang_command): Constify.
112         * symfile-debug.c (set_debug_symfile): Constify.
113         * source.c (set_directories_command): Constify.
114         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
115         * serial.c (set_parity): Constify.
116         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
117         * remote.c (set_remote_exec_file, set_remotebreak)
118         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
119         * record.c (set_record_insn_history_size)
120         (set_record_call_history_size): Constify.
121         * record-full.c (set_record_full_insn_max_num): Constify.
122         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
123         * osabi.c (set_osabi): Constify.
124         * mips-tdep.c (set_mips64_transfers_32bit_regs)
125         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
126         * maint.c (maintenance_set_profile_cmd): Constify.
127         * linux-thread-db.c (set_libthread_db_search_path): Constify.
128         * language.c (set_language_command, set_range_command)
129         (set_case_command): Constify.
130         * infrun.c (set_non_stop, set_observer_mode)
131         (set_stop_on_solib_events, set_schedlock_func)
132         (set_exec_direction_func): Constify.
133         * infcmd.c (set_inferior_tty_command): Constify.
134         * disasm.c (set_disassembler_options_sfunc): Constify.
135         * demangle.c (set_demangling_command): Constify.
136         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
137         * cris-tdep.c (set_cris_version, set_cris_mode)
138         (set_cris_dwarf2_cfi): Constify.
139         * corefile.c (set_gnutarget_command): Constify.
140         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
141         (set_target_wide_charset_sfunc): Constify.
142         * breakpoint.c (update_dprintf_commands): Constify.
143         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
144         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
145         (set_disassembly_style_sfunc): Constify.
146         * arch-utils.c (set_endian, set_architecture): Constify.
147         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
148         * agent.c (set_can_use_agent): Constify.
149
150 2017-11-07  Tom Tromey  <tom@tromey.com>
151
152         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
153         (go32_pde, go32_pte, go32_pte_for_address): Constify.
154         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
155         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
156         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
157         (parse_int_arg, show_thread_default_detach_sc_cmd)
158         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
159         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
160         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
161         (show_task_pause_cmd, set_task_detach_sc_cmd)
162         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
163         (set_noninvasive_cmd, set_thread_pause_cmd)
164         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
165         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
166         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
167         * windows-nat.c (display_selectors): Constify.
168         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
169         non-const "cfunc".
170         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
171         (cmd_cfunc_eq): Likewise.
172         (struct cmd_list_element): Likewise.
173         (do_cfunc): Remove.
174         (cli_user_command_p): Update.
175         * command.h (add_cmd): Remove non-const overload.
176         (cmd_cfunc_ftype): Remove typedef.
177         (cmd_cfunc_eq): Remove non-const overload.
178         * value.c (show_values): Constify.
179         * thread.c (thread_apply_all_command): Constify.
180         * symfile.c (load_command): Constify.
181         * source.c (directory_command): Constify.
182         * maint.c (maintenance_internal_error)
183         (maintenance_demangler_warning, maintenance_space_display)
184         (maintenance_print_architecture, maintenance_translate_address)
185         (maintenance_info_selftests, maintenance_internal_warning):
186         Constify.
187         * breakpoint.c (disable_trace_command, enable_trace_command):
188         Constify.
189         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
190         Constify.
191         (add_auto_load_safe_path): Constify.
192         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
193         * top.h (show_commands): Constify.
194         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
195         * sparc64-tdep.c (adi_examine_command): Constify.
196         (adi_assign_command): Constify.
197
198 2017-11-07  Tom Tromey  <tom@tromey.com>
199
200         * frame.h (info_locals_command, info_args_command): Constify.
201         * auto-load.h (auto_load_info_scripts): Constify.
202         * inferior.h (registers_info): Constify.
203         * copying.c: Rebuild.
204         * copying.awk: Constify generated commands.
205         * auto-load.c (auto_load_info_scripts)
206         (info_auto_load_gdb_scripts): Constify.
207         * cli/cli-decode.c (struct cmd_list_element): Take a
208         cmd_const_cfunc_ftype.
209         * command.h (add_info): Take a cmd_const_cfunc_ftype.
210         * tui/tui-win.c (tui_all_windows_info): Constify.
211         * python/py-auto-load.c (info_auto_load_python_scripts):
212         Constify.
213         * cli/cli-cmds.c (show_command): Remove non-const overload.
214         * tracepoint.c (info_tvariables_command, info_scope_command):
215         Constify.
216         (info_static_tracepoint_markers_command): Constify.
217         * thread.c (info_threads_command): Constify.
218         (print_thread_info_1): Constify.
219         * target.c (info_target_command): Constify.
220         * symtab.c (info_sources_command, info_functions_command)
221         (info_types_command): Constify.
222         (info_variables_command): Remove non-const overload.
223         * symfile.c (info_ext_lang_command): Constify.
224         * stack.c (info_frame_command, info_locals_command)
225         (info_args_command): Constify.
226         (backtrace_command): Remove non-const overload.
227         * source.c (info_source_command, info_line_command): Constify.
228         * solib.c (info_sharedlibrary_command): Constify.
229         * skip.c (info_skip_command): Constify.
230         * ser-go32.c (info_serial_command): Constify.
231         * reverse.c (info_bookmarks_command): Constify.
232         * printcmd.c (info_symbol_command, info_address_command)
233         (info_display_command): Constify.
234         * osdata.c (info_osdata_command): Constify.
235         * objc-lang.c (info_selectors_command, info_classes_command):
236         Constify.
237         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
238         * memattr.c (info_mem_command): Constify.
239         * macrocmd.c (info_macro_command, info_macros_command): Constify.
240         * linux-fork.c (info_checkpoints_command): Constify.
241         * infrun.c (info_signals_command): Constify.
242         * inflow.c (info_terminal_command): Constify.
243         * inferior.c (info_inferiors_command): Constify.
244         (print_inferior): Constify.
245         * infcmd.c (info_program_command, info_all_registers_command)
246         (info_registers_command, info_vector_command)
247         (info_float_command): Constify.
248         (registers_info): Constify.
249         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
250         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
251         Constify.
252         * f-valprint.c (info_common_command): Constify.
253         * dcache.c (info_dcache_command): Constify.
254         (dcache_info_1): Constify.
255         * darwin-nat-info.c (info_mach_tasks_command)
256         (info_mach_task_command, info_mach_ports_command)
257         (info_mach_port_command, info_mach_threads_command)
258         (info_mach_thread_command, info_mach_regions_command)
259         (info_mach_regions_recurse_command, info_mach_region_command)
260         (info_mach_exceptions_command): Constify.
261         (get_task_from_args): Constify.
262         * cp-support.c (info_vtbl_command): Constify.
263         * breakpoint.c (info_watchpoints_command)
264         (info_tracepoints_command): Constify.
265         (info_breakpoints_command): Remove non-const overload.
266         * avr-tdep.c (avr_io_reg_read_command): Constify.
267         * auxv.c (info_auxv_command): Constify.
268         * ada-tasks.c (info_tasks_command): Constify.
269         (info_task): Constify.
270         * ada-lang.c (info_exceptions_command): Constify.
271
272 2017-11-07  Tom Tromey  <tom@tromey.com>
273
274         * solib.h (no_shared_libraries): Constify.
275         * frame.h (return_command): Constify.
276         * cli/cli-cmds.h (quit_command): Constify.
277         * top.h (quit_command, execute_command): Constify.
278         * target.h (flash_erase_command): Constify.
279         * inferior.h (set_inferior_args, attach_command): Constify.
280         * tracepoint.h (start_tracing, stop_tracing): Constify.
281         * breakpoint.h (break_command, tbreak_command)
282         (hbreak_command_wrapper, thbreak_command_wrapper)
283         (rbreak_command_wrapper, watch_command_wrapper)
284         (awatch_command_wrapper, rwatch_command_wrapper)
285         (get_tracepoint_by_number): Constify.
286         * symtab.c (info_variables_command, rbreak_command)
287         (symtab_symbol_info): Constify.
288         (info_variables_command): Add non-const overload.
289         * top.c (dont_repeat_command): Constify.
290         * breakpoint.c (ignore_command, commands_command)
291         (condition_command, tbreak_command, hbreak_command)
292         (thbreak_command, clear_command, break_command)
293         (info_breakpoints_command, watch_command, rwatch_command)
294         (awatch_command, trace_command, ftrace_command, strace_command)
295         (trace_pass_command, break_range_command, dprintf_command)
296         (agent_printf_command, get_tracepoint_by_number)
297         (watch_maybe_just_location, trace_pass_command): Constify.
298         (info_breakpoints_command): Add non-const overload.
299         * tracefile.c (tsave_command): Constify.
300         * infcmd.c (attach_command, disconnect_command, signal_command)
301         (queue_signal_command, stepi_command, nexti_command)
302         (finish_command, next_command, step_command, until_command)
303         (advance_command, jump_command, continue_command, run_command)
304         (start_command, starti_command, interrupt_command)
305         (run_command_1, set_inferior_args, step_1): Constify.
306         * inferior.c (add_inferior_command, remove_inferior_command)
307         (clone_inferior_command): Constify.
308         * linux-fork.c (checkpoint_command, restart_command): Constify.
309         * windows-nat.c (signal_event_command): Constify.
310         * guile/guile.c (guile_repl_command, guile_command): Constify.
311         * printcmd.c (x_command, display_command, printf_command)
312         (output_command, set_command, call_command, print_command)
313         (eval_command): Constify.
314         (non_const_set_command): Remove.
315         (_initialize_printcmd): Update.
316         * source.c (forward_search_command, reverse_search_command):
317         Constify.
318         * jit.c (jit_reader_load_command, jit_reader_unload_command):
319         Constify.
320         * infrun.c (handle_command): Constify.
321         * memattr.c (mem_command): Constify.
322         * stack.c (return_command, up_command, up_silently_command)
323         (down_command, down_silently_command, frame_command)
324         (backtrace_command, func_command, backtrace_command_1): Constify.
325         (backtrace_command): Add non-const overload.
326         * remote-sim.c (simulator_command): Constify.
327         * exec.c (set_section_command): Constify.
328         * tracepoint.c (tdump_command, trace_variable_command)
329         (tstatus_command, tstop_command, tstart_command)
330         (end_actions_pseudocommand, while_stepping_pseudocommand)
331         (collect_pseudocommand, teval_pseudocommand, actions_command)
332         (start_tracing, stop_tracing): Constify.
333         * value.c (init_if_undefined_command): Constify.
334         * tui/tui-stack.c (tui_update_command): Constify.
335         * tui/tui-win.c (tui_refresh_all_command)
336         (tui_set_tab_width_command, tui_set_win_height_command)
337         (tui_set_focus_command, tui_scroll_forward_command)
338         (tui_scroll_backward_command, tui_scroll_left_command)
339         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
340         (tui_set_win_height): Constify.
341         * tui/tui-layout.c (tui_layout_command): Constify.
342         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
343         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
344         (proc_untrace_sysexit_cmd): Constify.
345         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
346         (threadset_test_cmd, threadlist_update_test_cmd)
347         (threadalive_test): Constify.
348         * objc-lang.c (print_object_command): Constify.
349         * command.h (add_com): Constify.
350         * cli/cli-dump.c (restore_command): Constify.
351         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
352         (help_command, complete_command, shell_command, edit_command)
353         (list_command, disassemble_command, make_command)
354         (apropos_command, alias_command): Constify.
355         * cli/cli-script.c (document_command, define_command)
356         (while_command, if_command, validate_comname): Constify.
357         * cli/cli-decode.c (struct cmd_list_element): Change type of
358         "fun".
359         * target.c (do_monitor_command, flash_erase_command): Constify.
360         * regcache.c (reg_flush_command): Constify.
361         * reverse.c (reverse_step, reverse_next, reverse_stepi)
362         (reverse_nexti, reverse_continue, reverse_finish)
363         (save_bookmark_command, goto_bookmark_command)
364         (exec_reverse_once): Constify.
365         * python/python.c (python_interactive_command, python_command):
366         Constify.
367         * typeprint.c (ptype_command, whatis_command, whatis_exp):
368         Constify.
369         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
370         * gcore.c (gcore_command): Constify.
371
372 2017-11-07  Tom Tromey  <tom@tromey.com>
373
374         * printcmd.c (x_command): Call set_repeat_arguments.
375         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
376         * top.c (repeat_arguments): New global.
377         (set_repeat_arguments): New function.
378         (execute_command): Handle repeat_arguments.
379         (show_commands): Calls set_repeat_arguments.
380         * command.h (set_repeat_arguments): Declare.
381
382 2017-11-07  Tom Tromey  <tom@tromey.com>
383
384         * stack.c (backtrace_command): Use std::string.
385         (backtrace_command_1): Make "count_exp" const.
386
387 2017-11-07  Tom Tromey  <tom@tromey.com>
388
389         * source.c (directory_switch, mod_path, add_path): Constify.
390         * defs.h (add_path, mod_path, directory_switch): Constify.
391         * mi/mi-cmd-env.c (env_mod_path): Constify.
392
393 2017-11-07  Tom Tromey  <tom@tromey.com>
394
395         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
396         (run_command_1, continue_command, step_1, jump_command)
397         (signal_command, until_command, advance_command, finish_command)
398         (attach_command): Update.
399
400 2017-11-07  Tom Tromey  <tom@tromey.com>
401
402         * command.h (set_cmd_cfunc): Don't declare.
403         * cli/cli-decode.c (set_cmd_cfunc): Now static.
404
405 2017-11-07  Tom Tromey  <tom@tromey.com>
406
407         * stack.c (select_frame_command): Constify.
408         * cli/cli-decode.c (add_com_suppress_notification): Constify.
409         * command.h (add_com_suppress_notification): Constify.
410
411 2017-11-07  Tom Tromey  <tom@tromey.com>
412
413         * breakpoint.c (stop_command): Constify.
414         * cli/cli-decode.c (struct cmd_list_element): Constify.
415         * command.h (add_abbrev_prefix_cmd): Constify.
416
417 2017-11-07  Pedro Alves  <palves@redhat.com>
418
419         * breakpoint.c (extract_bp_kind): New enum.
420         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
421         factored out from ...
422         (extract_bp_number_and_location): ... here.
423         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
424
425 2017-11-07  Pedro Alves  <palves@redhat.com>
426
427         * breakpoint.c (extract_bp_number_and_location): Change return
428         type to void.  Throw error instead of warning.
429         (enable_disable_command): Adjust.
430
431 2017-11-07  Xavier Roirand  <roirand@adacore.com>
432             Pedro Alves  <palves@redhat.com>
433
434         * breakpoint.c (map_breakpoint_number_range): New, factored out
435         from ...
436         (map_breakpoint_numbers): ... here.
437         (find_location_by_number): Change parameters from string to
438         breakpoint number and location.
439         (extract_bp_number_and_location): New function.
440         (enable_disable_bp_num_loc)
441         (enable_disable_breakpoint_location_range)
442         (enable_disable_command): New functions, factored out ...
443         (enable_command, disable_command): ... these functions, and
444         adjusted to support ranges.
445         * NEWS: Document enable/disable breakpoint location range feature.
446
447 2017-11-06  Luis Machado  <luis.machado@linaro.org>
448
449         * MAINTAINERS (Write After Approval): Update my e-mail address.
450
451 2017-11-06  Pedro Alves  <palves@redhat.com>
452
453         * gnu-nat.c (gnu_terminal_init): Delete.
454         (gnu_target): Don't install gnu_terminal_init.
455         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
456         (child_terminal_init): ... this function.
457
458 2017-11-06  Pedro Alves  <palves@redhat.com>
459
460         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
461         sgtty.h.
462         * config.in, configure: Regenerate.
463
464 2017-11-06  Pedro Alves  <palves@redhat.com>
465
466         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
467         (async_init_signals): Adjust.
468         (handle_stop_sig): Rename to ...
469         (handle_sigtstp): ... this.
470         (async_stop_sig): Rename to ...
471         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
472         SIGTSTP path.
473         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
474         instead of STOP_SIGNAL thoughout.
475         (handle_stop_sig): Rename to ...
476         (handle_sigtstp): ... this.
477         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
478
479 2017-11-06  Pedro Alves  <palves@redhat.com>
480
481         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
482         longer set flags twice in row.
483
484 2017-11-06  Pedro Alves  <palves@redhat.com>
485
486         * Makefile.in (SER_HARDWIRE): Update comment.
487         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
488         * common/gdb_termios.h: Delete file.
489         * common/job-control.c: Include termios.h and unistd.h instead of
490         gdb_termios.h.
491         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
492         check.
493         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
494         Remove sgtty code.
495         * configure.ac: No longer check for termio.h and sgtty.h.
496         * configure: Regenerate.
497         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
498         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
499         Replace PROCESS_GROUP_TYPE references with pid_t references
500         throughout.
501         (gdb_getpgrp): Delete.
502         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
503         (child_terminal_inferior): Remove comment.  Remove sgtty code.
504         (child_terminal_ours_1): Use tcgetpgrp directly instead of
505         gdb_getpgrp.  Use serial_set_tty_state instead aof
506         serial_noflush_set_tty_state.  Remove sgtty code.
507         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
508         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
509         (inferior_process_group): Now returns pid_t.
510         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
511         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
512         * ser-event.c (serial_event_ops): Update.
513         * ser-go32.c (dos_noflush_set_tty_state): Delete.
514         (dos_ops): Update.
515         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
516         * ser-pipe.c (pipe_ops): Update.
517         * ser-tcp.c (tcp_ops): Update.
518         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
519         HAVE_TERMIOS checks.
520         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
521         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
522         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
523         assume termios.
524         (hardwire_noflush_set_tty_state): Delete.
525         (hardwire_print_tty_state, hardwire_drain_output)
526         (hardwire_flush_output, hardwire_flush_input)
527         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
528         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
529         code, and assume termios.
530         (hardwire_ops): Update.
531         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
532         * serial.c (serial_noflush_set_tty_state): Delete.
533         * serial.h (serial_noflush_set_tty_state): Delete.
534         (serial_ops::noflush_set_tty_state): Delete.
535
536 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
537
538         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
539         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
540         (COMMON_OBS): Remove doublest.o and dfp.o.
541         Do not build target-float.c (instead of doublest.c)
542         with -Wformat-nonliteral.
543
544         * doublest.c: Remove file.
545         * doublest.h: Remove file.
546         * dfp.c: Remove file.
547         * dfp.h: Remove file.
548
549         * target-float.c: Do not include "doublest.h" and "dfp.h".
550         (DOUBLEST): Move here from doublest.h.
551         (enum float_kind): Likewise.
552         (FLOATFORMAT_CHAR_BIT): Likewise.
553         (FLOATFORMAT_LARGEST_BYTES): Likewise.
554         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
555         (floatformat_precision): Likewise.
556         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
557         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
558         Likewise.
559         (host_float_format, host_double_format, host_long_double_format):
560         Likewise.
561         (floatformat_to_string, floatformat_from_string): Likewise.
562         (floatformat_to_doublest): Likewise.  Also, inline the original
563         convert_floatformat_to_doublest.
564         (floatformat_from_doublest): Likewise.  Also, inline the original
565         convert_floatformat_from_doublest.
566
567         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
568         (MAX_DECIMAL_STRING): Move here from dfp.c.
569         (match_endianness): Likewise.
570         (set_decnumber_context, decimal_check_errors): Likewise.
571         (decimal_from_number, decimal_to_number): Likewise.
572         (decimal_to_string, decimal_from_string): Likewise.  Make static.
573         (decimal_from_longest, decimal_from_ulongest): Likewise.
574         (decimal_to_longest): Likewise.
575         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
576         (decimal_convert): Likewise.
577
578 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
579
580         * doublest.c: Do not include "gdbtypes.h".
581         (extract_typed_floating): Remove.
582         (store_typed_floating): Remove.
583         (convert_typed_floating): Remove.
584         * doublest.h (struct type): Remove.
585         (DOUBLEST_PRINT_FORMAT): Remove.
586         (DOUBLEST_SCAN_FORMAT): Remove.
587         (extract_typed_floating): Remove.
588         (store_typed_floating): Remove.
589         (convert_typed_floating): Remove.
590
591         * dfp.c (decimal_from_doublest): Remove.
592         (decimal_to_doublest): Remove.
593         * dfp.h: Do not include "doublest.h".
594         (decimal_from_doublest): Remove.
595         (decimal_to_doublest): Remove.
596
597         * value.c: Do not include "doublest.h" and "dfp.h".
598         (value_as_double): Remove.
599         (unpack_double): Remove.
600         (value_from_double): Remove.
601         (value_from_decfloat): Remove.
602         * value.h: Do not include "doublest.h".
603         (value_as_double): Remove.
604         (unpack_double): Remove.
605         (value_from_double): Remove.
606         (value_from_decfloat): Remove.
607
608 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
609
610         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
611         (i386_extract_return_value): Use target_float_convert.
612         (i386_store_return_value): Likewise.
613         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
614         (i387_value_to_register): Likewise.
615         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
616         (ia64_register_to_value): Use target_float_convert.
617         (ia64_value_to_register): Likewise.
618         (ia64_extract_return_value): Likewise.
619         (ia64_store_return_value): Likewise.
620         (ia64_push_dummy_call): Likewise.
621         * m68k-tdep.c: Include "target-float.h".
622         (m68k_register_to_value): Use target_float_convert.
623         (m68k_value_to_register): Likewise.
624         (m68k_svr4_extract_return_value): Likewise.
625         (m68k_svr4_store_return_value): Likewise.
626         * ppc-sysv-tdep.c: Include "target-float.h".
627         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
628         (do_ppc_sysv_return_value): Likewise.
629         (ppc64_sysv_abi_push_freg): Likewise.
630         (ppc64_sysv_abi_return_value_base): Likewise.
631         * rs6000-aix-tdep.c: Include "target-float.h".
632         (rs6000_push_dummy_call): Use target_float_convert.
633         (rs6000_return_value): Likewise.
634         * rs6000-lynx178-tdep.c: Include "target-float.h".
635         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
636         (rs6000_lynx178_return_value): Likewise.
637         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
638         (rs6000_register_to_value): Use target_float_convert.
639         (rs6000_value_to_register): Likewise.
640         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
641         (arm_extract_return_value): Use target_float_convert.
642         (arm_store_return_value): Likewise.
643         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
644         (sh_register_convert_to_virtual): Use target_float_convert.
645         (sh_register_convert_to_raw): Likewise.
646         * sh64-tdep.c: Include "target-float.h".
647         (sh64_extract_return_value): Use target_float_convert.
648         (sh64_register_convert_to_virtual): Likewise.
649         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
650
651 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
652
653         * target-float.c (floatformat_to_host_double): New function.
654         (floatformat_from_host_double): Likewise.
655         (target_float_to_host_double): Likewise.
656         (target_float_from_host_double): Likewise.
657         * target-float.h (target_float_to_host_double): Add prototype.
658         (target_float_from_host_double): Likewise.
659
660         * guile/scm-value.c: Include "target-float.h".
661         (gdbscm_value_to_real): Use target_float_to_host_double.
662         Handle integer source values via value_as_long.
663         * guile/scm-math.c: Include "target-float.h".  Do not include
664         "doublest.h", "dfp.h", and "expression.h".
665         (vlscm_convert_typed_number): Use target_float_from_host_double.
666         (vlscm_convert_number): Likewise.
667
668         * python/py-value.c (valpy_float): Use target_float_to_host_double.
669         (convert_value_from_python): Use target_float_from_host_double.
670
671 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
672
673         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
674         (cast_from_fixed): Likewise.
675         (ada_scaling_type): New function.
676         (ada_delta): Return value instead of DOUBLEST.  Perform target
677         arithmetic instead of host arithmetic.
678         (scaling_factor): Rename to ...
679         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
680         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
681         (ada_fixed_to_float): Remove.
682         (ada_float_to_fixed): Remove.
683         * ada-lang.h (ada_fixed_to_float): Remove.
684         (ada_float_to_fixed): Remove.
685         (ada_delta): Return value instead of DOUBLEST.
686         (ada_scaling_factor): Add prototype.
687
688         * ada-typeprint.c: Include "target-float.h".
689         (print_fixed_point_type): Perform target arithmetic instead of
690         host arithmetic.
691         * ada-valprint.c: Include "target-float.h".
692         (ada_val_print_num): Perform target arithmetic instead of
693         host arithmetic for fixed-point types.
694
695 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
696
697         * target-float.c: Include <math.h>.
698         (floatformat_binop): New function.
699         (floatformat_compare): Likewise.
700         (target_float_binop): Likewise.
701         (target_float_compare): Likewise.
702         * target-float.h: Include "expression.h".
703         (target_float_binop): Add prototype.
704         (target_float_compare): Likewise.
705
706         * valarith.c: Do not include "doublest.h" and "dfp.h".
707         Include "common/byte-vector.h".
708         (value_args_as_decimal): Remove, replace by ...
709         (value_args_as_target_float): ... this function.  Handle both
710         binary and decimal target floating-point formats.
711         (scalar_binop): Handle both binary and decimal FP using
712         value_args_as_target_float and target_float_binop.
713         (value_equal): Handle both binary and decimal FP using
714         value_args_as_target_float and target_float_compare.
715         (value_less): Likewise.
716         (value_pos): Handle all scalar types as simple copy.
717         (value_neg): Handle all scalar types via BINOP_SUB from 0.
718         * dfp.c (decimal_binop): Throw error instead of internal_error
719         when called with an unsupported operation code.
720
721 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
722
723         * target-float.c (target_float_to_string): New function.
724         (target_float_from_string): New function.
725         * target-float.h (target_float_to_string): Add prototype.
726         (target_float_from_string): Add prototype.
727
728         * valprint.c: Include "target-float.h".  Do not include
729         "doublest.h" and "dfp.h".
730         (print_floating): Use target_float_to_string.
731         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
732         (printf_floating): Use target_float_to_string.
733         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
734         (print_i387_value): Use target_float_to_string.
735         * mips-tdep.c: Include "target-float.h".
736         (mips_print_fp_register): Use target_float_to_string.
737         * sh64-tdep.c: Include "target-float.h".
738         (sh64_do_fp_register): Use target_float_to_string.
739
740         * parse.c: Include "target-float.h".  Do not include
741         "doublest.h" and "dfp.h".
742         (parse_float): Use target_float_from_string.
743         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
744         (define_symbol): Use target_float_from_string.
745         * gdbarch-selftests.c: Include "target-float.h".
746         (register_to_value_test): Use target_float_from_string.
747
748 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
749
750         * Makefile.c (SFILES): Add target-float.c.
751         (HFILES_NO_SRCDIR): Add target-float.h.
752         (COMMON_OBS): Add target-float.o.
753         * target-float.h: New file.
754         * target-float.c: New file.
755
756         * doublest.c (floatformat_classify): Fix detection of float_zero.
757
758         * gdbtypes.c (is_floating_type): New function.
759         * gdbtypes.h (is_floating_type): Add prototype.
760
761         * value.c: Do not include "floatformat.h".
762         (unpack_double): Use target_float_is_valid.
763         (is_floating_value): New function.
764         * value.h (is_floating_value): Add prototype-
765
766         * valarith.c: Include "target-float.h".
767         (value_logical_not): Use target_float_is_zero.
768
769         * python/py-value.c: Include "target-float.h".
770         (valpy_nonzero): Use target_float_is_zero.
771
772 2017-11-04  Tom Tromey  <tom@tromey.com>
773
774         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
775
776 2017-11-04  Tom Tromey  <tom@tromey.com>
777
778         * breakpoint.c (set_momentary_breakpoint): Return
779         breakpoint_up.
780         (until_break_command): Update.
781         (new_until_break_fsm): Change argument types to
782         breakpoint_up.
783         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
784         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
785         Remove.
786         * infcmd.c (finish_forward): Update.
787         * breakpoint.h (set_momentary_breakpoint)
788         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
789         (make_cleanup_delete_breakpoint): Remove.
790         (struct breakpoint_deleter): New.
791         (breakpoint_up): New typedef.
792         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
793         (insert_exception_resume_breakpoint): Update.
794         (insert_exception_resume_from_probe): Update.
795         (insert_longjmp_resume_breakpoint): Update.
796         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
797         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
798         * infcall.c (call_function_by_hand_dummy): Update
799
800 2017-11-04  Tom Tromey  <tom@tromey.com>
801
802         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
803
804 2017-11-04  Tom Tromey  <tom@tromey.com>
805
806         * linux-tdep.c (linux_core_info_proc_mappings): Use
807         gdb::def_vector.
808         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
809         "size" argument.
810         (linux_corefile_thread): Update.
811         (linux_make_corefile_notes): Remove unused variable.
812
813 2017-11-04  Tom Tromey  <tom@tromey.com>
814
815         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
816         gdb::byte_vector.
817
818 2017-11-04  Tom Tromey  <tom@tromey.com>
819
820         * objfiles.c (do_free_objfile_cleanup): Remove.
821         * compile/compile-object-load.c (compile_object_load): Update.
822         * objfiles.h (make_cleanup_free_objfile): Remove.
823
824 2017-11-04  Tom Tromey  <tom@tromey.com>
825
826         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
827         (adi_read_versions): Change "tags" to "gdb_byte *".
828         (adi_print_versions): Likewise.
829
830 2017-11-04  Tom Tromey  <tom@tromey.com>
831
832         * breakpoint.c
833         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
834         from start_rbreak_breakpoints.
835         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
836         * breakpoint.h (class scoped_rbreak_breakpoints): New.
837         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
838         * symtab.c (do_end_rbreak_breakpoints): Remove.
839         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
840
841 2017-11-04  Tom Tromey  <tom@tromey.com>
842
843         * cp-namespace.c (reset_directive_searched): Remove.
844         (cp_lookup_symbol_via_imports): Use scoped_restore.
845         * cp-support.c (reset_directive_searched): Remove.
846         (make_symbol_overload_list_using): Use scoped_restore.
847         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
848         (reset_directive_searched): Remove.
849
850 2017-11-04  Tom Tromey  <tom@tromey.com>
851
852         * symfile.c (find_separate_debug_file_by_debuglink): Use
853         unique_xmalloc_ptr.
854
855 2017-11-04  Tom Tromey  <tom@tromey.com>
856
857         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
858         type of "info".
859         (compute_stack_depth): Likewise.
860         (do_compile_dwarf_expr_to_c): Use std::vector.
861
862 2017-11-04  Tom Tromey  <tom@tromey.com>
863
864         * compile/compile-object-load.c (link_callbacks_einfo): Use
865         std::string.
866
867 2017-11-04  Tom Tromey  <tom@tromey.com>
868
869         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
870         Use scoped_free_pendings.
871         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
872         scoped_free_pendings.
873         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
874         (xcoff_initial_scan): Likewise.
875         * buildsym.c (reset_symtab_globals): Update comment.
876         (scoped_free_pendings): Rename from really_free_pendings.
877         (prepare_for_building): Update comment.
878         (buildsym_init): Likewise.
879         * buildsym.h (class scoped_free_pendings): New class.
880         (really_free_pendings): Don't declare.
881
882 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
883
884         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
885         output when converting a zero value to a special byteorder format.
886
887 2017-11-02  Yao Qi  <yao.qi@linaro.org>
888
889         * frame.c (do_frame_register_read): Remove aspace.
890         * jit.c (jit_frame_sniffer): Likwise.
891         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
892         * regcache.c (regcache::regcache): Pass nullptr.
893         (regcache_print): Caller updated.
894         * regcache.h (regcache::regcache): Remove one constructor
895         parameter aspace.
896
897 2017-11-02  Yao Qi  <yao.qi@linaro.org>
898
899         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
900
901 2017-11-02  Yao Qi  <yao.qi@linaro.org>
902
903         * breakpoint.c (insert_single_step_breakpoints): Update.
904         * frame.c (struct frame_info) <aspace>: Add const.
905         (frame_save_as_regcache): Add const.
906         (get_frame_address_space): Return const address_space *.
907         * frame.h (get_frame_address_space): Update declaration.
908         * infrun.c (struct step_over_info) <aspace>: Add const.
909         (set_step_over_info): Make aspace const.
910         (displaced_step_prepare_throw): Change variable const.
911         (resume): Likewise.
912         (proceed): Likewise.
913         (adjust_pc_after_break): Likewise.
914         (save_waitstatus): Likewise.
915         (handle_signal_stop): Likewise.
916         (keep_going_pass_signal): Likewise.
917         * jit.c (jit_frame_sniffer): Add const.
918         * mips-tdep.c (mips_single_step_through_delay): Likewise.
919         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
920         * record-full.c (record_full_wait_1): Likewise.
921         * regcache.c (regcache::regcache): Change parameter to const.
922         * regcache.h (regcache::regcache): Likewise.
923         (regcache::aspace): Return const address_space *.
924         (regcache) <m_aspace>: Add const.
925
926 2017-11-02  Yao Qi  <yao.qi@linaro.org>
927
928         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
929         * frame.c (create_sentinel_frame): Likewise.
930         * infrun.c (displaced_step_prepare_throw): Likewise.
931         (resume): Likewise.
932         (thread_still_needs_step_over_bp): Likewise.
933         (proceed): Likewise.
934         (do_target_wait): Likewise.
935         (adjust_pc_after_break): Likewise.
936         (handle_syscall_event): Likewise.
937         (save_waitstatus): Likewise.
938         (handle_inferior_event_1): Likewise.
939         (handle_signal_stop): Likewise.
940         (keep_going_pass_signal): Likewise.
941         * linux-nat.c (status_callback): Likewise.
942         (save_stop_reason): Likewise.
943         (resume_stopped_resumed_lwps): Likewise.
944         * record-full.c (record_full_exec_insn): Likewise.
945         (record_full_wait_1): Likewise.
946         * regcache.c (get_regcache_aspace): Remove.
947         * regcache.h (get_regcache_aspace): Remove.
948
949 2017-11-02  Yao Qi  <yao.qi@linaro.org>
950
951         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
952         (init_regcache_descr): Use gdbarch_num_regs.
953         (regcache::regcache): Likewise.
954         (regcache::get_register_status): Likewise.
955         (regcache::assert_raw_regnum): Likewise.
956         (regcache::cooked_read): Likewise.
957         (regcache::cooked_read_value): Likewise.
958         (regcache::cooked_write): Likewise.
959         (regcache::dump): Likewise.
960         (regcache::num_raw_registers): New method.
961         * regcache.h (class regcache) <num_raw_registers>: New.
962
963 2017-11-02  Yao Qi  <yao.qi@linaro.org>
964
965         * regcache.c (regcache::assert_regnum): New method.
966         (regcache::invalidate): Call assert_regnum.
967         (regcache::raw_update): Likewise.
968         (regcache::raw_write): Likewise.
969         (regcache::raw_read_part): Likewise.
970         (regcache::raw_write_part): Likewise.
971         (regcache::raw_supply): Likewise.
972         (regcache::raw_supply_integer): Likewise.
973         (regcache::raw_supply_zeroed): Likewise.
974         (regcache::raw_collect): Likewise.
975         (regcache::raw_collect_integer): Likewise.
976         * regcache.h (regcache::assert_regnum): Declare.
977
978 2017-11-02  Yao Qi  <yao.qi@linaro.org>
979
980         * regcache.c (regcache::dump): Remove code.
981
982 2017-11-02  Yao Qi  <yao.qi@linaro.org>
983
984         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
985         Remove.
986         <sizeof_cooked_register_status>: Remove.
987         (init_regcache_descr): Update.
988         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
989         (regcache::save): Likewise.
990         (regcache::dump): Likewise.
991
992 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
993
994         * ft32-tdep.c (ft32_fetch_instruction): New function.
995         (ft32_analyze_prologue): Use ft32_fetch_instruction().
996
997 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
998
999         * cli/cli-script.c (execute_control_command): Rename to ...
1000         (execute_control_command_1): ... this.
1001         (execute_control_command): New function.
1002
1003 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1004
1005         * tracepoint.c (tfind_command): Remove const_cast.
1006
1007 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1008
1009         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1010
1011 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1012
1013         * common/common-utils.h (in_inclusive_range): New function.
1014         * arm-tdep.c (arm_record_extension_space): Use
1015         in_inclusive_range.
1016         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1017         * cris-tdep.c (cris_spec_reg_applicable): Use
1018         in_inclusive_range.
1019
1020 2017-10-30  Pedro Alves  <palves@redhat.com>
1021             Simon Marchi <simon.marchi@ericsson.com>
1022
1023         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1024         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1025
1026 2017-10-30  Pedro Alves  <palves@redhat.com>
1027
1028         * common/common-utils.c (string_appendf, string_vappendf): New
1029         functions.
1030         * common/common-utils.h (string_appendf, string_vappendf): New
1031         declarations.
1032         * unittests/common-utils-selftests.c (string_appendf_func)
1033         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1034         (string_vappendf_tests): New functions.
1035         (_initialize_common_utils_selftests): Register "string_appendf" and
1036         "string_vappendf tests".
1037
1038 2017-10-30  Pedro Alves  <palves@redhat.com>
1039
1040         * unittests/common-utils-selftests.c (format_func): New typedef.
1041         (string_printf_tests, string_vprintf_tests): Tests factored out
1042         and merged to ...
1043         (test_format_func): ... this new function.
1044         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1045         test_format_func.
1046
1047 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1048
1049         * darwin-nat.c: Remove include of gdb.h.
1050
1051 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1052
1053         * xtensa-xtregs.c: Fix formatting issues.
1054
1055 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1056
1057         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1058
1059 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1060
1061         PR python/21213
1062         * python/py-infthread.c (thpy_get_inferior): Increment reference
1063         of inferior before returning it.
1064
1065 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1066
1067         * unittests/common-utils-selftests.c (format): Add
1068         ATTRIBUTE_PRINTF.
1069
1070 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1071
1072         * xml-syscall.c (struct syscall_desc): Add constructor.
1073         <name>: Change type to std::string.
1074         (syscall_desc_up): New typedef.
1075         (syscall_desc_p): Remove typeder.
1076         (DEF_VEC_P(syscall_desc_p)): Remove.
1077         (struct syscall_group_desc): Add constructor.
1078         <name>: Change type to std::string.
1079         <syscalls>: Change type to std::vector.
1080         (syscall_group_desc_up): New typedef.
1081         (syscall_group_desc_p): Remove typedef.
1082         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1083         (struct syscalls_info) <syscalls>: Change type to std::vector of
1084         unique_ptr.
1085         <groups>: Likewise.
1086         <my_gdb_datadir>: Change type to std::string.
1087         (syscalls_info_up): New typedef.
1088         (allocate_syscalls_info): Remove.
1089         (syscalls_info_free_syscalls_desc): Remove.
1090         (syscalls_info_free_syscall_group_desc): Remove.
1091         (free_syscalls_info): Remove.
1092         (make_cleanup_free_syscalls_info): Remove.
1093         (syscall_group_create_syscall_group_desc): Adjust.
1094         (syscall_group_add_syscall): Adjust.
1095         (syscall_create_syscall_desc): Adjust.
1096         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1097         (init_syscalls_info): Adjust.
1098         (syscall_group_get_group_by_name): Adjust.
1099         (xml_get_syscall_number): Adjust.
1100         (xml_get_syscall_name): Adjust.
1101         (xml_list_of_syscalls): Adjust.
1102         (xml_list_syscalls_by_group): Adjust.
1103         (xml_list_of_groups): Adjust.
1104
1105 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1106
1107         * probe.h: Don't include gdb_vecs.h.
1108         (DEF_VEC_P (probe_p)): Remove.
1109         (find_probes_in_objfile): Return an std::vector.
1110         * probe.c (find_probes_in_objfile): Likewise.
1111         * breakpoint.c (breakpoint_objfile_data)
1112         <longjmp_probes>: Change type to std::vector.
1113         <exception_probes>: Likewise.
1114         (free_breakpoint_probes): Don't manually free vectors.
1115         (create_longjmp_master_breakpoint): Adjust.
1116         (create_exception_master_breakpoint): Adjust.
1117         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1118         parameter type, adjust.
1119         (svr4_create_solib_event_breakpoints): Adjust.
1120
1121 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1122
1123         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1124         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1125         with new.
1126         (free_breakpoint_probes): Rename to ...
1127         (free_breakpoint_objfile_data): ... this, and call delete on
1128         bp_objfile_data..
1129
1130 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1131
1132         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1133         (loaded_script_ptr): Remove typedef.
1134         (DEF_VEC_P (loaded_script_ptr)): Remove.
1135         (struct collect_matching_scripts_data): Add constructor.
1136         <scripts_p>: Change type to (pointer to) std::vector.
1137         (collect_matching_scripts_data): Adjust.
1138         (sort_scripts_by_name): Make suitable for std::sort.
1139         (print_scripts): Don't sort vector, adjust to std::vector.
1140         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1141
1142 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1143
1144         * symfile.c (filename_language): Make struct, not typedef.  Add
1145         constructor.
1146         <ext>: Change type to std::string.
1147         (DEF_VEC_O (filename_language)): Remove.
1148         (filename_language_table): Change type to std::vector.
1149         (add_filename_language): Adjust.
1150         (set_ext_lang_command): Adjust.
1151         (info_ext_lang_command): Adjust.
1152         (deduce_language_from_filename): Adjust.
1153         (class scoped_restore_filename_language_table): Remove.
1154         (test_filename_language): Use scoped_restore.
1155         (test_set_ext_lang_command): Use scoped_restore, adjust to
1156         std::vector change.
1157
1158 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1159
1160         * symfile.c: Include selftest.h.
1161         (class scoped_restore_filename_language_table): New.
1162         (test_filename_language): New test.
1163         (test_set_ext_lang_command): New test.
1164         (_initialize_symfile): Register tests.
1165
1166 2017-10-27  Keith Seitz  <keiths@redhat.com>
1167
1168         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1169         in the bp_location, falling back to find_pc_sect_function when
1170         needed.
1171         (add_location_to_breakpoint): Save sal->symbol.
1172         * breakpoint.h (struct bp_location) <symbol>: New field.
1173         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1174         * symtab.h (struct symtab_and_line) <symbol>: New field.
1175
1176 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1177
1178         PR gdb/13669
1179         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1180         to rewind obstack.
1181
1182 2017-10-26  Pedro Alves  <palves@redhat.com>
1183
1184         * remote.c (remote_async_terminal_ours_p): Delete.
1185         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1186         Remove references to 'remote_async_terminal_ours_p'.
1187
1188 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1189
1190         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1191
1192 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1193
1194         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1195         aspace const.
1196         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1197         Likewise.
1198         * breakpoint.c (bpstat_check_location): Remove cast.
1199         (breakpoint_hit_catch_fork): Make aspce const.
1200         (breakpoint_hit_catch_solib): Likewise.
1201         (breakpoint_hit_catch_exec): Likewise.
1202         (breakpoint_hit_ranged_breakpoint): Likewise.
1203         (breakpoint_hit_watchpoint): Likewise.
1204         (base_breakpoint_breakpoint_hit): Likewise.
1205         (bkpt_breakpoint_hit): Likewise.
1206         (dprintf_breakpoint_hit): Likewise.
1207         (tracepoint_breakpoint_hit): Likewise.
1208         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1209
1210 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1211
1212         * breakpoint.c (breakpoint_location_address_match): Change
1213         "struct address_space *" to "const address_space".
1214         (breakpoint_location_address_range_overlap): Likewise.
1215         (breakpoint_here_p): Likewise.
1216         (breakpoint_in_range_p): Likewise.
1217         (moribund_breakpoint_here_p): Likewise.
1218         (bp_location_inserted_here_p): Likewise.
1219         (software_breakpoint_inserted_here_p): Likewise.
1220         (hardware_breakpoint_inserted_here_p): Likewise.
1221         (hardware_watchpoint_inserted_in_range): Likewise.
1222         (bpstat_check_location): Likewise.
1223         (bpstat_stop_status): Likewise.
1224         (breakpoint_address_match): Likewise.
1225         (breakpoint_address_match_range): Likewise.
1226         (breakpoint_location_address_match): Likewise.
1227         (breakpoint_location_address_range_overlap): Likewise.
1228         (insert_single_step_breakpoint): Likewise.
1229         (breakpoint_has_location_inserted_here): Likewise.
1230         (single_step_breakpoint_inserted_here_p): Likewise.
1231         (pc_at_non_inline_function): Likewise.
1232         * breakpoint.h (bpstat_stop_status): Update declaration.
1233         (breakpoint_here_p): Likewise.
1234         (breakpoint_in_range_p): Likewise.
1235         (moribund_breakpoint_here_p): Likewise.
1236         (breakpoint_inserted_here_p): Likewise.
1237         (software_breakpoint_inserted_here_p): Likewise.
1238         (hardware_breakpoint_inserted_here_p): Likewise.
1239         (breakpoint_has_location_inserted_here): Likewise.
1240         (single_step_breakpoint_inserted_here_p): Likewise.
1241         (hardware_watchpoint_inserted_in_range): Likewise.
1242         (breakpoint_address_match): Likewise.
1243         (insert_single_step_breakpoint): Likewise.
1244         (pc_at_non_inline_function): Likewise.
1245         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1246         * record.c (record_check_stopped_by_breakpoint): Likewise.
1247         * record.h (record_check_stopped_by_breakpoint): Likewise.
1248         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1249
1250 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1251
1252         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1253         regcache->arch () instead get_regcache_arch.
1254         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1255         Likewise.
1256         (aarch64_fbsd_store_inferior_registers): Likewise.
1257         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1258         (store_gregs_to_thread): Likewise.
1259         (fetch_fpregs_from_thread): Likewise.
1260         (store_fpregs_to_thread): Likewise.
1261         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1262         (aarch64_store_return_value): Likewise.
1263         (aarch64_software_single_step): Likewise.
1264         * aix-thread.c (aix_thread_wait): Likewise.
1265         (supply_reg32): Likewise.
1266         (supply_sprs64): Likewise.
1267         (supply_sprs32): Likewise.
1268         (fill_gprs64): Likewise.
1269         (fill_gprs32): Likewise.
1270         (fill_sprs64): Likewise.
1271         (fill_sprs32): Likewise.
1272         (store_regs_user_thread): Likewise.
1273         (store_regs_kernel_thread): Likewise.
1274         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1275         (alphabsd_store_inferior_registers): Likewise.
1276         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1277         (alpha_store_return_value): Likewise.
1278         (alpha_deal_with_atomic_sequence): Likewise.
1279         (alpha_next_pc): Likewise.
1280         (alpha_software_single_step): Likewise.
1281         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1282         (amd64bsd_store_inferior_registers): Likewise.
1283         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1284         Likewise.
1285         (amd64_linux_store_inferior_registers): Likewise.
1286         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1287         (amd64_collect_native_gregset): Likewise.
1288         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1289         (amd64obsd_collect_uthread): Likewise.
1290         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1291         (amd64_collect_fpregset): Likewise.
1292         (amd64_supply_fxsave): Likewise.
1293         (amd64_supply_xsave): Likewise.
1294         (amd64_collect_fxsave): Likewise.
1295         (amd64_collect_xsave): Likewise.
1296         * arc-tdep.c (arc_write_pc): Likewise.
1297         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1298         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1299         (arm_fbsd_store_inferior_registers): Likewise.
1300         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1301         (store_vfp_regs): Likewise.
1302         (arm_linux_fetch_inferior_registers): Likewise.
1303         (arm_linux_store_inferior_registers): Likewise.
1304         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1305         (arm_linux_sigreturn_next_pc): Likewise.
1306         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1307         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1308         (fetch_register): Likewise.
1309         (store_register): Likewise.
1310         * arm-tdep.c (arm_is_thumb): Likewise.
1311         (displaced_in_arm_mode): Likewise.
1312         (bx_write_pc): Likewise.
1313         (arm_get_next_pcs_addr_bits_remove): Likewise.
1314         (arm_software_single_step): Likewise.
1315         (arm_extract_return_value): Likewise.
1316         (arm_store_return_value): Likewise.
1317         (arm_write_pc): Likewise.
1318         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1319         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1320         (bsd_uthread_store_registers): Likewise.
1321         * core-regset.c (fetch_core_registers): Likewise.
1322         * corelow.c (get_core_registers): Likewise.
1323         * cris-tdep.c (cris_store_return_value): Likewise.
1324         (cris_extract_return_value): Likewise.
1325         (find_step_target): Likewise.
1326         (find_step_target): Likewise.
1327         (cris_software_single_step): Likewise.
1328         * ctf.c (ctf_fetch_registers): Likewise.
1329         * darwin-nat.c (cancel_breakpoint): Likewise.
1330         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1331         * frv-tdep.c (frv_extract_return_value): Likewise.
1332         * ft32-tdep.c (ft32_store_return_value): Likewise.
1333         (ft32_extract_return_value): Likewise.
1334         * go32-nat.c (fetch_register): Likewise.
1335         (go32_fetch_registers): Likewise.
1336         (go32_store_registers): Likewise.
1337         (store_register): Likewise.
1338         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1339         (h8300_store_return_value): Likewise.
1340         * hppa-linux-nat.c (fetch_register): Likewise.
1341         (store_register): Likewise.
1342         (hppa_linux_fetch_inferior_registers): Likewise.
1343         (hppa_linux_store_inferior_registers): Likewise.
1344         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1345         (i386_darwin_store_inferior_registers): Likewise.
1346         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1347         (gnu_store_registers): Likewise.
1348         * i386-linux-nat.c (fetch_register): Likewise.
1349         (store_register): Likewise.
1350         (supply_gregset): Likewise.
1351         (fill_gregset): Likewise.
1352         (i386_linux_fetch_inferior_registers): Likewise.
1353         (i386_linux_store_inferior_registers): Likewise.
1354         (i386_linux_resume): Likewise.
1355         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1356         Likewise.
1357         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1358         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1359         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1360         (i386obsd_collect_uthread): Likewise.
1361         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1362         (i386_supply_gregset): Likewise.
1363         (i386_collect_gregset): Likewise.
1364         (i386_supply_fpregset): Likewise.
1365         (i386_collect_fpregset): Likewise.
1366         (i386_mpx_bd_base): Likewise.
1367         * i386-v4-nat.c (supply_fpregset): Likewise.
1368         (fill_fpregset): Likewise.
1369         * i387-tdep.c (i387_supply_fsave): Likewise.
1370         (i387_collect_fsave): Likewise.
1371         (i387_supply_fxsave): Likewise.
1372         (i387_collect_fxsave): Likewise.
1373         (i387_supply_xsave): Likewise.
1374         (i387_collect_xsave): Likewise.
1375         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1376         (ia64_linux_store_registers): Likewise.
1377         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1378         (ia64_extract_return_value): Likewise.
1379         (ia64_store_return_value): Likewise.
1380         (find_func_descr): Likewise.
1381         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1382         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1383         (inf_ptrace_store_registers): Likewise.
1384         * infrun.c (use_displaced_stepping): Likewise.
1385         (displaced_step_prepare_throw): Likewise.
1386         (resume): Likewise.
1387         (proceed): Likewise.
1388         (do_target_wait): Likewise.
1389         (adjust_pc_after_break): Likewise.
1390         (handle_inferior_event_1): Likewise.
1391         (handle_signal_stop): Likewise.
1392         (save_infcall_suspend_state): Likewise.
1393         (restore_infcall_suspend_state): Likewise.
1394         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1395         * jit.c (jit_frame_prev_register): Likewise.
1396         * linux-nat.c (save_stop_reason): Likewise.
1397         (linux_nat_wait_1): Likewise.
1398         (resume_stopped_resumed_lwps): Likewise.
1399         * linux-record.c (record_linux_sockaddr): Likewise.
1400         (record_linux_msghdr): Likewise.
1401         (record_linux_system_call): Likewise.
1402         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1403         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1404         (lm32_store_return_value): Likewise.
1405         * m32c-tdep.c (m32c_read_flg): Likewise.
1406         (m32c_pseudo_register_read): Likewise.
1407         (m32c_pseudo_register_write): Likewise.
1408         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1409         (m32r_linux_collect_gregset): Likewise.
1410         * m32r-tdep.c (m32r_store_return_value): Likewise.
1411         (m32r_extract_return_value): Likewise.
1412         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1413         (m68kbsd_collect_fpregset): Likewise.
1414         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1415         * m68k-linux-nat.c (fetch_register): Likewise.
1416         (old_fetch_inferior_registers): Likewise.
1417         (old_store_inferior_registers): Likewise.
1418         (store_regs): Likewise.
1419         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1420         (m68k_svr4_store_return_value): Likewise.
1421         * m88k-tdep.c (m88k_store_arguments): Likewise.
1422         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1423         (mi_cmd_data_write_register_values): Likewise.
1424         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1425         (mips_fbsd_store_inferior_registers): Likewise.
1426         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1427         (mips_fbsd_supply_gregs): Likewise.
1428         (mips_fbsd_collect_fpregs): Likewise.
1429         (mips_fbsd_collect_gregs): Likewise.
1430         (mips_fbsd_supply_fpregset): Likewise.
1431         (mips_fbsd_collect_fpregset): Likewise.
1432         (mips_fbsd_supply_gregset): Likewise.
1433         (mips_fbsd_collect_gregset): Likewise.
1434         * mips-linux-nat.c (supply_gregset): Likewise.
1435         (fill_gregset): Likewise.
1436         (supply_fpregset): Likewise.
1437         (fill_fpregset): Likewise.
1438         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1439         (mips_fill_gregset): Likewise.
1440         (mips_supply_fpregset): Likewise.
1441         (mips_fill_fpregset): Likewise.
1442         (mips64_supply_gregset): Likewise.
1443         (micromips_linux_sigframe_validate): Likewise.
1444         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1445         (mipsnbsd_fetch_inferior_registers): Likewise.
1446         (mipsnbsd_store_inferior_registers): Likewise.
1447         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1448         (mipsnbsd_supply_gregset): Likewise.
1449         (mipsnbsd_iterate_over_regset_sections): Likewise.
1450         (mipsnbsd_supply_reg): Likewise.
1451         (mipsnbsd_supply_fpreg): Likewise.
1452         * mips-tdep.c (mips_in_frame_stub): Likewise.
1453         (mips_dummy_id): Likewise.
1454         (is_octeon_bbit_op): Likewise.
1455         (micromips_bc1_pc): Likewise.
1456         (extended_mips16_next_pc): Likewise.
1457         (mips16_next_pc): Likewise.
1458         (deal_with_atomic_sequence): Likewise.
1459         * moxie-tdep.c (moxie_process_readu): Likewise.
1460         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1461         * nto-procfs.c (procfs_store_registers): Likewise.
1462         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1463         (ppcfbsd_store_inferior_registers): Likewise.
1464         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1465         (fetch_altivec_register): Likewise.
1466         (get_spe_registers): Likewise.
1467         (fetch_spe_register): Likewise.
1468         (fetch_altivec_registers): Likewise.
1469         (fetch_all_gp_regs): Likewise.
1470         (fetch_all_fp_regs): Likewise.
1471         (store_vsx_register): Likewise.
1472         (store_altivec_register): Likewise.
1473         (set_spe_registers): Likewise.
1474         (store_spe_register): Likewise.
1475         (store_altivec_registers): Likewise.
1476         (store_all_gp_regs): Likewise.
1477         (store_all_fp_regs): Likewise.
1478         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1479         (ppc_linux_collect_gregset): Likewise.
1480         (ppc_canonicalize_syscall): Likewise.
1481         (ppc_linux_record_signal): Likewise.
1482         (ppu2spu_prev_register): Likewise.
1483         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1484         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1485         (ppcobsd_store_registers): Likewise.
1486         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1487         Likewise.
1488         (ppc_ravenscar_generic_store_registers): Likewise.
1489         * procfs.c (procfs_fetch_registers): Likewise.
1490         (procfs_store_registers): Likewise.
1491         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1492         (ravenscar_store_registers): Likewise.
1493         (ravenscar_prepare_to_store): Likewise.
1494         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1495         * record-full.c (record_full_wait_1): Likewise.
1496         (record_full_registers_change): Likewise.
1497         (record_full_store_registers): Likewise.
1498         (record_full_core_fetch_registers): Likewise.
1499         (record_full_save): Likewise.
1500         (record_full_goto_insn): Likewise.
1501         * regcache.c (regcache_register_size): Likewise.
1502         (get_regcache_arch): Remove.
1503         (regcache_read_pc): Likewise.
1504         * regcache.h (get_regcache_arch): Remove.
1505         * remote-sim.c (gdbsim_fetch_register): Likewise.
1506         (gdbsim_store_register): Likewise.
1507         * remote.c (fetch_register_using_p): Likewise.
1508         (send_g_packet): Likewise.
1509         (remote_prepare_to_store): Likewise.
1510         (store_registers_using_G): Likewise.
1511         * reverse.c (save_bookmark_command): Likewise.
1512         (goto_bookmark_command): Likewise.
1513         * rs6000-aix-tdep.c (branch_dest): Likewise.
1514         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1515         (fetch_register): Likewise.
1516         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1517         (ppc_collect_reg): Likewise.
1518         (ppc_collect_gregset): Likewise.
1519         (ppc_collect_fpregset): Likewise.
1520         (ppc_collect_vsxregset): Likewise.
1521         (ppc_collect_vrregset): Likewise.
1522         (ppc_displaced_step_hw_singlestep): Likewise.
1523         (rs6000_pseudo_register_read): Likewise.
1524         (rs6000_pseudo_register_write): Likewise.
1525         * s390-linux-nat.c (supply_gregset): Likewise.
1526         (fill_gregset): Likewise.
1527         (s390_linux_fetch_inferior_registers): Likewise.
1528         * s390-linux-tdep.c (s390_write_pc): Likewise.
1529         (s390_software_single_step): Likewise.
1530         (s390_all_but_pc_registers_record): Likewise.
1531         (s390_linux_syscall_record): Likewise.
1532         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1533         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1534         (shnbsd_store_inferior_registers): Likewise.
1535         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1536         (sh_extract_return_value_fpu): Likewise.
1537         (sh_store_return_value_nofpu): Likewise.
1538         (sh_corefile_supply_regset): Likewise.
1539         (sh_corefile_collect_regset): Likewise.
1540         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1541         (sh64_store_return_value): Likewise.
1542         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1543         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1544         (sparc_store_inferior_registers): Likewise.
1545         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1546         (sparc_ravenscar_prepare_to_store): Likewise.
1547         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1548         (sparc_analyze_control_transfer): Likewise.
1549         (sparc_step_trap): Likewise.
1550         (sparc_software_single_step): Likewise.
1551         (sparc32_gdbarch_init): Likewise.
1552         (sparc_supply_rwindow): Likewise.
1553         (sparc_collect_rwindow): Likewise.
1554         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1555         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1556         (sparc64nbsd_collect_gregset): Likewise.
1557         (sparc64nbsd_supply_fpregset): Likewise.
1558         (sparc64nbsd_collect_fpregset): Likewise.
1559         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1560         (sparc64_supply_gregset): Likewise.
1561         (sparc64_collect_gregset): Likewise.
1562         (sparc64_supply_fpregset): Likewise.
1563         (sparc64_collect_fpregset): Likewise.
1564         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1565         * spu-tdep.c (spu_unwind_sp): Likewise.
1566         (spu2ppu_prev_register): Likewise.
1567         (spu_memory_remove_breakpoint): Likewise.
1568         * stack.c (return_command): Likewise.
1569         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1570         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1571         * tracefile.c (trace_save_ctf): Likewise.
1572         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1573         (do_windows_store_inferior_registers): Likewise.
1574         (windows_resume): Likewise.
1575         * xtensa-linux-nat.c (fill_gregset): Likewise.
1576         (supply_gregset_reg): Likewise.
1577         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1578         (xtensa_register_read_masked): Likewise.
1579         (xtensa_supply_gregset): Likewise.
1580         (xtensa_extract_return_value): Likewise.
1581         (xtensa_store_return_value): Likewise.
1582
1583 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1584
1585         * doublest.c (floatformat_from_string): New function.
1586         * doublest.h (floatformat_from_string): Add prototype.
1587
1588         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1589         (OP_FLOAT): ... this.
1590         * expression.h: Do not include "doublest.h".
1591         (union exp_element): Replace doubleconst and decfloatconst by
1592         new element floatconst.
1593         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1594         (ada_evaluate_subexp): Likewise.
1595         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1596         OP_DOUBLE and OP_DECFLOAT.
1597         * expprint.c (print_subexp_standard): Likewise.
1598         (dump_subexp_body_standard): Likewise.
1599         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1600
1601         * parse.c: Include "dfp.h".
1602         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1603         (write_exp_elt_floatcst): New function.
1604         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1605         and OP_DECFLOAT.
1606         (operator_check_standard): Likewise.
1607         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1608         Return target format buffer instead of host DOUBLEST.
1609         Use floatformat_from_string and decimal_from_string to parse
1610         either binary or decimal floating-point types.
1611         (parse_c_float): Remove.
1612         * parser-defs.h: Do not include "doublest.h".
1613         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1614         (write_exp_elt_floatcst): Add prototype.
1615         (parse_float): Update prototype.
1616         (parse_c_float): Remove.
1617
1618         * c-exp.y: Do not include "dfp.h".
1619         (typed_val_float): Use byte buffer instead of DOUBLEST.
1620         (typed_val_decfloat): Remove.
1621         (DECFLOAT): Remove.
1622         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1623         (parse_number): Update to new parse_float interface.
1624         Parse suffixes and determine type before calling parse_float.
1625         Handle decimal and binary FP types the same way.
1626
1627         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1628         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1629         (parse_number): Update to new parse_float interface.
1630         Parse suffixes and determine type before calling parse_float.
1631
1632         * f-exp.y: Replace dval by typed_val_float.
1633         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1634         (parse_number): Use parse_float instead of atof.
1635
1636         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1637         (parse_go_float): Remove.
1638         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1639         (parse_number): Call parse_float instead of parse_go_float.
1640         Parse suffixes and determine type before calling parse_float.
1641
1642         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1643         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1644         (parse_number): Update to new parse_float interface.
1645         Parse suffixes and determine type before calling parse_float.
1646
1647         * m2-exp.y: Replace dval by byte buffer val.
1648         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1649         (parse_number): Call parse_float instead of atof.
1650
1651         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1652         (lex_number): Call parse_float instead of strtod.
1653         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1654         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1655         Use write_exp_elt_floatcst.
1656         (unit_testing): Remove static variable.
1657         (rust_type): Do not check unit_testing.
1658         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1659
1660         * ada-exp.y (type_float, type_double): Remove.
1661         (typed_val_float): Use byte buffer instead of DOUBLEST.
1662         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1663         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1664
1665 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1666
1667         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1668         * arch/aarch64.h: New file.
1669
1670 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1671
1672         * dfp.h (decimal_from_string): Use const reference for argument.
1673         * dfp.c (decimal_from_string): Likewise.
1674
1675 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1676
1677         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1678         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1679         * mips-tdep.c (mips_print_fp_register): Likewise.
1680
1681 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1682
1683         * common/format.h (enum argclass): Replace decfloat_arg by
1684         dec32float_arg, dec64float_arg, and dec128float_arg.
1685         * common/format.c (parse_format_string): Update to return
1686         new decimal float argument classes.
1687
1688         * printcmd.c (printf_decfloat): Rename to ...
1689         (printf_floating): ... this.  Add argclass argument, and use it
1690         instead of parsing the format string again.  Add support for
1691         binary floating-point values, using floatformat_to_string.
1692         Convert value to the target format if it doesn't already match.
1693         (ui_printf): Call printf_floating instead of printf_decfloat,
1694         also for double_arg / long_double_arg.  Pass argclass.
1695
1696         * dfp.c (decimal_to_string): Add format string argument.
1697         * dfp.h (decimal_to_string): Likewise.
1698
1699         * doublest.c (floatformat_to_string): Add format string argument.
1700         * doublest.h (floatformat_to_string): Likewise.
1701
1702 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1703
1704         * doublest.c (floatformat_precision): New routine.
1705         (floatformat_to_string): Likewise.
1706         * doublest.c (floatformat_to_string): Add prototype.
1707
1708         * printcmd.c (print_scalar_formatted): Only call print_floating
1709         on floating-point types.
1710         * valprint.c: Do not include "floatformat.h".
1711         (generic_val_print_decfloat): Remove.
1712         (generic_val_print): Call generic_val_print_float for both
1713         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1714         (print_floating): Use floatformat_to_string.  Handle decimal float.
1715         (print_decimal_floating): Remove, merge into floatformat_to_string.
1716         * value.h (print_decimal_floating): Remove.
1717
1718         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1719
1720 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1721
1722         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1723
1724 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1725
1726         * memattr.h: Don't include vec.h.
1727         (struct mem_attrib): Initialize fields.
1728         <unknown>: New static method.
1729         (struct mem_region): Add constructors, operator<, initialize
1730         fields.
1731         * memattr.c: Include algorithm.
1732         (default_mem_attrib, unknown_mem_attrib): Remove.
1733         (user_mem_region_list): New global.
1734         (target_mem_region_list, mem_region_list): Change type to
1735         std::vector<mem_region>.
1736         (mem_use_target): Now a function.
1737         (target_mem_regions_valid): Change type to bool.
1738         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1739         (require_user_regions): Adjust.
1740         (require_target_regions): Adjust.
1741         (create_mem_region): Adjust.
1742         (lookup_mem_region): Adjust.
1743         (invalidate_target_mem_regions): Adjust.
1744         (mem_clear): Rename to...
1745         (user_mem_clear): ... this, and adjust.
1746         (mem_command): Adjust.
1747         (info_mem_command): Adjust.
1748         (mem_enable, enable_mem_command, mem_disable,
1749         disable_mem_command): Adjust.
1750         (mem_delete): Adjust.
1751         (delete_mem_command): Adjust.
1752         * memory-map.h (parse_memory_map): Return an std::vector.
1753         * memory-map.c (parse_memory_map): Likewise.
1754         (struct memory_map_parsing_data): Add constructor.
1755         <memory_map>: Point to std::vector.
1756         (memory_map_start_memory): Adjust.
1757         (memory_map_end_memory): Adjust.
1758         (memory_map_end_property): Adjust.
1759         (clear_result): Remove.
1760         * remote.c (remote_memory_map): Return an std::vector.
1761         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1762         Remove.
1763         (target_debug_print_mem_region_vector): New.
1764         * target-delegates.c: Regenerate.
1765         * target.h (mem_region_vector): New typedef.
1766         (to_memory_map): Return mem_region_vector.
1767         (target_memory_map): Return an std::vector.
1768         * target.c (target_memory_map): Return an std::vector.
1769         (flash_erase_command): Adjust.
1770
1771 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1772
1773         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1774         Change type to std::string.
1775         (memory_map_start_property): Adjust.
1776         (memory_map_end_property): Adjust.
1777
1778 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1779
1780         * infrun.h: Include common/byte-vector.h.
1781         (struct displaced_step_closure): New struct.
1782         (struct buf_displaced_step_closure): New struct.
1783         * infrun.c (displaced_step_closure::~displaced_step_closure):
1784         Provide default implementation.
1785         (displaced_step_clear): Deallocate step closure with delete.
1786         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1787         (aarch64_displaced_step_closure): ... this, extend
1788         displaced_step_closure.
1789         (aarch64_displaced_step_data) <dsc>: Change type to
1790         aarch64_displaced_step_closure.
1791         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1792         unique_ptr.
1793         (aarch64_displaced_step_fixup): Add cast for displaced step
1794         closure.
1795         * amd64-tdep.c (displaced_step_closure): Rename to ...
1796         (amd64_displaced_step_closure): ... this, extend
1797         displaced_step_closure.
1798         <insn_buf>: Change type to std::vector<gdb_byte>.
1799         <max_len>: Remove.
1800         (fixup_riprel): Change type of DSC parameter, adjust to type
1801         change of insn_buf.
1802         (fixup_displaced_copy): Change type of DSC parameter.
1803         (amd64_displaced_step_copy_insn): Instantiate
1804         amd64_displaced_step_closure.
1805         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1806         to type change of insn_buf.
1807         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1808         parameter DSC.
1809         (arm_linux_copy_svc): Likewise.
1810         (cleanup_kernel_helper_return): Likewise.
1811         (arm_catch_kernel_helper_return): Likewise.
1812         (arm_linux_displaced_step_copy_insn): Instantiate
1813         arm_displaced_step_closure.
1814         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1815         (displaced_read_reg): Change type of parameter DSC.
1816         (branch_write_pc): Likewise.
1817         (load_write_pc): Likewise.
1818         (alu_write_pc): Likewise.
1819         (displaced_write_reg): Likewise.
1820         (arm_copy_unmodified): Likewise.
1821         (thumb_copy_unmodified_32bit): Likewise.
1822         (thumb_copy_unmodified_16bit): Likewise.
1823         (cleanup_preload): Likewise.
1824         (install_preload): Likewise.
1825         (arm_copy_preload): Likewise.
1826         (thumb2_copy_preload): Likewise.
1827         (install_preload_reg): Likewise.
1828         (arm_copy_preload_reg): Likewise.
1829         (cleanup_copro_load_store): Likewise.
1830         (install_copro_load_store): Likewise.
1831         (arm_copy_copro_load_store) Likewise.
1832         (thumb2_copy_copro_load_store): Likewise.
1833         (cleanup_branch): Likewise.
1834         (install_b_bl_blx): Likewise.
1835         (arm_copy_b_bl_blx): Likewise.
1836         (thumb2_copy_b_bl_blx): Likewise.
1837         (thumb_copy_b): Likewise.
1838         (install_bx_blx_reg): Likewise.
1839         (arm_copy_bx_blx_reg): Likewise.
1840         (thumb_copy_bx_blx_reg): Likewise.
1841         (cleanup_alu_imm): Likewise.
1842         (arm_copy_alu_imm): Likewise.
1843         (thumb2_copy_alu_imm): Likewise.
1844         (cleanup_alu_reg): Likewise.
1845         (install_alu_reg): Likewise.
1846         (arm_copy_alu_reg): Likewise.
1847         (thumb_copy_alu_reg): Likewise.
1848         (cleanup_alu_shifted_reg): Likewise.
1849         (install_alu_shifted_reg): Likewise.
1850         (arm_copy_alu_shifted_reg): Likewise.
1851         (cleanup_load): Likewise.
1852         (cleanup_store): Likewise.
1853         (arm_copy_extra_ld_st): Likewise.
1854         (install_load_store): Likewise.
1855         (thumb2_copy_load_literal): Likewise.
1856         (thumb2_copy_load_reg_imm): Likewise.
1857         (arm_copy_ldr_str_ldrb_strb): Likewise.
1858         (cleanup_block_load_all): Likewise.
1859         (cleanup_block_store_pc): Likewise.
1860         (cleanup_block_load_pc): Likewise.
1861         (arm_copy_block_xfer): Likewise.
1862         (thumb2_copy_block_xfer): Likewise.
1863         (cleanup_svc): Likewise.
1864         (install_svc): Likewise.
1865         (arm_copy_svc): Likewise.
1866         (thumb_copy_svc): Likewise.
1867         (arm_copy_undef): Likewise.
1868         (thumb_32bit_copy_undef): Likewise.
1869         (arm_copy_unpred): Likewise.
1870         (arm_decode_misc_memhint_neon): Likewise.
1871         (arm_decode_unconditional): Likewise.
1872         (arm_decode_miscellaneous): Likewise.
1873         (arm_decode_dp_misc): Likewise.
1874         (arm_decode_ld_st_word_ubyte): Likewise.
1875         (arm_decode_media): Likewise.
1876         (arm_decode_b_bl_ldmstm): Likewise.
1877         (arm_decode_ext_reg_ld_st): Likewise.
1878         (thumb2_decode_dp_shift_reg): Likewise.
1879         (thumb2_decode_ext_reg_ld_st): Likewise.
1880         (arm_decode_svc_copro): Likewise.
1881         (thumb2_decode_svc_copro): Likewise.
1882         (install_pc_relative): Likewise.
1883         (thumb_copy_pc_relative_16bit): Likewise.
1884         (thumb_decode_pc_relative_16bit): Likewise.
1885         (thumb_copy_pc_relative_32bit): Likewise.
1886         (thumb_copy_16bit_ldr_literal): Likewise.
1887         (thumb_copy_cbnz_cbz): Likewise.
1888         (thumb2_copy_table_branch): Likewise.
1889         (cleanup_pop_pc_16bit_all): Likewise.
1890         (thumb_copy_pop_pc_16bit): Likewise.
1891         (thumb_process_displaced_16bit_insn): Likewise.
1892         (decode_thumb_32bit_ld_mem_hints): Likewise.
1893         (thumb_process_displaced_32bit_insn): Likewise.
1894         (thumb_process_displaced_insn): Likewise.
1895         (arm_process_displaced_insn): Likewise.
1896         (arm_displaced_init_closure): Likewise.
1897         (arm_displaced_step_fixup): Add cast for closure.
1898         * arm-tdep.h: Include infrun.h.
1899         (displaced_step_closure): Rename to ...
1900         (arm_displaced_step_closure): ... this, extend
1901         displaced_step_closure.
1902         <u::svc::copy_svc_os>: Change type of parameter DSC.
1903         <cleanup>: Likewise.
1904         (arm_process_displaced_insn): Likewise.
1905         (arm_displaced_init_closure): Likewise.
1906         (displaced_read_reg): Likewise.
1907         (displaced_write_reg): Likewise.
1908         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1909         Adjust.
1910         * i386-tdep.h: Include infrun.h.
1911         (i386_displaced_step_closure): New typedef.
1912         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1913         i386_displaced_step_closure.
1914         (i386_displaced_step_fixup): Adjust.
1915         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1916         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1917         and unique_ptr.
1918         (ppc_displaced_step_fixup): Adjust.
1919         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1920         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1921         and unique_ptr.
1922         (s390_displaced_step_fixup): Adjust.
1923
1924 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1925
1926         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1927         Remove declarations.
1928
1929 2017-10-20  Tom Tromey  <tom@tromey.com>
1930
1931         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1932         std::vector.
1933         (gdb_bfd_record_inclusion): Update.
1934         (bfdp): Remove typedef.
1935
1936 2017-10-20  Tom Tromey  <tom@tromey.com>
1937
1938         * gdb_bfd.c (gdb_bfd_ref): Use new.
1939         (struct gdb_bfd_data): Add constructor, destructor, and member
1940         initializers.
1941         (gdb_bfd_unref): Use delete.
1942
1943 2017-10-20  Tom Tromey  <tom@tromey.com>
1944
1945         * exec.c (exec_file_attach): Use new_bfd_ref.
1946         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1947         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1948         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1949         new_bfd_ref.
1950         * gdb_bfd.h (new_bfd_ref): New function.
1951
1952 2017-10-20  Pedro Alves  <palves@redhat.com>
1953
1954         * main.c (captured_command_loop): Add attribute noinline.
1955
1956 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1957
1958         * interps.c (struct interp_factory): Add constructor.
1959         (interp_factory_p): Remove typedef.
1960         (DEF_VEC_P(interp_factory_p)): Remove.
1961         (interpreter_factories): Change type to std::vector.
1962         (interp_factory_register): Adjust.
1963         (interp_lookup): Adjust.
1964         (interpreter_completer): Adjust.
1965
1966 2017-10-19  Tom Tromey  <tom@tromey.com>
1967
1968         * break-catch-syscall.c (catch_syscall_completer): Use
1969         std::string, gdb::unique_xmalloc_ptr.
1970
1971 2017-10-19  Tom Tromey  <tom@tromey.com>
1972
1973         * infcall.c (call_function_by_hand_dummy): Use std::string.
1974
1975 2017-10-19  Tom Tromey  <tom@tromey.com>
1976
1977         * mi/mi-main.c (mi_cmd_execute): Update.
1978         * top.h (prepare_execute_command): Return scoped_value_mark.
1979         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1980         Add move constructor.
1981         * top.c (prepare_execute_command): Return scoped_value_mark.
1982         (execute_command): Update.
1983
1984 2017-10-19  Pedro Alves  <palves@redhat.com>
1985
1986         * xml-support.c (xml_fetch_content_from_file): Check fread's
1987         return.
1988
1989 2017-10-19  Pedro Alves  <palves@redhat.com>
1990
1991         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1992         async.
1993         (handle_error_fd): New function.
1994         (ser_base_async): Add/delete an event loop file handler for
1995         error_fd.
1996
1997 2017-10-19  Pedro Alves  <palves@redhat.com>
1998
1999         * xml-support.c (xml_fetch_content_from_file): Don't read in
2000         chunks.  Instead use fseek to determine the file's size, and read
2001         it in one go.
2002
2003 2017-11-18  Keith Seitz  <keiths@redhat.com>
2004
2005         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2006         types.
2007         Add whitespace to front of type name.
2008
2009 2017-10-18  Keith Seitz  <keiths@redhat.com>
2010
2011         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2012         DW_AT_accessibility.
2013
2014 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2015
2016         * features/tic6x-c62x-linux.c: Remove.
2017
2018 2017-10-17  Tom Tromey  <tom@tromey.com>
2019
2020         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2021         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2022         (do_mixed_source_and_assembly): Likewise.
2023
2024 2017-10-17  Tom Tromey  <tom@tromey.com>
2025
2026         * regcache.c (regcache::xfer_part): Remove assertion.
2027
2028 2017-10-17  Pedro Alves  <palves@redhat.com>
2029
2030         * xml-support.c (xml_fetch_content_from_file): Call
2031         unique_ptr::release() instead unique_ptr::get() when passing
2032         through xrealloc.
2033
2034 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2035
2036         * regcache.c (regcache::xfer_part): Remove parameters read and
2037         write, add parameter is_raw.  All callers are updated.
2038
2039 2017-10-16  Keith Seitz  <keiths@redhat.com>
2040
2041         * c-typeprint.c (enum access_specifier): Moved here from
2042         c_type_print_base.
2043         (output_access_specifier): New function.
2044         (c_type_print_base): Consider typedefs when assessing
2045         whether access labels are needed.
2046         Use output_access_specifier as needed.
2047         Output access specifier for typedefs, if needed.
2048         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2049         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2050         fields.
2051         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2052         accessor macros.
2053
2054 2017-10-16  Tom Tromey  <tom@tromey.com>
2055
2056         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2057         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2058         * target.c (target_fileio_read_stralloc): Update.
2059         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2060         * target.h (target_fileio_read_stralloc): Return
2061         unique_xmalloc_ptr.
2062
2063 2017-10-16  Tom Tromey  <tom@tromey.com>
2064
2065         * xml-syscall.c (xml_init_syscalls_info): Update.
2066         * xml-support.c (xinclude_start_include): Update.
2067         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2068         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2069         (xml_fetch_content_from_file): Likewise.
2070         * osdata.c (get_osdata): Update.
2071         * target.h (target_read_stralloc, target_get_osdata): Return
2072         unique_xmalloc_ptr.
2073         * solib-aix.c (solib_aix_get_library_list): Update.
2074         * solib-target.c (solib_target_current_sos): Update.
2075         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2076         * xml-tdesc.c (fetch_available_features_from_target): Update.
2077         (target_fetch_description_xml): Update.
2078         (file_read_description_xml): Update.
2079         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2080         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2081         (remote_pid_to_exec_file): Update.
2082         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2083         (target_get_osdata): Likewise.
2084
2085 2017-10-16  Tom Tromey  <tom@tromey.com>
2086
2087         * remote.c (remote_register_number_and_offset): Use std::vector.
2088         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2089         (putpkt_binary): Use gdb::def_vector.
2090         (compare_sections_command): Use gdb::byte_vector.
2091
2092 2017-10-16  Tom Tromey  <tom@tromey.com>
2093
2094         * ppc-linux-nat.c (hwdebug_insert_point): Use
2095         gdb::unique_xmalloc_ptr, XDUP.
2096
2097 2017-10-16  Tom Tromey  <tom@tromey.com>
2098
2099         * probe.c (parse_probes): Use std::string.
2100         (info_probes_for_ops, enable_probes_command)
2101         (disable_probes_command): Remove cleanups.
2102
2103 2017-10-16  Tom Tromey  <tom@tromey.com>
2104
2105         * buildsym.c (block_compar): Remove.
2106         (end_symtab_get_static_block): Use std::vector.
2107
2108 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2109
2110         * memrange.h (struct mem_range): Define operator< and operator==.
2111         (mem_range_s): Remove.
2112         (DEF_VEC_O (mem_range_s)): Remove.
2113         (normalize_mem_ranges): Change parameter type to std::vector.
2114         * memrange.c (compare_mem_ranges): Remove.
2115         (normalize_mem_ranges): Change parameter type to std::vector,
2116         adjust to vector change.
2117         * exec.c (section_table_available_memory): Return vector, remove
2118         parameter.
2119         (section_table_read_available_memory): Adjust to std::vector
2120         change.
2121         * remote.c (remote_read_bytes): Adjust to std::vector
2122         change.
2123         * tracepoint.h (traceframe_available_memory): Change parameter
2124         type to std::vector.
2125         * tracepoint.c (traceframe_available_memory): Change parameter
2126         type to std::vector, adjust.
2127         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2128         std::vector change.
2129         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2130         unittests/memrange-selftests.c.
2131         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2132         * gdb/unittests/memrange-selftests.c: New file.
2133
2134 2017-10-16  Pedro Alves  <palves@redhat.com>
2135
2136         * elfread.c (probe_key_free): Rename range-for variable.
2137         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2138         (find_probe_by_pc, collect_probes): Rename range-for variable.
2139
2140 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2141
2142         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2143         * features/tic6x-c62x.c: Remove.
2144         * features/tic6x-c64x-linux.c: Remove.
2145         * features/tic6x-c64x.c: Remove.
2146         * features/tic6x-c64xp-linux.c: Remove.
2147         * features/tic6x-c64xp.c: Remove.
2148         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2149         initialize_tdesc_tic6x_*_linux functions.
2150         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2151         initialize_tdesc_tic6x_* functions.
2152
2153 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2154
2155         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2156         tic6x-c62x.
2157         * regformats/tic6x-c62x.dat: Remove.
2158         * regformats/tic6x-c64x.dat: Remove.
2159         * regformats/tic6x-c64xp.dat: Remove.
2160
2161 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2162
2163         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2164         (the !HAVE_LIBEXPAT version).
2165
2166 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2167
2168         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2169         const.
2170
2171 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2172
2173         * target.h: Include tracepoint.h.
2174         (enum trace_find_type): Move to tracepoint.h.
2175         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2176         * tracepoint.h: Don't include target.h
2177         (enum trace_find_type): Move from target.h.
2178         (parse_traceframe_info): Return a unique ptr.
2179         * tracepoint.c (current_traceframe_info): Change type to unique
2180         ptr.
2181         (free_traceframe_info): Remove.
2182         (clear_traceframe_info): Don't manually free
2183         current_traceframe_info.
2184         (free_result): Remove.
2185         (parse_traceframe_info): Return a unique ptr.
2186         (get_traceframe_info): Adjust to unique ptr.
2187         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2188         * remote.c (remote_traceframe_info): Return a unique ptr.
2189         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2190         ptr.
2191         * target-debug.h (target_debug_print_traceframe_info_up): New
2192         macro.
2193         * target-delegates.c: Regenerate.
2194
2195 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2196
2197         * memrange.h (struct mem_range): Add constructors.
2198         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2199         std::vector<mem_range>.
2200         * tracepoint.c (free_traceframe_info): Don't manually free
2201         vector.
2202         (traceframe_info_start_memory): Adjust to vector change.
2203         (traceframe_available_memory): Likewise.
2204         * tracefile-tfile.c (build_traceframe_info): Likewise.
2205         * ctf.c (ctf_traceframe_info): Likewise.
2206
2207 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2208
2209         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2210         std::vector<int>.
2211         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2212         (traceframe_info_start_tvar): Adjust to vector change.
2213         (parse_traceframe_info): Allocate with new.
2214         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2215         vector change.
2216         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2217         change.
2218         tfile_traceframe_info): Allocate with new.
2219         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2220         change.
2221
2222 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2223
2224         * tracepoint.c (traceframe_info): Rename to...
2225         (current_traceframe_info): ...this.
2226         (clear_traceframe_info): Adjust.
2227         (get_traceframe_info): Adjust.
2228
2229 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2230
2231         * nat/linux-osdata.c: Include algorithm.
2232         (compare_processes): Remove.
2233         (struct pid_pgid_entry): New struct.
2234         (linux_xfer_osdata_processgroups): Use std::vector instead of
2235         XNEWVEC.
2236
2237 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2238
2239         * objfiles.h: Don't include symfile.h.
2240         (struct partial_symbol): Remove forward-declaration.
2241         (struct objfile) <global_psymbols, static_psymbols>: Change type
2242         to std::vector<partial_symbol *>.
2243         * objfiles.c (objfile::objfile): Don't memset those fields.
2244         (objfile::~objfile): Don't free those fields.
2245         * psympriv.h (struct psymbol_allocation_list): Remove
2246         forward-declaration.
2247         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2248         to std::vector.
2249         (start_psymtab_common): Change parameters to std::vector.
2250         * psymtab.c: Include algorithm.
2251         (require_partial_symbols): Call shrink_to_fit.
2252         (find_pc_sect_psymbol): Adjust to vector change.
2253         (match_partial_symbol): Likewise.
2254         (lookup_partial_symbol): Likewise.
2255         (psym_relocate): Likewise.
2256         (dump_psymtab): Likewise.
2257         (recursively_search_psymtabs): Likewise.
2258         (compare_psymbols): Remove.
2259         (sort_pst_symbols): Adjust to vector change.
2260         (start_psymtab_common): Likewise.
2261         (end_psymtab_common): Likewise.
2262         (psymbol_bcache_full): De-constify return value.
2263         (add_psymbol_to_bcache): Likewise.
2264         (extend_psymbol_list): Remove.
2265         (append_psymbol_to_list): Adjust to vector change.
2266         (add_psymbol_to_list): Likewise.
2267         (init_psymbol_list): Likewise.
2268         (maintenance_info_psymtabs): Likewise.
2269         (maintenance_check_psymtabs): Likewise.
2270         * symfile.h (struct psymbol_allocation_list): Remove.
2271         * symfile.c (reread_symbols): Adjust to vector change.
2272         * dbxread.c (start_psymtab): Change type of parameters.
2273         (dbx_symfile_read): Adjust to vector change.
2274         (read_dbx_symtab): Likewise.
2275         (start_psymtab): Change type of parameters.
2276         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2277         (create_partial_symtab): Likewise.
2278         (add_partial_symbol): Likewise.
2279         (write_one_signatured_type): Likewise.
2280         (recursively_write_psymbols): Likewise.
2281         * mdebugread.c (parse_partial_symbols): Likewise.
2282         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2283         (scan_xcoff_symtab): Adjust to vector change.
2284         (xcoff_initial_scan): Likewise.
2285
2286 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2287
2288         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2289
2290 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2291
2292         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2293         Remove s390x-*-expedite, add s390x-expedite.
2294
2295 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2296
2297         * features/s390-gs-linux64.c: Regenerated.
2298         * features/s390x-gs-linux64.c: Regenerated.
2299
2300 2017-10-13  Tom Tromey  <tom@tromey.com>
2301
2302         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2303         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2304         delete.
2305         * symfile.c (symbol_file_add_with_addrs): Use new.
2306         (symbol_file_add_separate): Update comment.
2307         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2308         * jit.c (jit_object_close_impl): Use new.
2309         (jit_unregister_code): Use delete.
2310         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2311         (~objfile): Rename from free_objfile.
2312         (free_objfile_separate_debug, do_free_objfile_cleanup)
2313         (free_all_objfiles, objfile_purge_solibs): Use delete.
2314         * objfiles.h (struct objfile): Add constructor and destructor.
2315         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2316         (allocate_objfile, free_objfile): Don't declare.
2317         (struct objstats): Add initializers.
2318
2319 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2320
2321         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2322         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2323         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2324         * gdbarch.h: Regenerate.
2325         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2326         Adjust comment.
2327         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2328         (i386_displaced_step_fixup): Adjust comment.
2329         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2330
2331 2017-10-12  Tom Tromey  <tom@tromey.com>
2332
2333         * prologue-value.h (pv_area::store_would_trash): Return bool.
2334         (pv_area::find_reg): Likewise.
2335         * prologue-value.c (pv_area::store_would_trash): Return bool.
2336         (pv_area::find_reg): Likewise.
2337
2338 2017-10-12  Tom Tromey  <tom@tromey.com>
2339
2340         * s390-linux-tdep.c (s390_store, s390_load)
2341         (s390_check_for_saved, s390_analyze_prologue): Update.
2342         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2343         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2344         * prologue-value.h (class pv_area): Move from prologue-value.c.
2345         Change names of members.  Add constructor, destructor, member
2346         functions.
2347         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2348         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2349         (pv_area_fetch, pv_area_scan): Don't declare.
2350         * prologue-value.c (struct pv_area::area_entry): Now member of
2351         pv_area.
2352         (struct pv_area): Move to prologue-value.h.
2353         (pv_area::pv_area): Rename from make_pv_area.
2354         (pv_area::~pv_area): Rename from free_pv_area.
2355         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2356         (clear_entries, find_entry, overlaps, store_would_trash, store)
2357         (fetch, find_reg, scan): Now member of pv_area.
2358         Remove "area" argument.  Update.
2359         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2360         Update.
2361         * mn10300-tdep.c (push_reg, check_for_saved)
2362         (mn10300_analyze_prologue): Update.
2363         * mep-tdep.c (is_arg_spill, check_for_saved)
2364         (mep_analyze_prologue): Update.
2365         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2366         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2367         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2368         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2369         Update.
2370         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2371         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2372
2373 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2374
2375         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2376         * linux-nat.c (linux_nat_delete_thread): New variable.
2377         (lwp_free): Invoke linux_nat_delete_thread if set.
2378         (linux_nat_set_delete_thread): New function.
2379         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2380         thread delete callback.
2381         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2382         (_initialize_arm_linux_nat): Assign thread delete callback.
2383         * s390-linux-nat.c (s390_delete_thread): New function.
2384         (_initialize_s390_nat): Assign thread delete callback.
2385         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2386         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2387         function.
2388         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2389         declaration.
2390         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2391         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2392
2393 2017-10-09  Tom Tromey  <tom@tromey.com>
2394
2395         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2396         std::string.
2397         * tui/tui-layout.c (enum tui_status): Use std::string.
2398
2399 2017-10-11  Tom Tromey  <tom@tromey.com>
2400
2401         * gdbthread.h (thread_command): Constify.
2402         * inferior.h (detach_command): Constify.
2403         * top.h (set_history, show_history): Constify.
2404         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2405         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2406         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2407         * printcmd.c (set_command): Constify.
2408         (non_const_set_command): New function.
2409         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2410         * breakpoint.c (enable_command, disable_command, delete_command)
2411         (catch_command, tcatch_command, set_breakpoint_cmd)
2412         (show_breakpoint_cmd): Constify.
2413         * macrocmd.c (macro_command): Constify.
2414         * infcmd.c (unset_command, kill_command, detach_command)
2415         (info_proc_cmd): Constify.
2416         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2417         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2418         (info_auto_load_cmd): Constify.
2419         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2420         (unset_tdesc_cmd): Constify.
2421         * ada-lang.c (set_ada_command, show_ada_command)
2422         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2423         * guile/guile.c (set_guile_command, show_guile_command)
2424         (info_guile_command): Constify.
2425         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2426         Constify.
2427         * skip.c (skip_command): Constify.
2428         * compile/compile.c (_initialize_compile): Constify.
2429         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2430         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2431         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2432         (maint_btrace_pt_show_cmd): Constify.
2433         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2434         Constify.
2435         * python/python.c (user_show_python, user_set_python): Constify.
2436         * mips-tdep.c (set_mips_command, show_mips_command)
2437         (set_mipsfpu_command): Constify.
2438         * record-btrace.c (cmd_record_btrace_start)
2439         (cmd_set_record_btrace, cmd_show_record_btrace)
2440         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2441         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2442         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2443         Constify.
2444         * symfile.c (overlay_command): Constify.
2445         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2446         * cli/cli-logging.c (set_logging_command, show_logging_command):
2447         Constify.
2448         * cli/cli-dump.c (dump_command, append_command)
2449         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2450         (tekhex_dump_command, binary_dump_command)
2451         (binary_append_command): Constify.
2452         * cli/cli-decode.c (struct cmd_list_element): Change type of
2453         "fun".
2454         * cli/cli-cmds.c (info_command, show_command, set_debug)
2455         (show_debug): Constify.
2456         (show_command): Add non-const overload.
2457         * top.c (set_history, show_history): Constify.
2458         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2459         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2460         * target.c (target_command): Constify.
2461         * sparc64-tdep.c (info_adi_command): Constify.
2462         * record-full.c (cmd_record_full_start): Constify.
2463         (set_record_full_command): Constify.  Fix typo.
2464         (show_record_full_command): Constify.
2465         * thread.c (thread_command, thread_apply_command): Constify.
2466         * memattr.c (dummy_cmd): Constify.
2467         * value.c (function_command): Constify.
2468         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2469         * probe.c (info_probes_command): Constify.
2470         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2471         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2472         (show_thread_cmd, set_thread_default_cmd)
2473         (show_thread_default_cmd): Constify.
2474         (check_empty): Constify.
2475         * tracepoint.c (tfind_command): Constify.
2476         * cp-support.c (maint_cplus_command): Constify.
2477         * windows-tdep.c (info_w32_command): Constify.
2478         * record.c (cmd_record_start, set_record_command)
2479         (show_record_command, info_record_command, cmd_record_goto):
2480         Constify.
2481         * ravenscar-thread.c (set_ravenscar_command)
2482         (show_ravenscar_command): Constify.
2483         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2484         Constify.
2485         (add_internal_problem_command): Remove casts.
2486         * arc-tdep.c (maintenance_print_arc_command): Constify.
2487         * valprint.c (set_print, show_print, set_print_raw)
2488         (show_print_raw): Constify.
2489         * maint.c (maintenance_command, maintenance_info_command)
2490         (maintenance_print_command, maintenance_set_cmd)
2491         (maintenance_show_cmd, set_per_command_cmd)
2492         (show_per_command_cmd, maintenance_check_command): Constify.
2493         * language.c (set_check, show_check): Constify.
2494         * typeprint.c (show_print_type, set_print_type): Constify.
2495         * go32-nat.c (go32_info_dos_command): Constify.
2496
2497 2017-10-11  Tom Tromey  <tom@tromey.com>
2498
2499         * breakpoint.c (prepare_re_set_context): Remove.
2500         (breakpoint_re_set_one): Update.  Don't use cleanups.
2501         (breakpoint_re_set): Use scoped_restore, std::string, and
2502         scoped_restore_current_language.
2503
2504 2017-10-11  Tom Tromey  <tom@tromey.com>
2505
2506         * breakpoint.c (commands_command_1): Use std::string.
2507         (cleanup_executing_breakpoints): Remove.
2508         (bpstat_do_actions_1): Use scoped_restore.
2509         (bpstat_check_watchpoint): Use std::string.
2510         (decode_static_tracepoint_spec): Likewise.
2511         (break_range_command): Likewise.
2512         (watch_command_1): Likewise.
2513         (compare_breakpoints): Change argument types.
2514         (clear_command): Use std::vector.
2515         (cleanup_executing_breakpoints): Remove.
2516         (update_global_location_list): Use unique_xmalloc_ptr.
2517         (strace_command): Remove unused declaration.
2518
2519 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2520
2521         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2522         * NEWS: Mention new FreeBSD/arm native configuration.
2523         * configure.host: Add arm*-*-freebsd*.
2524         * configure.nat: Likewise.
2525         * arm-fbsd-nat.c: New file.
2526
2527 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2528
2529         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2530         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2531         * NEWS: Mention new FreeBSD/arm target.
2532         * configure.tgt: Add arm*-*-freebsd*.
2533         * arm-fbsd-tdep.c: New file.
2534         * arm-fbsd-tdep.h: New file.
2535
2536 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2537
2538         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2539         `gdbarch_elfcore_write_linux_prpsinfo'.
2540         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2541         method.
2542         (elf_internal_linux_prpsinfo): Remove declaration.
2543         * gdbarch.h: Regenerate.
2544         * gdbarch.c: Regenerate.
2545
2546 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2547
2548         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2549         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2550
2551 2017-10-11  Pedro Alves  <palves@redhat.com>
2552
2553         * breakpoint.c (reattach_breakpoints): Delete.
2554         * breakpoint.h (reattach_breakpoints): Delete.
2555
2556 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2557
2558         * symfile.c (registered_sym_fns): Make struct, not typedef.
2559         (DEF_VEC_O (registered_sym_fns)): Remove.
2560         (symtab_fns): Change type to std::vector.
2561         (add_symtab_fns): Adjust.
2562         (find_sym_fns): Adjust.
2563
2564 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2565
2566         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2567         * arc-tdep.h (arc_arch_is_em): New function.
2568         (arc_arch_is_hs): Likewise.
2569
2570 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2571
2572         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2573         parentheses in the declaration.
2574         (macro_lookup_inclusion): Likewise.
2575         (macro_lookup_definition): Likewise.
2576         * p-lang.h (pascal_builtin_types): Likewise.
2577         * tui/tui-data.c (tui_win_list): Likewise.
2578         * tui/tui-data.h (tui_win_list): Likewise.
2579         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2580
2581 2017-10-11  Mark Rages  <markrages@gmail.com>
2582
2583         * target-memory.c (block_boundaries): Fix for block address not
2584         aligned on block size.
2585
2586 2017-10-10  Pedro Alves <palves@redhat.com>
2587             Tom Tromey  <tom@tromey.com>
2588
2589         * breakpoint.c (struct captured_breakpoint_query_args)
2590         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2591         (print_breakpoint): New.
2592         * breakpoint.h (print_breakpoint): Declare.
2593         * common/common-exceptions.h (enum return_reason): Remove
2594         references to catch_exceptions.
2595         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2596         Delete.
2597         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2598         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2599         * gdb.h: Delete.
2600         * gdbthread.h (thread_select): Declare.
2601         * mi/mi-cmd-break.c: Don't include gdb.h.
2602         (breakpoint_notify): Use print_breakpoint.
2603         * mi/mi-cmd-catch.c: Don't include gdb.h.
2604         * mi/mi-interp.c: Don't include gdb.h.
2605         (mi_print_breakpoint_for_event): New.
2606         (mi_breakpoint_created, mi_breakpoint_modified): Use
2607         mi_print_breakpoint_for_event.
2608         * mi/mi-main.c: Don't include gdb.h.
2609         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2610         thread_select instead of gdb_thread_select.
2611         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2612         of using gdb_list_thread_ids.
2613         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2614         FILEIO_ENOSYS here.
2615         (remote_fileio_request): Use TRY/CATCH instead of
2616         catch_exceptions.
2617         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2618         (symbol_file_add_from_memory_wrapper): Delete.
2619         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2620         * thread.c: Don't include gdb.h.
2621         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2622         (thread_alive): Use thread_select.
2623         (do_captured_thread_select): Delete, parts salvaged as ...
2624         (thread_select): ... this new function.
2625         (gdb_thread_select): Delete.
2626
2627 2017-10-10  Pedro Alves  <palves@redhat.com>
2628             Tom Tromey  <tom@tromey.com>
2629
2630         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2631         and reverse logic.
2632         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2633         No longer macros.  Instead ...
2634         (enum wp_check_result): They're now values of this new
2635         enumeration.
2636         (watchpoint_check): Change return type to wp_check_result and
2637         parameter type to bpstat.
2638         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2639         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2640         catch_errors.  Reverse logic of watchpoint_check call.
2641         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2642         pointer as parameter.
2643         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2644         * common/common-exceptions.c (throw_exception_sjlj): Update
2645         comments to avoid mentioning catch_errors.
2646         * exceptions.c (catch_errors): Delete.
2647         * exceptions.h: Update comments to avoid mentioning catch_errors.
2648         (catch_errors_ftype, catch_errors): Delete.
2649         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2650         (hook_stop_stub): Delete.
2651         (restore_selected_frame): Change return type to void, and
2652         parameter type to const frame_id &.
2653         (restore_infcall_control_state): Use TRY/CATCH instead of
2654         catch_errors.
2655         * main.c (captured_command_loop): Return void and remove
2656         parameter.  Remove references to catch_errors.
2657         (captured_main): Use TRY/CATCH instead of catch_errors.
2658         * objc-lang.c (objc_submethod_helper_data)
2659         (find_objc_msgcall_submethod_helper): Delete.
2660         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2661         catch_errors.
2662         * record-full.c (record_full_message): Return void.
2663         (record_full_message_args, record_full_message_wrapper): Delete.
2664         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2665         instead of catch_errors.
2666         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2667         parameter type to int.
2668         * solib-darwin.c (open_symbol_file_object): Ditto.
2669         * solib-dsbt.c (open_symbol_file_object): Ditto.
2670         * solib-frv.c (open_symbol_file_object): Ditto.
2671         * solib-svr4.c (open_symbol_file_object): Ditto.
2672         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2673         * solib.c (update_solib_list): Use TRY/CATCH instead of
2674         catch_errors.
2675         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2676         Change type.
2677         * symmisc.c (struct print_symbol_args): Remove.
2678         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2679         (print_symbol): Change type.
2680         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2681         and remove parameters.
2682         (catch_errors): New.
2683         (get_windows_debug_event): Adjust.
2684
2685 2017-10-09  Tom Tromey  <tom@tromey.com>
2686
2687         * mi/mi-main.c (free_splay_tree): Remove.
2688         (list_available_thread_groups): Use splay_tree_up.
2689         * common/gdb_splay_tree.h: New file.
2690
2691 2017-10-09  Tom Tromey  <tom@tromey.com>
2692
2693         * mi/mi-main.c (do_nothing): Remove.
2694         (list_available_thread_groups): Update.
2695
2696 2017-10-09  Pedro Alves  <palves@redhat.com>
2697
2698         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2699         reading registers when switching context.
2700
2701 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2702
2703         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2704         (fbsd_convert_siginfo): Likewise.
2705         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2706
2707 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2708
2709         * configure.ac (try_guile_versions): Remove guile-2.2.
2710         * configure: Regenerate.
2711
2712 2017-10-09  Tom Tromey  <tom@tromey.com>
2713
2714         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2715         (COMPILE.pre): Use $(CXX).
2716
2717 2017-10-09  Pedro Alves  <palves@redhat.com>
2718
2719         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2720         Use bool.
2721         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2722         * cp-support.h (cp_remove_params): Now returns a
2723         gdb::unique_xmalloc_ptr.
2724         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2725         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2726         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2727         returning a gdb::unique_xmalloc_ptr.
2728         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2729         * stack.c (find_frame_funname): Adjust to cp_remove_params
2730         returning a gdb::unique_xmalloc_ptr.
2731
2732 2017-10-08  Tom Tromey  <tom@tromey.com>
2733
2734         * dwarf2read.c (dwarf2_get_dwz_file): Use
2735         gdb::unique_xmalloc_ptr.
2736         (find_slot_in_mapped_hash): Likewise.
2737         (dwarf2_physname): Likewise.
2738         (create_dwo_unit_in_dwp_v1): Use std::string.
2739         (create_dwo_unit_in_dwp_v2): Likewise.
2740         (lookup_dwo_cutu): Likewise.
2741         (inherit_abstract_dies): Use std::vector.
2742         (read_array_type): Likewise.
2743         (dwarf_decode_macros): Remove unused declaration.
2744         (unsigned_int_compar): Remove.
2745         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2746         (psymtabs_addrmap_cleanup): Remove.
2747
2748 2017-10-08  Tom Tromey  <tom@tromey.com>
2749
2750         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2751         * frame.h (frame_cleanup_after_sniffer): Declare.
2752         (frame_prepare_for_sniffer): Return void.
2753         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2754         type of argument.
2755         (frame_prepare_for_sniffer): Return void.
2756
2757 2017-10-08  Tom Tromey  <tom@tromey.com>
2758
2759         * utils.h (make_cleanup_value_free): Remove.
2760         * utils.c (do_value_free, struct cleanup): Remove.
2761         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2762         Use gdb_value_up.
2763         * value.h (struct value_deleter): New.
2764         (gdb_value_up): New typedef.
2765
2766 2017-10-08  Tom Tromey  <tom@tromey.com>
2767
2768         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2769         (make_cleanup_free_search_symbols): Remove.
2770         (search_symbols): Return std::vector.
2771         (symbol_search::compare_search_syms): Now member of
2772         symbol_search.  Change arguments.
2773         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2774         (symtab_symbol_info, rbreak_command): Update.
2775         * symtab.h (struct symbol_search) <next>: Remove.
2776         Add constructors.
2777         (symbol_search::operator<): New function.
2778         (symbol_search::operator==): New function.
2779         (search_symbols): Remove std::vector.
2780         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2781         (symbol_search::compare_search_syms): Declare.
2782
2783 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2784
2785         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2786         arch/aarch64-insn.o.
2787         Remove one rule.
2788         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2789
2790 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2791
2792         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2793         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2794         arch/arm-linux.o respectively.
2795         * configure.tgt: Likewise.
2796
2797 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2798
2799         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2800         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2801
2802 2017-10-06  Pedro Alves  <palves@redhat.com>
2803
2804         * windows-nat.c: Include <algorithm>.
2805
2806 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2807
2808         * configure.tgt (i386_tobjs): New variable.
2809         (amd64_tobjs): New variable.
2810         Set $cpu_obs and $os_obs.
2811
2812 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2813
2814         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2815         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2816         (clean): Remove object files and dependency files.
2817         (distclean): Remove the directory.
2818         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2819         * configure: Re-generated.
2820         * configure.tgt: Replace amd64.o with arch/amd64.o.
2821
2822 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2823
2824         PR build/22188
2825         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2826         and SETEND.
2827
2828 2017-10-05  Pedro Alves  <palves@redhat.com>
2829
2830         * linux-nat.c (linux_child_follow_fork): When following the parent
2831         and detaching the child, consult the parent thread's architecture
2832         instead of the child's.
2833
2834 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2835
2836         * ax.h: Do not include "doublest.h".
2837         (union agent_val): Remove.
2838
2839 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2840
2841         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2842         (decimal_to_string): Return std::string object.
2843         (decimal_from_string): Accept std::string object.  Return bool.
2844         (decimal_from_integral, decimal_from_doublest): Remove.
2845         (decimal_from_longest): Add prototype.
2846         (decimal_from_ulongest): Likewise.
2847         (decimal_to_longest): Likewise.
2848         (decimal_from_doublest): Likewise.
2849         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2850         (MAX_DECIMAL_STRING): Move here.
2851         (decimal_to_string): Return std::string object.
2852         (decimal_from_string): Accept std::string object.  Return bool.
2853         (decimal_from_integral): Remove, replace by ...
2854         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2855         (decimal_to_longest): New function.
2856         (decimal_from_floating): Remove, replace by ...
2857         (decimal_from_doublest): ... this new function.
2858         (decimal_to_doublest): Update to new decimal_to_string interface.
2859
2860         * value.c (unpack_long): Use decimal_to_longest.
2861         * valops.c (value_cast): Use decimal_from_doublest instead of
2862         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2863         decimal_from_integral.
2864         * valarith.c (value_args_as_decimal): Likewise.
2865         * valprint.c (print_decimal_floating): Update to new
2866         decimal_to_string interface.
2867         * printcmd.c (printf_decfloat): Likewise.
2868         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2869
2870 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2871
2872         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2873         * gdbtypes.c: Include "floatformat.h".
2874         * value.c: Likewise.
2875         * m68k-tdep.c: Likewise.
2876
2877         * findvar.c: Do not include "floatformat.h".
2878         * amd64-darwin-tdep.c: Likewise.
2879         * arm-linux-tdep.c: Likewise.
2880         * i386-darwin-tdep.c: Likewise.
2881         * i387-tdep.c: Likewise.
2882         * m68k-linux-tdep.c: Likewise.
2883         * mep-tdep.c: Likewise.
2884         * mips-tdep.c: Likewise.
2885         * nios2-tdep.c: Likewise.
2886         * s390-linux-tdep.c: Likewise.
2887         * sparc-obsd-tdep.c: Likewise.
2888         * sparc-tdep.c: Likewise.
2889         * sparc64-tdep.c: Likewise.
2890         * spu-tdep.c: Likewise.
2891         * tic6x-tdep.c: Likewise.
2892         * tilegx-tdep.c: Likewise.
2893         * vax-tdep.c: Likewise.
2894         * xstormy16-tdep.c: Likewise.
2895         * xtensa-tdep.c: Likewise.
2896
2897         * top.c: Do not include "doublest.h".
2898         * aarch64-tdep.c: Likewise.
2899         * alpha-tdep.c: Likewise.
2900         * arm-linux-tdep.c: Likewise.
2901         * m68k-linux-tdep.c: Likewise.
2902         * tilegx-tdep.c: Likewise.
2903         * xstormy16-tdep.c: Likewise.
2904
2905 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2906
2907         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2908         (mipsn32_fbsd_sigframe): Define.
2909         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2910         for FreeBSD/mipsn32.
2911
2912 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2913
2914         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2915         AT_HWCAP.
2916
2917 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2918
2919         * MAINTAINERS (Misc): Update my email address.
2920
2921 2017-10-04  Pedro Alves  <palves@redhat.com>
2922
2923         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2924         it instead of target_gdbarch.
2925         (get_remote_state, get_remote_packet_size): Adjust
2926         get_remote_arch_state calls, passing down target_gdbarch
2927         explicitly.
2928         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2929         'gdbarch' and use it instead of target_gdbarch.
2930         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2931         passing down target_gdbarch explicitly.
2932         (struct stop_reply) <arch>: New field.
2933         (remote_parse_stop_reply): Use the stopped thread's architecture,
2934         not the current inferior's.  Save the architecture in the
2935         stop_reply.
2936         (process_stop_reply): Use the stop reply's architecture.
2937         (process_g_packet, remote_fetch_registers)
2938         (remote_prepare_to_store, store_registers_using_G)
2939         (remote_store_registers): Adjust get_remote_arch_state calls,
2940         using the regcache's architecture.
2941         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2942         passing down target_gdbarch explicitly.
2943         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2944         beneath instead of calling target_gdbarch.
2945         * target.c (default_thread_architecture): Use the specified
2946         inferior's architecture, instead of the current inferior's
2947         architecture (via target_gdbarch).
2948
2949 2017-10-04  Pedro Alves  <palves@redhat.com>
2950
2951         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2952         case.
2953         (regcache_print): Handle !target_has_registers here instead.
2954
2955 2017-10-04  Pedro Alves  <palves@redhat.com>
2956
2957         * frame.c (create_test_frame): Delete.
2958         * frame.h (create_test_frame): Delete.
2959         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2960         (class regcache_test): Delete.
2961         (test_target_has_registers, test_target_has_stack)
2962         (test_target_has_memory, test_target_prepare_to_store)
2963         (test_target_store_registers): New functions.
2964         (test_target_ops): New class.
2965         (register_to_value_test): Error out if there's already a
2966         process_stratum (or higher) target pushed.  Create a fuller mock
2967         environment, with mock target_ops, inferior, address space, thread
2968         and inferior_ptid.
2969         * progspace.c (struct address_space): Move to ...
2970         * progspace.h (struct address_space): ... here.
2971         * regcache.h (regcache::~regcache, regcache::raw_write)
2972         [GDB_SELF_TEST]: No longer virtual.
2973
2974 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2975
2976         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2977
2978 2017-10-04  Pedro Alves  <palves@redhat.com>
2979
2980         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2981         out of 'between TRY and CATCH'.
2982
2983 2017-10-04  Pedro Alves  <palves@redhat.com>
2984
2985         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2986         * common/common-exceptions.h (TRY): Open an outermost scope.
2987         Expand intro comment.
2988         (CATCH): Reindent.
2989         (END_CATCH): Close the outermost scope.
2990         * completer.c (complete_line_internal): Add missing END_CATCH.
2991
2992 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2993
2994         * NEWS (Changes since GDB 8.0): Add entry about new
2995         'set-cwd-on-gdbserver' feature.
2996         (New remote packets): Add entry for QSetWorkingDir.
2997         * common/common-inferior.h (set_inferior_cwd): New prototype.
2998         * infcmd.c (set_inferior_cwd): Remove "static".
2999         (show_cwd_command): Expand text to include remote debugging.
3000         * remote.c: Add PACKET_QSetWorkingDir.
3001         (remote_protocol_features) <QSetWorkingDir>: New entry for
3002         PACKET_QSetWorkingDir.
3003         (extended_remote_set_inferior_cwd): New function.
3004         (extended_remote_create_inferior): Call
3005         "extended_remote_set_inferior_cwd".
3006         (_initialize_remote): Call "add_packet_config_cmd" for
3007         QSetWorkingDir.
3008
3009 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3010
3011         * NEWS (New commands): Mention "set/show cwd".
3012         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3013         "cd" command's help text.
3014         * common/common-inferior.h (get_inferior_cwd): New prototype.
3015         * infcmd.c (inferior_cwd_scratch): New global variable.
3016         (set_inferior_cwd): New function.
3017         (get_inferior_cwd): Likewise.
3018         (set_cwd_command): Likewise.
3019         (show_cwd_command): Likewise.
3020         (_initialize_infcmd): Add "set/show cwd" commands.
3021         * inferior.h (class inferior) <cwd>: New field.
3022         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3023         (fork_inferior): Change inferior's cwd before its execution.
3024         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3025         to CreateProcess.
3026
3027 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3028
3029         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3030         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3031         (COMMON_OBS): Add gdb_tilde_expand.o.
3032         * common/gdb_tilde_expand.c: New file.
3033         * common/gdb_tilde_expand.h: Likewise.
3034
3035 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3036
3037         * gdbarch.sh (objfile): Remove duplicate declaration.
3038         * gdbarch.h: Regenerate.
3039
3040 2017-10-03  Tom Tromey  <tom@tromey.com>
3041
3042         * utils.c (internal_vproblem): Use string_vprintf.
3043
3044 2017-10-03  Tom Tromey  <tom@tromey.com>
3045
3046         * printcmd.c (info_symbol_command): Use std::string.
3047
3048 2017-10-03  Tom Tromey  <tom@tromey.com>
3049
3050         * top.c (gdb_safe_append_history): Use std::string.
3051
3052 2017-10-03  Tom Tromey  <tom@tromey.com>
3053
3054         * event-top.c (stdin_event_handler): Update.
3055         * main.c (captured_main_1): Update.
3056         * top.h (make_delete_ui_cleanup): Remove.
3057         (struct ui): Add constructor and destructor.
3058         (new_ui, delete_ui): Remove.
3059         * top.c (make_delete_ui_cleanup): Remove.
3060         (new_ui_command): Use std::unique_ptr.
3061         (delete_ui_cleanup): Remove.
3062         (ui::ui): Rename from new_ui.  Update.
3063         (free_ui): Remove.
3064         (ui::~ui): Rename from delete_ui.  Update.
3065
3066 2017-10-03  Tom Tromey  <tom@tromey.com>
3067
3068         * symfile.c (load_progress): Use gdb::byte_vector.
3069
3070 2017-10-03  Tom Tromey  <tom@tromey.com>
3071
3072         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3073         declaration.
3074         * printcmd.c (x_command): Remove unused declaration.
3075         * symfile.c (symbol_file_command): Remove unused declaration.
3076
3077 2017-10-03  Tom Tromey  <tom@tromey.com>
3078
3079         * utils.c (internal_vproblem): Use std::string.
3080         (defaulted_query): Likewise.
3081
3082 2017-10-03  Tom Tromey  <tom@tromey.com>
3083
3084         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3085         * top.c (execute_command_to_string): Update.
3086         * utils.c (make_cleanup_restore_page_info): Remove.
3087         (do_restore_page_info_cleanup): Remove.
3088         (set_batch_flag_and_restore_page_info):
3089         New.
3090         (make_cleanup_restore_page_info): Remove.
3091         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3092         (~set_batch_flag_and_restore_page_info): New
3093         (make_cleanup_restore_uinteger): Remove.
3094         (make_cleanup_restore_integer): Remove.
3095         (struct restore_integer_closure): Remove.
3096         (restore_integer): Remove.
3097         * utils.h (struct set_batch_flag_and_restore_page_info): New
3098         class.
3099         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3100         (make_cleanup_restore_page_info): Remove.
3101         (make_cleanup_restore_uinteger) Remove.
3102         (make_cleanup_restore_integer) Remove.
3103
3104 2017-10-03  Tom Tromey  <tom@tromey.com>
3105
3106         * record-full.h (record_full_gdb_operation_disable_set): Return
3107         scoped_restore_tmpl<int>.
3108         * infrun.c (adjust_pc_after_break): Update.
3109         (handle_signal_stop): Update.
3110         * record-full.c (record_full_gdb_operation_disable_set): Return
3111         scoped_restore_tmpl<int>.
3112         (record_full_wait_1, record_full_insert_breakpoint)
3113         (record_full_remove_breakpoint, record_full_save)
3114         (record_full_goto_insn): Update.
3115
3116 2017-10-02  Tom Tromey  <tom@tromey.com>
3117
3118         PR rust/22236:
3119         * rust-lang.c (rust_val_print_str): New function.
3120         (val_print_struct): Call it.
3121         (rust_subscript): Preserve name of slice type.
3122
3123 2017-10-02  Tom Tromey  <tom@tromey.com>
3124
3125         * rust-lang.c (rust_subscript): Handle slices in
3126         EVAL_AVOID_SIDE_EFFECTS case.
3127
3128 2017-10-02  Tom Tromey  <tom@tromey.com>
3129
3130         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3131
3132 2017-10-02  Tom Tromey  <tom@tromey.com>
3133
3134         * rust-lang.h (rust_slice_type): Add "extern".
3135
3136 2017-10-02  Tom Tromey  <tom@tromey.com>
3137             Pedro Alves  <palves@redhat.com>
3138
3139         * ada-lang.h (ada_exc_info::operator<): Make const.
3140         (ada_exc_info::operator==): Make const.
3141         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3142         Make const.
3143
3144 2017-09-29  Tom Tromey  <tom@tromey.com>
3145
3146         * target.c (read_whatever_is_readable): Change type of "result".
3147         Update.
3148         (free_memory_read_result_vector): Remove.
3149         (read_memory_robust): Change return type.  Update.
3150         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3151         bin2hex, std::string.
3152         * target.h (memory_read_result_s): Remove typedef.
3153         (free_memory_read_result_vector): Remove.
3154         (read_memory_robust): Return std::vector.
3155
3156 2017-09-29  Tom Tromey  <tom@tromey.com>
3157
3158         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3159
3160 2017-09-29  Tom Tromey  <tom@tromey.com>
3161
3162         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3163         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3164         operator< and operator==.
3165         (ada_exceptions_list): Return a std::vector.
3166         * ada-lang.c (ada_exc_info::operator<): Rename from
3167         compare_ada_exception_info.
3168         (ada_exc_info::operator==): New.
3169         (sort_remove_dups_ada_exceptions_list): Change type of
3170         "exceptions".
3171         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3172         (ada_add_global_exceptions): Likewise.
3173         (ada_exceptions_list_1): Return a std::vector.
3174         (ada_exceptions_list): Likewise.
3175
3176 2017-09-29  Tom Tromey  <tom@tromey.com>
3177
3178         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3179         'std::set *'.
3180         (print_one_inferior): Update.
3181         (free_vector_of_ints): Remove.
3182         (list_available_thread_groups): Change "ids" to std::set.
3183         (mi_cmd_list_thread_groups): Update.
3184         (struct collect_cores_data) <core>: Now a std::set.
3185         (collect_cores): Update.
3186         (unique): Remove.
3187         (print_one_inferior): Update.
3188
3189 2017-09-29  Tom Tromey  <tom@tromey.com>
3190
3191         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3192         (mi_execute_async_cli_command): Likewise.
3193         (mi_cmd_trace_frame_collected): Use field_fmt.
3194
3195 2017-09-29  Tom Tromey  <tom@tromey.com>
3196
3197         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3198         gdb::byte_vector.
3199
3200 2017-09-29  Tom Tromey  <tom@tromey.com>
3201
3202         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3203
3204 2017-09-29  Tom Tromey  <tom@tromey.com>
3205
3206         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3207
3208 2017-09-29  Tom Tromey  <tom@tromey.com>
3209
3210         * varobj.h (varobj_gen_name): Return std::string.
3211         * varobj.c (varobj_gen_name): Return std::string.
3212         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3213         (mi_cmd_var_delete): Don't copy "name".
3214
3215 2017-09-29  Tom Tromey  <tom@tromey.com>
3216
3217         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3218         (mi_cmd_break_insert_1): Update.
3219
3220 2017-09-29  Tom Tromey  <tom@tromey.com>
3221
3222         * target.h (make_scoped_defer_target_commit_resume): Update.
3223         * target.c (make_scoped_defer_target_commit_resume): Rename from
3224         make_cleanup_defer_target_commit_resume.  Return a
3225         scoped_restore.
3226         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3227
3228 2017-09-29  Tom Tromey  <tom@tromey.com>
3229
3230         * main.c (captured_main_1): Remove unused declaration.
3231         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3232
3233 2017-09-29  Tom Tromey  <tom@tromey.com>
3234
3235         * symtab.c (search_symbols): Remove unused outer cleanup.
3236         (make_source_files_completion_list): Remove unused declaration.
3237
3238 2017-09-29  Tom Tromey  <tom@tromey.com>
3239
3240         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3241
3242 2017-09-29  Tom Tromey  <tom@tromey.com>
3243
3244         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3245         gdb::byte_vector.
3246
3247 2017-09-29  Tom Tromey  <tom@tromey.com>
3248
3249         * complaints.c (vcomplaint): Use std::string.
3250
3251 2017-09-29  Tom Tromey  <tom@tromey.com>
3252
3253         * tracepoint.c (trace_variable_command): Use std::string.
3254         (encode_actions_1): Remove unused declarations.
3255         (create_tsv_from_upload): Use std::string.
3256
3257 2017-09-29  Tom Tromey  <tom@tromey.com>
3258
3259         * cp-support.c (gdb_demangle): Use std::string.
3260
3261 2017-09-29  Tom Tromey  <tom@tromey.com>
3262
3263         * stack.c (parse_frame_specification): Use std::string
3264         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3265
3266 2017-09-29  Tom Tromey  <tom@tromey.com>
3267
3268         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3269
3270 2017-09-29  Tom Tromey  <tom@tromey.com>
3271
3272         * utils.c (vfprintf_maybe_filtered): Use std::string.
3273         (vfprintf_unfiltered): Likewise.
3274
3275 2017-09-29  Tom Tromey  <tom@tromey.com>
3276
3277         * event-top.c (top_level_prompt): Return std::string.
3278         (display_gdb_prompt): Update.
3279
3280 2017-09-29  Tom Tromey  <tom@tromey.com>
3281
3282         * unittests/common-utils-selftests.c (format): New function.
3283         (string_vprintf_tests): New function.
3284         (_initialize_common_utils_selftests): Register new tests.
3285         * common/common-utils.c (string_vprintf): New function.
3286         * common/common-utils.h (string_vprintf): Declare.
3287
3288 2017-09-29  Pedro Alves  <palves@redhat.com>
3289
3290         * common/rsp-low.c (unpack_varlen_hex): Constify.
3291         * common/rsp-low.h (unpack_varlen_hex): Constify.
3292         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3293         Constify.
3294         * remote.c (remote_set_permissions, read_ptid)
3295         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3296         (remote_static_tracepoint_marker_at)
3297         (remote_static_tracepoint_markers_by_strid)
3298         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3299         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3300         (parse_tracepoint_definition, parse_tsv_definition)
3301         (parse_static_tracepoint_marker_definition): Constify.
3302         * tracepoint.h (parse_static_tracepoint_marker_definition)
3303         (parse_trace_status, parse_tracepoint_status)
3304         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3305
3306 2017-09-29  Pedro Alves  <palves@redhat.com>
3307
3308         * remote.c (target_buf, target_buf_size): Delete.
3309         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3310         Use the connection's packet buffer instead.
3311         All callers adjusted.
3312         (_initialize_remote): Remove references to target_buf and
3313         target_buf_size.
3314
3315 2017-09-28  Pedro Alves  <palves@redhat.com>
3316
3317         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3318         unittests/common-utils-selftests.c.
3319         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3320         (COMMON_OBS): Remove utils-selftests.o.
3321         * utils-selftests.c: Move to ...
3322         * unittests/common-utils-selftests.c: ... here and rename self
3323         test to "string_printf".
3324
3325 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3326
3327         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3328         having NULL cus or tus.
3329
3330 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3331
3332         * arm-tdep.c: (convert_from_extended): Remove.
3333         (convert_to_extended): Likewise.
3334         (arm_extract_return_value): Use convert_typed_floating.
3335         (arm_store_return_value): Likewise.
3336
3337         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3338         * sh-tdep.c: Do not include "floatformat.h".
3339         (sh_littlebyte_bigword_type): New function.
3340         (sh_register_convert_to_virtual): Use convert_typed_floating.
3341         (sh_register_convert_to_raw): Likewise.
3342         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3343         (sh64_littlebyte_bigword_type): New function.
3344         (sh64_extract_return_value): Use convert_typed_floating.
3345         (sh64_register_convert_to_virtual): Likewise.
3346         (sh64_register_convert_to_raw): Likewise.
3347
3348 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3349
3350         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3351         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3352
3353         * gdbtypes.h (union type_specific): Make field floatformat hold
3354         just a single struct floatformat, not an array.
3355         (floatformat_from_type): Move here.
3356         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3357         changed TYPE_FLOATFORMAT definition.
3358         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3359         (recursive_dump_type): Likewise.
3360         (init_float_type): Install correct floatformat for byte order.
3361         (arch_float_type): Likewise.
3362
3363 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3364
3365         * gdbtypes.c (init_type): Change incoming argument from
3366         length-in-bytes to length-in-bits.  Assert length is a
3367         multiple of TARGET_CHAR_BITS.
3368         (arch_type, arch_flags_type): Likewise.
3369         (init_integer_type): Update call to init_type.
3370         (init_character_type): Likewise.
3371         (init_boolean_type): Likewise.
3372         (init_float_type): Likewise.
3373         (init_decfloat_type): Likewise.
3374         (init_complex_type): Likewise.
3375         (init_pointer_type): Likewise.
3376         (objfile_type): Likewise.
3377         (arch_integer_type): Update call to arch_type.
3378         (arch_character_type): Likewise.
3379         (arch_boolean_type): Likewise.
3380         (arch_float_type): Likewise.
3381         (arch_decfloat_type): Likewise.
3382         (arch_complex_type): Likewise.
3383         (arch_pointer_type): Likewise.
3384         (gdbtypes_post_init): Likewise.
3385
3386         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3387         (read_base_type): Likewise.
3388         * mdebugread.c (basic_type): Likewise.
3389         * stabsread.c (dbx_init_float_type): Likewise.
3390         (rs6000_builtin_type): Likewise.
3391         (read_range_type): Likewise.  Also, fix call to init_integer_type
3392         with erroneous length argument.
3393
3394         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3395         * d-lang.c (build_d_types): Likewise.
3396         * f-lang.c (build_fortran_types): Likewise.
3397         * go-lang.c (build_go_types): Likewise.
3398         * opencl-lang.c (build_opencl_types): Likewise.
3399         * jit.c (finalize_symtab): Likewise.
3400         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3401         (build_std_type_info_type): Likewise.
3402         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3403         update call to arch_flags_type.
3404
3405         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3406         arch_type.
3407         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3408         * windows-tdep.c (windows_get_tlb_type): Likewise.
3409
3410         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3411         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3412         * m32c-tdep.c (make_types): Likewise.
3413         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3414         (rl78_psw_type): Update call to arch_flags_type.
3415         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3416         * rx-tdep.c (rx_psw_type): Likewise.
3417         (rx_fpsw_type): Likewise.
3418         * sparc-tdep.c (sparc_psr_type): Likewise.
3419         (sparc_fsr_type): Likewise.
3420         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3421         (sparc64_ccr_type): Likewise.
3422         (sparc64_fsr_type): Likewise.
3423         (sparc64_fprs_type): Likewise.
3424
3425 2017-09-27  Tom Tromey  <tom@tromey.com>
3426
3427         * findcmd.c (find_command): Constify.
3428
3429 2017-09-27  Tom Tromey  <tom@tromey.com>
3430
3431         * ada-tasks.c (task_command_1, task_command): Constify.
3432
3433 2017-09-27  Tom Tromey  <tom@tromey.com>
3434
3435         * symtab.c (maintenance_print_symbol_cache)
3436         (maintenance_flush_symbol_cache)
3437         (maintenance_print_symbol_cache_statistics): Constify.
3438
3439 2017-09-27  Tom Tromey  <tom@tromey.com>
3440
3441         * inferior.c (detach_inferior_command, kill_inferior_command)
3442         (inferior_command): Constify.
3443
3444 2017-09-27  Tom Tromey  <tom@tromey.com>
3445
3446         * regcache.c (regcache_print, maintenance_print_registers)
3447         (maintenance_print_raw_registers)
3448         (maintenance_print_cooked_registers)
3449         (maintenance_print_register_groups)
3450         (maintenance_print_remote_registers): Constify.
3451
3452 2017-09-27  Tom Tromey  <tom@tromey.com>
3453
3454         * printcmd.c (map_display_numbers, undisplay_command)
3455         (enable_disable_display_command, enable_display_command)
3456         (disable_display_command): Constify.
3457
3458 2017-09-27  Tom Tromey  <tom@tromey.com>
3459
3460         * breakpoint.h (delete_command): Don't declare.
3461         * breakpoint.c (delete_command, enable_once_command)
3462         (enable_count_command, enable_delete_command, breakpoint_1)
3463         (maintenance_info_breakpoints, stopin_command, stopat_command)
3464         (delete_command, delete_trace_command, save_breakpoints)
3465         (save_breakpoints_command, save_tracepoints_command): Constify.
3466
3467 2017-09-27  Tom Tromey  <tom@tromey.com>
3468
3469         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3470         (skip_ws, extract_identifier, macro_define_command)
3471         (macro_undef_command, macro_list_command): Constify.
3472
3473 2017-09-27  Tom Tromey  <tom@tromey.com>
3474
3475         * infcmd.c (environment_info, set_environment_command)
3476         (unset_environment_command, path_info, info_proc_cmd_1)
3477         (info_proc_cmd_mappings, info_proc_cmd_stat)
3478         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3479         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3480
3481 2017-09-27  Tom Tromey  <tom@tromey.com>
3482
3483         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3484         Constify.
3485
3486 2017-09-27  Tom Tromey  <tom@tromey.com>
3487
3488         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3489
3490 2017-09-27  Tom Tromey  <tom@tromey.com>
3491
3492         * demangle.c (demangle_command): Constify.
3493
3494 2017-09-27  Tom Tromey  <tom@tromey.com>
3495
3496         * progspace.c (maintenance_info_program_spaces_command):
3497         Constify.
3498
3499 2017-09-27  Tom Tromey  <tom@tromey.com>
3500
3501         * compile/compile.c (check_raw_argument, compile_file_command)
3502         (compile_code_command, compile_print_command): Constify.
3503
3504 2017-09-27  Tom Tromey  <tom@tromey.com>
3505
3506         * reggroups.c (maintenance_print_reggroups): Constify.
3507
3508 2017-09-27  Tom Tromey  <tom@tromey.com>
3509
3510         * dwarf2read.c (save_gdb_index_command): Constify.
3511
3512 2017-09-27  Tom Tromey  <tom@tromey.com>
3513
3514         * stap-probe.c (info_probes_stap_command): Constify.
3515
3516 2017-09-27  Tom Tromey  <tom@tromey.com>
3517
3518         * fork-child.c (unset_exec_wrapper_command): Constify.
3519
3520 2017-09-27  Tom Tromey  <tom@tromey.com>
3521
3522         * btrace.c (get_uint, get_context_size, no_chunk)
3523         (maint_btrace_packet_history_cmd)
3524         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3525         (maint_info_btrace_cmd): Constify.
3526
3527 2017-09-27  Tom Tromey  <tom@tromey.com>
3528
3529         * reverse.c (delete_bookmark_command): Constify.
3530
3531 2017-09-27  Tom Tromey  <tom@tromey.com>
3532
3533         * remote.c (set_memory_packet_size)
3534         (set_memory_write_packet_size, show_memory_write_packet_size)
3535         (set_memory_read_packet_size, show_memory_read_packet_size)
3536         (compare_sections_command, packet_command, remote_put_command)
3537         (remote_get_command, remote_delete_command): Constify.
3538
3539 2017-09-27  Tom Tromey  <tom@tromey.com>
3540
3541         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3542         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3543         (set_mipsfpu_auto_command): Constify.
3544
3545 2017-09-27  Tom Tromey  <tom@tromey.com>
3546
3547         * cli/cli-cmds.h (cd_command): Constify.
3548         * cli/cli-cmds.c (cd_command): Constify.
3549
3550 2017-09-27  Tom Tromey  <tom@tromey.com>
3551
3552         * thread.c (thread_name_command, thread_find_command): Constify.
3553
3554 2017-09-27  Tom Tromey  <tom@tromey.com>
3555
3556         * probe.c (enable_probes_command, disable_probes_command):
3557         Constify.
3558
3559 2017-09-27  Tom Tromey  <tom@tromey.com>
3560
3561         * symfile.c (symbol_file_command): Constify.
3562         * gdbcore.h (deprecated_file_changed_hook): Constify.
3563         * exec.c (deprecated_file_changed_hook, exec_file_command)
3564         (file_command): Constify.
3565         * defs.h (symbol_file_command): Constify.
3566
3567 2017-09-27  Tom Tromey  <tom@tromey.com>
3568
3569         * remote-fileio.c (set_system_call_allowed)
3570         (show_system_call_allowed): Constify.
3571
3572 2017-09-27  Tom Tromey  <tom@tromey.com>
3573
3574         * tracepoint.c (delete_trace_variable_command)
3575         (tfind_end_command, tfind_start_command, tfind_pc_command)
3576         (tfind_tracepoint_command, tfind_line_command)
3577         (tfind_range_command, tfind_outside_command): Constify.
3578
3579 2017-09-27  Tom Tromey  <tom@tromey.com>
3580
3581         * ax-gdb.c (maint_agent_printf_command, agent_command)
3582         (agent_eval_command): Constify.
3583
3584 2017-09-27  Tom Tromey  <tom@tromey.com>
3585
3586         * tracepoint.c (info_scope_command): Constify.
3587         * python/python.c (gdbpy_decode_line): Constify.
3588         * python/py-breakpoint.c (bppy_init): Constify.
3589         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3590         * location.h: (new_linespec_location)
3591         (string_to_event_location_basic, string_to_event_location):
3592         Constify.
3593         * location.c (new_linespec_location)
3594         (string_to_event_location_basic, string_to_event_location):
3595         Constify.
3596         * linespec.h (decode_line_with_current_source)
3597         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3598         * linespec.c (linespec_lex_to_end)
3599         (decode_line_with_current_source)
3600         (decode_line_with_last_displayed): Constify.
3601         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3602         Constify.
3603         * cli/cli-cmds.c (edit_command, list_command): Constify.
3604         * breakpoint.h (until_break_command, watch_command_wrapper)
3605         (awatch_command_wrapper, rwatch_command_wrapper)
3606         (init_ada_exception_breakpoint): Constify.
3607         * breakpoint.c (break_command_1, dprintf_command)
3608         (break_range_command, watch_command_wrapper)
3609         (rwatch_command_wrapper, awatch_command_wrapper)
3610         (until_break_command, init_ada_exception_breakpoint)
3611         (strace_marker_create_sals_from_location, trace_command)
3612         (ftrace_command, strace_command, struct tracepoint): Constify.
3613         * ax-gdb.c (agent_command_1): Constify.
3614         * ada-lang.c (ada_exception_sal): Constify.
3615
3616 2017-09-27  Tom Tromey  <tom@tromey.com>
3617
3618         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3619         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3620         (get_context_size, no_chunk, get_insn_history_modifiers)
3621         (cmd_record_insn_history, get_call_history_modifiers)
3622         (cmd_record_call_history): Constify.
3623
3624 2017-09-27  Tom Tromey  <tom@tromey.com>
3625
3626         * source.c (show_substitute_path_command)
3627         (unset_substitute_path_command, set_substitute_path_command):
3628         Constify.
3629
3630 2017-09-27  Tom Tromey  <tom@tromey.com>
3631
3632         * typeprint.c (maintenance_print_type): Constify.
3633         * maint.c (maintenance_dump_me, maintenance_demangle)
3634         (maintenance_time_display, maintenance_info_sections)
3635         (maintenance_print_statistics, maintenance_deprecate)
3636         (maintenance_undeprecate): Constify.
3637         (maintenance_do_deprecate): Constify.  Use std::string.
3638         (maintenance_selftest): Constify.
3639         * gdbtypes.h (maintenance_print_type): Constify.
3640
3641 2017-09-27  Tom Tromey  <tom@tromey.com>
3642
3643         * hppa-tdep.c (unwind_command): Constify.
3644
3645 2017-09-27  Tom Tromey  <tom@tromey.com>
3646
3647         * target-descriptions.c (unset_tdesc_filename_cmd)
3648         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3649         Constify.
3650
3651 2017-09-27  Tom Tromey  <tom@tromey.com>
3652
3653         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3654
3655 2017-09-27  Tom Tromey  <tom@tromey.com>
3656
3657         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3658
3659 2017-09-27  Tom Tromey  <tom@tromey.com>
3660
3661         * tui/tui-regs.c (tui_reg_command): Constify.
3662
3663 2017-09-27  Tom Tromey  <tom@tromey.com>
3664
3665         * skip.c (skip_file_command, skip_function_command)
3666         (skip_enable_command, skip_disable_command, skip_delete_command):
3667         Constify.
3668
3669 2017-09-27  Tom Tromey  <tom@tromey.com>
3670
3671         * record-btrace.c (cmd_record_btrace_bts_start)
3672         (cmd_record_btrace_pt_start): Constify.
3673
3674 2017-09-27  Tom Tromey  <tom@tromey.com>
3675
3676         * symmisc.c (maintenance_print_symbols)
3677         (maintenance_print_msymbols, maintenance_print_objfiles)
3678         (maintenance_info_symtabs, maintenance_check_symtabs)
3679         (maintenance_expand_symtabs, maintenance_info_line_tables):
3680         Constify.
3681
3682 2017-09-27  Tom Tromey  <tom@tromey.com>
3683
3684         * top.c (new_ui_command): Constify.
3685
3686 2017-09-27  Tom Tromey  <tom@tromey.com>
3687
3688         * symfile.c (add_symbol_file_command)
3689         (remove_symbol_file_command, list_overlays_command)
3690         (map_overlay_command, unmap_overlay_command)
3691         (overlay_auto_command, overlay_manual_command)
3692         (overlay_off_command, overlay_load_command): Constify.
3693
3694 2017-09-27  Tom Tromey  <tom@tromey.com>
3695
3696         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3697         (info_spu_mailbox_command, info_spu_dma_command)
3698         (info_spu_proxydma_command): Constify.
3699
3700 2017-09-27  Tom Tromey  <tom@tromey.com>
3701
3702         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3703
3704 2017-09-27  Tom Tromey  <tom@tromey.com>
3705
3706         * cli/cli-script.c (user_defined_command): Constify.
3707
3708 2017-09-27  Tom Tromey  <tom@tromey.com>
3709
3710         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3711         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3712         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3713         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3714         (dump_binary_value, append_binary_memory, append_binary_value):
3715         Constify.
3716         (struct dump_context) <func>: Constify.
3717         (add_dump_command): Update.
3718
3719 2017-09-27  Tom Tromey  <tom@tromey.com>
3720
3721         * cli/cli-cmds.c (show_version, show_configuration)
3722         (source_command, show_user): Constify.
3723
3724 2017-09-27  Tom Tromey  <tom@tromey.com>
3725
3726         * target.c (maintenance_print_target_stack): Constify.
3727
3728 2017-09-27  Tom Tromey  <tom@tromey.com>
3729
3730         * interps.c (interpreter_exec_cmd): Constify.
3731
3732 2017-09-27  Tom Tromey  <tom@tromey.com>
3733
3734         * record-full.c (cmd_record_full_restore): Constify.
3735
3736 2017-09-27  Tom Tromey  <tom@tromey.com>
3737
3738         * memattr.c (enable_mem_command, disable_mem_command)
3739         (delete_mem_command): Constify.
3740
3741 2017-09-27  Tom Tromey  <tom@tromey.com>
3742
3743         * value.c (show_convenience): Constify.
3744
3745 2017-09-27  Tom Tromey  <tom@tromey.com>
3746
3747         * gdbcore.h (core_file_command): Update.
3748         * corefile.c (core_file_command): Constify.
3749
3750 2017-09-27  Tom Tromey  <tom@tromey.com>
3751
3752         * user-regs.c (maintenance_print_user_registers): Constify.
3753
3754 2017-09-27  Tom Tromey  <tom@tromey.com>
3755
3756         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3757
3758 2017-09-27  Tom Tromey  <tom@tromey.com>
3759
3760         * cp-support.c (first_component_command): Constify.
3761
3762 2017-09-27  Tom Tromey  <tom@tromey.com>
3763
3764         * psymtab.c (maintenance_print_psymbols)
3765         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3766         Constify.
3767
3768 2017-09-27  Tom Tromey  <tom@tromey.com>
3769
3770         * windows-tdep.c (display_tib): Constify.
3771
3772 2017-09-27  Tom Tromey  <tom@tromey.com>
3773
3774         * linux-fork.c (delete_checkpoint_command)
3775         (detach_checkpoint_command): Constify.
3776
3777 2017-09-27  Tom Tromey  <tom@tromey.com>
3778
3779         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3780
3781 2017-09-27  Tom Tromey  <tom@tromey.com>
3782
3783         * arc-tdep.c (dump_arc_instruction_command): Constify.
3784
3785 2017-09-27  Tom Tromey  <tom@tromey.com>
3786
3787         * valprint.c (set_radix, show_radix): Constify.
3788
3789 2017-09-27  Tom Tromey  <tom@tromey.com>
3790
3791         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3792
3793 2017-09-27  Tom Tromey  <tom@tromey.com>
3794
3795         * command.h (not_just_help_class_command): Update.
3796         * cli/cli-decode.h (not_just_help_class_command): Update.
3797         * cli/cli-decode.c (not_just_help_class_command): Constify.
3798
3799 2017-09-27  Tom Tromey  <tom@tromey.com>
3800
3801         * gdb_bfd.c (maintenance_info_bfds): Constify.
3802
3803 2017-09-27  Tom Tromey  <tom@tromey.com>
3804
3805         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3806         overloads.
3807         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3808         (do_const_cfunc): New function.
3809         (cmd_cfunc_eq): New overload.
3810         (cli_user_command_p): Check do_const_cfunc.
3811         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3812         const_cfunc.
3813         * command.h (add_cmd): Add const overload and no-function
3814         overload.
3815         (set_cmd_cfunc): Add const overload.
3816         (cmd_const_cfunc_ftype): Declare.
3817         (cmd_cfunc_eq): Add const overload.
3818         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3819         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3820         overload.
3821
3822 2017-09-27  Tom Tromey  <tom@tromey.com>
3823
3824         * macroexp.c (get_next_token_for_substitution): New function.
3825         (substitute_args): Call it.  Check for __VA_OPT__.
3826
3827 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3828             Pedro Alves <palves@redhat.com>
3829
3830         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3831         producer_is_icc_lt_14.
3832         (producer_is_icc_lt_14): New function.
3833         (check_producer): Add code for checking version of ICC.
3834         (producer_is_icc): Move to producer.c.
3835         (read_structure_type): Restrict ICC workaround to ICC<14.
3836         * producer.c: Include selftest.h.
3837         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3838         New functions.
3839         * producer.h (producer_is_icc): New declaration.
3840
3841 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3842
3843         * Makefile.in (SFILES): Add producer.c.
3844         (COMMON_OBS): Add producer.o
3845         * amd64-tdep.c (producer.h): Add new include.
3846         * dwarf2read.c (producer.h): Add new include.
3847         * producer.c: New file.
3848         * producer.h: New file.
3849         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3850         producer.c.
3851         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3852         producer.h.
3853
3854 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3855
3856         * configure.ac: Search ncursesw before ncurses.
3857         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3858         * gdb_curses.h: Include <ncursesw/ncurses.h>
3859         * config.in, configure: Regenerate.
3860
3861 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3862
3863         PR gdb/22185
3864         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3865         obsolete.
3866         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3867         Remove i386sol2 support.
3868         * configure.nat <i386sol2>: Remove.
3869         <sol2-64>: Fold into ...
3870         <sol2>: ... this.
3871         Move common settings to default section.
3872         Add sol-thread.o.
3873         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3874         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3875         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3876         <i[34567]86-*-solaris*>: Remove.
3877         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3878
3879         * configure.ac: Remove wctype in libw check.
3880         (_MSE_INT_H): Don't define on Solaris 7-9.
3881         <solaris*>: Remove libthread_db.so.1 check.
3882         * configure: Regenerate.
3883         * config.in: Regenerate.
3884
3885         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3886         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3887         (gdb_ps_size_t): Remove.
3888         Use base types in users.
3889         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3890
3891         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3892
3893 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3894
3895         PR build/22206
3896         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3897         (adi_is_addr_mapped): Likewise.
3898         (PSR_ICC): Don't redefine.
3899         (PSR_IMPL): Likewise.
3900
3901 2017-09-25  Tom Tromey  <tom@tromey.com>
3902
3903         * regcache.c (regcache::dump): Use string_printf.
3904
3905 2017-09-25  Tom Tromey  <tom@tromey.com>
3906
3907         * regcache.c (class regcache_invalidator): New.
3908         (struct register_to_invalidate): Remove.
3909         (make_cleanup_regcache_invalidate): Remove.
3910         (regcache::raw_write): Use regcache_invalidator.
3911
3912 2017-09-25  Tom Tromey  <tom@tromey.com>
3913
3914         * spu-tdep.c (spu2ppu_sniffer): Update.
3915         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3916         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3917         Remove.
3918         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3919         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3920         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3921         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3922         (frame_pop): Update.
3923
3924 2017-09-25  Tom Tromey  <tom@tromey.com>
3925
3926         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3927         * regcache.h (regcache_xfree): Don't declare.
3928         * regcache.c (regcache_xfree): Remove.
3929         (do_regcache_xfree): Use delete.
3930         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3931         * linux-fork.c (free_fork): Use delete.
3932         (fork_save_infrun_state): Likewise.
3933         * jit.c (jit_dealloc_cache): Use delete.
3934         * infrun.c (discard_infcall_suspend_state): Use delete.
3935
3936 2017-09-25  Tom Tromey  <tom@tromey.com>
3937
3938         * regcache.h (regcache_xmalloc): Don't declare.
3939         (regcache_raw_set_cached_value): Update comment.
3940         * regcache.c (regcache_xmalloc): Remove.
3941         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3942         * jit.c (jit_frame_sniffer): Use new.
3943         * frame.c (frame_save_as_regcache): Use new.
3944
3945 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3946
3947         * NEWS: Advertise support for guarded-storage registers on IBM z.
3948
3949 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3950
3951         * s390-linux-nat.c (have_regset_gs): New static variable.
3952         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3953         control block and guarded-storage broadcast control regsets.
3954         (s390_read_description): Detect whether the target has
3955         guarded-storage support, return appropriate tdesc.
3956         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3957         (features/s390x-gs-linux64.c): Likewise.
3958         (struct gdbarch_tdep) <have_gs>: New field.
3959         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3960         (s390_gsbc_regset): New variables.
3961         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3962         and s390_gsbc_regset, if applicable.
3963         (s390_core_read_description): Check whether core file was from a
3964         target with guarded-storage support; include appropriate regsets.
3965         (s390_gdbarch_init): Add registers for guarded-storage support.
3966         (_initialize_s390_tdep): Initialize new target descriptions that
3967         include registers for guarded-storage support.
3968         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3969         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3970         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3971         (S390_NUM_REGS): Adjust macro definition.
3972         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3973         (tdesc_s390x_gs_linux64): New declarations.
3974
3975 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3976
3977         * features/s390-gs-linux64.xml: New file.
3978         * features/s390-gs.xml: New file.
3979         * features/s390-gsbc.xml: New file.
3980         * features/s390x-gs-linux64.xml: New file.
3981         * features/Makefile (WHICH): Add s390-gs-linux64 and
3982         s390x-gs-linux64.
3983         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3984         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3985         * features/s390-gs-linux64.c: New generated file.
3986         * features/s390x-gs-linux64.c: New file.
3987         * regformats/s390-gs-linux64.dat: New file.
3988         * regformats/s390x-gs-linux64.dat: New file.
3989
3990 2017-09-23  Tom Tromey  <tom@tromey.com>
3991
3992         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3993
3994 2017-09-22  Tom Tromey  <tom@tromey.com>
3995
3996         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3997         type to scoped_restore_tmpl.
3998         <scoped_input_handler>: Initialize m_quit_handler directly.
3999
4000 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4001
4002         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4003         (cd_command): Likewise.  Free "current_directory" before
4004         assigning to it.
4005         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4006         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4007         * top.c (gdb_dirbuf): Remove global declaration.
4008         * top.h (gdb_dirbuf): Likewise.
4009
4010 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4011
4012         * gnulib/aclocal.m4: Regenerate.
4013         * gnulib/config.in: Regenerate.
4014         * gnulib/configure: Regenerate.
4015         * gnulib/import/Makefile.am: Regenerate.
4016         * gnulib/import/Makefile.in: Regenerate.
4017         * gnulib/import/assure.h: New file.
4018         * gnulib/import/at-func.c: Likewise
4019         * gnulib/import/chdir-long.c: New file.
4020         * gnulib/import/chdir-long.h: New file.
4021         * gnulib/import/cloexec.c: New file.
4022         * gnulib/import/cloexec.h: New file.
4023         * gnulib/import/close.c: New file.
4024         * gnulib/import/closedir.c: New file.
4025         * gnulib/import/dirent-private.h: New file.
4026         * gnulib/import/dup-safer.c: New file.
4027         * gnulib/import/dup.c: New file.
4028         * gnulib/import/dup2.c: New file.
4029         * gnulib/import/error.c: New file.
4030         * gnulib/import/error.h: New file.
4031         * gnulib/import/exitfail.c: New file.
4032         * gnulib/import/exitfail.h: New file.
4033         * gnulib/import/fchdir.c: New file.
4034         * gnulib/import/fcntl.c: New file.
4035         * gnulib/import/fcntl.in.h: New file.
4036         * gnulib/import/fd-hook.c: New file.
4037         * gnulib/import/fd-hook.h: New file.
4038         * gnulib/import/fd-safer.c: New file.
4039         * gnulib/import/fdopendir.c: New file.
4040         * gnulib/import/filename.h: New file.
4041         * gnulib/import/filenamecat-lgpl.c: New file.
4042         * gnulib/import/filenamecat.h: New file.
4043         * gnulib/import/fstat.c: New file.
4044         * gnulib/import/fstatat.c: New file.
4045         * gnulib/import/getcwd-lgpl.c: New file.
4046         * gnulib/import/getcwd.c: New file.
4047         * gnulib/import/getdtablesize.c: New file.
4048         * gnulib/import/getlogin_r.c: New file.
4049         * gnulib/import/getprogname.c: New file.
4050         * gnulib/import/getprogname.h: New file.
4051         * gnulib/import/gettext.h: New file.
4052         * gnulib/import/glob-libc.h: New file.
4053         * gnulib/import/glob.c: New file.
4054         * gnulib/import/glob.in.h: New file.
4055         * gnulib/import/intprops.h: New file.
4056         * gnulib/import/m4/chdir-long.m4: New file.
4057         * gnulib/import/m4/close.m4: New file.
4058         * gnulib/import/m4/closedir.m4: New file.
4059         * gnulib/import/m4/d-ino.m4: New file.
4060         * gnulib/import/m4/d-type.m4: New file.
4061         * gnulib/import/m4/dup.m4: New file.
4062         * gnulib/import/m4/dup2.m4: New file.
4063         * gnulib/import/m4/error.m4: New file.
4064         * gnulib/import/m4/fchdir.m4: New file.
4065         * gnulib/import/m4/fcntl.m4: New file.
4066         * gnulib/import/m4/fcntl_h.m4: New file.
4067         * gnulib/import/m4/fdopendir.m4: New file.
4068         * gnulib/import/m4/filenamecat.m4: New file.
4069         * gnulib/import/m4/fstat.m4: New file.
4070         * gnulib/import/m4/fstatat.m4: New file.
4071         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4072         * gnulib/import/m4/getcwd-path-max.m4: New file.
4073         * gnulib/import/m4/getcwd.m4: New file.
4074         * gnulib/import/m4/getdtablesize.m4: New file.
4075         * gnulib/import/m4/getlogin_r.m4: New file.
4076         * gnulib/import/m4/getprogname.m4: New file.
4077         * gnulib/import/m4/glob.m4: New file.
4078         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4079         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4080         * gnulib/import/m4/mempcpy.m4: New file.
4081         * gnulib/import/m4/memrchr.m4: New file.
4082         * gnulib/import/m4/mode_t.m4: New file.
4083         * gnulib/import/m4/msvc-inval.m4: New file.
4084         * gnulib/import/m4/msvc-nothrow.m4: New file.
4085         * gnulib/import/m4/open.m4: New file.
4086         * gnulib/import/m4/openat.m4: New file.
4087         * gnulib/import/m4/opendir.m4: New file.
4088         * gnulib/import/m4/readdir.m4: New file.
4089         * gnulib/import/m4/realloc.m4: New file.
4090         * gnulib/import/m4/rewinddir.m4: New file.
4091         * gnulib/import/m4/save-cwd.m4: New file.
4092         * gnulib/import/m4/strdup.m4: New file.
4093         * gnulib/import/m4/strerror.m4: New file.
4094         * gnulib/import/m4/unistd-safer.m4: New file.
4095         * gnulib/import/mempcpy.c: New file.
4096         * gnulib/import/memrchr.c: New file.
4097         * gnulib/import/msvc-inval.c: New file.
4098         * gnulib/import/msvc-inval.h: New file.
4099         * gnulib/import/msvc-nothrow.c: New file.
4100         * gnulib/import/msvc-nothrow.h: New file.
4101         * gnulib/import/open.c: New file.
4102         * gnulib/import/openat-die.c: New file.
4103         * gnulib/import/openat-priv.h: New file.
4104         * gnulib/import/openat-proc.c: New file.
4105         * gnulib/import/openat.c: New file.
4106         * gnulib/import/openat.h: New file.
4107         * gnulib/import/opendir.c: New file.
4108         * gnulib/import/pipe-safer.c: New file.
4109         * gnulib/import/readdir.c: New file.
4110         * gnulib/import/realloc.c: New file.
4111         * gnulib/import/rewinddir.c: New file.
4112         * gnulib/import/save-cwd.c: New file.
4113         * gnulib/import/save-cwd.h: New file.
4114         * gnulib/import/strdup.c: New file.
4115         * gnulib/import/strerror-override.c: New file.
4116         * gnulib/import/strerror-override.h: New file.
4117         * gnulib/import/strerror.c: New file.
4118         * gnulib/import/unistd--.h: New file.
4119         * gnulib/import/unistd-safer.h: New file.
4120         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4121         "getcwd" and "glob".
4122         * ser-tcp.c: Undefine "close" before redefining it.
4123
4124 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4125
4126         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4127         get rid of res_val.
4128
4129 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4130
4131         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4132         <sol2,sparc>: Likewise.
4133         <sol2-64,i386>: Likewise.
4134
4135         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4136         -Wdeprecated-declarations on *-*-solaris*.
4137         * configure: Regenerate.
4138
4139         * procfs.c: Include "nat/inferior.h".
4140         (procfs_info_proc): Fix typo.
4141
4142 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4143
4144         * remote.c (vector): Include.
4145         (struct private_thread_info): Add field, thread_handle.
4146         (free_private_thread_info): Deallocate storage associated with
4147         thread handle.
4148         (get_private_info_thread): Initialize `thread_handle' field.
4149         (struct thread_item): Add field, thread_handle.
4150         (clear_threads_listing_context): Deallocate storage associated
4151         with thread handle.
4152         (start_thread): Add support for "handle" attribute.
4153         (thread_attributes): Add "handle".
4154         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4155         field.
4156         (remote_update_thread_list): Update thread_handle.
4157         (remote_thread_handle_to_thread_info): New function.
4158         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4159
4160 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4161
4162         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4163         function.
4164         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4165         * python/python-internal.h (thread_object_type): Declare.
4166
4167 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4168
4169         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4170         (target_thread_handle_to_thread_info): Declare.
4171         * target.c (target_thread_handle_to_thread_info): New function.
4172         * target-delegates.c: Regenerate.
4173         * gdbthread.h (find_thread_by_handle): Declare.
4174         * thread.c (find_thread_by_handle): New function.
4175         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4176         function.
4177         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4178
4179 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4180
4181         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4182
4183 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4184
4185         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4186
4187 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4188
4189         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4190         to gdb_target_obs.
4191
4192 2017-09-20  Tom Tromey  <tom@tromey.com>
4193
4194         * breakpoint.c (struct counted_command_line): Remove.
4195         (breakpoint_commands): Update.
4196         (alloc_counted_command_line, incref_counted_command_line)
4197         (decref_counted_command_line, do_cleanup_counted_command_line)
4198         (make_cleanup_decref_counted_command_line): Remove.
4199         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4200         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4201         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4202         (save_breakpoints): Update.
4203         * breakpoint.h (counted_command_line): Now a typedef to
4204         shared_ptr.
4205         (struct breakpoint) <commands>: Now a counted_command_line.
4206         (struct bpstats) <command>: Likewise.
4207
4208 2017-09-20  Tom Tromey  <tom@tromey.com>
4209
4210         * breakpoint.c (struct commands_info, do_map_commands_command):
4211         Remove.
4212         (commands_command_1): Update.
4213         (iterate_over_related_breakpoints): Take a function_view.
4214         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4215         (delete_command): Update.
4216         (map_breakpoint_numbers): Take a function_view.
4217         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4218         (disable_command): Update.
4219         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4220         (enable_command): Update.
4221         (struct disp_data, do_enable_breakpoint_disp)
4222         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4223         (do_map_enable_delete_breakpoint): Remove.
4224         (enable_once_command, enable_count_command, enable_delete_command)
4225         (delete_trace_variable_command): Update.
4226
4227 2017-09-20  Tom Tromey  <tom@tromey.com>
4228
4229         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4230         (bpstat_clear): Use delete.
4231         (bpstats): New constructors.
4232         (bpstat_copy, bpstat_stop_status): Use new.
4233         (dprintf_after_condition_true): Update.
4234         * breakpoint.h (bpstats::bpstats): Add constructors.
4235         (bpstats::~bpstats): Add destructor.
4236
4237 2017-09-20  Pedro Alves  <palves@redhat.com>
4238
4239         * eval.c (make_params): Delete, refactored as ...
4240         (class fake_method): ... this new type's ctor.
4241         (fake_method::~fake_method): New.
4242         (evaluate_subexp_standard): Use 'fake_method'.
4243
4244 2017-09-20  Tom Tromey  <tom@tromey.com>
4245
4246         * windows-nat.c (get_windows_debug_event, windows_wait)
4247         (do_initial_windows_stuff, windows_attach): Update.
4248         * utils.c (vwarning, internal_vproblem): Update.
4249         (ui_unregister_input_event_handler_cleanup)
4250         (prepare_to_handle_input): Remove.
4251         (class scoped_input_handler): New.
4252         (defaulted_query, prompt_for_continue): Update.
4253         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4254         Update.
4255         * top.c (undo_terminal_modifications_before_exit): Update.
4256         * target/target.h (target_terminal_init, target_terminal_inferior)
4257         (target_terminal_ours): Don't declare.
4258         (class target_terminal): New.
4259         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4260         (target_terminal_ours_for_output)
4261         (make_cleanup_restore_target_terminal): Don't declare.
4262         (target_terminal_info): Remove.
4263         * target.c (enum terminal_state, terminal_state): Remove.
4264         (target_terminal::terminal_state): Define.
4265         (target_terminal::init): Rename from target_terminal_init.
4266         (target_terminal::inferior): Rename from
4267         target_terminal_inferior.
4268         (target_terminal::ours): Rename from target_terminal_ours.
4269         (target_terminal::ours_for_output): Rename from
4270         target_terminal_ours_for_output.
4271         (target_terminal::info): New method.
4272         (cleanup_restore_target_terminal)
4273         (make_cleanup_restore_target_terminal): Remove.
4274         * solib.c (handle_solib_event): Update.
4275         * remote.c (remote_serial_quit_handler): Update.
4276         (remote_terminal_inferior, remote_wait_as): Update.
4277         * record-full.c (record_full_wait_1): Update.
4278         * nto-procfs.c (procfs_create_inferior): Update.
4279         * nat/fork-inferior.c (startup_inferior): Update.
4280         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4281         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4282         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4283         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4284         (mi_breakpoint_created, mi_breakpoint_deleted)
4285         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4286         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4287         (mi_user_selected_context_changed, report_initial_inferior):
4288         Update.
4289         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4290         (linux_nat_terminal_inferior): Update.
4291         * infrun.c (follow_fork_inferior)
4292         (handle_vfork_child_exec_or_exit, do_target_resume)
4293         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4294         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4295         Update.
4296         * inflow.c (child_terminal_init, info_terminal_command): Update.
4297         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4298         (attach_command): Update.
4299         * infcall.c (call_thread_fsm_should_stop): Update.
4300         * gnu-nat.c (gnu_attach): Update.
4301         * extension.c (struct active_ext_lang_state)
4302         (restore_active_ext_lang): Update.
4303         * exceptions.c (print_flush): Update.
4304         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4305         (struct quit_handler_cleanup_data, restore_quit_handler)
4306         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4307         Remove.
4308         * cp-support.c (gdb_demangle): Update.
4309         * breakpoint.c (update_inserted_breakpoint_locations)
4310         (insert_breakpoint_locations, handle_jit_event)
4311         (disable_breakpoints_in_unloaded_shlib): Update.
4312         * annotate.c (annotate_breakpoints_invalid)
4313         (annotate_frames_invalid): Update.
4314
4315 2017-09-20  Tom Tromey  <tom@tromey.com>
4316
4317         * main.c (catch_command_errors): Rename from
4318         catch_command_errors_const.
4319         (captured_main_1): Update.
4320
4321 2017-09-20  Pedro Alves  <palves@redhat.com>
4322
4323         * cli/cli-cmds.c (list_command): Use print_sal_location.
4324         (print_sal_location): New function.
4325         (ambiguous_line_spec): Use print_sal_location.
4326         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4327         * symtab.c (find_function_start_sal): Likewise.
4328         * symtab.h (symtab_and_line::symbol): New field.
4329
4330 2017-09-20  Pedro Alves  <palves@redhat.com>
4331
4332         * linespec.c (minsym_found): Handle non-text minsyms.
4333         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4334
4335 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4336
4337         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4338         backslash.
4339
4340 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4341
4342         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4343         vmovups instead vmovaps.
4344         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4345
4346 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4347
4348         * NEWS (Changes since GDB 8.0): Add starti.
4349         * infcmd.c (enum run_break): New.
4350         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4351         case.
4352         (run_command): Use enum run_how.
4353         (start_command): Likewise.
4354         (starti_command): New function.
4355         (RUN_ARGS_HELP): New macro.
4356         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4357         commands.  Add starti command.
4358
4359 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4360
4361         * Makefile.in (monitor.o): Remove the rule.
4362
4363 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4364
4365         * annotate.h (struct annotate_arg_emitter): Use
4366         DISABLE_COPY_AND_ASSIGN.
4367         * common/refcounted-object.h (refcounted_object): Likewise.
4368         * completer.h (struct completion_result): Likewise.
4369         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4370         * filename-seen-cache.h (filename_seen_cache): Likewise.
4371         * gdbcore.h (thread_section_name): Likewise.
4372         * gdb_regex.h (compiled_regex): Likewise.
4373         * gdbthread.h (scoped_restore_current_thread): Likewise.
4374         * inferior.h (scoped_restore_current_inferior): Likewise.
4375         * jit.c (jit_reader): Likewise.
4376         * linespec.h (struct linespec_result): Likewise.
4377         * mi/mi-parse.h (struct mi_parse): Likewise.
4378         * nat/fork-inferior.c (execv_argv): Likewise.
4379         * progspace.h (scoped_restore_current_program_space): Likewise.
4380         * python/python-internal.h (class gdbpy_enter): Likewise.
4381         * regcache.h (regcache): Likewise.
4382         * target-descriptions.c (struct tdesc_reg): Likewise.
4383         (struct tdesc_type): Likewise.
4384         (struct tdesc_feature): Likewise.
4385         * ui-out.h (ui_out_emit_type): Likewise.
4386
4387 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4388
4389         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4390         label abort_expression.
4391
4392 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4393
4394         * common/buffer.c (buffer_xml_printf): Adjust.
4395         * common/xml-utils.c (xml_escape_text): Change return type to
4396         std::string, update code accordingly.
4397         * common/xml-utils.h (xml_escape_text): Change return type to
4398         std::string.
4399         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4400         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4401         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4402         Adjust.
4403
4404 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4405
4406         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4407         (SUBDIR_UNITTESTS_OBS): Add new object file.
4408         * unittests/xml-utils-selftests.c: New file.
4409
4410 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4411
4412         * common/selftest.h (selftest): New struct/interface.
4413         (register_test): Add name parameter, add new overload.
4414         (run_tests): Add filter parameter.
4415         (for_each_selftest_ftype): New typedef.
4416         (for_each_selftest): New declaration.
4417         * common/selftest.c (tests): Change type to
4418         map<string, unique_ptr<selftest>>.
4419         (simple_selftest): New struct.
4420         (register_test): New function.
4421         (register_test): Add name parameter and use it.
4422         (run_tests): Add filter parameter and use it.  Add prints.
4423         Adjust to vector -> map change.
4424         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4425         registering selftests.
4426         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4427         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4428         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4429         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4430         * findvar.c (_initialize_findvar): Likewise.
4431         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4432         * maint.c (maintenance_selftest): Update call to run_tests.
4433         (maintenance_info_selftests): New function.
4434         (_initialize_maint_cmds): Register "maintenance info selftests"
4435         command.  Update "maintenance selftest" doc.
4436         * regcache.c (_initialize_regcache): Add names when registering
4437         selftests.
4438         * rust-exp.y (_initialize_rust_exp): Likewise.
4439         * selftest-arch.c (gdbarch_selftest): New struct.
4440         (gdbarch_tests): Remove.
4441         (register_test_foreach_arch): Add name parameter.  Call
4442         register_test.
4443         (tests_with_arch): Remove, move most content to
4444         gdbarch_selftest::operator().
4445         (_initialize_selftests_foreach_arch): Remove.
4446         * selftest-arch.h (register_test_foreach_arch): Add name
4447         parameter.
4448         (run_tests_with_arch): New declaration.
4449         * utils-selftests.c (_initialize_utils_selftests): Add names
4450         when registering selftests.
4451         * utils.c (_initialize_utils): Likewise.
4452         * unittests/array-view-selftests.c
4453         (_initialize_array_view_selftests): Likewise.
4454         * unittests/environ-selftests.c (_initialize_environ_selftests):
4455         Likewise.
4456         * unittests/function-view-selftests.c
4457         (_initialize_function_view_selftests): Likewise.
4458         * unittests/offset-type-selftests.c
4459         (_initialize_offset_type_selftests): Likewise.
4460         * unittests/optional-selftests.c
4461         (_initialize_optional_selftests): Likewise.
4462         * unittests/scoped_restore-selftests.c
4463         (_initialize_scoped_restore_selftests): Likewise.
4464         * NEWS: Document "maintenance selftest" and "maint info
4465         selftests".
4466
4467 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4468
4469         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4470         scoped_restore.
4471
4472 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4473
4474         * mi/mi-main.c (mi_load_progress): Make uiout variable
4475         a unique_ptr.
4476
4477 2017-09-15  Pedro Alves  <palves@redhat.com>
4478
4479         * compile/compile-c-types.c (convert_enum, convert_int)
4480         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4481
4482 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4483
4484         * dwarf2read.c (copy_string): Remove.
4485         (parse_macro_definition): Replace copy_string with savestring.
4486
4487 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4488
4489         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4490         gdb_target_obs.
4491         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4492         Likewise.
4493         (i[34567]86-*-linux*): Likewise.
4494
4495 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4496
4497         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4498         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4499         <stack>: Change type to std::vector.
4500         <stack_len, stack_allocated>: Remove.
4501         <grow_stack>: Remove.
4502         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4503         (dwarf_expr_context::~dwarf_expr_context): Remove.
4504         (dwarf_expr_context::grow_stack): Remove.
4505         (dwarf_expr_context::push): Adjust.
4506         (dwarf_expr_context::pop): Adjust.
4507         (dwarf_expr_context::fetch): Adjust.
4508         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4509         (dwarf_expr_context::stack_empty_p): Adjust.
4510         (dwarf_expr_context::execute_stack_op): Adjust.
4511
4512 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4513
4514         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4515         return type to bool.
4516         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4517
4518 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4519
4520         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4521         Change type to bool.
4522         (dwarf_stack_value) <in_stack_memory>: Likewise.
4523         (dwarf_expr_context) <push_address>: Change parameter type to
4524         bool.
4525         <fetch_in_stack_memory>: Change return type to bool.
4526         <push>: Change parameter type to bool.
4527         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4528         to bool.
4529         (dwarf_expr_context::push_address): Likewise.
4530         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4531         to bool.
4532         (dwarf_expr_context::execute_stack_op): Adjust.
4533         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4534
4535 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4536
4537         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4538         (struct dwarf_expr_context) <n_pieces>: Remove.
4539         <pieces>: Change type to std::vector.
4540         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4541         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4542         pieces.
4543         (dwarf_expr_context::add_piece): Adjust.
4544         * dwarf2loc.c (struct piece_closure): Initialize fields.
4545         <n_pieces>: Remove.
4546         <pieces>: Change type to std::vector.
4547         (allocate_piece_closure): Adjust, change parameter to
4548         std::vector rvalue and std::move it to piece_closure.
4549         (rw_pieced_value): Adjust.
4550         (check_pieced_synthetic_pointer): Adjust.
4551         (indirect_synthetic_pointer): Adjust.
4552         (coerce_pieced_ref): Adjust.
4553         (free_pieced_value_closure):  Adjust.  Use delete to free
4554         piece_closure.
4555         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4556         to allocate_piece_closure.
4557         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4558
4559 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4560
4561         * probe.h (probe_ops_cp): Remove typedef.
4562         (DEF_VEC_P (probe_ops_cp)): Remove.
4563         (all_probe_ops): Change type to std::vector.
4564         * probe.c (info_probes_for_ops): Adjust to vector change.
4565         (probe_linespec_to_ops): Likewise.
4566         (all_probe_ops): Change type to std::vector.
4567         (_initialize_probe): Adjust to vector change.
4568         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4569         * elfread.c (elf_get_probes): Likewise.
4570         * stap-probe.c (_initialize_stap_probe): Likewise.
4571
4572 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4573
4574         * probe.h (struct bound_probe): Define constructors.
4575         * probe.c (bound_probe_s): Remove typedef.
4576         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4577         (collect_probes): Change return type to std::vector, remove
4578         cleanup.
4579         (compare_probes): Return bool, change parameter type.  Change
4580         semantic to "less than".
4581         (gen_ui_out_table_header_info): Change parameter to std::vector
4582         and update.
4583         (exists_probe_with_pops): Likewise.
4584         (info_probes_for_ops): Update to std::vector change.
4585         (enable_probes_command): Likewise.
4586         (disable_probes_command): Likewise.
4587
4588 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4589
4590         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4591         vec to std::vector.
4592         * probe.c (parse_probes_in_pspace): Update.
4593         (find_probes_in_objfile): Update.
4594         (find_probe_by_pc): Update.
4595         (collect_probes): Update.
4596         (probe_any_get_probes): Update.
4597         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4598         return type to reference to std::vector.
4599         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4600         std::vector and update.
4601         (dtrace_process_dof): Likewise.
4602         (dtrace_get_probes): Likewise.
4603         * elfread.c (elf_get_probes): Change return type to std::vector,
4604         store an std::vector in bfd_data.
4605         (probe_key_free): Update to std::vector.
4606         * stap-probe.c (handle_stap_probe): Change parameter to
4607         std::vector and update.
4608         (stap_get_probes): Likewise.
4609         * symfile-debug.c (debug_sym_get_probes): Change return type to
4610         std::vector and update.
4611
4612 2017-09-11  Tom Tromey  <tom@tromey.com>
4613
4614         * breakpoint.c (program_breakpoint_here_p): Update.
4615         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4616         from make_show_memory_breakpoints_cleanup.  Return a
4617         scoped_restore_tmpl<int>.
4618         (restore_show_memory_breakpoints): Remove.
4619         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4620         * mem-break.c (memory_validate_breakpoint): Update.
4621         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4622         (ia64_memory_remove_breakpoint): Update.
4623         (ia64_breakpoint_from_pc): Update.
4624         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4625         from make_show_memory_breakpoints_cleanup.
4626
4627 2017-09-11  Tom Tromey  <tom@tromey.com>
4628
4629         * d-namespace.c (d_lookup_symbol): Use std::string.
4630         (find_symbol_in_baseclass): Likewise.
4631
4632 2017-09-11  Tom Tromey  <tom@tromey.com>
4633
4634         * ctf.c (ctf_start): Use std::string.
4635
4636 2017-09-11  Tom Tromey  <tom@tromey.com>
4637
4638         * ada-lang.c (is_known_support_routine): Update.
4639         (ada_unhandled_exception_name_addr_from_raise): Update.
4640         * guile/scm-frame.c (gdbscm_frame_name): Update.
4641         * python/py-frame.c (frapy_name): Update.
4642         (frapy_function): Update.
4643         * stack.h (find_frame_funname): Update.
4644         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4645         (print_frame): Update.
4646
4647 2017-09-11  Tom Tromey  <tom@tromey.com>
4648
4649         * findcmd.c (put_bits): Take a gdb::byte_vector.
4650         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4651         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4652         cleanups.
4653         (find_command): Update.
4654
4655 2017-09-11  Tom Tromey  <tom@tromey.com>
4656
4657         * cli/cli-script.c (class scoped_restore_hook_in): New.
4658         (clear_hook_in_cleanup): Remove.
4659         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4660         scoped_restore_hook_in.
4661
4662 2017-09-11  Tom Tromey  <tom@tromey.com>
4663
4664         * cli/cli-script.c (restore_interp): Remove.
4665         (read_command_lines): Use scoped_restore_interp.
4666         * interps.c (scoped_restore_interp::set_temp): Rename from
4667         interp_set_temp.
4668         * interps.h (class scoped_restore_interp): New.
4669         (interp_set_temp): Remove.
4670
4671 2017-09-11  Tom Tromey  <tom@tromey.com>
4672
4673         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4674         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4675         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4676         scoped_restore.
4677         (mi_cmd_break_insert_1): Update.
4678         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4679         scoped_restore.
4680
4681 2017-09-11  Tom Tromey  <tom@tromey.com>
4682
4683         * demangle.c (demangle_command): Update.
4684         * breakpoint.c (disable_command): Update.
4685         (enable_command): Update.
4686         (find_location_by_number): Make "number" const.  Use
4687         get_number_trailer.
4688         * cli/cli-utils.c (extract_arg): Return std::string.
4689         * probe.c (parse_probe_linespec): Update.  Change types.
4690         (collect_probes): Take string arguments.
4691         (parse_probe_linespec): Likewise.
4692         (info_probes_for_ops): Update.
4693         (enable_probes_command): Update.
4694         (disable_probes_command): Update.
4695         * break-catch-sig.c (catch_signal_split_args): Update.
4696         * mi/mi-parse.c (mi_parse): Update.
4697
4698 2017-09-11  Tom Tromey  <tom@tromey.com>
4699
4700         * language.h (language_enum): Make argument const.
4701         * language.c (language_enum): Make argument const.
4702
4703 2017-09-11  Tom Tromey  <tom@tromey.com>
4704
4705         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4706         as function.
4707         (skip_to_space): Rename from skip_to_space_const.
4708         * common/common-utils.c (skip_to_space): New function.
4709         (skip_to_space): Rename from skip_to_space_const.
4710         * cli/cli-utils.h (get_number): Rename from get_number_const.
4711         (extract_arg): Rename from extract_arg_const.
4712         * cli/cli-utils.c (get_number): Rename from get_number_const.
4713         (extract_arg): Rename from extract_arg_const.
4714         (number_or_range_parser::get_number): Use ::get_number.
4715         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4716         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4717         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4718         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4719         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4720         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4721         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4722         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4723
4724 2017-09-11  Tom Tromey  <tom@tromey.com>
4725
4726         * python/python.c (do_start_initialization): Use
4727         py-event-types.def to initialize types.
4728         Define all object type structures.
4729         * python/python-internal.h: Don't declare event initialization
4730         functions.
4731         * python/py-threadevent.c (thread_event_object_type): Don't
4732         define.
4733         * python/py-stopevent.c (stop_event_object_type): Don't define.
4734         * python/py-signalevent.c (signal_event_object_type): Don't
4735         declare or define.
4736         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4737         (clear_objfiles_event_object_type): Don't declare or define.
4738         * python/py-infevents.c (inferior_call_pre_event_object_type)
4739         (inferior_call_post_event_object_type)
4740         (register_changed_event_object_type)
4741         (memory_changed_event_object_type): Don't declare or define.
4742         * python/py-inferior.c (new_thread_event_object_type)
4743         (new_inferior_event_object_type)
4744         (inferior_deleted_event_object_type): Don't declare or define.
4745         * python/py-exitedevent.c (exited_event_object_type): Don't
4746         declare or define.
4747         * python/py-evts.c (gdbpy_initialize_py_events): Use
4748         py-all-events.def.
4749         * python/py-events.h (thread_event_object_type): Don't declare.
4750         (events_object): Use py-all-events.def.
4751         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4752         py-event-types.def.
4753         * python/py-event-types.def: New file.
4754         * python/py-continueevent.c (create_continue_event_object): Don't
4755         declare or define.
4756         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4757         declare or define.
4758         * python/py-all-events.def: New file.
4759
4760 2017-09-11  Tom Tromey  <tom@tromey.com>
4761
4762         * python/py-threadevent.c (create_thread_event_object): Return
4763         gdbpy_ref.
4764         * python/py-stopevent.h (create_stop_event_object)
4765         (create_breakpoint_event_object, create_signal_event_object):
4766         Update.
4767         * python/py-stopevent.c (create_stop_event_object): Return
4768         gdbpy_ref.
4769         (emit_stop_event): Update.
4770         * python/py-signalevent.c (create_signal_event_object): Return
4771         gdbpy_ref.
4772         * python/py-infevents.c (create_inferior_call_event_object):
4773         Update.
4774         * python/py-event.h (create_event_object)
4775         (create_thread_event_object): Update.
4776         * python/py-event.c (create_event_object): Return gdbpy_ref.
4777         * python/py-continueevent.c: Return gdbpy_ref.
4778         * python/py-bpevent.c (create_breakpoint_event_object): Return
4779         gdbpy_ref.
4780
4781 2017-09-11  Tom Tromey  <tom@tromey.com>
4782
4783         PR python/15622:
4784         * NEWS: Add entry.
4785         * python/python.c (do_start_initialization): Initialize new event
4786         types.
4787         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4788         (gdbpy_initialize_inferior_deleted_event)
4789         (gdbpy_initialize_new_thread_event): Declare.
4790         * python/py-threadevent.c (create_thread_event_object): Add option
4791         "thread" parameter.
4792         * python/py-inferior.c (new_thread_event_object_type)
4793         (new_inferior_event_object_type)
4794         (inferior_deleted_event_object_type): Declare.
4795         (python_new_inferior, python_inferior_deleted): New functions.
4796         (add_thread_object): Emit new_thread event.
4797         (gdbpy_initialize_inferior): Attach new functions to corresponding
4798         observers.
4799         (new_thread, new_inferior, inferior_deleted): Define new event
4800         types.
4801         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4802         registries.
4803         * python/py-events.h (events_object) <new_inferior,
4804         inferior_deleted, new_thread>: New fields.
4805         * python/py-event.h (create_thread_event_breakpoint): Add optional
4806         "thread" parameter.
4807
4808 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4809
4810         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4811         check current_ui instead.
4812         (internal_vproblem): Likewise.
4813
4814 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4815
4816         * thread.c (print_thread_info_1): Remove unnecessary calls to
4817         uiout->is_mi_like_p.
4818
4819 2017-09-09  Tom Tromey  <tom@tromey.com>
4820
4821         * namespace.h (add_using_directive): Update.
4822         * namespace.c (add_using_directive): Change type of excludes to
4823         std::vector.
4824         * dwarf2read.c (read_import_statement): Use std::vector.
4825         (read_namespace): Update.
4826         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4827
4828 2017-09-09  Tom Tromey  <tom@tromey.com>
4829
4830         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4831
4832 2017-09-09  Tom Tromey  <tom@tromey.com>
4833
4834         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4835
4836 2017-09-09  Tom Tromey  <tom@tromey.com>
4837
4838         * stack.c (func_command): Use gdb::def_vector.
4839
4840 2017-09-09  Tom Tromey  <tom@tromey.com>
4841
4842         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4843         ui_out_emit_list, ui_out_emit_tuple.
4844         (mi_cmd_var_update): Likewise.
4845
4846 2017-09-09  Tom Tromey  <tom@tromey.com>
4847
4848         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4849         ui_out_redirect_pop.
4850         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4851         ui_out_redirect_pop.
4852         * utils.c (do_ui_out_redirect_pop)
4853         (make_cleanup_ui_out_redirect_pop): Remove.
4854         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4855         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4856         * ui-out.h (ui_out_redirect_pop): New class.
4857
4858 2017-09-09  Tom Tromey  <tom@tromey.com>
4859
4860         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4861         (list_available_thread_groups, mi_cmd_list_thread_groups)
4862         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4863         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4864         Likewise.
4865
4866 2017-09-09  Tom Tromey  <tom@tromey.com>
4867
4868         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4869         ui_out_emit_tuple.
4870
4871 2017-09-09  Tom Tromey  <tom@tromey.com>
4872
4873         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4874         * stack.c (print_frame): Use ui_out_emit_tuple.
4875         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4876         (info_spu_mailbox_command, info_spu_dma_command)
4877         (info_spu_proxydma_command): Likewise.
4878         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4879         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4880         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4881         ui_out_emit_tuple.
4882         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4883
4884 2017-09-09  Tom Tromey  <tom@tromey.com>
4885
4886         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4887         (class ui_out_emit_table): Update comment.
4888         * ui-out.c (do_cleanup_table_end)
4889         (make_cleanup_ui_out_table_begin_end): Remove.
4890         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4891         (info_spu_dma_cmdlist): Likewise.
4892         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4893         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4894         ui_out_emit_table.
4895
4896 2017-09-09  Tom Tromey  <tom@tromey.com>
4897
4898         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4899         ui_out_emit_list, gdb::optional.
4900
4901 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4902
4903         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4904         prototype.
4905         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4906         prototype.
4907         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4908         prototype.
4909         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4910         * ada-exp.y: Remove _initialize_ada_exp prototype.
4911         * ada-lang.c: Remove _initialize_ada_language prototype.
4912         * ada-tasks.c: Remove _initialize_tasks prototype.
4913         * addrmap.c: Remove _initialize_addrmap prototype.
4914         * agent.c: Remove _initialize_agent prototype.
4915         * aix-thread.c: Remove _initialize_aix_thread prototype.
4916         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4917         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4918         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4919         prototype.
4920         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4921         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4922         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4923         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4924         prototype.
4925         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4926         prototype.
4927         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4928         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4929         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4930         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4931         prototype.
4932         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4933         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4934         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4935         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4936         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4937         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4938         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4939         prototype.
4940         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4941         prototype.
4942         * annotate.c: Remove _initialize_annotate prototype.
4943         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4944         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4945         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4946         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4947         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4948         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4949         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4950         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4951         prototype.
4952         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4953         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4954         * auto-load.c: Remove _initialize_auto_load prototype.
4955         * auxv.c: Remove _initialize_auxv prototype.
4956         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4957         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4958         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4959         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4960         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4961         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4962         prototype.
4963         * break-catch-throw.c: Remove _initialize_break_catch_throw
4964         prototype.
4965         * breakpoint.c: Remove _initialize_breakpoint prototype.
4966         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4967         * btrace.c: Remove _initialize_btrace prototype.
4968         * charset.c: Remove _initialize_charset prototype.
4969         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4970         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4971         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4972         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4973         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4974         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4975         * coffread.c: Remove _initialize_coffread prototype.
4976         * compile/compile.c: Remove _initialize_compile prototype.
4977         * complaints.c: Remove _initialize_complaints prototype.
4978         * completer.c: Remove _initialize_completer prototype.
4979         * copying.awk: Remove _initialize_copying prototype.
4980         * copying.c: Regenerate.
4981         * core-regset.c: Remove _initialize_core_regset prototype.
4982         * corefile.c: Remove _initialize_core prototype.
4983         * corelow.c: Remove _initialize_corelow prototype.
4984         * cp-abi.c: Remove _initialize_cp_abi prototype.
4985         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4986         * cp-support.c: Remove _initialize_cp_support prototype.
4987         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4988         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4989         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4990         * ctf.c: Remove _initialize_ctf prototype.
4991         * d-lang.c: Remove _initialize_d_language prototype.
4992         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4993         prototype.
4994         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4995         * dbxread.c: Remove _initialize_dbxread prototype.
4996         * dcache.c: Remove _initialize_dcache prototype.
4997         * demangle.c: Remove _initialize_demangler prototype.
4998         * disasm-selftests.c: Remove _initialize_disasm_selftests
4999         prototype.
5000         * disasm.c: Remove _initialize_disasm prototype.
5001         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5002         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5003         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5004         prototype.
5005         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5006         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5007         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5008         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5009         * elfread.c: Remove _initialize_elfread prototype.
5010         * exec.c: Remove _initialize_exec prototype.
5011         * extension.c: Remove _initialize_extension prototype.
5012         * f-lang.c: Remove _initialize_f_language prototype.
5013         * f-valprint.c: Remove _initialize_f_valprint prototype.
5014         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5015         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5016         * filesystem.c: Remove _initialize_filesystem prototype.
5017         * findcmd.c: Remove _initialize_mem_search prototype.
5018         * fork-child.c: Remove _initialize_fork_child prototype.
5019         * frame-base.c: Remove _initialize_frame_base prototype.
5020         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5021         * frame.c: Remove _initialize_frame prototype.
5022         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5023         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5024         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5025         * gcore.c: Remove _initialize_gcore prototype.
5026         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5027         * gdbarch.c: Regenerate.
5028         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5029         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5030         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5031         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5032         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5033         * go-lang.c: Remove _initialize_go_language prototype.
5034         * go32-nat.c: Remove _initialize_go32_nat prototype.
5035         * guile/guile.c: Remove _initialize_guile prototype.
5036         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5037         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5038         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5039         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5040         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5041         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5042         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5043         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5044         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5045         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5046         prototype.
5047         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5048         prototype.
5049         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5050         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5051         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5052         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5053         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5054         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5055         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5056         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5057         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5058         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5059         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5060         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5061         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5062         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5063         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5064         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5065         prototype.
5066         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5067         prototype.
5068         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5069         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5070         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5071         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5072         * infcall.c: Remove _initialize_infcall prototype.
5073         * infcmd.c: Remove _initialize_infcmd prototype.
5074         * inferior.c: Remove _initialize_inferiors prototype.
5075         * inflow.c: Remove _initialize_inflow prototype.
5076         * infrun.c: Remove _initialize_infrun prototype.
5077         * interps.c: Remove _initialize_interpreter prototype.
5078         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5079         * jit.c: Remove _initialize_jit prototype.
5080         * language.c: Remove _initialize_language prototype.
5081         * linux-fork.c: Remove _initialize_linux_fork prototype.
5082         * linux-nat.c: Remove _initialize_linux_nat prototype.
5083         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5084         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5085         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5086         * m2-lang.c: Remove _initialize_m2_language prototype.
5087         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5088         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5089         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5090         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5091         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5092         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5093         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5094         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5095         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5096         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5097         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5098         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5099         * machoread.c: Remove _initialize_machoread prototype.
5100         * macrocmd.c: Remove _initialize_macrocmd prototype.
5101         * macroscope.c: Remove _initialize_macroscope prototype.
5102         * maint.c: Remove _initialize_maint_cmds prototype.
5103         * mdebugread.c: Remove _initialize_mdebugread prototype.
5104         * memattr.c: Remove _initialize_mem prototype.
5105         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5106         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5107         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5108         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5109         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5110         * microblaze-linux-tdep.c: Remove
5111         _initialize_microblaze_linux_tdep prototype.
5112         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5113         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5114         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5115         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5116         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5117         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5118         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5119         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5120         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5121         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5122         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5123         prototype.
5124         * mipsread.c: Remove _initialize_mipsread prototype.
5125         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5126         prototype.
5127         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5128         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5129         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5130         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5131         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5132         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5133         prototype.
5134         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5135         * nto-procfs.c: Remove _initialize_procfs prototype.
5136         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5137         * objc-lang.c: Remove _initialize_objc_language prototype.
5138         * objfiles.c: Remove _initialize_objfiles prototype.
5139         * observer.c: Remove observer_test_first_notification_function,
5140         observer_test_second_notification_function,
5141         observer_test_third_notification_function, and
5142         _initialize_observer prototypes.
5143         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5144         * osabi.c: Remove _initialize_gdb_osabi prototype.
5145         * osdata.c: Remove _initialize_osdata prototype.
5146         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5147         * parse.c: Remove _initialize_parse prototype.
5148         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5149         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5150         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5151         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5152         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5153         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5154         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5155         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5156         * printcmd.c: Remove _initialize_printcmd prototype.
5157         * probe.c: Remove _initialize_probe prototype.
5158         * proc-api.c: Remove _initialize_proc_api prototype.
5159         * proc-events.c: Remove _initialize_proc_events prototype.
5160         * proc-service.c: Remove _initialize_proc_service prototype.
5161         * procfs.c: Remove _initialize_procfs prototype.
5162         * psymtab.c: Remove _initialize_psymtab prototype.
5163         * python/python.c: Remove _initialize_python prototype.
5164         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5165         * record-btrace.c: Remove _initialize_record_btrace prototype.
5166         * record-full.c: Remove _initialize_record_full prototype.
5167         * record.c: Remove _initialize_record prototype.
5168         * regcache.c: Remove _initialize_regcache prototype.
5169         * reggroups.c: Remove _initialize_reggroup prototype.
5170         * remote-notif.c: Remove _initialize_notif prototype.
5171         * remote-sim.c: Remove _initialize_remote_sim prototype.
5172         * remote.c: Remove _initialize_remote prototype.
5173         * reverse.c: Remove _initialize_reverse prototype.
5174         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5175         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5176         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5177         prototype.
5178         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5179         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5180         * rust-exp.y: Remove _initialize_rust_exp prototype.
5181         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5182         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5183         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5184         * score-tdep.c: Remove _initialize_score_tdep prototype.
5185         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5186         prototype.
5187         * ser-go32.c: Remove _initialize_ser_dos prototype.
5188         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5189         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5190         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5191         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5192         * serial.c: Remove _initialize_serial prototype.
5193         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5194         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5195         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5196         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5197         * skip.c: Remove _initialize_step_skip prototype.
5198         * sol-thread.c: Remove _initialize_sol_thread prototype.
5199         * solib-aix.c: Remove _initialize_solib_aix prototype.
5200         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5201         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5202         * solib-frv.c: Remove _initialize_frv_solib prototype.
5203         * solib-spu.c: Remove _initialize_spu_solib prototype.
5204         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5205         * solib-target.c: Remove _initialize_solib_target prototype.
5206         * solib.c: Remove _initialize_solib prototype.
5207         * source.c: Remove _initialize_source prototype.
5208         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5209         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5210         prototype.
5211         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5212         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5213         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5214         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5215         prototype.
5216         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5217         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5218         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5219         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5220         prototype.
5221         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5222         prototype.
5223         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5224         prototype.
5225         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5226         prototype.
5227         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5228         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5229         prototype.
5230         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5231         prototype.
5232         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5233         prototype.
5234         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5235         prototype.
5236         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5237         prototype.
5238         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5239         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5240         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5241         * stabsread.c: Remove _initialize_stabsread prototype.
5242         * stack.c: Remove _initialize_stack prototype.
5243         * stap-probe.c: Remove _initialize_stap_probe prototype.
5244         * std-regs.c: Remove _initialize_frame_reg prototype.
5245         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5246         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5247         * symfile.c: Remove _initialize_symfile prototype.
5248         * symmisc.c: Remove _initialize_symmisc prototype.
5249         * symtab.c: Remove _initialize_symtab prototype.
5250         * target-dcache.c: Remove _initialize_target_dcache prototype.
5251         * target-descriptions.c: Remove _initialize_target_descriptions
5252         prototype.
5253         * thread.c: Remove _initialize_thread prototype.
5254         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5255         prototype.
5256         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5257         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5258         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5259         prototype.
5260         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5261         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5262         * tracefile.c: Remove _initialize_tracefile prototype.
5263         * tracepoint.c: Remove _initialize_tracepoint prototype.
5264         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5265         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5266         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5267         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5268         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5269         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5270         * tui/tui.c: Remove _initialize_tui prototype.
5271         * typeprint.c: Remove _initialize_typeprint prototype.
5272         * user-regs.c: Remove _initialize_user_regs prototype.
5273         * utils.c: Remove _initialize_utils prototype.
5274         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5275         * valarith.c: Remove _initialize_valarith prototype.
5276         * valops.c: Remove _initialize_valops prototype.
5277         * valprint.c: Remove _initialize_valprint prototype.
5278         * value.c: Remove _initialize_values prototype.
5279         * varobj.c: Remove _initialize_varobj prototype.
5280         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5281         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5282         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5283         * windows-nat.c: Remove _initialize_windows_nat,
5284         _initialize_check_for_gdb_ini, and _initialize_loadable
5285         prototypes.
5286         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5287         * xcoffread.c: Remove _initialize_xcoffread prototype.
5288         * xml-support.c: Remove _initialize_xml_support prototype.
5289         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5290         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5291         prototype.
5292         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5293         prototype.
5294         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5295
5296 2017-09-08  Keith Seitz  <keiths@redhat.com>
5297
5298         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5299         field.
5300
5301 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5302
5303         * f-valprint.c (f_val_print): Remove check for one byte
5304         sized integers. Remove printing of character type.
5305
5306 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5307             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5308             Bernhard Heckel  <bernhard.heckel@intel.com>
5309
5310         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5311         to maintain proper indentation when printing pointers/refs.
5312
5313 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5314
5315         GDB 8.0.1 released.
5316
5317 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5318
5319         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5320
5321 2017-09-05  Tom Tromey  <tom@tromey.com>
5322
5323         * parse.c (funcall_chain): Now a std::vector.
5324         (start_arglist, end_arglist): Simplify.
5325         (free_funcalls): Remove.
5326         (parse_exp_in_context_1): Remove cleanup.
5327
5328 2017-09-05  Tom Tromey  <tom@tromey.com>
5329
5330         * go-exp.y (go_parse): Don't create a cleanup.
5331
5332 2017-09-05  Tom Tromey  <tom@tromey.com>
5333
5334         * d-exp.y (PrimaryExpression): Use std::string.
5335         (d_parse): Don't create a cleanup.
5336
5337 2017-09-05  Tom Tromey  <tom@tromey.com>
5338
5339         * utils.c (do_clear_parser_state): Remove.
5340         (make_cleanup_clear_parser_state): Remove.
5341         * p-exp.y (pascal_parse): Use scoped_restore.
5342         * m2-exp.y (m2_parse): Use scoped_restore.
5343         * f-exp.y (f_parse): Use scoped_restore.
5344         * d-exp.y (d_parse): Use scoped_restore.
5345         * c-exp.y (c_parse): Use scoped_restore.
5346         * ada-exp.y (ada_parse): Use scoped_restore.
5347         * utils.h (make_cleanup_clear_parser_state): Remove.
5348
5349 2017-09-06  Keith Seitz  <keiths@redhat.com>
5350
5351         * dwarf2read.c (dw2_linkage_name_attr): New function.
5352         (dw2_linkage_name): New function.
5353         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5354         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5355         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5356
5357 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5358
5359         * config/djgpp/djconfig.sh: Correct shell portability issue.
5360
5361 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5362
5363         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5364
5365 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5366
5367         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5368         * NEWS: Mention new FreeBSD/mips native configuration.
5369         * configure.host: Add aarch64*-*-freebsd*.
5370         * configure.nat: Likewise.
5371         * aarch64-fbsd-nat.c: New file.
5372
5373 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5374
5375         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5376         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5377         * NEWS: Mention new FreeBSD/aarch64 target.
5378         * configure.tgt: Add aarch64*-*-freebsd*.
5379         * aarch64-fbsd-tdep.c: New file.
5380         * aarch64-fbsd-tdep.h: New file.
5381
5382 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5383
5384         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5385
5386 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5387
5388         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5389         of TLS symbols.
5390
5391 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5392
5393         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5394         call.
5395
5396 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5397
5398         * infrun.c (follow_exec): Call add_thread after
5399         target_find_description.
5400
5401 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5402
5403         * infrun.c (handle_inferior_event_1): When exec'ing, read
5404         stop_pc after follow_exec.
5405
5406 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5407
5408         * remote.c (process_g_packet): Update error message.
5409
5410 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5411
5412         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5413         targets.
5414
5415 2017-09-05  Pedro Alves  <palves@redhat.com>
5416
5417         * eval.c (eval_call, evaluate_funcall): New functions, factored
5418         out from ...
5419         (evaluate_subexp_standard): ... this.
5420
5421 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5422
5423         * amd64-tdep.c (amd64_target_description): Create target
5424         descriptions.
5425         (_initialize_amd64_tdep): Don't call functions
5426         initialize_tdesc_amd64_*.  Add self tests.
5427         * arch/amd64.c (amd64_create_target_description): Add parameter
5428         is_linux.  Call set_tdesc_osabi if is_linux is true.
5429         * arch/amd64.h (amd64_create_target_description): Update the
5430         declaration.
5431         * arch/i386.c (i386_create_target_description): Add parameter
5432         is_linux.  Call set_tdesc_osabi if is_linux is true.
5433         * arch/i386.h (i386_create_target_description): Update
5434         declaration.
5435         * configure.tgt: Add i386.o to gdb_target_obs.
5436         * features/Makefile (XMLTOC): Remove i386/*.xml.
5437         * features/i386/amd64-avx-avx512.c: Remove.
5438         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5439         * features/i386/amd64-avx-mpx.c: Remove.
5440         * features/i386/amd64-avx.c: Remove.
5441         * features/i386/amd64-mpx.c: Remove.
5442         * features/i386/amd64.c: Remove.
5443         * features/i386/i386-avx-avx512.c: Remove.
5444         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5445         * features/i386/i386-avx-mpx.c: Remove.
5446         * features/i386/i386-avx.c: Remove.
5447         * features/i386/i386-mmx.c: Remove.
5448         * features/i386/i386-mpx.c: Remove.
5449         * features/i386/i386.c: Remove.
5450         * i386-tdep.c: Don't include features/i386/i386*.c., include
5451         target-descriptions.h and arch/i386.h.
5452         (i386_target_description): Create target descriptions.
5453         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5454         functions.  Do self tests.
5455
5456 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5457
5458         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5459         * features/i386/amd64-avx-avx512-linux.c: Removed.
5460         * features/i386/amd64-avx-linux.c: Removed.
5461         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5462         * features/i386/amd64-avx-mpx-linux.c: Removed.
5463         * features/i386/amd64-linux.c: Removed.
5464         * features/i386/amd64-mpx-linux.c: Removed.
5465         * features/i386/x32-avx-avx512-linux.c: Removed.
5466         * features/i386/x32-avx-linux.c: Removed.
5467         * features/i386/x32-linux.c: Removed.
5468
5469 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5470
5471         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5472         features/i386/*.c.
5473         (amd64_linux_read_description): Call
5474         amd64_create_target_description.
5475         * arch/amd64.c: New file.
5476         * arch/amd64.h: New file.
5477         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5478         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5479
5480 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5481
5482         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5483         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5484         (amd64_linux_read_description): Create target descriptions.
5485         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5486         functions.  Add unit tests.
5487         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5488         x32-core.xml.
5489         * features/i386/64bit-avx.c: Generated.
5490         * features/i386/64bit-avx512.c: Generated.
5491         * features/i386/64bit-core.c: Generated.
5492         * features/i386/64bit-linux.c: Generated.
5493         * features/i386/64bit-mpx.c: Generated.
5494         * features/i386/64bit-pkeys.c: Generated.
5495         * features/i386/64bit-segments.c: Generated.
5496         * features/i386/64bit-sse.c: Generated.
5497         * features/i386/x32-core.c: Generated.
5498         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5499         c files for amd64-linux and x32-linux.
5500
5501 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5502
5503         * amd64-linux-tdep.c (amd64_linux_read_description): New
5504         function.
5505         (amd64_linux_core_read_description): Call
5506         amd64_linux_read_description.
5507         (amd64_linux_init_abi): Likewise.
5508         (amd64_x32_linux_init_abi): Likewise.
5509         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5510         * x86-linux-nat.c (x86_linux_read_description): Call
5511         amd64_linux_read_description.
5512
5513 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5514
5515         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5516         comments.
5517
5518 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5519
5520         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5521         * features/i386/i386-avx-avx512-linux.c: Remove.
5522         * features/i386/i386-avx-linux.c: Remove.
5523         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5524         * features/i386/i386-avx-mpx-linux.c: Remove.
5525         * features/i386/i386-linux.c: Remove.
5526         * features/i386/i386-mmx-linux.c: Remove.
5527         * features/i386/i386-mpx-linux.c: Remove.
5528
5529 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5530
5531         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5532         (SFILES): Add arch/i386.c.
5533         (HFILES_NO_SRCDIR): Add arch/i386.h.
5534         * arch/i386.c: New file.
5535         * arch/i386.h: New file.
5536         * arch/tdesc.h (allocate_target_description): Declare.
5537         (set_tdesc_architecture): Declare.
5538         (set_tdesc_osabi): Declare.
5539         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5540         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5541         include arch/i386.h.
5542         (i386_linux_read_description): Remove code and call
5543         i386_create_target_description.
5544         (set_tdesc_architecture): New function.
5545         (set_tdesc_osabi): New function.
5546         * target-descriptions.h (allocate_target_description): Remove.
5547
5548 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5549
5550         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5551         * target-descriptions.c (tdesc_create_feature): Likewise, and
5552         adjust code.
5553         * features/i386/32bit-avx.c: Re-generated.
5554         * features/i386/32bit-avx512.c: Re-generated.
5555         * features/i386/32bit-core.c: Re-generated.
5556         * features/i386/32bit-linux.c: Re-generated.
5557         * features/i386/32bit-mpx.c: Re-generated.
5558         * features/i386/32bit-pkeys.c: Re-generated.
5559         * features/i386/32bit-sse.c: Re-generated.
5560
5561 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5562
5563         * regformats/regdef.h (struct reg): Override operator == and !=.
5564
5565 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5566
5567         * arch/tdesc.h: New file.
5568         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5569         * target-descriptions.c: Update comments.
5570         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5571         declarations.
5572         * features/i386/32bit-avx.c: Re-generated.
5573         * features/i386/32bit-avx512.c: Re-generated.
5574         * features/i386/32bit-core.c: Re-generated.
5575         * features/i386/32bit-linux.c: Re-generated.
5576         * features/i386/32bit-mpx.c: Re-generated.
5577         * features/i386/32bit-pkeys.c: Re-generated.
5578         * features/i386/32bit-sse.c: Re-generated.
5579
5580 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5581
5582         * regformats/regdat.sh: Update generated code.
5583
5584 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5585
5586         * regformats/regdat.sh: Adjust code order.
5587
5588 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5589
5590         * expprint.c (dump_subexp_body_standard): Use constant format
5591         string in fprintf_filtered call.
5592
5593 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5594
5595         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5596         NetBSD/i386.
5597         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5598
5599 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5600
5601         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5602
5603 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5604
5605         * bsd-kvm.o: Define _KMEMUSER.
5606         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5607         * configure: Regenerate.
5608
5609 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5610
5611         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5612         * i386-fbsd-nat.c: Likewise.
5613
5614 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5615
5616         * unittests/array-view-selftests.c: Add include of <array>.
5617
5618 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5619
5620         * spu-tdep.c (flush_ea_cache): Add missing argument to
5621         call_function_by_hand.
5622
5623 2017-09-04  Pedro Alves  <palves@redhat.com>
5624
5625         * NEWS (Safer support for debugging with no debug info): New.
5626
5627 2017-09-04  Pedro Alves  <palves@redhat.com>
5628
5629         * c-exp.y (function_method, function_method_void): Add current
5630         instance flags to TYPE_INSTANCE.
5631         * dwarf2read.c (check_modifier): New.
5632         (compute_delayed_physnames): Assert that only C++ adds delayed
5633         physnames.  Mark fn_fields as const/volatile depending on
5634         physname.
5635         * eval.c (make_params): New type_instance_flags parameter.  Use
5636         it as the new type's instance flags.
5637         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5638         flags element and pass it to make_params.
5639         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5640         instance flags element.
5641         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5642         * gdbtypes.h: Include "enum-flags.h".
5643         (type_instance_flags): New enum-flags type.
5644         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5645         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5646         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5647         (follow_type_instance_flags): New function.
5648         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5649         * parser-defs.h (follow_type_instance_flags): Declare.
5650         * valops.c (value_struct_elt_for_reference): const/volatile must
5651         match too.
5652
5653 2017-09-04  Pedro Alves  <palves@redhat.com>
5654
5655         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5656         function/method scopes; lookup the nested name as a function local
5657         static variable.
5658
5659 2017-09-04  Pedro Alves  <palves@redhat.com>
5660
5661         (%type <voidval>): Add function_method.
5662         * c-exp.y (exp): New production for calls with no arguments.
5663         (function_method, function_method_void_or_typelist): New
5664         productions.
5665         (exp): New production for "method()::static_var".
5666         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5667         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5668         Handle OP_FUNC_STATIC_VAR.
5669         * parse.c (operator_length_standard):
5670         Handle OP_FUNC_STATIC_VAR.
5671
5672 2017-09-04  Pedro Alves  <palves@redhat.com>
5673
5674         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5675         handling.
5676         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5677         Ditto.
5678         * parse.c (operator_length_standard, operator_check_standard):
5679         Ditto.
5680         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5681
5682 2017-09-04  Pedro Alves  <palves@redhat.com>
5683
5684         * ax-gdb.c: Include "typeprint.h".
5685         (gen_expr_for_cast): New function.
5686         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5687         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5688         type is unknown.
5689         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5690         nodebug_data_symbol.
5691         * eval.c: Include "typeprint.h".
5692         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5693         Error out if symbol has unknown type.
5694         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5695         evaluate_subexp_for_cast.
5696         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5697         OP_VAR_MSYM_VALUE.
5698         (evaluate_subexp_for_cast): New function.
5699         * gdbtypes.c (init_nodebug_var_type): New function.
5700         (objfile_type): Use it to initialize types of variables with no
5701         debug info.
5702         * typeprint.c (error_unknown_type): New.
5703         * typeprint.h (error_unknown_type): New declaration.
5704         * compile/compile-c-types.c (convert_type_basic): Handle
5705         TYPE_CODE_ERROR; warn and fallback to int for variables with
5706         unknown type.
5707
5708 2017-09-04  Pedro Alves  <palves@redhat.com>
5709
5710         * eval.c (evaluate_var_value): New function, factored out from ...
5711         (evaluate_subexp_standard): ... here.
5712
5713 2017-09-04  Pedro Alves  <palves@redhat.com>
5714
5715         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5716         Remove useless assignments to 'op'.
5717
5718 2017-09-04  Pedro Alves  <palves@redhat.com>
5719
5720         * eval.c (eval_skip_value): New function.
5721         (evaluate_subexp_standard): Use it.
5722
5723 2017-09-04  Pedro Alves  <palves@redhat.com>
5724
5725         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5726         function name from symbol/minsym and pass it to
5727         error_call_unknown_return_type.
5728
5729 2017-09-04  Pedro Alves  <palves@redhat.com>
5730
5731         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5732         * ax-gdb.c (gen_msym_var_ref): New function.
5733         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5734         * eval.c (evaluate_var_msym_value): New function.
5735         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5736         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5737         to call_function_by_hand.
5738         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5739         Handle OP_VAR_MSYM_VALUE.
5740         (union exp_element) <msymbol>: New field.
5741         * minsyms.h (struct type): Forward declare.
5742         (find_minsym_type_and_address): Declare.
5743         * parse.c (write_exp_elt_msym): New function.
5744         (write_exp_msymbol): Delete, refactored as ...
5745         (find_minsym_type_and_address): ... this new function.
5746         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5747         (operator_length_standard, operator_check_standard): Handle
5748         OP_VAR_MSYM_VALUE.
5749         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5750
5751 2017-09-04  Pedro Alves  <palves@redhat.com>
5752
5753         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5754         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5755         unknown.
5756         * ada-typeprint.c (print_func_type): Handle functions with unknown
5757         return type.
5758         * c-typeprint.c (c_type_print_base): Handle functions and methods
5759         with unknown return type.
5760         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5761         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5762         * compile/compile-c-types.c: Include "objfiles.h".
5763         (convert_func): For functions with unknown return type, warn and
5764         default to int.
5765         * compile/compile-object-run.c (compile_object_run): Adjust call
5766         to call_function_by_hand_dummy.
5767         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5768         call_function_by_hand.
5769         * eval.c (evaluate_subexp_standard): Adjust calls to
5770         call_function_by_hand.  Handle functions and methods with unknown
5771         return type.  Pass expect_type to call_function_by_hand.
5772         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5773         return type.
5774         * gcore.c (call_target_sbrk): Adjust call to
5775         call_function_by_hand.
5776         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5777         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5778         an integer address type instead of nodebug.
5779         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5780         call_function_by_hand.
5781         * infcall.c (error_call_unknown_return_type): New function.
5782         (call_function_by_hand): New "default_return_type" parameter.
5783         Pass it down.
5784         (call_function_by_hand_dummy): New "default_return_type"
5785         parameter.  Use it instead of defaulting to int.  If there's no
5786         default and the return type is unknown, throw an error.  If
5787         there's a default return type, and the called function has no
5788         debug info, then assume the function is prototyped.
5789         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5790         New "default_return_type" parameter.
5791         (error_call_unknown_return_type): New declaration.
5792         * linux-fork.c (call_lseek): Cast return type of lseek.
5793         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5794         call_function_by_hand.
5795         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5796         calls to call_function_by_hand.
5797         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5798         return type.
5799         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5800         (value_nsstring, print_object_command): Adjust calls to
5801         call_function_by_hand.
5802         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5803         functions with unknown return type.
5804         (pascal_type_print_func_varspec_suffix): New function.
5805         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5806         TYPE_CODE_METHOD>: Use it.
5807         * python/py-value.c (valpy_call): Adjust call to
5808         call_function_by_hand.
5809         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5810         call_function_by_hand.
5811         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5812         call_function_by_hand.
5813         * valops.c (value_allocate_space_in_inferior): Adjust call to
5814         call_function_by_hand.
5815         * typeprint.c (type_print_unknown_return_type): New function.
5816         * typeprint.h (type_print_unknown_return_type): New declaration.
5817
5818 2017-09-04  Pedro Alves  <palves@redhat.com>
5819
5820         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5821         types with more than one parameter as prototyped.
5822
5823 2017-09-04  Pedro Alves  <palves@redhat.com>
5824
5825         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5826         (disassemble_command): Use gdb_disassembly_flags instead of bare
5827         int.
5828         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5829         (dump_insns, do_mixed_source_and_assembly_deprecated)
5830         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5831         Use gdb_disassembly_flags instead of bare int.
5832         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5833         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5834         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5835         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5836         (enum gdb_disassembly_flag): ... values of this new enumeration.
5837         (gdb_disassembly_flags): Define.
5838         (gdb_disassembly)
5839         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5840         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5841         gdb_disassembly_flags instead of bare int.
5842         * record-btrace.c (btrace_insn_history)
5843         (record_btrace_insn_history, record_btrace_insn_history_range)
5844         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5845         instead of bare int.
5846         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5847         Use gdb_disassembly_flags instead of bare int.
5848         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5849         Define.
5850         * target-delegates.c: Regenerate.
5851         * target.c (target_insn_history, target_insn_history_from)
5852         (target_insn_history_range): Use gdb_disassembly_flags instead of
5853         bare int.
5854         * target.h: Include "disasm.h".
5855         (struct target_ops) <to_insn_history, to_insn_history_from,
5856         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5857         int.
5858         (target_insn_history, target_insn_history_from)
5859         (target_insn_history_range): Use gdb_disassembly_flags instead of
5860         bare int.
5861
5862 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5863
5864         * cli/cli-script.c (build_command_line): For if/while commands,
5865         check whether args is empty.
5866
5867 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5868
5869         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5870         (enum command_control_type): Likewise.
5871         (struct command_line): Likewise.
5872         (free_command_lines): Likewise.
5873         (struct command_lines_deleter): Likewise.
5874         (command_line_up): Likewise.
5875         (read_command_lines): Likewise.
5876         (read_command_lines_1): Likewise.
5877         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5878         (enum command_control_type): Likewise.
5879         (struct command_line): Likewise.
5880         (free_command_lines): Likewise.
5881         (struct command_lines_deleter): Likewise.
5882         (command_line_up): Likewise.
5883         (read_command_lines): Likewise.
5884         (read_command_lines_1): Likewise.
5885         * breakpoint.h: Include cli/cli-script.h.
5886         * extension-priv.h: Likewise.
5887         * gdbcmd.h: Likewise.
5888
5889 2017-09-04  Pedro Alves  <palves@redhat.com>
5890
5891         * ada-lang.c (is_known_support_routine): Move sal declaration to
5892         where it is initialized.
5893         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5894         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5895         (clear_command, update_static_tracepoint): Remove init_sal
5896         references.  Move declarations closer to initializations.
5897         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5898         initializations.
5899         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5900         references.  Move sal declarations closer to initializations.
5901         * frame.c (find_frame_sal): Return a symtab_and_line via function
5902         return instead of output parameter.  Remove init_sal references.
5903         * frame.h (find_frame_sal): Return a symtab_and_line via function
5904         return instead of output parameter.
5905         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5906         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5907         instead of memset.
5908         (gdbscm_find_pc_line): Remove init_sal reference.
5909         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5910         references.  Move declarations closer to initializations.
5911         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5912         initializations.
5913         (finish_backward): Remove init_sal references.  Move declarations
5914         closer to initializations.
5915         * infrun.c (process_event_stop_test, handle_step_into_function)
5916         (insert_hp_step_resume_breakpoint_at_frame)
5917         (insert_step_resume_breakpoint_at_caller): Likewise.
5918         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5919         (symbol_to_sal): Likewise.
5920         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5921         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5922         to its initialization.
5923         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5924         init_sal references.  Move declarations closer to initializations.
5925         * source.c (get_current_source_symtab_and_line): Remove brace
5926         initialization.
5927         (set_current_source_symtab_and_line): Now takes the sal by const
5928         reference.  Remove brace initialization.
5929         (line_info): Remove init_sal reference.
5930         * source.h (set_current_source_symtab_and_line): Now takes a
5931         symtab_and_line via const reference.
5932         * stack.c (set_current_sal_from_frame): Adjust.
5933         (print_frame_info): Adjust.
5934         (get_last_displayed_sal): Return the sal via function return
5935         instead of via output parameter.  Simplify.
5936         (frame_info): Adjust.
5937         * stack.h (get_last_displayed_sal): Return the sal via function
5938         return instead of via output parameter.
5939         * symtab.c (init_sal): Delete.
5940         (find_pc_sect_line): Remove init_sal references.  Move
5941         declarations closer to initializations.
5942         (find_function_start_sal): Remove init_sal references.  Move
5943         declarations closer to initializations.
5944         * symtab.h (struct symtab_and_line): In-class initialize all
5945         fields.
5946         * tracepoint.c (set_traceframe_context)
5947         (print_one_static_tracepoint_marker): Remove init_sal references.
5948         Move declarations closer to initializations.
5949         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5950         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5951         declarations closer to initializations.
5952         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5953         init_sal references.  Adjust.
5954
5955 2017-09-04  Pedro Alves  <palves@redhat.com>
5956
5957         * ax-gdb.c (agent_command_1): Use range-for.
5958         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5959         * breakpoint.c: Include "common/array-view.h".
5960         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5961         parameter from struct symtabs_and_lines to
5962         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5963         (breakpoint_sals_to_pc): Change sals parameter from struct
5964         symtabs_and_lines to std::vector reference.
5965         (check_fast_tracepoint_sals): Change sals parameter from struct
5966         symtabs_and_lines to std::array_view.  Use range-for.
5967         (decode_static_tracepoint_spec): Return a std::vector instead of
5968         symtabs_and_lines.  Update.
5969         (create_breakpoint): Update.
5970         (break_range_command, until_break_command, clear_command): Update.
5971         (base_breakpoint_decode_location, bkpt_decode_location)
5972         (bkpt_probe_create_sals_from_location)
5973         (bkpt_probe_decode_location, tracepoint_decode_location)
5974         (tracepoint_probe_decode_location)
5975         (strace_marker_create_sals_from_location): Return a std::vector
5976         instead of symtabs_and_lines.
5977         (strace_marker_create_breakpoints_sal): Update.
5978         (strace_marker_decode_location): Return a std::vector instead of
5979         symtabs_and_lines.  Update.
5980         (update_breakpoint_locations): Change struct symtabs_and_lines
5981         parameters to gdb::array_view.  Adjust.
5982         (location_to_sals): Return a std::vector instead of
5983         symtabs_and_lines.  Update.
5984         (breakpoint_re_set_default): Use std::vector instead of struct
5985         symtabs_and_lines.
5986         (decode_location_default): Return a std::vector instead of
5987         symtabs_and_lines.  Update.
5988         * breakpoint.h: Include "common/array-view.h".
5989         (struct breakpoint_ops) <decode_location>: Now returns a
5990         std::vector instead of returning a symtabs_and_lines via output
5991         parameter.
5992         (update_breakpoint_locations): Change sals parameters to use
5993         gdb::array_view.
5994         * cli/cli-cmds.c (edit_command, list_command): Update to use
5995         std::vector and gdb::array_view.
5996         (ambiguous_line_spec): Adjust to use gdb::array_view and
5997         range-for.
5998         (compare_symtabs): Rename to ...
5999         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6000         const reference and adjust.
6001         (filter_sals): Rewrite using std::vector and standard algorithms.
6002         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6003         (jump_command): Update to use std::vector.
6004         * linespec.c (struct linespec_state) <canonical_names>: Update
6005         comment.
6006         (add_sal_to_sals_basic): Delete.
6007         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6008         (decode_line_2, create_sals_line_offset)
6009         (convert_address_location_to_sals, convert_linespec_to_sals)
6010         (convert_explicit_location_to_sals, parse_linespec)
6011         (event_location_to_sals, decode_line_full, decode_line_1)
6012         (decode_line_with_current_source)
6013         (decode_line_with_last_displayed, decode_objc)
6014         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6015         (linespec_result::~linespec_result): Adjust to use std::vector
6016         instead of symtabs_and_lines.
6017         * linespec.h (linespec_sals::sals): Now a std::vector.
6018         (struct linespec_result): Use std::vector, bool, and in-class
6019         initialization.
6020         (decode_line_1, decode_line_with_current_source)
6021         (decode_line_with_last_displayed): Return std::vector.
6022         * macrocmd.c (info_macros_command): Use std::vector.
6023         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6024         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6025         std::vector.
6026         * probe.h (parse_probes): Return a std::vector.
6027         * python/python.c (gdbpy_decode_line): Use std::vector and
6028         gdb::array_view.
6029         * source.c (select_source_symtab, line_info): Use std::vector.
6030         * stack.c (func_command): Use std::vector.
6031         * symtab.h (struct symtabs_and_lines): Delete.
6032         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6033
6034 2017-09-04  Pedro Alves  <palves@redhat.com>
6035
6036         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6037         unittests/array-view-selftests.c.
6038         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6039         * common/array-view.h: New file.
6040         * unittests/array-view-selftests.c: New file.
6041
6042 2017-09-04  Pedro Alves  <palves@redhat.com>
6043
6044         * cli/cli-cmds.c (edit_command): Pass message to
6045         ambiguous_line_spec.
6046         (list_command): Pass message to ambiguous_line_spec.  Say
6047         "first"/"last" instead of "start" and "end" to be consistent with
6048         the manual.
6049         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6050         them to print formatted message.
6051
6052 2017-09-04  Pedro Alves  <palves@redhat.com>
6053
6054         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6055         ftrace_update_insns by reference instead of pointer.
6056
6057 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6058
6059         * i386-go32-tdep.c: Include x86-xstate.h.
6060         (i386_go32_init_abi): Call i386_target_description.
6061         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6062         if xcr0 is X86_XSTATE_X87_MASK.
6063         * i386-tdep.h (tdesc_i386): Remove the declaration.
6064         (tdesc_i386_mmx): Likewise.
6065
6066 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6067
6068         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6069         X86_XSTATE_SSE_MASK instead of 0.
6070
6071 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6072
6073         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6074         i386_target_description.
6075         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6076         i386_target_description.
6077         * i386-tdep.c (i386_gdbarch_init): Likewise.
6078
6079 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6080
6081         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6082         (x86_darwin_init_abi_64): Call amd64_target_description.
6083         * amd64-dicos-tdep.c: Likewise.
6084         * amd64-fbsd-nat.c: Likewise.
6085         * amd64-fbsd-tdep.c: Likewise.
6086         * amd64-nbsd-tdep.c: Likewise.
6087         * amd64-obsd-tdep.c: Likewise.
6088         * amd64-sol2-tdep.c: Likewise.
6089         * amd64-windows-tdep.c: Likewise.
6090         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6091
6092 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6093
6094         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6095         (btrace_function) <insn>: Change type to use std::vector.
6096         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6097         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6098         ftrace_update_insns, ftrace_compute_global_level_offset,
6099         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6100         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6101         change to std::vector.
6102         (ftrace_update_insns): Adjust to change to std::vector, change
6103         type of INSN parameter.
6104         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6105         * record-btrace.c (btrace_call_history_insn_range,
6106         btrace_compute_src_line_range,
6107         record_btrace_frame_prev_register): Adjust to change to
6108         std::vector.
6109         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6110         to change to std::vector.
6111
6112 2017-09-03  Tom Tromey  <tom@tromey.com>
6113
6114         * corefile.c (reopen_exec_file): Use std::string.
6115
6116 2017-09-03  Tom Tromey  <tom@tromey.com>
6117
6118         * compile/compile.c (compile_register_name_mangled): Return
6119         std::string.
6120         * compile/compile-loc2c.c (pushf_register_address): Update.
6121         (pushf_register): Update.
6122         * compile/compile-c-types.c (convert_array): Update.
6123         * compile/compile-c-symbols.c (generate_vla_size): Update.
6124         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6125         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6126         (convert_one_symbol): Update.
6127         (generate_c_for_for_one_variable): Update.
6128         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6129         std::string.
6130         (generate_register_struct): Update.
6131         * compile/compile-internal.h (c_get_range_decl_name): Return a
6132         std::string.
6133         (compile_register_name_mangled): Return std::string.
6134
6135 2017-09-03  Tom Tromey  <tom@tromey.com>
6136
6137         * utils.c (perror_string): Return a std::string.
6138         (throw_perror_with_name, perror_warning_with_name): Update.
6139
6140 2017-09-03  Tom Tromey  <tom@tromey.com>
6141
6142         * demangle.c (demangle_command): Use std::string,
6143         unique_xmalloc_ptr.
6144
6145 2017-09-03  Tom Tromey  <tom@tromey.com>
6146
6147         * cli/cli-setshow.c (do_set_command): Use std::string.
6148
6149 2017-09-03  Tom Tromey  <tom@tromey.com>
6150
6151         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6152
6153 2017-09-03  Tom Tromey  <tom@tromey.com>
6154
6155         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6156
6157 2017-09-03  Tom Tromey  <tom@tromey.com>
6158
6159         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6160         gdb::unique_xmalloc_ptr.
6161
6162 2017-09-03  Tom Tromey  <tom@tromey.com>
6163
6164         * thread.c (print_thread_info_1): Use string_printf.
6165         (thread_apply_command, thread_apply_all_command): Use
6166         std::string.
6167
6168 2017-09-03  Tom Tromey  <tom@tromey.com>
6169
6170         * valprint.c (val_print_string): Update.
6171         * gdbcore.h (memory_error_message): Return std::string.
6172         * corefile.c (memory_error_message): Return std::string.
6173         (memory_error): Update.
6174         * breakpoint.c (insert_bp_location): Update.
6175
6176 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6177
6178         * target/waitstatus.h (target_waitstatus_to_string): Change
6179         return type to std::string.
6180         * target/waitstatus.c (target_waitstatus_to_string): Return
6181         std::string.
6182         * target.h (target_waitstatus_to_string): Remove declaration.
6183         * infrun.c (resume, clear_proceed_status_thread,
6184         print_target_wait_results, do_target_wait, save_waitstatus,
6185         stop_all_threads): Adjust.
6186         * record-btrace.c (record_btrace_wait): Adjust.
6187         * target-debug.h
6188         (target_debug_print_struct_target_waitstatus_p): Adjust.
6189
6190 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6191
6192         PR gdb/22046
6193         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6194         detection.
6195
6196 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6197
6198         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6199         for setting/unsetting environment variables on the remote target.
6200         (New remote packets): Add entries for QEnvironmentHexEncoded,
6201         QEnvironmentUnset and QEnvironmentReset.
6202         * common/environ.c (gdb_environ::operator=): Extend method to
6203         handle m_user_set_env_list and m_user_unset_env_list.
6204         (gdb_environ::clear): Likewise.
6205         (match_var_in_string): Change type of first parameter from 'char
6206         *' to 'const char *'.
6207         (gdb_environ::set): Extend method to handle
6208         m_user_set_env_list and m_user_unset_env_list.
6209         (gdb_environ::unset): Likewise.
6210         (gdb_environ::clear_user_set_env): New method.
6211         (gdb_environ::user_set_envp): Likewise.
6212         (gdb_environ::user_unset_envp): Likewise.
6213         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6214         m_user_unset_env_list on move constructor/assignment.
6215         (unset): Add new default parameter 'update_unset_list = true'.
6216         (clear_user_set_env): New method.
6217         (user_set_envp): Likewise.
6218         (user_unset_envp): Likewise.
6219         (m_user_set_env_list): New std::set.
6220         (m_user_unset_env_list): Likewise.
6221         * common/rsp-low.c (hex2str): New function.
6222         (bin2hex): New overload for bin2hex function.
6223         * common/rsp-low.c (hex2str): New prototype.
6224         (str2hex): New overload prototype.
6225         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6226         QEnvironmentUnset and QEnvironmentReset.
6227         (remote_protocol_features): Add QEnvironmentHexEncoded,
6228         QEnvironmentUnset and QEnvironmentReset packets.
6229         (send_environment_packet): New function.
6230         (extended_remote_environment_support): Likewise.
6231         (extended_remote_create_inferior): Call
6232         extended_remote_environment_support.
6233         (_initialize_remote): Add QEnvironmentHexEncoded,
6234         QEnvironmentUnset and QEnvironmentReset packet configs.
6235         * unittests/environ-selftests.c (gdb_selftest_env_var):
6236         New variable.
6237         (test_vector_initialization): New function.
6238         (test_init_from_host_environ): Likewise.
6239         (test_reinit_from_host_environ): Likewise.
6240         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6241         Likewise.
6242         (test_unset_set_empty_vector): Likewise.
6243         (test_vector_clear): Likewise.
6244         (test_std_move): Likewise.
6245         (test_move_constructor):
6246         (test_self_move): Likewise.
6247         (test_set_unset_reset): Likewise.
6248         (run_tests): Rewrite in terms of the functions above.
6249
6250 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6251
6252         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6253         (adi_available): Use a temp variable of type CORE_ADDR as argument
6254         3 when calling target_auxv_search.
6255         (adi_normalize_address): Use masks and xor operators to calculate
6256         normalized address.
6257         (adi_read_versions, adi_write_versions, adi_print_versions)
6258         (do_examine, do_assign): Use paddress.
6259
6260 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6261
6262         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6263         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6264         out of loop and add supply of FIR.
6265         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6266         add collect of FIR.
6267
6268 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6269
6270         PR gdb/21827
6271         * cli/cli-script.c (define_command): Don't convert command name
6272         to lower case.
6273
6274 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6275
6276         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6277         Update all callers accordingly. Remove all code blocks handling
6278         the case where DISPP is not NULL.
6279
6280 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6281
6282         PR symtab/22003
6283         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6284         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6285         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6286
6287 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6288
6289         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6290         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6291         (read_comp_units_from_section): New parameter abbrev_section, use
6292         read_and_check_comp_unit_head, allocate signatured_type if needed.
6293         (create_all_comp_units): Update read_comp_units_from_section caller.
6294
6295 2017-08-23  Pedro Alves  <palves@redhat.com>
6296
6297         PR remote/21852
6298         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6299         to null_ptid and switch to thread without reading the registers
6300         after adding the inferior.
6301
6302 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6303
6304         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6305         compile-gcc.
6306         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6307         (compile_to_object): Implement compile_gcc.
6308         (_initialize_compile): Install "set compile-gcc".  Initialize
6309         compile_gcc.
6310
6311 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6312
6313         * compile/compile.c (compile_to_object): Conditionally call
6314         set_verbose.  Conditionally call compile or compile_v0.
6315
6316 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6317
6318         * sparc64-tdep.h: (adi_normalize_address): New export.
6319         * sparc-nat.h: (open_adi_tag_fd): New export.
6320         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6321         * sparc64-linux-tdep.c:
6322         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6323         (sparc64_linux_handle_segmentation_fault): New function.
6324         (sparc64_linux_init_abi): Register
6325         sparc64_linux_handle_segmentation_fault
6326         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6327         (sparc64_addr_bits_remove): New function.
6328         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6329         (MAX_PROC_NAME_SIZE): New macro.
6330         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6331         (sparc64adilist): New variable.
6332         (adi_proc_list): New variable.
6333         (find_adi_info): New function.
6334         (add_adi_info): New function.
6335         (get_adi_info_proc): New function.
6336         (get_adi_info): New function.
6337         (info_adi_command): New function.
6338         (read_maps_entry): New function.
6339         (adi_available): New function.
6340         (adi_normalize_address): New function.
6341         (adi_align_address): New function.
6342         (adi_convert_byte_count): New function.
6343         (adi_tag_fd): New function.
6344         (adi_is_addr_mapped): New function.
6345         (adi_read_versions): New function.
6346         (adi_write_versions): New function.
6347         (adi_print_versions): New function.
6348         (do_examine): New function.
6349         (do_assign): New function.
6350         (adi_examine_command): New function.
6351         (adi_assign_command): New function.
6352         (_initialize_sparc64_adi_tdep): New function.
6353
6354 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6355
6356         * breakpoint.c (breakpoints_info): Rename to ...
6357         (info_breakpoints_command): ... this.
6358         (watchpoints_info): Rename to ...
6359         (info_watchpoints_command): ... this.
6360         (tracepoints_info): Rename to ...
6361         (info_tracepoints_command): ... this.
6362         (_initialize_breakpoint): Adjust.
6363         * dcache.c (dcache_info): Rename to ...
6364         (info_display_command): ... this.
6365         (_initialize_dcache): Adjust.
6366         * frame.h (args_info): Rename to ...
6367         (info_args_command): ... this.
6368         (locals_info): Rename to ...
6369         (info_locals_command): ... this.
6370         * infcmd.c (nofp_registers_info): Rename to ...
6371         (info_registers_command): ... this.
6372         (float_info): Rename to ...
6373         (info_float_command): ... this.
6374         (program_info): Rename to ...
6375         (info_program_command): ... this.
6376         (all_registers_info): Rename to ...
6377         (info_all_registers_command): ... this.
6378         (vector_info): Rename to ...
6379         (info_vector_command): ... this.
6380         (float_info): Rename to ...
6381         (info_float_command): ... this.
6382         (_initialize_infcmd): Adjust.
6383         * inferior.h (term_info): Rename to ...
6384         (info_terminal_command): ... this.
6385         * inflow.c (term_info): Rename to ...
6386         (info_terminal_command): ... this.
6387         (_initialize_inflow): Adjust.
6388         * infrun.c (signals_info): Rename to ...
6389         (info_signals_command): ... this.
6390         (_initialize_infrun): Adjust.
6391         * objc-lang.c (classes_info): Rename to ...
6392         (info_classes_command): ... this.
6393         (selectors_info): Rename to ...
6394         (info_selectors_command): ... this.
6395         (_initialize_objc_language): Adjust.
6396         * printcmd.c (sym_info): Rename to ...
6397         (info_symbol_command): ... this.
6398         (address_info): Rename to ...
6399         (info_address_command): ... this.
6400         (display_info): Rename to ...
6401         (info_display_command): ... this.
6402         (_initialize_printcmd): Adjust.
6403         * reverse.c (bookmarks_info): Rename to ...
6404         (info_breakpoints_command): ... this.
6405         (_initialize_reverse): Adjust.
6406         * ser-go32.c (dos_info): Rename to ...
6407         (info_serial_command): ... this.
6408         (_initialize_ser_dos): Adjust.
6409         * skip.c (skip_info): Rename to ...
6410         (info_skip_command): ... this.
6411         (_initialize_step_skip): Adjust.
6412         * source.c (line_info): Rename to ...
6413         (info_line_command): ... this.
6414         (source_info): Rename to ...
6415         (info_source_command)
6416         * stack.c (frame_info): Rename to ...
6417         (info_frame_command): ... this.
6418         (locals_info): Rename to ...
6419         (info_locals_command): ... this.
6420         (args_info): Rename to ...
6421         (info_args_command): ... this.
6422         (_initialize_stack): Adjust.
6423         * symtab.c (sources_info): Rename to ...
6424         (info_sources_command): ... this.
6425         (variables_info): Rename to ...
6426         (info_variables_command): ... this.
6427         (functions_info): Rename to ...
6428         (info_functions_command): ... this.
6429         (types_info): Rename to ...
6430         (info_types_command): ... this.
6431         (_initialize_symtab): Adjust.
6432         * target.c (target_info): Rename to ...
6433         (info_target_command): ... this.
6434         (initialize_targets): Adjust.
6435         * tracepoint.c (tvariables_info): Rename to ...
6436         (info_tvariables_command): ... this.
6437         (scope_info): Rename to ...
6438         (info_scope_command): ... this.
6439         (trace_dump_actions): Adjust.
6440         (_initialize_tracepoint): Adjust.
6441
6442 2017-08-22  Tom Tromey  <tom@tromey.com>
6443
6444         * breakpoint.h (install_breakpoint): Update.
6445         * breakpoint.c (add_solib_catchpoint): Update.
6446         (install_breakpoint): Change argument to a std::unique_ptr.
6447         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6448         (create_breakpoint_sal, create_breakpoint): Update.
6449         (watch_command_1, catch_exec_command_1)
6450         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6451         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6452         Return the breakpoint.
6453         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6454         (new_single_step_breakpoint): Update.
6455         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6456         std::unique_ptr.
6457         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6458         std::unique_ptr.
6459         * break-catch-sig.c (create_signal_catchpoint): Use
6460         std::unique_ptr.
6461         * ada-lang.c (create_ada_exception_catchpoint): Use
6462         std::unique_ptr.
6463
6464 2017-08-22  Tom Tromey  <tom@tromey.com>
6465
6466         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6467
6468 2017-08-22  Tom Tromey  <tom@tromey.com>
6469
6470         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6471         (lookup_partial_symbol): Update.
6472
6473 2017-08-22  Tom Tromey  <tom@tromey.com>
6474
6475         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6476         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6477         (find_and_open_source, symtab_to_fullname): Update.
6478         * psymtab.c (psymtab_to_fullname): Update.
6479
6480 2017-08-22  Tom Tromey  <tom@tromey.com>
6481
6482         * exec.c (exec_file_attach): Update.
6483         * linux-thread-db.c (try_thread_db_load): Update.
6484         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6485         * utils.c (gdb_realpath): Change return type.
6486         (gdb_realpath_keepfile): Update.
6487         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6488         (_initialize_utils): Register the new self test.
6489         * source.c (openp): Update.
6490         (find_and_open_source): Update.
6491         * nto-tdep.c (nto_find_and_open_solib): Update.
6492         * main.c (set_gdb_data_directory): Update.
6493         (captured_main_1): Update.
6494         * dwarf2read.c (dwarf2_get_dwz_file): Update
6495         (dw2_map_symbol_filenames): Update.
6496         * auto-load.c (auto_load_safe_path_vec_update): Update.
6497         (filename_is_in_auto_load_safe_path_vec): Change type of
6498         "filename_realp".
6499         (auto_load_objfile_script): Update.
6500         (file_is_auto_load_safe): Update.  Use std::string.
6501         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6502
6503 2017-08-22  Tom Tromey  <tom@tromey.com>
6504
6505         * utils.c (gdb_realpath_keepfile): Return a
6506         gdb::unique_xmalloc_ptr.
6507         * exec.c (exec_file_attach): Update.
6508         * utils.h (gdb_realpath_keepfile): Return a
6509         gdb::unique_xmalloc_ptr.
6510
6511 2017-08-22  Tom Tromey  <tom@tromey.com>
6512
6513         * compile/compile.c (compile_file_command): Use
6514         gdb::unique_xmalloc_ptr, std::string.
6515         * utils.c (gdb_abspath): Change return type.
6516         * source.c (openp): Update.
6517         * objfiles.c (allocate_objfile): Update.
6518         * main.c (set_gdb_data_directory): Update.
6519         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6520
6521 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6522
6523         * cli-cmds.c (list_commands): List actual code around more than
6524         one location.
6525
6526 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6527
6528         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6529
6530 2017-08-21  Pedro Alves  <palves@redhat.com>
6531
6532         PR gdb/19487
6533         * c-exp.y (variable production): Handle function aliases.
6534         * minsyms.c (msymbol_is_text): New function.
6535         * minsyms.h (msymbol_is_text): Declare.
6536         * symtab.c (find_function_alias_target): New function.
6537         * symtab.h (find_function_alias_target): Declare.
6538
6539 2017-08-21  Pedro Alves  <palves@redhat.com>
6540
6541         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6542         typedefs.
6543         * typeprint.c (whatis_exp): If handling "whatis", and expression
6544         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6545         typedefs here.
6546         * valops.c (value_cast): Save "to" type before resolving
6547         stubs/typedefs.  Use that type as resulting value's type.
6548
6549 2017-08-18  Tom Tromey  <tom@tromey.com>
6550             Pedro Alves  <palves@redhat.com>
6551
6552         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6553         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6554         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6555         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6556         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6557         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6558         (linux_get_siginfo_data): Add "thread" argument.  Use
6559         scoped_restore.
6560         * linux-nat.c (linux_child_follow_fork)
6561         (check_stopped_by_watchpoint): Use scoped_restore.
6562         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6563         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6564         (restore_inferior_ptid, save_inferior_ptid): Remove.
6565         * btrace.c (btrace_fetch): Use scoped_restore.
6566         * bsd-uthread.c (bsd_uthread_fetch_registers)
6567         (bsd_uthread_store_registers): Use scoped_restore.
6568         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6569         scoped_restore.
6570         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6571         (aix_thread_xfer_partial): Use scoped_restore.
6572         * inferior.h (save_inferior_ptid): Remove.
6573
6574 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6575
6576         PR tdep/21818
6577         * arm-tdep.c (gdb_print_insn_arm): Mark
6578         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6579
6580 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6581
6582         * NEWS: Mention GDBserver's new option "--selftest".
6583         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6584         * selftest.c: Move it to common/selftest.c.
6585         * selftest.h: Move it to common/selftest.h.
6586         * selftest-arch.c (reset): New function.
6587         (tests_with_arch): Call reset.
6588
6589 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6590
6591         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6592         instead of exception_fprintf and printf_filtered.
6593
6594 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6595
6596         * selftest.c (register_self_test): Rename it to
6597         selftests::register_test.
6598         (run_self_tests): selftest::run_tests.
6599         * selftest.h: Update declarations.
6600         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6601         selftests::register_test_foreach_arch.
6602         * selftest-arch.h: Update declaration.
6603         * aarch64-tdep.c: Update.
6604         * arm-tdep.c: Likewise.
6605         * disasm-selftests.c: Likewise.
6606         * dwarf2loc.c: Likewise.
6607         * dwarf2-frame.c: Likewise.
6608         * findvar.c: Likewise.
6609         * gdbarch-selftests.c: Likewise.
6610         * maint.c (maintenance_selftest): Likewise.
6611         * regcache.c: Likewise.
6612         * rust-exp.y: Likewise.
6613         * selftest-arch.c: Likewise.
6614         * unittests/environ-selftests.c: Likewise.
6615         * unittests/function-view-selftests.c: Likewise.
6616         * unittests/offset-type-selftests.c: Likewise.
6617         * unittests/optional-selftests.c: Likewise.
6618         * unittests/scoped_restore-selftests.c: Likewise.
6619         * utils-selftests.c: Likewise.
6620
6621 2017-08-17  Pedro Alves  <palves@redhat.com>
6622
6623         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6624         local.
6625
6626 2017-08-17  Pedro Alves  <palves@redhat.com>
6627
6628         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6629         field.
6630         (reset_die_in_process): Delete, replaced by ...
6631         (process_die_scope): ... this new class.  Make it responsible for
6632         freeing cu->line_header too.
6633         (process_die): Use process_die_scope.
6634         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6635         cu->line_header_die_owner.  Don't release the line header if it's
6636         owned by the CU.
6637         (setup_type_unit_groups): Make the CU/DIE own the line header.
6638         Don't release the line header here.
6639
6640 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6641
6642         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6643
6644 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6645
6646         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6647         Single-Key mode
6648
6649 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6650
6651         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6652         mode command list.
6653
6654 2017-08-15  Stafford Horne  <shorne@gmail.com>
6655
6656         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6657
6658 2017-08-15  Stafford Horne  <shorne@gmail.com>
6659
6660         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6661
6662 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6663
6664         PR gdb/21954
6665         * infcmd.c (unset_environment_command): Use the 'clear' method on
6666         the environment instead of resetting it.
6667
6668 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6669
6670         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6671         platforms.
6672
6673 2017-08-14  Tom Tromey  <tom@tromey.com>
6674
6675         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6676         (print_binary_chars): Likewise.
6677         (BITS_IN_BYTES): Remove.
6678
6679 2017-08-14  Tom Tromey  <tom@tromey.com>
6680
6681         PR gdb/21675
6682         * valprint.c (LOW_ZERO): Change value to 034.
6683         (print_octal_chars): Add static_asserts for octal constants.
6684         * printcmd.c (print_scalar_formatted): Add 'd' case.
6685
6686 2017-08-11  Tom Tromey  <tom@tromey.com>
6687
6688         * symfile.c (add_symbol_file_command): Use std::vector.
6689
6690 2017-08-14  Tom Tromey  <tom@tromey.com>
6691
6692         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6693         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6694         std::move.
6695         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6696
6697 2017-08-11  Pedro Alves  <palves@redhat.com>
6698
6699         * infrun.c (process_event_stop_test): Adjust
6700         function_name_is_marked_for_skip call.
6701         * skip.c: Include <list>.
6702         (skiplist_entry): Make it a class with private fields, and
6703         getters/setters.
6704         (skiplist_entry_chain): Delete.
6705         (skiplist_entries): New.
6706         (skiplist_entry_count): Delete.
6707         (highest_skiplist_entry_num): New.
6708         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6709         (add_skiplist_entry): Delete.
6710         (skiplist_entry::skiplist_entry): New.
6711         (skiplist_entry::add_entry): New.
6712         (skip_file_command, skip_function): Adjust.
6713         (compile_skip_regexp): Delete.
6714         (skip_command): Don't compile regexp here.  Adjust to use
6715         skiplist_entry::add_entry.
6716         (skip_info): Adjust to use range-for and getters.
6717         (skip_enable_command, skip_disable_command): Adjust to use
6718         range-for and setters.
6719         (skip_delete_command): Adjust to use std::list.
6720         (add_skiplist_entry): Delete.
6721         (skip_file_p): Delete, refactored as ...
6722         (skiplist_entry::do_skip_file_p): ... this new method.
6723         (skip_gfile_p): Delete, refactored as ...
6724         (skiplist_entry::do_gskip_file_p): ... this new method.
6725         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6726         (skiplist_entry::skip_function_p): ... this new method.
6727         (function_name_is_marked_for_skip): Now returns bool, and takes
6728         the function sal by const reference.  Adjust to use range-for and
6729         skiplist_entry methods.
6730         (_initialize_step_skip): Remove references to
6731         skiplist_entry_chain, skiplist_entry_count.
6732         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6733         takes the function sal by const reference.
6734
6735 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6736
6737         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6738         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6739         (dwarf2_frame_cache):
6740         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6741         RETURN_MASK_ALL and set *this_case to NULL.
6742         * frame-unwind.h: Update comments.
6743
6744 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6745
6746         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6747         (dwarf2_frame_state_copy_regs): Remove.
6748         (dwarf2_frame_state_free_regs): Remove.
6749         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6750         (dwarf2_restore_rule): Call method .alloc_regs instead of
6751         dwarf2_frame_state_alloc_regs.
6752         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6753         constructor.  Call std::move.
6754         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6755         (dwarf2_frame_cache): Likewise.
6756
6757         [GDB_SELF_TEST]: Include selftest.h and
6758         selftest-arch.h.
6759         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6760         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6761         execute_cfa_program_test.
6762
6763         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6764         copy ctor, assignment operator, move assignment.
6765         <alloc_regs>: New method.
6766         <swap>: New method.
6767         (struct dwarf2_frame_state): Delete dtor.
6768         (dwarf2_frame_state_alloc_regs): Remove declaration.
6769         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6770         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6771
6772 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6773
6774         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6775         (dwarf2_frame_state::dwarf2_frame_state): New.
6776         (dwarf2_frame_state::~dwarf2_frame_state): New.
6777         (dwarf2_fetch_cfa_info): Update.
6778         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6779         rather than a pointer.  Update code.
6780         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6781         dtor.
6782         <data_align, code_align, retaddr_column>: Change them to const.
6783         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6784         to bool.
6785
6786 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6787
6788         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6789         <loc.exp>: New field.
6790         * dwarf2-frame.c (execute_cfa_program): Update.
6791         (dwarf2_frame_prev_register): Update.
6792
6793 2017-08-10  Pedro Alves  <palves@redhat.com>
6794
6795         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6796
6797 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6798
6799         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6800         (fbsd_pending_children): Use std::list.
6801         (fbsd_remember_child): Likewise.
6802         (fbsd_is_child_pending): Likewise.
6803         (fbsd_pending_vfork_done): Use std::forward_list.
6804         (fbsd_add_vfork_done): Likewise.
6805         (fbsd_is_vfork_done_pending): Likewise.
6806         (fbsd_next_vfork_done): Likewise.
6807
6808 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6809
6810         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6811         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6812         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6813         for `mapfilename'.
6814         (fbsd_xfer_partial): Use gdb::byte_vector.
6815         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6816
6817 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6818
6819         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6820         "filestuff.h".
6821         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6822
6823 2017-08-09  Tom Tromey  <tom@tromey.com>
6824
6825         * skip.c (skiplist_entry): New constructor.
6826         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6827         (skiplist_entry::file_is_glob): Now bool.
6828         (skiplist_entry::file, skiplist_entry::function): Now
6829         std::string.
6830         (make_skip_entry): Return a unique_ptr.  Use new.
6831         (free_skiplist_entry, free_skiplist_entry_cleanup)
6832         (make_free_skiplist_entry_cleanup): Remove.
6833         (skip_command, skip_disable_command, add_skiplist_entry)
6834         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6835         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6836         (function_name_is_marked_for_skip): Update.
6837         (skip_delete_command): Update.  Use delete.
6838
6839 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6840
6841         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6842         (aarch64_linux_core_read_description): New function.
6843         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6844
6845 2017-08-09  Pedro Alves  <palves@redhat.com>
6846
6847         * cp-name-parser.y (cp_comp_to_string): Return a
6848         gdb::unique_xmalloc_ptr<char>.
6849         * cp-support.c (replace_typedefs_qualified_name)
6850         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6851         (cp_canonicalize_string_full): Use op= instead of explicit
6852         convertion.
6853         (cp_class_name_from_physname, method_name_from_physname)
6854         (cp_func_name, cp_remove_params): Adjust to use
6855         gdb::unique_xmalloc_ptr<char>.
6856         * cp-support.h (cp_comp_to_string): Return a
6857         gdb::unique_xmalloc_ptr<char>.
6858         * python/py-type.c (typy_lookup_type): Adjust to use
6859         gdb::unique_xmalloc_ptr<char>.
6860
6861 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6862
6863         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6864
6865 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6866             Yao Qi  <yao.qi@linaro.org>
6867
6868         * cp-support.c (cp_canonicalize_string_full): Use
6869         gdb::unique_xmalloc_ptr<char>.
6870         (cp_canonicalize_string): Likewise.
6871
6872 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6873
6874         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6875         * regformats/i386/amd64-avx-avx512.dat: Remove.
6876         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6877         * regformats/i386/amd64-avx-mpx.dat:Remove.
6878         * regformats/i386/amd64-avx.dat: Remove.
6879         * regformats/i386/amd64-mpx.dat: Remove.
6880         * regformats/i386/i386-avx-avx512.dat: Remove.
6881         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6882         * regformats/i386/i386-avx-mpx.dat: Remove.
6883         * regformats/i386/i386-mmx.dat: Remove.
6884         * regformats/i386/i386-mpx.dat: Remove.
6885
6886 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6887
6888         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6889         * amd64-tdep.c: Don't include features/i386/x32*.c.
6890         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6891         functions.
6892         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6893         and i386/x32-avx-avx512.
6894         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6895         and i386/x32.xml.
6896         * features/i386/x32-avx-avx512.c: Removed.
6897         * features/i386/x32-avx-avx512.xml: Removed.
6898         * features/i386/x32-avx.c: Removed.
6899         * features/i386/x32-avx.xml: Removed.
6900         * features/i386/x32.c: Removed.
6901         * features/i386/x32.xml: Removed.
6902         * regformats/i386/x32-avx-avx512.dat: Removed.
6903         * regformats/i386/x32-avx.dat: Removed.
6904         * regformats/i386/x32.dat: Removed.
6905
6906 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6907
6908         PR breakpoints/21886
6909         * mem-break.c (default_memory_insert_breakpoint): Use
6910         `->placed_address' rather than `->reqstd_address' for the
6911         breakpoint location.
6912
6913 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6914
6915         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6916         assertions.
6917
6918 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6919
6920         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6921         a union of `tdep_info', `tdesc_data' and `id'.
6922         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6923         rather than `info.tdep_info'.
6924         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6925         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6926         * i386-tdep.c (i386_gdbarch_init): Likewise.
6927         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6928         * mips-tdep.c (mips_gdbarch_init): Likewise.
6929         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6930         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6931         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6932         `info.tdep_info'.
6933         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6934         `info.tdep_info'.
6935         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6936         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6937         `info.tdep_info'.
6938         * spu-tdep.c (spu_gdbarch_init): Likewise.
6939         * gdbarch.h: Regenerate.
6940
6941 2017-08-07  Leszek Swirski  <leszeks@google.com>
6942
6943         PR symtab/20899
6944         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6945
6946 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6947
6948         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6949         (gdbsim_open): Rename gdb_argv args object to argv.
6950
6951 2017-08-05  Tom Tromey  <tom@tromey.com>
6952
6953         * compile/compile-object-load.c (compile_object_load): Use
6954         gdb::unique_xmalloc_ptr.
6955         * cli/cli-dump.c (scan_filename): Rename from
6956         scan_filename_with_cleanup.  Change return type.
6957         (scan_expression): Rename from scan_expression_with_cleanup.
6958         Change return type.
6959         (dump_memory_to_file, dump_value_to_file, restore_command):
6960         Use gdb::unique_xmalloc_ptr.  Update.
6961         * cli/cli-cmds.c (find_and_open_script): Use
6962         gdb::unique_xmalloc_ptr.
6963         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6964         * symmisc.c (maintenance_print_symbols)
6965         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6966         * symfile.c (symfile_bfd_open, generic_load)
6967         (add_symbol_file_command, remove_symbol_file_command): Use
6968         gdb::unique_xmalloc_ptr.
6969         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6970         * psymtab.c (maintenance_print_psymbols): Use
6971         gdb::unique_xmalloc_ptr.
6972         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6973         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6974         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6975         (reload_shared_libraries_1): Likewise.
6976
6977 2017-08-05  Tom Tromey  <tom@tromey.com>
6978
6979         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6980         (rust_op_vector, rust_set_vector): New typedefs.
6981         (current_parser): New global.
6982         (work_obstack): Change to pointer type.  Update all users.
6983         (rust_ast, pstate): Remove globals.
6984         (struct rust_parser): New.
6985         (%union) <params, field_inits>: Change type.
6986         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6987         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6988         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6989         (convert_params_to_types, convert_params_to_expression): Change
6990         type of "params".
6991         (ast_string): Change type of "fields".
6992         (rust_parse): Make a rust_parser.  Remove cleanups.
6993         (rust_lex_tests): Make and install an auto_obstack.
6994
6995 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6996
6997         * configure.srv (ipa_x32_linux_regobj): New.
6998         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6999         instead of X86_TDESC_AVX512.
7000         (initialize_low_tracepoint): Call
7001         init_registers_x32_avx_avx512_linux.
7002
7003 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7004
7005         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7006
7007 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7008
7009         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7010
7011 2017-08-03  Tom Tromey  <tom@tromey.com>
7012
7013         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7014         Remove.
7015         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7016
7017 2017-08-03  Tom Tromey  <tom@tromey.com>
7018
7019         * python/py-param.c (compute_enum_values): Use gdb_argv.
7020
7021 2017-08-03  Tom Tromey  <tom@tromey.com>
7022
7023         * utils.h (struct gdb_argv_deleter): New.
7024         (gdb_argv): New class.
7025         * utils.c (gdb_argv::reset): New method.
7026         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7027         * tracefile.c (tsave_command): Use gdb_argv.
7028         * top.c (new_ui_command): Use gdb_argv.
7029         * symmisc.c (maintenance_print_symbols)
7030         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7031         * symfile.c (symbol_file_command, generic_load)
7032         (remove_symbol_file_command): Use gdb_argv.
7033         * stack.c (backtrace_command): Use gdb_argv.
7034         * source.c (add_path, show_substitute_path_command)
7035         (unset_substitute_path_command, set_substitute_path_command):
7036         Use gdb_argv.
7037         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7038         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7039         * remote.c (extended_remote_run, remote_put_command)
7040         (remote_get_command, remote_delete_command): Use gdb_argv.
7041         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7042         (gdbsim_open): Use gdb_argv.
7043         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7044         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7045         * procfs.c (procfs_info_proc): Use gdb_argv.
7046         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7047         * infrun.c (handle_command): Use gdb_argv.
7048         * inferior.c (add_inferior_command, clone_inferior_command):
7049         Use gdb_argv.
7050         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7051         * exec.c (exec_file_command): Use gdb_argv.
7052         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7053         * compile/compile.c (build_argc_argv): Use gdb_argv.
7054
7055 2017-08-03  Tom Tromey  <tom@tromey.com>
7056
7057         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7058
7059 2017-08-03  Tom Tromey  <tom@tromey.com>
7060
7061         * python/python.c (compute_python_string): Return std::string.
7062         (gdbpy_eval_from_control_command): Update.
7063         (do_start_initialization): Use std::string.
7064         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7065         xstrprintf.
7066         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7067         xstrprintf.
7068
7069 2017-08-03  Tom Tromey  <tom@tromey.com>
7070
7071         * top.h (do_restore_instream_cleanup): Remove.
7072         * top.c (do_restore_instream_cleanup): Remove.
7073         (read_command_file): Use scoped_restore.
7074         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7075
7076 2017-08-03  Tom Tromey  <tom@tromey.com>
7077
7078         * cli/cli-script.c (execute_user_command)
7079         (execute_control_command): Use scoped_restore.
7080
7081 2017-08-03  Tom Tromey  <tom@tromey.com>
7082
7083         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7084         (execute_user_command): Remove user_call_depth; use
7085         user_args_stack's size instead.
7086
7087 2017-08-03  Tom Tromey  <tom@tromey.com>
7088
7089         * top.h (in_user_command): Remove.
7090         * top.c (in_user_command): Remove.
7091         * cli/cli-script.c (do_restore_user_call_depth)
7092         (execute_user_command): Update.
7093
7094 2017-08-03  Tom Tromey  <tom@tromey.com>
7095
7096         * valops.c (search_struct_method): Use gdb::byte_vector.
7097         * valarith.c (value_concat): Use std::vector.
7098         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7099         (simple_search_memory): Likewise.
7100         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7101         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7102         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7103         * elfread.c (elf_rel_plt_read): Use std::string.
7104         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7105         * cli/cli-dump.c (restore_section_callback): Use
7106         gdb::byte_vector.
7107
7108 2017-08-03  Tom Tromey  <tom@tromey.com>
7109
7110         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7111
7112 2017-08-03  Tom Tromey  <tom@tromey.com>
7113
7114         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7115         (tui_register_format): Use scoped_restore.
7116
7117 2017-08-03  Tom Tromey  <tom@tromey.com>
7118
7119         * reverse.c (exec_direction_default): Remove.
7120         (exec_reverse_once): Use scoped_restore.
7121         * remote.c (restore_remote_timeout): Remove.
7122         (remote_flash_erase, remote_flash_write, remote_flash_done)
7123         (readchar, remote_serial_write): Use scoped_restore.
7124         * cli/cli-script.c (struct source_cleanup_lines_args)
7125         (source_cleanup_lines): Remove.
7126         (script_from_file): Use scoped_restore.
7127         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7128         (source_command): Use scoped_restore.
7129
7130 2017-08-03  Tom Tromey  <tom@tromey.com>
7131
7132         * utils.h (make_cleanup_free_so): Remove.
7133         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7134         * solist.h (struct so_deleter): New.
7135         (so_list_up): New typedef.
7136         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7137
7138 2017-08-03  Tom Tromey  <tom@tromey.com>
7139
7140         * utils.h (make_cleanup_restore_current_language): Remove.
7141         * utils.c (do_restore_current_language)
7142         (make_cleanup_restore_current_language): Remove.
7143         * parse.c (parse_exp_in_context_1)
7144         (parse_expression_with_language): Use
7145         scoped_restore_current_language.
7146         * mi/mi-main.c (mi_cmd_execute): Use
7147         scoped_restore_current_language.
7148         * language.h (scoped_restore_current_language): New class.
7149
7150 2017-08-03  Tom Tromey  <tom@tromey.com>
7151
7152         * compile/compile.c (cleanup_unlink_file): Remove.
7153         (compile_to_object): Use gdb::unlinker.
7154         (eval_compile_command): Likewise.
7155
7156 2017-08-03  Tom Tromey  <tom@tromey.com>
7157
7158         * utils.h (make_cleanup_fclose): Remove.
7159         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7160
7161 2017-08-03  Tom Tromey  <tom@tromey.com>
7162
7163         * top.c (open_terminal_stream): Return gdb_file_up.
7164         (new_ui_command): Update.
7165
7166 2017-08-03  Tom Tromey  <tom@tromey.com>
7167
7168         * source.c (print_source_lines_base, forward_search_command)
7169         (reverse_search_command): Use gdb_file_up.
7170
7171 2017-08-03  Tom Tromey  <tom@tromey.com>
7172
7173         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7174
7175 2017-08-03  Tom Tromey  <tom@tromey.com>
7176
7177         * cli/cli-cmds.c (find_and_open_script): Change return type.
7178         Remove "streamp" and "full_path" parameters.
7179         (source_script_with_search): Update.
7180         * auto-load.c (source_script_file): Update.
7181         * cli/cli-cmds.h (find_and_open_script): Change type.
7182         (open_script): New struct.
7183
7184 2017-08-03  Tom Tromey  <tom@tromey.com>
7185
7186         * xml-support.c (xml_fetch_content_from_file): Update.
7187         * ui-file.c (stdio_file::open): Update.
7188         * tracefile-tfile.c (tfile_start): Update.
7189         * remote.c (remote_file_put, remote_file_get): Update.
7190         * nat/linux-procfs.c (linux_proc_get_int)
7191         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7192         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7193         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7194         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7195         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7196         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7197         * linux-nat.c (linux_proc_pending_signals): Update.
7198         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7199         (file_closer): Remove.
7200         * compile/compile.c (compile_to_object): Update.
7201         * common/filestuff.h (struct gdb_file_deleter): New.
7202         (gdb_file_up): New typedef.
7203         (gdb_fopen_cloexec): Change return type.
7204         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7205         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7206         (dump_binary_file, restore_binary_file): Update.
7207         * auto-load.c (auto_load_objfile_script_1): Update.
7208
7209 2017-08-03  Tom Tromey  <tom@tromey.com>
7210
7211         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7212         (info_static_tracepoint_markers_command): Likewise.
7213         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7214         * skip.c (skip_info): Use ui_out_emit_table.
7215         * progspace.c (print_program_space): Use ui_out_emit_table.
7216         * osdata.c (info_osdata): Use ui_out_emit_table.
7217         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7218         ui_out_emit_table.
7219         * linux-thread-db.c (info_auto_load_libthread_db): Use
7220         ui_out_emit_table.
7221         * inferior.c (print_inferior): Use ui_out_emit_table.
7222         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7223         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7224         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7225         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7226         * ui-out.h (class ui_out_emit_table): New.
7227
7228 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7229
7230         * mips-tdep.c (mips_fpu_type_str): New function.
7231         (mips_dump_tdep): Call it.
7232
7233 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7234
7235         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7236         `->mips_fpu_type'.
7237
7238 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7239
7240         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7241
7242 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7243
7244         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7245
7246 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7247
7248         * cli/cli-cmds.c (maintenancechecklist): New variable.
7249         * gdbcmd.h (maintenancechecklist): Declare it.
7250         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7251         Call i386_linux_read_description with different masks.
7252         * maint.c (maintenance_check_command): New function.
7253         (_initialize_maint_cmds): Call add_prefix_cmd.
7254         * target-descriptions.c (tdesc_reg): override operator != and ==.
7255         (tdesc_type): Likewise.
7256         (tdesc_feature): Likewise.
7257         (target_desc): Likewise.
7258         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7259         (maintenance_check_xml_descriptions): New function.
7260         (_initialize_target_descriptions) Add command "xml-descriptions".
7261         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7262
7263 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7264
7265         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7266         Include features/i386/32bit-*.c.
7267         (i386_linux_read_description): Generate target description if it
7268         doesn't exist.
7269         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7270         functions.
7271         * features/i386/32bit-linux.c: Re-generated.
7272         * features/i386/32bit-sse.c: Likewise.
7273         * target-descriptions.c (print_c_feature::visit): Print code to
7274         set register number if needed.
7275         (print_c_feature) <m_next_regnum>: New field.
7276
7277 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7278
7279         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7280         (FEATURE_XMLFILES): New.
7281         (FEATURE_CFILES): New.
7282         New rules.
7283         (clean-cfiles): Remove generated c files.
7284         * features/i386/32bit-avx.c: Generated.
7285         * features/i386/32bit-avx512.c: Generated.
7286         * features/i386/32bit-core.c: Generated.
7287         * features/i386/32bit-linux.c: Generated.
7288         * features/i386/32bit-mpx.c: Generated.
7289         * features/i386/32bit-pkeys.c: Generated.
7290         * features/i386/32bit-sse.c: Generated.
7291         * target-descriptions.c: Include algorithm.
7292         (tdesc_element_visitor): Add method visit_end.
7293         (print_c_tdesc): Implement visit_end.
7294         (print_c_tdesc:: m_filename_after_features): Move it to
7295         protected.
7296         (print_c_feature): New class.
7297         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7298         name starts with "i386/32bit-".
7299
7300 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7301
7302         * target-descriptions.c (tdesc_element_visitor): New class.
7303         (tdesc_element): New class.
7304         (tdesc_reg): Inherit from tdesc_element.
7305         (tdesc_reg::accept): New function.
7306         (tdesc_type): Inherit from tdesc_element.
7307         (tdesc_type::accept): New function.
7308         (tdesc_feature): Inherit from tdesc_element.
7309         (tdesc_feature::accept): New function.
7310         (target_desc): Inherit from tdesc_element.
7311         (target_desc::target_desc): New.
7312         (target_desc::~target_desc): New.
7313         (target_desc::accept): New.
7314         (allocate_target_description): Use new.
7315         (free_target_description): Use delete.
7316         (print_c_tdesc): New class.
7317         (maint_print_c_tdesc_cmd): Adjust.
7318
7319         * features/aarch64.c: Re-generated.
7320         * features/arc-arcompact.c: Re-generated.
7321         * features/arc-v2.c: Re-generated.
7322         * features/arm/arm-with-iwmmxt.c: Re-generated.
7323         * features/arm/arm-with-m.c: Re-generated.
7324         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7325         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7326         * features/arm/arm-with-neon.c: Re-generated.
7327         * features/arm/arm-with-vfpv2.c: Re-generated.
7328         * features/arm/arm-with-vfpv3.c: Re-generated.
7329         * features/i386/amd64-avx-avx512.c: Re-generated.
7330         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7331         * features/i386/amd64-avx.c: Re-generated.
7332         * features/i386/amd64-avx-linux.c: Re-generated.
7333         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7334         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7335         * features/i386/amd64-avx-mpx.c: Re-generated.
7336         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7337         * features/i386/amd64.c: Re-generated.
7338         * features/i386/amd64-linux.c: Re-generated.
7339         * features/i386/amd64-mpx.c: Re-generated.
7340         * features/i386/amd64-mpx-linux.c: Re-generated.
7341         * features/i386/i386-avx-avx512.c: Re-generated.
7342         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7343         * features/i386/i386-avx.c: Re-generated.
7344         * features/i386/i386-avx-linux.c: Re-generated.
7345         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7346         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7347         * features/i386/i386-avx-mpx.c: Re-generated.
7348         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7349         * features/i386/i386.c: Re-generated.
7350         * features/i386/i386-linux.c: Re-generated.
7351         * features/i386/i386-mmx.c: Re-generated.
7352         * features/i386/i386-mmx-linux.c: Re-generated.
7353         * features/i386/i386-mpx.c: Re-generated.
7354         * features/i386/i386-mpx-linux.c: Re-generated.
7355         * features/i386/x32-avx-avx512.c: Re-generated.
7356         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7357         * features/i386/x32-avx.c: Re-generated.
7358         * features/i386/x32-avx-linux.c: Re-generated.
7359         * features/i386/x32.c: Re-generated.
7360         * features/i386/x32-linux.c: Re-generated.
7361         * features/microblaze.c: Re-generated.
7362         * features/microblaze-with-stack-protect.c: Re-generated.
7363         * features/mips64-dsp-linux.c: Re-generated.
7364         * features/mips64-linux.c: Re-generated.
7365         * features/mips-dsp-linux.c: Re-generated.
7366         * features/mips-linux.c: Re-generated.
7367         * features/nds32.c: Re-generated.
7368         * features/nios2.c: Re-generated.
7369         * features/nios2-linux.c: Re-generated.
7370         * features/rs6000/powerpc-32.c: Re-generated.
7371         * features/rs6000/powerpc-32l.c: Re-generated.
7372         * features/rs6000/powerpc-403.c: Re-generated.
7373         * features/rs6000/powerpc-403gc.c : Re-generated.
7374         * features/rs6000/powerpc-405.c: Re-generated.
7375         * features/rs6000/powerpc-505.c: Re-generated.
7376         * features/rs6000/powerpc-601.c: Re-generated.
7377         * features/rs6000/powerpc-602.c: Re-generated.
7378         * features/rs6000/powerpc-603.c: Re-generated.
7379         * features/rs6000/powerpc-604.c: Re-generated.
7380         * features/rs6000/powerpc-64.c: Re-generated.
7381         * features/rs6000/powerpc-64l.c: Re-generated.
7382         * features/rs6000/powerpc-7400.c: Re-generated.
7383         * features/rs6000/powerpc-750.c: Re-generated.
7384         * features/rs6000/powerpc-860.c: Re-generated.
7385         * features/rs6000/powerpc-altivec32.c: Re-generated.
7386         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7387         * features/rs6000/powerpc-altivec64.c: Re-generated.
7388         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7389         * features/rs6000/powerpc-cell32l.c: Re-generated.
7390         * features/rs6000/powerpc-cell64l.c: Re-generated.
7391         * features/rs6000/powerpc-e500.c: Re-generated.
7392         * features/rs6000/powerpc-e500l.c: Re-generated.
7393         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7394         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7395         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7396         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7397         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7398         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7399         * features/rs6000/powerpc-vsx32.c: Re-generated.
7400         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7401         * features/rs6000/powerpc-vsx64.c: Re-generated.
7402         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7403         * features/rs6000/rs6000.c: Re-generated.
7404         * features/s390-linux32.c: Re-generated.
7405         * features/s390-linux32v1.c: Re-generated.
7406         * features/s390-linux32v2.c: Re-generated.
7407         * features/s390-linux64.c: Re-generated.
7408         * features/s390-linux64v1.c: Re-generated.
7409         * features/s390-linux64v2.c: Re-generated.
7410         * features/s390-te-linux64.c: Re-generated.
7411         * features/s390-tevx-linux64.c: Re-generated.
7412         * features/s390-vx-linux64.c: Re-generated.
7413         * features/s390x-linux64.c: Re-generated.
7414         * features/s390x-linux64v1.c: Re-generated.
7415         * features/s390x-linux64v2.c: Re-generated.
7416         * features/s390x-te-linux64.c: Re-generated.
7417         * features/s390x-tevx-linux64.c: Re-generated.
7418         * features/s390x-vx-linux64.c: Re-generated.
7419         * features/sparc/sparc32-solaris.c: Re-generated.
7420         * features/sparc/sparc64-solaris.c: Re-generated.
7421         * features/tic6x-c62x.c: Re-generated.
7422         * features/tic6x-c62x-linux.c: Re-generated.
7423         * features/tic6x-c64x.c: Re-generated.
7424         * features/tic6x-c64x-linux.c: Re-generated.
7425         * features/tic6x-c64xp.c: Re-generated.
7426         * features/tic6x-c64xp-linux.c: Re-generated.
7427
7428 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7429
7430         * i386-linux-tdep.c (i386_linux_read_description): New function.
7431         (i386_linux_core_read_description): Call
7432         i386_linux_read_description.
7433         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7434         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7435         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7436         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7437         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7438         * x86-linux-nat.c (x86_linux_read_description): Call
7439         i386_linux_read_description.
7440
7441 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7442
7443         * NEWS: Mention it.
7444         * features/Makefile (%.c: %.xml): Pass the xml file name to
7445         command "maint print c-tdesc".
7446         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7447         name from 'arg'.
7448
7449 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7450
7451         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7452         in-class initialization.
7453         (tdesc_create_feature): Call new instead of XCNEW.
7454         (free_target_description): Ue delete.
7455
7456 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7457
7458         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7459
7460 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7461
7462         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7463         constant.
7464         (amd64_x32_init_abi): Likewise.
7465         * amd64-tdep.h (amd64_init_abi): Update declaration.
7466         (amd64_x32_init_abi): Likewise.
7467
7468 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7469
7470         PR tdep/21717
7471         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7472         condition for FPSCR.
7473         (arm_linux_store_inferior_registers): Likewise.
7474
7475 2017-07-22  Tom Tromey  <tom@tromey.com>
7476
7477         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7478         <syscalls_counts>: Now a std::vector.
7479         (get_catch_syscall_inferior_data): Use "new".
7480         (catch_syscall_inferior_data_cleanup): Use "delete".
7481         (insert_catch_syscall, remove_catch_syscall)
7482         (clear_syscall_counts): Update.
7483
7484 2017-07-22  Tom Tromey  <tom@tromey.com>
7485
7486         * break-catch-syscall.c (syscall_catchpoint)
7487         <syscalls_to_be_caught>: Now a std::vector<int>
7488         (~syscall_catchpoint): Remove.
7489         (insert_catch_syscall, remove_catch_syscall)
7490         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7491         (print_mention_catch_syscall, print_recreate_catch_syscall):
7492         Update.
7493         (create_syscall_event_catchpoint): Change type of "filter"
7494         parameter.
7495         (catch_syscall_split_args): Return a std::vector.
7496         (catch_syscall_command_1, catching_syscall_number_1): Update.
7497
7498 2017-07-22  Tom Tromey  <tom@tromey.com>
7499
7500         * break-catch-throw.c (struct exception_catchpoint)
7501         <exception_rx>: Now a std::string.
7502         (~exception_catchpoint): Remove.
7503         (print_one_detail_exception_catchpoint): Update.
7504         (handle_gnu_v3_exceptions): Change type of except_rx.
7505         (extract_exception_regexp): Return a std::string.
7506         (catch_exception_command_1): Update.
7507
7508 2017-07-22  Tom Tromey  <tom@tromey.com>
7509
7510         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7511         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7512         std::vector.
7513         <catch_all>: Now a bool.
7514         (~signal_catchpoint): Remove.
7515         (signal_catchpoint_insert_location)
7516         (signal_catchpoint_remove_location)
7517         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7518         (signal_catchpoint_print_mention)
7519         (signal_catchpoint_print_recreate)
7520         (signal_catchpoint_explains_signal): Update.
7521         (create_signal_catchpoint): Change type of "filter" and
7522         "catch_all".
7523         (catch_signal_split_args): Return a std::vector.  Change type of
7524         "catch_all".
7525         (catch_signal_command): Update.
7526
7527 2017-07-20  Pedro Alves  <palves@redhat.com>
7528
7529         * ada-lang.c (ada_language_defn): Make extern.
7530         (_initialize_ada_language): Remove add_language call.
7531         * c-lang.c (c_language_defn, cplus_language_defn)
7532         (asm_language_defn, minimal_language_defn): Make extern.
7533         (_initialize_c_language): Delete.
7534         * completer.c (compare_cstrings): Delete, moved to utils.h.
7535         * d-lang.c (d_language_defn): Make extern.
7536         (_initialize_d_language): Remove add_language calls.
7537         * defs.h (enum language): Add comment.
7538         * f-lang.c (f_language_defn): Make extern.
7539         (_initialize_f_language): Remove add_language call.
7540         * go-lang.c (go_language_defn): Make extern.
7541         (_initialize_go_language): Remove add_language call.
7542         * language.c: Include <algorithm>.
7543         (languages): Redefine as const array.
7544         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7545         (set_language_command): Handle "local".  Use for-range loop.
7546         (set_language): Remove loop.
7547         (language_enum): Rewrite.
7548         (language_def, language_str): Remove loops.
7549         (add_language): Delete.
7550         (add_set_language_command): New, based on add_languages.
7551         (skip_language_trampoline): Adjust.
7552         (local_language_defn): Delete.
7553         (language_gdbarch_post_init): Adjust.
7554         (_initialize_language): Remove add_language calls.  Call
7555         add_set_language_command.
7556         * language.h (add_language): Delete.
7557         (auto_language_defn)
7558         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7559         (asm_language_defn, c_language_defn, cplus_language_defn)
7560         (d_language_defn, f_language_defn, go_language_defn)
7561         (m2_language_defn, objc_language_defn, opencl_language_defn)
7562         (pascal_language_defn, rust_language_defn): Declare.
7563         * m2-lang.c (m2_language_defn): Make extern.
7564         (_initialize_m2_language): Remove add_language call.
7565         * objc-lang.c (objc_language_defn): Make extern.
7566         (_initialize_objc_language): Remove add_language call.
7567         * opencl-lang.c (opencl_language_defn): Make extern.
7568         (_initialize_opencl_language): Remove add_language call.
7569         * p-lang.c (pascal_language_defn): Make extern.
7570         (_initialize_pascal_language): Delete.
7571         * rust-lang.c (rust_language_defn): Make extern.
7572         (_initialize_rust_language): Delete.
7573         * utils.h (compare_cstrings): New static inline function.
7574
7575 2017-07-20  Pedro Alves  <palves@redhat.com>
7576
7577         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7578         (get_var_value): Constify parameters.
7579         (get_int_var_value): Change prototype.
7580         (to_fixed_range_type): Adjust.
7581         * ada-lang.h (get_int_var_value): Change prototype.
7582
7583 2017-07-20  Pedro Alves  <palves@redhat.com>
7584
7585         * dwarf2read.c (dw2_lookup_symbol): Use
7586         SYMBOL_MATCHES_SEARCH_NAME.
7587         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7588
7589 2017-07-20  Pedro Alves  <palves@redhat.com>
7590
7591         * block.c (block_iter_name_step, block_iter_name_first)
7592         (block_iter_name_next): Delete.
7593         (block_lookup_symbol_primary): Adjust to use
7594         dict_iter_match_first/dict_iter_match_next.
7595         * block.h (block_iter_name_first, block_iter_name_next): Delete
7596         declarations.
7597         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7598         dict_iter_match_first/dict_iter_match_next.
7599
7600 2017-07-20  Pedro Alves  <palves@redhat.com>
7601
7602         * cp-support.c (cp_find_first_component_aux): Add missing case for
7603         end of string.
7604
7605 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7606
7607         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7608         of dwo_cu's dwo_file.
7609
7610 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7611
7612         * remote.c (store_registers_using_G): Remove one line comment.
7613
7614 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7615
7616         * regcache.c (regcache_cpy): Simplify it.
7617         (regcache::cpy_no_passthrough): Remove it.
7618         * regcache.h (cpy_no_passthrough): Remove it.
7619         (regcache_dup, regcache_cpy): Update comments.
7620
7621 2017-07-18  Pedro Alves  <palves@redhat.com>
7622
7623         * remote-sim.c (sim_command_completer): Adjust to work with a
7624         completion_tracker instead of a VEC.
7625
7626 2017-07-17  Pedro Alves  <palves@redhat.com>
7627
7628         * completer.c (complete_source_filenames): New function.
7629         (complete_address_and_linespec_locations): New function.
7630         (location_completer): Use complete_address_and_linespec_locations.
7631         (completion_tracker::build_completion_result): Honor the tracker's
7632         request to suppress append.
7633         * completer.h (completion_tracker::suppress_append_ws)
7634         (completion_tracker::set_suppress_append_ws): New methods.
7635         (completion_tracker::m_suppress_append_ws): New field.
7636         (complete_source_filenames): New declaration.
7637         * linespec.c (linespec_complete_what): New.
7638         (struct ls_parser) <complete_what, completion_word,
7639         completion_quote_char, completion_quote_end, completion_tracker>:
7640         New fields.
7641         (string_find_incomplete_keyword_at_end): New.
7642         (linespec_lexer_lex_string): Record quote char.  If in completion
7643         mode, don't throw.
7644         (linespec_lexer_consume_token): Advance the completion word point.
7645         (linespec_lexer_peek_token): Save/restore completion info.
7646         (save_stream_and_consume_token): New.
7647         (set_completion_after_number): New.
7648         (linespec_parse_basic): Set what to complete next depending on
7649         token.  Handle function and label completions specially.
7650         (parse_linespec): Disable objc shortcut in completion mode.  Set
7651         what to complete next depending on token type.  Skip keyword if in
7652         completion mode.
7653         (complete_linespec_component, linespec_complete): New.
7654         * linespec.h (linespec_complete): Declare.
7655
7656 2017-07-17  Pedro Alves  <palves@redhat.com>
7657
7658         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7659         Handle 'operator<' / 'operator<<'.
7660
7661 2017-07-17  Pedro Alves  <palves@redhat.com>
7662
7663         * completer.c (collect_explicit_location_matches): Handle
7664         MATCH_LABEL.
7665         (convert_explicit_location_to_linespec): New, factored out from
7666         ...
7667         (convert_explicit_location_to_sals): ... this.
7668         (complete_label): New.
7669         (linespec_complete_label, find_label_symbols_in_block): New.
7670         (find_label_symbols): Add completion_mode parameter and adjust to
7671         call find_label_symbols_in_block.
7672         * linespec.h (linespec_complete_label): Declare.
7673
7674 2017-07-17  Pedro Alves  <palves@redhat.com>
7675
7676         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7677         complete_symbol_mode parameter.
7678         * cli/cli-cmds.c (complete_command): Get the completion result out
7679         of the handle_brkchars tracker if used a custom word point.
7680         * completer.c: Include "linespec.h".
7681         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7682         (advance_to_expression_complete_word_point): New.
7683         (completion_tracker::completes_to_completion_word): New.
7684         (complete_files_symbols): Pass down
7685         complete_symbol_mode::EXPRESSION.
7686         (explicit_options, probe_options): New.
7687         (collect_explicit_location_matches): Complete on the
7688         explictit_loc->foo instead of word.  Use
7689         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7690         keyword and options completions.
7691         (backup_text_ptr): Delete.
7692         (skip_keyword): New.
7693         (complete_explicit_location): Remove 'word' parameter.  Add
7694         language, quoted_arg_start and quoted_arg_end parameters.
7695         Rewrite, parsing left to right.
7696         (location_completer): Rewrite.
7697         (location_completer_handle_brkchars): New function.
7698         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7699         (enum complete_line_internal_reason): Adjust comments.
7700         (completion_tracker::discard_completions): New.
7701         (completer_handle_brkchars_func_for_completer): Handle
7702         location_completer.
7703         (gdb_custom_word_point_brkchars)
7704         (gdb_org_rl_basic_quote_characters): New.
7705         (gdb_completion_word_break_characters_throw)
7706         (completion_find_completion_word): Handle trackers that use a
7707         custom word point.
7708         (completion_tracker::advance_custom_word_point_by): New.
7709         (completion_tracker::build_completion_result): Don't rely on
7710         readline appending the quote char.
7711         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7712         use a custom word point.
7713         (gdb_rl_attempted_completion_function): Restore
7714         rl_basic_quote_characters.
7715         * completer.h (class completion_tracker): Extend intro comment.
7716         (completion_tracker::set_quote_char)
7717         (completion_tracker::quote_char)
7718         (completion_tracker::set_use_custom_word_point)
7719         (completion_tracker::use_custom_word_point)
7720         (completion_tracker::custom_word_point)
7721         (completion_tracker::set_custom_word_point)
7722         (completion_tracker::advance_custom_word_point_by)
7723         (completion_tracker::completes_to_completion_word)
7724         (completion_tracker::discard_completions): New methods.
7725         (completion_tracker::m_quote_char)
7726         (completion_tracker::m_use_custom_word_point)
7727         (completion_tracker::m_custom_word_point): New fields.
7728         (advance_to_expression_complete_word_point): Declare.
7729         * f-lang.c (f_collect_symbol_completion_matches): Add
7730         complete_symbol_mode parameter.
7731         * language.h (struct language_defn)
7732         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7733         parameter.
7734         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7735         (linespec_complete_function): New function.
7736         (linespec_lexer_lex_keyword): Adjust.
7737         * linespec.h (linespec_keywords, linespec_complete_function): New
7738         declarations.
7739         * location.c (find_end_quote): New function.
7740         (explicit_location_lex_one): Add explicit_completion_info
7741         parameter.  Save quoting info.  Don't throw if being called for
7742         completion.  Don't handle Ada operators here.
7743         (is_cp_operator, skip_op_false_positives, first_of)
7744         (explicit_location_lex_one_function): New function.
7745         (string_to_explicit_location): Replace 'dont_throw' parameter with
7746         an explicit_completion_info pointer parameter.  Handle it.  Don't
7747         use explicit_location_lex_one to lex function names.  Use
7748         explicit_location_lex_one_function instead.
7749         * location.h (struct explicit_completion_info): New.
7750         (string_to_explicit_location): Replace 'dont_throw' parameter with
7751         an explicit_completion_info pointer parameter.
7752         * symtab.c (default_collect_symbol_completion_matches_break_on):
7753         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7754         (default_collect_symbol_completion_matches)
7755         (collect_symbol_completion_matches): Add complete_symbol_mode
7756         parameter.
7757         (collect_symbol_completion_matches_type): Pass down
7758         complete_symbol_mode::EXPRESSION.
7759         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7760         parameter.  Handle LINESPEC mode.
7761         * symtab.h (complete_symbol_mode): New.
7762         (default_collect_symbol_completion_matches_break_on)
7763         (default_collect_symbol_completion_matches)
7764         (collect_symbol_completion_matches)
7765         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7766         parameter.
7767
7768 2017-07-17  Pedro Alves  <palves@redhat.com>
7769
7770         * utils.c (enum class strncmp_iw_mode): New.
7771         (strcmp_iw): Rename to ...
7772         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7773         parameters.  Handle them.
7774         (strncmp_iw): New.
7775         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7776         * utils.h (strncmp_iw): Declare.
7777         (strcmp_iw): Move describing comments here.
7778
7779 2017-07-17  Pedro Alves  <palves@redhat.com>
7780
7781         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7782         CP_OPERATOR_STR.
7783         * c-typeprint.c (is_type_conversion_operator): Use
7784         CP_OPERATOR_STR.
7785         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7786         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7787         CP_OPERATOR_LEN.
7788         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7789         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7790         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7791         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7792         CP_OPERATOR_STR.
7793         * location.c: Include "cp-support.h".
7794         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7795         CP_OPERATOR_STR.
7796         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7797         CP_OPERATOR_LEN.
7798
7799 2017-07-17  Pedro Alves  <palves@redhat.com>
7800
7801         * cli/cli-cmds.c (complete_command): Use a completion tracker
7802         along with completion_find_completion_word for handle_brkchars
7803         phase.
7804         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7805         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7806         (struct gdb_rl_completion_word_info): New.
7807         (gdb_rl_find_completion_word): New.
7808         (completion_find_completion_word): New.
7809         * completer.h (completion_find_completion_word): Declare.
7810
7811 2017-07-17  Pedro Alves  <palves@redhat.com>
7812
7813         * ada-lang.c (symbol_completion_match): Adjust comments.
7814         (symbol_completion_add): Replace vector parameter with
7815         completion_tracker parameter.  Use it.
7816         (ada_make_symbol_completion_list): Rename to...
7817         (ada_collect_symbol_completion_matches): ... this.  Add
7818         completion_tracker parameter and use it.
7819         (ada_language_defn): Adjust.
7820         * break-catch-syscall.c (catch_syscall_completer): Adjust
7821         prototype and work with completion_tracker instead of VEC.
7822         * breakpoint.c (condition_completer): Adjust prototype and work
7823         with completion_tracker instead of VEC.
7824         * c-lang.c (c_language_defn, cplus_language_defn)
7825         (asm_language_defn, minimal_language_defn): Adjust to renames.
7826         * cli/cli-cmds.c (complete_command): Rework using
7827         completion_tracker.  Catch exceptions when completing.
7828         * cli/cli-decode.c (integer_unlimited_completer)
7829         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7830         with completion_tracker instead of VEC.
7831         * command.h (struct completion_tracker): Forward declare.
7832         (completer_ftype, completer_handle_brkchars_ftype): Change
7833         types.
7834         (complete_on_cmdlist, complete_on_enum): Adjust.
7835         * completer.c: Include <algorithm>.
7836         (struct gdb_completer_state): New.
7837         (current_completion): New global.
7838         (readline_line_completion_function): Delete.
7839         (noop_completer, filename_completer)
7840         (filename_completer_handle_brkchars, complete_files_symbols)
7841         (linespec_location_completer): Adjust to work with a
7842         completion_tracker instead of a VEC.
7843         (string_or_empty): New.
7844         (collect_explicit_location_matches): Adjust to work with a
7845         completion_tracker instead of a VEC.
7846         (explicit_location_completer): Rename to ...
7847         (complete_explicit_location): ... this and adjust to work with a
7848         completion_tracker instead of a VEC.
7849         (location_completer): Adjust to work with a completion_tracker
7850         instead of a VEC.
7851         (add_struct_fields): Adjust to work with a completion_list instead
7852         of VEC.
7853         (expression_completer): Rename to ...
7854         (complete_expression): ... this and adjust to work with a
7855         completion_tracker instead of a VEC.  Use complete_files_symbols.
7856         (expression_completer): Reimplement on top of complete_expression.
7857         (symbol_completer): Adjust to work with a completion_tracker
7858         instead of a VEC.
7859         (enum complete_line_internal_reason): Add describing comments.
7860         (complete_line_internal_normal_command): Adjust to work with a
7861         completion_tracker instead of a VEC.
7862         (complete_line_internal): Rename to ...
7863         (complete_line_internal_1): ... this and adjust to work with a
7864         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7865         handle_brkchars phase.
7866         (new_completion_tracker): Delete.
7867         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7868         complete_line_internal_1.
7869         (free_completion_tracker): Delete.
7870         (INITIAL_COMPLETION_HTAB_SIZE): New.
7871         (completion_tracker::completion_tracker)
7872         (completion_tracker::~completion_tracker): New.
7873         (maybe_add_completion): Delete.
7874         (completion_tracker::maybe_add_completion)
7875         (completion_tracker::add_completion)
7876         (completion_tracker::add_completions): New.
7877         (throw_max_completions_reached_error): Delete.
7878         (complete_line): Adjust to work with a completion_tracker instead
7879         of a VEC.  Don't create a completion_tracker_t or check for max
7880         completions here.
7881         (command_completer, command_completer_handle_brkchars)
7882         (signal_completer, reg_or_group_completer_1)
7883         (reg_or_group_completer, default_completer_handle_brkchars):
7884         Adjust to work with a completion_tracker.
7885         (gdb_completion_word_break_characters_throw): New.
7886         (gdb_completion_word_break_characters): Reimplement.
7887         (line_completion_function): Delete.
7888         (completion_tracker::recompute_lowest_common_denominator)
7889         (expand_preserving_ws)
7890         (completion_tracker::build_completion_result)
7891         (completion_result::completion_result)
7892         (completion_result::completion_result)
7893         (completion_result::~completion_result)
7894         (completion_result::completion_result)
7895         (completion_result::release_match_list, compare_cstrings)
7896         (completion_result::sort_match_list)
7897         (completion_result::reset_match_list)
7898         (gdb_rl_attempted_completion_function_throw)
7899         (gdb_rl_attempted_completion_function): New.
7900         * completer.h (completion_list, struct completion_result)
7901         (class completion_tracker): New.
7902         (complete_line): Add completion_tracker parameter.
7903         (readline_line_completion_function): Delete.
7904         (gdb_rl_attempted_completion_function): New.
7905         (noop_completer, filename_completer, expression_completer)
7906         (location_completer, symbol_completer, command_completer)
7907         (signal_completer, reg_or_group_completer): Update prototypes.
7908         (completion_tracker_t, new_completion_tracker)
7909         (make_cleanup_free_completion_tracker): Delete.
7910         (enum maybe_add_completion_enum): Delete.
7911         (maybe_add_completion): Delete.
7912         (throw_max_completions_reached_error): Delete.
7913         * corefile.c (complete_set_gnutarget): Adjust to work with a
7914         completion_tracker instead of a VEC.
7915         * cp-abi.c (cp_abi_completer): Adjust to work with a
7916         completion_tracker instead of a VEC.
7917         * d-lang.c (d_language_defn): Adjust.
7918         * disasm.c (disassembler_options_completer): Adjust to work with a
7919         completion_tracker instead of a VEC.
7920         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7921         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7922         with a completion_tracker instead of a VEC.
7923         (f_language_defn): Adjust.
7924         * go-lang.c (go_language_defn): Adjust.
7925         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7926         Adjust to work with a completion_tracker instead of a VEC.
7927         * infrun.c (handle_completer): Likewise.
7928         * interps.c (interpreter_completer): Likewise.
7929         * interps.h (interpreter_completer): Likewise.
7930         * language.c (unknown_language_defn, auto_language_defn)
7931         (local_language_defn): Adjust.
7932         * language.h (language_defn::la_make_symbol_completion_list):
7933         Rename to ...
7934         (language_defn::la_collect_symbol_completion_matches): ... this
7935         and adjust to work with a completion_tracker instead of a VEC.
7936         * m2-lang.c (m2_language_defn): Adjust.
7937         * objc-lang.c (objc_language_defn): Adjust.
7938         * opencl-lang.c (opencl_language_defn): Adjust.
7939         * p-lang.c (pascal_language_defn): Adjust.
7940         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7941         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7942         with a completion_tracker.
7943         * rust-lang.c (rust_language_defn): Adjust.
7944         * symtab.c (free_completion_list, do_free_completion_list)
7945         (return_val, completion_tracker): Delete.
7946         (completion_list_add_name, completion_list_add_symbol)
7947         (completion_list_add_msymbol, completion_list_objc_symbol)
7948         (completion_list_add_fields, add_symtab_completions): Add
7949         completion_tracker parameter and use it.
7950         (default_make_symbol_completion_list_break_on_1): Rename to...
7951         (default_collect_symbol_completion_matches_break_on): ... this.
7952         Add completion_tracker parameter and use it instead of allocating
7953         a completion tracker here.
7954         (default_make_symbol_completion_list_break_on): Delete old
7955         implementation.
7956         (default_make_symbol_completion_list): Delete.
7957         (default_collect_symbol_completion_matches): New.
7958         (make_symbol_completion_list): Delete.
7959         (collect_symbol_completion_matches): New.
7960         (make_symbol_completion_type): Rename to ...
7961         (collect_symbol_completion_matches_type): ... this.  Add
7962         completion_tracker parameter and use it instead of VEC.
7963         (make_file_symbol_completion_list_1): Rename to...
7964         (collect_file_symbol_completion_matches): ... this.  Add
7965         completion_tracker parameter and use it instead of VEC.
7966         (make_file_symbol_completion_list): Delete.
7967         (add_filename_to_list): Use completion_list instead of a VEC.
7968         (add_partial_filename_data::list): Now a completion_list.
7969         (make_source_files_completion_list): Work with a completion_list
7970         instead of a VEC.
7971         * symtab.h: Include "completer.h".
7972         (default_make_symbol_completion_list_break_on)
7973         (default_make_symbol_completion_list, make_symbol_completion_list)
7974         (make_symbol_completion_type, make_file_symbol_completion_list)
7975         (make_source_files_completion_list): Delete.
7976         (default_collect_symbol_completion_matches_break_on)
7977         (default_collect_symbol_completion_matches)
7978         (collect_symbol_completion_matches)
7979         (collect_symbol_completion_matches_type)
7980         (collect_file_symbol_completion_matches)
7981         (make_source_files_completion_list): New.
7982         * top.c (init_main): Don't install a rl_completion_entry_function
7983         hook.  Install a rl_attempted_completion_function hook instead.
7984         * tui/tui-layout.c (layout_completer): Adjust to work with a
7985         completion_tracker.
7986         * tui/tui-regs.c (tui_reggroup_completer):
7987         * tui/tui-win.c (window_name_completer, focus_completer)
7988         (winheight_completer): Adjust to work with a completion_tracker.
7989         * value.c: Include "completer.h".
7990         (complete_internalvar): Adjust to work with a completion_tracker.
7991         * value.h (complete_internalvar): Likewise.
7992
7993 2017-07-17  Pedro Alves  <palves@redhat.com>
7994
7995         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7996         renames.
7997         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7998         comments to completer_ftype's declaration.
7999         <completer_handle_brkchars>: Change type to
8000         completer_handle_brkchars_ftype.
8001         * command.h (completer_ftype): Add describing comment and give
8002         names to parameters.
8003         (completer_ftype_void): Rename to ...
8004         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8005         (set_cmd_completer_handle_brkchars): Adjust.
8006         * completer.c (filename_completer_handle_brkchars): New function.
8007         (complete_line_internal_normal_command): New function, factored
8008         out from ...
8009         (complete_line_internal): ... here.
8010         (command_completer_handle_brkchars)
8011         (default_completer_handle_brkchars)
8012         (completer_handle_brkchars_func_for_completer): New functions.
8013         * completer.h (set_gdb_completion_word_break_characters): Delete
8014         declaration.
8015         (completer_handle_brkchars_func_for_completer): New declaration.
8016         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8017         completer_handle_brkchars_func_for_completer.
8018
8019 2017-07-17  Pedro Alves  <palves@redhat.com>
8020
8021         * completer.c (symbol_completer): New function, based on
8022         make_symbol_completion_list_fn.
8023         * completer.h (symbol_completer): New declaration.
8024         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8025         * python/py-cmd.c (completers): Adjust.
8026         * symtab.c (make_symbol_completion_list_fn): Delete.
8027         * symtab.h (make_symbol_completion_list_fn): Delete.
8028         * cli/cli-decode.c (add_cmd): Adjust.
8029
8030 2017-07-17  Pedro Alves  <palves@redhat.com>
8031
8032         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8033         * dwarf2read.c: Include "filename-seen-cache.h".
8034         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8035         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8036         * filename-seen-cache.c: New file.
8037         * filename-seen-cache.h: New file.
8038         * symtab.c: Include "filename-seen-cache.h".
8039         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8040         (create_filename_seen_cache, clear_filename_seen_cache)
8041         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8042         to filename-seen-cache.h/filename-seen-cache.c.
8043         (output_source_filename, sources_info)
8044         (maybe_add_partial_symtab_filename)
8045         (make_source_files_completion_list): Adjust to use
8046         filename_seen_cache.
8047
8048 2017-07-17  Pedro Alves  <palves@redhat.com>
8049
8050         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8051         fields.
8052         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8053         dwarf2_debug_sections*)): New.
8054         (dwarf2_per_objfile::dwarf2_per_objfile(const
8055         dwarf2_per_objfile&)): Declare as deleted.
8056         (dwarf2_per_objfile::operator=): Declare as deleted.
8057         (dwarf2_per_objfile::dwarf2_per_objfile)
8058         (dwarf2_per_objfile::~dwarf2_per_objfile)
8059         (dwarf2_per_objfile::free_cached_comp_units): New.
8060         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8061         ctor.  Call dwarf2_per_objfile's ctor manually.
8062         (dwarf2_locate_sections): Deleted/refactored as ...
8063         (dwarf2_per_objfile::locate_sections): ... this new method.
8064         (free_cached_comp_units): Defer to
8065         dwarf2_per_objfile::free_cached_comp_units.
8066         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8067
8068 2017-07-14  Tom Tromey  <tom@tromey.com>
8069
8070         PR rust/21764:
8071         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8072         parameter.
8073         <UNOP_SIZEOF>: Split into separate case.
8074         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8075
8076 2017-07-14  Tom Tromey  <tom@tromey.com>
8077
8078         PR rust/21763:
8079         * symtab.c (symbol_matches_domain): Add language_rust to special
8080         case.
8081         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8082         treat LOC_TYPEDEF symbols as variables.
8083
8084 2017-07-14  Pedro Alves  <palves@redhat.com>
8085
8086         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8087         symtabs matching all symtabs with SRCFILE as file name instead of
8088         only considering the first hit, with lookup_symtab.
8089
8090 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8091
8092         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8093         operator_name parameters.
8094         (gen_expr): Update function call.
8095
8096 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8097
8098         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8099         parameter.
8100         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8101         Likewise.
8102         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8103         parameter, use agent_expr::gdbarch instead, update function
8104         calls.
8105         (locexpr_tracepoint_var_ref): Likewise.
8106         (loclist_tracepoint_var_ref): Likewise.
8107         * ax-gdb.c (gen_trace_static_fields): Likewise.
8108         (gen_traced_pop): Likewise.
8109         (gen_frame_args_address): Likewise.
8110         (gen_frame_locals_address): Likewise.
8111         (gen_var_ref): Likewise.
8112         (gen_struct_ref_recursive): Likewise.
8113         (gen_static_field): Likewise.
8114         (gen_maybe_namespace_elt): Likewise.
8115         (gen_expr): Likewise.
8116         (gen_trace_for_var): Likewise.
8117         (gen_trace_for_expr): Likewise.
8118         (gen_trace_for_return_address): Likewise.
8119
8120 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8121
8122         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8123         parameter.
8124         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8125
8126 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8127
8128         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8129         from ax, update calls.
8130         (gen_usual_arithmetic): Likewise.
8131         (gen_integral_promotions): Likewise.
8132         (gen_bitfield_ref): Likewise.
8133         (gen_primitive_field): Likewise.
8134         (gen_struct_ref_recursive): Likewise.
8135         (gen_struct_ref): Likewise.
8136         (gen_maybe_namespace_elt): Likewise.
8137         (gen_struct_elt_for_reference): Likewise.
8138         (gen_namespace_elt): Likewise.
8139         (gen_aggregate_elt_ref): Likewise.
8140         (gen_expr): Get gdbarch from ax, update calls.
8141         (gen_expr_binop_rest): Likewise.
8142
8143 2017-07-13  Pedro Alves  <palves@redhat.com>
8144
8145         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8146         as default tdesc.
8147         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8148         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8149         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8150         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8151         tdep.
8152         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8153         Get final tdesc from the tdep.
8154         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8155         default tdesc.
8156         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8157         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8158         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8159         Use it as default tdesc.
8160         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8161         down to amd_init_abi.  No longer handle fallback tdesc here.
8162         * amd64-tdep.h (tdesc_x32): Declare.
8163         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8164         parameter.
8165         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8166         as default tdesc.
8167
8168 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8169
8170         * s390-linux-tdep.c (s390_process_record): Add support for
8171         instructions new in arch12.
8172
8173 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8174
8175         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8176         PT_GETFSBASE and PT_GETGSBASE.
8177         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8178         PT_SETGSBASE.
8179
8180 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8181
8182         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8183         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8184         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8185         those rules.
8186         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8187         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8188         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8189         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8190         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8191         * features/i386/amd64.xml: Add 64bit-segments.xml.
8192         * features/i386/amd64-avx-avx512.c: Regenerated.
8193         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8194         * features/i386/amd64-avx-mpx.c: Regenerated.
8195         * features/i386/amd64-avx.c: Regenerated.
8196         * features/i386/amd64-mpx.c: Regenerated.
8197         * features/i386/amd64.c: Regenerated.
8198         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8199         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8200         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8201         * regformats/i386/amd64-avx.dat: Regenerated.
8202         * regformats/i386/amd64-mpx.dat: Regenerated.
8203         * regformats/i386/amd64.dat: Regenerated.
8204
8205 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8206
8207         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8208         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8209
8210 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8211
8212         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8213         unsetenv.
8214         * gnulib/aclocal.m4: Regenerate.
8215         * gnulib/config.in: Regenerate.
8216         * gnulib/configure: Regenerate.
8217         * gnulib/import/Makefile.am: Regenerate.
8218         * gnulib/import/Makefile.in: Regenerate.
8219         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8220         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8221         * gnulib/import/m4/environ.m4: New file.
8222         * gnulib/import/m4/setenv.m4: New file.
8223         * gnulib/import/setenv.c: New file.
8224         * gnulib/import/unsetenv.c: New file.
8225
8226 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8227
8228         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8229         address when op is DW_OP_addr.
8230
8231 2017-07-09  Tom Tromey  <tom@tromey.com>
8232
8233         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8234         check and apply to outer type.
8235
8236 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8237
8238         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8239         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8240         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8241         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8242
8243 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8244
8245         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8246
8247 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8248
8249         * corelow.c (get_core_siginfo): Remove.
8250         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8251         instead of get_core_siginfo.
8252         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8253         * gdbarch.h: Re-generate.
8254         * gdbarch.c: Re-generate.
8255         * linux-tdep.c (linux_core_xfer_siginfo): New.
8256         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8257
8258 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8259
8260         * corelow.c (thread_section_name): Move to ...
8261         * gdbcore.h (thread_section_name): ... here.
8262
8263 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8264
8265         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8266         (struct siginfo32): New.
8267         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8268         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8269         via ptrace(PT_LWPINFO).
8270
8271 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8272
8273         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8274         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8275         (fbsd_get_siginfo_type): New.
8276         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8277         (_initialize_fbsd_tdep): New.
8278
8279 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8280
8281         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8282         a singular dwo_unit*) to support multiple CUs in the same way that
8283         multiple TUs are supported.
8284         (create_cus_hash_table): Replace create_dwo_cu with a function for
8285         parsing multiple CUs from a DWO file.
8286         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8287         create_dwo_cu.
8288         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8289         htab_find, rather than comparing the signature to a singleton CU in
8290         the dwo_file.
8291
8292 2017-07-06  Pedro Alves  <palves@redhat.com>
8293
8294         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8295
8296 2017-07-04  Pedro Alves  <palves@redhat.com>
8297
8298         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8299         * gdbtypes.h (TYPE_STATIC): Delete.
8300         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8301         is_synchronized, is_native>: Delete.
8302         <dummy>: Bump.
8303         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8304         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8305         (TYPE_FN_FIELD_ABSTRACT): Delete.
8306
8307 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8308
8309         * buffer.h (buffer_finish): Fix spelling mistakes.
8310
8311 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8312
8313         * .dir-locals.el: Automatically switch to C-style comments in
8314         versions of Emacs that support the feature.
8315
8316 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8317             Pedro Alves  <palves@redhat.com>
8318
8319         PR cli/21688
8320         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8321         (process_next_line): New variable 'inline_cmd'.
8322         Adjust 'if' clauses for "python", "compile" and "guile" to use
8323         'command_name_equals' and check for '!inline_cmd'.
8324
8325 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8326
8327         PR cli/21688
8328         * cli/cli-script.c (command_name_equals_not_inline): New function.
8329         (process_next_line): Adjust 'if' clauses for "python", "compile"
8330         and "guile" to use command_name_equals_not_inline.
8331
8332 2017-06-29  Pedro Alves  <palves@redhat.com>
8333
8334         * completer.c (expression_completer): Call
8335         linespec_location_completer instead of location_completer.
8336
8337 2017-06-29  Pedro Alves  <palves@redhat.com>
8338
8339         * completer.c (expression_completer): Remove code that recomputes
8340         'text' from 'word'.
8341
8342 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8343
8344         * regformats/regdat.sh: Generate code with
8345         "ifndef IN_PROCESS_AGENT".
8346
8347 2017-06-28  Pedro Alves  <palves@redhat.com>
8348
8349         * command.h: Include "common/scoped_restore.h".
8350
8351 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8352
8353         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8354         instead of obstack_grow.
8355
8356 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8357
8358         PR gdb/21337
8359         * symfile.c (reread_symbols): Call objfiles_changed just before
8360         read_symbols.
8361
8362 2017-06-27  Pedro Alves  <palves@redhat.com>
8363
8364         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8365         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8366         (completion_list_add_symbol, completion_list_add_msymbol):
8367         ... these new functions.
8368         (add_symtab_completions)
8369         (default_make_symbol_completion_list_break_on_1): Adjust.
8370
8371 2017-06-27  Pedro Alves  <palves@redhat.com>
8372
8373         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8374         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8375         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8376         dtor.
8377         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8378         'storage_obstack' field an auto_obstack.  In-class initialize all
8379         non-bitfield fields.  Make minsyms_read bool.
8380         * symfile.c (read_symbols): Adjust.
8381
8382 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8383
8384         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8385         (gdbsim_store_register): Likewise.
8386
8387 2017-06-27  Pedro Alves  <palves@redhat.com>
8388
8389         * c-exp.y (name_obstack): Now an auto_obstack.
8390         (yylex): Use auto_obstack::clear.
8391         (c_parse): Use auto_obstack::clear instead of reinitializing and
8392         freeing the obstack.
8393         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8394         * d-exp.y (name_obstack): Now an auto_obstack.
8395         (yylex): Use auto_obstack::clear.
8396         (d_parse): Use auto_obstack::clear instead of reinitializing and
8397         freeing the obstack.
8398         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8399         auto_obstack.
8400         * dwarf2read.c (create_addrmap_from_index)
8401         (dwarf2_build_psymtabs_hard)
8402         (update_enumeration_type_from_children): Likewise.
8403         * gdb_obstack.h (auto_obstack): New type.
8404         * go-exp.y (name_obstack): Now an auto_obstack.
8405         (build_packaged_name): Use auto_obstack::clear.
8406         (go_parse): Use auto_obstack::clear instead of reinitializing and
8407         freeing the obstack.
8408         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8409         auto_obstack.
8410         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8411         * rust-exp.y (work_obstack): Now an auto_obstack.
8412         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8413         reinitializing and freeing the obstack.
8414         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8415         (host_char_to_target): Use auto_obstack.
8416         * utils.h (make_cleanup_obstack_free): Delete declaration.
8417         * valprint.c (generic_emit_char, generic_printstr): Use
8418         auto_obstack.
8419
8420 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8421
8422         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8423         thread.
8424         (darwin_init_thread_list): Don't update dummy thread.
8425         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8426
8427 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8428
8429         * record-full.c (netorder16): Remove.
8430
8431 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8432
8433         * common/diagnostics.h: Define macros for GCC.
8434         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8435         * common/vec.h: Include diagnostics.h.
8436         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8437         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8438         warning.
8439
8440 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8441
8442         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8443         New macro.
8444         * ada-lex.l: Ignore deprecated register warnings.
8445
8446 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8447
8448         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8449         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8450
8451 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8452
8453         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8454         its own line.
8455
8456 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8457
8458         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8459
8460 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8461
8462         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8463         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8464         (xtensa_register_read_masked): Likewise.
8465
8466 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8467
8468         * common/environ.c (gdb_environ::unset): Update comment.
8469
8470 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8471
8472         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8473         registers.
8474
8475 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8476
8477         * record-full.c (record_full_exec_insn): Use byte_vector.
8478
8479 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8480
8481         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8482         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8483
8484 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8485
8486         * remote.c (cached_reg): Move from here...
8487         * regcache.h (cached_reg): ...to here.
8488         * python/py-unwind.c (struct reg_info): Remove.
8489         (cached_frame_info): Use cached_reg_t.
8490         (pyuw_prev_register): Likewise.
8491         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8492         (pyuw_dealloc_cache): Free all registers.
8493
8494 2017-06-22  Pedro Alves  <palves@redhat.com>
8495             Simon Marchi  <simon.marchi@ericsson.com>
8496
8497         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8498         warning.
8499         * common/diagnostics.h: New file.
8500
8501 2017-06-22  Pedro Alves  <palves@redhat.com>
8502
8503         * common/agent.h: Add include guards.
8504
8505 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8506
8507         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8508         talk about addressable units instead of bytes.
8509
8510 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8511
8512         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8513         of '::const_iterator'.
8514
8515 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8516
8517         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8518         'unittests/environ-selftests.c'.
8519         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8520         * charset.c (find_charset_names): Declare object 'iconv_env'.
8521         Update code to use 'iconv_env' object.  Remove call to
8522         'free_environ'.
8523         * common/environ.c: Include <utility>.
8524         (make_environ): Delete function.
8525         (free_environ): Delete function.
8526         (gdb_environ::clear): New function.
8527         (gdb_environ::operator=): New function.
8528         (gdb_environ::get): Likewise.
8529         (environ_vector): Delete function.
8530         (set_in_environ): Delete function.
8531         (gdb_environ::set): New function.
8532         (unset_in_environ): Delete function.
8533         (gdb_environ::unset): New function.
8534         (gdb_environ::envp): Likewise.
8535         * common/environ.h: Include <vector>.
8536         (struct gdb_environ): Delete; transform into...
8537         (class gdb_environ): ... this class.
8538         (free_environ): Delete prototype.
8539         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8540         environ_vector): Likewise.
8541         * infcmd.c (run_command_1): Update code to call
8542         'envp' from 'gdb_environ' class.
8543         (environment_info): Update code to call methods from 'gdb_environ'
8544         class.
8545         (unset_environment_command): Likewise.
8546         (path_info): Likewise.
8547         (path_command): Likewise.
8548         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8549         (inferior::inferior): Initialize 'environment' using the host's
8550         information.
8551         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8552         Include "environ.h".
8553         (class inferior) <environment>: Change type from 'struct
8554         gdb_environ' to 'gdb_environ'.
8555         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8556         methods from 'gdb_environ' class.
8557         * solib.c (solib_find_1): Likewise
8558         * unittests/environ-selftests.c: New file.
8559
8560 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8561
8562         * features/i386/i386-linux.xml: Exchange the order of including
8563         32bit-linux.xml and 32bit-sse.xml.
8564         * features/i386/i386-linux.c: Regenerated.
8565
8566 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8567
8568         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8569         Delete copy ctor and assignment operator.
8570         (tdesc_type): Likewise.
8571         (tdesc_feature): Likewise.
8572         (tdesc_free_reg): Remove.
8573         (tdesc_create_reg): Use new.
8574         (tdesc_free_type): Remove.
8575         (tdesc_create_vector): Use new.
8576         (tdesc_create_union): Likewise.
8577         (tdesc_create_flags): Likewise.
8578         (tdesc_create_enum): Likewise.
8579         (tdesc_free_feature): Delete.
8580         (free_target_description): Use delete.
8581
8582 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8583
8584         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8585         registers.
8586
8587 2017-06-19  Pedro Alves  <palves@redhat.com>
8588
8589         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8590         after gdb::unlinker.
8591
8592 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8593
8594         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8595         gdb_environ to access an environment variable.
8596
8597 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8598
8599         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8600         gdb_byte*.
8601
8602 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8603
8604         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8605
8606 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8607
8608         * configure: Re-generate.
8609         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8610
8611 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8612
8613         * configure: Re-generate.
8614         * warning.m4: Pass -Werror to compiler when checking for
8615         supported warning flags.
8616
8617 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8618
8619         * Makefile.in (COMPILE.pre): Add "-x c++".
8620
8621 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8622             Pedro Alves  <palves@redhat.com>
8623             Yao Qi  <yao.qi@linaro.org>
8624
8625         * defs.h (RequireLongest): New.
8626         (extract_integer): Declare function template.
8627         (extract_signed_integer): Remove the declaration, but define it
8628         static inline.
8629         (extract_unsigned_integer): Likewise.
8630         (store_integer): Declare function template.
8631         (store_signed_integer): Remove the declaration, but define it
8632         static inline.
8633         (store_unsigned_integer): Likewise.
8634         * findvar.c (extract_integer): New function template.
8635         (extract_signed_integer): Remove.
8636         (extract_unsigned_integer): Remove.
8637         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8638         instantiations.
8639         (store_integer): New function template.
8640         (store_signed_integer): Remove.
8641         (store_unsigned_integer): Remove.
8642         (store_integer): Explicit instantiations.
8643         * regcache.c (regcache_raw_read_signed): Update.
8644         (regcache::raw_read): New function.
8645         (regcache::raw_read_signed): Remove.
8646         (regcache::raw_read_unsigned): Remove.
8647         (regcache_raw_read_unsigned): Update.
8648         (regcache_raw_write_unsigned): Update.
8649         (regcache::raw_write_signed): Remove.
8650         (regcache::raw_write): New function.
8651         (regcache_cooked_read_signed): Update.
8652         (regcache::raw_write_unsigned): Remove.
8653         (regcache::cooked_read_signed): Remove.
8654         (regcache_cooked_read_unsigned): Update.
8655         (regcache::cooked_read_unsigned): Remove.
8656         (regcache_cooked_write_signed): Update.
8657         (regcache_cooked_write_unsigned): Update.
8658         * regcache.h (regcache) <raw_read_signed>: Remove.
8659         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8660         <raw_read, raw_write>: New.
8661         <cooked_read_signed, cooked_write_signed>: Remove.
8662         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8663         <cooked_read, cooked_write>: New.
8664         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8665         (sh64_pseudo_register_write): Update.
8666
8667 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8668
8669         * arc-tdep.c (arc_disassembler_options): New variable.
8670         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8671         of default_print_insn.
8672         (arc_delayed_print_insn): Set info->section when needed,
8673         use default_print_insn to retrieve a disassembler.
8674
8675 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8676
8677         PR gdb/21574
8678         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8679         to mention $SHELL and startup-with-shell.
8680
8681 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8682
8683         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8684
8685 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8686
8687         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8688         default_print_insn instead of print_insn_aarch64.
8689         * arm-tdep.c (gdb_print_insn_arm): Call
8690         default_print_insn instead of print_insn_big_arm
8691         and print_insn_little_arm.
8692         * i386-tdep.c (i386_print_insn): Call default_print_insn
8693         instead of print_insn_i386.
8694         * ia64-tdep.c (ia64_print_insn): Call
8695         default_print_insn instead of print_insn_ia64.
8696         * mips-tdep.c (gdb_print_insn_mips): Call
8697         default_print_insn instead of print_insn_big_mips
8698         and print_insn_little_mips.
8699         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8700         instead of print_insn_spu.
8701
8702 2017-06-14  Pedro Alves  <palves@redhat.com>
8703
8704         * ada-lang.c: Include "common/byte-vector.h".
8705         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8706         * charset.c (wchar_iterator::iterate): Resize the vector instead
8707         of reserving it.
8708         * common/byte-vector.h: Include "common/def-vector.h".
8709         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8710         * cli/cli-dump.c: Include "common/byte-vector.h".
8711         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8712         * common/byte-vector.h: New file.
8713         * common/def-vector.h: New file.
8714         * common/default-init-alloc.h: New file.
8715         * dwarf2loc.c: Include "common/byte-vector.h".
8716         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8717         instead of reserving it.
8718         * dwarf2read.c: Include "common/byte-vector.h".
8719         (data_buf::m_vec): Now a gdb::byte_vector.
8720         * gdb_regex.c: Include "common/def-vector.h".
8721         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8722         * mi/mi-main.c: Include "common/byte-vector.h".
8723         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8724         * printcmd.c: Include "common/byte-vector.h".
8725         (print_scalar_formatted): Use gdb::byte_vector.
8726         * valprint.c: Include "common/byte-vector.h".
8727         (maybe_negate_by_bytes, print_decimal_chars): Use
8728         gdb::byte_vector.
8729
8730 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8731
8732         * darwin-nat.c: Include "nat/fork-inferior.h".
8733
8734 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8735
8736         * configure.nat: Factor out Darwin bits that are not
8737         architecture-specific.  Add fork-inferior.o.
8738
8739 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8740
8741         * configure.nat: Factor out AIX bits that are not
8742         architecture-specific.  Add fork-inferior.o.
8743
8744 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8745
8746         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8747         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8748         wrappers that just call rw_pieced_value.
8749
8750 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8751
8752         * dwarf2loc.c (write_pieced_value): When writing the data for a
8753         memory piece, use write_memory_with_notification instead of
8754         write_memory.
8755
8756 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8757
8758         * valops.c (read_value_memory): Change embedded_offset to
8759         represent a bit offset instead of a byte offset.
8760         * value.h (read_value_memory): Adjust comment.
8761
8762 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8763
8764         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8765         dest_offset_bits and source_offset_bits.
8766         (write_pieced_value): Likewise.
8767
8768 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8769
8770         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8771         given by DW_OP_bit_piece.
8772         (write_pieced_value): Likewise.
8773
8774 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8775
8776         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8777         some other preparations to the places where sufficient information
8778         is available.
8779         (write_pieced_value): Likewise.
8780
8781 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8782
8783         * dwarf2loc.c (bits_to_bytes): New function.
8784         (read_pieced_value): Fix offset calculations for register pieces
8785         on big-endian targets.
8786         (write_pieced_value): Likewise.
8787
8788 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8789
8790         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8791         (write_pieced_value): Likewise.
8792
8793 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8794
8795         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8796         transfer the source value's least significant bits, instead of its
8797         lowest-addressed ones.  Rename type_len to max_offset.
8798         (read_pieced_value): Mirror above changes to write_pieced_value as
8799         applicable.
8800
8801 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8802
8803         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8804         truncate full bytes from dest_offset_bits before using it as an
8805         offset into the buffer.
8806
8807 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8808
8809         * dwarf2loc.c (write_pieced_value): Include transfer size in
8810         byte-wise check.
8811
8812 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8813
8814         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8815         calculation of this_size.
8816
8817 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8818
8819         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8820         when targeting a bit-field.
8821         (write_pieced_value): Likewise.
8822
8823 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8824
8825         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8826         (allocate_piece_closure): Drop addr_size parameter.
8827         (dwarf2_evaluate_loc_desc_full): Adjust call to
8828         allocate_piece_closure.
8829
8830 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8831
8832         PR gdb/21226
8833         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8834         the LSB end, independent of endianness.
8835
8836 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8837
8838         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8839         size capping.
8840
8841 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8842
8843         * mips-linux-nat.c: Move include features/mips*-linux.c to
8844         mips-linux-tdep.c.
8845         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8846         to mips-linux-tdep.c.
8847         * mips-linux-tdep.c: Include features/mips*-linux.c
8848         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8849         functions.
8850         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8851         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8852         (tdesc_mips64_dsp_linux): Declare.
8853
8854 2017-06-12  Tom Tromey  <tom@tromey.com>
8855
8856         * valprint.h (val_print_type_code_int): Remove.
8857         * valprint.c (generic_val_print_int): Always call
8858         val_print_scalar_formatted.
8859         (val_print_type_code_int): Remove.
8860         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8861         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8862         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8863         * ada-valprint.c (ada_val_print_num): Use
8864         val_print_scalar_formatted.
8865
8866 2017-06-12  Tom Tromey  <tom@tromey.com>
8867
8868         * printcmd.c (print_scalar_formatted): Unify the two switches.
8869         Don't convert scalars to LONGEST.
8870
8871 2017-06-12  Tom Tromey  <tom@tromey.com>
8872
8873         PR exp/16225:
8874         * valprint.h (print_decimal_chars): Update.
8875         * valprint.c (maybe_negate_by_bytes): New function.
8876         (print_decimal_chars): Add "is_signed" argument.
8877         * printcmd.c (print_scalar_formatted): Update.
8878
8879 2017-06-12  Tom Tromey  <tom@tromey.com>
8880
8881         PR exp/16225:
8882         * valprint.h (print_binary_chars, print_hex_chars): Update.
8883         * valprint.c (val_print_type_code_int): Update.
8884         (print_binary_chars): Add "zero_pad" argument.
8885         (emit_octal_digit): New function.
8886         (print_octal_chars): Don't zero-pad.
8887         (print_decimal_chars): Likewise.
8888         (print_hex_chars): Add "zero_pad" argument.
8889         * sh64-tdep.c (sh64_do_fp_register): Update.
8890         * regcache.c (regcache::dump): Update.
8891         * printcmd.c (print_scalar_formatted): Update.
8892         * infcmd.c (default_print_one_register_info): Update.
8893
8894 2017-06-12  Pedro Alves  <palves@redhat.com>
8895             Alan Hayward  <alan.hayward@arm.com>
8896
8897         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8898         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8899         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8900         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8901         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8902
8903 2017-06-12  Pedro Alves  <palves@redhat.com>
8904
8905         * dwarf2read.c (mapped_symtab::data): Now a vector of
8906         symtab_index_entry instead of vector of
8907         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8908         whether an element's name is NULL instead of checking whether the
8909         element itself is NULL.
8910         (find_slot): Change return type.  Adjust.
8911         (hash_expand, , add_index_entry, uniquify_cu_indices)
8912         (write_hash_table): Adjust.
8913
8914 2017-06-12  Pedro Alves  <palves@redhat.com>
8915
8916         * dwarf2read.c (recursively_count_psymbols): New function.
8917         (write_psymtabs_to_index): Call it to compute number of psyms and
8918         pass estimate size of psyms_seen to unordered_set's ctor.
8919
8920 2017-06-12  Pedro Alves  <palves@redhat.com>
8921
8922         * dwarf2read.c (write_hash_table): Check if key already exists
8923         before emplacing.
8924
8925 2017-06-12  Pedro Alves  <palves@redhat.com>
8926
8927         * dwarf2read.c (data_buf::append_space): Rename to...
8928         (data_buf::grow): ... this, and make private.  Adjust all callers.
8929         (data_buf::append_uint): New method.
8930         (add_address_entry, write_one_signatured_type)
8931         (write_psymtabs_to_index): Use it.
8932
8933 2017-06-12  Pedro Alves  <palves@redhat.com>
8934
8935         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8936         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8937         (data_buf::file_write): Call ::fwrite directly.
8938
8939 2017-06-12  Pedro Alves  <palves@redhat.com>
8940
8941         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8942         std::vector::erase.
8943
8944 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8945
8946         Code cleanup: C++ify .gdb_index producer.
8947         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8948         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8949         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8950         (create_strtab, add_string): Remove.
8951         (file_write, data_buf): New.
8952         (struct symtab_index_entry): Use std::vector for cu_indices.
8953         (struct mapped_symtab): Use std::vector for data.
8954         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8955         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8956         Remove.
8957         (find_slot): Change return type.  Update it to the new data structures.
8958         (hash_expand, add_index_entry): Update it to the new data structures.
8959         (offset_type_compare): Remove.
8960         (uniquify_cu_indices): Update it to the new data structures.
8961         (c_str_view, c_str_view_hasher, vector_hasher): New.
8962         (add_indices_to_cpool): Remove.
8963         (write_hash_table): Update it to the new data structures.
8964         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8965         (eq_psymtab_cu_index): Remove.
8966         (psym_index_map): New typedef.
8967         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8968         reference and std::unordered_map for cu_index_htab.
8969         (add_address_entry, add_address_entry_worker, write_address_map)
8970         (write_psymbols): Update it to the new data structures.
8971         (write_obstack): Remove.
8972         (struct signatured_type_index_data): Change types_list to a data_buf
8973         reference and psyms_seen to a std::unordered_set reference.
8974         (write_one_signatured_type, recursively_write_psymbols)
8975         (write_psymtabs_to_index): Update it to the new data structures.
8976
8977 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8978
8979         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8980         separate-debug-file commands.
8981         * symfile.h (separate_debug_file_debug): New global.
8982         * symfile.c (separate_debug_file_debug): New global.
8983         (separate_debug_file_exists, find_separate_debug_file): Add
8984         debug output.
8985         (_initialize_symfile): Add "set debug separate-debug-file"
8986         command.
8987         * build-id.c (build_id_to_debug_bfd,
8988         find_separate_debug_file_by_buildid): Add debug output.
8989
8990 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8991
8992         * gdbarch.sh (displaced_step_free_closure): Remove.
8993         * gdbarch.h, gdbarch.c: Re-generate.
8994         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8995         displaced_step_free_closure.
8996         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8997         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8998         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8999         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9000         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9001         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9002         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9003         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9004         * infrun.c (displaced_step_clear): Call xfree instead of
9005         gdbarch_displaced_step_free_closure.
9006
9007 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9008
9009         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9010         NULL".
9011
9012 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9013
9014         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9015         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9016         (mn10300_push_dummy_call): Likewise.
9017
9018 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9019
9020         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9021
9022 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9023
9024         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9025
9026 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9027
9028         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9029         able to start inferiors using a shell.
9030         (New remote packets): Announce new packet "QStartupWithShell".
9031         * remote.c: Add PACKET_QStartupWithShell.
9032         (extended_remote_create_inferior): Handle new
9033         PACKET_QStartupWithShell.
9034         (remote_protocol_features) <QStartupWithShell>: New entry for
9035         PACKET_QStartupWithShell.
9036         (_initialize_remote): Call "add_packet_config_cmd" for
9037         QStartupShell.
9038
9039 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9040             Pedro Alves  <palves@redhat.com>
9041
9042         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9043         and "nat/fork-inferior.h".
9044         * common/common-inferior.h: New file, with contents from
9045         "gdb/inferior.h".
9046         * commom/common-utils.c: Include "common-utils.h".
9047         (stringify_argv): New function.
9048         * common/common-utils.h (stringify_argv): New prototype.
9049         * configure.nat: Add "fork-inferior.o" as a dependency for
9050         "*linux*", "fbsd*" and "nbsd*" hosts.
9051         * corefile.c (get_exec_file): Update comment.
9052         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9053         instead of "startup_inferior".
9054         (darwin_create_inferior): Call "add_thread_silent" after
9055         "fork_inferior".
9056         * fork-child.c: Cleanup unnecessary includes.
9057         (SHELL_FILE): Move to "common/common-fork-child.c".
9058         (environ): Likewise.
9059         (exec_wrapper): Initialize.
9060         (get_exec_wrapper): New function.
9061         (breakup_args): Move to "common/common-fork-child.c"; rename to
9062         "breakup_args_for_exec".
9063         (escape_bang_in_quoted_argument): Move to
9064         "common/common-fork-child.c".
9065         (saved_ui): New variable.
9066         (prefork_hook): New function.
9067         (postfork_hook): Likewise.
9068         (postfork_child_hook): Likewise.
9069         (gdb_startup_inferior): Likewise.
9070         (fork_inferior): Move to "common/common-fork-child.c".  Update
9071         function to support gdbserver.
9072         (startup_inferior): Likewise.
9073         * gdbcore.h (get_exec_file): Remove declaration.
9074         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9075         instead of "startup_inferior".  Call "add_thread_silent" after
9076         "fork_inferior".
9077         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9078         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9079         instead of "startup_inferior".  Call "add_thread_silent" after
9080         "fork_inferior".
9081         * inferior.h: Include "common-inferior.h".
9082         (trace_start_error): Move to "common/common-utils.h".
9083         (trace_start_error_with_name): Likewise.
9084         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9085         (startup_inferior): Likewise.
9086         (gdb_startup_inferior): New prototype.
9087         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9088         * nat/fork-inferior.h: New file.
9089         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9090         instead of "startup_inferior".  Call "add_thread_silent" after
9091         "fork_inferior".
9092         * target.h (target_terminal_init): Move prototype to
9093         "target/target.h".
9094         (target_terminal_inferior): Likewise.
9095         (target_terminal_ours): Likewise.
9096         * target/target.h (target_terminal_init): New prototype, moved
9097         from "target.h".
9098         (target_terminal_inferior): Likewise.
9099         (target_terminal_ours): Likewise.
9100         * utils.c (gdb_flush_out_err): New function.
9101
9102 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9103
9104         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9105         * common/common-gdbthread.h: New file, with parts from
9106         "gdb/gdbthread.h".
9107         * gdbthread.h: Include "common-gdbthread.h".
9108         (switch_to_thread): Moved to "common/common-gdbthread.h".
9109
9110 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9111
9112         * Makefile.in (SFILES): Add "common/job-control.c".
9113         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9114         (COMMON_OBS): Add "job-control.o".
9115         * common/job-control.c: New file, with contents from
9116         "gdb/inflow.c".
9117         * common/job-control.h: New file, with contents from "terminal.h".
9118         * fork-child.c: Include "job-control.h".
9119         * inflow.c: Include "job-control.h".
9120         (gdb_setpgid): Move to "common/common-inflow.c".
9121         (_initialize_inflow): Move setting of "job_control" to
9122         "handle_job_control".
9123         * terminal.h (job_control): Moved to "common/common-terminal.h".
9124         (gdb_setpgid): Likewise.
9125         * top.c: Include "job_control.h".
9126         * utils.c: Likewise.
9127         (job_control): Moved to "job-control.c".
9128
9129 2017-06-07  Pedro Alves  <palves@redhat.com>
9130
9131         * Makefile.in (SFILES): Add gdb_regex.c.
9132         (COMMON_OBS): Add gdb_regex.o.
9133         * ada-lang.c (ada_add_standard_exceptions)
9134         (ada_add_exceptions_from_frame, name_matches_regex)
9135         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9136         parameter type to compiled_regex.  Adjust.
9137         (ada_exceptions_list): Use compiled_regex.
9138         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9139         std::unique_ptr<compiled_regex>.
9140         (exception_catchpoint::~exception_catchpoint): Remove regfree
9141         call.
9142         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9143         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9144         * breakpoint.c (solib_catchpoint::compiled): Now a
9145         std::unique_ptr<compiled_regex>.
9146         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9147         (check_status_catch_solib): Adjust to use compiled_regex.
9148         (add_solib_catchpoint): Adjust to use compiled_regex.
9149         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9150         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9151         compiled_regex reference.  Adjust to use it.
9152         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9153         declaration.  Include "gdb_regex.h".
9154         (apropos_cmd): Change regex parameter to compiled_regex reference.
9155         * gdb_regex.c: New file.
9156         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9157         declarations.
9158         (class compiled_regex): New.
9159         * linux-tdep.c: Include "common/gdb_optional.h".
9160         (struct mapping_regexes): New, factored out from
9161         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9162         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9163         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9164         * probe.c: Include "common/gdb_optional.h".
9165         (collect_probes): Use compiled_regex and gdb::optional and remove
9166         cleanups.
9167         * skip.c: Include "common/gdb_optional.h".
9168         (skiplist_entry::compiled_function_regexp): Now a
9169         gdb::optional<compiled_regex>.
9170         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9171         (free_skiplist_entry): Remove regfree call.
9172         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9173         compiled_regex and gdb::optional.
9174         * symtab.c: Include "common/gdb_optional.h".
9175         (search_symbols): Use compiled_regex and gdb::optional.
9176         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9177         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9178         to gdb_regex.c.
9179
9180 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9181
9182         * regcache.c (regcache::save): Avoid buffer use.
9183         (regcache::dump): Likewise.
9184
9185 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9186
9187         * sh-tdep.c (sh_pseudo_register_read): Remove
9188         MAX_REGISTER_SIZE.
9189         (sh_pseudo_register_write): Likewise.
9190         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9191         (sh64_pseudo_register_write): Likewise
9192
9193 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9194
9195         * aarch64-tdep.c (aarch64_store_return_value): Use
9196         V_REGISTER_SIZE.
9197         (aarch64_pseudo_read_value): Likewise.
9198         (aarch64_pseudo_write): Likewise.
9199
9200 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9201
9202         * regformats/regdef.h (set_register_cache): Remove the
9203         declaration.
9204
9205 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9206
9207         * frame.c (frame_unwind_register_signed): Use
9208         frame_unwind_register_value.
9209
9210 2017-06-06  Pedro Alves  <palves@redhat.com>
9211
9212         PR breakpoints/21553
9213         * breakpoint.c (create_breakpoints_sal_default)
9214         (init_breakpoint_sal, create_breakpoint_sal): Use
9215         gdb::unique_xmalloc_ptr for string parameters.
9216         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9217         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9218         (base_breakpoint_create_breakpoints_sal)
9219         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9220         (strace_marker_create_breakpoints_sal)
9221         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9222         string parameters.
9223         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9224         gdb::unique_xmalloc_ptr for string parameters.
9225         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9226         parameters.
9227
9228 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9229
9230         * alpha-tdep.c (alpha_register_to_value): Use
9231         get_frame_register_value.
9232         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9233
9234 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9235
9236         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9237         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9238         (ia64_value_to_register): Likewise.
9239         (ia64_extract_return_value): Likewise.
9240         (ia64_store_return_value): Likewise.
9241         (ia64_push_dummy_call): Likewise.
9242
9243 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9244
9245         GDB 8.0 released.
9246
9247 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9248
9249         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9250
9251 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9252
9253         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9254         parameter.
9255         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9256
9257 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9258
9259         * event-loop.c (poll_timers): Unallocate timer using delete
9260         instead of xfree.
9261
9262 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9263
9264         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9265         (struct breakpoint) <~breakpoint>: New.
9266         (struct watchpoint): Inherit from breakpoint.
9267         <~watchpoint>: New.
9268         <base>: Remove.
9269         (struct tracepoint): Inherit from breakpoint.
9270         <base>: Remove.
9271         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9272         (struct longjmp_breakpoint): Inherit from breakpoint.
9273         <~longjmp_breakpoint>: New.
9274         <base>: Remove.
9275         (new_breakpoint_from_type): Remove casts.
9276         (watchpoint_in_thread_scope): Remove reference to base field.
9277         (watchpoint_del_at_next_stop): Likewise.
9278         (update_watchpoint): Likewise.
9279         (watchpoint_check): Likewise.
9280         (bpstat_check_watchpoint): Likewise.
9281         (set_longjmp_breakpoint): Likewise.
9282         (struct fork_catchpoint): Inherit from breakpoint.
9283         <base>: Remove.
9284         (struct solib_catchpoint): Inherit from breakpoint.
9285         <~solib_catchpoint>: New.
9286         <base>: Remove.
9287         (dtor_catch_solib): Change to ...
9288         (solib_catchpoint::~solib_catchpoint): ... this.
9289         (breakpoint_hit_catch_solib): Remove reference to base field.
9290         (add_solib_catchpoint): Likewise.
9291         (create_fork_vfork_event_catchpoint): Likewise.
9292         (struct exec_catchpoint): Inherit from breakpoint.
9293         <~exec_catchpoint>: New.
9294         <base>: Remove.
9295         (dtor_catch_exec): Change to ...
9296         (exec_catchpoint::~exec_catchpoint): ... this.
9297         (dtor_watchpoint): Change to ...
9298         (watchpoint::~watchpoint): ... this.
9299         (watch_command_1): Remove reference to base field.
9300         (catch_exec_command_1): Likewise.
9301         (base_breakpoint_dtor): Change to ...
9302         (breakpoint::~breakpoint): ... this.
9303         (base_breakpoint_ops): Remove dtor field value.
9304         (longjmp_bkpt_dtor): Change to ...
9305         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9306         (strace_marker_create_breakpoints_sal): Remove reference to base
9307         field.
9308         (delete_breakpoint): Don't manually call breakpoint destructor.
9309         (create_tracepoint_from_upload): Remove reference to base field.
9310         (trace_pass_set_count): Likewise.
9311         (initialize_breakpoint_ops): Don't initialize
9312         momentary_breakpoint_ops, don't set dtors.
9313         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9314         <~ada_catchpoint>: New.
9315         <base>: Remove.
9316         (create_excep_cond_exprs): Remove reference to base field.
9317         (dtor_exception): Change to ...
9318         (ada_catchpoint::~ada_catchpoint): ... this.
9319         (dtor_catch_exception): Remove.
9320         (dtor_catch_exception_unhandled): Remove.
9321         (dtor_catch_assert): Remove.
9322         (create_ada_exception_catchpoint): Remove reference to base
9323         field.
9324         (initialize_ada_catchpoint_ops): Don't set dtors.
9325         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9326         breakpoint.
9327         <~signal_catchpoint>: New.
9328         <base>: Remove.
9329         (signal_catchpoint_dtor): Change to ...
9330         (signal_catchpoint::~signal_catchpoint): ... this.
9331         (create_signal_catchpoint): Remove reference to base field.
9332         (initialize_signal_catchpoint_ops): Don't set dtor.
9333         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9334         from breakpoint.
9335         <~syscall_catchpoint>: New.
9336         <base>: Remove.
9337         (dtor_catch_syscall): Change to ...
9338         (syscall_catchpoint::~syscall_catchpoint): ... this.
9339         (create_syscall_event_catchpoint): Remove reference to base
9340         field.
9341         (initialize_syscall_catchpoint_ops): Don't set dtor.
9342         * break-catch-throw.c (struct exception_catchpoint): Inherit
9343         from breakpoint.
9344         <~exception_catchpoint>: New.
9345         <base>: Remove.
9346         (dtor_exception_catchpoint): Change to ...
9347         (exception_catchpoint::~exception_catchpoint): ... this.
9348         (handle_gnu_v3_exceptions): Remove reference to base field.
9349         (initialize_throw_catchpoint_ops): Don't set dtor.
9350         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9351         field.
9352         * remote.c (remote_get_tracepoint_status): Likewise.
9353         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9354         * tracefile.c (tracefile_fetch_registers): Likewise.
9355         * tracepoint.c (actions_command): Likewise.
9356         (validate_actionline): Likewise.
9357         (tfind_1): Likewise.
9358         (get_traceframe_location): Likewise.
9359         (find_matching_tracepoint_location): Likewise.
9360         (parse_tracepoint_status): Likewise.
9361         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9362
9363 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9364
9365         * breakpoint.c (struct longjmp_breakpoint): New struct.
9366         (is_tracepoint_type): Change return type to bool.
9367         (is_longjmp_type): New function.
9368         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9369         (set_raw_breakpoint_without_location): Use
9370         new_breakpoint_from_type.
9371         (set_raw_breakpoint): Likewise.
9372
9373 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9374
9375         * breakpoint.c (new_breakpoint_from_type): New function.
9376         (create_breakpoint_sal): Use new_breakpoint_from_type and
9377         unique_ptr.
9378         (create_breakpoint): Likewise.
9379
9380 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9381
9382         * memattr.c (mem_info_command): Rename to ...
9383         (info_mem_command): ... this.
9384         (mem_enable_command): Rename to ...
9385         (enable_mem_command): ... this.
9386         (mem_disable_command): Rename to ...
9387         (disable_mem_command): ... this.
9388         (mem_delete_command): Rename to ...
9389         (delete_mem_command): ... this.
9390         (_initialize_mem): Adjust function names.
9391
9392 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9393
9394         * btrace.c (handle_pt_insn_events): New.
9395         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9396         STATUS.  Split into this and ...
9397         (handle_pt_insn_event_flags): ... this.
9398
9399 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9400
9401         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9402         and struct pt_insn.resynced.
9403         * configure: Regenerated.
9404         * config.in: Regenerated.
9405
9406 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9407
9408         * btrace.c (ftrace_find_call_by_number): New function.
9409         (ftrace_new_function): Store objects, not pointers.
9410         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9411         ftrace_new_gap, ftrace_update_function,
9412         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9413         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9414         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9415         btrace_ends_with_single_insn, btrace_call_get): Account for
9416         btrace_thread_info::functions now storing objects.
9417         * btrace.h (struct btrace_thread_info): Add constructor.
9418         (struct btrace_thread_info) <functions>: Make std::vector.
9419         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9420         Initialize with default values.
9421         * record-btrace.c (record_btrace_frame_sniffer): Account for
9422         btrace_thread_info::functions now storing objects.
9423
9424 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9425
9426         * btrace.c: Remove typedef bfun_s.
9427         (ftrace_new_gap): Directly add gaps to the list of gaps.
9428         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9429         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9430         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9431         instead of gdb VEC.
9432
9433 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9434
9435         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9436         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9437         with btrace_thread_info::next_segment and
9438         btrace_thread_info::prev_segment.
9439         * btrace.h: Remove struct btrace_func_link.
9440         (struct btrace_function): Replace pair of function segment pointers
9441         with pair of indices.
9442         * python/py-record-btrace.c (btpy_call_prev_sibling,
9443         btpy_call_next_sibling): Replace references to
9444         btrace_thread_info::segment with btrace_thread_info::next_segment and
9445         btrace_thread_info::prev_segment.
9446         * record-btrace.c (record_btrace_frame_this_id): Use
9447         btrace_find_call_by_number.
9448
9449 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9450
9451         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9452         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9453         btrace_insn_next, btrace_insn_prev): Remove references to
9454         btrace_thread_info::flow.
9455         * btrace.h (struct btrace_function): Remove FLOW.
9456
9457 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9458
9459         * btrace.c (ftrace_find_call_by_number): New function.
9460         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9461         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9462         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9463         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9464         index.
9465         * btrace.h (struct btrace_function): Turn UP into an index.
9466         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9467         as an index.
9468         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9469         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9470         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9471
9472 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9473
9474         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9475         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9476         ftrace_update_function, ftrace_compute_global_level_offset,
9477         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9478         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9479         btrace_insn_end, btrace_is_empty): Remove references to
9480         btrace_thread_info::begin and btrace_thread_info::end.
9481         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9482         (struct btrace_thread_info) <functions>: Adjust comment.
9483         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9484         btrace_thread_info::begin.
9485
9486 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9487
9488         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9489         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9490         ftrace_update_function): Remove arguments that implicitly were always
9491         BTINFO->END.
9492         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9493         Don't pass BTINFO->END.
9494
9495 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9496
9497         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9498         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9499         btrace_find_insn_by_number): Replace function segment pointer with
9500         index.
9501         (btrace_insn_cmp): Simplify.
9502         * btrace.h: (struct btrace_insn_iterator) Rename index to
9503         insn_index.  Replace function segment pointer with index into function
9504         segment vector.
9505         * record-btrace.c (record_btrace_call_history): Replace function
9506         segment pointer use with index.
9507         (record_btrace_frame_sniffer): Retrieve function call segment through
9508         vector.
9509         (record_btrace_set_replay): Remove defunc't safety check.
9510
9511 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9512
9513         * btrace.c (btrace_ends_with_single_insn): New function.
9514         (btrace_call_get, btrace_call_number, btrace_call_begin,
9515         btrace_call_end, btrace_call_next, btrace_call_prev,
9516         btrace_find_call_by_number): Use index into call segment vector
9517         instead of pointer.
9518         (btrace_call_cmp): Simplify.
9519         * btrace.h (struct btrace_call_iterator): Replace function call segment
9520         pointer with index into vector.
9521         * record-btrace.c (record_btrace_call_history): Use index instead of
9522         pointer.
9523
9524 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9525
9526         * btrace.c (btrace_insn_begin, btrace_insn_end,
9527         btrace_find_insn_by_number): Add btinfo to iterator.
9528         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9529
9530 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9531
9532         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9533         and save pointers directly.
9534         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9535         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9536         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9537         changed signature of functions.
9538         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9539         (btrace_fetch): Remove code that adds btrace_function pointers to
9540         vector of btrace_functions.
9541         (btrace_clear): Simplify freeing vector of btrace_functions.
9542
9543 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9544
9545         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9546         Replace VEC_* with std::vector functions.
9547         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9548         (struct btrace_thread_info)<functions>: Change type to std::vector.
9549
9550 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9551
9552         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9553         "Removed targets and native configurations" up.  Merge duplicate
9554         "New commands" sub-sections.  Add "New options" sub-sections.
9555
9556 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9557
9558         * defs.h (copy_integer_to_size): New declaration.
9559         * findvar.c (copy_integer_to_size): New function.
9560         (do_cint_test): New selftest function.
9561         (copy_integer_to_size_test): Likewise.
9562         (_initialize_findvar): Likewise.
9563         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9564         (mips_fbsd_collect_reg): Use raw_collect_integer.
9565         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9566         (mips64_fill_gregset): Use raw_collect_integer
9567         (mips64_fill_fpregset): Use raw_supply_integer.
9568         * regcache.c (regcache::raw_supply_integer): New function.
9569         (regcache::raw_collect_integer): Likewise.
9570         * regcache.h: (regcache::raw_supply_integer): New declaration.
9571         (regcache::raw_collect_integer): Likewise.
9572
9573 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9574
9575         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9576         (COMMON_OBS): Add gdbarch-selftests.o.
9577         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9578         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9579         * gdbarch-selftests.c: New file.
9580         * regcache.h (regcache) <~regcache>: Mark it virtual if
9581         GDB_SELF_TEST.
9582         <raw_write>: Likewise.
9583
9584 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9585
9586         * regcache.c (current_regcache): Change it to
9587         regcache::current_regcache.
9588         (regcache_observer_target_changed): Update.
9589         (regcache_thread_ptid_changed): Make it a regcache static
9590         method.
9591         (regcache_thread_ptid_changed): Update.
9592         (class regcache_access): New.
9593         (current_regcache_test): Update.
9594         (_initialize_regcache): Update.
9595         * regcache.h: Include forward_list.
9596         (regcache): Declare regcache_thread_ptid_changed and declare
9597         registers_changed_ptid as friend.
9598
9599 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9600
9601         * i387-tdep.c (i387_register_to_value): Use register_size
9602         instead of TYPE_LENGTH.
9603         * m68k-tdep.c (m68k_register_to_value): Likewise.
9604
9605 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9606
9607         * i387-tdep.c (i387_convert_register_p): Return false if type
9608         code isn't TYPE_CODE_FLT.
9609
9610 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9611
9612         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9613         length is 4.
9614         (alpha_register_to_value): Remove type length check.
9615         (alpha_value_to_register): Likewise.
9616
9617 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9618
9619         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9620         TYPE_CODE_FLT.
9621
9622 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9623
9624         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9625         TYPE_CODE_FLT or not.
9626
9627 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9628
9629         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9630         * avr-tdep.c (avr_gdbarch_init): Likewise.
9631         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9632         * cris-tdep.c (cris_gdbarch_init): Likewise.
9633         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9634         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9635         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9636         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9637         * mep-tdep.c (mep_gdbarch_init): Likewise.
9638         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9639         * mips-tdep.c (mips_gdbarch_init): Likewise.
9640         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9641         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9642         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9643         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9644         * v850-tdep.c (v850_gdbarch_init): Likewise.
9645
9646 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9647
9648         * selftest-arch.c (tests_with_arch): Call registers_changed
9649         and reinit_frame_cache.
9650         * selftest.c (run_self_tests): Likewise.
9651
9652 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9653
9654         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9655         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9656
9657 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9658
9659         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9660         set_gdbarch_print_insn.
9661
9662 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9663
9664         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9665         set_gdbarch_print_insn.
9666
9667 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9668
9669         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9670         set_gdbarch_print_insn.
9671         * arc-tdep.c (arc_gdbarch_init): Likewise.
9672         * arch-utils.c: include dis-asm.h.
9673         (default_print_insn): New function.
9674         * arch-utils.h (default_print_insn): Declare.
9675         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9676         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9677         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9678         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9679         * frv-tdep.c (frv_gdbarch_init): Likewise.
9680         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9681         * gdbarch.sh (print_insn): Use default_print_insn.
9682         * gdbarch.c: Regenerated.
9683         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9684         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9685         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9686         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9687         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9688         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9689         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9690         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9691         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9692         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9693         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9694         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9695         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9696         * mt-tdep.c (mt_gdbarch_init): Likewise.
9697         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9698         * nios2-tdep.c (nios2_print_insn): Remove.
9699         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9700         * rx-tdep.c (rx_gdbarch_init): Likewise.
9701         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9702         * score-tdep.c (score_print_insn): Remove.
9703         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9704         * sh-tdep.c (sh_gdbarch_init): Likewise.
9705         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9706         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9707         * tic6x-tdep.c (tic6x_print_insn): Remove.
9708         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9709         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9710         * v850-tdep.c (v850_gdbarch_init): Likewise.
9711         * vax-tdep.c (vax_gdbarch_init): Likewise.
9712         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9713         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9714
9715 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9716
9717         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9718         (MIPS_FP0_REGNUM): Remove.
9719         (MIPS_FSR_REGNUM): Remove.
9720         (mips_fbsd_supply_fpregs): Use mips_regnum.
9721         (mips_fbsd_supply_gregs): Likewise.
9722         (mips_fbsd_collect_fpregs): Likewise.
9723         (mips_fbsd_collect_gregs): Likewise.
9724
9725 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9726
9727         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9728         (getpfpregs_supplies): New function.
9729         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9730         getfpregs_supplies.
9731         (mips_fbsd_store_inferior_registers): Likewise.
9732
9733 2017-05-22  Pedro Alves <palves@redhat.com>
9734
9735         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9736         maintainer.
9737
9738 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9739
9740         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9741         (store_register): Likewise.
9742         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9743         (get_decimal_float_return_value): Likewise.
9744         (do_ppc_sysv_return_value): Likewise.
9745         (ppc64_sysv_abi_push_integer): Likewise.
9746         (ppc64_sysv_abi_push_freg): Likewise.
9747         (ppc64_sysv_abi_return_value_base): Likewise.
9748         (ppc64_sysv_abi_return_value): Likewise.
9749         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9750         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9751         * rs6000-nat.c: Likewise.
9752         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9753         (rs6000_value_to_register): Likewise.
9754         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9755
9756 2017-05-21  Tom Tromey  <tom@tromey.com>
9757
9758         PR rust/21466:
9759         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9760         arrays as "[T]", not "[T; ]".
9761
9762 2017-05-19  Tom Tromey  <tom@tromey.com>
9763
9764         PR rust/21484:
9765         * rust-lang.c (exp_descriptor_rust): New function.
9766         (rust_language_defn): Use it.
9767         * p-lang.c (pascal_language_defn): Update.
9768         * opencl-lang.c (opencl_language_defn): Update.
9769         * objc-lang.c (objc_language_defn): Update.
9770         * m2-lang.c (m2_language_defn): Update.
9771         * language.h (struct language_defn)
9772         <la_watch_location_expression>: New member.
9773         * language.c (unknown_language_defn, auto_language_defn)
9774         (local_language_defn): Update.
9775         * go-lang.c (go_language_defn): Update.
9776         * f-lang.c (f_language_defn): Update.
9777         * d-lang.c (d_language_defn): Update.
9778         * c-lang.h (c_watch_location_expression): Declare.
9779         * c-lang.c (c_watch_location_expression): New function.
9780         (c_language_defn, cplus_language_defn, asm_language_defn)
9781         (minimal_language_defn): Use it.
9782         * breakpoint.c (watch_command_1): Call
9783         la_watch_location_expression.
9784         * ada-lang.c (ada_language_defn): Update.
9785
9786 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9787
9788         PR tui/21482
9789         * gdb_curses.h (NOMACROS): Define.
9790         (NCURSES_NOMACROS): Define.
9791
9792 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9793
9794         PR tui/21482
9795         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9796         arg to char *.
9797         * tui/tui-wingeneral.c (box_win): Likewise.
9798         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9799         (tui_show_source_line): Likewise.
9800         (tui_show_exec_info_content): Likewise.
9801
9802 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9803
9804         * sparc-tdep.c (sparc_structure_return_p)
9805         (sparc_arg_on_registers_p): New functions.
9806         (sparc32_store_arguments): Use them.
9807         * sparc64-tdep.c (sparc64_16_byte_align_p)
9808         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9809         Handle TYPE_CODE_ARRAY.
9810
9811 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9812
9813         * cli/cli-decode.c (add_alias_cmd): New function.
9814         * command.h (add_alias_cmd): Declare.
9815         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9816         instead call add_alias_cmd.
9817
9818 2017-05-17  Pedro Alves  <palves@redhat.com>
9819
9820         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9821         (nat_makefile_frag): ... this.  All references updated.
9822         * configure.ac: Likewise.
9823         * configure.nat: Likewise.  Enhance comments.
9824         * configure: Regenerate.
9825
9826 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9827
9828         * procfs.c (procfs_create_inferior): Change prototype to match
9829         definition.
9830
9831 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9832
9833         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9834         C++ compiler warning.
9835
9836 2017-05-12  Tom Tromey  <tom@tromey.com>
9837
9838         PR rust/21483:
9839         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9840         recurse, just call value_struct_elt directly.
9841
9842 2017-05-12  Tom Tromey  <tom@tromey.com>
9843
9844         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9845         OP_RUST_ARRAY>: Fix.
9846
9847 2017-05-12  Tom Tromey  <tom@tromey.com>
9848
9849         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9850
9851 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9852
9853         * regcache.c: Include <forward_list>.
9854         (struct regcache_list): Remove.
9855         (current_regcache): Update.
9856         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9857         (regcache_thread_ptid_changed): Likewise.
9858         (registers_changed_ptid): Likewise.
9859         (current_regcache_size): Likewise.
9860
9861 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9862
9863         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9864         (current_regcache_size): New function.
9865         (current_regcache_test): New function.
9866         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9867
9868 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9869
9870         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9871         (print_gp_register_row): Use get_frame_register_value.
9872
9873 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9874
9875         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9876         (mips_supply_fpregset): Likewise.
9877         (mips64_supply_gregset): Likewise.
9878
9879 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9880
9881         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9882         regcache->raw_supply_zeroed.
9883
9884 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9885
9886         * configure.nat: Rearrange 'case' statements to match
9887         host before cpu.
9888
9889 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9890
9891         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9892         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9893         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9894         "@nat_extra_makefile_frag@".
9895         (Makefile): Remove dependency on "@frags@".
9896         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9897         (data-directory/Makefile): Likewise.
9898         * config/aarch64/linux.mh: Deleted; moved contents to
9899         "gdb/configure.nat".
9900         * config/alpha/alpha-linux.mh: Likewise.
9901         * config/alpha/nbsd.mh: Likewise.
9902         * config/arm/linux.mh: Likewise.
9903         * config/arm/nbsdelf.mh: Likewise.
9904         * config/i386/cygwin.mh: Likewise.
9905         * config/i386/cygwin64.mh: Likewise.
9906         * config/i386/darwin.mh: Likewise.
9907         * config/i386/fbsd.mh: Likewise.
9908         * config/i386/fbsd64.mh: Likewise.
9909         * config/i386/go32.mh: Likewise.
9910         * config/i386/i386gnu.mh: Likewise.
9911         * config/i386/i386sol2.mh: Likewise.
9912         * config/i386/linux.mh: Likewise.
9913         * config/i386/linux64.mh: Likewise.
9914         * config/i386/mingw.mh: Likewise.
9915         * config/i386/mingw64.mh: Likewise.
9916         * config/i386/nbsd64.mh: Likewise.
9917         * config/i386/nbsdelf.mh: Likewise.
9918         * config/i386/nto.mh: Likewise.
9919         * config/i386/obsd.mh: Likewise.
9920         * config/i386/obsd64.mh: Likewise.
9921         * config/i386/sol2-64.mh: Likewise.
9922         * config/ia64/linux.mh: Likewise.
9923         * config/m32r/linux.mh: Likewise.
9924         * config/m68k/linux.mh: Likewise.
9925         * config/m68k/nbsdelf.mh: Likewise.
9926         * config/m68k/obsd.mh: Likewise.
9927         * config/m88k/obsd.mh: Likewise.
9928         * config/mips/fbsd.mh: Likewise.
9929         * config/mips/linux.mh: Likewise.
9930         * config/mips/nbsd.mh: Likewise.
9931         * config/mips/obsd64.mh: Likewise.
9932         * config/pa/linux.mh: Likewise.
9933         * config/pa/nbsd.mh: Likewise.
9934         * config/pa/obsd.mh: Likewise.
9935         * config/powerpc/aix.mh: Likewise.
9936         * config/powerpc/fbsd.mh: Likewise.
9937         * config/powerpc/linux.mh: Likewise.
9938         * config/powerpc/nbsd.mh: Likewise.
9939         * config/powerpc/obsd.mh: Likewise.
9940         * config/powerpc/ppc64-linux.mh: Likewise.
9941         * config/powerpc/spu-linux.mh: Likewise.
9942         * config/s390/linux.mh: Likewise.
9943         * config/sh/nbsd.mh: Likewise.
9944         * config/sparc/fbsd.mh: Likewise.
9945         * config/sparc/linux.mh: Likewise.
9946         * config/sparc/linux64.mh: Likewise.
9947         * config/sparc/nbsd64.mh: Likewise.
9948         * config/sparc/nbsdelf.mh: Likewise.
9949         * config/sparc/obsd64.mh: Likewise.
9950         * config/sparc/sol2.mh: Likewise.
9951         * config/tilegx/linux.mh: Likewise.
9952         * config/vax/nbsdelf.mh: Likewise.
9953         * config/vax/obsd.mh: Likewise.
9954         * config/xtensa/linux.mh: Likewise.
9955         * config/i386/i386gnu.mn: New file, with excerpts from
9956         "config/i386/i386gnu.mh".
9957         * configure: Regenerate.
9958         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9959         *.mh files under "gdb/config".
9960         * configure.nat: New file, with contents from the
9961         "gdb/config/*/*.mh" files.
9962
9963 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9964
9965         * btrace.c (btrace_clear): Free insn vector.
9966
9967 2017-05-05  Pedro Alves  <palves@redhat.com>
9968
9969         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9970         * configure: Regenerate.
9971
9972 2017-05-04  Pedro Alves  <palves@redhat.com>
9973
9974         * Makefile.in (SFILES): Add progspace-and-thread.c.
9975         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9976         (COMMON_OBS): Add progspace-and-thread.o.
9977         * breakpoint.c: Include "progspace-and-thread.h".
9978         (update_inserted_breakpoint_locations)
9979         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9980         Use scoped_restore_current_pspace_and_thread.
9981         (create_std_terminate_master_breakpoint): Use
9982         scoped_restore_current_program_space.
9983         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9984         (print_breakpoint_location): Use
9985         scoped_restore_current_program_space.
9986         (bp_loc_is_permanent): Use
9987         scoped_restore_current_pspace_and_thread.
9988         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9989         (download_tracepoint_locations): Use
9990         scoped_restore_current_pspace_and_thread.
9991         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9992         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9993         (enum step_over_calls_kind): Moved from inferior.h.
9994         (class scoped_restore_current_thread): New class.
9995         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9996         declaration.
9997         (scoped_restore_current_thread): New class.
9998         * infcmd.c: Include "common/gdb_optional.h".
9999         (continue_1, proceed_after_attach): Use
10000         scoped_restore_current_thread.
10001         (notice_new_inferior): Use scoped_restore_current_thread.
10002         * inferior.c: Include "progspace-and-thread.h".
10003         (restore_inferior, save_current_inferior): Delete.
10004         (add_inferior_command, clone_inferior_command): Use
10005         scoped_restore_current_pspace_and_thread.
10006         * inferior.h (scoped_restore_current_inferior): New class.
10007         * infrun.c: Include "progspace-and-thread.h" and
10008         "common/gdb_optional.h".
10009         (follow_fork_inferior): Use
10010         scoped_restore_current_pspace_and_thread.
10011         (scoped_restore_exited_inferior): New class.
10012         (handle_vfork_child_exec_or_exit): Use
10013         scoped_restore_exited_inferior,
10014         scoped_restore_current_pspace_and_thread,
10015         scoped_restore_current_thread and scoped_restore.
10016         (fetch_inferior_event): Use scoped_restore_current_thread.
10017         * linespec.c (decode_line_full, decode_line_1): Use
10018         scoped_restore_current_program_space.
10019         * mi/mi-main.c: Include "progspace-and-thread.h".
10020         (exec_continue): Use scoped_restore_current_thread.
10021         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10022         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10023         * proc-service.c (ps_pglobal_lookup): Use
10024         scoped_restore_current_program_space.
10025         * progspace-and-thread.c: New file.
10026         * progspace-and-thread.h: New file.
10027         * progspace.c (release_program_space, clone_program_space): Use
10028         scoped_restore_current_program_space.
10029         (restore_program_space, save_current_program_space)
10030         (save_current_space_and_thread): Delete.
10031         (switch_to_program_space_and_thread): Moved to
10032         progspace-and-thread.c.
10033         * progspace.h (save_current_program_space)
10034         (save_current_space_and_thread): Delete declarations.
10035         (scoped_restore_current_program_space): New class.
10036         * remote.c (remote_btrace_maybe_reopen): Use
10037         scoped_restore_current_thread.
10038         * symtab.c: Include "progspace-and-thread.h".
10039         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10040         * thread.c (print_thread_info_1): Use
10041         scoped_restore_current_thread.
10042         (struct current_thread_cleanup): Delete.
10043         (do_restore_current_thread_cleanup)
10044         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10045         (scoped_restore_current_thread::~scoped_restore_current_thread):
10046         ... this new dtor.
10047         (make_cleanup_restore_current_thread): Rename/convert to ...
10048         (scoped_restore_current_thread::scoped_restore_current_thread):
10049         ... this new ctor.
10050         (thread_apply_all_command): Use scoped_restore_current_thread.
10051         (thread_apply_command): Use scoped_restore_current_thread.
10052         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10053         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10054
10055 2017-05-04  Pedro Alves  <palves@redhat.com>
10056
10057         * thread.c (make_cleanup_restore_current_thread): Move
10058         find_thread_ptid call before the is_stopped call.  Assert that the
10059         thread is found.  Replace is_stopped call by checking the thread's
10060         state directly.  Remove unnecessary NULL-thread check.
10061
10062 2017-05-04  Pedro Alves  <palves@redhat.com>
10063
10064         * corelow.c (thread_section_name): New class.
10065         (get_core_register_section, get_core_siginfo): Use it.
10066
10067 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10068
10069         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10070         (get_core_register_section): Remove xfree of NULL pointer.
10071
10072 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10073
10074         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10075         * regcache.c (regcache::raw_supply_zeroed): New function.
10076         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10077
10078 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10079
10080         * gdbarch.sh: Remove commented out definition of
10081         TARGET_CHAR_BIT.
10082         * gdbarch.h: Re-generate.
10083
10084 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10085
10086         * configure: Regenerate.
10087
10088 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10089
10090         * solib-target.c (solib_target_relocate_section_addresses):
10091         Remove num_section_bases, num_bases, segment_bases variables.
10092
10093 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10094
10095         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10096
10097 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10098
10099         * solib-target.c: Include <vector>
10100         (struct lm_info_target) <~lm_info_target>: Remove.
10101         <segment_bases, section_bases>: Change type to
10102         std::vector<CORE_ADDR>.
10103         (library_list_start_segment, library_list_start_section,
10104         library_list_end_library,
10105         solib_target_relocate_section_addresses): Adjust.
10106
10107 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10108
10109         * gdbarch.sh (software_single_step): Change return type to
10110         std::vector<CORE_ADDR>.
10111         * gdbarch.c, gdbarch.h: Re-generate.
10112         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10113         Adjust.
10114         (arm_deal_with_atomic_sequence_raw): Adjust.
10115         (thumb_get_next_pcs_raw): Adjust.
10116         (arm_get_next_pcs_raw): Adjust.
10117         (arm_get_next_pcs): Adjust.
10118         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10119         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10120         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10121         (alpha_software_single_step): Adjust.
10122         * alpha-tdep.h (alpha_software_single_step): Adjust.
10123         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10124         * arm-tdep.c (arm_software_single_step): Adjust.
10125         (arm_breakpoint_kind_from_current_state): Adjust.
10126         * arm-tdep.h (arm_software_single_step): Adjust.
10127         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10128         * cris-tdep.c (cris_software_single_step): Adjust.
10129         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10130         (micromips_deal_with_atomic_sequence): Adjust.
10131         (deal_with_atomic_sequence): Adjust.
10132         (mips_software_single_step): Adjust.
10133         * mips-tdep.h (mips_software_single_step): Adjust.
10134         * moxie-tdep.c (moxie_software_single_step): Adjust.
10135         * nios2-tdep.c (nios2_software_single_step): Adjust.
10136         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10137         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10138         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10139         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10140         * sparc-tdep.c (sparc_software_single_step): Adjust.
10141         * spu-tdep.c (spu_software_single_step): Adjust.
10142         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10143
10144 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10145
10146         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10147         * gdbarch.h: Re-generate.
10148
10149 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10150
10151         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10152         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10153         * python/py-instruction.c, python/py-instruction.h: New file.
10154         * python/py-record.c: Add py-instruction.h include.
10155         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10156         gdb.RecordInstruction.
10157         * python/python-internal.h: Add gdbpy_initialize_instruction
10158         declaration.
10159         * python/python.c (do_start_initialization): Add
10160         gdbpy_initialize_instruction.
10161
10162 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10163
10164         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10165         Remove.
10166         (btrace_func_from_recpy_func): New function.
10167         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10168         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10169         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10170         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10171         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10172         Also, use new helper functions.
10173         (btpy_list_item): Use new helper functions.
10174         (recpy_bt_function_call_history): Use new type name.
10175         (btpy_call_getset): Remove.
10176         (gdbpy_initialize_btrace): Remove code to initialize
10177         gdb.BtraceFunctionCall.
10178         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10179         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10180         recpy_bt_func_prev, recpy_bt_func_next): New export.
10181         * python/py-record.c (recpy_func_type): New static object.
10182         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10183         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10184         recpy_func_next): New function.
10185         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10186         (recpy_func_getset): New static object.
10187         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10188         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10189
10190 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10191
10192         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10193         (btpy_object, btpy_insn_type, btpy_new): Remove.
10194         (btpy_list_object): Use gdb.RecordInstruction type instead of
10195         gdb.BtraceInstruction type.
10196         (btrace_insn_from_recpy_insn): New function.
10197         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10198         btpy_new.
10199         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10200         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10201         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10202         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10203         instead of btpy_object.
10204         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10205         btpy_insn_data, btpy_insn_decode): Rename to ...
10206         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10207         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10208         recpy_bt_insn_decode): This.  Also, use new helper functions.
10209         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10210         recpy_insn_type.
10211         (btpy_insn_getset): Remove.
10212         (gdbpy_initialize_btrace): Remove code to initialize
10213         gdb.BtraceInstruction.  Use recpy_element_object.
10214         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10215         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10216         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10217         * python/py-record.c (recpy_insn_type): New static object.
10218         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10219         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10220         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10221         New function.
10222         (recpy_insn_getset): New static object.
10223         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10224         * python/py-record.h (recpy_element_object): New typedef.
10225         (recpy_insn_type, recpy_insn_new): New export.
10226
10227 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10228
10229         * py-record-btrace.c (btpy_insn_new): Removed.
10230         (btpy_insn_or_gap_new): New function.
10231         (btpy_insn_error): Removed.
10232         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10233         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10234         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10235         btpy_insn_or_gap_new instead of btpy_insn_new.
10236         (btpy_insn_getset): Remove btpy_insn_error.
10237         * py-record.c (recpy_gap_type): New static object.
10238         (recpy_gap_object): New typedef.
10239         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10240         recpy_gap_reason_string): New function.
10241         (recpy_gap_getset): New static object.
10242         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10243         * py-record.h (recpy_gap_new): New export.
10244
10245 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10246
10247         * python/py-record.c (recpy_ptid): Remove.
10248         (recpy_record_getset): Remove recpy_ptid.
10249
10250 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10251
10252         * btrace.c (btrace_fetch): Set inferior_ptid.
10253         * python/py-record-btrace.c: Add "py-record.h" include.
10254         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10255         recpy_bt_end, recpy_bt_instruction_history,
10256         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10257         in gdb.Record object instead of current ptid.
10258         * python/py-record.c: Include new "py-record.h" file.
10259         (recpy_record_object): Moved to py-record.h.
10260         * python/py-record.h: New file.
10261
10262 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10263
10264         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10265         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10266         indentation.
10267
10268 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10269
10270         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10271         the past maintainers section.
10272
10273 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10274
10275         * infcmd.c (get_return_value): Use regcache ctor, and remove
10276         cleanup.
10277
10278 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10279             Pedro Alves  <palves@redhat.com>
10280
10281         * regcache.c (regcache::regcache): New tag dispatch ctor.
10282         (do_cooked_read): Moved above.
10283         (regcache_dup): Use the tag dispatch ctor..
10284         * regcache.h (regcache): Declare ctor, delete copy ctor and
10285         assignment operator, remove friend regcache_dup.
10286
10287 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10288
10289         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10290         call method save instead of regcache_cpy.
10291         * regcache.h (struct regcache): Make regcache_dup a friend.
10292
10293 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10294
10295         * regcache.c (struct regcache): Move to regcache.h
10296         (regcache::arch): New method.
10297         (regcache_get_ptid): Update.
10298         (get_regcache_arch): Call arch method.
10299         (get_regcache_aspace): Call method aspace.
10300         (register_buffer): Change it to method.
10301         (regcache_save): Change it to regcache::save.
10302         (regcache_restore): Likewise.
10303         (regcache_cpy_no_passthrough): Remove the declaration.
10304         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10305         (regcache_cpy_no_passthrough): Change it to method
10306         cpy_no_passthrough.
10307         (regcache_register_status): Change it to method
10308         get_register_status.
10309         (regcache_invalidate): Change it to method invalidate.
10310         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10311         (regcache_raw_update): Change it to method raw_update.
10312         (regcache_raw_read): Likewise.
10313         (regcache_raw_read_signed): Likewise.
10314         (regcache_raw_read_unsigned): Likewise.
10315         (regcache_raw_write_signed): Likewise.
10316         (regcache_raw_write_unsigned): Likewise.
10317         (regcache_cooked_read): Likewise.
10318         (regcache_cooked_read_value): Likewise.
10319         (regcache_cooked_read_signed): Likewise.
10320         (regcache_cooked_read_unsigned): Likewise.
10321         (regcache_cooked_write_signed): Likewise.
10322         (regcache_cooked_write_unsigned): Likewise.
10323         (regcache_raw_set_cached_value): Likewise.
10324         (regcache_raw_write): Likewise.
10325         (regcache_cooked_write): Likewise.
10326         (regcache_xfer_part): Likewise.
10327         (regcache_raw_read_part): Likewise.
10328         (regcache_raw_write_part): Likewise.
10329         (regcache_cooked_read_part): Likewise.
10330         (regcache_cooked_write_part): Likewise.
10331         (regcache_raw_supply): Likewise.
10332         (regcache_raw_collect): Likewise.
10333         (regcache_transfer_regset): Likewise.
10334         (regcache_supply_regset): Likewise.
10335         (regcache_collect_regset): Likewise.
10336         (regcache_debug_print_register): Likewise.
10337         (enum regcache_dump_what): Move it to regcache.h.
10338         (regcache_dump): Change it to method dump.
10339         * regcache.h (enum regcache_dump_what): New.
10340         (class regcache): New.
10341         * target.c (target_fetch_registers): Call method
10342         debug_print_register.
10343         (target_store_registers): Likewise.
10344
10345 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10346
10347         * windows-nat.c (struct lm_info_windows): Initialize field.
10348         (windows_make_so): Allocate lm_info_windows with new.
10349         (windows_free_so): Free lm_info_windows with delete.
10350
10351 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10352
10353         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10354         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10355         cleanup.
10356         (darwin_free_so): Free lm_info_darwin with delete.
10357
10358 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10359
10360         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10361         <l_addr_p>: Change type to bool.
10362         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10363         (svr4_free_so): Free lm_info_svr4 with delete.
10364         (svr4_copy_library_list): Replace memcpy with call to copy
10365         constructor.
10366         (library_list_start_library, svr4_default_sos): Allocate
10367         lm_info_svr4 with new.
10368
10369 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10370
10371         * solib-target.c (struct lm_info_target): Add destructor,
10372         initialize fields.
10373         <name>: Change type to std::string.
10374         (library_list_start_library): Allocate lm_info_target with new.
10375         (solib_target_free_library_list): Free lm_info_target with
10376         delete.
10377         (solib_target_current_sos): Adapt to std::string.
10378         (solib_target_free_so): Free lm_info_target with delete.
10379
10380 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10381
10382         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10383         fields.
10384         (frv_current_sos): Allocate lm_info_frv with new.
10385         (frv_relocate_main_executable): Free lm_info_frv with delete,
10386         allocate with new.
10387         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10388
10389 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10390
10391         * solib-frv.c (struct lm_info_frv): Fix indentation.
10392
10393 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10394
10395         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10396         map field.
10397         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10398         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10399         and allocate with new.
10400         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10401
10402 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10403
10404         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10405         <filename, member_name>: Change type to std::string.
10406         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10407         (library_list_start_library): Allocate lm_info_aix with new.
10408         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10409         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10410         with copy constructor.
10411
10412 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10413
10414         * solist.h (struct lm_info): Remove.
10415         (struct lm_info_base): New class.
10416         (struct so_list) <lm_info>: Change type to lm_info_base *.
10417         * nto-tdep.c (struct lm_info): Remove.
10418         (lm_addr): Adjust.
10419         * solib-aix.c (struct lm_info): Rename to ...
10420         (struct lm_info_aix): ... this.  Extend lm_info_base.
10421         (lm_info_p): Rename to ...
10422         (lm_info_aix_p): ... this, and adjust.
10423         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10424         solib_aix_parse_libraries, library_list_start_library,
10425         solib_aix_free_library_list, solib_aix_parse_libraries,
10426         solib_aix_get_library_list,
10427         solib_aix_relocate_section_addresses, solib_aix_free_so,
10428         solib_aix_get_section_offsets,
10429         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10430         Adjust.
10431         (struct solib_aix_inferior_data) <library_list>: Adjust.
10432         * solib-darwin.c (struct lm_info): Rename to ...
10433         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10434         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10435         * solib-dsbt.c (struct lm_info): Rename to ...
10436         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10437         (struct dsbt_info) <main_executable_lm_info): Adjust.
10438         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10439         dsbt_relocate_section_addresses): Adjust.
10440         * solib-frv.c (struct lm_info): Rename to ...
10441         (struct lm_info_frv): ... this.  Extend lm_info_base.
10442         (main_executable_lm_info): Adjust.
10443         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10444         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10445         find_canonical_descriptor_in_load_object,
10446         frv_fdpic_find_canonical_descriptor): Adjust.
10447         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10448         to lm_info_svr4.
10449         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10450         svr4_clear_so, svr4_copy_library_list,
10451         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10452         svr4_current_sos, svr4_fetch_objfile_link_map,
10453         solist_update_incremental): Adjust.
10454         * solib-svr4.h (struct lm_info_svr4): Move here from
10455         solib-svr4.c.
10456         * solib-target.c (struct lm_info): Rename to ...
10457         (struct lm_info_target): ... this.  Extend lm_info_base.
10458         (lm_info_p): Rename to ...
10459         (lm_info_target_p): ... this.
10460         (solib_target_parse_libraries, library_list_start_segment,
10461         library_list_start_section, library_list_start_library,
10462         library_list_end_library, solib_target_free_library_list,
10463         solib_target_current_sos, solib_target_free_so,
10464         solib_target_relocate_section_addresses): Adjust.
10465         * windows-nat.c (struct lm_info): Rename to ...
10466         (struct lm_info_windows): ... this.  Extend lm_info_base.
10467         (windows_make_so, handle_load_dll, handle_unload_dll,
10468         windows_xfer_shared_libraries): Adjust.
10469
10470 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10471
10472         * solib-darwin.c (struct darwin_so_list): Remove.
10473         (darwin_current_sos): Allocate an so_list object instead of a
10474         darwin_so_list, separately allocate an lm_info object.
10475         (darwin_free_so): Free lm_info.
10476
10477 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10478
10479         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10480         with fprintf_filtered.
10481
10482 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10483
10484         * regcache.c (regcache::regcache): New function.
10485         (regcache::~regcache): New function.
10486         (regcache_xmalloc_1): Remove.
10487         (regcache_xmalloc): Call new regcache.
10488         (regcache_xfree): Call delete regcache.
10489         (get_thread_arch_aspace_regcache): Call new regcache.
10490
10491 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10492
10493         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10494         lwp instead of ptid_get_lwp.
10495
10496 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10497
10498         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10499         lwp_info instead of getting from inferior_ptid.
10500
10501 2017-04-27  Keith Seitz  <keiths@redhat.com>
10502
10503         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10504         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10505         (CV_CONVERSION_BADNESS): Define.
10506         (rank_one_type): Remove overly restrictive rvalue reference
10507         rank checks.
10508         Add cv-qualifier checks and subranks for type equality.
10509         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10510         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10511         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10512
10513 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10514
10515         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10516         count when creating the object.
10517
10518 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10519             Ulrich Weigand  <uweigand@de.ibm.com>
10520
10521         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10522         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10523         is used in AIX.
10524         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10525         (process_xcoff_symbol): Likewise.
10526         (scan_xcoff_symtab): Likewise.
10527
10528 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10529
10530         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10531         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10532         (ia64_access_reg): Use get_frame_register_unsigned.
10533         (ia64_access_rse_reg): Likewise.
10534         (ia64_libunwind_frame_prev_register): Likewise.
10535
10536 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10537
10538         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10539         * gdbarch.c: Regenerated.
10540         * gdbarch.h: Regenerated.
10541         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10542         visibility external.
10543         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10544         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10545         (enum cfa_how_kind): Move to ...
10546         (struct dwarf2_frame_state_reg_info): Likewise.
10547         (struct dwarf2_frame_state): Likewise.
10548         * dwarf2-frame.h: ... here.
10549         (dwarf2_frame_state_alloc_regs): New declaration.
10550         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10551         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10552
10553 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10554
10555         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10556         regcache_raw_read_unsigned.
10557         (xtensa_pseudo_register_write): Likewise.
10558
10559 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10560
10561         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10562         (nds32_pseudo_register_write): Likewise.
10563
10564 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10565
10566         * regcache.c (struct regcache) <readonly_p>: Change its type
10567         to bool.
10568         (regcache_xmalloc_1): Update parameter type and callers update.
10569
10570 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10571
10572         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10573         set_gdbarch_wchar_bit.
10574         * arm-tdep.c (arm_gdbarch_init): Likewise.
10575
10576 2017-04-25  Pedro Alves  <palves@redhat.com>
10577
10578         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10579         (BothAreRelocatable, memcopy, memmove): Don't define.
10580         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10581         macros.
10582
10583 2017-04-25  Pedro Alves  <palves@redhat.com>
10584
10585         * common/common-defs.h: Include "common/poison.h".
10586         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10587         and adjust.
10588         * common/poison.h: New file.
10589         * common/traits.h: Include <type_traits>.
10590         (Not, Or, Requires): New, moved from common/function-view.h.
10591
10592 2017-04-25  Pedro Alves  <palves@redhat.com>
10593
10594         * breakpoint.h (struct breakpoint): In-class initialize all
10595         fields.  Make boolean fields "bool".
10596         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10597         memset call and initializations no longer necessary.
10598
10599 2017-04-25  Pedro Alves  <palves@redhat.com>
10600
10601         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10602         reference.
10603         (pt_btrace_insn): New function.
10604         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10605
10606 2017-04-25  Pedro Alves  <palves@redhat.com>
10607
10608         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10609         "base" field and inherit from "bp_location" instead.  Add
10610         non-default ctor.
10611         (allocate_location_exception): Use new non-default ctor.
10612         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10613         (init_bp_location): Convert to ...
10614         (bp_location::bp_location): ... this new ctor, and remove memset
10615         call.
10616         (base_breakpoint_allocate_location): Use the new non-default ctor.
10617         * breakpoint.h (bp_location): Now a class.  Declare default and
10618         non-default ctors.  In-class initialize all members.
10619         (init_bp_location): Remove declaration.
10620
10621 2017-04-25  Pedro Alves  <palves@redhat.com>
10622
10623         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10624         assignment operator.
10625
10626 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10627
10628         * doublest.c (convert_doublest_to_floatformat): Call
10629         floatformat_totalsize_bytes.
10630
10631 2017-04-22  Tom Tromey  <tom@tromey.com>
10632
10633         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10634         ui_out_emit_list.
10635         * stack.c (print_frame): Use ui_out_emit_list.
10636         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10637         ui_out_emit_list.
10638         * mi/mi-main.c (print_one_inferior)
10639         (mi_cmd_data_list_register_names)
10640         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10641         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10642         ui_out_emit_list.
10643         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10644         (mi_output_solib_attribs): Use ui_out_emit_list,
10645         ui_out_emit_tuple.
10646         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10647         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10648         (mi_cmd_stack_list_args, list_args_or_locals): Use
10649         ui_out_emit_list.
10650         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10651         * breakpoint.c (print_solib_event, output_thread_groups): Use
10652         ui_out_emit_list.
10653
10654 2017-04-22  Tom Tromey  <tom@tromey.com>
10655
10656         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10657         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10658         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10659
10660 2017-04-22  Tom Tromey  <tom@tromey.com>
10661
10662         * tracepoint.c (tvariables_info_1)
10663         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10664
10665 2017-04-22  Tom Tromey  <tom@tromey.com>
10666
10667         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10668         annotate_arg_emitter.
10669         * breakpoint.c (print_mention_watchpoint)
10670         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10671         * annotate.h (struct annotate_arg_emitter): New.
10672
10673 2017-04-22  Tom Tromey  <tom@tromey.com>
10674
10675         * record-btrace.c (record_btrace_insn_history)
10676         (record_btrace_insn_history_range, record_btrace_call_history)
10677         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10678         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10679         ui_out_emit_tuple.
10680         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10681         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10682         * skip.c (skip_info): Use ui_out_emit_tuple.
10683         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10684         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10685         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10686         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10687         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10688         ui_out_emit_tuple.
10689         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10690         (output_register, mi_cmd_data_read_memory)
10691         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10692         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10693         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10694         Use ui_out_emit_tuple.
10695         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10696         ui_out_emit_tuple.
10697         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10698         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10699         * linux-thread-db.c (info_auto_load_libthread_db): Use
10700         ui_out_emit_tuple.
10701         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10702         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10703         * disasm.c (do_mixed_source_and_assembly_deprecated)
10704         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10705         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10706         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10707         * breakpoint.c (print_one_breakpoint_location)
10708         (print_one_breakpoint): Use ui_out_emit_tuple.
10709         * auto-load.c (print_script, info_auto_load_cmd): Use
10710         ui_out_emit_tuple.
10711         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10712
10713 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10714
10715         * thread.c (print_thread_info_1): Remove dead code.
10716
10717 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10718
10719         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10720         GDB_SELF_TEST.
10721         * arm-tdep.c (selftests::arm_record_test): Likewise.
10722
10723 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10724
10725         * regcache.c (regcache_restore): Remove argument 2.  Replace
10726         argument 3 with regcache.  Get register status from
10727         src->register_status and get register contents from
10728         register_buffer (src, regnum).
10729         (regcache_cpy): Update.
10730
10731 2017-04-19  Pedro Alves  <palves@redhat.com>
10732
10733         * gdbthread.h (thread): Add missing closing parenthesis in
10734         comment.
10735
10736 2017-04-19  Pedro Alves  <palves@redhat.com>
10737
10738         * common/refcounted-object.h: New file.
10739         * gdbthread.h: Include "common/refcounted-object.h".
10740         (thread_info): Inherit from refcounted_object and add comments.
10741         (thread_info::incref, thread_info::decref)
10742         (thread_info::m_refcount): Delete.
10743         (thread_info::deletable): Use the refcounted_object::refcount()
10744         method.
10745         * inferior.c (current_inferior_): Add comment.
10746         (set_current_inferior): Increment/decrement refcounts.
10747         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10748         not-deletable instead of comparing with the current inferior.
10749         (initialize_inferiors): Increment the initial inferior's refcount.
10750         * inferior.h (struct inferior): Forward declare.
10751         Include "common/refcounted-object.h".
10752         (current_inferior, set_current_inferior): Move declaration to
10753         before struct inferior's definition, and fix comment.
10754         (inferior): Inherit from refcounted_object.  Add comments.
10755         * thread.c (switch_to_thread_no_regs): Reference the thread's
10756         inferior pointer directly instead of doing a ptid lookup.
10757         (switch_to_no_thread): New function.
10758         (switch_to_thread(thread_info *)): New function, factored out
10759         from ...
10760         (switch_to_thread(ptid_t)): ... this.
10761         (restore_current_thread): Delete.
10762         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10763         fields, and add 'inf' field.
10764         (do_restore_current_thread_cleanup): Check whether old->inf is
10765         alive instead of looking up an inferior by ptid.  Use
10766         switch_to_thread and switch_to_no_thread.
10767         (restore_current_thread_cleanup_dtor): Use old->inf directly
10768         instead of lookup up an inferior by id.  Decref the inferior.
10769         Don't restore 'removable'.
10770         (make_cleanup_restore_current_thread): Same the inferior pointer
10771         in old, instead of the inferior number.  Incref the inferior.
10772         Don't save/clear 'removable'.
10773
10774 2017-04-19  Pedro Alves  <palves@redhat.com>
10775
10776         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10777         unittests/scoped_restore-selftests.c.
10778         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10779         * common/scoped_restore.h (scoped_restore_base): Make "class".
10780         (scoped_restore_base::release): New public method.
10781         (scoped_restore_base::scoped_restore_base): New protected ctor.
10782         (scoped_restore_base::m_saved_var): New protected field.
10783         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10784         scoped_restore_base base class instead of m_saved_var directly.
10785         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10786         (scoped_restore_tmpl::scoped_restore_tmpl(const
10787         scoped_restore_tmpl<T>&)): Likewise.
10788         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10789         method.
10790         (scoped_restore_tmpl::saved_var): New method.
10791         (scoped_restore_tmpl::m_saved_var): Delete.
10792         * inferior.h (inferior::detaching): Now a bool.
10793         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10794         cleanup.
10795         * unittests/scoped_restore-selftests.c: New file.
10796
10797 2017-04-19  Pedro Alves  <palves@redhat.com>
10798
10799         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10800         Re-sort in alphabetic order.
10801
10802 2017-04-18  Pedro Alves  <palves@redhat.com>
10803
10804         * xml-support.c (obstack_xml_printf): Delete.
10805         * xml-support.h (obstack_xml_printf): Delete.
10806
10807 2017-04-18  Pedro Alves  <palves@redhat.com>
10808
10809         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10810         vdebug, verror, body_text, start_element, end_element, name,
10811         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10812         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10813         is_xinclude>: Make private and add m_ prefix.
10814         (gdb_xml_parser::body_text): New method, based on ...
10815         (gdb_xml_body_text): ... this.  Adjust.
10816         (gdb_xml_parser::vdebug): New method, based on ...
10817         (gdb_xml_debug): ... this.  Adjust.
10818         (gdb_xml_parser::verror): New method, based on ...
10819         (gdb_xml_error): ... this.  Adjust.
10820         (gdb_xml_parser::start_element): New method, based on ...
10821         (gdb_xml_start_element): ... this.  Adjust.
10822         (gdb_xml_start_element_wrapper): Defer to
10823         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10824         (gdb_xml_parser::end_element): New method, based on ...
10825         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10826         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10827         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10828         (gdb_xml_parser::use_dtd): New method, based on ...
10829         (gdb_xml_use_dtd): ... this.  Adjust.
10830         (gdb_xml_parser::parse): New method, based on ...
10831         (gdb_xml_parse): ... this.  Adjust.
10832         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10833         (xinclude_start_include): Adjust to call the parser's name method.
10834         (xml_xinclude_default, xml_xinclude_start_doctype)
10835         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10836         method.
10837         (xml_process_xincludes): Adjust to call parser methods.
10838         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10839         declarations.
10840
10841 2017-04-18  Pedro Alves  <palves@redhat.com>
10842
10843         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10844         gdb::optional<std::string>.
10845         * xml-support.c: Include <string>.
10846         (scope_level::scope_level(scope_level &&))
10847         (scope_level::~scope_level): Delete.
10848         (scope_level::body): Now a std::string.
10849         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10850         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10851         parameter.
10852         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10853         (xinclude_parsing_data::output): Now a std::string reference.
10854         (xinclude_start_include): Adjust.
10855         (xml_xinclude_default): Adjust.
10856         (xml_process_xincludes): Add 'output' parameter, and return bool.
10857         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10858         and return bool.
10859         * xml-tdesc.c: Include <unordered_map> and <string>.
10860         (tdesc_xml_cache): Delete.
10861         (tdesc_xml_cache_s): Delete.
10862         (xml_cache): Now an std::unordered_map.
10863         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10864         (target_fetch_description_xml): Change return type to
10865         gdb::optional<std::string>, and adjust.
10866         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10867         (target_fetch_description_xml): Change return type to
10868         gdb::optional<std::string>.
10869
10870 2017-04-18  Pedro Alves  <palves@redhat.com>
10871
10872         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10873         unittests/optional-selftests.c.
10874         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10875         * unittests/optional-selftests.c: New file.
10876         * unittests/optional/assignment/1.cc: New file.
10877         * unittests/optional/assignment/2.cc: New file.
10878         * unittests/optional/assignment/3.cc: New file.
10879         * unittests/optional/assignment/4.cc: New file.
10880         * unittests/optional/assignment/5.cc: New file.
10881         * unittests/optional/assignment/6.cc: New file.
10882         * unittests/optional/assignment/7.cc: New file.
10883         * unittests/optional/cons/copy.cc: New file.
10884         * unittests/optional/cons/default.cc: New file.
10885         * unittests/optional/cons/move.cc: New file.
10886         * unittests/optional/cons/value.cc: New file.
10887         * unittests/optional/in_place.cc: New file.
10888         * unittests/optional/observers/1.cc: New file.
10889         * unittests/optional/observers/2.cc: New file.
10890
10891 2017-04-18  Pedro Alves  <palves@redhat.com>
10892
10893         * common/gdb_optional.h: Include common/traits.h.
10894         (in_place_t): New type.
10895         (in_place): New constexpr variable.
10896         (optional::optional): Remove member initialization of
10897         m_instantiated.
10898         (optional::optional(in_place_t...)): New constructor.
10899         (optional::~optional): Use reset.
10900         (optional::optional(const optional&)): New.
10901         (optional::optional(const optional&&)): New.
10902         (optional::optional(T &)): New.
10903         (optional::optional(T &&)): New.
10904         (operator::operator=(const optional &)): New.
10905         (operator::operator=(optional &&)): New.
10906         (operator::operator= (const T &))
10907         (operator::operator= (T &&))
10908         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10909         (operator::reset): New.
10910         (operator::m_instantiated):: Add in-class initializer.
10911         * common/traits.h: Include <type_traits>.
10912         (struct And): New types.
10913
10914 2017-04-18  Pedro Alves  <palves@redhat.com>
10915
10916         * xml-support.c: Include <vector>.
10917         (scope_level::scope_level(const gdb_xml_element *))
10918         (scope_level::scope_level(scope_level&&)): New.
10919         (scope_level::~scope_level): New.
10920         (scope_level_s): Delete.
10921         (gdb_xml_parser::scopes): Now a std::vector.
10922         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10923         Use std::vector.
10924         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10925         scope cleanup code.
10926         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10927         of the scopes member.  Use std::vector::emplace_back.
10928
10929 2017-04-18  Pedro Alves  <palves@redhat.com>
10930
10931         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10932         a bool.
10933         (gdb_xml_end_element): Change type of first parameter.
10934         (gdb_xml_cleanup): Rename to ...
10935         (gdb_xml_parser::~gdb_xml_parser): ... this.
10936         (gdb_xml_create_parser_and_cleanup): Delete with ...
10937         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10938         to this new ctor.
10939         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10940         using gdb_xml_create_parser_and_cleanup.
10941         (xinclude_parsing_data): Add ctor/dtor.
10942         (xml_xinclude_cleanup): Delete.
10943         (xml_process_xincludes): Create a local xinclude_parsing_data
10944         instead of heap-allocating one.  Create a local gdb_xml_parser
10945         instead of heap-allocating one with
10946         gdb_xml_create_parser_and_cleanup.
10947
10948 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10949
10950         PR threads/20743
10951         * fbsd-nat.c (resume_one_thread_cb): Remove.
10952         (resume_all_threads_cb): Remove.
10953         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10954         iterate_over_threads.
10955
10956 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10957
10958         * NEWS: Create a new section for the next release branch.
10959         Rename the section of the current branch, now that it has
10960         been cut.
10961
10962 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10963
10964         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10965         * version.in: Bump version to 8.0.50.DATE-git.
10966
10967 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10968
10969         PR gdb/21385
10970         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10971         independently of the host, and fix build breakage on Cygwin.
10972
10973 2017-04-13  Pedro Alves  <palves@redhat.com>
10974
10975         * inferior.c (free_inferior): Convert to ...
10976         (inferior::~inferior): ... this dtor.
10977         (inferior::inferior): New ctor, factored out from ...
10978         (add_inferior_silent): ... here.  Allocate the inferior with a new
10979         expression.
10980         (delete_inferior): Call delete instead of free_inferior.
10981         * inferior.h (gdb_environ, continuation): Forward declare.
10982         (inferior): Now a class.  Add in-class initialization to all
10983         members.  Make boolean fields bool, except 'detaching'.
10984         (inferior::inferior): New explicit ctor.
10985         (inferior::~inferior): New.
10986
10987 2017-04-13  Pedro Alves  <palves@redhat.com>
10988
10989         * inferior.c (init_inferior_list): Delete.
10990         * inferior.h (init_inferior_list): Delete.
10991
10992 2017-04-13  Pedro Alves  <palves@redhat.com>
10993
10994         PR threads/13217
10995         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10996         (top level): Call it twice, with different thread sets.
10997
10998 2017-04-13  Pedro Alves  <palves@redhat.com>
10999
11000         * thread.c: Include <algorithm>.
11001         (thread_array_cleanup): Delete.
11002         (scoped_inc_dec_ref): New class.
11003         (live_threads_count): New function.
11004         (set_thread_refcount): Delete.
11005         (tp_array_compar_ascending): Now a bool.
11006         (tp_array_compar): Convert to a std::sort comparison function.
11007         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11008         and live_threads_count.
11009
11010 2017-04-13  Pedro Alves  <palves@redhat.com>
11011
11012         * infrun.c (follow_fork_inferior): Also switch the current
11013         inferior.
11014
11015 2017-04-13  Pedro Alves  <palves@redhat.com>
11016
11017         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11018         before calling create_internal_breakpoint.
11019
11020 2017-04-13  Pedro Alves  <palves@redhat.com>
11021
11022         * fork-child.c (execv_argv): New class.
11023         (breakup_args): Refactored as ...
11024         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11025         Copy arguments to storage and replace separators with NULL
11026         terminators in place.
11027         (escape_bang_in_quoted_argument): Adjust to return bool.
11028         (execv_argv::execv_argv): New ctor.
11029         (execv_argv::init_for_shell): New method, factored out from
11030         fork_inferior.  Don't strdup strings into the vector.
11031         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11032         Remove free_vector_argv call.
11033
11034 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11035
11036         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11037         tdep->rx_psw_type.
11038
11039 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11040
11041         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11042         * rx-tdep.c (rx_gdbarch_init): Likewise.
11043
11044 2017-04-13  Pedro Alves  <palves@redhat.com>
11045
11046         * breakpoint.h (struct breakpoint): Reindent.
11047
11048 2017-04-13  Pedro Alves  <palves@redhat.com>
11049
11050         * breakpoint.c (bp_location): Rename to ...
11051         (bp_locations): ... this.  All references updated.
11052         (bp_location_count): Rename to ...
11053         (bp_locations_count): ... this.  All references updated.
11054         (bp_location_placed_address_before_address_max): Rename to ...
11055         (bp_locations_placed_address_before_address_max): ... this.  All
11056         references updated.
11057         (bp_location_shadow_len_after_address_max): Rename to ...
11058         (bp_locations_shadow_len_after_address_max): ... this.  All
11059         references updated.
11060         (bp_location_compare_addrs): Rename to ...
11061         (bp_locations_compare_addrs): ... this.  All references updated.
11062         (bp_location_compare):Rename to ...
11063         (bp_locations_compare): ... this.  All references updated.
11064         (bp_location_target_extensions_update): Rename to ...
11065         (bp_locations_target_extensions_update): ... this.  All references
11066         updated.
11067
11068 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11069
11070         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11071         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11072         'sgtty.h'.
11073         * common/gdb_termios.h: New file, with parts of "terminal.h".
11074         * inflow.c: Include "gdb_termios.h".
11075         * ser-unix.c: Include "gdb_termios.h".
11076         * terminal.h: Move terminal-related defines to
11077         "common/gdb_termios.h".
11078
11079 2017-04-12  Tom Tromey  <tom@tromey.com>
11080
11081         * probe.c (parse_probes): Update.
11082         * location.h (delete_event_location): Don't declare.
11083         (event_location_deleter::operator()): Update.
11084         * location.c (event_location_deleter::operator()): Rename from
11085         delete_event_location.
11086         * linespec.h (linespec_result) <location>: Change type to
11087         event_location_up.
11088         * linespec.c (canonicalize_linespec, event_location_to_sals)
11089         (decode_objc): Update.
11090         (linespec_result): Don't call delete_event_location.
11091         * breakpoint.c (create_breakpoints_sal)
11092         (bkpt_probe_create_sals_from_location)
11093         (strace_marker_create_sals_from_location): Update.
11094
11095 2017-04-12  Tom Tromey  <tom@tromey.com>
11096
11097         * linespec.h (struct linespec_result): Add constructor and
11098         destructor.
11099         (init_linespec_result, destroy_linespec_result)
11100         (make_cleanup_destroy_linespec_result): Don't declare.
11101         * linespec.c (init_linespec_result): Remove.
11102         (linespec_result::~linespec_result): Rename from
11103         destroy_linespec_result.  Update.
11104         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11105         Remove.
11106         * breakpoint.c (create_breakpoint, break_range_command)
11107         (decode_location_default): Update.
11108         * ax-gdb.c (agent_command_1): Update.
11109
11110 2017-04-12  Tom Tromey  <tom@tromey.com>
11111
11112         * remote.c (remote_download_tracepoint): Update.
11113         * python/py-breakpoint.c (bppy_get_location): Update.
11114         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11115         (gdbscm_breakpoint_location): Update.
11116         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11117         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11118         Change type to event_location_up.
11119         * breakpoint.c (create_overlay_event_breakpoint)
11120         (create_longjmp_master_breakpoint)
11121         (create_std_terminate_master_breakpoint)
11122         (create_exception_master_breakpoint)
11123         (breakpoint_event_location_empty_p, print_breakpoint_location)
11124         (print_one_breakpoint_location, create_thread_event_breakpoint)
11125         (init_breakpoint_sal, create_breakpoint)
11126         (print_recreate_ranged_breakpoint, break_range_command)
11127         (init_ada_exception_breakpoint, say_where): Update.
11128         (base_breakpoint_dtor): Don't call delete_event_location.
11129         (bkpt_print_recreate, tracepoint_print_recreate)
11130         (dprintf_print_recreate, update_static_tracepoint)
11131         (breakpoint_re_set_default): Update.
11132
11133 2017-04-12  Tom Tromey  <tom@tromey.com>
11134
11135         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11136         type of "to_do".  Update.
11137         (compute_stack_depth): Use std::vector.
11138
11139 2017-04-12  Tom Tromey  <tom@tromey.com>
11140
11141         * printcmd.c (find_instruction_backward): Use std::vector.
11142
11143 2017-04-12  Tom Tromey  <tom@tromey.com>
11144
11145         * symfile.c (objfilep): Remove typedef.
11146         (reread_symbols): Use a std::vector.
11147
11148 2017-04-12  Tom Tromey  <tom@tromey.com>
11149
11150         * mi/mi-main.c (exec_direction_forward): Remove.
11151         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11152         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11153         scoped_restore.
11154         * guile/guile.c (guile_repl_command, guile_command)
11155         (gdbscm_execute_gdb_command): Use scoped_restore.
11156         * go-exp.y (go_parse): Use scoped_restore.
11157         * d-exp.y (d_parse): Use scoped_restore.
11158         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11159         * c-exp.y (c_parse): Use scoped_restore.
11160
11161 2017-04-12  Tom Tromey  <tom@tromey.com>
11162
11163         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11164         (mi_parse): Update return type.
11165         (mi_parse_free): Remove.
11166         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11167         (mi_parse::~mi_parse): Rename from mi_parse_free.
11168         (mi_parse_cleanup): Remove.
11169         (mi_parse): Return a unique_ptr.  Use new.
11170         * mi/mi-main.c (mi_execute_command): Update.
11171
11172 2017-04-12  Tom Tromey  <tom@tromey.com>
11173
11174         * location.c (explicit_location_lex_one): Return a
11175         unique_xmalloc_ptr.
11176         (string_to_explicit_location): Update.  Remove cleanups.
11177
11178 2017-04-12  Tom Tromey  <tom@tromey.com>
11179
11180         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11181         (compare_value_and_voffset): Change type.  Update.
11182         (compute_vtable_size): Change type of "offset_vec".
11183         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11184         (gnuv3_get_typeid): Remove extraneous declaration.
11185
11186 2017-04-12  Tom Tromey  <tom@tromey.com>
11187
11188         * charset.h (wchar_iterator): Fix comment.
11189
11190 2017-04-12  Tom Tromey  <tom@tromey.com>
11191
11192         * charset.c (iconv_wrapper): New class.
11193         (cleanup_iconv): Remove.
11194         (convert_between_encodings): Use it.
11195
11196 2017-04-12  Tom Tromey  <tom@tromey.com>
11197
11198         * symfile.h (increment_reading_symtab): Update type.
11199         * symfile.c (decrement_reading_symtab): Remove.
11200         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11201         * psymtab.c (psymtab_to_symtab): Update.
11202         * dwarf2read.c (dw2_instantiate_symtab): Update.
11203
11204 2017-04-12  Tom Tromey  <tom@tromey.com>
11205
11206         * jit.c (struct jit_reader): Declare separately.  Add constructor
11207         and destructor.  Change type of "handle".
11208         (loaded_jit_reader): Define separately.
11209         (jit_reader_load): Update.  New "new".
11210         (jit_reader_unload_command): Use "delete".
11211         * gdb-dlfcn.h (struct dlclose_deleter): New.
11212         (gdb_dlhandle_up): New typedef.
11213         (gdb_dlopen, gdb_dlsym): Update types.
11214         (gdb_dlclose): Remove.
11215         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11216         (gdb_dlsym): Change type of "handle".
11217         (make_cleanup_dlclose): Remove.
11218         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11219         * compile/compile-c-support.c (load_libcc): Update.
11220
11221 2017-04-12  Tom Tromey  <tom@tromey.com>
11222
11223         * symtab.h (find_pcs_for_symtab_line): Change return type.
11224         * symtab.c (find_pcs_for_symtab_line): Change return type.
11225         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11226         type of "vec".  Update.
11227         (ltpy_get_pcs_for_line): Update.
11228         * linespec.c (decode_digits_ordinary): Update.
11229
11230 2017-04-12  Tom Tromey  <tom@tromey.com>
11231
11232         * tracepoint.c (actions_command): Update.
11233         * python/python.c (python_command, python_interactive_command):
11234         Update.
11235         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11236         * guile/guile.c (guile_command): Update.
11237         * defs.h (read_command_lines, read_command_lines_1): Return
11238         command_line_up.
11239         (command_lines_deleter): New struct.
11240         (command_line_up): New typedef.
11241         * compile/compile.c (compile_code_command)
11242         (compile_print_command): Update.
11243         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11244         command_line_up.
11245         (make_cleanup_free_command_lines): Remove.
11246         * cli/cli-script.c (get_command_line, read_command_lines_1)
11247         (copy_command_lines): Return command_line_up.
11248         (while_command, if_command, read_command_lines, define_command)
11249         (document_command): Update.
11250         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11251         Remove.
11252         * breakpoint.h (breakpoint_set_commands): Change type of
11253         "commands".
11254         * breakpoint.c (breakpoint_set_commands): Change type of
11255         "commands".  Update.
11256         (do_map_commands_command, update_dprintf_command_list)
11257         (create_tracepoint_from_upload): Update.
11258
11259 2017-04-12  Tom Tromey  <tom@tromey.com>
11260
11261         * tracepoint.c (scope_info): Update.
11262         * spu-tdep.c (spu_catch_start): Update.
11263         * python/python.c (gdbpy_decode_line): Update.
11264         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11265         * python/py-breakpoint.c (bppy_init): Update.
11266         * probe.c (parse_probes): Update.
11267         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11268         * location.h (event_location_deleter): New struct.
11269         (event_location_up): New typedef.
11270         (new_linespec_location, new_address_location, new_probe_location)
11271         (new_explicit_location, copy_event_location)
11272         (string_to_event_location, string_to_event_location_basic)
11273         (string_to_explicit_location): Update return type.
11274         (make_cleanup_delete_event_location): Remove.
11275         * location.c (new_linespec_location, new_address_location)
11276         (new_probe_location, new_explicit_location, copy_event_location):
11277         Return event_location_up.
11278         (delete_event_location_cleanup)
11279         (make_cleanup_delete_event_location): Remove.
11280         (string_to_explicit_location, string_to_event_location_basic)
11281         (string_to_event_location): Return event_location_up.
11282         * linespec.c (canonicalize_linespec, event_location_to_sals)
11283         (decode_line_with_current_source)
11284         (decode_line_with_last_displayed, decode_objc): Update.
11285         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11286         * completer.c (location_completer): Update.
11287         * cli/cli-cmds.c (edit_command, list_command): Update.
11288         * breakpoint.c (create_overlay_event_breakpoint)
11289         (create_longjmp_master_breakpoint)
11290         (create_std_terminate_master_breakpoint)
11291         (create_exception_master_breakpoint)
11292         (create_thread_event_breakpoint): Update.
11293         (init_breakpoint_sal): Update.  Remove some dead code.
11294         (create_breakpoint_sal): Change type of "location".  Update.
11295         (create_breakpoints_sal, create_breakpoint, break_command_1)
11296         (dprintf_command, break_range_command, until_break_command)
11297         (init_ada_exception_breakpoint)
11298         (strace_marker_create_sals_from_location)
11299         (update_static_tracepoint, trace_command, ftrace_command)
11300         (strace_command, create_tracepoint_from_upload): Update.
11301         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11302         * ax-gdb.c (agent_command_1): Update.
11303
11304 2017-04-12  Pedro Alves  <palves@redhat.com>
11305
11306         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11307         * configure.tgt: Handle i[34567]86-*-go32* and
11308         i[34567]86-*-msdosdjgpp*.
11309         * i386-tdep.c (i386_svr4_reg_to_regnum):
11310         Make extern.
11311         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11312         i386-go32-tdep.c.
11313         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11314         * i386-go32-tdep.c: New file.
11315         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11316         declarations.
11317
11318 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11319
11320         * aix-thread.c (pd_status2str): Change return type to const char *.
11321
11322 2017-04-12  Pedro Alves  <palves@redhat.com>
11323
11324         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11325         calls to set_gdbarch_gnu_triplet_regexp.
11326
11327 2017-04-12  Pedro Alves  <palves@redhat.com>
11328
11329         PR gdb/21323
11330         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11331         New enum value.
11332         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11333         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11334         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11335         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11336         * gdbarch.h, gdbarch.c: Regenerate.
11337         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11338         gdbarch_wchar_bit and gdbarch_wchar_signed.
11339         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11340         * arm-tdep.c (arm_gdbarch_init): Likewise.
11341         * avr-tdep.c (avr_gdbarch_init): Likewise.
11342         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11343         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11344         * i386-tdep.c (i386_go32_init_abi): Likewise.
11345         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11346         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11347         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11348         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11349         * sh-tdep.c (sh_gdbarch_init): Likewise.
11350         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11351         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11352         * windows-tdep.c (windows_init_abi): Likewise.
11353         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11354
11355 2017-04-12  Pedro Alves  <palves@redhat.com>
11356
11357         PR c++/21323
11358         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11359         cplus_primitive_type_char32_t>: New enum values.
11360         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11361         and cplus_primitive_type_char32_t.
11362         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11363         32, use the archtecture's built-in type for char16_t and char32_t,
11364         respectively.  Otherwise, fallback to init_integer_type as before,
11365         but make the type unsigned, and issue a complaint.
11366         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11367
11368 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11369
11370         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11371         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11372
11373 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11374
11375         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11376         'const char *'.
11377
11378 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11379
11380         * common/common-utils.c (free_vector_argv): New function.
11381         * common/common-utils.h: Include <vector>.
11382         (free_vector_argv): New prototype.
11383         * darwin-nat.c (darwin_create_inferior): Rewrite function
11384         prototype in order to constify "exec_file" and accept a
11385         "std::string" for "allargs".
11386         * fork-child.c: Include <vector>.
11387         (breakup_args): Rewrite function, using C++.
11388         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11389         and accept "std::string" for "allargs".  Update the code to
11390         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11391         and "execvp".
11392         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11393         order to constify "exec_file" and accept a "std::string" for
11394         "allargs".
11395         * go32-nat.c (go32_create_inferior): Likewise.
11396         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11397         * infcmd.c (run_command_1): Constify "exec_file".  Use
11398         "std::string" for inferior arguments.
11399         * inferior.h (fork_inferior): Update prototype.
11400         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11401         prototype in order to constify "exec_file" and accept a
11402         "std::string" for "allargs".
11403         * nto-procfs.c (procfs_create_inferior): Likewise.
11404         * procfs.c (procfs_create_inferior): Likewise.
11405         * remote-sim.c (gdbsim_create_inferior): Likewise.
11406         * remote.c (extended_remote_run): Update code to accept
11407         "std::string" as argument.
11408         (extended_remote_create_inferior): Rewrite function prototype in
11409         order to constify "exec_file" and accept a "std::string" for
11410         "allargs".
11411         * rs6000-nat.c (super_create_inferior): Likewise.
11412         (rs6000_create_inferior): Likewise.
11413         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11414         * windows-nat.c (windows_create_inferior): Likewise.
11415
11416 2017-04-11  Pedro Alves  <palves@redhat.com>
11417
11418         * thread.c: Fix whitespace throughout.
11419
11420 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11421
11422         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11423
11424 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11425
11426         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11427
11428 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11429
11430         PR gdb/21364
11431         * osdata.c (info_osdata): Check if 'type' is an empty string
11432         instead of NULL.
11433
11434 2017-04-10  Pedro Alves  <palves@redhat.com>
11435
11436         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11437         (ptid_to_global_thread_id, in_thread_list)
11438         (do_captured_list_thread_ids, set_resumed, set_running)
11439         (set_executing, set_stop_requested, finish_thread_state)
11440         (validate_registers_access, can_access_registers_ptid)
11441         (print_thread_info_1, switch_to_thread)
11442         (do_restore_current_thread_cleanup)
11443         (make_cleanup_restore_current_thread, thread_command)
11444         (thread_name_command): Use operator== instead of ptid_equal.
11445
11446 2017-04-10  Pedro Alves  <palves@redhat.com>
11447
11448         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11449         (current_thread_cleanup_chain): Delete.
11450         (restore_current_thread_cleanup_dtor)
11451         (make_cleanup_restore_current_thread): Remove references to
11452         current_thread_cleanup_chain.
11453
11454 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11455
11456         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11457         REG_UNKNOWN.
11458
11459 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11460
11461         PR gdb/19942
11462         * gdbthread.h (thread_info::deletable): New method.
11463         (thread_info::incref): New method.
11464         (thread_info::decref): New method.
11465         (thread_info::refcount): Move it to private.
11466         * infrun.c (save_stop_context): Call inc_refcount.
11467         (release_stop_context_cleanup): Likewise.
11468         * thread.c (set_thread_exited): New function.
11469         (init_thread_list): Delete "tp" only it is deletable, otherwise
11470         call set_thread_exited.
11471         (delete_thread_1): Call set_thread_exited.
11472         (current_thread_cleanup) <inferior_pid>: Remove.
11473         <thread>: New field.
11474         (restore_current_thread_ptid_changed): Removed.
11475         (do_restore_current_thread_cleanup): Adjust.
11476         (restore_current_thread_cleanup_dtor): Don't call
11477         find_thread_ptid.
11478         (set_thread_refcount): Use dec_refcount.
11479         (make_cleanup_restore_current_thread): Adjust.
11480         (thread_apply_all_command): Call inc_refcount.
11481         (_initialize_thread): Don't call
11482         observer_attach_thread_ptid_changed.
11483
11484 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11485
11486         * thread.c (delete_thread_1): Hoist code on marking thread as
11487         exited.
11488
11489 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11490
11491         * windows-nat.c (windows_detach): Initialize ptid with
11492         minus_one_ptid.
11493
11494 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11495
11496         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11497
11498 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11499
11500         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11501         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11502         (bfin_pseudo_register_write): Likewise
11503
11504 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11505
11506         * common/ptid.h (struct ptid): Change to...
11507         (class ptid_t): ... this.
11508         <ptid_t>: New constructors.
11509         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11510         matches>: New methods.
11511         <make_null, make_minus_one>: New static methods.
11512         <pid>: Rename to...
11513         <m_pid>: ...this.
11514         <lwp>: Rename to...
11515         <m_lwp>: ...this.
11516         <tid>: Rename to...
11517         <m_tid>: ...this.
11518         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11519         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11520         as references, move comment to class ptid_t.
11521         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11522         ptid_t static methods.
11523         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11524         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11525         Take ptid arguments as references, implement using ptid_t methods.
11526         * unittests/ptid-selftests.c: New file.
11527         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11528         unittests/ptid-selftests.c.
11529         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11530
11531 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11532
11533         * python/python.c (python_run_simple_file): Cast mode literal to
11534         non-const char pointer as expected by PyFile_FromString.
11535
11536 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11537
11538         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11539         minus_one_ptid and null_ptid.
11540
11541 2017-04-05  Pedro Alves  <palves@redhat.com>
11542
11543         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11544         * configure: Regenerate.
11545
11546 2017-04-05  Pedro Alves  <palves@redhat.com>
11547
11548         * ada-exp.y (yyerror): Constify.
11549         * ada-lang.c (bound_name, get_selections)
11550         (ada_variant_discrim_type)
11551         (ada_variant_discrim_name, ada_value_struct_elt)
11552         (ada_lookup_struct_elt_type, is_unchecked_variant)
11553         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11554         (catch_ada_exception_command_split)
11555         (catch_ada_assert_command_split, catch_assert_command)
11556         (ada_op_name): Constify.
11557         * ada-lang.h (ada_yyerror, get_selections)
11558         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11559         * arc-tdep.c (arc_print_frame_cache): Constify.
11560         * arm-tdep.c (arm_skip_stub): Constify.
11561         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11562         (gen_aggregate_elt_ref): Constify.
11563         * bcache.c (print_bcache_statistics): Constify.
11564         * bcache.h (print_bcache_statistics): Constify.
11565         * break-catch-throw.c (catch_exception_command_1):
11566         * breakpoint.c (struct ep_type_description::description):
11567         Constify.
11568         (add_solib_catchpoint): Constify.
11569         (catch_fork_command_1): Add cast.
11570         (add_catch_command): Constify.
11571         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11572         Constify.
11573         * bsd-uthread.c (bsd_uthread_state): Constify.
11574         * buildsym.c (patch_subfile_names): Constify.
11575         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11576         Constify.
11577         * c-exp.y (yyerror): Constify.
11578         (token::oper): Constify.
11579         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11580         * c-varobj.c (cplus_describe_child): Constify.
11581         * charset.c (find_charset_names): Add cast.
11582         (find_charset_names): Constify array and add const_cast.
11583         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11584         (edit_command): Constify.
11585         * cli/cli-decode.c (lookup_cmd): Constify.
11586         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11587         Constify.
11588         (struct dump_context): Constify.
11589         (add_dump_command, restore_command): Constify.
11590         * cli/cli-script.c (get_command_line): Constify.
11591         * cli/cli-script.h (get_command_line): Constify.
11592         * cli/cli-utils.c (check_for_argument): Constify.
11593         * cli/cli-utils.h (check_for_argument): Constify.
11594         * coff-pe-read.c (struct read_pe_section_data): Constify.
11595         * command.h (lookup_cmd): Constify.
11596         * common/print-utils.c (decimal2str): Constify.
11597         * completer.c (gdb_print_filename): Constify.
11598         * corefile.c (set_gnutarget): Constify.
11599         * cp-name-parser.y (yyerror): Constify.
11600         * cp-valprint.c (cp_print_class_member): Constify.
11601         * cris-tdep.c (cris_register_name, crisv32_register_name):
11602         Constify.
11603         * d-exp.y (yyerror): Constify.
11604         (struct token::oper): Constify.
11605         * d-lang.h (d_yyerror): Constify.
11606         * dbxread.c (struct header_file_location::name): Constify.
11607         (add_old_header_file, add_new_header_file, last_function_name)
11608         (dbx_next_symbol_text, add_bincl_to_list)
11609         (find_corresponding_bincl_psymtab, set_namestring)
11610         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11611         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11612         * defs.h (command_line_input, print_address_symbolic)
11613         (deprecated_readline_begin_hook): Constify.
11614         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11615         Constify.
11616         * event-top.c (handle_line_of_input): Constify and add cast.
11617         * exceptions.c (catch_errors): Constify.
11618         * exceptions.h (catch_errors): Constify.
11619         * expprint.c (print_subexp_standard, op_string, op_name)
11620         (op_name_standard, dump_raw_expression, dump_raw_expression):
11621         * expression.h (op_name, op_string, dump_raw_expression):
11622         Constify.
11623         * f-exp.y (yyerror): Constify.
11624         (struct token::oper): Constify.
11625         (struct f77_boolean_val::name): Constify.
11626         * f-lang.c (f_word_break_characters): Constify.
11627         * f-lang.h (f_yyerror): Constify.
11628         * fork-child.c (fork_inferior): Add cast.
11629         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11630         (new_variant): Constify.
11631         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11632         * gdbarch.c: Regenerate.
11633         * gdbcore.h (set_gnutarget): Constify.
11634         * go-exp.y (yyerror): Constify.
11635         (token::oper): Constify.
11636         * go-lang.h (go_yyerror): Constify.
11637         * go32-nat.c (go32_sysinfo): Constify.
11638         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11639         * guile/scm-cmd.c (cmdscm_function): Constify.
11640         * guile/scm-param.c (pascm_param_value): Constify.
11641         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11642         (h8300sx_register_name): Constify.
11643         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11644         Constify.
11645         * ia64-tdep.c (ia64_register_names): Constify.
11646         * infcmd.c (construct_inferior_arguments): Constify.
11647         (path_command, attach_post_wait): Constify.
11648         * language.c (show_range_command, show_case_command)
11649         (unk_lang_error): Constify.
11650         * language.h (language_defn::la_error)
11651         (language_defn::la_name_of_this): Constify.
11652         * linespec.c (decode_line_2): Constify.
11653         * linux-thread-db.c (thread_db_err_str): Constify.
11654         * lm32-tdep.c (lm32_register_name): Constify.
11655         * m2-exp.y (yyerror): Constify.
11656         * m2-lang.h (m2_yyerror): Constify.
11657         * m32r-tdep.c (m32r_register_names): Constify and make static.
11658         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11659         * m88k-tdep.c (m88k_register_name): Constify.
11660         * macroexp.c (appendmem): Constify.
11661         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11662         (upgrade_type, parse_external, parse_partial_symbols)
11663         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11664         (new_symbol): Constify.
11665         * memattr.c (mem_info_command): Constify.
11666         * mep-tdep.c (register_name_from_keyword): Constify.
11667         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11668         Constify.
11669         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11670         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11671         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11672         cast.
11673         (mi_execute_async_cli_command): Constify.
11674         * mips-tdep.c (mips_register_name): Constify.
11675         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11676         (am33_register_name, am33_2_register_name)
11677         * moxie-tdep.c (moxie_register_names): Constify.
11678         * nat/linux-osdata.c (osdata_type): Constify fields.
11679         * nto-tdep.c (nto_parse_redirection): Constify.
11680         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11681         (lookup_child_selector): Constify.
11682         (objc_methcall::name): Constify.
11683         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11684         (lookup_struct_typedef): Constify.
11685         * objfiles.c (pc_in_section): Constify.
11686         * objfiles.h (pc_in_section): Constify.
11687         * p-exp.y (struct token::oper): Constify.
11688         (yyerror): Constify.
11689         * p-lang.h (pascal_yyerror): Constify.
11690         * parser-defs.h (op_name_standard): Constify.
11691         (op_print::string): Constify.
11692         (exp_descriptor::op_name): Constify.
11693         * printcmd.c (print_address_symbolic): Constify.
11694         * psymtab.c (print_partial_symbols): Constify.
11695         * python/py-breakpoint.c (stop_func): Constify.
11696         (bppy_get_expression): Constify.
11697         * python/py-cmd.c (cmdpy_completer::name): Constify.
11698         (cmdpy_function): Constify.
11699         * python/py-event.c (evpy_add_attribute)
11700         (gdbpy_initialize_event_generic): Constify.
11701         * python/py-event.h (evpy_add_attribute)
11702         (gdbpy_initialize_event_generic): Constify.
11703         * python/py-evts.c (add_new_registry): Constify.
11704         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11705         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11706         * python/py-inferior.c (get_buffer): Add cast.
11707         * python/py-param.c (parm_constant::name): Constify.
11708         * python/py-unwind.c (fprint_frame_id): Constify.
11709         * python/python.c (gdbpy_parameter_value): Constify.
11710         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11711         * remote.c (memory_packet_config::name): Constify.
11712         (show_packet_config_cmd, remote_write_bytes)
11713         (remote_buffer_add_string):
11714         * reverse.c (exec_reverse_once): Constify.
11715         * rs6000-tdep.c (variant::name, variant::description): Constify.
11716         * rust-exp.y (rustyyerror): Constify.
11717         * rust-lang.c (rust_op_name): Constify.
11718         * rust-lang.h (rustyyerror): Constify.
11719         * serial.h (serial_ops::name): Constify.
11720         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11721         (sh_sh3e_register_name, sh_sh2e_register_name)
11722         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11723         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11724         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11725         (sh_sh4al_dsp_register_name): Constify.
11726         * sh64-tdep.c (sh64_register_name): Constify.
11727         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11728         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11729         * stabsread.c (patch_block_stabs, read_type_number)
11730         (ref_map::stabs, ref_add, process_reference)
11731         (symbol_reference_defined, define_symbol, define_symbol)
11732         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11733         (read_one_struct_field, read_struct_fields, read_baseclasses)
11734         (read_tilde_fields, read_struct_type, read_array_type)
11735         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11736         (read_huge_number, read_range_type, read_args, common_block_start)
11737         (find_name_end): Constify.
11738         * stabsread.h (common_block_start, define_symbol)
11739         (process_one_symbol, symbol_reference_defined, ref_add):
11740         * symfile.c (get_section_index, add_symbol_file_command):
11741         * symfile.h (get_section_index): Constify.
11742         * target-descriptions.c (tdesc_type::name): Constify.
11743         (tdesc_free_type): Add cast.
11744         * target.c (find_default_run_target):
11745         (add_deprecated_target_alias, find_default_run_target)
11746         (target_announce_detach): Constify.
11747         (do_option): Constify.
11748         * target.h (add_deprecated_target_alias): Constify.
11749         * thread.c (print_thread_info_1): Constify.
11750         * top.c (deprecated_readline_begin_hook, command_line_input):
11751         Constify.
11752         (init_main): Add casts.
11753         * top.h (handle_line_of_input): Constify.
11754         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11755         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11756         (tfind_command): Rename to ...
11757         (tfind_command_1): ... this and constify.
11758         (tfind_command): New function.
11759         (tfind_end_command, tfind_start_command): Adjust.
11760         (encode_source_string): Constify.
11761         * tracepoint.h (encode_source_string): Constify.
11762         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11763         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11764         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11765         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11766         * tui/tui-win.c (parse_scrolling_args): Constify.
11767         * tui/tui-windata.c (tui_erase_data_content): Constify.
11768         * tui/tui-windata.h (tui_erase_data_content): Constify.
11769         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11770         * tui/tui.c (tui_enable): Add cast.
11771         * utils.c (defaulted_query): Constify.
11772         (init_page_info): Add cast.
11773         (puts_debug, subset_compare): Constify.
11774         * utils.h (subset_compare): Constify.
11775         * varobj.c (varobj_format_string): Constify.
11776         * varobj.h (varobj_format_string): Constify.
11777         * vax-tdep.c (vax_register_name): Constify.
11778         * windows-nat.c (windows_detach): Constify.
11779         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11780         * xml-support.c (gdb_xml_end_element): Constify.
11781         * xml-tdesc.c (tdesc_start_reg): Constify.
11782         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11783         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11784         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11785
11786 2017-04-05  Pedro Alves  <palves@redhat.com>
11787
11788         * proc-api.c (struct trans): Constify.
11789         (procfs_note): Constify.
11790         * proc-events.c (struct trans, syscall_table):
11791         * proc-flags.c (struct trans): Constify.
11792         * proc-utils.h (procfs_note): Constify.
11793         * proc-why.c (struct trans): Constify.
11794         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11795         (procfs_detach): Constify.
11796         * sol-thread.c (struct string_map): Constify.
11797         (td_err_string, td_state_string): Constify.
11798
11799 2017-04-05  Pedro Alves  <palves@redhat.com>
11800
11801         * proc-api.c (procfs_filename): Don't initialize
11802         procfs_filename.
11803         (prepare_to_trace): Assume procfs_filename is non-NULL.
11804         (_initialize_proc_api): Give procfs_filename a default value here.
11805
11806 2017-04-05  Pedro Alves  <palves@redhat.com>
11807
11808         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11809         'cond_string' parameter.
11810         (extract_exception_regexp): Constify 'string' parameter.
11811         (catch_exception_command_1): Constify.
11812         * breakpoint.c (init_catchpoint)
11813         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11814         parameter.
11815         (ep_parse_optional_if_clause, catch_fork_command_1)
11816         (catch_exec_command_1): Constify.
11817         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11818         parameter.
11819         (ep_parse_optional_if_clause): Constify.
11820         * cli/cli-utils.c (remove_trailing_whitespace)
11821         (check_for_argument): Constify.
11822         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11823         non-const overload.
11824         (check_for_argument): Likewise.
11825
11826 2017-04-05  Pedro Alves  <palves@redhat.com>
11827
11828         * event-top.c (command_line_handler): Add cast to execute_command
11829         call.
11830         * record-btrace.c (cmd_record_btrace_bts_start)
11831         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11832         (cmd_record_btrace_start): Add cast to execute_command call.
11833         * record-full.c (record_full_goto_insn):
11834         * record.c (record_start, record_stop): Add cast to
11835         execute_command_to_string calls.
11836         (cmd_record_start): Add cast to execute_command calls.
11837
11838 2017-04-05  Pedro Alves  <palves@redhat.com>
11839
11840         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11841         static inline function.
11842         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11843         array and use gdb_PyArg_ParseTupleAndKeywords.
11844         * python/py-cmd.c (cmdpy_init): Likewise.
11845         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11846         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11847         (infpy_search_memory): Likewise.
11848         * python/py-objfile.c (objfpy_add_separate_debug_file)
11849         (gdbpy_lookup_objfile): Likewise.
11850         * python/py-symbol.c (gdbpy_lookup_symbol)
11851         (gdbpy_lookup_global_symbol): Likewise.
11852         * python/py-type.c (gdbpy_lookup_type): Likewise.
11853         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11854         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11855         Likewise.
11856
11857 2017-04-05  Pedro Alves  <palves@redhat.com>
11858
11859         * python/python-internal.h (gdb_PyGetSetDef): New type.
11860         * python/py-block.c (block_object_getset)
11861         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11862         * python/py-event.c (event_object_getset)
11863         (finish_breakpoint_object_getset): Likewise.
11864         * python/py-inferior.c (inferior_object_getset): Likewise.
11865         * python/py-infthread.c (thread_object_getset): Likewise.
11866         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11867         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11868         * python/py-objfile.c (objfile_getset): Likewise.
11869         * python/py-progspace.c (pspace_getset): Likewise.
11870         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11871         Likewise.
11872         * python/py-record.c (recpy_record_getset): Likewise.
11873         * python/py-symbol.c (symbol_object_getset): Likewise.
11874         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11875         Likewise.
11876         * python/py-type.c (type_object_getset, field_object_getset):
11877         Likewise.
11878         * python/py-value.c (value_object_getset): Likewise.
11879
11880 2017-04-05  Pedro Alves  <palves@redhat.com>
11881
11882         * python/python-internal.h (gdb_PyObject_CallMethod)
11883         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11884         New functions.
11885         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11886         (PySys_GetObject, PySys_SetPath): New macros.
11887
11888 2017-04-05  Pedro Alves  <palves@redhat.com>
11889
11890         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11891         info_osdata_command.
11892         * osdata.c (info_osdata_command): Rename to ...
11893         (info_osdata): ... this.  Constify 'type' parameter, and remove
11894         the 'from_tty' parameter.  Accept NULL TYPE.
11895         (info_osdata_command): New function.
11896         * osdata.h (info_osdata_command): Remove declaration.
11897         (info_osdata): New declaration.
11898
11899 2017-04-05  Pedro Alves  <palves@redhat.com>
11900
11901         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11902         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11903         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11904         parameter.
11905         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11906         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11907         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11908         parameter.
11909         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11910         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11911         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11912         (mi_cmd_file_list_exec_source_files)
11913         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11914         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11915         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11916         parameter.
11917         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11918         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11919         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11920         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11921         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11922         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11923         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11924         'command' parameter.
11925         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11926         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11927         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11928         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11929         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11930         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11931         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11932         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11933         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11934         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11935         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11936         parameter.
11937         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11938         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11939         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11940         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11941         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11942         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11943         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11944         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11945         (mi_cmd_data_list_changed_registers)
11946         (mi_cmd_data_write_register_values)
11947         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11948         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11949         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11950         (mi_cmd_list_features, mi_cmd_list_target_features)
11951         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11952         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11953         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11954         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11955         (mi_cmd_trace_frame_collected): Constify 'command'
11956         parameter.
11957         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11958         'command' parameter.
11959
11960 2017-04-05  Pedro Alves  <palves@redhat.com>
11961
11962         * ada-lang.c (ada_completer_word_break_characters): Now a const
11963         array.
11964         (ada_get_gdb_completer_word_break_characters): Constify.
11965         * completer.c (gdb_completer_command_word_break_characters)
11966         (gdb_completer_file_name_break_characters)
11967         (gdb_completer_quote_characters): Now const arrays.
11968         (get_gdb_completer_quote_characters): Constify.
11969         (set_rl_completer_word_break_characters): New function.
11970         (set_gdb_completion_word_break_characters)
11971         (complete_line_internal): Use it.
11972         * completer.h (get_gdb_completer_quote_characters): Constify.
11973         (set_rl_completer_word_break_characters): Declare.
11974         * f-lang.c (f_word_break_characters): Constify.
11975         * language.c (default_word_break_characters): Constify.
11976         * language.h (language_defn::la_word_break_characters): Constify.
11977         (default_word_break_characters): Constify.
11978         * top.c (init_main): Use set_rl_completer_word_break_characters.
11979
11980 2017-04-05  Pedro Alves  <palves@redhat.com>
11981
11982         * aix-thread.c (aix_thread_pid_to_str)
11983         (aix_thread_extra_thread_info): Constify.
11984         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11985         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11986         (bsd_uthread_pid_to_str): Constify.
11987         * corelow.c (core_pid_to_str): Constify.
11988         * darwin-nat.c (darwin_pid_to_str): Constify.
11989         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11990         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11991         Constify.
11992         * gnu-nat.c (gnu_pid_to_str): Constify.
11993         * go32-nat.c (go32_pid_to_str): Constify.
11994         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11995         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11996         * inferior.c (inferior_pid_to_str): Constify.
11997         * linux-nat.c (linux_nat_pid_to_str): Constify.
11998         * linux-tdep.c (linux_core_pid_to_str): Constify.
11999         * linux-thread-db.c (thread_db_pid_to_str)
12000         (thread_db_extra_thread_info): Constify.
12001         * nto-tdep.c (nto_extra_thread_info): Constify.
12002         * nto-tdep.h (nto_extra_thread_info): Constify.
12003         * obsd-nat.c (obsd_pid_to_str): Constify.
12004         * procfs.c (procfs_pid_to_str): Constify.
12005         * ravenscar-thread.c (ravenscar_extra_thread_info)
12006         (ravenscar_pid_to_str): Constify.
12007         * remote-sim.c (gdbsim_pid_to_str): Constify.
12008         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12009         Constify.
12010         * sol-thread.c (solaris_pid_to_str): Constify.
12011         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12012         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12013         * target.c (default_pid_to_str, target_pid_to_str)
12014         (normal_pid_to_str, default_pid_to_str): Constify.
12015         * target.h (target_ops::to_pid_to_str)
12016         (target_ops::to_extra_thread_info): Constify.
12017         (target_pid_to_str, normal_pid_to_str): Constify.
12018         * windows-nat.c (windows_pid_to_str): Constify.
12019         * gdbarch.sh (core_pid_to_str): Constify.
12020         * target-delegates.c: Regenerate.
12021         * gdbarch.h, gdbarch.c: Regenerate.
12022
12023 2017-04-05  Pedro Alves  <palves@redhat.com>
12024
12025         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12026         the memory of the temporary warning_pre_print override.
12027         * utils.c (warning_pre_print): Constify.
12028         * utils.h (warning_pre_print): Constify.
12029
12030 2017-04-05  Pedro Alves  <palves@redhat.com>
12031
12032         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12033         (shell_command): New function.
12034         (make_command): Use std::string.
12035         (init_cli_cmds): Register shell_command instead of shell_escape.
12036
12037 2017-04-05  Pedro Alves  <palves@redhat.com>
12038
12039         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12040         * tracepoint.c (default_collect): Don't initialize.
12041
12042 2017-04-05  Pedro Alves  <palves@redhat.com>
12043
12044         * macroexp.c (macro_buffer::shared): Now a bool.
12045         (init_buffer): Update.
12046         (init_shared_buffer): Constify 'addr' parameter.
12047         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12048         casts.
12049
12050 2017-04-05  Pedro Alves  <palves@redhat.com>
12051
12052         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12053         * disasm.c (set_disassembler_options): Constify local.
12054         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12055
12056 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12057
12058         PR gdb/21352
12059         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12060         option.
12061
12062 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12063
12064         * frame.c (frame_unwind_register_unsigned): Call
12065         frame_unwind_register_value.
12066
12067 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12068
12069         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12070         Use gdb_test_multiple, and don't match anchor.
12071
12072 2017-04-05  Pedro Alves  <palves@redhat.com>
12073
12074         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12075         (Write After Approval): Remove Simon Marchi.
12076
12077 2017-04-05  Pedro Alves  <palves@redhat.com>
12078
12079         * common/gdb_optional.h (optional::optional): Make constexpr and
12080         initialize m_dummy.
12081
12082 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12083
12084         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12085         (amd64fbsd_jmp_buf_reg_offset): Remove.
12086         (amd64fbsd_supply_uthread): Remove function.
12087         (amd64fbsd_collect_uthread): Remove function.
12088         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12089         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12090         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12091         (fbsd-nat.c): Update comment.
12092         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12093         (i386fbsd_jmp_buf_reg_offset): Remove.
12094         (i386fbsd_supply_uthread): Remove function.
12095         (i386fbsd_collect_uthread): Remove function.
12096         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12097
12098 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12099
12100         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12101         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12102         * NEWS: Mention that support for FreeBSD/alpha was removed.
12103         * alpha-fbsd-tdep.c: Delete file.
12104         * config/alpha/fbsd.mh: Delete file.
12105         * configure.host: Delete alpha*-*-freebsd* and
12106         alpha*-*-kfreebsd*-gnu.
12107         * configure.tgt: Delete alpha*-*-freebsd* and
12108         alpha*-*-kfreebsd*-gnu.
12109
12110 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12111
12112         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12113         amd64bsd_store_inferior_registers): Use ptid from regcache.
12114
12115 2017-04-04  Pedro Alves  <palves@redhat.com>
12116
12117         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12118         data fields, make them private and add "m_" prefixes.
12119         (lnp_state_machine::lnp_state_machine): New ctor.
12120         (record_line, check_line_address, handle_set_discriminator)
12121         (handle_set_address, handle_advance_pc, handle_special_opcode)
12122         (handle_advance_line, handle_set_file, handle_negate_stmt)
12123         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12124         (end_sequence, advance_line): New methods.
12125         (m_gdbarch, m_record_lines_p): New fields.
12126         (lnp_reader_state): Delete.
12127         (dwarf_record_line): Rename to ...
12128         (lnp_state_machine::record_line): ... adjust.
12129         (init_lnp_state_machine): Delete.
12130         (lnp_state_machine::lnp_state_machine): New.
12131         (check_line_address): Rename to ...
12132         (lnp_state_machine::check_line_address): This.
12133         (dwarf_decode_lines_1): Remove reference to "reader_state".
12134         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12135         State machine internal state manipulation moved to
12136         lnp_state_machine methods.
12137
12138 2017-04-04  Pedro Alves  <palves@redhat.com>
12139
12140         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12141         unittests/offset-type-selftests.c.
12142         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12143         * common/offset-type.h: New file.
12144         * common/preprocessor.h: New file.
12145         * common/traits.h: New file.
12146         * common/valid-expr.h: New file.
12147         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12148         sect_offset and cu_offset strong typedefs throughout.
12149         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12150         typedefs throughout.
12151         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12152         sect_offset and cu_offset strong typedefs throughout.
12153         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12154         typedefs throughout.
12155         * gdbtypes.h: Include "common/offset-type.h".
12156         (cu_offset): Now an offset type (strong typedef) instead of a
12157         struct.
12158         (sect_offset): Likewise.
12159         (union call_site_parameter_u): Rename "param_offset" field to
12160         "param_cu_off".
12161         * unittests/offset-type-selftests.c: New file.
12162
12163 2017-04-04  Pedro Alves  <palves@redhat.com>
12164
12165         * common/underlying.h: New file.
12166         * dwarf2read.c: Include "common/gdb_optional.h" and
12167         "common/underlying.h".
12168         (dir_index, file_name_index): New types.
12169         (file_entry): Use them.
12170         (file_entry::include): Use to_underlying.
12171         (line_header::add_file_name): Use dir_index.
12172         (read_formatted_entries): Use gdb::optional.  Read form before
12173         writting to file_entry.
12174         (dwarf_decode_line_header): Use dir_index.
12175         (lnp_state_machine::current_file): Use to_underlying.
12176         (lnp_state_machine::file): Change type to file_name_index.
12177         (dwarf_record_line): Use to_underlying.
12178         (init_lnp_state_machine): Use file_name_index.
12179         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12180
12181 2017-04-04  Pedro Alves  <palves@redhat.com>
12182
12183         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12184         operator bool, has_value and get methods.
12185
12186 2017-04-04  Pedro Alves  <palves@redhat.com>
12187
12188         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12189         fields.
12190         (line_header): Initialize all data fields.  Change type of
12191         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12192         Change type of include_dirs to std::vector<const char *>.  Remove
12193         num_include_dirs, include_dirs_size.  Change type of file_names to
12194         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12195         (line_header::line_header): New.
12196         (line_header::add_include_dir, line_header::add_file_name): New
12197         methods.
12198         (line_header::include_dir_at): Remove NULL check.
12199         (line_header::file_name_at): Add const overload.
12200         (line_header_up): New unique_ptr typedef.
12201         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12202         std::vector.  Remove free_line_header call.
12203         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12204         free_line_header call.
12205         (free_cu_line_header): Delete.
12206         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12207         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12208         Adjust to use std::vector.
12209         (free_line_header): Delete.
12210         (free_line_header_voidp): Use delete.
12211         (add_include_dir): Replace with ...
12212         (line_header::add_include_dir): ... this method.  Use std::vector.
12213         (add_file_name): Replace with ...
12214         (line_header::add_file_name): ... this method.  Use std::vector.
12215         (add_include_dir_stub): Delete.
12216         (read_formatted_entries): Remove memset.
12217         (dwarf_decode_line_header): Return a line_header_up instead of a
12218         raw pointer.  Remove cleanup handling.  Pass lambdas to
12219         read_formatted_entries.  Adjust to use line_header methods.
12220         (dwarf_decode_lines_1): Adjust to use line_header methods.
12221         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12222         use std::vector.
12223
12224 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12225
12226         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12227         instead of struct ptid.
12228
12229 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12230
12231         * frame.c (get_frame_register_bytes): Unwind using value.
12232         (put_frame_register_bytes): Likewise.
12233
12234 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12235
12236         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12237         aggregate-like.
12238
12239 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12240
12241         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12242
12243 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12244
12245         * gdbthread.h (struct thread_info): Declare constructor and
12246         destructor.  Add some in-class member initializers.
12247         * thread.c (free_thread): Remove.
12248         (init_thread_list): Call delete instead of free_thread.
12249         (new_thread): Call thread_info constructor.
12250         (thread_info::thread_info): New function.
12251         (thread_info::~thread_info): New function.
12252         (delete_thread_1): Call delete instead of free_thread.
12253         (make_cleanup_restore_current_thread): Move tp and frame to
12254         inner block.
12255
12256 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12257
12258         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12259         (arc_skip_prologue): Likewise.
12260         (arc_make_frame_cache): Likewise.
12261         (arc_pv_get_operand): New function.
12262         (arc_is_in_prologue): Likewise.
12263         (arc_analyze_prologue): Likewise.
12264         (arc_print_frame_cache): Likewise.
12265         (MAX_PROLOGUE_LENGTH): New constant.
12266
12267 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12268
12269         * configure.tgt: Add arc-insn.o.
12270         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12271         (dump_arc_instruction_command): New function.
12272         (arc_fprintf_disasm): Likewise.
12273         (arc_disassemble_info): Likewise.
12274         (arc_insn_get_operand_value): Likewise.
12275         (arc_insn_get_operand_value_signed): Likewise.
12276         (arc_insn_get_memory_base_reg): Likewise.
12277         (arc_insn_get_memory_offset): Likewise.
12278         (arc_insn_get_branch_target): Likewise.
12279         (arc_insn_dump): Likewise.
12280         (arc_insn_get_linear_next_pc): Likewise.
12281         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12282         (arc_disassemble_info): Likewise.
12283         (arc_insn_get_branch_target): Likewise.
12284         (arc_insn_get_linear_next_pc): Likewise.
12285         * NEWS: Mention new "maint print arc arc-instruction".
12286
12287 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12288
12289         * arc-tdep (maintenance_print_arc_list): New variable.
12290         (maintenance_print_arc_command): New function.
12291
12292 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12293
12294         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12295         Add "limm" and "reserved".
12296         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12297         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12298         * arc-tdep.h (arc_regnum): Likewise.
12299
12300 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12301
12302         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12303         for THREADPTR register.
12304         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12305         register.
12306         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12307         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12308         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12309
12310 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12311
12312         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12313         registers above gdbarch_num_regs (gdbarch) as privileged in
12314         call0 ABI.
12315
12316 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12317
12318         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12319         for a single specified register or for all registers in
12320         a0_base..a0_base + C0_NREGS range.
12321         (supply_gregset_reg): Call regcache_raw_supply for a single
12322         specified register or for all registers in a0_base..a0_base +
12323         C0_NREGS range.
12324
12325 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12326
12327         * arch/xtensa.h (C0_NREGS): Add definition.
12328         * xtensa-tdep.c (C0_NREGS): Remove definition.
12329
12330 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12331
12332         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12333         Drop xtensa_default_isa initialization.
12334         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12335
12336 2017-03-27  Pedro Alves  <palves@redhat.com>
12337
12338         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12339         (file_entry::include_dir): New method.
12340         (line_header::include_dir_at, line_header::file_name_at): New
12341         methods.
12342         (setup_type_unit_groups, setup_type_unit_groups)
12343         (psymtab_include_file_name): Simplify using the new methods.
12344         (lnp_state_machine) <the_line_header>: New field.
12345         <file>: Add comment.
12346         (lnp_state_machine::current_file): New method.
12347         (dwarf_record_line): Simplify using the new methods.
12348         (init_lnp_state_machine): Initialize the "the_line_header" field.
12349         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12350         Simplify using the new methods.
12351
12352 2017-03-27  Pedro Alves  <palves@redhat.com>
12353
12354         * cp-name-parser.y (make_empty): Delete.
12355         (demangler_special, nested_name, ptr_operator, array_indicator)
12356         (direct_declarator, declarator_1): Use fill_comp instead of
12357         make_empty.
12358
12359 2017-03-27  Pedro Alves  <palves@redhat.com>
12360
12361         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12362         to ATTRIBUTE_PRINTF.
12363         * solib-target.c (library_list_start_list): Print "string" not
12364         "version".
12365         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12366         gdb_xml_error call.
12367
12368 2017-03-27  Pedro Alves  <palves@redhat.com>
12369
12370         * dwarf2read.c (struct file_and_directory): New.
12371         (dwarf2_get_dwz_file): Adjust to use std::string.
12372         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12373         (find_file_and_directory): Adjust to return a file_and_directory
12374         object.
12375         (read_file_scope): Adjust to use file_and_directory.  Remove
12376         make_cleanup/do_cleanups calls.
12377         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12378         make_cleanup/do_cleanups calls.
12379         * python/python.c (do_start_initialization): Adjust to ldirname
12380         returning a std::string.
12381         * utils.c (ldirname): Now returns a std::string.
12382         * utils.h (ldirname): Change return type to std::string.
12383         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12384         returning a std::string.
12385         * xml-tdesc.c (file_read_description_xml): Likewise.
12386
12387 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12388
12389         * regcache.c (regcache_debug_print_register): New function.
12390         * regcache.h (regcache_debug_print_register): New declaration.
12391         * target.c (debug_print_register): Remove.
12392         (target_fetch_registers): Call regcache_debug_print_register.
12393         (target_store_registers): Likewise.
12394
12395 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12396
12397         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12398         reference beyond the 'lh->include_dirs' array before accessing to
12399         it.
12400         (psymtab_include_file_name): Likewise.
12401         (dwarf_decode_lines_1): Likewise.
12402         (dwarf_decode_lines): Likewise.
12403         (file_file_name): Likewise.
12404
12405 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12406
12407         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12408         inferior_ptid.
12409         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12410         ps_lsetfpregs): Likewise.
12411         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12412         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12413         ps_lsetfpregs): Likewise.
12414         * target.c (target_fetch_registers, target_store_registers):
12415         Remove asserts.
12416
12417 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12418
12419         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12420
12421 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12422
12423         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12424         (_initialize_aarch64_tdep): Register it.
12425         (aarch64_record_load_store): Handle PRFM instruction.
12426         (aarch64_process_record_test): New function.
12427
12428 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12429
12430         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12431         indentation.
12432
12433 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12434
12435         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12436
12437 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12438
12439         python/python.c (do_start_initialization): Fix memory leak.
12440
12441 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12442
12443         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12444         using get_ptrace_pid.
12445         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12446         inferior_ptid.
12447         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12448         inferior_ptid instead of pid.
12449
12450 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12451
12452         * aarch64-tdep.c: Wrap locally used classes in anonymous
12453         namespace.
12454         * arm-tdep.c: Likewise.
12455         * linespec.c: Likewise.
12456         * ui-out.c: Likewise.
12457
12458 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12459
12460         PR gdb/19637
12461         * python/lib/gdb/printer/bound_registers.py: Import sys.
12462
12463 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12464
12465         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12466         windows_thread_info parameter and use it instead of
12467         current_thread.
12468         (windows_fetch_inferior_registers): Don't set current_thread,
12469         pass the thread to do_windows_fetch_inferior_registers.  Use
12470         ptid from regcache instead of inferior_ptid.
12471         (do_windows_store_inferior_registers): Add windows_thread_info
12472         parameter and use it instead of current_thread.
12473         (windows_store_inferior_registers): Don't set current_thread,
12474         pass the thread to do_windows_store_inferior_registers.  Use
12475         ptid from regcache instead of inferior_ptid.
12476
12477 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12478
12479         * ser-mingw.c (ser_windows_raw): Remove reference to
12480         struct serial::current_timeout.
12481
12482 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12483
12484         PR tdep/20928
12485         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12486         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12487         (sparc64_fsr_type): Fix %fsr decoding.
12488
12489 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12490
12491         * python/py-record-btrace.c (btpy_insn_data): Change return type
12492         for Python 2.
12493
12494 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12495
12496         * spu-linux-nat.c (spu_fetch_inferior_registers,
12497         spu_store_inferior_registers): Use ptid from regcache, set and
12498         restore inferior_ptid.
12499         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12500         Likewise.
12501
12502 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12503
12504         * i386-linux-nat.c (fetch_register, store_register,
12505         i386_linux_fetch_inferior_registers,
12506         i386_linux_store_inferior_registers): Use ptid from regcache.
12507         * ia64-linux-nat.c (ia64_linux_fetch_register,
12508         ia64_linux_store_register): Likewise.
12509         * inf-ptrace.c (inf_ptrace_fetch_register,
12510         inf_ptrace_store_register): Likewise.
12511         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12512         m32r_linux_store_inferior_registers): Likewise.
12513         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12514         m68kbsd_store_inferior_registers): Likewise.
12515         * m68k-linux-nat.c (fetch_register, store_register,
12516         m68k_linux_fetch_inferior_registers,
12517         m68k_linux_store_inferior_registers): Likewise.
12518         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12519         m88kbsd_store_inferior_registers): Likewise.
12520         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12521         mips_fbsd_store_inferior_registers): Likewise.
12522         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12523         mips64_linux_regsets_store_registers): Likewise.
12524         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12525         mipsnbsd_store_inferior_registers): Likewise.
12526         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12527         mips64obsd_store_inferior_registers): Likewise.
12528         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12529         Likewise.
12530         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12531         ppcfbsd_store_inferior_registers): Likewise.
12532         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12533         ppc_linux_store_inferior_registers): Likewise.
12534         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12535         ppcnbsd_store_inferior_registers): Likewise.
12536         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12537         ppcobsd_store_registers): Likewise.
12538         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12539         Likewise.
12540         * ravenscar-thread.c (ravenscar_fetch_registers,
12541         ravenscar_store_registers, ravenscar_prepare_to_store):
12542         Likewise.
12543         * record-btrace.c (record_btrace_fetch_registers,
12544         record_btrace_store_registers, record_btrace_prepare_to_store):
12545         Likewise.
12546         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12547         Lookup inferior using ptid from regcache, instead of
12548         current_inferior.
12549         * remote.c (remote_fetch_registers, remote_store_registers): Use
12550         ptid from regcache.
12551         * rs6000-nat.c (fetch_register, store_register): Likewise.
12552         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12553         s390_linux_store_inferior_registers): Likewise.
12554         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12555         shnbsd_store_inferior_registers): Likewise.
12556         * sol-thread.c (sol_thread_fetch_registers,
12557         sol_thread_store_registers): Likewise.
12558         * sparc-nat.c (sparc_fetch_inferior_registers,
12559         sparc_store_inferior_registers): Likewise.
12560         * tilegx-linux-nat.c (fetch_inferior_registers,
12561         store_inferior_registers): Likewise.
12562         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12563         vaxbsd_store_inferior_registers): Likewise.
12564         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12565         store_xtregs): Likewise.
12566
12567 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12568
12569         PR gdb/14441
12570         * NEWS: Mention support for rvalue references in GDB and python.
12571         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12572         supports both lvalue and rvalue references.
12573
12574 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12575
12576         PR gdb/14441
12577         * gdbtypes.c (rank_one_type): Implement overloading
12578         resolution rules regarding rvalue references.
12579
12580 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12581
12582         PR gdb/14441
12583         * aarch64-tdep.c (aarch64_type_align)
12584         (aarch64_extract_return_value, aarch64_store_return_value): Change
12585         lvalue reference type checks to general reference type checks.
12586         * amd64-tdep.c (amd64_classify): Likewise.
12587         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12588         Likewise.
12589         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12590         (arm_store_return_value): Likewise.
12591         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12592         * c-typeprint.c (c_print_type): Likewise.
12593         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12594         (cplus_number_of_children, cplus_describe_child): Likewise.
12595         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12596         * completer.c (expression_completer): Likewise.
12597         * cp-support.c (make_symbol_overload_list_adl_namespace):
12598         Likewise.
12599         * darwin-nat-info.c (info_mach_region_command): Likewise.
12600         * dwarf2loc.c (entry_data_value_coerce_ref)
12601         (value_of_dwarf_reg_entry): Likewise.
12602         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12603         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12604         Likewise.
12605         * findvar.c (extract_typed_address, store_typed_address):
12606         Likewise.
12607         * gdbtypes.c (rank_one_type): Likewise.
12608         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12609         * infcall.c (value_arg_coerce): Likewise.
12610         * language.c (pointer_type): Likewise.
12611         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12612         Likewise.
12613         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12614         * mn10300-tdep.c (mn10300_type_align): Likewise.
12615         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12616         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12617         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12618         Likewise.
12619         * printcmd.c (print_formatted, x_command): Likewise.
12620         * python/py-type.c (typy_get_composite, typy_template_argument):
12621         Likewise.
12622         * python/py-value.c (valpy_referenced_value)
12623         (valpy_get_dynamic_type, value_has_field): Likewise.
12624         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12625         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12626         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12627         * spu-tdep.c (spu_scalar_value_p): Likewise.
12628         * symtab.c (lookup_symbol_aux): Likewise.
12629         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12630         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12631         Likewise.
12632         * valops.c (value_cast_pointers, value_cast)
12633         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12634         (value_struct_elt, value_struct_elt_bitpos)
12635         (value_find_oload_method_list, find_overload_match)
12636         (value_rtti_indirect_type): Likewise.
12637         * valprint.c (val_print_scalar_type_p, generic_val_print):
12638         Likewise.
12639         * value.c (value_actual_type, value_as_address, unpack_long)
12640         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12641         (coerce_ref): Likewise.
12642         * varobj.c (varobj_get_value_type): Likewise.
12643
12644 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12645
12646         PR gdb/14441
12647         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12648         table of constants.
12649         * python/lib/gdb/command/explore.py: Support exploring values
12650         of rvalue reference types.
12651         * python/lib/gdb/types.py: Implement get_basic_type() for
12652         rvalue reference types.
12653         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12654         constant.
12655         * python/py-value.c (valpy_getitem): Add an rvalue reference
12656         check.
12657         (valpy_reference_value): Add new parameter "refcode".
12658         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12659         New wrappers for valpy_reference_value().
12660         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12661         (gdbpy_invoke_xmethod): Likewise.
12662
12663 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12664
12665         PR gdb/14441
12666         * dwarf2read.c (process_die, read_type_die_1): Handle the
12667         DW_TAG_rvalue_reference_type DIE.
12668         (read_tag_reference_type): Add new parameter "refcode".
12669
12670 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12671
12672         PR gdb/14441
12673         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12674         (c_type_print_modifier, c_type_print_varspec_suffix)
12675         (c_type_print_base): Support printing rvalue reference types.
12676         * c-valprint.c (c_val_print, c_value_print): Support printing
12677         rvalue reference values.
12678
12679 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12680
12681         PR gdb/14441
12682         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12683         typename.
12684         * cp-support.c (replace_typedefs): Handle
12685         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12686         * python/py-type.c (typy_lookup_type): Likewise.
12687
12688 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12689
12690         PR gdb/14441
12691         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12692         * parse.c (insert_type): Change assert statement.
12693         (follow_types): Handle rvalue reference types.
12694         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12695         constant.
12696
12697 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12698
12699         PR gdb/14441
12700         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12701         value_ref() interface.
12702         * c-valprint.c (c_value_print): Likewise.
12703         * infcall.c (value_arg_coerce): Likewise.
12704         * python/py-value.c (valpy_reference_value): Likewise.
12705         * valops.c (value_cast, value_reinterpret_cast)
12706         (value_dynamic_cast, typecmp): Likewise.
12707         (value_ref): Parameterize by kind of return value reference type.
12708         * value.h (value_ref): Add new parameter "refcode".
12709
12710 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12711
12712         PR gdb/14441
12713         * dwarf2read.c (read_tag_reference_type): Use
12714         lookup_lvalue_reference_type() instead of lookup_reference_type().
12715         * eval.c (evaluate_subexp_standard): Likewise.
12716         * f-exp.y: Likewise.
12717         * gdbtypes.c (make_reference_type, lookup_reference_type):
12718         Generalize with rvalue reference types.
12719         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12720         convenience wrappers for lookup_reference_type().
12721         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12722         reference kind parameter.
12723         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12724         wrappers for lookup_reference_type().
12725         * guile/scm-type.c (gdbscm_type_reference): Use
12726         lookup_lvalue_reference_type() instead of lookup_reference_type().
12727         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12728         * parse.c (follow_types): Likewise.
12729         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12730         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12731         Likewise.
12732         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12733         (gdbpy_invoke_xmethod): Likewise.
12734         * stabsread.c: Provide extra argument to make_reference_type()
12735         call.
12736         * valops.c (value_ref, value_rtti_indirect_type): Use
12737         lookup_lvalue_reference_type() instead of lookup_reference_type().
12738
12739 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12740
12741         PR gdb/14441
12742         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12743         (TYPE_IS_REFERENCE): New macro.
12744         (struct type): Add rvalue_reference_type field.
12745         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12746
12747 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12748
12749         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12750         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12751         New function definition.
12752         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12753         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12754         New function declaration.
12755         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12756         * mi/mi-interp.h: New file.
12757         * solib.c (info_sharedlibrary_command): Replace for loop with
12758         ALL_SO_LIBS macro
12759         * solib.h (update_solib_list): New function declaration.
12760         (so_list_head): Move macro.
12761         * solist.h (ALL_SO_LIBS): New macro.
12762
12763 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12764
12765         * infcmd.c (post_create_inferior): Remove unused argument in
12766         call to solib_add.
12767         * remote.c (remote_start_remote): Likewise.
12768         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12769         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12770         (enable_break): Likewise.
12771         * solib.c (update_solib_list): Remove unused target argument
12772         and its documentation.
12773         (solib_add): Remove unused target argument.  Remove unused
12774         argument in call to update_solib_list.
12775         (info_sharedlibrary_command): Remove unused argument in call
12776         to update_solib_list.
12777         (sharedlibrary_command): Remove unused argument in call to
12778         solib_add.
12779         (handle_solib_event): Likewise.
12780         (reload_shared_libraries): Likewise.
12781         * solib.h (solib_add): Remove unused target argument.
12782
12783 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12784
12785         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12786         (s390_displaced_step_fixup): Cover relative branches with the
12787         default fixup handling.  This fixes lack of support for some
12788         relative branch instructions.
12789
12790 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12791
12792         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12793         ptid from regcache.
12794
12795 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12796
12797         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12798         i386_darwin_store_inferior_registers): Use ptid from regcache.
12799
12800 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12801
12802         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12803         i386bsd_store_inferior_registers): Use ptid from regcache.
12804
12805 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12806
12807         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12808         hppaobsd_store_registers): Use ptid from regcache.
12809
12810 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12811
12812         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12813         hppanbsd_store_registers): Use ptid from regcache.
12814
12815 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12816
12817         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12818         from regcache.  Use get_ptrace_pid.
12819
12820 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12821
12822         * corelow.c (get_core_register_section): Use ptid from regcache,
12823         update doc.
12824
12825 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12826
12827         * bsd-uthread.c (bsd_uthread_fetch_registers,
12828         bsd_uthread_store_registers): Use ptid from regcache, set and
12829         restore inferior_ptid.
12830
12831 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12832
12833         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12834         fetch_fp_regs, store_register, store_regs, store_fp_register,
12835         store_fp_regs): Use ptid from regcache.
12836
12837 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12838
12839         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12840         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12841         store_vfp_regs): Use ptid from regcache.
12842
12843 2017-03-17  Pedro Alves  <palves@redhat.com>
12844
12845         PR remote/21188
12846         * ser-base.c (ser_base_wait_for): Add comment.
12847         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12848         version.
12849         * ser-unix.c (hardwire_raw): Remove reference to
12850         scb->current_timeout.
12851         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12852         (hardwire_ops): Install ser_base_readchar instead of
12853         hardwire_readchar.
12854         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12855         Remove fields.
12856
12857 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12858
12859         PR gdb/19637
12860         * python/lib/gdb/printer/bound_registers.py: Add support for
12861         Python 3.
12862
12863 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12864
12865         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12866         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12867         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12868         byte_offset to subobj_byte_offset.  Fix the handling of
12869         DWARF_VALUE_STACK on big-endian targets when coming via an
12870         implicit pointer.
12871         (dwarf2_evaluate_loc_desc): Adjust call to
12872         dwarf2_evaluate_loc_desc_full.
12873         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12874         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12875
12876 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12877
12878         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12879         and REVSH instructions.
12880
12881 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12882
12883         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12884         (arm_record_test): Declare.
12885         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12886         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12887         align with the manual.
12888         (thumb_record_misc): Adjust the code order to align with the
12889         manual.
12890         (thumb2_record_decode_insn_handler): Fix instruction matching.
12891         (instruction_reader_thumb): New class.
12892         (arm_record_test): New function.
12893
12894 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12895
12896         * arm-tdep.c (abstract_memory_reader): New class.
12897         (instruction_reader): New class.
12898         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12899         (decode_insn): Likewise.
12900
12901 2017-03-16  Doug Evans  <dje@google.com>
12902
12903         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12904         member.  Change type of TYPE member to SCM.  All uses updated.
12905         (lsscm_make_lazy_string_smob): Add assert.
12906         (lsscm_make_lazy_string): Flag bad length values.
12907         (lsscm_elt_type): New function.
12908         (gdbscm_lazy_string_to_value): Rewrite to use
12909         lsscm_safe_lazy_string_to_value.
12910         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12911         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12912         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12913         in incoming type.
12914         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12915         * guile/scm-type.c (tyscm_scm_to_type): New function.
12916
12917 2017-03-15  Doug Evans  <dje@google.com>
12918
12919         PR python/17728, python/18439, python/18779
12920         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12921         member.  Change type of TYPE member to PyObject *.  All uses updated.
12922         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12923         (gdbpy_create_lazy_string_object): Flag bad length values.
12924         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12925         Handle typedefs in incoming type.
12926         (stpy_lazy_string_elt_type): New function.
12927         (gdbpy_extract_lazy_string): Call it.
12928         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12929         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12930         typedefs in incoming type.
12931
12932 2017-03-16  Doug Evans  <dje@google.com>
12933
12934         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12935         * guile/scm-type.c (tyscm_scm_to_type): New function.
12936
12937 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12938
12939         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12940         "ULONGEST" for "skip".
12941
12942 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12943
12944         PR gdb/21220
12945         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12946         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12947         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12948         over ptrace peek/poke until end of buffer or error.
12949
12950 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12951
12952         * parse.c (length_of_subexp): Make static.
12953         * parser-defs.h (length_of_subexp): Remove.
12954
12955 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12956
12957         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12958         as well.
12959
12960 2017-03-14  Pedro Alves  <palves@redhat.com>
12961
12962         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12963         (main): Use std::unique_ptr.  Remove calls to
12964         cp_demangled_name_parse_free.
12965
12966 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12967
12968         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12969         alphabsd_store_inferior_registers): Use regcache->ptid instead
12970         of inferior_ptid.
12971
12972 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12973
12974         * aix-thread.c (aix_thread_fetch_registers,
12975         aix_thread_store_registers): Use regcache->ptid instead of
12976         inferior_ptid.
12977
12978 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12979
12980         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12981         store_gregs_to_thread, fetch_fpregs_from_thread,
12982         store_fpregs_to_thread): Use regcache->ptid instead of
12983         inferior_ptid.
12984
12985 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12986
12987         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12988         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12989         instead of inferior_ptid.
12990
12991 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12992
12993         * target.c (target_fetch_registers, target_store_registers): Add
12994         assert.
12995
12996 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12997
12998         * regcache.h (regcache_get_ptid): New function.
12999         * regcache.c (regcache_get_ptid): New function.
13000
13001 2017-03-13  Mark Wielaard  <mark@klomp.org>
13002
13003         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13004
13005 2017-03-10  Keith Seitz  <keiths@redhat.com>
13006
13007         PR c++/8218
13008         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13009
13010 2017-03-08  Pedro Alves  <palves@redhat.com>
13011
13012         PR gdb/18360
13013         * infrun.c (start_step_over, do_target_resume, resume)
13014         (restart_threads): Assert we're not resuming a thread that is
13015         meant to be stopped.
13016         (infrun_thread_stop_requested_callback): Delete.
13017         (infrun_thread_stop_requested): If the thread is internally
13018         stopped, queue a pending stop event and clear the thread's
13019         inline-frame state.
13020         (handle_stop_requested): New function.
13021         (handle_syscall_event, handle_inferior_event_1): Use
13022         handle_stop_requested.
13023         (handle_stop_requested): New function.
13024         (handle_signal_stop): Set the thread's stop_signal here instead of
13025         at caller.
13026         (finish_step_over): Clear step over info unconditionally.
13027         (handle_signal_stop): If the user had interrupted the event
13028         thread, consider the stop a random signal.
13029         (handle_signal_stop) <signal arrived while stepping over
13030         breakpoint>: Don't restart threads here.
13031         (stop_waiting): Don't clear step-over info here.
13032
13033 2017-03-08  Pedro Alves  <palves@redhat.com>
13034
13035         PR 21206
13036         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13037         goes to argument 2, not 1.
13038
13039 2017-03-08  Pedro Alves  <palves@redhat.com>
13040
13041         PR cli/21218
13042         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13043         display_gdb_prompt.
13044         (command_line_input): Add comment.
13045
13046 2017-03-08  Pedro Alves  <palves@redhat.com>
13047
13048         PR tui/21216
13049         * tui/tui-file.c (tui_file::write): New.
13050         * tui/tui-file.h (tui_file): Override "write".
13051         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13052         factored out from ...
13053         (tui_puts): ... here.
13054         (tui_putc): Use them.
13055         (tui_write): New function.
13056         * tui/tui-io.h (tui_write): Declare.
13057
13058 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13059
13060         * Makefile.in (SFILES): Replace "environ.c" with
13061         "common/environ.c".
13062         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13063         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13064         to...
13065         * common/environ.c: ... here.
13066         * environ.h: Moved to...
13067         * common/environ.h: ... here.
13068
13069 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13070
13071         * gdbarch.sh (pstring_ptr): New static function.
13072         (gdbarch_disassembler_options): Use it.
13073         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13074         not valid_disassembler_option->name.
13075         * gdbarch.c: Regenerate.
13076
13077 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13078
13079         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13080
13081 2017-03-07  Pedro Alves  <palves@redhat.com>
13082
13083         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13084
13085 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13086
13087         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13088         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13089         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13090         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13091
13092 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13093
13094         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13095
13096 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13097
13098         * remote.c (remote_add_target_side_commands): Use range-based
13099         for loop.
13100
13101 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13102
13103         PR gdb/21165
13104         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13105         value is lazy.
13106         * valprint.c (common_val_print): Likewise.
13107
13108 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13109
13110         * NEWS: Mention new set/show disassembler-options commands.
13111         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13112         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13113         (prospective_options): New static variable.
13114         (gdb_disassembler::gdb_disassembler): Initialize
13115         m_di.disassembler_options.
13116         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13117         (get_disassembler_options): New function.
13118         (set_disassembler_options): Likewise.
13119         (set_disassembler_options_sfunc): Likewise.
13120         (show_disassembler_options_sfunc): Likewise.
13121         (disassembler_options_completer): Likewise.
13122         (_initialize_disasm): Likewise.
13123         * disasm.h (get_disassembler_options): New prototype.
13124         (set_disassembler_options): Likewise.
13125         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13126         (gdbarch_verify_disassembler_options): Likewise.
13127         * gdbarch.c: Regenerate.
13128         * gdbarch.h: Likewise.
13129         * arm-tdep.c (num_disassembly_options): Delete.
13130         (set_disassembly_style): Likewise.
13131         (arm_disassembler_options): New static variable.
13132         (set_disassembly_style_sfunc): Convert short style name into long
13133         option name.  Call set_disassembler_options.
13134         (show_disassembly_style_sfunc): New function.
13135         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13136         set_gdbarch_verify_disassembler_options.
13137         (_initialize_arm_tdep): Delete regnames variable and update callers.
13138         (arm_disassembler_options): Initialize.
13139         (disasm_options): New variable.
13140         (num_disassembly_options): Rename from this...
13141         (num_disassembly_styles): ...to this.  Compute by scanning through
13142         disasm_options.
13143         (valid_disassembly_styles): Initialize using disasm_options.
13144         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13145         set_arm_regname_option.
13146         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13147         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13148         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13149         set_gdbarch_verify_disassembler_options.
13150         * s390-tdep.c (s390_disassembler_options): New static variable.
13151         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13152         set_gdbarch_verify_disassembler_options.
13153
13154 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13155
13156         * remote.c (remote_add_target_side_condition): Remove "struct"
13157         keyword from range-based for loop.
13158
13159 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13160
13161         * remote.c (remote_add_target_side_condition): Use range-based
13162         for loop.  Update comment.
13163
13164 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13165
13166         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13167
13168 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13169
13170         * regcache.c (regcache_raw_update): New function.
13171         (regcache_raw_read): Move code to regcache_raw_update.
13172         * regcache.h (regcache_raw_update): New declaration.
13173         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13174
13175 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13176
13177         * dwarf2read.c (create_debug_type_hash_table): Initialize
13178         header.signature and header.type_offset_in_tu.
13179
13180 2017-02-24  Pedro Alves  <palves@redhat.com>
13181
13182         * symtab.c (make_file_symbol_completion_list_1): Use
13183         add_symtab_completions.
13184
13185 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13186
13187         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13188
13189 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13190
13191         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13192         I386_MAX_REGISTER_SIZE.
13193         (i386_pseudo_register_write): Likewise.
13194         (i386_process_record): Likewise.
13195         * i387-tdep.c (i387_supply_xsave): Likewise.
13196         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13197         (store_register): Likewise.
13198
13199 2017-02-23  Pedro Alves  <palves@redhat.com>
13200
13201         * ada-lang.c: Include "common/function-view.h".
13202         (ada_iterate_over_symbols): Adjust to use function_view as
13203         callback type.
13204         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13205         (ada_make_symbol_completion_list): Use a lambda.
13206         (ada_exc_search_name_matches): Delete.
13207         (name_matches_regex): New.
13208         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13209         * compile/compile-c-support.c: Include "common/function-view.h".
13210         (print_one_macro): Change prototype to accept a ui_file pointer.
13211         (write_macro_definitions): Use a lambda.
13212         * dwarf2read.c: Include "common/function-view.h".
13213         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13214         (dw2_expand_symtabs_matching): Adjust to use function_view as
13215         callback type.
13216         * language.h: Include "common/function-view.h".
13217         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13218         function_view as callback type.
13219         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13220         * linespec.c: Include "common/function-view.h".
13221         (collect_info::add_symbol): New method.
13222         (struct symbol_and_data_callback, iterate_inline_only, struct
13223         symbol_matcher_data, iterate_name_matcher): Delete.
13224         (iterate_over_all_matching_symtabs): Adjust to use function_view
13225         as callback type and lambdas.
13226         (iterate_over_file_blocks): Adjust to use function_view as
13227         callback type.
13228         (decode_compound_collector): Now a class with private fields.
13229         (decode_compound_collector::release_symbols): New method.
13230         (collect_one_symbol): Rename to...
13231         (decode_compound_collector::operator()): ... this and adjust.
13232         (lookup_prefix_sym): decode_compound_collector construction bits
13233         move to decode_compound_collector ctor.  Pass the
13234         decode_compound_collector object directly as callback.  Remove
13235         cleanups and use decode_compound_collector::release_symbols
13236         instead.
13237         (symtab_collector): Now a class with private fields.
13238         (symtab_collector::release_symtabs): New method.
13239         (add_symtabs_to_list): Rename to...
13240         (symtab_collector::operator()): ... this and adjust.
13241         (collect_symtabs_from_filename): symtab_collector construction
13242         bits move to symtab_collector ctor.  Pass the symtab_collector
13243         object directly as callback.  Remove cleanups and use
13244         symtab_collector::release_symtabs instead.
13245         (collect_symbols): Delete.
13246         (add_matching_symbols_to_info): Use lambdas.
13247         * macrocmd.c (print_macro_callback): Delete.
13248         (info_macro_command): Use a lambda.
13249         (info_macros_command): Pass print_macro_definition as callable
13250         directly.
13251         (print_one_macro): Remove 'ignore' parameter.
13252         (macro_list_command): Adjust.
13253         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13254         (macro_for_each_data::user_data): Delete field.
13255         (foreach_macro): Adjust to call the function_view.
13256         (macro_for_each): Adjust to use function_view as callback type.
13257         (foreach_macro_in_scope): Adjust to call the function_view.
13258         (macro_for_each_in_scope): Adjust to use function_view as callback
13259         type.
13260         * macrotab.h: Include "common/function-view.h".
13261         (macro_callback_fn): Declare a prototype instead of a pointer.
13262         Remove "user_data" parameter.
13263         (macro_for_each, macro_for_each_in_scope): Adjust to use
13264         function_view as callback type.
13265         * psymtab.c (partial_map_expand_apply)
13266         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13267         Adjust to use function_view as callback type and to return bool.
13268         (psym_expand_symtabs_matching): Adjust to use function_view as
13269         callback types.
13270         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13271         to use function_view as callback type and to return bool.
13272         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13273         callback types.
13274         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13275         as callback types.
13276         * symfile.h: Include "common/function-view.h".
13277         (expand_symtabs_file_matcher_ftype)
13278         (expand_symtabs_symbol_matcher_ftype)
13279         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13280         return bool.
13281         (quick_symbol_functions::map_symtabs_matching_filename)
13282         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13283         function_view as callback type and return bool.
13284         (expand_symtabs_matching): Adjust to use function_view as callback
13285         type.
13286         (maintenance_expand_name_matcher)
13287         (maintenance_expand_file_matcher): Delete.
13288         (maintenance_expand_symtabs): Use lambdas.
13289         * symtab.c (iterate_over_some_symtabs): Adjust to use
13290         function_view as callback types and return bool.
13291         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13292         of a cleanup.
13293         (lookup_symtab_callback): Delete.
13294         (lookup_symtab): Use a lambda.
13295         (iterate_over_symbols): Adjust to use function_view as callback
13296         type.
13297         (struct search_symbols_data, search_symbols_file_matches)
13298         (search_symbols_name_matches): Delete.
13299         (search_symbols): Use a pair of lambdas.
13300         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13301         (symtab_expansion_callback): Delete.
13302         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13303         * symtab.h: Include "common/function-view.h".
13304         (iterate_over_some_symtabs): Adjust to use function_view as
13305         callback type and return bool.
13306         (iterate_over_symtabs): Adjust to use function_view as callback
13307         type.
13308         (symbol_found_callback_ftype): Remove 'data' parameter and return
13309         bool.
13310         (iterate_over_symbols): Adjust to use function_view as callback
13311         type.
13312
13313 2017-02-23  Pedro Alves  <palves@redhat.com>
13314
13315         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13316         (%.o) <unittests/%.c>: New pattern.
13317         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13318         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13319         * common/function-view.h: New file.
13320         * unittests/function-view-selftests.c: New file.
13321         * configure: Regenerate.
13322
13323 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13324
13325         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13326         inferior_ptid.
13327         * go32-nat.c (go32_thread_alive): Likewise.
13328
13329 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13330
13331         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13332         delete.
13333
13334 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13335
13336         * varobj.c (varobj_clear_saved_item): Use delete instead of
13337         xfree.
13338         (update_dynamic_varobj_children): Likewise.
13339
13340 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13341
13342         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13343
13344 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13345
13346         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13347         m_enum_value to 0 in default constructor.
13348
13349 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13350
13351         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13352         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13353         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13354         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13355         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13356         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13357         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13358         IS_STORE_CONDITIONAL_INSN.
13359
13360 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13361
13362         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13363
13364 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13365
13366         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13367
13368 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13369
13370         * dwarf2read.c (skip_one_die, read_attribute_value)
13371         (dwarf2_const_value_attr, dump_die_shallow)
13372         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13373         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13374
13375 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13376
13377         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13378         (dwarf_parse_macro_header): Accept DWARF version 5.
13379         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13380
13381 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13382
13383         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13384         DW_AT_GNU_*.
13385         * common/common-exceptions.h (enum errors): Likewise.
13386         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13387         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13388         (dwarf_expr_context::execute_stack_op): Likewise.
13389         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13390         Likewise.
13391         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13392         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13393         (show_entry_values_debug, call_site_to_target_addr)
13394         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13395         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13396         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13397         (value_of_dwarf_block_entry, indirect_pieced_value)
13398         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13399         (disassemble_dwarf_expression): Likewise.
13400         * dwarf2read.c (process_die, inherit_abstract_dies)
13401         (read_call_site_scope): Likewise.
13402         * gdbtypes.h (struct func_type, struct call_site_parameter)
13403         (struct call_site): Likewise.
13404         * stack.c (read_frame_arg): Likewise.
13405         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13406
13407 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13408
13409         * defs.h (read_unsigned_leb128): New declaration.
13410         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13411         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13412         (dwarf2_find_location_expression): Call also
13413         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13414         * dwarf2loc.h (dwarf2_version): New declaration.
13415         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13416         rnglists.
13417         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13418         .debug_rnglists.
13419         (struct dwop_section_names): Add loclists_dwo.
13420         (dwop_section_names): Add .debug_loclists.dwo.
13421         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13422         (struct dwarf2_per_cu_data): Add dwarf_version.
13423         (struct dwo_sections): Add loclists.
13424         (struct attr_abbrev): Add implicit_const.
13425         (read_indirect_line_string): New declaration.
13426         (read_unsigned_leb128): Delete declaration.
13427         (rcuh_kind): New definition.
13428         (read_and_check_comp_unit_head): Change parameter
13429         is_debug_types_section to section_kind.
13430         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13431         (read_comp_unit_head): Change parameter abfd to section, add parameter
13432         section_kind.  Handle DWARF-5.
13433         (error_check_comp_unit_head): Accept also DWARF version 5.
13434         (read_and_check_comp_unit_head): Change parameter
13435         is_debug_types_section to section_kind.
13436         (read_and_check_type_unit_head): Delete function.
13437         (read_abbrev_offset): Handle DWARF-5.
13438         (create_debug_type_hash_table): Add parameter section_kind.  Process
13439         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13440         comp_unit_head.
13441         (create_debug_types_hash_table): Update create_debug_type_hash_table
13442         caller.
13443         (create_all_type_units): Call create_debug_type_hash_table.
13444         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13445         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13446         caller.
13447         (skip_one_die): Handle DW_FORM_implicit_const.
13448         (dwarf2_rnglists_process): New function.
13449         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13450         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13451         (read_attribute_value): Handle DW_FORM_implicit_const,
13452         DW_FORM_line_strp.
13453         (read_attribute): Handle DW_FORM_implicit_const.
13454         (read_indirect_string_at_offset_from): New function from
13455         read_indirect_string_at_offset.
13456         (read_indirect_string_at_offset): Call
13457         read_indirect_string_at_offset_from.
13458         (read_indirect_line_string_at_offset): New function.
13459         (read_indirect_string): New function comment.
13460         (read_indirect_line_string): New function.
13461         (read_unsigned_leb128): Make it global.
13462         (dwarf2_string_attr): Handle DWARF-5.
13463         (add_include_dir_stub, read_formatted_entries): New functions.
13464         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13465         Handle DWARF-5.
13466         (per_cu_header_read_in): Update read_comp_unit_head caller.
13467         (dwarf2_version): New function.
13468         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13469         rnglists.
13470         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13471         fields.
13472
13473 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13474
13475         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13476
13477 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13478
13479         * dwarf2read.c (dwarf2_ranges_process): New function from
13480         dwarf2_ranges_read.
13481         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13482         dwarf2_ranges_process.
13483
13484 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13485
13486         * dwarf2read.c (create_debug_type_hash_table): New function from
13487         create_debug_types_hash_table.
13488         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13489         (create_all_type_units, open_and_init_dwo_file): Update
13490         create_debug_types_hash_table callers.
13491
13492 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13493
13494         PR gdb/16188
13495         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13496         refer to 'ap', not 'args'.
13497
13498 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13499             Pedro Alves  <palves@redhat.com>
13500
13501         PR gdb/16188
13502         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13503         calls succeeded.
13504         * fork-child.c (trace_start_error): New function.
13505         (trace_start_error_with_name): Likewise.
13506         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13507         * inf-ptrace.c (inf_ptrace_me): Likewise.
13508         * inferior.h (trace_start_error): New prototype.
13509         (trace_start_error_with_name): Likewise.
13510
13511 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13512
13513         PR gdb/21164
13514         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13515         NULL before using it.
13516         * symmisc.c (maintenance_print_symbols): Likewise.
13517         (maintenance_print_msymbols): Likewise.
13518
13519 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13520
13521         * NEWS: Add record Python bindings entry.
13522
13523 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13524
13525         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13526         py-record-full.o.
13527         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13528         * python/py-record-btrace.c, python/py-record-btrace.h,
13529         python/py-record-full.c, python/py-record-full.h: New file.
13530         * python/py-record.c: Add include for py-record-btrace.h and
13531         py-record-full.h.
13532         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13533         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13534         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13535         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13536         New definition.
13537         (gdbpy_initialize_btrace): New export.
13538         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13539
13540 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13541
13542         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13543         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13544         * python/py-record.c: New file.
13545         * python/python-internal.h (gdbpy_start_recording,
13546         gdbpy_current_recording, gdpy_stop_recording,
13547         gdbpy_initialize_record): New export.
13548         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13549         (python_GdbMethods): Add gdbpy_start_recording,
13550         gdbpy_current_recording and gdbpy_stop_recording.
13551
13552 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13553
13554         * record-btrace.c (record_btrace_record_method): New function.
13555         (init_record_btrace_ops): Initialize to_record_method.
13556         * record-full.c (record_full_record_method): New function.
13557         (init_record_full_ops, init_record_full_core_ops): Add
13558         record_full_record_method.
13559         * record.h (enum record_method): New enum.
13560         * target-debug.h (target_debug_print_enum_record_method: New define.
13561         * target-delegates.c: Regenerate.
13562         * target.c (target_record_method): New function.
13563         * target.h: Include record.h.
13564         (struct target_ops) <to_record_method>: New field.
13565         (target_record_method): New export.
13566
13567 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13568
13569         * record.h (record_start, record_stop): New export.
13570         * record.c (record_start, record_stop): New function.
13571
13572 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13573
13574         * btrace.c (btrace_fetch): Copy function call segments pointer
13575         into a vector.
13576         (btrace_clear): Clear the vector.
13577         (btrace_find_insn_by_number): Use binary search to find the correct
13578         function call segment.
13579         * btrace.h (brace_fun_p): New typedef.
13580         (struct btrace_thread_info) <functions>: New field.
13581
13582 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13583
13584         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13585         * btrace.c (btrace_decode_error): ... here.  New function.
13586         * btrace.h (btrace_decode_error): New export.
13587
13588 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13589
13590         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13591         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13592         btrace_find_insn_by_number): Remove special case for gaps.
13593         * btrace.h (btrace_insn_get_error): New export.
13594         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13595         * record-btrace.c (btrace_insn_history): Print number for gaps.
13596         (record_btrace_info, record_btrace_goto): Handle gaps.
13597
13598 2017-02-14  Tom Tromey  <tom@tromey.com>
13599
13600         PR python/13598:
13601         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13602         event.
13603         * python/py-evts.c (gdbpy_initialize_py_events): Add
13604         before_prompt registry.
13605         * python/py-events.h (events_object) <before_prompt>: New field.
13606
13607 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13608
13609         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13610
13611 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13612
13613         * symfile (_initialize_symfile): Add usage text to the load command's
13614         help text.
13615
13616 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13617
13618         * utils.c (defaulted_query): Don't query on secondary UIs.
13619
13620 2017-02-10  Tom Tromey  <tom@tromey.com>
13621
13622         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13623
13624 2017-02-10  Tom Tromey  <tom@tromey.com>
13625
13626         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13627         "cleanup" local.
13628         * python/py-type.c (typy_legacy_template_argument): Remove
13629         unnecessary "cleanup" local.
13630
13631 2017-02-10  Tom Tromey  <tom@tromey.com>
13632
13633         * python/python.c (do_start_initialization): New function, from
13634         _initialize_python.
13635         (_initialize_python): Call do_start_initialization.
13636         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13637         goto.
13638
13639 2017-02-10  Tom Tromey  <tom@tromey.com>
13640
13641         * python/py-prettyprint.c (pretty_print_one_value): Use
13642         gdbpy_ref.
13643
13644 2017-02-10  Tom Tromey  <tom@tromey.com>
13645
13646         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13647         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13648         gdbpy_ref.
13649         * python/py-type.c (field_new): Use gdbpy_ref.
13650         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13651         gdbpy_ref.
13652         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13653         (py_free_pspace): Likewise.
13654         (pspace_to_pspace_object): Likewise.
13655         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13656         (py_free_objfile): Likewise.
13657         (objfile_to_objfile_object): Likewise.
13658         * python/py-inferior.c (delete_thread_object): Use
13659         gdbpy_ref.
13660         (infpy_read_memory): Likewise.
13661         (py_free_inferior): Likewise.
13662         * python/py-evtregistry.c (create_eventregistry_object): Use
13663         gdbpy_ref.
13664         * python/py-event.c (create_event_object): Use gdbpy_ref.
13665
13666 2017-02-10  Tom Tromey  <tom@tromey.com>
13667
13668         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13669         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13670         used.
13671         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13672         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13673         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13674         python/py-framefilter.c, python/py-function.c,
13675         python/py-inferior.c, python/py-infevents.c,
13676         python/py-linetable.c, python/py-newobjfileevent.c,
13677         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13678         python/py-signalevent.c, python/py-stopevent.c,
13679         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13680         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13681         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13682         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13683
13684 2017-02-10  Tom Tromey  <tom@tromey.com>
13685
13686         * ui-out.h (ui_out_emit_type): New class.
13687         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13688         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13689         and ui_out_emit_tuple.
13690         (enumerate_locals): Likewise.
13691         (py_mi_print_variables, py_print_locals, py_print_args): Use
13692         ui_out_emit_list.
13693         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13694         ui_out_emit_list.
13695         * common/gdb_optional.h: New file.
13696
13697 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13698
13699         * MAINTAINERS (Write After Approval): Update my e-mail address.
13700
13701 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13702
13703         PR gdb/21122
13704         * breakpoint.c (_initialize_breakpoint): Update the help description
13705         of the 'commands' command to indicate that it takes a list argument.
13706
13707 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13708
13709         * interps.c (current_interp_set_logging): Remove "return".
13710
13711 2017-02-09  Gary Benson  <gbenson@redhat.com>
13712
13713         * symtab.c (add_symtab_completions): Prevent NULL pointer
13714         dereference.
13715
13716 2017-02-08  Pedro Alves  <palves@redhat.com>
13717
13718         * interps.c (interp::interp): Remove reference to quiet_p.
13719         (interp_set): Make static.  Remove dead "Switching to" output
13720         code.
13721         (interp_quiet_p, interp_set_quiet): Delete.
13722         (interpreter_exec_cmd): Don't set the interpreter quiet.
13723         * interps.h (interp_quiet_p): Make static.
13724         (class interp) <quiet_p>: Remove field
13725
13726 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13727
13728         * cli/cli-decode.c (find_command_name_length): Make it extern.
13729         * cli/cli-decode.h (find_command_name_length): Declare.
13730         * cli/cli-script.c (command_name_equals, line_first_arg):
13731         New functions.
13732         (process_next_line): Use cli-decode to parse command names.
13733         (build_command_line): Make args a constant pointer.
13734
13735 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13736
13737         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13738         Remove case-insensitive search.
13739
13740 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13741
13742         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13743         at the end of the line.  Avoids an ARI warning.
13744
13745 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13746
13747         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13748         rdseed instructions.
13749         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13750
13751 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13752
13753         PR tdep/20936
13754         Provide and use sparc32 and sparc64 target description XML files.
13755         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13756         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13757         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13758         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13759         * features/sparc/sparc32-solaris.xml: New file.
13760         * features/sparc/sparc64-solaris.xml: New file.
13761         * features/sparc/sparc32-solaris.c: Generated.
13762         * features/sparc/sparc64-solaris.c: Generated.
13763         * sparc-tdep.h: Account for differences in target descriptions.
13764         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13765         (sparc32_register_type): Use target provided registers.
13766         (validate_tdesc_registers): New function.
13767         (sparc32_gdbarch_init): Use tdesc_has_registers.
13768         Set pseudoregister functions.
13769         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13770         (sparc64_register_type): Use target provided registers.
13771         (sparc64_init_abi): Set pseudoregister functions.
13772
13773 2017-02-03  Tom Tromey  <tom@tromey.com>
13774
13775         PR rust/21097:
13776         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13777         with a single member.
13778
13779 2017-02-03  Pedro Alves  <palves@redhat.com>
13780
13781         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13782         (cli_interp_base::~cli_interp_base): New.
13783         (cli_interp): New struct.
13784         (as_cli_interp): Cast the interp itself to cli_interp.
13785         (cli_interpreter_pre_command_loop): Rename to ...
13786         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13787         parameter.
13788         (cli_interpreter_init): Rename to ...
13789         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13790         boolean.  Make extern.
13791         (cli_interpreter_resume): Rename to ...
13792         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13793         extern.
13794         (cli_interpreter_suspend): Rename to ...
13795         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13796         extern.
13797         (cli_interpreter_exec): Rename to ...
13798         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13799         extern.
13800         (cli_interpreter_supports_command_editing): Rename to ...
13801         (cli_interp_base::supports_command_editing): ... this.  Remove
13802         'interp' parameter.  Make extern.
13803         (cli_ui_out): Rename to ...
13804         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13805         Make extern.
13806         (cli_set_logging): Rename to ...
13807         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13808         parameter.  Make extern.
13809         (cli_interp_procs): Delete.
13810         (cli_interp_factory): Adjust to use "new".
13811         * cli/cli-interp.h: Include "interps.h".
13812         (struct cli_interp_base): New struct.
13813         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13814         (interp_new): Delete.
13815         (interp::interp, interp::~interp): New.
13816         (interp_set): Use bool, and return void.  Assume the interpreter
13817         has suspend, init and resume methods, and that the all return
13818         void.
13819         (set_top_level_interpreter): interp_set returns void.
13820         (interp_ui_out): Adapt.
13821         (current_interp_set_logging): Adapt.
13822         (interp_data): Delete.
13823         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13824         (interp_exec): Adapt.
13825         (top_level_interpreter_data): Delete.
13826         * interps.h (interp_init_ftype, interp_resume_ftype)
13827         (interp_suspend_ftype, interp_exec_ftype)
13828         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13829         (class interp): New.
13830         (interp_new): Delete.
13831         (interp_set): Now returns void.  Use bool.
13832         (interp_data, top_level_interpreter_data): Delete.
13833         * mi/mi-common.h: Include interps.h.
13834         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13835         init, resume, suspect, exec, interp_ui_out, set_logging and
13836         pre_command_loop methods.
13837         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13838         (mi_interpreter_init): Rename to ...
13839         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13840         bool, return void and make extern.  Adjust.
13841         (mi_interpreter_resume): ... Rename to ...
13842         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13843         return void and make extern.  Adjust.
13844         (mi_interpreter_suspend): ... Rename to ...
13845         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13846         return void and make extern.  Adjust.
13847         (mi_interpreter_exec): ... Rename to ...
13848         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13849         extern.  Adjust.
13850         (mi_interpreter_pre_command_loop): ... Rename to ...
13851         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13852         parameter and make extern.
13853         (mi_on_normal_stop_1): Adjust.
13854         (mi_ui_out): Rename to ...
13855         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13856         parameter and make extern.  Adjust.
13857         (mi_set_logging): Rename to ...
13858         (mi_interp::set_logging): ... this.  Remove the 'interp'
13859         parameter and make extern.  Adjust.
13860         (mi_interp_procs): Delete.
13861         (mi_interp_factory): Adjust to use 'new'.
13862         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13863         (mi_print_exception, mi_execute_command, mi_load_progress):
13864         Adjust.
13865         * tui/tui-interp.c (tui_interp): New class.
13866         (as_tui_interp): Return a tui_interp pointer.
13867         (tui_on_normal_stop, tui_on_signal_received)
13868         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13869         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13870         to use interp::interp_ui_out.
13871         (tui_init): Rename to ...
13872         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13873         bool, return void and make extern.  Adjust.
13874         (tui_resume): Rename to ...
13875         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13876         return void and make extern.  Adjust.
13877         (tui_suspend): Rename to ...
13878         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13879         return void and make extern.  Adjust.
13880         (tui_ui_out): Rename to ...
13881         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13882         parameter, and make extern.  Adjust.
13883         (tui_exec): Rename to ...
13884         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13885         make extern.
13886         (tui_interp_procs): Delete.
13887         (tui_interp_factory): Use "new".
13888
13889 2017-02-02  Tom Tromey  <tom@tromey.com>
13890
13891         * rust-exp.y (ends_raw_string, space_then_number)
13892         (rust_identifier_start_p): Return bool.
13893         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13894         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13895         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13896         (rust_chartype_p): Return bool.
13897         (val_print_struct, rust_print_struct_def, rust_print_type):
13898         Update.
13899         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13900         Return bool.
13901
13902 2017-02-02  Tom Tromey  <tom@tromey.com>
13903
13904         * rust-lang.c: Reindent.
13905
13906 2017-02-02  Tom Tromey  <tom@tromey.com>
13907
13908         * rust-lang.h (rust_crate_for_block): Update.
13909         * rust-lang.c (rust_crate_for_block): Return std::string.
13910         (rust_get_disr_info): Use std:;string, not
13911         gdb::unique_xmalloc_ptr.
13912         * rust-exp.y (crate_name): Update.
13913
13914 2017-02-02  Pedro Alves  <palves@redhat.com>
13915
13916         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13917         field out of gdb_disassembler_test and make it static.
13918
13919 2017-02-02  Pedro Alves  <palves@redhat.com>
13920
13921         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13922         mi1_interp and mi_interp fields.
13923
13924 2017-02-02  Pedro Alves  <palves@redhat.com>
13925
13926         * cli/cli-interp.c (struct saved_output_files, saved_output):
13927         Moved from cli/cli-logging.c.
13928         (cli_set_logging): New function.
13929         (cli_interp_procs): Install cli_set_logging.
13930         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13931         Declare.
13932         * cli/cli-logging.c (struct saved_output_files, saved_output):
13933         Moved to cli/cli-interp.c.
13934         (pop_output_files): Don't save outputs here.
13935         (make_logging_output): New function.
13936         (handle_redirections): Don't build tee nor save previous outputs
13937         here.
13938         * interps.c (current_interp_set_logging): Change prototype.
13939         Assume there's always a set_logging_proc method installed.
13940         * interps.h (interp_set_logging_ftype): Change prototype.
13941         (current_interp_set_logging): Change prototype and adjust comment.
13942         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13943         use make_logging_output.
13944         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13945 2017-02-02  Pedro Alves  <palves@redhat.com>
13946
13947         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13948         from ...
13949         (set_logging_overwrite): ... here.
13950         (logging_no_redirect_file): Delete.
13951         (set_logging_redirect): Don't handle redirection on the fly.
13952         Instead warn that "logging off" / "logging on" is necessary.
13953         (pop_output_files): Delete references to logging_no_redirect_file.
13954         (show_logging_command): Always speak in terms of what will happen
13955         once logging is reenabled.
13956
13957 2017-02-02  Pedro Alves  <palves@redhat.com>
13958
13959         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13960
13961 2017-02-02  Pedro Alves  <palves@redhat.com>
13962
13963         * disasm.c (gdb_pretty_print_insn): Rename to ...
13964         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13965         Remove gdbarch parameter.  Adapt to clear the object's buffers
13966         instead of allocating new buffers, and to print using the object's
13967         gdb_disassembler instead of calling gdb_print_insn.
13968         (dump_insns): Use gdb_pretty_print_disassembler.
13969         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13970         (gdb_pretty_print_disassembler): New class.
13971         * record-btrace.c (btrace_insn_history): Use
13972         gdb_pretty_print_disassembler.
13973
13974 2017-02-02  Pedro Alves  <palves@redhat.com>
13975
13976         * ada-lang.c (type_as_string): Use string_file.
13977         * ada-valprint.c (ada_print_floating): Use string_file.
13978         * ada-varobj.c (ada_varobj_scalar_image)
13979         (ada_varobj_get_value_image): Use string_file.
13980         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13981         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13982         * breakpoint.c (update_inserted_breakpoint_locations)
13983         (insert_breakpoint_locations, reattach_breakpoints)
13984         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13985         (print_it_watchpoint): Use string_file.
13986         (save_breakpoints): Use stdio_file.
13987         * c-exp.y (oper): Use string_file.
13988         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13989         tee_file.
13990         (pop_output_files): Use delete.
13991         (handle_redirections): Use stdio_file and tee_file.
13992         * cli/cli-setshow.c (do_show_command): Use string_file.
13993         * compile/compile-c-support.c (c_compute_program): Use
13994         string_file.
13995         * compile/compile-c-symbols.c (generate_vla_size): Take a
13996         'string_file &' instead of a 'ui_file *'.
13997         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13998         of a 'ui_file *'.  Use string_file.
13999         (generate_c_for_variable_locations): Take a 'string_file &'
14000         instead of a 'ui_file *'.
14001         * compile/compile-internal.h (generate_c_for_for_one_variable):
14002         Take a 'string_file &' instead of a 'ui_file *'.
14003         * compile/compile-loc2c.c (push, pushf, unary, binary)
14004         (print_label, pushf_register_address, pushf_register)
14005         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14006         'ui_file *'.  Adjust.
14007         * compile/compile.c (compile_to_object): Use string_file.
14008         * compile/compile.h (compile_dwarf_expr_to_c)
14009         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14010         'ui_file *'.
14011         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14012         (replace_typedefs_qualified_name): Use string_file and
14013         obstack_copy0.
14014         * disasm.c (gdb_pretty_print_insn): Use string_file.
14015         (gdb_disassembly): Adjust reference the null_stream global.
14016         (do_ui_file_delete): Delete.
14017         (gdb_insn_length): Use null_stream.
14018         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14019         * dwarf2loc.c (dwarf2_compile_property_to_c)
14020         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14021         'string_file &' instead of a 'ui_file *'.
14022         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14023         * dwarf2read.c (do_ui_file_peek_last): Delete.
14024         (dwarf2_compute_name): Use string_file.
14025         * event-top.c (gdb_setup_readline): Use stdio_file.
14026         * gdbarch.sh (verify_gdbarch): Use string_file.
14027         * gdbtypes.c (safe_parse_type): Use null_stream.
14028         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14029         string_file.
14030         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14031         'string_file *' instead of a 'ui_file *'.
14032         (gdbscm_arch_disassemble): Use string_file.
14033         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14034         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14035         inherits from ui_file.
14036         (ioscm_file_port_delete, ioscm_file_port_rewind)
14037         (ioscm_file_port_put): Delete.
14038         (ioscm_file_port_write): Rename to ...
14039         (ioscm_file_port::write): ... this.  Remove file_port_magic
14040         checks.
14041         (ioscm_file_port_new): Delete.
14042         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14043         ui_file_up.
14044         * guile/scm-type.c (tyscm_type_name): Use string_file.
14045         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14046         Use string_file.
14047         * infcmd.c (print_return_value_1): Use string_file.
14048         * infrun.c (print_target_wait_results): Use string_file.
14049         * language.c (add_language): Use string_file.
14050         * location.c (explicit_to_string_internal): Use string_file.
14051         * main.c (captured_main_1): Use null_file.
14052         * maint.c (maintenance_print_architecture): Use stdio_file.
14053         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14054         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14055         event_channel>: Change type to mi_console_file pointer.
14056         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14057         (mi_console_file_delete): Delete.
14058         (struct mi_console_file): Delete.
14059         (mi_console_file_magic): Delete.
14060         (mi_console_file_new): Delete.
14061         (mi_console_file::mi_console_file): New.
14062         (mi_console_file_delete): Delete.
14063         (mi_console_file_fputs): Delete.
14064         (mi_console_file::write): New.
14065         (mi_console_raw_packet): Delete.
14066         (mi_console_file::flush): New.
14067         (mi_console_file_flush): Delete.
14068         (mi_console_set_raw): Rename to ...
14069         (mi_console_file::set_raw): ... this.
14070         * mi/mi-console.h (class mi_console_file): New class.
14071         (mi_console_file_new, mi_console_set_raw): Delete.
14072         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14073         (mi_set_logging): Use delete and tee_file.  Adjust.
14074         * mi/mi-main.c (output_register): Use string_file.
14075         (mi_cmd_data_evaluate_expression): Use string_file.
14076         (mi_cmd_data_read_memory): Use string_file.
14077         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14078         * mi/mi-out.c (mi_ui_out::main_stream): New.
14079         (mi_ui_out::rewind): Use main_stream and
14080         string_file.
14081         (mi_ui_out::put): Use main_stream and string_file.
14082         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14083         Allocate a 'string_file' instead.
14084         (mi_out_new): Don't allocate a mem_fileopen stream here.
14085         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14086         (mi_ui_out::main_stream): Declare method.
14087         * printcmd.c (eval_command): Use string_file.
14088         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14089         * python/py-arch.c (archpy_disassemble): Use string_file.
14090         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14091         * python/py-frame.c (frapy_str): Use string_file.
14092         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14093         Use string_file.
14094         * python/py-type.c (typy_str): Use string_file.
14095         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14096         * python/py-value.c (valpy_str): Use string_file.
14097         * record-btrace.c (btrace_insn_history): Use string_file.
14098         * regcache.c (regcache_print): Use stdio_file.
14099         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14100         * remote.c (escape_buffer): Use string_file.
14101         * rust-lang.c (rust_get_disr_info): Use string_file.
14102         * serial.c (serial_open_ops_1): Use stdio_file.
14103         (do_serial_close): Use delete.
14104         * stack.c (print_frame_arg): Use string_file.
14105         (print_frame_args): Remove local mem_fileopen stream, not used.
14106         (print_frame): Use string_file.
14107         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14108         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14109         Take a 'string_file *' instead of a 'ui_file *'.
14110         * top.c (new_ui): Use stdio_file and stderr_file.
14111         (free_ui): Use delete.
14112         (execute_command_to_string): Use string_file.
14113         (quit_confirm): Use string_file.
14114         * tracepoint.c (collection_list::append_exp): Use string_file.
14115         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14116         * tui/tui-file.c: Don't include "ui-file.h".
14117         (enum streamtype, struct tui_stream): Delete.
14118         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14119         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14120         (tui_file::tui_file): New method.
14121         (tui_file_fputs): Delete.
14122         (tui_file_get_strbuf): Delete.
14123         (tui_file::puts): New method.
14124         (tui_file_adjust_strbuf): Delete.
14125         (tui_file_flush): Delete.
14126         (tui_file::flush): New method.
14127         * tui/tui-file.h: Tweak intro comment.
14128         Include ui-file.h.
14129         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14130         (tui_file_adjust_strbuf): Delete declarations.
14131         (class tui_file): New class.
14132         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14133         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14134         (tui_register_format): Use string_stream.
14135         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14136         (tui_get_function_from_frame): Use string_file.
14137         * typeprint.c (type_to_string): Use string_file.
14138         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14139         (null_stream): New global.
14140         (ui_file_delete): Delete.
14141         (ui_file::ui_file): New.
14142         (null_file_isatty): Delete.
14143         (ui_file::~ui_file): New.
14144         (null_file_rewind): Delete.
14145         (ui_file::printf): New.
14146         (null_file_put): Delete.
14147         (null_file_flush): Delete.
14148         (ui_file::putstr): New.
14149         (null_file_write): Delete.
14150         (ui_file::putstrn): New.
14151         (null_file_read): Delete.
14152         (ui_file::putc): New.
14153         (null_file_fputs): Delete.
14154         (null_file_write_async_safe): Delete.
14155         (ui_file::vprintf): New.
14156         (null_file_delete): Delete.
14157         (null_file::write): New.
14158         (null_file_fseek): Delete.
14159         (null_file::puts): New.
14160         (ui_file_data): Delete.
14161         (null_file::write_async_safe): New.
14162         (gdb_flush, ui_file_isatty): Adjust.
14163         (ui_file_put, ui_file_rewind): Delete.
14164         (ui_file_write): Adjust.
14165         (ui_file_write_for_put): Delete.
14166         (ui_file_write_async_safe, ui_file_read): Adjust.
14167         (ui_file_fseek): Delete.
14168         (fputs_unfiltered): Adjust.
14169         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14170         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14171         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14172         (set_ui_file_data): Delete.
14173         (string_file::~string_file, string_file::write)
14174         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14175         (do_ui_file_as_string, ui_file_as_string): Delete.
14176         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14177         (struct mem_file): Delete.
14178         (mem_file_new): Delete.
14179         (stdio_file::stdio_file): New.
14180         (mem_file_delete): Delete.
14181         (stdio_file::stdio_file): New.
14182         (mem_fileopen): Delete.
14183         (stdio_file::~stdio_file): New.
14184         (mem_file_rewind): Delete.
14185         (stdio_file::set_stream): New.
14186         (mem_file_put): Delete.
14187         (stdio_file::open): New.
14188         (mem_file_write): Delete.
14189         (stdio_file_magic, struct stdio_file): Delete.
14190         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14191         (stdio_file::flush): New.
14192         (stdio_file_read): Rename to ...
14193         (stdio_file::read): ... this.  Adjust.
14194         (stdio_file_write): Rename to ...
14195         (stdio_file::write): ... this.  Adjust.
14196         (stdio_file_write_async_safe): Rename to ...
14197         (stdio_file::write_async_safe) ... this.  Adjust.
14198         (stdio_file_fputs): Rename to ...
14199         (stdio_file::puts) ... this.  Adjust.
14200         (stdio_file_isatty): Delete.
14201         (stdio_file_fseek): Delete.
14202         (stdio_file::isatty): New.
14203         (stderr_file_write): Rename to ...
14204         (stderr_file::write) ... this.  Adjust.
14205         (stderr_file_fputs): Rename to ...
14206         (stderr_file::puts) ... this.  Adjust.
14207         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14208         (stderr_file::stderr_file): New.
14209         (tee_file_magic): Delete.
14210         (struct tee_file): Delete.
14211         (tee_file::tee_file): New.
14212         (tee_file_new): Delete.
14213         (tee_file::~tee_file): New.
14214         (tee_file_delete): Delete.
14215         (tee_file_flush): Rename to ...
14216         (tee_file::flush): ... this.  Adjust.
14217         (tee_file_write): Rename to ...
14218         (tee_file::write): ... this.  Adjust.
14219         (tee_file::write_async_safe): New.
14220         (tee_file_fputs): Rename to ...
14221         (tee_file::puts): ... this.  Adjust.
14222         (tee_file_isatty): Rename to ...
14223         (tee_file::isatty): ... this.  Adjust.
14224         * ui-file.h (struct obstack, struct ui_file): Don't
14225         forward-declare.
14226         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14227         (ui_file_write_ftype)
14228         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14229         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14230         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14231         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14232         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14233         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14234         (set_ui_file_fseek): Delete.
14235         (ui_file_data, ui_file_delete, ui_file_rewind)
14236         (struct ui_file): New.
14237         (ui_file_up): New.
14238         (class null_file): New.
14239         (null_stream): Declare.
14240         (ui_file_write_for_put, ui_file_put): Delete.
14241         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14242         Delete.
14243         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14244         (gdb_fopen, tee_file_new): Delete.
14245         (struct string_file): New.
14246         (struct stdio_file): New.
14247         (stdio_file_up): New.
14248         (struct stderr_file): New.
14249         (class tee_file): New.
14250         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14251         of a 'ui_file *'.  Adjust.
14252         * ui-out.h (class ui_out) <field_stream>: Likewise.
14253         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14254         (null_stream): Delete.
14255         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14256         Adjust.
14257         * utils.h (struct ui_file): Delete forward declaration..
14258         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14259         (error_stream): Take a 'string_file &' instead of a
14260         'ui_file *'.
14261         * varobj.c (varobj_value_get_print_value): Use string_file.
14262         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14263         * gdbarch.c: Regenerate.
14264
14265 2017-02-02  Pedro Alves  <palves@redhat.com>
14266
14267         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14268         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14269         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14270         Adjust to call gdb_print_insn instead of
14271         gdb_disassembler::print_insn.
14272         (dump_insns, do_mixed_source_and_assembly_deprecated)
14273         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14274         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14275         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14276         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14277         declaration.
14278         (gdb_pretty_print_insn): Re-add declaration.
14279         * record-btrace.c (btrace_insn_history): Don't allocate a
14280         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14281
14282 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14283
14284         * disasm.h (gdb_disassembly): Remove file_string parameter.
14285         * disasm.c (gdb_disassembly): Likewise.
14286         * cli/cli-cmds.c (print_disassembly): Adapt.
14287         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14288         * stack.c (do_gdb_disassembly): Likewise.
14289
14290 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14291
14292         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14293         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14294         targets.  And if the implicit value is longer than needed, extract
14295         the first bytes instead of the "least significant" ones.
14296
14297 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14298
14299         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14300         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14301         (btrace_fetch): Assert can_access_registers_ptid.
14302         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14303         validate_registers_access.
14304
14305 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14306
14307         * gdbthread.h (can_access_registers_ptid): New.
14308         * thread.c (can_access_registers_ptid): New.
14309
14310 2017-02-01  Pedro Alves  <palves@redhat.com>
14311
14312         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14313
14314 2017-01-31  Pedro Alves  <palves@redhat.com>
14315
14316         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14317         Fix typos.
14318
14319 2017-01-31  Pedro Alves  <palves@redhat.com>
14320
14321         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14322         not used.
14323
14324 2017-01-31  Pedro Alves  <palves@redhat.com>
14325
14326         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14327
14328 2017-01-31  Pedro Alves  <palves@redhat.com>
14329
14330         * common/scoped_restore.h
14331         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14332         change the value's parameter type to T2.
14333         (make_scoped_restore): Likewise.
14334
14335 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14336             Richard Henderson  <rth@redhat.com>
14337
14338         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14339         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14340         GS_BASE for older kernels.
14341         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14342         GS_BASE for older kernels.
14343         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14344         and GS_BASE to the offset table.
14345         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14346         system register group.
14347         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14348         for older kernels.
14349         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14350         amd64 ABI.
14351         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14352         AMD64_GSBASE_REGNUM.
14353         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14354         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14355         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14356         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14357         i386/64bit-segments.xml in those rules.
14358         * features/i386/64bit-segments.xml: New file.
14359         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14360         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14361         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14362         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14363         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14364         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14365         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14366         * features/i386/amd64-avx-linux.c: Regenerated.
14367         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14368         * features/i386/amd64-avx-mpx.c: Regenerated.
14369         * features/i386/amd64-avx512-linux.c: Regenerated.
14370         * features/i386/amd64-linux.c: Regenerated.
14371         * features/i386/amd64-mpx-linux.c: Regenerated.
14372         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14373         * features/i386/i386-avx-mpx.c: Regenerated.
14374         * features/i386/x32-avx-linux.c: Regenerated.
14375         * features/i386/x32-avx512-linux.c: Regenerated.
14376         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14377         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14378         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14379         * regformats/i386/amd64-linux.dat: Regenerated.
14380         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14381         * regformats/i386/x32-avx-linux.dat: Regenerated.
14382         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14383         * regformats/i386/x32-linux.dat: Regenerated.
14384
14385 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14386
14387         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14388         Set to AMD64_NUM_REGS.
14389
14390 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14391
14392         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14393         that checks validity of a register number.
14394
14395 2017-01-27  Kees Cook  <keescook@google.com>
14396
14397         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14398         fetch_fpregs if target has fpa registers.
14399         (arm_linux_store_inferior_registers): Call store_fpregs if target
14400         has fpa registers.
14401
14402 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14403
14404         * cris-tdep.c (cris_gdbarch_init): Remove check for
14405         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14406
14407 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14408
14409         * corelow.c (get_core_register_section): Check for regset
14410         existence before checking for REGSET_VARIABLE_SIZE.
14411
14412 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14413             Pedro Alves  <palves@redhat.com>
14414
14415         PR gdb/20939
14416         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14417         call memory_error, save memaddr instead.
14418         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14419         negative, cal memory_error.
14420         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14421
14422 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14423
14424         * disasm-selftests.c (memory_error_test): New function.
14425         (_initialize_disasm_selftests): Register memory_error_test.
14426
14427 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14428
14429         * Makefile.in (SFILES): Add disasm-selftests.c and
14430         selftest-arch.c.
14431         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14432         * disasm-selftests.c: New file.
14433         * selftest-arch.c: New file.
14434         * selftest-arch.h: New file.
14435
14436 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14437
14438         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14439         to bfd_arch_mep.  Don't return 0 if section is not
14440         found.  Call print_insn_mep.
14441
14442 2017-01-26  Pedro Alves  <palves@redhat.com>
14443             Yao Qi  <yao.qi@linaro.org>
14444
14445         * arm-tdep.c: Include "disasm.h".
14446         (gdb_print_insn_arm): Update code to get gdbarch.
14447         * disasm.c (dis_asm_read_memory): Change it to
14448         gdb_disassembler::dis_asm_read_memory.
14449         (dis_asm_memory_error): Likewise.
14450         (dis_asm_print_address): Likewise.
14451         (gdb_pretty_print_insn): Change it to
14452         gdb_disassembler::pretty_print_insn.
14453         (dump_insns): Add one argument gdb_disassemlber.  All
14454         callers updated.
14455         (do_mixed_source_and_assembly_deprecated): Likewise.
14456         (do_mixed_source_and_assembly): Likewise.
14457         (do_assembly_only): Likewise.
14458         (gdb_disassembler::gdb_disassembler): New.
14459         (gdb_disassembler::print_insn): New.
14460         * disasm.h (class gdb_disassembler): New.
14461         (gdb_pretty_print_insn): Remove declaration.
14462         (gdb_disassemble_info): Likewise.
14463         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14464         (gdbscm_disasm_read_memory_worker): Update.
14465         (gdbscm_disasm_read_memory): Update.
14466         (gdbscm_disasm_memory_error): Remove.
14467         (gdbscm_disasm_print_address): Remove.
14468         (gdbscm_disassembler::gdbscm_disassembler): New.
14469         (gdbscm_print_insn_from_port): Update.
14470         * mips-tdep.c: Include disasm.h.
14471         (gdb_print_insn_mips): Update code to get gdbarch.
14472         * record-btrace.c (btrace_insn_history): Update.
14473         * spu-tdep.c: Include disasm.h.
14474         (struct spu_dis_asm_data): Remove.
14475         (struct spu_dis_asm_info): New.
14476         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14477         SPU id.
14478         (gdb_print_insn_spu): Cast disassemble_info to
14479         spu_dis_asm_info.
14480
14481 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14482
14483         * disasm.c (do_ui_file_delete): Delete.
14484         (gdb_insn_length): Move code creating stream to ...
14485         * utils.c (null_stream): ... here.  New function.
14486         * utils.h (null_stream): Declare.
14487
14488 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14489
14490         * python/py-inferior.c (find_thread_object): Return directly
14491         from the loop.  Remove "found" variable.
14492
14493 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14494
14495         GDB 7.12.1 released.
14496
14497 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14498
14499         * python/py-function.c (fnpy_call): Reorder declarations to have
14500         the gdbpy_enter object declared first.
14501         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14502
14503 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14504
14505         PR python/21068
14506         * python/python-internal.h (PyMem_RawMalloc): Define for
14507         Python < 3.4.
14508         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14509         PyMem_RawMalloc instead of PyMem_Malloc.
14510
14511 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14512             Luis Machado  <lgustavo@codesourcery.com>
14513
14514         * NEWS (New commands): Mention flash-erase.
14515         (New MI commands): Mention target-flash-erase.
14516         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14517         command.
14518         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14519         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14520         * target.c (flash_erase_command): New function.
14521         (initialize_targets): Add new flash-erase command.
14522         * target.h (flash_erase_command): New declaration.
14523
14524 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14525
14526         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14527         HAVE_SYS_PROCFS_H is defined.
14528
14529 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14530
14531         * remote.c (struct cached_reg): Change data into a pointer.
14532         * (stop_reply_dtr): Free data pointers before deleting vector.
14533         (process_stop_reply): Likewise.
14534         (remote_parse_stop_reply): Allocate space for data
14535
14536 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14537
14538         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14539         MAX_REGISTER_SIZE.
14540         (amd64_pseudo_register_read_value): Likewise.
14541         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14542         (store_register_using_P): Likewise.
14543         * regcache.c (regcache_xfer_part): Likewise.
14544
14545 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14546
14547         Split real and pseudo registers.
14548         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14549         (sparc32_pseudo_regnum): New enum.
14550         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14551         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14552         (SPARC32_CP0_REGISTERS): New macro.
14553         (sparc32_pseudo_register_name): New function.
14554         (sparc32_register_name): Use sparc32_pseudo_register_name.
14555         (sparc32_pseudo_register_type): New function.
14556         (sparc32_register_type): Use sparc32_pseudo_register_type.
14557         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14558         pseudo register numbers.
14559         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14560         (SPARC64_CP0_REGISTERS): New macro.
14561         (sparc64_pseudo_register_name): New function.
14562         (sparc64_register_name): Use sparc64_pseudo_register_name.
14563         (sparc64_pseudo_register_type): New function.
14564         (sparc64_register_type): Use sparc64_pseudo_register_type.
14565         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14566         pseudo register numbers.
14567         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14568         sparc64_store_arguments): Handle pseudo register numbers.
14569
14570 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14571
14572         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14573         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14574         output.
14575         (getpkt_or_notif_sane_1): Likewise.
14576
14577 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14578
14579         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14580         of CC.  Pass "-x c++-header" instead of "-x c".
14581
14582 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14583
14584         * remote.c (remote_can_async_p): Update comment.
14585
14586 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14587
14588         * linux-nat.c (linux_nat_can_async_p): Update comment.
14589
14590 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14591
14592         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14593
14594 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14595
14596         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14597
14598 2017-01-10  Tom Tromey  <tom@tromey.com>
14599
14600         * python/py-type.c (typy_legacy_template_argument): Update.
14601         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14602         ~demangle_parse_info): Declare new members.
14603         (cp_demangled_name_to_comp): Return unique_ptr.
14604         (cp_demangled_name_parse_free)
14605         (make_cleanup_cp_demangled_name_parse_free)
14606         (cp_new_demangle_parse_info): Remove.
14607         * cp-support.c (do_demangled_name_parse_free_cleanup)
14608         (make_cleanup_cp_demangled_name_parse_free): Remove.
14609         (inspect_type, cp_canonicalize_string_full)
14610         (cp_canonicalize_string): Update.
14611         (mangled_name_to_comp): Change return type.
14612         (cp_class_name_from_physname, method_name_from_physname)
14613         (cp_func_name, cp_remove_params): Update.
14614         * cp-name-parser.y (demangle_parse_info): New constructor, from
14615         cp_new_demangle_parse_info.
14616         (~demangle_parse_info): New destructor, from
14617         cp_demangled_name_parse_free.
14618         (cp_merge_demangle_parse_infos): Update.
14619         (cp_demangled_name_to_comp): Change return type.
14620
14621 2017-01-10  Tom Tromey  <tom@tromey.com>
14622
14623         * top.c (prevent_dont_repeat): Change return type.
14624         * python/python.c (execute_gdb_command): Use std::string.
14625         Update.
14626         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14627         * command.h (prevent_dont_repeat): Change return type.
14628         * breakpoint.c (bpstat_do_actions_1): Update.
14629
14630 2017-01-10  Tom Tromey  <tom@tromey.com>
14631
14632         * value.h (scoped_value_mark::~scoped_value_mark): Call
14633         free_to_mark.
14634         (scoped_value_mark::free_to_mark): New method.
14635         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14636         scoped_value_mark.
14637
14638 2017-01-10  Tom Tromey  <tom@tromey.com>
14639
14640         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14641         (valpy_reference_value, valpy_const_value, valpy_get_address)
14642         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14643         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14644         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14645         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14646         scoped_value_mark.
14647         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14648         * value.h (scoped_value_mark): New class.
14649
14650 2017-01-10  Tom Tromey  <tom@tromey.com>
14651
14652         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14653         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14654         * psymtab.c (discard_psymtabs_upto): Remove.
14655         (make_cleanup_discard_psymtabs): Remove.
14656         (struct psymtab_state): Remove.
14657
14658 2017-01-10  Tom Tromey  <tom@tromey.com>
14659
14660         * record-full.c (record_full_save_cleanups): Remove.
14661         (record_full_save): Use gdb::unlinker.
14662         * gcore.c (do_bfd_delete_cleanup): Remove.
14663         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14664         cleanups.
14665         * dwarf2read.c (unlink_if_set): Remove.
14666         (write_psymtabs_to_index): Use gdb::unlinker.
14667         * common/gdb_unlinker.h: New file.
14668
14669 2017-01-10  Tom Tromey  <tom@tromey.com>
14670
14671         * windows-tdep.c (windows_xfer_shared_library): Update.
14672         * windows-nat.c (windows_make_so): Update.
14673         * utils.h (make_cleanup_bfd_unref): Remove.
14674         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14675         * symfile.h (symfile_bfd_open)
14676         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14677         * symfile.c (read_symbols, symbol_file_add)
14678         (separate_debug_file_exists): Update.
14679         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14680         (generic_load, reread_symbols): Update.
14681         * symfile-mem.c (symbol_file_add_from_memory): Update.
14682         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14683         (spu_symbol_file_add_from_memory): Update.
14684         * solist.h (struct target_so_ops) <bfd_open>: Return
14685         gdb_bfd_ref_ptr.
14686         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14687         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14688         gdb_bfd_ref_ptr.
14689         (solib_map_sections, reload_shared_libraries_1): Update.
14690         * solib-svr4.c (enable_break): Update.
14691         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14692         * solib-frv.c (enable_break2): Update.
14693         * solib-dsbt.c (enable_break): Update.
14694         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14695         gdb_bfd_ref_ptr.
14696         (darwin_solib_get_all_image_info_addr_at_init): Update.
14697         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14698         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14699         * record-full.c (record_full_save): Update.
14700         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14701         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14702         * minidebug.c (find_separate_debug_file_in_section): Return
14703         gdb_bfd_ref_ptr.
14704         * machoread.c (macho_add_oso_symfile): Change abfd to
14705         gdb_bfd_ref_ptr.
14706         (macho_symfile_read_all_oso): Update.
14707         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14708         (macho_symfile_read): Update.
14709         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14710         (jit_bfd_try_read_symtab): Update.
14711         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14712         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14713         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14714         gdb_bfd_ref_ptr.
14715         (gdb_bfd_ref_policy): New struct.
14716         (gdb_bfd_ref_ptr): New typedef.
14717         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14718         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14719         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14720         gdb_bfd_ref_ptr.
14721         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14722         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14723         (gcore_command): Update.
14724         * exec.c (exec_file_attach): Update.
14725         * elfread.c (elf_symfile_read): Update.
14726         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14727         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14728         (open_and_init_dwo_file): Update.
14729         (open_dwp_file): Return gdb_bfd_ref_ptr.
14730         (open_and_init_dwp_file): Update.
14731         * corelow.c (core_open): Update.
14732         * compile/compile-object-load.c (compile_object_load): Update.
14733         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14734         * coffread.c (coff_symfile_read): Update.
14735         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14736         gdb_bfd_ref_ptr.  Rename.
14737         (dump_bfd_file, restore_command): Update.
14738         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14739         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14740         (find_separate_debug_file_by_buildid): Update.
14741
14742 2017-01-10  Tom Tromey  <tom@tromey.com>
14743
14744         * common/gdb_ref_ptr.h: New file.
14745         * python/py-ref.h (struct gdbpy_ref_policy): New.
14746         (gdbpy_ref): Now a typedef.
14747
14748 2017-01-10  Tom Tromey  <tom@tromey.com>
14749
14750         * utils.h (make_cleanup_htab_delete): Don't declare.
14751         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14752         Remove.
14753         * linespec.c (decode_compound_collector): Add constructor,
14754         destructor.
14755         (lookup_prefix_sym): Remove cleanup.
14756         (symtab_collector): Add constructor, destructor.
14757         (collect_symtabs_from_filename): Remove cleanup.
14758         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14759         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14760         Use htab_up.
14761         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14762         * dwarf2read.c (dw2_expand_symtabs_matching)
14763         (dw2_map_symbol_filenames, dwarf_decode_macros)
14764         (write_psymtabs_to_index): Use htab_up.
14765         * dwarf2loc.c (func_verify_no_selftailcall)
14766         (call_site_find_chain_1, func_verify_no_selftailcall)
14767         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14768         std::vector, gdb::unique_xmalloc_ptr.
14769         (call_sitep): Remove typedef.
14770         (dwarf2_locexpr_baton_eval): Remove unused variable.
14771
14772 2017-01-10  Tom Tromey  <tom@tromey.com>
14773
14774         * python/python-internal.h (make_cleanup_py_decref)
14775         (make_cleanup_py_xdecref): Don't declare.
14776         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14777         (py_xdecref, make_cleanup_py_xdecref): Remove.
14778
14779 2017-01-10  Tom Tromey  <tom@tromey.com>
14780
14781         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14782         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14783
14784 2017-01-10  Tom Tromey  <tom@tromey.com>
14785
14786         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14787
14788 2017-01-10  Tom Tromey  <tom@tromey.com>
14789
14790         * python/py-utils.c (unicode_to_encoded_string)
14791         (python_string_to_target_string)
14792         (python_string_to_target_python_string)
14793         (python_string_to_host_string, gdbpy_obj_to_string)
14794         (get_addr_from_python): Use gdbpy_ref.
14795
14796 2017-01-10  Tom Tromey  <tom@tromey.com>
14797
14798         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14799         gdbpy_ref.
14800
14801 2017-01-10  Tom Tromey  <tom@tromey.com>
14802
14803         * python/python.c (eval_python_command, gdbpy_decode_line)
14804         (gdbpy_run_events, gdbpy_start_type_printers)
14805         (gdbpy_apply_type_printers): Use gdbpy_ref.
14806
14807 2017-01-10  Tom Tromey  <tom@tromey.com>
14808
14809         * python/py-param.c (get_doc_string, compute_enum_values): Use
14810         gdbpy_ref.
14811
14812 2017-01-10  Tom Tromey  <tom@tromey.com>
14813
14814         * python/py-inferior.c (find_thread_object, build_inferior_list):
14815         Use gdbpy_ref.
14816
14817 2017-01-10  Tom Tromey  <tom@tromey.com>
14818
14819         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14820
14821 2017-01-10  Tom Tromey  <tom@tromey.com>
14822
14823         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14824         gdbpy_ref.
14825
14826 2017-01-10  Tom Tromey  <tom@tromey.com>
14827
14828         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14829         extra incref.
14830         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14831         Use gdbpy_ref.
14832
14833 2017-01-10  Tom Tromey  <tom@tromey.com>
14834
14835         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14836         gdbpy_ref.
14837
14838 2017-01-10  Tom Tromey  <tom@tromey.com>
14839
14840         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14841         decref results of PyArg_ParseTupleAndKeywords.
14842
14843 2017-01-10  Tom Tromey  <tom@tromey.com>
14844
14845         * python/python.c (python_run_simple_file): Use
14846         unique_xmalloc_ptr, gdbpy_ref.
14847
14848 2017-01-10  Tom Tromey  <tom@tromey.com>
14849
14850         * python/py-prettyprint.c (print_stack_unless_memory_error)
14851         (print_string_repr, print_children): Use gdbpy_ref.
14852         (dummy_python_frame): New class.
14853         (dummy_python_frame::dummy_python_frame): Rename from
14854         push_dummy_python_frame.
14855         (py_restore_tstate): Remove.
14856
14857 2017-01-10  Tom Tromey  <tom@tromey.com>
14858
14859         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14860
14861 2017-01-10  Tom Tromey  <tom@tromey.com>
14862
14863         * python/python.c (ensure_python_env, restore_python_env):
14864         Remove.
14865         * python/python-internal.h (ensure_python_env): Don't declare.
14866         * varobj.h (varobj_ensure_python_env): Don't declare.
14867         * varobj.c (varobj_ensure_python_env): Remove.
14868
14869 2017-01-10  Tom Tromey  <tom@tromey.com>
14870
14871         * varobj.c (varobj_value_get_print_value): Use
14872         gdbpy_enter_varobj.
14873
14874 2017-01-10  Tom Tromey  <tom@tromey.com>
14875
14876         * python/py-prettyprint.c (print_string_repr, print_children):
14877         Update.
14878         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14879         of "encoding".
14880         * varobj.c (varobj_value_get_print_value): Update.
14881         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14882
14883 2017-01-10  Tom Tromey  <tom@tromey.com>
14884
14885         * varobj.c (varobj_get_display_hint)
14886         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14887         (varobj_set_visualizer, free_variable): Use
14888         gdbpy_enter_varobj.
14889
14890 2017-01-10  Tom Tromey  <tom@tromey.com>
14891
14892         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14893         (do_finish_initialization): New function.  Use gdbpy_ref.
14894         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14895         do_finish_initialization.
14896
14897 2017-01-10  Tom Tromey  <tom@tromey.com>
14898
14899         * python/py-param.c (get_set_value, get_show_value): Use
14900         gdbpy_enter, gdbpy_ref.
14901
14902 2017-01-10  Tom Tromey  <tom@tromey.com>
14903
14904         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14905
14906 2017-01-10  Tom Tromey  <tom@tromey.com>
14907
14908         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14909
14910 2017-01-10  Tom Tromey  <tom@tromey.com>
14911
14912         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14913         Use gdbpy_enter_varobj.
14914
14915 2017-01-10  Tom Tromey  <tom@tromey.com>
14916
14917         * varobj.c (gdbpy_enter_varobj): New constructor.
14918         * python/python-internal.h (gdbpy_enter_varobj): New class.
14919         * python/py-varobj.c (py_varobj_get_iterator): Use
14920         gdbpy_enter_varobj.
14921
14922 2017-01-10  Tom Tromey  <tom@tromey.com>
14923
14924         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14925         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14926         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14927         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14928         unique_xmalloc_ptr.
14929         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14930
14931 2017-01-10  Tom Tromey  <tom@tromey.com>
14932
14933         * python/py-xmethods.c (invoke_match_method): Use
14934         gdbpy_ref.
14935
14936 2017-01-10  Tom Tromey  <tom@tromey.com>
14937
14938         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14939         gdbpy_enter, gdbpy_ref.
14940
14941 2017-01-10  Tom Tromey  <tom@tromey.com>
14942
14943         * python/python.c (python_interactive_command): Use gdbpy_enter.
14944
14945 2017-01-10  Tom Tromey  <tom@tromey.com>
14946
14947         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14948         gdbpy_ref.
14949
14950 2017-01-10  Tom Tromey  <tom@tromey.com>
14951
14952         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14953         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14954
14955 2017-01-10  Tom Tromey  <tom@tromey.com>
14956
14957         * utils.h (htab_deleter): New struct.
14958         (htab_up): New typedef.
14959         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14960         gdbpy_enter, gdbpy_ref, htab_up.
14961
14962 2017-01-10  Tom Tromey  <tom@tromey.com>
14963
14964         * python/py-unwind.c (pending_frame_invalidate): Remove.
14965         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14966
14967 2017-01-10  Tom Tromey  <tom@tromey.com>
14968
14969         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14970         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14971
14972 2017-01-10  Tom Tromey  <tom@tromey.com>
14973
14974         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14975
14976 2017-01-10  Tom Tromey  <tom@tromey.com>
14977
14978         * python/python.c (gdbpy_eval_from_control_command)
14979         (gdbpy_source_script, gdbpy_run_events)
14980         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14981         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14982         gdbpy_enter.
14983
14984 2017-01-10  Tom Tromey  <tom@tromey.com>
14985
14986         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14987
14988 2017-01-10  Tom Tromey  <tom@tromey.com>
14989
14990         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14991
14992 2017-01-10  Tom Tromey  <tom@tromey.com>
14993
14994         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14995         (python_on_inferior_call_pre, python_on_inferior_call_post)
14996         (python_on_memory_change, python_on_register_change)
14997         (python_inferior_exit, python_new_objfile, add_thread_object)
14998         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14999
15000 2017-01-10  Tom Tromey  <tom@tromey.com>
15001
15002         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15003         (bpfinishpy_handle_exit): Use gdbpy_enter.
15004
15005 2017-01-10  Tom Tromey  <tom@tromey.com>
15006
15007         * python/py-cmd.c (cmdpy_destroyer)
15008         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15009         gdbpy_enter.
15010
15011 2017-01-10  Tom Tromey  <tom@tromey.com>
15012
15013         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15014         gdbpy_enter.
15015         (gdbpy_breakpoint_has_cond): Likewise.
15016
15017 2017-01-10  Tom Tromey  <tom@tromey.com>
15018
15019         * python/python.c (gdbpy_enter): New constructor.
15020         (~gdbpy_enter): New destructor.
15021         (restore_python_env, ensure_python_env): Rewrite.
15022         * python/python-internal.h (gdbpy_enter): New class.
15023
15024 2017-01-10  Tom Tromey  <tom@tromey.com>
15025
15026         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15027
15028 2017-01-10  Tom Tromey  <tom@tromey.com>
15029
15030         * python/py-value.c (value_has_field, get_field_flag)
15031         (get_field_type, valpy_getitem, convert_value_from_python): Use
15032         gdbpy_ref.
15033
15034 2017-01-10  Tom Tromey  <tom@tromey.com>
15035
15036         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15037         gdbpy_ref.
15038
15039 2017-01-10  Tom Tromey  <tom@tromey.com>
15040
15041         * python/py-prettyprint.c (search_pp_list)
15042         (find_pretty_printer_from_objfiles)
15043         (find_pretty_printer_from_progspace)
15044         (find_pretty_printer_from_gdb, find_pretty_printer)
15045         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15046         gdbpy_ref.
15047
15048 2017-01-10  Tom Tromey  <tom@tromey.com>
15049
15050         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15051
15052 2017-01-10  Tom Tromey  <tom@tromey.com>
15053
15054         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15055         (ltpy_get_all_source_lines): Use gdbpy_ref.
15056
15057 2017-01-10  Tom Tromey  <tom@tromey.com>
15058
15059         * python/py-framefilter.c (extract_sym, extract_value)
15060         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15061         gdbpy_ref.
15062
15063 2017-01-10  Tom Tromey  <tom@tromey.com>
15064
15065         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15066
15067 2017-01-10  Tom Tromey  <tom@tromey.com>
15068
15069         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15070
15071 2017-01-10  Tom Tromey  <tom@tromey.com>
15072
15073         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15074         gdbpy_ref.
15075
15076 2017-01-10  Tom Tromey  <tom@tromey.com>
15077
15078         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15079
15080 2017-01-10  Tom Tromey  <tom@tromey.com>
15081
15082         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15083         (typy_range): Use gdbpy_ref.
15084
15085 2017-01-10  Tom Tromey  <tom@tromey.com>
15086
15087         * python/py-threadevent.c (create_thread_event_object): Use
15088         gdbpy_ref.
15089         * python/py-stopevent.c (create_stop_event_object): Simplify.
15090         (emit_stop_event): Use gdbpy_ref.
15091         * python/py-signalevent.c (create_signal_event_object): Use
15092         gdbpy_ref.
15093         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15094         (emit_new_objfile_event, create_clear_objfiles_event_object)
15095         (emit_clear_objfiles_event): Use gdbpy_ref.
15096         * python/py-infevents.c (create_inferior_call_event_object)
15097         (create_register_changed_event_object)
15098         (create_memory_changed_event_object, emit_inferior_call_event)
15099         (emit_memory_changed_event, emit_register_changed_event): Use
15100         gdbpy_ref.
15101         * python/py-exitedevent.c (create_exited_event_object)
15102         (emit_exited_event): Use gdbpy_ref.
15103         * python/py-event.h (evpy_emit_event): Remove
15104         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15105         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15106         * python/py-continueevent.c (emit_continue_event): Use
15107         gdbpy_ref.
15108         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15109         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15110         gdbpy_ref.
15111         * python/py-bpevent.c (create_breakpoint_event_object): Use
15112         gdbpy_ref.
15113
15114 2017-01-10  Tom Tromey  <tom@tromey.com>
15115
15116         * python/py-ref.h: New file.
15117
15118 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15119
15120         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15121         void.
15122         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15123         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15124         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15125         * ui-out.c (ui_out::redirect): Likewise.
15126         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15127         * cli/cli-logging.c (set_logging_redirect): Update call site of
15128         ui_out::redirect.
15129         (handle_redirections): Likewise.
15130         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15131         * top.c (execute_command_to_string): Likewise.
15132         * utils.c (do_ui_out_redirect_pop): Likewise.
15133
15134 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15135
15136         * stack.c (_initialize_stack): Update "frame" command help message.
15137
15138 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15139
15140         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15141
15142 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15143
15144         * x86-linux-nat.h: Include gdb_proc_service.h.
15145
15146 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15147
15148         * ser-base.h: Include serial.h.
15149
15150 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15151
15152         * ppc-linux-tdep.h: Include ppc-tdep.h.
15153
15154 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15155
15156         * nat/amd64-linux-siginfo.h: Include signal.h.
15157
15158 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15159
15160         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15161
15162 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15163
15164         * mi/mi-parse.h: Include mi-cmds.h.
15165
15166 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15167
15168         * inf-loop.c: Don't include "target.h".
15169         * inf-loop.h: Include it here.
15170
15171 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15172
15173         * dfp.h: Include "dboulest.h" and "expression.h".
15174
15175 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15176
15177         * ax-gdb.h: Include "ax.h".
15178
15179 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15180
15181         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15182         with nat/gdb_ptrace.h.
15183
15184 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15185
15186         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15187         new line.
15188         (mips64_fbsd_sigframe_init): Likewise.
15189
15190 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15191
15192         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15193         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15194
15195 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15196
15197         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15198         * NEWS: Mention new FreeBSD/mips native configuration.
15199         * config/mips/fbsd.mh: New file.
15200         * configure.host: Add mips*-*-freebsd*.
15201         * mips-fbsd-nat.c: New file.
15202
15203 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15204
15205         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15206         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15207         * NEWS: Mention new FreeBSD/mips target.
15208         * configure.tgt: Add mips*-*-freebsd*.
15209         * mips-fbsd-tdep.c: New file.
15210         * mips-fbsd-tdep.h: New file.
15211
15212 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15213
15214         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15215         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15216
15217 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15218
15219         Update copyright year range in all GDB files.
15220
15221 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15222
15223         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15224
15225 For older changes see ChangeLog-2016.
15226 \f
15227 Local Variables:
15228 mode: change-log
15229 left-margin: 8
15230 fill-column: 74
15231 version-control: never
15232 coding: utf-8
15233 End: