Per-language symbol name hashing algorithm
[external/binutils.git] / gdb / ChangeLog
1 2017-11-08  Keith Seitz  <keiths@redhat.com>
2             Pedro Alves  <palves@redhat.com>
3
4         * ada-lang.c (ada_language_defn): Install
5         default_search_name_hash.
6         * buildsym.c (struct buildsym_compunit): <language>: New field.
7         (finish_block_internal): Pass language when creating dictionaries.
8         (start_buildsym_compunit, start_symtab): New language parameters.
9         Use them.
10         (restart_symtab): Pass down compilation unit's language.
11         * buildsym.h (enum language): Forward declare.
12         (start_symtab): New 'language' parameter.
13         * c-lang.c (c_language_defn, cplus_language_defn)
14         (asm_language_defn, minimal_language_defn): Install
15         default_search_name_hash.
16         * coffread.c (coff_start_symtab): Adjust.
17         * d-lang.c (d_language_defn): Install default_search_name_hash.
18         * dbxread.c (struct symloc): Add 'pst_language' field.
19         (PST_LANGUAGE): Define.
20         (start_psymtab, read_ofile_symtab): Use it.
21         (process_one_symbol): New 'language' parameter.  Pass it down.
22         * dictionary.c (struct dictionary) <language>: New field.
23         (DICT_LANGUAGE): Define.
24         (dict_create_hashed, dict_create_hashed_expandable)
25         (dict_create_linear, dict_create_linear_expandable): New parameter
26         'language'.  Set the dictionary's language.
27         (iter_match_first_hashed): Adjust to rename.
28         (insert_symbol_hashed): Assert we don't see mismatching
29         languages.  Adjust to rename.
30         (dict_hash): Rename to ...
31         (default_search_name_hash): ... this and make extern.
32         * dictionary.h (struct language_defn): Forward declare.
33         (dict_create_hashed): New parameter 'language'.
34         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
35         * f-lang.c (f_language_defn): Install default_search_name_hash.
36         * go-lang.c (go_language_defn): Install default_search_name_hash.
37         * jit.c (finalize_symtab): Pass compunit's language to dictionary
38         creation.
39         * language.c (unknown_language_defn, auto_language_defn):
40         * language.h (language_defn::la_search_name_hash): New field.
41         (default_search_name_hash): Declare.
42         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
43         * mdebugread.c (new_block): New parameter 'language'.
44         * mdebugread.c (parse_symbol): Pass symbol language to block
45         allocation.
46         (psymtab_to_symtab_1): Pass down language.
47         (new_symtab): Pass compunit's language to block allocation.
48         * objc-lang.c (objc_language_defn): Install
49         default_search_name_hash.
50         * opencl-lang.c (opencl_language_defn):
51         * p-lang.c (pascal_language_defn): Install
52         default_search_name_hash.
53         * rust-lang.c (rust_language_defn): Install
54         default_search_name_hash.
55         * stabsread.h (enum language): Forward declare.
56         (process_one_symbol): Add 'language' parameter.
57         * symtab.c (search_name_hash): New function.
58         * symtab.h (search_name_hash): Declare.
59         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
60
61 2017-11-08  Pedro Alves  <palves@redhat.com>
62
63         * cp-name-parser.y (main): Don't initialize extra_chars.
64
65 2017-11-07  Tom Tromey  <tom@tromey.com>
66
67         * event-top.h (command_handler): Constify.
68         * record-full.c (cmd_record_full_start): Update.
69         * thread.c (thread_apply_all_command): Update.
70         * printcmd.c (eval_command): Update.
71         * mi/mi-main.c (mi_execute_cli_command): Update.
72         (mi_execute_async_cli_command): Update.
73         * tui/tui-stack.c (tui_update_command): Update.
74         * cli/cli-interp.c (safe_execute_command): Constify.
75         * record.c (record_start): Update.
76         (record_start, record_stop, cmd_record_start): Update.
77         * record-btrace.c (cmd_record_btrace_bts_start): Update.
78         (cmd_record_btrace_pt_start): Update.
79         (cmd_record_btrace_start): Update.
80         (cmd_record_btrace_start): Update.
81         * reverse.c (exec_reverse_once): Update.
82         * python/python.c (execute_gdb_command): Don't copy the command.
83         * event-top.c (command_line_handler): Update.
84         (command_handler): Constify.
85         * defs.h (deprecated_call_command_hook): Constify.
86         * cli/cli-script.h (execute_user_command): Constify.
87         * cli/cli-script.c (execute_user_command): Constify.
88         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
89         (enum command_control_type): Update.
90         * main.c (catch_command_errors): Remove non-const overload.
91         (catch_command_errors_ftype): Remove.
92         * python/py-cmd.c (cmdpy_function): Constify.
93         * guile/scm-cmd.c (cmdscm_function): Constify.
94         * cli/cli-dump.c (call_dump_func): Constify.
95         * cli/cli-decode.c (do_const_cfunc): Constify.
96         (do_sfunc): Constify.
97         (cmd_func): Constify.
98         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
99         * top.h (execute_command): Constify.
100         * top.c (execute_command): Constify.
101         (execute_command_to_string): Constify.
102         (deprecated_call_command_hook): Constify.
103         * command.h (cmd_func): Constify.
104         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
105
106 2017-11-07  Tom Tromey  <tom@tromey.com>
107
108         * ada-lang.c (catch_ada_exception_command): Constify.
109         (catch_assert_command): Constify.
110         * break-catch-throw.c (catch_catch_command, catch_throw_command)
111         (catch_rethrow_command): Constify.
112         (catch_exception_command_1): Constify.
113         * breakpoint.h (add_catch_command): Constify.
114         * break-catch-syscall.c (catch_syscall_command_1): Constify.
115         (catch_syscall_split_args): Constify.
116         * break-catch-sig.c (catch_signal_command): Constify.
117         (catch_signal_split_args): Constify.
118         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
119         cmd_const_sfunc_ftype.
120         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
121         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
122         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
123         (add_setshow_string_cmd, struct cmd_list_element)
124         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
125         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
126         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
127         Constify.
128         (set_cmd_sfunc): Constify.
129         (empty_sfunc): Constify.
130         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
131         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
132         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
133         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
134         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
135         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
136         Constify.
137         (set_cmd_sfunc): Constify.
138         (cmd_sfunc_ftype): Remove.
139         * compile/compile.c (set_compile_args): Constify.
140         * infrun.c (set_disable_randomization): Constify.
141         * infcmd.c (set_args_command, set_cwd_command): Constify.
142         * breakpoint.c (set_condition_evaluation_mode): Constify.
143         (add_catch_command): Constify.
144         (catch_fork_command_1, catch_exec_command_1)
145         (catch_load_command_1, catch_unload_command_1): Constify.
146         (catch_load_or_unload): Constify.
147         * guile/scm-param.c (pascm_set_func): Constify.
148         (add_setshow_generic): Constify.
149         * python/py-param.c (get_set_value): Constify.
150         * top.h (set_verbose): Constify.
151         * tui/tui-win.c (tui_set_var_cmd): Constify.
152         * mi/mi-main.c (set_mi_async_command): Constify.
153         * cli/cli-logging.c (set_logging_overwrite)
154         (set_logging_redirect): Constify.
155         * value.c (set_max_value_size): Constify.
156         * valprint.c (set_input_radix, set_output_radix): Constify.
157         * utils.c (set_width_command, set_height_command): Constify.
158         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
159         * tracepoint.c (set_disconnected_tracing)
160         (set_circular_trace_buffer, set_trace_buffer_size)
161         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
162         * top.c (set_history_size_command, set_verbose, set_editing)
163         (set_gdb_datadir, set_history_filename): Constify.
164         * target.c (set_targetdebug, maint_set_target_async_command)
165         (maint_set_target_non_stop_command, set_target_permissions)
166         (set_write_memory_permission): Constify.
167         (open_target): Constify.
168         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
169         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
170         * symtab.c (set_symbol_cache_size_handler): Constify.
171         * symfile.c (set_ext_lang_command): Constify.
172         * symfile-debug.c (set_debug_symfile): Constify.
173         * source.c (set_directories_command): Constify.
174         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
175         * serial.c (set_parity): Constify.
176         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
177         * remote.c (set_remote_exec_file, set_remotebreak)
178         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
179         * record.c (set_record_insn_history_size)
180         (set_record_call_history_size): Constify.
181         * record-full.c (set_record_full_insn_max_num): Constify.
182         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
183         * osabi.c (set_osabi): Constify.
184         * mips-tdep.c (set_mips64_transfers_32bit_regs)
185         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
186         * maint.c (maintenance_set_profile_cmd): Constify.
187         * linux-thread-db.c (set_libthread_db_search_path): Constify.
188         * language.c (set_language_command, set_range_command)
189         (set_case_command): Constify.
190         * infrun.c (set_non_stop, set_observer_mode)
191         (set_stop_on_solib_events, set_schedlock_func)
192         (set_exec_direction_func): Constify.
193         * infcmd.c (set_inferior_tty_command): Constify.
194         * disasm.c (set_disassembler_options_sfunc): Constify.
195         * demangle.c (set_demangling_command): Constify.
196         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
197         * cris-tdep.c (set_cris_version, set_cris_mode)
198         (set_cris_dwarf2_cfi): Constify.
199         * corefile.c (set_gnutarget_command): Constify.
200         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
201         (set_target_wide_charset_sfunc): Constify.
202         * breakpoint.c (update_dprintf_commands): Constify.
203         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
204         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
205         (set_disassembly_style_sfunc): Constify.
206         * arch-utils.c (set_endian, set_architecture): Constify.
207         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
208         * agent.c (set_can_use_agent): Constify.
209
210 2017-11-07  Tom Tromey  <tom@tromey.com>
211
212         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
213         (go32_pde, go32_pte, go32_pte_for_address): Constify.
214         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
215         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
216         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
217         (parse_int_arg, show_thread_default_detach_sc_cmd)
218         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
219         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
220         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
221         (show_task_pause_cmd, set_task_detach_sc_cmd)
222         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
223         (set_noninvasive_cmd, set_thread_pause_cmd)
224         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
225         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
226         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
227         * windows-nat.c (display_selectors): Constify.
228         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
229         non-const "cfunc".
230         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
231         (cmd_cfunc_eq): Likewise.
232         (struct cmd_list_element): Likewise.
233         (do_cfunc): Remove.
234         (cli_user_command_p): Update.
235         * command.h (add_cmd): Remove non-const overload.
236         (cmd_cfunc_ftype): Remove typedef.
237         (cmd_cfunc_eq): Remove non-const overload.
238         * value.c (show_values): Constify.
239         * thread.c (thread_apply_all_command): Constify.
240         * symfile.c (load_command): Constify.
241         * source.c (directory_command): Constify.
242         * maint.c (maintenance_internal_error)
243         (maintenance_demangler_warning, maintenance_space_display)
244         (maintenance_print_architecture, maintenance_translate_address)
245         (maintenance_info_selftests, maintenance_internal_warning):
246         Constify.
247         * breakpoint.c (disable_trace_command, enable_trace_command):
248         Constify.
249         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
250         Constify.
251         (add_auto_load_safe_path): Constify.
252         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
253         * top.h (show_commands): Constify.
254         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
255         * sparc64-tdep.c (adi_examine_command): Constify.
256         (adi_assign_command): Constify.
257
258 2017-11-07  Tom Tromey  <tom@tromey.com>
259
260         * frame.h (info_locals_command, info_args_command): Constify.
261         * auto-load.h (auto_load_info_scripts): Constify.
262         * inferior.h (registers_info): Constify.
263         * copying.c: Rebuild.
264         * copying.awk: Constify generated commands.
265         * auto-load.c (auto_load_info_scripts)
266         (info_auto_load_gdb_scripts): Constify.
267         * cli/cli-decode.c (struct cmd_list_element): Take a
268         cmd_const_cfunc_ftype.
269         * command.h (add_info): Take a cmd_const_cfunc_ftype.
270         * tui/tui-win.c (tui_all_windows_info): Constify.
271         * python/py-auto-load.c (info_auto_load_python_scripts):
272         Constify.
273         * cli/cli-cmds.c (show_command): Remove non-const overload.
274         * tracepoint.c (info_tvariables_command, info_scope_command):
275         Constify.
276         (info_static_tracepoint_markers_command): Constify.
277         * thread.c (info_threads_command): Constify.
278         (print_thread_info_1): Constify.
279         * target.c (info_target_command): Constify.
280         * symtab.c (info_sources_command, info_functions_command)
281         (info_types_command): Constify.
282         (info_variables_command): Remove non-const overload.
283         * symfile.c (info_ext_lang_command): Constify.
284         * stack.c (info_frame_command, info_locals_command)
285         (info_args_command): Constify.
286         (backtrace_command): Remove non-const overload.
287         * source.c (info_source_command, info_line_command): Constify.
288         * solib.c (info_sharedlibrary_command): Constify.
289         * skip.c (info_skip_command): Constify.
290         * ser-go32.c (info_serial_command): Constify.
291         * reverse.c (info_bookmarks_command): Constify.
292         * printcmd.c (info_symbol_command, info_address_command)
293         (info_display_command): Constify.
294         * osdata.c (info_osdata_command): Constify.
295         * objc-lang.c (info_selectors_command, info_classes_command):
296         Constify.
297         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
298         * memattr.c (info_mem_command): Constify.
299         * macrocmd.c (info_macro_command, info_macros_command): Constify.
300         * linux-fork.c (info_checkpoints_command): Constify.
301         * infrun.c (info_signals_command): Constify.
302         * inflow.c (info_terminal_command): Constify.
303         * inferior.c (info_inferiors_command): Constify.
304         (print_inferior): Constify.
305         * infcmd.c (info_program_command, info_all_registers_command)
306         (info_registers_command, info_vector_command)
307         (info_float_command): Constify.
308         (registers_info): Constify.
309         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
310         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
311         Constify.
312         * f-valprint.c (info_common_command): Constify.
313         * dcache.c (info_dcache_command): Constify.
314         (dcache_info_1): Constify.
315         * darwin-nat-info.c (info_mach_tasks_command)
316         (info_mach_task_command, info_mach_ports_command)
317         (info_mach_port_command, info_mach_threads_command)
318         (info_mach_thread_command, info_mach_regions_command)
319         (info_mach_regions_recurse_command, info_mach_region_command)
320         (info_mach_exceptions_command): Constify.
321         (get_task_from_args): Constify.
322         * cp-support.c (info_vtbl_command): Constify.
323         * breakpoint.c (info_watchpoints_command)
324         (info_tracepoints_command): Constify.
325         (info_breakpoints_command): Remove non-const overload.
326         * avr-tdep.c (avr_io_reg_read_command): Constify.
327         * auxv.c (info_auxv_command): Constify.
328         * ada-tasks.c (info_tasks_command): Constify.
329         (info_task): Constify.
330         * ada-lang.c (info_exceptions_command): Constify.
331
332 2017-11-07  Tom Tromey  <tom@tromey.com>
333
334         * solib.h (no_shared_libraries): Constify.
335         * frame.h (return_command): Constify.
336         * cli/cli-cmds.h (quit_command): Constify.
337         * top.h (quit_command, execute_command): Constify.
338         * target.h (flash_erase_command): Constify.
339         * inferior.h (set_inferior_args, attach_command): Constify.
340         * tracepoint.h (start_tracing, stop_tracing): Constify.
341         * breakpoint.h (break_command, tbreak_command)
342         (hbreak_command_wrapper, thbreak_command_wrapper)
343         (rbreak_command_wrapper, watch_command_wrapper)
344         (awatch_command_wrapper, rwatch_command_wrapper)
345         (get_tracepoint_by_number): Constify.
346         * symtab.c (info_variables_command, rbreak_command)
347         (symtab_symbol_info): Constify.
348         (info_variables_command): Add non-const overload.
349         * top.c (dont_repeat_command): Constify.
350         * breakpoint.c (ignore_command, commands_command)
351         (condition_command, tbreak_command, hbreak_command)
352         (thbreak_command, clear_command, break_command)
353         (info_breakpoints_command, watch_command, rwatch_command)
354         (awatch_command, trace_command, ftrace_command, strace_command)
355         (trace_pass_command, break_range_command, dprintf_command)
356         (agent_printf_command, get_tracepoint_by_number)
357         (watch_maybe_just_location, trace_pass_command): Constify.
358         (info_breakpoints_command): Add non-const overload.
359         * tracefile.c (tsave_command): Constify.
360         * infcmd.c (attach_command, disconnect_command, signal_command)
361         (queue_signal_command, stepi_command, nexti_command)
362         (finish_command, next_command, step_command, until_command)
363         (advance_command, jump_command, continue_command, run_command)
364         (start_command, starti_command, interrupt_command)
365         (run_command_1, set_inferior_args, step_1): Constify.
366         * inferior.c (add_inferior_command, remove_inferior_command)
367         (clone_inferior_command): Constify.
368         * linux-fork.c (checkpoint_command, restart_command): Constify.
369         * windows-nat.c (signal_event_command): Constify.
370         * guile/guile.c (guile_repl_command, guile_command): Constify.
371         * printcmd.c (x_command, display_command, printf_command)
372         (output_command, set_command, call_command, print_command)
373         (eval_command): Constify.
374         (non_const_set_command): Remove.
375         (_initialize_printcmd): Update.
376         * source.c (forward_search_command, reverse_search_command):
377         Constify.
378         * jit.c (jit_reader_load_command, jit_reader_unload_command):
379         Constify.
380         * infrun.c (handle_command): Constify.
381         * memattr.c (mem_command): Constify.
382         * stack.c (return_command, up_command, up_silently_command)
383         (down_command, down_silently_command, frame_command)
384         (backtrace_command, func_command, backtrace_command_1): Constify.
385         (backtrace_command): Add non-const overload.
386         * remote-sim.c (simulator_command): Constify.
387         * exec.c (set_section_command): Constify.
388         * tracepoint.c (tdump_command, trace_variable_command)
389         (tstatus_command, tstop_command, tstart_command)
390         (end_actions_pseudocommand, while_stepping_pseudocommand)
391         (collect_pseudocommand, teval_pseudocommand, actions_command)
392         (start_tracing, stop_tracing): Constify.
393         * value.c (init_if_undefined_command): Constify.
394         * tui/tui-stack.c (tui_update_command): Constify.
395         * tui/tui-win.c (tui_refresh_all_command)
396         (tui_set_tab_width_command, tui_set_win_height_command)
397         (tui_set_focus_command, tui_scroll_forward_command)
398         (tui_scroll_backward_command, tui_scroll_left_command)
399         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
400         (tui_set_win_height): Constify.
401         * tui/tui-layout.c (tui_layout_command): Constify.
402         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
403         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
404         (proc_untrace_sysexit_cmd): Constify.
405         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
406         (threadset_test_cmd, threadlist_update_test_cmd)
407         (threadalive_test): Constify.
408         * objc-lang.c (print_object_command): Constify.
409         * command.h (add_com): Constify.
410         * cli/cli-dump.c (restore_command): Constify.
411         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
412         (help_command, complete_command, shell_command, edit_command)
413         (list_command, disassemble_command, make_command)
414         (apropos_command, alias_command): Constify.
415         * cli/cli-script.c (document_command, define_command)
416         (while_command, if_command, validate_comname): Constify.
417         * cli/cli-decode.c (struct cmd_list_element): Change type of
418         "fun".
419         * target.c (do_monitor_command, flash_erase_command): Constify.
420         * regcache.c (reg_flush_command): Constify.
421         * reverse.c (reverse_step, reverse_next, reverse_stepi)
422         (reverse_nexti, reverse_continue, reverse_finish)
423         (save_bookmark_command, goto_bookmark_command)
424         (exec_reverse_once): Constify.
425         * python/python.c (python_interactive_command, python_command):
426         Constify.
427         * typeprint.c (ptype_command, whatis_command, whatis_exp):
428         Constify.
429         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
430         * gcore.c (gcore_command): Constify.
431
432 2017-11-07  Tom Tromey  <tom@tromey.com>
433
434         * printcmd.c (x_command): Call set_repeat_arguments.
435         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
436         * top.c (repeat_arguments): New global.
437         (set_repeat_arguments): New function.
438         (execute_command): Handle repeat_arguments.
439         (show_commands): Calls set_repeat_arguments.
440         * command.h (set_repeat_arguments): Declare.
441
442 2017-11-07  Tom Tromey  <tom@tromey.com>
443
444         * stack.c (backtrace_command): Use std::string.
445         (backtrace_command_1): Make "count_exp" const.
446
447 2017-11-07  Tom Tromey  <tom@tromey.com>
448
449         * source.c (directory_switch, mod_path, add_path): Constify.
450         * defs.h (add_path, mod_path, directory_switch): Constify.
451         * mi/mi-cmd-env.c (env_mod_path): Constify.
452
453 2017-11-07  Tom Tromey  <tom@tromey.com>
454
455         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
456         (run_command_1, continue_command, step_1, jump_command)
457         (signal_command, until_command, advance_command, finish_command)
458         (attach_command): Update.
459
460 2017-11-07  Tom Tromey  <tom@tromey.com>
461
462         * command.h (set_cmd_cfunc): Don't declare.
463         * cli/cli-decode.c (set_cmd_cfunc): Now static.
464
465 2017-11-07  Tom Tromey  <tom@tromey.com>
466
467         * stack.c (select_frame_command): Constify.
468         * cli/cli-decode.c (add_com_suppress_notification): Constify.
469         * command.h (add_com_suppress_notification): Constify.
470
471 2017-11-07  Tom Tromey  <tom@tromey.com>
472
473         * breakpoint.c (stop_command): Constify.
474         * cli/cli-decode.c (struct cmd_list_element): Constify.
475         * command.h (add_abbrev_prefix_cmd): Constify.
476
477 2017-11-07  Pedro Alves  <palves@redhat.com>
478
479         * breakpoint.c (extract_bp_kind): New enum.
480         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
481         factored out from ...
482         (extract_bp_number_and_location): ... here.
483         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
484
485 2017-11-07  Pedro Alves  <palves@redhat.com>
486
487         * breakpoint.c (extract_bp_number_and_location): Change return
488         type to void.  Throw error instead of warning.
489         (enable_disable_command): Adjust.
490
491 2017-11-07  Xavier Roirand  <roirand@adacore.com>
492             Pedro Alves  <palves@redhat.com>
493
494         * breakpoint.c (map_breakpoint_number_range): New, factored out
495         from ...
496         (map_breakpoint_numbers): ... here.
497         (find_location_by_number): Change parameters from string to
498         breakpoint number and location.
499         (extract_bp_number_and_location): New function.
500         (enable_disable_bp_num_loc)
501         (enable_disable_breakpoint_location_range)
502         (enable_disable_command): New functions, factored out ...
503         (enable_command, disable_command): ... these functions, and
504         adjusted to support ranges.
505         * NEWS: Document enable/disable breakpoint location range feature.
506
507 2017-11-06  Luis Machado  <luis.machado@linaro.org>
508
509         * MAINTAINERS (Write After Approval): Update my e-mail address.
510
511 2017-11-06  Pedro Alves  <palves@redhat.com>
512
513         * gnu-nat.c (gnu_terminal_init): Delete.
514         (gnu_target): Don't install gnu_terminal_init.
515         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
516         (child_terminal_init): ... this function.
517
518 2017-11-06  Pedro Alves  <palves@redhat.com>
519
520         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
521         sgtty.h.
522         * config.in, configure: Regenerate.
523
524 2017-11-06  Pedro Alves  <palves@redhat.com>
525
526         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
527         (async_init_signals): Adjust.
528         (handle_stop_sig): Rename to ...
529         (handle_sigtstp): ... this.
530         (async_stop_sig): Rename to ...
531         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
532         SIGTSTP path.
533         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
534         instead of STOP_SIGNAL thoughout.
535         (handle_stop_sig): Rename to ...
536         (handle_sigtstp): ... this.
537         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
538
539 2017-11-06  Pedro Alves  <palves@redhat.com>
540
541         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
542         longer set flags twice in row.
543
544 2017-11-06  Pedro Alves  <palves@redhat.com>
545
546         * Makefile.in (SER_HARDWIRE): Update comment.
547         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
548         * common/gdb_termios.h: Delete file.
549         * common/job-control.c: Include termios.h and unistd.h instead of
550         gdb_termios.h.
551         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
552         check.
553         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
554         Remove sgtty code.
555         * configure.ac: No longer check for termio.h and sgtty.h.
556         * configure: Regenerate.
557         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
558         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
559         Replace PROCESS_GROUP_TYPE references with pid_t references
560         throughout.
561         (gdb_getpgrp): Delete.
562         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
563         (child_terminal_inferior): Remove comment.  Remove sgtty code.
564         (child_terminal_ours_1): Use tcgetpgrp directly instead of
565         gdb_getpgrp.  Use serial_set_tty_state instead aof
566         serial_noflush_set_tty_state.  Remove sgtty code.
567         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
568         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
569         (inferior_process_group): Now returns pid_t.
570         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
571         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
572         * ser-event.c (serial_event_ops): Update.
573         * ser-go32.c (dos_noflush_set_tty_state): Delete.
574         (dos_ops): Update.
575         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
576         * ser-pipe.c (pipe_ops): Update.
577         * ser-tcp.c (tcp_ops): Update.
578         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
579         HAVE_TERMIOS checks.
580         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
581         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
582         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
583         assume termios.
584         (hardwire_noflush_set_tty_state): Delete.
585         (hardwire_print_tty_state, hardwire_drain_output)
586         (hardwire_flush_output, hardwire_flush_input)
587         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
588         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
589         code, and assume termios.
590         (hardwire_ops): Update.
591         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
592         * serial.c (serial_noflush_set_tty_state): Delete.
593         * serial.h (serial_noflush_set_tty_state): Delete.
594         (serial_ops::noflush_set_tty_state): Delete.
595
596 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
597
598         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
599         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
600         (COMMON_OBS): Remove doublest.o and dfp.o.
601         Do not build target-float.c (instead of doublest.c)
602         with -Wformat-nonliteral.
603
604         * doublest.c: Remove file.
605         * doublest.h: Remove file.
606         * dfp.c: Remove file.
607         * dfp.h: Remove file.
608
609         * target-float.c: Do not include "doublest.h" and "dfp.h".
610         (DOUBLEST): Move here from doublest.h.
611         (enum float_kind): Likewise.
612         (FLOATFORMAT_CHAR_BIT): Likewise.
613         (FLOATFORMAT_LARGEST_BYTES): Likewise.
614         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
615         (floatformat_precision): Likewise.
616         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
617         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
618         Likewise.
619         (host_float_format, host_double_format, host_long_double_format):
620         Likewise.
621         (floatformat_to_string, floatformat_from_string): Likewise.
622         (floatformat_to_doublest): Likewise.  Also, inline the original
623         convert_floatformat_to_doublest.
624         (floatformat_from_doublest): Likewise.  Also, inline the original
625         convert_floatformat_from_doublest.
626
627         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
628         (MAX_DECIMAL_STRING): Move here from dfp.c.
629         (match_endianness): Likewise.
630         (set_decnumber_context, decimal_check_errors): Likewise.
631         (decimal_from_number, decimal_to_number): Likewise.
632         (decimal_to_string, decimal_from_string): Likewise.  Make static.
633         (decimal_from_longest, decimal_from_ulongest): Likewise.
634         (decimal_to_longest): Likewise.
635         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
636         (decimal_convert): Likewise.
637
638 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
639
640         * doublest.c: Do not include "gdbtypes.h".
641         (extract_typed_floating): Remove.
642         (store_typed_floating): Remove.
643         (convert_typed_floating): Remove.
644         * doublest.h (struct type): Remove.
645         (DOUBLEST_PRINT_FORMAT): Remove.
646         (DOUBLEST_SCAN_FORMAT): Remove.
647         (extract_typed_floating): Remove.
648         (store_typed_floating): Remove.
649         (convert_typed_floating): Remove.
650
651         * dfp.c (decimal_from_doublest): Remove.
652         (decimal_to_doublest): Remove.
653         * dfp.h: Do not include "doublest.h".
654         (decimal_from_doublest): Remove.
655         (decimal_to_doublest): Remove.
656
657         * value.c: Do not include "doublest.h" and "dfp.h".
658         (value_as_double): Remove.
659         (unpack_double): Remove.
660         (value_from_double): Remove.
661         (value_from_decfloat): Remove.
662         * value.h: Do not include "doublest.h".
663         (value_as_double): Remove.
664         (unpack_double): Remove.
665         (value_from_double): Remove.
666         (value_from_decfloat): Remove.
667
668 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
669
670         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
671         (i386_extract_return_value): Use target_float_convert.
672         (i386_store_return_value): Likewise.
673         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
674         (i387_value_to_register): Likewise.
675         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
676         (ia64_register_to_value): Use target_float_convert.
677         (ia64_value_to_register): Likewise.
678         (ia64_extract_return_value): Likewise.
679         (ia64_store_return_value): Likewise.
680         (ia64_push_dummy_call): Likewise.
681         * m68k-tdep.c: Include "target-float.h".
682         (m68k_register_to_value): Use target_float_convert.
683         (m68k_value_to_register): Likewise.
684         (m68k_svr4_extract_return_value): Likewise.
685         (m68k_svr4_store_return_value): Likewise.
686         * ppc-sysv-tdep.c: Include "target-float.h".
687         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
688         (do_ppc_sysv_return_value): Likewise.
689         (ppc64_sysv_abi_push_freg): Likewise.
690         (ppc64_sysv_abi_return_value_base): Likewise.
691         * rs6000-aix-tdep.c: Include "target-float.h".
692         (rs6000_push_dummy_call): Use target_float_convert.
693         (rs6000_return_value): Likewise.
694         * rs6000-lynx178-tdep.c: Include "target-float.h".
695         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
696         (rs6000_lynx178_return_value): Likewise.
697         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
698         (rs6000_register_to_value): Use target_float_convert.
699         (rs6000_value_to_register): Likewise.
700         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
701         (arm_extract_return_value): Use target_float_convert.
702         (arm_store_return_value): Likewise.
703         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
704         (sh_register_convert_to_virtual): Use target_float_convert.
705         (sh_register_convert_to_raw): Likewise.
706         * sh64-tdep.c: Include "target-float.h".
707         (sh64_extract_return_value): Use target_float_convert.
708         (sh64_register_convert_to_virtual): Likewise.
709         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
710
711 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
712
713         * target-float.c (floatformat_to_host_double): New function.
714         (floatformat_from_host_double): Likewise.
715         (target_float_to_host_double): Likewise.
716         (target_float_from_host_double): Likewise.
717         * target-float.h (target_float_to_host_double): Add prototype.
718         (target_float_from_host_double): Likewise.
719
720         * guile/scm-value.c: Include "target-float.h".
721         (gdbscm_value_to_real): Use target_float_to_host_double.
722         Handle integer source values via value_as_long.
723         * guile/scm-math.c: Include "target-float.h".  Do not include
724         "doublest.h", "dfp.h", and "expression.h".
725         (vlscm_convert_typed_number): Use target_float_from_host_double.
726         (vlscm_convert_number): Likewise.
727
728         * python/py-value.c (valpy_float): Use target_float_to_host_double.
729         (convert_value_from_python): Use target_float_from_host_double.
730
731 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
732
733         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
734         (cast_from_fixed): Likewise.
735         (ada_scaling_type): New function.
736         (ada_delta): Return value instead of DOUBLEST.  Perform target
737         arithmetic instead of host arithmetic.
738         (scaling_factor): Rename to ...
739         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
740         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
741         (ada_fixed_to_float): Remove.
742         (ada_float_to_fixed): Remove.
743         * ada-lang.h (ada_fixed_to_float): Remove.
744         (ada_float_to_fixed): Remove.
745         (ada_delta): Return value instead of DOUBLEST.
746         (ada_scaling_factor): Add prototype.
747
748         * ada-typeprint.c: Include "target-float.h".
749         (print_fixed_point_type): Perform target arithmetic instead of
750         host arithmetic.
751         * ada-valprint.c: Include "target-float.h".
752         (ada_val_print_num): Perform target arithmetic instead of
753         host arithmetic for fixed-point types.
754
755 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
756
757         * target-float.c: Include <math.h>.
758         (floatformat_binop): New function.
759         (floatformat_compare): Likewise.
760         (target_float_binop): Likewise.
761         (target_float_compare): Likewise.
762         * target-float.h: Include "expression.h".
763         (target_float_binop): Add prototype.
764         (target_float_compare): Likewise.
765
766         * valarith.c: Do not include "doublest.h" and "dfp.h".
767         Include "common/byte-vector.h".
768         (value_args_as_decimal): Remove, replace by ...
769         (value_args_as_target_float): ... this function.  Handle both
770         binary and decimal target floating-point formats.
771         (scalar_binop): Handle both binary and decimal FP using
772         value_args_as_target_float and target_float_binop.
773         (value_equal): Handle both binary and decimal FP using
774         value_args_as_target_float and target_float_compare.
775         (value_less): Likewise.
776         (value_pos): Handle all scalar types as simple copy.
777         (value_neg): Handle all scalar types via BINOP_SUB from 0.
778         * dfp.c (decimal_binop): Throw error instead of internal_error
779         when called with an unsupported operation code.
780
781 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
782
783         * target-float.c (target_float_to_string): New function.
784         (target_float_from_string): New function.
785         * target-float.h (target_float_to_string): Add prototype.
786         (target_float_from_string): Add prototype.
787
788         * valprint.c: Include "target-float.h".  Do not include
789         "doublest.h" and "dfp.h".
790         (print_floating): Use target_float_to_string.
791         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
792         (printf_floating): Use target_float_to_string.
793         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
794         (print_i387_value): Use target_float_to_string.
795         * mips-tdep.c: Include "target-float.h".
796         (mips_print_fp_register): Use target_float_to_string.
797         * sh64-tdep.c: Include "target-float.h".
798         (sh64_do_fp_register): Use target_float_to_string.
799
800         * parse.c: Include "target-float.h".  Do not include
801         "doublest.h" and "dfp.h".
802         (parse_float): Use target_float_from_string.
803         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
804         (define_symbol): Use target_float_from_string.
805         * gdbarch-selftests.c: Include "target-float.h".
806         (register_to_value_test): Use target_float_from_string.
807
808 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
809
810         * Makefile.c (SFILES): Add target-float.c.
811         (HFILES_NO_SRCDIR): Add target-float.h.
812         (COMMON_OBS): Add target-float.o.
813         * target-float.h: New file.
814         * target-float.c: New file.
815
816         * doublest.c (floatformat_classify): Fix detection of float_zero.
817
818         * gdbtypes.c (is_floating_type): New function.
819         * gdbtypes.h (is_floating_type): Add prototype.
820
821         * value.c: Do not include "floatformat.h".
822         (unpack_double): Use target_float_is_valid.
823         (is_floating_value): New function.
824         * value.h (is_floating_value): Add prototype-
825
826         * valarith.c: Include "target-float.h".
827         (value_logical_not): Use target_float_is_zero.
828
829         * python/py-value.c: Include "target-float.h".
830         (valpy_nonzero): Use target_float_is_zero.
831
832 2017-11-04  Tom Tromey  <tom@tromey.com>
833
834         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
835
836 2017-11-04  Tom Tromey  <tom@tromey.com>
837
838         * breakpoint.c (set_momentary_breakpoint): Return
839         breakpoint_up.
840         (until_break_command): Update.
841         (new_until_break_fsm): Change argument types to
842         breakpoint_up.
843         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
844         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
845         Remove.
846         * infcmd.c (finish_forward): Update.
847         * breakpoint.h (set_momentary_breakpoint)
848         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
849         (make_cleanup_delete_breakpoint): Remove.
850         (struct breakpoint_deleter): New.
851         (breakpoint_up): New typedef.
852         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
853         (insert_exception_resume_breakpoint): Update.
854         (insert_exception_resume_from_probe): Update.
855         (insert_longjmp_resume_breakpoint): Update.
856         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
857         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
858         * infcall.c (call_function_by_hand_dummy): Update
859
860 2017-11-04  Tom Tromey  <tom@tromey.com>
861
862         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
863
864 2017-11-04  Tom Tromey  <tom@tromey.com>
865
866         * linux-tdep.c (linux_core_info_proc_mappings): Use
867         gdb::def_vector.
868         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
869         "size" argument.
870         (linux_corefile_thread): Update.
871         (linux_make_corefile_notes): Remove unused variable.
872
873 2017-11-04  Tom Tromey  <tom@tromey.com>
874
875         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
876         gdb::byte_vector.
877
878 2017-11-04  Tom Tromey  <tom@tromey.com>
879
880         * objfiles.c (do_free_objfile_cleanup): Remove.
881         * compile/compile-object-load.c (compile_object_load): Update.
882         * objfiles.h (make_cleanup_free_objfile): Remove.
883
884 2017-11-04  Tom Tromey  <tom@tromey.com>
885
886         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
887         (adi_read_versions): Change "tags" to "gdb_byte *".
888         (adi_print_versions): Likewise.
889
890 2017-11-04  Tom Tromey  <tom@tromey.com>
891
892         * breakpoint.c
893         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
894         from start_rbreak_breakpoints.
895         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
896         * breakpoint.h (class scoped_rbreak_breakpoints): New.
897         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
898         * symtab.c (do_end_rbreak_breakpoints): Remove.
899         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
900
901 2017-11-04  Tom Tromey  <tom@tromey.com>
902
903         * cp-namespace.c (reset_directive_searched): Remove.
904         (cp_lookup_symbol_via_imports): Use scoped_restore.
905         * cp-support.c (reset_directive_searched): Remove.
906         (make_symbol_overload_list_using): Use scoped_restore.
907         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
908         (reset_directive_searched): Remove.
909
910 2017-11-04  Tom Tromey  <tom@tromey.com>
911
912         * symfile.c (find_separate_debug_file_by_debuglink): Use
913         unique_xmalloc_ptr.
914
915 2017-11-04  Tom Tromey  <tom@tromey.com>
916
917         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
918         type of "info".
919         (compute_stack_depth): Likewise.
920         (do_compile_dwarf_expr_to_c): Use std::vector.
921
922 2017-11-04  Tom Tromey  <tom@tromey.com>
923
924         * compile/compile-object-load.c (link_callbacks_einfo): Use
925         std::string.
926
927 2017-11-04  Tom Tromey  <tom@tromey.com>
928
929         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
930         Use scoped_free_pendings.
931         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
932         scoped_free_pendings.
933         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
934         (xcoff_initial_scan): Likewise.
935         * buildsym.c (reset_symtab_globals): Update comment.
936         (scoped_free_pendings): Rename from really_free_pendings.
937         (prepare_for_building): Update comment.
938         (buildsym_init): Likewise.
939         * buildsym.h (class scoped_free_pendings): New class.
940         (really_free_pendings): Don't declare.
941
942 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
943
944         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
945         output when converting a zero value to a special byteorder format.
946
947 2017-11-02  Yao Qi  <yao.qi@linaro.org>
948
949         * frame.c (do_frame_register_read): Remove aspace.
950         * jit.c (jit_frame_sniffer): Likwise.
951         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
952         * regcache.c (regcache::regcache): Pass nullptr.
953         (regcache_print): Caller updated.
954         * regcache.h (regcache::regcache): Remove one constructor
955         parameter aspace.
956
957 2017-11-02  Yao Qi  <yao.qi@linaro.org>
958
959         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
960
961 2017-11-02  Yao Qi  <yao.qi@linaro.org>
962
963         * breakpoint.c (insert_single_step_breakpoints): Update.
964         * frame.c (struct frame_info) <aspace>: Add const.
965         (frame_save_as_regcache): Add const.
966         (get_frame_address_space): Return const address_space *.
967         * frame.h (get_frame_address_space): Update declaration.
968         * infrun.c (struct step_over_info) <aspace>: Add const.
969         (set_step_over_info): Make aspace const.
970         (displaced_step_prepare_throw): Change variable const.
971         (resume): Likewise.
972         (proceed): Likewise.
973         (adjust_pc_after_break): Likewise.
974         (save_waitstatus): Likewise.
975         (handle_signal_stop): Likewise.
976         (keep_going_pass_signal): Likewise.
977         * jit.c (jit_frame_sniffer): Add const.
978         * mips-tdep.c (mips_single_step_through_delay): Likewise.
979         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
980         * record-full.c (record_full_wait_1): Likewise.
981         * regcache.c (regcache::regcache): Change parameter to const.
982         * regcache.h (regcache::regcache): Likewise.
983         (regcache::aspace): Return const address_space *.
984         (regcache) <m_aspace>: Add const.
985
986 2017-11-02  Yao Qi  <yao.qi@linaro.org>
987
988         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
989         * frame.c (create_sentinel_frame): Likewise.
990         * infrun.c (displaced_step_prepare_throw): Likewise.
991         (resume): Likewise.
992         (thread_still_needs_step_over_bp): Likewise.
993         (proceed): Likewise.
994         (do_target_wait): Likewise.
995         (adjust_pc_after_break): Likewise.
996         (handle_syscall_event): Likewise.
997         (save_waitstatus): Likewise.
998         (handle_inferior_event_1): Likewise.
999         (handle_signal_stop): Likewise.
1000         (keep_going_pass_signal): Likewise.
1001         * linux-nat.c (status_callback): Likewise.
1002         (save_stop_reason): Likewise.
1003         (resume_stopped_resumed_lwps): Likewise.
1004         * record-full.c (record_full_exec_insn): Likewise.
1005         (record_full_wait_1): Likewise.
1006         * regcache.c (get_regcache_aspace): Remove.
1007         * regcache.h (get_regcache_aspace): Remove.
1008
1009 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1010
1011         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1012         (init_regcache_descr): Use gdbarch_num_regs.
1013         (regcache::regcache): Likewise.
1014         (regcache::get_register_status): Likewise.
1015         (regcache::assert_raw_regnum): Likewise.
1016         (regcache::cooked_read): Likewise.
1017         (regcache::cooked_read_value): Likewise.
1018         (regcache::cooked_write): Likewise.
1019         (regcache::dump): Likewise.
1020         (regcache::num_raw_registers): New method.
1021         * regcache.h (class regcache) <num_raw_registers>: New.
1022
1023 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1024
1025         * regcache.c (regcache::assert_regnum): New method.
1026         (regcache::invalidate): Call assert_regnum.
1027         (regcache::raw_update): Likewise.
1028         (regcache::raw_write): Likewise.
1029         (regcache::raw_read_part): Likewise.
1030         (regcache::raw_write_part): Likewise.
1031         (regcache::raw_supply): Likewise.
1032         (regcache::raw_supply_integer): Likewise.
1033         (regcache::raw_supply_zeroed): Likewise.
1034         (regcache::raw_collect): Likewise.
1035         (regcache::raw_collect_integer): Likewise.
1036         * regcache.h (regcache::assert_regnum): Declare.
1037
1038 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1039
1040         * regcache.c (regcache::dump): Remove code.
1041
1042 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1043
1044         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1045         Remove.
1046         <sizeof_cooked_register_status>: Remove.
1047         (init_regcache_descr): Update.
1048         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1049         (regcache::save): Likewise.
1050         (regcache::dump): Likewise.
1051
1052 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1053
1054         * ft32-tdep.c (ft32_fetch_instruction): New function.
1055         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1056
1057 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1058
1059         * cli/cli-script.c (execute_control_command): Rename to ...
1060         (execute_control_command_1): ... this.
1061         (execute_control_command): New function.
1062
1063 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1064
1065         * tracepoint.c (tfind_command): Remove const_cast.
1066
1067 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1068
1069         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1070
1071 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1072
1073         * common/common-utils.h (in_inclusive_range): New function.
1074         * arm-tdep.c (arm_record_extension_space): Use
1075         in_inclusive_range.
1076         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1077         * cris-tdep.c (cris_spec_reg_applicable): Use
1078         in_inclusive_range.
1079
1080 2017-10-30  Pedro Alves  <palves@redhat.com>
1081             Simon Marchi <simon.marchi@ericsson.com>
1082
1083         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1084         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1085
1086 2017-10-30  Pedro Alves  <palves@redhat.com>
1087
1088         * common/common-utils.c (string_appendf, string_vappendf): New
1089         functions.
1090         * common/common-utils.h (string_appendf, string_vappendf): New
1091         declarations.
1092         * unittests/common-utils-selftests.c (string_appendf_func)
1093         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1094         (string_vappendf_tests): New functions.
1095         (_initialize_common_utils_selftests): Register "string_appendf" and
1096         "string_vappendf tests".
1097
1098 2017-10-30  Pedro Alves  <palves@redhat.com>
1099
1100         * unittests/common-utils-selftests.c (format_func): New typedef.
1101         (string_printf_tests, string_vprintf_tests): Tests factored out
1102         and merged to ...
1103         (test_format_func): ... this new function.
1104         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1105         test_format_func.
1106
1107 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1108
1109         * darwin-nat.c: Remove include of gdb.h.
1110
1111 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1112
1113         * xtensa-xtregs.c: Fix formatting issues.
1114
1115 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1116
1117         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1118
1119 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1120
1121         PR python/21213
1122         * python/py-infthread.c (thpy_get_inferior): Increment reference
1123         of inferior before returning it.
1124
1125 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1126
1127         * unittests/common-utils-selftests.c (format): Add
1128         ATTRIBUTE_PRINTF.
1129
1130 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1131
1132         * xml-syscall.c (struct syscall_desc): Add constructor.
1133         <name>: Change type to std::string.
1134         (syscall_desc_up): New typedef.
1135         (syscall_desc_p): Remove typeder.
1136         (DEF_VEC_P(syscall_desc_p)): Remove.
1137         (struct syscall_group_desc): Add constructor.
1138         <name>: Change type to std::string.
1139         <syscalls>: Change type to std::vector.
1140         (syscall_group_desc_up): New typedef.
1141         (syscall_group_desc_p): Remove typedef.
1142         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1143         (struct syscalls_info) <syscalls>: Change type to std::vector of
1144         unique_ptr.
1145         <groups>: Likewise.
1146         <my_gdb_datadir>: Change type to std::string.
1147         (syscalls_info_up): New typedef.
1148         (allocate_syscalls_info): Remove.
1149         (syscalls_info_free_syscalls_desc): Remove.
1150         (syscalls_info_free_syscall_group_desc): Remove.
1151         (free_syscalls_info): Remove.
1152         (make_cleanup_free_syscalls_info): Remove.
1153         (syscall_group_create_syscall_group_desc): Adjust.
1154         (syscall_group_add_syscall): Adjust.
1155         (syscall_create_syscall_desc): Adjust.
1156         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1157         (init_syscalls_info): Adjust.
1158         (syscall_group_get_group_by_name): Adjust.
1159         (xml_get_syscall_number): Adjust.
1160         (xml_get_syscall_name): Adjust.
1161         (xml_list_of_syscalls): Adjust.
1162         (xml_list_syscalls_by_group): Adjust.
1163         (xml_list_of_groups): Adjust.
1164
1165 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1166
1167         * probe.h: Don't include gdb_vecs.h.
1168         (DEF_VEC_P (probe_p)): Remove.
1169         (find_probes_in_objfile): Return an std::vector.
1170         * probe.c (find_probes_in_objfile): Likewise.
1171         * breakpoint.c (breakpoint_objfile_data)
1172         <longjmp_probes>: Change type to std::vector.
1173         <exception_probes>: Likewise.
1174         (free_breakpoint_probes): Don't manually free vectors.
1175         (create_longjmp_master_breakpoint): Adjust.
1176         (create_exception_master_breakpoint): Adjust.
1177         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1178         parameter type, adjust.
1179         (svr4_create_solib_event_breakpoints): Adjust.
1180
1181 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1182
1183         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1184         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1185         with new.
1186         (free_breakpoint_probes): Rename to ...
1187         (free_breakpoint_objfile_data): ... this, and call delete on
1188         bp_objfile_data..
1189
1190 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1191
1192         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1193         (loaded_script_ptr): Remove typedef.
1194         (DEF_VEC_P (loaded_script_ptr)): Remove.
1195         (struct collect_matching_scripts_data): Add constructor.
1196         <scripts_p>: Change type to (pointer to) std::vector.
1197         (collect_matching_scripts_data): Adjust.
1198         (sort_scripts_by_name): Make suitable for std::sort.
1199         (print_scripts): Don't sort vector, adjust to std::vector.
1200         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1201
1202 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1203
1204         * symfile.c (filename_language): Make struct, not typedef.  Add
1205         constructor.
1206         <ext>: Change type to std::string.
1207         (DEF_VEC_O (filename_language)): Remove.
1208         (filename_language_table): Change type to std::vector.
1209         (add_filename_language): Adjust.
1210         (set_ext_lang_command): Adjust.
1211         (info_ext_lang_command): Adjust.
1212         (deduce_language_from_filename): Adjust.
1213         (class scoped_restore_filename_language_table): Remove.
1214         (test_filename_language): Use scoped_restore.
1215         (test_set_ext_lang_command): Use scoped_restore, adjust to
1216         std::vector change.
1217
1218 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1219
1220         * symfile.c: Include selftest.h.
1221         (class scoped_restore_filename_language_table): New.
1222         (test_filename_language): New test.
1223         (test_set_ext_lang_command): New test.
1224         (_initialize_symfile): Register tests.
1225
1226 2017-10-27  Keith Seitz  <keiths@redhat.com>
1227
1228         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1229         in the bp_location, falling back to find_pc_sect_function when
1230         needed.
1231         (add_location_to_breakpoint): Save sal->symbol.
1232         * breakpoint.h (struct bp_location) <symbol>: New field.
1233         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1234         * symtab.h (struct symtab_and_line) <symbol>: New field.
1235
1236 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1237
1238         PR gdb/13669
1239         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1240         to rewind obstack.
1241
1242 2017-10-26  Pedro Alves  <palves@redhat.com>
1243
1244         * remote.c (remote_async_terminal_ours_p): Delete.
1245         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1246         Remove references to 'remote_async_terminal_ours_p'.
1247
1248 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1249
1250         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1251
1252 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1253
1254         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1255         aspace const.
1256         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1257         Likewise.
1258         * breakpoint.c (bpstat_check_location): Remove cast.
1259         (breakpoint_hit_catch_fork): Make aspce const.
1260         (breakpoint_hit_catch_solib): Likewise.
1261         (breakpoint_hit_catch_exec): Likewise.
1262         (breakpoint_hit_ranged_breakpoint): Likewise.
1263         (breakpoint_hit_watchpoint): Likewise.
1264         (base_breakpoint_breakpoint_hit): Likewise.
1265         (bkpt_breakpoint_hit): Likewise.
1266         (dprintf_breakpoint_hit): Likewise.
1267         (tracepoint_breakpoint_hit): Likewise.
1268         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1269
1270 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1271
1272         * breakpoint.c (breakpoint_location_address_match): Change
1273         "struct address_space *" to "const address_space".
1274         (breakpoint_location_address_range_overlap): Likewise.
1275         (breakpoint_here_p): Likewise.
1276         (breakpoint_in_range_p): Likewise.
1277         (moribund_breakpoint_here_p): Likewise.
1278         (bp_location_inserted_here_p): Likewise.
1279         (software_breakpoint_inserted_here_p): Likewise.
1280         (hardware_breakpoint_inserted_here_p): Likewise.
1281         (hardware_watchpoint_inserted_in_range): Likewise.
1282         (bpstat_check_location): Likewise.
1283         (bpstat_stop_status): Likewise.
1284         (breakpoint_address_match): Likewise.
1285         (breakpoint_address_match_range): Likewise.
1286         (breakpoint_location_address_match): Likewise.
1287         (breakpoint_location_address_range_overlap): Likewise.
1288         (insert_single_step_breakpoint): Likewise.
1289         (breakpoint_has_location_inserted_here): Likewise.
1290         (single_step_breakpoint_inserted_here_p): Likewise.
1291         (pc_at_non_inline_function): Likewise.
1292         * breakpoint.h (bpstat_stop_status): Update declaration.
1293         (breakpoint_here_p): Likewise.
1294         (breakpoint_in_range_p): Likewise.
1295         (moribund_breakpoint_here_p): Likewise.
1296         (breakpoint_inserted_here_p): Likewise.
1297         (software_breakpoint_inserted_here_p): Likewise.
1298         (hardware_breakpoint_inserted_here_p): Likewise.
1299         (breakpoint_has_location_inserted_here): Likewise.
1300         (single_step_breakpoint_inserted_here_p): Likewise.
1301         (hardware_watchpoint_inserted_in_range): Likewise.
1302         (breakpoint_address_match): Likewise.
1303         (insert_single_step_breakpoint): Likewise.
1304         (pc_at_non_inline_function): Likewise.
1305         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1306         * record.c (record_check_stopped_by_breakpoint): Likewise.
1307         * record.h (record_check_stopped_by_breakpoint): Likewise.
1308         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1309
1310 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1311
1312         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1313         regcache->arch () instead get_regcache_arch.
1314         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1315         Likewise.
1316         (aarch64_fbsd_store_inferior_registers): Likewise.
1317         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1318         (store_gregs_to_thread): Likewise.
1319         (fetch_fpregs_from_thread): Likewise.
1320         (store_fpregs_to_thread): Likewise.
1321         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1322         (aarch64_store_return_value): Likewise.
1323         (aarch64_software_single_step): Likewise.
1324         * aix-thread.c (aix_thread_wait): Likewise.
1325         (supply_reg32): Likewise.
1326         (supply_sprs64): Likewise.
1327         (supply_sprs32): Likewise.
1328         (fill_gprs64): Likewise.
1329         (fill_gprs32): Likewise.
1330         (fill_sprs64): Likewise.
1331         (fill_sprs32): Likewise.
1332         (store_regs_user_thread): Likewise.
1333         (store_regs_kernel_thread): Likewise.
1334         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1335         (alphabsd_store_inferior_registers): Likewise.
1336         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1337         (alpha_store_return_value): Likewise.
1338         (alpha_deal_with_atomic_sequence): Likewise.
1339         (alpha_next_pc): Likewise.
1340         (alpha_software_single_step): Likewise.
1341         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1342         (amd64bsd_store_inferior_registers): Likewise.
1343         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1344         Likewise.
1345         (amd64_linux_store_inferior_registers): Likewise.
1346         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1347         (amd64_collect_native_gregset): Likewise.
1348         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1349         (amd64obsd_collect_uthread): Likewise.
1350         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1351         (amd64_collect_fpregset): Likewise.
1352         (amd64_supply_fxsave): Likewise.
1353         (amd64_supply_xsave): Likewise.
1354         (amd64_collect_fxsave): Likewise.
1355         (amd64_collect_xsave): Likewise.
1356         * arc-tdep.c (arc_write_pc): Likewise.
1357         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1358         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1359         (arm_fbsd_store_inferior_registers): Likewise.
1360         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1361         (store_vfp_regs): Likewise.
1362         (arm_linux_fetch_inferior_registers): Likewise.
1363         (arm_linux_store_inferior_registers): Likewise.
1364         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1365         (arm_linux_sigreturn_next_pc): Likewise.
1366         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1367         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1368         (fetch_register): Likewise.
1369         (store_register): Likewise.
1370         * arm-tdep.c (arm_is_thumb): Likewise.
1371         (displaced_in_arm_mode): Likewise.
1372         (bx_write_pc): Likewise.
1373         (arm_get_next_pcs_addr_bits_remove): Likewise.
1374         (arm_software_single_step): Likewise.
1375         (arm_extract_return_value): Likewise.
1376         (arm_store_return_value): Likewise.
1377         (arm_write_pc): Likewise.
1378         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1379         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1380         (bsd_uthread_store_registers): Likewise.
1381         * core-regset.c (fetch_core_registers): Likewise.
1382         * corelow.c (get_core_registers): Likewise.
1383         * cris-tdep.c (cris_store_return_value): Likewise.
1384         (cris_extract_return_value): Likewise.
1385         (find_step_target): Likewise.
1386         (find_step_target): Likewise.
1387         (cris_software_single_step): Likewise.
1388         * ctf.c (ctf_fetch_registers): Likewise.
1389         * darwin-nat.c (cancel_breakpoint): Likewise.
1390         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1391         * frv-tdep.c (frv_extract_return_value): Likewise.
1392         * ft32-tdep.c (ft32_store_return_value): Likewise.
1393         (ft32_extract_return_value): Likewise.
1394         * go32-nat.c (fetch_register): Likewise.
1395         (go32_fetch_registers): Likewise.
1396         (go32_store_registers): Likewise.
1397         (store_register): Likewise.
1398         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1399         (h8300_store_return_value): Likewise.
1400         * hppa-linux-nat.c (fetch_register): Likewise.
1401         (store_register): Likewise.
1402         (hppa_linux_fetch_inferior_registers): Likewise.
1403         (hppa_linux_store_inferior_registers): Likewise.
1404         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1405         (i386_darwin_store_inferior_registers): Likewise.
1406         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1407         (gnu_store_registers): Likewise.
1408         * i386-linux-nat.c (fetch_register): Likewise.
1409         (store_register): Likewise.
1410         (supply_gregset): Likewise.
1411         (fill_gregset): Likewise.
1412         (i386_linux_fetch_inferior_registers): Likewise.
1413         (i386_linux_store_inferior_registers): Likewise.
1414         (i386_linux_resume): Likewise.
1415         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1416         Likewise.
1417         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1418         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1419         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1420         (i386obsd_collect_uthread): Likewise.
1421         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1422         (i386_supply_gregset): Likewise.
1423         (i386_collect_gregset): Likewise.
1424         (i386_supply_fpregset): Likewise.
1425         (i386_collect_fpregset): Likewise.
1426         (i386_mpx_bd_base): Likewise.
1427         * i386-v4-nat.c (supply_fpregset): Likewise.
1428         (fill_fpregset): Likewise.
1429         * i387-tdep.c (i387_supply_fsave): Likewise.
1430         (i387_collect_fsave): Likewise.
1431         (i387_supply_fxsave): Likewise.
1432         (i387_collect_fxsave): Likewise.
1433         (i387_supply_xsave): Likewise.
1434         (i387_collect_xsave): Likewise.
1435         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1436         (ia64_linux_store_registers): Likewise.
1437         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1438         (ia64_extract_return_value): Likewise.
1439         (ia64_store_return_value): Likewise.
1440         (find_func_descr): Likewise.
1441         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1442         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1443         (inf_ptrace_store_registers): Likewise.
1444         * infrun.c (use_displaced_stepping): Likewise.
1445         (displaced_step_prepare_throw): Likewise.
1446         (resume): Likewise.
1447         (proceed): Likewise.
1448         (do_target_wait): Likewise.
1449         (adjust_pc_after_break): Likewise.
1450         (handle_inferior_event_1): Likewise.
1451         (handle_signal_stop): Likewise.
1452         (save_infcall_suspend_state): Likewise.
1453         (restore_infcall_suspend_state): Likewise.
1454         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1455         * jit.c (jit_frame_prev_register): Likewise.
1456         * linux-nat.c (save_stop_reason): Likewise.
1457         (linux_nat_wait_1): Likewise.
1458         (resume_stopped_resumed_lwps): Likewise.
1459         * linux-record.c (record_linux_sockaddr): Likewise.
1460         (record_linux_msghdr): Likewise.
1461         (record_linux_system_call): Likewise.
1462         * linux-tdep.c (linux_collect_thread_registers): Likewise.
1463         * lm32-tdep.c (lm32_extract_return_value): Likewise.
1464         (lm32_store_return_value): Likewise.
1465         * m32c-tdep.c (m32c_read_flg): Likewise.
1466         (m32c_pseudo_register_read): Likewise.
1467         (m32c_pseudo_register_write): Likewise.
1468         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1469         (m32r_linux_collect_gregset): Likewise.
1470         * m32r-tdep.c (m32r_store_return_value): Likewise.
1471         (m32r_extract_return_value): Likewise.
1472         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1473         (m68kbsd_collect_fpregset): Likewise.
1474         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1475         * m68k-linux-nat.c (fetch_register): Likewise.
1476         (old_fetch_inferior_registers): Likewise.
1477         (old_store_inferior_registers): Likewise.
1478         (store_regs): Likewise.
1479         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1480         (m68k_svr4_store_return_value): Likewise.
1481         * m88k-tdep.c (m88k_store_arguments): Likewise.
1482         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1483         (mi_cmd_data_write_register_values): Likewise.
1484         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1485         (mips_fbsd_store_inferior_registers): Likewise.
1486         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1487         (mips_fbsd_supply_gregs): Likewise.
1488         (mips_fbsd_collect_fpregs): Likewise.
1489         (mips_fbsd_collect_gregs): Likewise.
1490         (mips_fbsd_supply_fpregset): Likewise.
1491         (mips_fbsd_collect_fpregset): Likewise.
1492         (mips_fbsd_supply_gregset): Likewise.
1493         (mips_fbsd_collect_gregset): Likewise.
1494         * mips-linux-nat.c (supply_gregset): Likewise.
1495         (fill_gregset): Likewise.
1496         (supply_fpregset): Likewise.
1497         (fill_fpregset): Likewise.
1498         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1499         (mips_fill_gregset): Likewise.
1500         (mips_supply_fpregset): Likewise.
1501         (mips_fill_fpregset): Likewise.
1502         (mips64_supply_gregset): Likewise.
1503         (micromips_linux_sigframe_validate): Likewise.
1504         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1505         (mipsnbsd_fetch_inferior_registers): Likewise.
1506         (mipsnbsd_store_inferior_registers): Likewise.
1507         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1508         (mipsnbsd_supply_gregset): Likewise.
1509         (mipsnbsd_iterate_over_regset_sections): Likewise.
1510         (mipsnbsd_supply_reg): Likewise.
1511         (mipsnbsd_supply_fpreg): Likewise.
1512         * mips-tdep.c (mips_in_frame_stub): Likewise.
1513         (mips_dummy_id): Likewise.
1514         (is_octeon_bbit_op): Likewise.
1515         (micromips_bc1_pc): Likewise.
1516         (extended_mips16_next_pc): Likewise.
1517         (mips16_next_pc): Likewise.
1518         (deal_with_atomic_sequence): Likewise.
1519         * moxie-tdep.c (moxie_process_readu): Likewise.
1520         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1521         * nto-procfs.c (procfs_store_registers): Likewise.
1522         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1523         (ppcfbsd_store_inferior_registers): Likewise.
1524         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1525         (fetch_altivec_register): Likewise.
1526         (get_spe_registers): Likewise.
1527         (fetch_spe_register): Likewise.
1528         (fetch_altivec_registers): Likewise.
1529         (fetch_all_gp_regs): Likewise.
1530         (fetch_all_fp_regs): Likewise.
1531         (store_vsx_register): Likewise.
1532         (store_altivec_register): Likewise.
1533         (set_spe_registers): Likewise.
1534         (store_spe_register): Likewise.
1535         (store_altivec_registers): Likewise.
1536         (store_all_gp_regs): Likewise.
1537         (store_all_fp_regs): Likewise.
1538         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1539         (ppc_linux_collect_gregset): Likewise.
1540         (ppc_canonicalize_syscall): Likewise.
1541         (ppc_linux_record_signal): Likewise.
1542         (ppu2spu_prev_register): Likewise.
1543         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1544         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1545         (ppcobsd_store_registers): Likewise.
1546         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1547         Likewise.
1548         (ppc_ravenscar_generic_store_registers): Likewise.
1549         * procfs.c (procfs_fetch_registers): Likewise.
1550         (procfs_store_registers): Likewise.
1551         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1552         (ravenscar_store_registers): Likewise.
1553         (ravenscar_prepare_to_store): Likewise.
1554         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1555         * record-full.c (record_full_wait_1): Likewise.
1556         (record_full_registers_change): Likewise.
1557         (record_full_store_registers): Likewise.
1558         (record_full_core_fetch_registers): Likewise.
1559         (record_full_save): Likewise.
1560         (record_full_goto_insn): Likewise.
1561         * regcache.c (regcache_register_size): Likewise.
1562         (get_regcache_arch): Remove.
1563         (regcache_read_pc): Likewise.
1564         * regcache.h (get_regcache_arch): Remove.
1565         * remote-sim.c (gdbsim_fetch_register): Likewise.
1566         (gdbsim_store_register): Likewise.
1567         * remote.c (fetch_register_using_p): Likewise.
1568         (send_g_packet): Likewise.
1569         (remote_prepare_to_store): Likewise.
1570         (store_registers_using_G): Likewise.
1571         * reverse.c (save_bookmark_command): Likewise.
1572         (goto_bookmark_command): Likewise.
1573         * rs6000-aix-tdep.c (branch_dest): Likewise.
1574         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1575         (fetch_register): Likewise.
1576         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1577         (ppc_collect_reg): Likewise.
1578         (ppc_collect_gregset): Likewise.
1579         (ppc_collect_fpregset): Likewise.
1580         (ppc_collect_vsxregset): Likewise.
1581         (ppc_collect_vrregset): Likewise.
1582         (ppc_displaced_step_hw_singlestep): Likewise.
1583         (rs6000_pseudo_register_read): Likewise.
1584         (rs6000_pseudo_register_write): Likewise.
1585         * s390-linux-nat.c (supply_gregset): Likewise.
1586         (fill_gregset): Likewise.
1587         (s390_linux_fetch_inferior_registers): Likewise.
1588         * s390-linux-tdep.c (s390_write_pc): Likewise.
1589         (s390_software_single_step): Likewise.
1590         (s390_all_but_pc_registers_record): Likewise.
1591         (s390_linux_syscall_record): Likewise.
1592         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1593         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1594         (shnbsd_store_inferior_registers): Likewise.
1595         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1596         (sh_extract_return_value_fpu): Likewise.
1597         (sh_store_return_value_nofpu): Likewise.
1598         (sh_corefile_supply_regset): Likewise.
1599         (sh_corefile_collect_regset): Likewise.
1600         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1601         (sh64_store_return_value): Likewise.
1602         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1603         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1604         (sparc_store_inferior_registers): Likewise.
1605         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1606         (sparc_ravenscar_prepare_to_store): Likewise.
1607         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1608         (sparc_analyze_control_transfer): Likewise.
1609         (sparc_step_trap): Likewise.
1610         (sparc_software_single_step): Likewise.
1611         (sparc32_gdbarch_init): Likewise.
1612         (sparc_supply_rwindow): Likewise.
1613         (sparc_collect_rwindow): Likewise.
1614         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1615         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1616         (sparc64nbsd_collect_gregset): Likewise.
1617         (sparc64nbsd_supply_fpregset): Likewise.
1618         (sparc64nbsd_collect_fpregset): Likewise.
1619         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1620         (sparc64_supply_gregset): Likewise.
1621         (sparc64_collect_gregset): Likewise.
1622         (sparc64_supply_fpregset): Likewise.
1623         (sparc64_collect_fpregset): Likewise.
1624         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1625         * spu-tdep.c (spu_unwind_sp): Likewise.
1626         (spu2ppu_prev_register): Likewise.
1627         (spu_memory_remove_breakpoint): Likewise.
1628         * stack.c (return_command): Likewise.
1629         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1630         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1631         * tracefile.c (trace_save_ctf): Likewise.
1632         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1633         (do_windows_store_inferior_registers): Likewise.
1634         (windows_resume): Likewise.
1635         * xtensa-linux-nat.c (fill_gregset): Likewise.
1636         (supply_gregset_reg): Likewise.
1637         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1638         (xtensa_register_read_masked): Likewise.
1639         (xtensa_supply_gregset): Likewise.
1640         (xtensa_extract_return_value): Likewise.
1641         (xtensa_store_return_value): Likewise.
1642
1643 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1644
1645         * doublest.c (floatformat_from_string): New function.
1646         * doublest.h (floatformat_from_string): Add prototype.
1647
1648         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1649         (OP_FLOAT): ... this.
1650         * expression.h: Do not include "doublest.h".
1651         (union exp_element): Replace doubleconst and decfloatconst by
1652         new element floatconst.
1653         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1654         (ada_evaluate_subexp): Likewise.
1655         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1656         OP_DOUBLE and OP_DECFLOAT.
1657         * expprint.c (print_subexp_standard): Likewise.
1658         (dump_subexp_body_standard): Likewise.
1659         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1660
1661         * parse.c: Include "dfp.h".
1662         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1663         (write_exp_elt_floatcst): New function.
1664         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1665         and OP_DECFLOAT.
1666         (operator_check_standard): Likewise.
1667         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1668         Return target format buffer instead of host DOUBLEST.
1669         Use floatformat_from_string and decimal_from_string to parse
1670         either binary or decimal floating-point types.
1671         (parse_c_float): Remove.
1672         * parser-defs.h: Do not include "doublest.h".
1673         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1674         (write_exp_elt_floatcst): Add prototype.
1675         (parse_float): Update prototype.
1676         (parse_c_float): Remove.
1677
1678         * c-exp.y: Do not include "dfp.h".
1679         (typed_val_float): Use byte buffer instead of DOUBLEST.
1680         (typed_val_decfloat): Remove.
1681         (DECFLOAT): Remove.
1682         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1683         (parse_number): Update to new parse_float interface.
1684         Parse suffixes and determine type before calling parse_float.
1685         Handle decimal and binary FP types the same way.
1686
1687         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1688         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1689         (parse_number): Update to new parse_float interface.
1690         Parse suffixes and determine type before calling parse_float.
1691
1692         * f-exp.y: Replace dval by typed_val_float.
1693         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1694         (parse_number): Use parse_float instead of atof.
1695
1696         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1697         (parse_go_float): Remove.
1698         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1699         (parse_number): Call parse_float instead of parse_go_float.
1700         Parse suffixes and determine type before calling parse_float.
1701
1702         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1703         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1704         (parse_number): Update to new parse_float interface.
1705         Parse suffixes and determine type before calling parse_float.
1706
1707         * m2-exp.y: Replace dval by byte buffer val.
1708         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1709         (parse_number): Call parse_float instead of atof.
1710
1711         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1712         (lex_number): Call parse_float instead of strtod.
1713         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1714         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1715         Use write_exp_elt_floatcst.
1716         (unit_testing): Remove static variable.
1717         (rust_type): Do not check unit_testing.
1718         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1719
1720         * ada-exp.y (type_float, type_double): Remove.
1721         (typed_val_float): Use byte buffer instead of DOUBLEST.
1722         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1723         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1724
1725 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1726
1727         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1728         * arch/aarch64.h: New file.
1729
1730 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1731
1732         * dfp.h (decimal_from_string): Use const reference for argument.
1733         * dfp.c (decimal_from_string): Likewise.
1734
1735 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1736
1737         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1738         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1739         * mips-tdep.c (mips_print_fp_register): Likewise.
1740
1741 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1742
1743         * common/format.h (enum argclass): Replace decfloat_arg by
1744         dec32float_arg, dec64float_arg, and dec128float_arg.
1745         * common/format.c (parse_format_string): Update to return
1746         new decimal float argument classes.
1747
1748         * printcmd.c (printf_decfloat): Rename to ...
1749         (printf_floating): ... this.  Add argclass argument, and use it
1750         instead of parsing the format string again.  Add support for
1751         binary floating-point values, using floatformat_to_string.
1752         Convert value to the target format if it doesn't already match.
1753         (ui_printf): Call printf_floating instead of printf_decfloat,
1754         also for double_arg / long_double_arg.  Pass argclass.
1755
1756         * dfp.c (decimal_to_string): Add format string argument.
1757         * dfp.h (decimal_to_string): Likewise.
1758
1759         * doublest.c (floatformat_to_string): Add format string argument.
1760         * doublest.h (floatformat_to_string): Likewise.
1761
1762 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1763
1764         * doublest.c (floatformat_precision): New routine.
1765         (floatformat_to_string): Likewise.
1766         * doublest.c (floatformat_to_string): Add prototype.
1767
1768         * printcmd.c (print_scalar_formatted): Only call print_floating
1769         on floating-point types.
1770         * valprint.c: Do not include "floatformat.h".
1771         (generic_val_print_decfloat): Remove.
1772         (generic_val_print): Call generic_val_print_float for both
1773         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1774         (print_floating): Use floatformat_to_string.  Handle decimal float.
1775         (print_decimal_floating): Remove, merge into floatformat_to_string.
1776         * value.h (print_decimal_floating): Remove.
1777
1778         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1779
1780 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1781
1782         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1783
1784 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1785
1786         * memattr.h: Don't include vec.h.
1787         (struct mem_attrib): Initialize fields.
1788         <unknown>: New static method.
1789         (struct mem_region): Add constructors, operator<, initialize
1790         fields.
1791         * memattr.c: Include algorithm.
1792         (default_mem_attrib, unknown_mem_attrib): Remove.
1793         (user_mem_region_list): New global.
1794         (target_mem_region_list, mem_region_list): Change type to
1795         std::vector<mem_region>.
1796         (mem_use_target): Now a function.
1797         (target_mem_regions_valid): Change type to bool.
1798         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1799         (require_user_regions): Adjust.
1800         (require_target_regions): Adjust.
1801         (create_mem_region): Adjust.
1802         (lookup_mem_region): Adjust.
1803         (invalidate_target_mem_regions): Adjust.
1804         (mem_clear): Rename to...
1805         (user_mem_clear): ... this, and adjust.
1806         (mem_command): Adjust.
1807         (info_mem_command): Adjust.
1808         (mem_enable, enable_mem_command, mem_disable,
1809         disable_mem_command): Adjust.
1810         (mem_delete): Adjust.
1811         (delete_mem_command): Adjust.
1812         * memory-map.h (parse_memory_map): Return an std::vector.
1813         * memory-map.c (parse_memory_map): Likewise.
1814         (struct memory_map_parsing_data): Add constructor.
1815         <memory_map>: Point to std::vector.
1816         (memory_map_start_memory): Adjust.
1817         (memory_map_end_memory): Adjust.
1818         (memory_map_end_property): Adjust.
1819         (clear_result): Remove.
1820         * remote.c (remote_memory_map): Return an std::vector.
1821         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1822         Remove.
1823         (target_debug_print_mem_region_vector): New.
1824         * target-delegates.c: Regenerate.
1825         * target.h (mem_region_vector): New typedef.
1826         (to_memory_map): Return mem_region_vector.
1827         (target_memory_map): Return an std::vector.
1828         * target.c (target_memory_map): Return an std::vector.
1829         (flash_erase_command): Adjust.
1830
1831 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1832
1833         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1834         Change type to std::string.
1835         (memory_map_start_property): Adjust.
1836         (memory_map_end_property): Adjust.
1837
1838 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1839
1840         * infrun.h: Include common/byte-vector.h.
1841         (struct displaced_step_closure): New struct.
1842         (struct buf_displaced_step_closure): New struct.
1843         * infrun.c (displaced_step_closure::~displaced_step_closure):
1844         Provide default implementation.
1845         (displaced_step_clear): Deallocate step closure with delete.
1846         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1847         (aarch64_displaced_step_closure): ... this, extend
1848         displaced_step_closure.
1849         (aarch64_displaced_step_data) <dsc>: Change type to
1850         aarch64_displaced_step_closure.
1851         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1852         unique_ptr.
1853         (aarch64_displaced_step_fixup): Add cast for displaced step
1854         closure.
1855         * amd64-tdep.c (displaced_step_closure): Rename to ...
1856         (amd64_displaced_step_closure): ... this, extend
1857         displaced_step_closure.
1858         <insn_buf>: Change type to std::vector<gdb_byte>.
1859         <max_len>: Remove.
1860         (fixup_riprel): Change type of DSC parameter, adjust to type
1861         change of insn_buf.
1862         (fixup_displaced_copy): Change type of DSC parameter.
1863         (amd64_displaced_step_copy_insn): Instantiate
1864         amd64_displaced_step_closure.
1865         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1866         to type change of insn_buf.
1867         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1868         parameter DSC.
1869         (arm_linux_copy_svc): Likewise.
1870         (cleanup_kernel_helper_return): Likewise.
1871         (arm_catch_kernel_helper_return): Likewise.
1872         (arm_linux_displaced_step_copy_insn): Instantiate
1873         arm_displaced_step_closure.
1874         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1875         (displaced_read_reg): Change type of parameter DSC.
1876         (branch_write_pc): Likewise.
1877         (load_write_pc): Likewise.
1878         (alu_write_pc): Likewise.
1879         (displaced_write_reg): Likewise.
1880         (arm_copy_unmodified): Likewise.
1881         (thumb_copy_unmodified_32bit): Likewise.
1882         (thumb_copy_unmodified_16bit): Likewise.
1883         (cleanup_preload): Likewise.
1884         (install_preload): Likewise.
1885         (arm_copy_preload): Likewise.
1886         (thumb2_copy_preload): Likewise.
1887         (install_preload_reg): Likewise.
1888         (arm_copy_preload_reg): Likewise.
1889         (cleanup_copro_load_store): Likewise.
1890         (install_copro_load_store): Likewise.
1891         (arm_copy_copro_load_store) Likewise.
1892         (thumb2_copy_copro_load_store): Likewise.
1893         (cleanup_branch): Likewise.
1894         (install_b_bl_blx): Likewise.
1895         (arm_copy_b_bl_blx): Likewise.
1896         (thumb2_copy_b_bl_blx): Likewise.
1897         (thumb_copy_b): Likewise.
1898         (install_bx_blx_reg): Likewise.
1899         (arm_copy_bx_blx_reg): Likewise.
1900         (thumb_copy_bx_blx_reg): Likewise.
1901         (cleanup_alu_imm): Likewise.
1902         (arm_copy_alu_imm): Likewise.
1903         (thumb2_copy_alu_imm): Likewise.
1904         (cleanup_alu_reg): Likewise.
1905         (install_alu_reg): Likewise.
1906         (arm_copy_alu_reg): Likewise.
1907         (thumb_copy_alu_reg): Likewise.
1908         (cleanup_alu_shifted_reg): Likewise.
1909         (install_alu_shifted_reg): Likewise.
1910         (arm_copy_alu_shifted_reg): Likewise.
1911         (cleanup_load): Likewise.
1912         (cleanup_store): Likewise.
1913         (arm_copy_extra_ld_st): Likewise.
1914         (install_load_store): Likewise.
1915         (thumb2_copy_load_literal): Likewise.
1916         (thumb2_copy_load_reg_imm): Likewise.
1917         (arm_copy_ldr_str_ldrb_strb): Likewise.
1918         (cleanup_block_load_all): Likewise.
1919         (cleanup_block_store_pc): Likewise.
1920         (cleanup_block_load_pc): Likewise.
1921         (arm_copy_block_xfer): Likewise.
1922         (thumb2_copy_block_xfer): Likewise.
1923         (cleanup_svc): Likewise.
1924         (install_svc): Likewise.
1925         (arm_copy_svc): Likewise.
1926         (thumb_copy_svc): Likewise.
1927         (arm_copy_undef): Likewise.
1928         (thumb_32bit_copy_undef): Likewise.
1929         (arm_copy_unpred): Likewise.
1930         (arm_decode_misc_memhint_neon): Likewise.
1931         (arm_decode_unconditional): Likewise.
1932         (arm_decode_miscellaneous): Likewise.
1933         (arm_decode_dp_misc): Likewise.
1934         (arm_decode_ld_st_word_ubyte): Likewise.
1935         (arm_decode_media): Likewise.
1936         (arm_decode_b_bl_ldmstm): Likewise.
1937         (arm_decode_ext_reg_ld_st): Likewise.
1938         (thumb2_decode_dp_shift_reg): Likewise.
1939         (thumb2_decode_ext_reg_ld_st): Likewise.
1940         (arm_decode_svc_copro): Likewise.
1941         (thumb2_decode_svc_copro): Likewise.
1942         (install_pc_relative): Likewise.
1943         (thumb_copy_pc_relative_16bit): Likewise.
1944         (thumb_decode_pc_relative_16bit): Likewise.
1945         (thumb_copy_pc_relative_32bit): Likewise.
1946         (thumb_copy_16bit_ldr_literal): Likewise.
1947         (thumb_copy_cbnz_cbz): Likewise.
1948         (thumb2_copy_table_branch): Likewise.
1949         (cleanup_pop_pc_16bit_all): Likewise.
1950         (thumb_copy_pop_pc_16bit): Likewise.
1951         (thumb_process_displaced_16bit_insn): Likewise.
1952         (decode_thumb_32bit_ld_mem_hints): Likewise.
1953         (thumb_process_displaced_32bit_insn): Likewise.
1954         (thumb_process_displaced_insn): Likewise.
1955         (arm_process_displaced_insn): Likewise.
1956         (arm_displaced_init_closure): Likewise.
1957         (arm_displaced_step_fixup): Add cast for closure.
1958         * arm-tdep.h: Include infrun.h.
1959         (displaced_step_closure): Rename to ...
1960         (arm_displaced_step_closure): ... this, extend
1961         displaced_step_closure.
1962         <u::svc::copy_svc_os>: Change type of parameter DSC.
1963         <cleanup>: Likewise.
1964         (arm_process_displaced_insn): Likewise.
1965         (arm_displaced_init_closure): Likewise.
1966         (displaced_read_reg): Likewise.
1967         (displaced_write_reg): Likewise.
1968         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1969         Adjust.
1970         * i386-tdep.h: Include infrun.h.
1971         (i386_displaced_step_closure): New typedef.
1972         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1973         i386_displaced_step_closure.
1974         (i386_displaced_step_fixup): Adjust.
1975         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1976         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1977         and unique_ptr.
1978         (ppc_displaced_step_fixup): Adjust.
1979         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1980         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1981         and unique_ptr.
1982         (s390_displaced_step_fixup): Adjust.
1983
1984 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1985
1986         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1987         Remove declarations.
1988
1989 2017-10-20  Tom Tromey  <tom@tromey.com>
1990
1991         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1992         std::vector.
1993         (gdb_bfd_record_inclusion): Update.
1994         (bfdp): Remove typedef.
1995
1996 2017-10-20  Tom Tromey  <tom@tromey.com>
1997
1998         * gdb_bfd.c (gdb_bfd_ref): Use new.
1999         (struct gdb_bfd_data): Add constructor, destructor, and member
2000         initializers.
2001         (gdb_bfd_unref): Use delete.
2002
2003 2017-10-20  Tom Tromey  <tom@tromey.com>
2004
2005         * exec.c (exec_file_attach): Use new_bfd_ref.
2006         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2007         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2008         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2009         new_bfd_ref.
2010         * gdb_bfd.h (new_bfd_ref): New function.
2011
2012 2017-10-20  Pedro Alves  <palves@redhat.com>
2013
2014         * main.c (captured_command_loop): Add attribute noinline.
2015
2016 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2017
2018         * interps.c (struct interp_factory): Add constructor.
2019         (interp_factory_p): Remove typedef.
2020         (DEF_VEC_P(interp_factory_p)): Remove.
2021         (interpreter_factories): Change type to std::vector.
2022         (interp_factory_register): Adjust.
2023         (interp_lookup): Adjust.
2024         (interpreter_completer): Adjust.
2025
2026 2017-10-19  Tom Tromey  <tom@tromey.com>
2027
2028         * break-catch-syscall.c (catch_syscall_completer): Use
2029         std::string, gdb::unique_xmalloc_ptr.
2030
2031 2017-10-19  Tom Tromey  <tom@tromey.com>
2032
2033         * infcall.c (call_function_by_hand_dummy): Use std::string.
2034
2035 2017-10-19  Tom Tromey  <tom@tromey.com>
2036
2037         * mi/mi-main.c (mi_cmd_execute): Update.
2038         * top.h (prepare_execute_command): Return scoped_value_mark.
2039         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2040         Add move constructor.
2041         * top.c (prepare_execute_command): Return scoped_value_mark.
2042         (execute_command): Update.
2043
2044 2017-10-19  Pedro Alves  <palves@redhat.com>
2045
2046         * xml-support.c (xml_fetch_content_from_file): Check fread's
2047         return.
2048
2049 2017-10-19  Pedro Alves  <palves@redhat.com>
2050
2051         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2052         async.
2053         (handle_error_fd): New function.
2054         (ser_base_async): Add/delete an event loop file handler for
2055         error_fd.
2056
2057 2017-10-19  Pedro Alves  <palves@redhat.com>
2058
2059         * xml-support.c (xml_fetch_content_from_file): Don't read in
2060         chunks.  Instead use fseek to determine the file's size, and read
2061         it in one go.
2062
2063 2017-11-18  Keith Seitz  <keiths@redhat.com>
2064
2065         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2066         types.
2067         Add whitespace to front of type name.
2068
2069 2017-10-18  Keith Seitz  <keiths@redhat.com>
2070
2071         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2072         DW_AT_accessibility.
2073
2074 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2075
2076         * features/tic6x-c62x-linux.c: Remove.
2077
2078 2017-10-17  Tom Tromey  <tom@tromey.com>
2079
2080         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2081         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2082         (do_mixed_source_and_assembly): Likewise.
2083
2084 2017-10-17  Tom Tromey  <tom@tromey.com>
2085
2086         * regcache.c (regcache::xfer_part): Remove assertion.
2087
2088 2017-10-17  Pedro Alves  <palves@redhat.com>
2089
2090         * xml-support.c (xml_fetch_content_from_file): Call
2091         unique_ptr::release() instead unique_ptr::get() when passing
2092         through xrealloc.
2093
2094 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2095
2096         * regcache.c (regcache::xfer_part): Remove parameters read and
2097         write, add parameter is_raw.  All callers are updated.
2098
2099 2017-10-16  Keith Seitz  <keiths@redhat.com>
2100
2101         * c-typeprint.c (enum access_specifier): Moved here from
2102         c_type_print_base.
2103         (output_access_specifier): New function.
2104         (c_type_print_base): Consider typedefs when assessing
2105         whether access labels are needed.
2106         Use output_access_specifier as needed.
2107         Output access specifier for typedefs, if needed.
2108         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2109         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2110         fields.
2111         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2112         accessor macros.
2113
2114 2017-10-16  Tom Tromey  <tom@tromey.com>
2115
2116         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2117         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2118         * target.c (target_fileio_read_stralloc): Update.
2119         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2120         * target.h (target_fileio_read_stralloc): Return
2121         unique_xmalloc_ptr.
2122
2123 2017-10-16  Tom Tromey  <tom@tromey.com>
2124
2125         * xml-syscall.c (xml_init_syscalls_info): Update.
2126         * xml-support.c (xinclude_start_include): Update.
2127         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2128         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2129         (xml_fetch_content_from_file): Likewise.
2130         * osdata.c (get_osdata): Update.
2131         * target.h (target_read_stralloc, target_get_osdata): Return
2132         unique_xmalloc_ptr.
2133         * solib-aix.c (solib_aix_get_library_list): Update.
2134         * solib-target.c (solib_target_current_sos): Update.
2135         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2136         * xml-tdesc.c (fetch_available_features_from_target): Update.
2137         (target_fetch_description_xml): Update.
2138         (file_read_description_xml): Update.
2139         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2140         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2141         (remote_pid_to_exec_file): Update.
2142         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2143         (target_get_osdata): Likewise.
2144
2145 2017-10-16  Tom Tromey  <tom@tromey.com>
2146
2147         * remote.c (remote_register_number_and_offset): Use std::vector.
2148         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2149         (putpkt_binary): Use gdb::def_vector.
2150         (compare_sections_command): Use gdb::byte_vector.
2151
2152 2017-10-16  Tom Tromey  <tom@tromey.com>
2153
2154         * ppc-linux-nat.c (hwdebug_insert_point): Use
2155         gdb::unique_xmalloc_ptr, XDUP.
2156
2157 2017-10-16  Tom Tromey  <tom@tromey.com>
2158
2159         * probe.c (parse_probes): Use std::string.
2160         (info_probes_for_ops, enable_probes_command)
2161         (disable_probes_command): Remove cleanups.
2162
2163 2017-10-16  Tom Tromey  <tom@tromey.com>
2164
2165         * buildsym.c (block_compar): Remove.
2166         (end_symtab_get_static_block): Use std::vector.
2167
2168 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2169
2170         * memrange.h (struct mem_range): Define operator< and operator==.
2171         (mem_range_s): Remove.
2172         (DEF_VEC_O (mem_range_s)): Remove.
2173         (normalize_mem_ranges): Change parameter type to std::vector.
2174         * memrange.c (compare_mem_ranges): Remove.
2175         (normalize_mem_ranges): Change parameter type to std::vector,
2176         adjust to vector change.
2177         * exec.c (section_table_available_memory): Return vector, remove
2178         parameter.
2179         (section_table_read_available_memory): Adjust to std::vector
2180         change.
2181         * remote.c (remote_read_bytes): Adjust to std::vector
2182         change.
2183         * tracepoint.h (traceframe_available_memory): Change parameter
2184         type to std::vector.
2185         * tracepoint.c (traceframe_available_memory): Change parameter
2186         type to std::vector, adjust.
2187         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2188         std::vector change.
2189         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2190         unittests/memrange-selftests.c.
2191         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2192         * gdb/unittests/memrange-selftests.c: New file.
2193
2194 2017-10-16  Pedro Alves  <palves@redhat.com>
2195
2196         * elfread.c (probe_key_free): Rename range-for variable.
2197         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2198         (find_probe_by_pc, collect_probes): Rename range-for variable.
2199
2200 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2201
2202         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2203         * features/tic6x-c62x.c: Remove.
2204         * features/tic6x-c64x-linux.c: Remove.
2205         * features/tic6x-c64x.c: Remove.
2206         * features/tic6x-c64xp-linux.c: Remove.
2207         * features/tic6x-c64xp.c: Remove.
2208         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2209         initialize_tdesc_tic6x_*_linux functions.
2210         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2211         initialize_tdesc_tic6x_* functions.
2212
2213 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2214
2215         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2216         tic6x-c62x.
2217         * regformats/tic6x-c62x.dat: Remove.
2218         * regformats/tic6x-c64x.dat: Remove.
2219         * regformats/tic6x-c64xp.dat: Remove.
2220
2221 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2222
2223         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2224         (the !HAVE_LIBEXPAT version).
2225
2226 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2227
2228         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2229         const.
2230
2231 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2232
2233         * target.h: Include tracepoint.h.
2234         (enum trace_find_type): Move to tracepoint.h.
2235         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2236         * tracepoint.h: Don't include target.h
2237         (enum trace_find_type): Move from target.h.
2238         (parse_traceframe_info): Return a unique ptr.
2239         * tracepoint.c (current_traceframe_info): Change type to unique
2240         ptr.
2241         (free_traceframe_info): Remove.
2242         (clear_traceframe_info): Don't manually free
2243         current_traceframe_info.
2244         (free_result): Remove.
2245         (parse_traceframe_info): Return a unique ptr.
2246         (get_traceframe_info): Adjust to unique ptr.
2247         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2248         * remote.c (remote_traceframe_info): Return a unique ptr.
2249         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2250         ptr.
2251         * target-debug.h (target_debug_print_traceframe_info_up): New
2252         macro.
2253         * target-delegates.c: Regenerate.
2254
2255 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2256
2257         * memrange.h (struct mem_range): Add constructors.
2258         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2259         std::vector<mem_range>.
2260         * tracepoint.c (free_traceframe_info): Don't manually free
2261         vector.
2262         (traceframe_info_start_memory): Adjust to vector change.
2263         (traceframe_available_memory): Likewise.
2264         * tracefile-tfile.c (build_traceframe_info): Likewise.
2265         * ctf.c (ctf_traceframe_info): Likewise.
2266
2267 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2268
2269         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2270         std::vector<int>.
2271         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2272         (traceframe_info_start_tvar): Adjust to vector change.
2273         (parse_traceframe_info): Allocate with new.
2274         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2275         vector change.
2276         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2277         change.
2278         tfile_traceframe_info): Allocate with new.
2279         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2280         change.
2281
2282 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2283
2284         * tracepoint.c (traceframe_info): Rename to...
2285         (current_traceframe_info): ...this.
2286         (clear_traceframe_info): Adjust.
2287         (get_traceframe_info): Adjust.
2288
2289 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2290
2291         * nat/linux-osdata.c: Include algorithm.
2292         (compare_processes): Remove.
2293         (struct pid_pgid_entry): New struct.
2294         (linux_xfer_osdata_processgroups): Use std::vector instead of
2295         XNEWVEC.
2296
2297 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2298
2299         * objfiles.h: Don't include symfile.h.
2300         (struct partial_symbol): Remove forward-declaration.
2301         (struct objfile) <global_psymbols, static_psymbols>: Change type
2302         to std::vector<partial_symbol *>.
2303         * objfiles.c (objfile::objfile): Don't memset those fields.
2304         (objfile::~objfile): Don't free those fields.
2305         * psympriv.h (struct psymbol_allocation_list): Remove
2306         forward-declaration.
2307         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2308         to std::vector.
2309         (start_psymtab_common): Change parameters to std::vector.
2310         * psymtab.c: Include algorithm.
2311         (require_partial_symbols): Call shrink_to_fit.
2312         (find_pc_sect_psymbol): Adjust to vector change.
2313         (match_partial_symbol): Likewise.
2314         (lookup_partial_symbol): Likewise.
2315         (psym_relocate): Likewise.
2316         (dump_psymtab): Likewise.
2317         (recursively_search_psymtabs): Likewise.
2318         (compare_psymbols): Remove.
2319         (sort_pst_symbols): Adjust to vector change.
2320         (start_psymtab_common): Likewise.
2321         (end_psymtab_common): Likewise.
2322         (psymbol_bcache_full): De-constify return value.
2323         (add_psymbol_to_bcache): Likewise.
2324         (extend_psymbol_list): Remove.
2325         (append_psymbol_to_list): Adjust to vector change.
2326         (add_psymbol_to_list): Likewise.
2327         (init_psymbol_list): Likewise.
2328         (maintenance_info_psymtabs): Likewise.
2329         (maintenance_check_psymtabs): Likewise.
2330         * symfile.h (struct psymbol_allocation_list): Remove.
2331         * symfile.c (reread_symbols): Adjust to vector change.
2332         * dbxread.c (start_psymtab): Change type of parameters.
2333         (dbx_symfile_read): Adjust to vector change.
2334         (read_dbx_symtab): Likewise.
2335         (start_psymtab): Change type of parameters.
2336         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2337         (create_partial_symtab): Likewise.
2338         (add_partial_symbol): Likewise.
2339         (write_one_signatured_type): Likewise.
2340         (recursively_write_psymbols): Likewise.
2341         * mdebugread.c (parse_partial_symbols): Likewise.
2342         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2343         (scan_xcoff_symtab): Adjust to vector change.
2344         (xcoff_initial_scan): Likewise.
2345
2346 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2347
2348         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2349
2350 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2351
2352         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2353         Remove s390x-*-expedite, add s390x-expedite.
2354
2355 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2356
2357         * features/s390-gs-linux64.c: Regenerated.
2358         * features/s390x-gs-linux64.c: Regenerated.
2359
2360 2017-10-13  Tom Tromey  <tom@tromey.com>
2361
2362         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2363         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2364         delete.
2365         * symfile.c (symbol_file_add_with_addrs): Use new.
2366         (symbol_file_add_separate): Update comment.
2367         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2368         * jit.c (jit_object_close_impl): Use new.
2369         (jit_unregister_code): Use delete.
2370         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2371         (~objfile): Rename from free_objfile.
2372         (free_objfile_separate_debug, do_free_objfile_cleanup)
2373         (free_all_objfiles, objfile_purge_solibs): Use delete.
2374         * objfiles.h (struct objfile): Add constructor and destructor.
2375         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2376         (allocate_objfile, free_objfile): Don't declare.
2377         (struct objstats): Add initializers.
2378
2379 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2380
2381         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2382         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2383         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2384         * gdbarch.h: Regenerate.
2385         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2386         Adjust comment.
2387         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2388         (i386_displaced_step_fixup): Adjust comment.
2389         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2390
2391 2017-10-12  Tom Tromey  <tom@tromey.com>
2392
2393         * prologue-value.h (pv_area::store_would_trash): Return bool.
2394         (pv_area::find_reg): Likewise.
2395         * prologue-value.c (pv_area::store_would_trash): Return bool.
2396         (pv_area::find_reg): Likewise.
2397
2398 2017-10-12  Tom Tromey  <tom@tromey.com>
2399
2400         * s390-linux-tdep.c (s390_store, s390_load)
2401         (s390_check_for_saved, s390_analyze_prologue): Update.
2402         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2403         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2404         * prologue-value.h (class pv_area): Move from prologue-value.c.
2405         Change names of members.  Add constructor, destructor, member
2406         functions.
2407         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2408         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2409         (pv_area_fetch, pv_area_scan): Don't declare.
2410         * prologue-value.c (struct pv_area::area_entry): Now member of
2411         pv_area.
2412         (struct pv_area): Move to prologue-value.h.
2413         (pv_area::pv_area): Rename from make_pv_area.
2414         (pv_area::~pv_area): Rename from free_pv_area.
2415         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2416         (clear_entries, find_entry, overlaps, store_would_trash, store)
2417         (fetch, find_reg, scan): Now member of pv_area.
2418         Remove "area" argument.  Update.
2419         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2420         Update.
2421         * mn10300-tdep.c (push_reg, check_for_saved)
2422         (mn10300_analyze_prologue): Update.
2423         * mep-tdep.c (is_arg_spill, check_for_saved)
2424         (mep_analyze_prologue): Update.
2425         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2426         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2427         (m32c_is_struct_return, m32c_analyze_prologue): Update.
2428         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2429         Update.
2430         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2431         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2432
2433 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2434
2435         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2436         * linux-nat.c (linux_nat_delete_thread): New variable.
2437         (lwp_free): Invoke linux_nat_delete_thread if set.
2438         (linux_nat_set_delete_thread): New function.
2439         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2440         thread delete callback.
2441         * arm-linux-nat.c (arm_linux_delete_thread): New function.
2442         (_initialize_arm_linux_nat): Assign thread delete callback.
2443         * s390-linux-nat.c (s390_delete_thread): New function.
2444         (_initialize_s390_nat): Assign thread delete callback.
2445         * x86-linux-nat.c (x86_linux_add_target): Likewise.
2446         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2447         function.
2448         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2449         declaration.
2450         * nat/x86-linux.c (x86_linux_delete_thread): New function.
2451         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2452
2453 2017-10-09  Tom Tromey  <tom@tromey.com>
2454
2455         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2456         std::string.
2457         * tui/tui-layout.c (enum tui_status): Use std::string.
2458
2459 2017-10-11  Tom Tromey  <tom@tromey.com>
2460
2461         * gdbthread.h (thread_command): Constify.
2462         * inferior.h (detach_command): Constify.
2463         * top.h (set_history, show_history): Constify.
2464         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2465         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2466         * bsd-kvm.c (bsd_kvm_cmd): Constify.
2467         * printcmd.c (set_command): Constify.
2468         (non_const_set_command): New function.
2469         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2470         * breakpoint.c (enable_command, disable_command, delete_command)
2471         (catch_command, tcatch_command, set_breakpoint_cmd)
2472         (show_breakpoint_cmd): Constify.
2473         * macrocmd.c (macro_command): Constify.
2474         * infcmd.c (unset_command, kill_command, detach_command)
2475         (info_proc_cmd): Constify.
2476         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2477         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2478         (info_auto_load_cmd): Constify.
2479         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2480         (unset_tdesc_cmd): Constify.
2481         * ada-lang.c (set_ada_command, show_ada_command)
2482         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2483         * guile/guile.c (set_guile_command, show_guile_command)
2484         (info_guile_command): Constify.
2485         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2486         Constify.
2487         * skip.c (skip_command): Constify.
2488         * compile/compile.c (_initialize_compile): Constify.
2489         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2490         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2491         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2492         (maint_btrace_pt_show_cmd): Constify.
2493         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2494         Constify.
2495         * python/python.c (user_show_python, user_set_python): Constify.
2496         * mips-tdep.c (set_mips_command, show_mips_command)
2497         (set_mipsfpu_command): Constify.
2498         * record-btrace.c (cmd_record_btrace_start)
2499         (cmd_set_record_btrace, cmd_show_record_btrace)
2500         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2501         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2502         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2503         Constify.
2504         * symfile.c (overlay_command): Constify.
2505         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2506         * cli/cli-logging.c (set_logging_command, show_logging_command):
2507         Constify.
2508         * cli/cli-dump.c (dump_command, append_command)
2509         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2510         (tekhex_dump_command, binary_dump_command)
2511         (binary_append_command): Constify.
2512         * cli/cli-decode.c (struct cmd_list_element): Change type of
2513         "fun".
2514         * cli/cli-cmds.c (info_command, show_command, set_debug)
2515         (show_debug): Constify.
2516         (show_command): Add non-const overload.
2517         * top.c (set_history, show_history): Constify.
2518         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2519         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2520         * target.c (target_command): Constify.
2521         * sparc64-tdep.c (info_adi_command): Constify.
2522         * record-full.c (cmd_record_full_start): Constify.
2523         (set_record_full_command): Constify.  Fix typo.
2524         (show_record_full_command): Constify.
2525         * thread.c (thread_command, thread_apply_command): Constify.
2526         * memattr.c (dummy_cmd): Constify.
2527         * value.c (function_command): Constify.
2528         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2529         * probe.c (info_probes_command): Constify.
2530         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2531         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2532         (show_thread_cmd, set_thread_default_cmd)
2533         (show_thread_default_cmd): Constify.
2534         (check_empty): Constify.
2535         * tracepoint.c (tfind_command): Constify.
2536         * cp-support.c (maint_cplus_command): Constify.
2537         * windows-tdep.c (info_w32_command): Constify.
2538         * record.c (cmd_record_start, set_record_command)
2539         (show_record_command, info_record_command, cmd_record_goto):
2540         Constify.
2541         * ravenscar-thread.c (set_ravenscar_command)
2542         (show_ravenscar_command): Constify.
2543         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2544         Constify.
2545         (add_internal_problem_command): Remove casts.
2546         * arc-tdep.c (maintenance_print_arc_command): Constify.
2547         * valprint.c (set_print, show_print, set_print_raw)
2548         (show_print_raw): Constify.
2549         * maint.c (maintenance_command, maintenance_info_command)
2550         (maintenance_print_command, maintenance_set_cmd)
2551         (maintenance_show_cmd, set_per_command_cmd)
2552         (show_per_command_cmd, maintenance_check_command): Constify.
2553         * language.c (set_check, show_check): Constify.
2554         * typeprint.c (show_print_type, set_print_type): Constify.
2555         * go32-nat.c (go32_info_dos_command): Constify.
2556
2557 2017-10-11  Tom Tromey  <tom@tromey.com>
2558
2559         * breakpoint.c (prepare_re_set_context): Remove.
2560         (breakpoint_re_set_one): Update.  Don't use cleanups.
2561         (breakpoint_re_set): Use scoped_restore, std::string, and
2562         scoped_restore_current_language.
2563
2564 2017-10-11  Tom Tromey  <tom@tromey.com>
2565
2566         * breakpoint.c (commands_command_1): Use std::string.
2567         (cleanup_executing_breakpoints): Remove.
2568         (bpstat_do_actions_1): Use scoped_restore.
2569         (bpstat_check_watchpoint): Use std::string.
2570         (decode_static_tracepoint_spec): Likewise.
2571         (break_range_command): Likewise.
2572         (watch_command_1): Likewise.
2573         (compare_breakpoints): Change argument types.
2574         (clear_command): Use std::vector.
2575         (cleanup_executing_breakpoints): Remove.
2576         (update_global_location_list): Use unique_xmalloc_ptr.
2577         (strace_command): Remove unused declaration.
2578
2579 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2580
2581         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2582         * NEWS: Mention new FreeBSD/arm native configuration.
2583         * configure.host: Add arm*-*-freebsd*.
2584         * configure.nat: Likewise.
2585         * arm-fbsd-nat.c: New file.
2586
2587 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2588
2589         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2590         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2591         * NEWS: Mention new FreeBSD/arm target.
2592         * configure.tgt: Add arm*-*-freebsd*.
2593         * arm-fbsd-tdep.c: New file.
2594         * arm-fbsd-tdep.h: New file.
2595
2596 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2597
2598         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2599         `gdbarch_elfcore_write_linux_prpsinfo'.
2600         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2601         method.
2602         (elf_internal_linux_prpsinfo): Remove declaration.
2603         * gdbarch.h: Regenerate.
2604         * gdbarch.c: Regenerate.
2605
2606 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2607
2608         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2609         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2610
2611 2017-10-11  Pedro Alves  <palves@redhat.com>
2612
2613         * breakpoint.c (reattach_breakpoints): Delete.
2614         * breakpoint.h (reattach_breakpoints): Delete.
2615
2616 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2617
2618         * symfile.c (registered_sym_fns): Make struct, not typedef.
2619         (DEF_VEC_O (registered_sym_fns)): Remove.
2620         (symtab_fns): Change type to std::vector.
2621         (add_symtab_fns): Adjust.
2622         (find_sym_fns): Adjust.
2623
2624 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2625
2626         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2627         * arc-tdep.h (arc_arch_is_em): New function.
2628         (arc_arch_is_hs): Likewise.
2629
2630 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2631
2632         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2633         parentheses in the declaration.
2634         (macro_lookup_inclusion): Likewise.
2635         (macro_lookup_definition): Likewise.
2636         * p-lang.h (pascal_builtin_types): Likewise.
2637         * tui/tui-data.c (tui_win_list): Likewise.
2638         * tui/tui-data.h (tui_win_list): Likewise.
2639         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2640
2641 2017-10-11  Mark Rages  <markrages@gmail.com>
2642
2643         * target-memory.c (block_boundaries): Fix for block address not
2644         aligned on block size.
2645
2646 2017-10-10  Pedro Alves <palves@redhat.com>
2647             Tom Tromey  <tom@tromey.com>
2648
2649         * breakpoint.c (struct captured_breakpoint_query_args)
2650         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2651         (print_breakpoint): New.
2652         * breakpoint.h (print_breakpoint): Declare.
2653         * common/common-exceptions.h (enum return_reason): Remove
2654         references to catch_exceptions.
2655         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2656         Delete.
2657         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2658         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2659         * gdb.h: Delete.
2660         * gdbthread.h (thread_select): Declare.
2661         * mi/mi-cmd-break.c: Don't include gdb.h.
2662         (breakpoint_notify): Use print_breakpoint.
2663         * mi/mi-cmd-catch.c: Don't include gdb.h.
2664         * mi/mi-interp.c: Don't include gdb.h.
2665         (mi_print_breakpoint_for_event): New.
2666         (mi_breakpoint_created, mi_breakpoint_modified): Use
2667         mi_print_breakpoint_for_event.
2668         * mi/mi-main.c: Don't include gdb.h.
2669         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2670         thread_select instead of gdb_thread_select.
2671         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2672         of using gdb_list_thread_ids.
2673         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2674         FILEIO_ENOSYS here.
2675         (remote_fileio_request): Use TRY/CATCH instead of
2676         catch_exceptions.
2677         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2678         (symbol_file_add_from_memory_wrapper): Delete.
2679         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2680         * thread.c: Don't include gdb.h.
2681         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2682         (thread_alive): Use thread_select.
2683         (do_captured_thread_select): Delete, parts salvaged as ...
2684         (thread_select): ... this new function.
2685         (gdb_thread_select): Delete.
2686
2687 2017-10-10  Pedro Alves  <palves@redhat.com>
2688             Tom Tromey  <tom@tromey.com>
2689
2690         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2691         and reverse logic.
2692         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2693         No longer macros.  Instead ...
2694         (enum wp_check_result): They're now values of this new
2695         enumeration.
2696         (watchpoint_check): Change return type to wp_check_result and
2697         parameter type to bpstat.
2698         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2699         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2700         catch_errors.  Reverse logic of watchpoint_check call.
2701         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2702         pointer as parameter.
2703         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2704         * common/common-exceptions.c (throw_exception_sjlj): Update
2705         comments to avoid mentioning catch_errors.
2706         * exceptions.c (catch_errors): Delete.
2707         * exceptions.h: Update comments to avoid mentioning catch_errors.
2708         (catch_errors_ftype, catch_errors): Delete.
2709         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2710         (hook_stop_stub): Delete.
2711         (restore_selected_frame): Change return type to void, and
2712         parameter type to const frame_id &.
2713         (restore_infcall_control_state): Use TRY/CATCH instead of
2714         catch_errors.
2715         * main.c (captured_command_loop): Return void and remove
2716         parameter.  Remove references to catch_errors.
2717         (captured_main): Use TRY/CATCH instead of catch_errors.
2718         * objc-lang.c (objc_submethod_helper_data)
2719         (find_objc_msgcall_submethod_helper): Delete.
2720         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2721         catch_errors.
2722         * record-full.c (record_full_message): Return void.
2723         (record_full_message_args, record_full_message_wrapper): Delete.
2724         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2725         instead of catch_errors.
2726         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2727         parameter type to int.
2728         * solib-darwin.c (open_symbol_file_object): Ditto.
2729         * solib-dsbt.c (open_symbol_file_object): Ditto.
2730         * solib-frv.c (open_symbol_file_object): Ditto.
2731         * solib-svr4.c (open_symbol_file_object): Ditto.
2732         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2733         * solib.c (update_solib_list): Use TRY/CATCH instead of
2734         catch_errors.
2735         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2736         Change type.
2737         * symmisc.c (struct print_symbol_args): Remove.
2738         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2739         (print_symbol): Change type.
2740         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2741         and remove parameters.
2742         (catch_errors): New.
2743         (get_windows_debug_event): Adjust.
2744
2745 2017-10-09  Tom Tromey  <tom@tromey.com>
2746
2747         * mi/mi-main.c (free_splay_tree): Remove.
2748         (list_available_thread_groups): Use splay_tree_up.
2749         * common/gdb_splay_tree.h: New file.
2750
2751 2017-10-09  Tom Tromey  <tom@tromey.com>
2752
2753         * mi/mi-main.c (do_nothing): Remove.
2754         (list_available_thread_groups): Update.
2755
2756 2017-10-09  Pedro Alves  <palves@redhat.com>
2757
2758         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2759         reading registers when switching context.
2760
2761 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2762
2763         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2764         (fbsd_convert_siginfo): Likewise.
2765         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2766
2767 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2768
2769         * configure.ac (try_guile_versions): Remove guile-2.2.
2770         * configure: Regenerate.
2771
2772 2017-10-09  Tom Tromey  <tom@tromey.com>
2773
2774         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2775         (COMPILE.pre): Use $(CXX).
2776
2777 2017-10-09  Pedro Alves  <palves@redhat.com>
2778
2779         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2780         Use bool.
2781         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2782         * cp-support.h (cp_remove_params): Now returns a
2783         gdb::unique_xmalloc_ptr.
2784         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2785         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2786         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2787         returning a gdb::unique_xmalloc_ptr.
2788         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2789         * stack.c (find_frame_funname): Adjust to cp_remove_params
2790         returning a gdb::unique_xmalloc_ptr.
2791
2792 2017-10-08  Tom Tromey  <tom@tromey.com>
2793
2794         * dwarf2read.c (dwarf2_get_dwz_file): Use
2795         gdb::unique_xmalloc_ptr.
2796         (find_slot_in_mapped_hash): Likewise.
2797         (dwarf2_physname): Likewise.
2798         (create_dwo_unit_in_dwp_v1): Use std::string.
2799         (create_dwo_unit_in_dwp_v2): Likewise.
2800         (lookup_dwo_cutu): Likewise.
2801         (inherit_abstract_dies): Use std::vector.
2802         (read_array_type): Likewise.
2803         (dwarf_decode_macros): Remove unused declaration.
2804         (unsigned_int_compar): Remove.
2805         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2806         (psymtabs_addrmap_cleanup): Remove.
2807
2808 2017-10-08  Tom Tromey  <tom@tromey.com>
2809
2810         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2811         * frame.h (frame_cleanup_after_sniffer): Declare.
2812         (frame_prepare_for_sniffer): Return void.
2813         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2814         type of argument.
2815         (frame_prepare_for_sniffer): Return void.
2816
2817 2017-10-08  Tom Tromey  <tom@tromey.com>
2818
2819         * utils.h (make_cleanup_value_free): Remove.
2820         * utils.c (do_value_free, struct cleanup): Remove.
2821         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2822         Use gdb_value_up.
2823         * value.h (struct value_deleter): New.
2824         (gdb_value_up): New typedef.
2825
2826 2017-10-08  Tom Tromey  <tom@tromey.com>
2827
2828         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2829         (make_cleanup_free_search_symbols): Remove.
2830         (search_symbols): Return std::vector.
2831         (symbol_search::compare_search_syms): Now member of
2832         symbol_search.  Change arguments.
2833         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2834         (symtab_symbol_info, rbreak_command): Update.
2835         * symtab.h (struct symbol_search) <next>: Remove.
2836         Add constructors.
2837         (symbol_search::operator<): New function.
2838         (symbol_search::operator==): New function.
2839         (search_symbols): Remove std::vector.
2840         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2841         (symbol_search::compare_search_syms): Declare.
2842
2843 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2844
2845         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2846         arch/aarch64-insn.o.
2847         Remove one rule.
2848         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2849
2850 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2851
2852         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2853         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2854         arch/arm-linux.o respectively.
2855         * configure.tgt: Likewise.
2856
2857 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2858
2859         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2860         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2861
2862 2017-10-06  Pedro Alves  <palves@redhat.com>
2863
2864         * windows-nat.c: Include <algorithm>.
2865
2866 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2867
2868         * configure.tgt (i386_tobjs): New variable.
2869         (amd64_tobjs): New variable.
2870         Set $cpu_obs and $os_obs.
2871
2872 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2873
2874         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2875         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2876         (clean): Remove object files and dependency files.
2877         (distclean): Remove the directory.
2878         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2879         * configure: Re-generated.
2880         * configure.tgt: Replace amd64.o with arch/amd64.o.
2881
2882 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2883
2884         PR build/22188
2885         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2886         and SETEND.
2887
2888 2017-10-05  Pedro Alves  <palves@redhat.com>
2889
2890         * linux-nat.c (linux_child_follow_fork): When following the parent
2891         and detaching the child, consult the parent thread's architecture
2892         instead of the child's.
2893
2894 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2895
2896         * ax.h: Do not include "doublest.h".
2897         (union agent_val): Remove.
2898
2899 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2900
2901         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2902         (decimal_to_string): Return std::string object.
2903         (decimal_from_string): Accept std::string object.  Return bool.
2904         (decimal_from_integral, decimal_from_doublest): Remove.
2905         (decimal_from_longest): Add prototype.
2906         (decimal_from_ulongest): Likewise.
2907         (decimal_to_longest): Likewise.
2908         (decimal_from_doublest): Likewise.
2909         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2910         (MAX_DECIMAL_STRING): Move here.
2911         (decimal_to_string): Return std::string object.
2912         (decimal_from_string): Accept std::string object.  Return bool.
2913         (decimal_from_integral): Remove, replace by ...
2914         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2915         (decimal_to_longest): New function.
2916         (decimal_from_floating): Remove, replace by ...
2917         (decimal_from_doublest): ... this new function.
2918         (decimal_to_doublest): Update to new decimal_to_string interface.
2919
2920         * value.c (unpack_long): Use decimal_to_longest.
2921         * valops.c (value_cast): Use decimal_from_doublest instead of
2922         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2923         decimal_from_integral.
2924         * valarith.c (value_args_as_decimal): Likewise.
2925         * valprint.c (print_decimal_floating): Update to new
2926         decimal_to_string interface.
2927         * printcmd.c (printf_decfloat): Likewise.
2928         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2929
2930 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2931
2932         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2933         * gdbtypes.c: Include "floatformat.h".
2934         * value.c: Likewise.
2935         * m68k-tdep.c: Likewise.
2936
2937         * findvar.c: Do not include "floatformat.h".
2938         * amd64-darwin-tdep.c: Likewise.
2939         * arm-linux-tdep.c: Likewise.
2940         * i386-darwin-tdep.c: Likewise.
2941         * i387-tdep.c: Likewise.
2942         * m68k-linux-tdep.c: Likewise.
2943         * mep-tdep.c: Likewise.
2944         * mips-tdep.c: Likewise.
2945         * nios2-tdep.c: Likewise.
2946         * s390-linux-tdep.c: Likewise.
2947         * sparc-obsd-tdep.c: Likewise.
2948         * sparc-tdep.c: Likewise.
2949         * sparc64-tdep.c: Likewise.
2950         * spu-tdep.c: Likewise.
2951         * tic6x-tdep.c: Likewise.
2952         * tilegx-tdep.c: Likewise.
2953         * vax-tdep.c: Likewise.
2954         * xstormy16-tdep.c: Likewise.
2955         * xtensa-tdep.c: Likewise.
2956
2957         * top.c: Do not include "doublest.h".
2958         * aarch64-tdep.c: Likewise.
2959         * alpha-tdep.c: Likewise.
2960         * arm-linux-tdep.c: Likewise.
2961         * m68k-linux-tdep.c: Likewise.
2962         * tilegx-tdep.c: Likewise.
2963         * xstormy16-tdep.c: Likewise.
2964
2965 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2966
2967         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2968         (mipsn32_fbsd_sigframe): Define.
2969         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2970         for FreeBSD/mipsn32.
2971
2972 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2973
2974         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2975         AT_HWCAP.
2976
2977 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2978
2979         * MAINTAINERS (Misc): Update my email address.
2980
2981 2017-10-04  Pedro Alves  <palves@redhat.com>
2982
2983         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2984         it instead of target_gdbarch.
2985         (get_remote_state, get_remote_packet_size): Adjust
2986         get_remote_arch_state calls, passing down target_gdbarch
2987         explicitly.
2988         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2989         'gdbarch' and use it instead of target_gdbarch.
2990         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2991         passing down target_gdbarch explicitly.
2992         (struct stop_reply) <arch>: New field.
2993         (remote_parse_stop_reply): Use the stopped thread's architecture,
2994         not the current inferior's.  Save the architecture in the
2995         stop_reply.
2996         (process_stop_reply): Use the stop reply's architecture.
2997         (process_g_packet, remote_fetch_registers)
2998         (remote_prepare_to_store, store_registers_using_G)
2999         (remote_store_registers): Adjust get_remote_arch_state calls,
3000         using the regcache's architecture.
3001         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3002         passing down target_gdbarch explicitly.
3003         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3004         beneath instead of calling target_gdbarch.
3005         * target.c (default_thread_architecture): Use the specified
3006         inferior's architecture, instead of the current inferior's
3007         architecture (via target_gdbarch).
3008
3009 2017-10-04  Pedro Alves  <palves@redhat.com>
3010
3011         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3012         case.
3013         (regcache_print): Handle !target_has_registers here instead.
3014
3015 2017-10-04  Pedro Alves  <palves@redhat.com>
3016
3017         * frame.c (create_test_frame): Delete.
3018         * frame.h (create_test_frame): Delete.
3019         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3020         (class regcache_test): Delete.
3021         (test_target_has_registers, test_target_has_stack)
3022         (test_target_has_memory, test_target_prepare_to_store)
3023         (test_target_store_registers): New functions.
3024         (test_target_ops): New class.
3025         (register_to_value_test): Error out if there's already a
3026         process_stratum (or higher) target pushed.  Create a fuller mock
3027         environment, with mock target_ops, inferior, address space, thread
3028         and inferior_ptid.
3029         * progspace.c (struct address_space): Move to ...
3030         * progspace.h (struct address_space): ... here.
3031         * regcache.h (regcache::~regcache, regcache::raw_write)
3032         [GDB_SELF_TEST]: No longer virtual.
3033
3034 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3035
3036         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3037
3038 2017-10-04  Pedro Alves  <palves@redhat.com>
3039
3040         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3041         out of 'between TRY and CATCH'.
3042
3043 2017-10-04  Pedro Alves  <palves@redhat.com>
3044
3045         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3046         * common/common-exceptions.h (TRY): Open an outermost scope.
3047         Expand intro comment.
3048         (CATCH): Reindent.
3049         (END_CATCH): Close the outermost scope.
3050         * completer.c (complete_line_internal): Add missing END_CATCH.
3051
3052 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3053
3054         * NEWS (Changes since GDB 8.0): Add entry about new
3055         'set-cwd-on-gdbserver' feature.
3056         (New remote packets): Add entry for QSetWorkingDir.
3057         * common/common-inferior.h (set_inferior_cwd): New prototype.
3058         * infcmd.c (set_inferior_cwd): Remove "static".
3059         (show_cwd_command): Expand text to include remote debugging.
3060         * remote.c: Add PACKET_QSetWorkingDir.
3061         (remote_protocol_features) <QSetWorkingDir>: New entry for
3062         PACKET_QSetWorkingDir.
3063         (extended_remote_set_inferior_cwd): New function.
3064         (extended_remote_create_inferior): Call
3065         "extended_remote_set_inferior_cwd".
3066         (_initialize_remote): Call "add_packet_config_cmd" for
3067         QSetWorkingDir.
3068
3069 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3070
3071         * NEWS (New commands): Mention "set/show cwd".
3072         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3073         "cd" command's help text.
3074         * common/common-inferior.h (get_inferior_cwd): New prototype.
3075         * infcmd.c (inferior_cwd_scratch): New global variable.
3076         (set_inferior_cwd): New function.
3077         (get_inferior_cwd): Likewise.
3078         (set_cwd_command): Likewise.
3079         (show_cwd_command): Likewise.
3080         (_initialize_infcmd): Add "set/show cwd" commands.
3081         * inferior.h (class inferior) <cwd>: New field.
3082         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3083         (fork_inferior): Change inferior's cwd before its execution.
3084         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3085         to CreateProcess.
3086
3087 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3088
3089         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3090         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3091         (COMMON_OBS): Add gdb_tilde_expand.o.
3092         * common/gdb_tilde_expand.c: New file.
3093         * common/gdb_tilde_expand.h: Likewise.
3094
3095 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3096
3097         * gdbarch.sh (objfile): Remove duplicate declaration.
3098         * gdbarch.h: Regenerate.
3099
3100 2017-10-03  Tom Tromey  <tom@tromey.com>
3101
3102         * utils.c (internal_vproblem): Use string_vprintf.
3103
3104 2017-10-03  Tom Tromey  <tom@tromey.com>
3105
3106         * printcmd.c (info_symbol_command): Use std::string.
3107
3108 2017-10-03  Tom Tromey  <tom@tromey.com>
3109
3110         * top.c (gdb_safe_append_history): Use std::string.
3111
3112 2017-10-03  Tom Tromey  <tom@tromey.com>
3113
3114         * event-top.c (stdin_event_handler): Update.
3115         * main.c (captured_main_1): Update.
3116         * top.h (make_delete_ui_cleanup): Remove.
3117         (struct ui): Add constructor and destructor.
3118         (new_ui, delete_ui): Remove.
3119         * top.c (make_delete_ui_cleanup): Remove.
3120         (new_ui_command): Use std::unique_ptr.
3121         (delete_ui_cleanup): Remove.
3122         (ui::ui): Rename from new_ui.  Update.
3123         (free_ui): Remove.
3124         (ui::~ui): Rename from delete_ui.  Update.
3125
3126 2017-10-03  Tom Tromey  <tom@tromey.com>
3127
3128         * symfile.c (load_progress): Use gdb::byte_vector.
3129
3130 2017-10-03  Tom Tromey  <tom@tromey.com>
3131
3132         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3133         declaration.
3134         * printcmd.c (x_command): Remove unused declaration.
3135         * symfile.c (symbol_file_command): Remove unused declaration.
3136
3137 2017-10-03  Tom Tromey  <tom@tromey.com>
3138
3139         * utils.c (internal_vproblem): Use std::string.
3140         (defaulted_query): Likewise.
3141
3142 2017-10-03  Tom Tromey  <tom@tromey.com>
3143
3144         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3145         * top.c (execute_command_to_string): Update.
3146         * utils.c (make_cleanup_restore_page_info): Remove.
3147         (do_restore_page_info_cleanup): Remove.
3148         (set_batch_flag_and_restore_page_info):
3149         New.
3150         (make_cleanup_restore_page_info): Remove.
3151         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3152         (~set_batch_flag_and_restore_page_info): New
3153         (make_cleanup_restore_uinteger): Remove.
3154         (make_cleanup_restore_integer): Remove.
3155         (struct restore_integer_closure): Remove.
3156         (restore_integer): Remove.
3157         * utils.h (struct set_batch_flag_and_restore_page_info): New
3158         class.
3159         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3160         (make_cleanup_restore_page_info): Remove.
3161         (make_cleanup_restore_uinteger) Remove.
3162         (make_cleanup_restore_integer) Remove.
3163
3164 2017-10-03  Tom Tromey  <tom@tromey.com>
3165
3166         * record-full.h (record_full_gdb_operation_disable_set): Return
3167         scoped_restore_tmpl<int>.
3168         * infrun.c (adjust_pc_after_break): Update.
3169         (handle_signal_stop): Update.
3170         * record-full.c (record_full_gdb_operation_disable_set): Return
3171         scoped_restore_tmpl<int>.
3172         (record_full_wait_1, record_full_insert_breakpoint)
3173         (record_full_remove_breakpoint, record_full_save)
3174         (record_full_goto_insn): Update.
3175
3176 2017-10-02  Tom Tromey  <tom@tromey.com>
3177
3178         PR rust/22236:
3179         * rust-lang.c (rust_val_print_str): New function.
3180         (val_print_struct): Call it.
3181         (rust_subscript): Preserve name of slice type.
3182
3183 2017-10-02  Tom Tromey  <tom@tromey.com>
3184
3185         * rust-lang.c (rust_subscript): Handle slices in
3186         EVAL_AVOID_SIDE_EFFECTS case.
3187
3188 2017-10-02  Tom Tromey  <tom@tromey.com>
3189
3190         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3191
3192 2017-10-02  Tom Tromey  <tom@tromey.com>
3193
3194         * rust-lang.h (rust_slice_type): Add "extern".
3195
3196 2017-10-02  Tom Tromey  <tom@tromey.com>
3197             Pedro Alves  <palves@redhat.com>
3198
3199         * ada-lang.h (ada_exc_info::operator<): Make const.
3200         (ada_exc_info::operator==): Make const.
3201         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3202         Make const.
3203
3204 2017-09-29  Tom Tromey  <tom@tromey.com>
3205
3206         * target.c (read_whatever_is_readable): Change type of "result".
3207         Update.
3208         (free_memory_read_result_vector): Remove.
3209         (read_memory_robust): Change return type.  Update.
3210         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3211         bin2hex, std::string.
3212         * target.h (memory_read_result_s): Remove typedef.
3213         (free_memory_read_result_vector): Remove.
3214         (read_memory_robust): Return std::vector.
3215
3216 2017-09-29  Tom Tromey  <tom@tromey.com>
3217
3218         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3219
3220 2017-09-29  Tom Tromey  <tom@tromey.com>
3221
3222         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3223         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3224         operator< and operator==.
3225         (ada_exceptions_list): Return a std::vector.
3226         * ada-lang.c (ada_exc_info::operator<): Rename from
3227         compare_ada_exception_info.
3228         (ada_exc_info::operator==): New.
3229         (sort_remove_dups_ada_exceptions_list): Change type of
3230         "exceptions".
3231         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3232         (ada_add_global_exceptions): Likewise.
3233         (ada_exceptions_list_1): Return a std::vector.
3234         (ada_exceptions_list): Likewise.
3235
3236 2017-09-29  Tom Tromey  <tom@tromey.com>
3237
3238         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3239         'std::set *'.
3240         (print_one_inferior): Update.
3241         (free_vector_of_ints): Remove.
3242         (list_available_thread_groups): Change "ids" to std::set.
3243         (mi_cmd_list_thread_groups): Update.
3244         (struct collect_cores_data) <core>: Now a std::set.
3245         (collect_cores): Update.
3246         (unique): Remove.
3247         (print_one_inferior): Update.
3248
3249 2017-09-29  Tom Tromey  <tom@tromey.com>
3250
3251         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3252         (mi_execute_async_cli_command): Likewise.
3253         (mi_cmd_trace_frame_collected): Use field_fmt.
3254
3255 2017-09-29  Tom Tromey  <tom@tromey.com>
3256
3257         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3258         gdb::byte_vector.
3259
3260 2017-09-29  Tom Tromey  <tom@tromey.com>
3261
3262         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3263
3264 2017-09-29  Tom Tromey  <tom@tromey.com>
3265
3266         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3267
3268 2017-09-29  Tom Tromey  <tom@tromey.com>
3269
3270         * varobj.h (varobj_gen_name): Return std::string.
3271         * varobj.c (varobj_gen_name): Return std::string.
3272         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3273         (mi_cmd_var_delete): Don't copy "name".
3274
3275 2017-09-29  Tom Tromey  <tom@tromey.com>
3276
3277         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3278         (mi_cmd_break_insert_1): Update.
3279
3280 2017-09-29  Tom Tromey  <tom@tromey.com>
3281
3282         * target.h (make_scoped_defer_target_commit_resume): Update.
3283         * target.c (make_scoped_defer_target_commit_resume): Rename from
3284         make_cleanup_defer_target_commit_resume.  Return a
3285         scoped_restore.
3286         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3287
3288 2017-09-29  Tom Tromey  <tom@tromey.com>
3289
3290         * main.c (captured_main_1): Remove unused declaration.
3291         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3292
3293 2017-09-29  Tom Tromey  <tom@tromey.com>
3294
3295         * symtab.c (search_symbols): Remove unused outer cleanup.
3296         (make_source_files_completion_list): Remove unused declaration.
3297
3298 2017-09-29  Tom Tromey  <tom@tromey.com>
3299
3300         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3301
3302 2017-09-29  Tom Tromey  <tom@tromey.com>
3303
3304         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3305         gdb::byte_vector.
3306
3307 2017-09-29  Tom Tromey  <tom@tromey.com>
3308
3309         * complaints.c (vcomplaint): Use std::string.
3310
3311 2017-09-29  Tom Tromey  <tom@tromey.com>
3312
3313         * tracepoint.c (trace_variable_command): Use std::string.
3314         (encode_actions_1): Remove unused declarations.
3315         (create_tsv_from_upload): Use std::string.
3316
3317 2017-09-29  Tom Tromey  <tom@tromey.com>
3318
3319         * cp-support.c (gdb_demangle): Use std::string.
3320
3321 2017-09-29  Tom Tromey  <tom@tromey.com>
3322
3323         * stack.c (parse_frame_specification): Use std::string
3324         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3325
3326 2017-09-29  Tom Tromey  <tom@tromey.com>
3327
3328         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3329
3330 2017-09-29  Tom Tromey  <tom@tromey.com>
3331
3332         * utils.c (vfprintf_maybe_filtered): Use std::string.
3333         (vfprintf_unfiltered): Likewise.
3334
3335 2017-09-29  Tom Tromey  <tom@tromey.com>
3336
3337         * event-top.c (top_level_prompt): Return std::string.
3338         (display_gdb_prompt): Update.
3339
3340 2017-09-29  Tom Tromey  <tom@tromey.com>
3341
3342         * unittests/common-utils-selftests.c (format): New function.
3343         (string_vprintf_tests): New function.
3344         (_initialize_common_utils_selftests): Register new tests.
3345         * common/common-utils.c (string_vprintf): New function.
3346         * common/common-utils.h (string_vprintf): Declare.
3347
3348 2017-09-29  Pedro Alves  <palves@redhat.com>
3349
3350         * common/rsp-low.c (unpack_varlen_hex): Constify.
3351         * common/rsp-low.h (unpack_varlen_hex): Constify.
3352         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3353         Constify.
3354         * remote.c (remote_set_permissions, read_ptid)
3355         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3356         (remote_static_tracepoint_marker_at)
3357         (remote_static_tracepoint_markers_by_strid)
3358         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3359         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3360         (parse_tracepoint_definition, parse_tsv_definition)
3361         (parse_static_tracepoint_marker_definition): Constify.
3362         * tracepoint.h (parse_static_tracepoint_marker_definition)
3363         (parse_trace_status, parse_tracepoint_status)
3364         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3365
3366 2017-09-29  Pedro Alves  <palves@redhat.com>
3367
3368         * remote.c (target_buf, target_buf_size): Delete.
3369         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3370         Use the connection's packet buffer instead.
3371         All callers adjusted.
3372         (_initialize_remote): Remove references to target_buf and
3373         target_buf_size.
3374
3375 2017-09-28  Pedro Alves  <palves@redhat.com>
3376
3377         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3378         unittests/common-utils-selftests.c.
3379         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3380         (COMMON_OBS): Remove utils-selftests.o.
3381         * utils-selftests.c: Move to ...
3382         * unittests/common-utils-selftests.c: ... here and rename self
3383         test to "string_printf".
3384
3385 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3386
3387         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3388         having NULL cus or tus.
3389
3390 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3391
3392         * arm-tdep.c: (convert_from_extended): Remove.
3393         (convert_to_extended): Likewise.
3394         (arm_extract_return_value): Use convert_typed_floating.
3395         (arm_store_return_value): Likewise.
3396
3397         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3398         * sh-tdep.c: Do not include "floatformat.h".
3399         (sh_littlebyte_bigword_type): New function.
3400         (sh_register_convert_to_virtual): Use convert_typed_floating.
3401         (sh_register_convert_to_raw): Likewise.
3402         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3403         (sh64_littlebyte_bigword_type): New function.
3404         (sh64_extract_return_value): Use convert_typed_floating.
3405         (sh64_register_convert_to_virtual): Likewise.
3406         (sh64_register_convert_to_raw): Likewise.
3407
3408 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3409
3410         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3411         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3412
3413         * gdbtypes.h (union type_specific): Make field floatformat hold
3414         just a single struct floatformat, not an array.
3415         (floatformat_from_type): Move here.
3416         * gdbtypes.c (floatformat_from_type): Move here.  Update to
3417         changed TYPE_FLOATFORMAT definition.
3418         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3419         (recursive_dump_type): Likewise.
3420         (init_float_type): Install correct floatformat for byte order.
3421         (arch_float_type): Likewise.
3422
3423 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3424
3425         * gdbtypes.c (init_type): Change incoming argument from
3426         length-in-bytes to length-in-bits.  Assert length is a
3427         multiple of TARGET_CHAR_BITS.
3428         (arch_type, arch_flags_type): Likewise.
3429         (init_integer_type): Update call to init_type.
3430         (init_character_type): Likewise.
3431         (init_boolean_type): Likewise.
3432         (init_float_type): Likewise.
3433         (init_decfloat_type): Likewise.
3434         (init_complex_type): Likewise.
3435         (init_pointer_type): Likewise.
3436         (objfile_type): Likewise.
3437         (arch_integer_type): Update call to arch_type.
3438         (arch_character_type): Likewise.
3439         (arch_boolean_type): Likewise.
3440         (arch_float_type): Likewise.
3441         (arch_decfloat_type): Likewise.
3442         (arch_complex_type): Likewise.
3443         (arch_pointer_type): Likewise.
3444         (gdbtypes_post_init): Likewise.
3445
3446         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3447         (read_base_type): Likewise.
3448         * mdebugread.c (basic_type): Likewise.
3449         * stabsread.c (dbx_init_float_type): Likewise.
3450         (rs6000_builtin_type): Likewise.
3451         (read_range_type): Likewise.  Also, fix call to init_integer_type
3452         with erroneous length argument.
3453
3454         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3455         * d-lang.c (build_d_types): Likewise.
3456         * f-lang.c (build_fortran_types): Likewise.
3457         * go-lang.c (build_go_types): Likewise.
3458         * opencl-lang.c (build_opencl_types): Likewise.
3459         * jit.c (finalize_symtab): Likewise.
3460         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3461         (build_std_type_info_type): Likewise.
3462         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
3463         update call to arch_flags_type.
3464
3465         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3466         arch_type.
3467         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3468         * windows-tdep.c (windows_get_tlb_type): Likewise.
3469
3470         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3471         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3472         * m32c-tdep.c (make_types): Likewise.
3473         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3474         (rl78_psw_type): Update call to arch_flags_type.
3475         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3476         * rx-tdep.c (rx_psw_type): Likewise.
3477         (rx_fpsw_type): Likewise.
3478         * sparc-tdep.c (sparc_psr_type): Likewise.
3479         (sparc_fsr_type): Likewise.
3480         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3481         (sparc64_ccr_type): Likewise.
3482         (sparc64_fsr_type): Likewise.
3483         (sparc64_fprs_type): Likewise.
3484
3485 2017-09-27  Tom Tromey  <tom@tromey.com>
3486
3487         * findcmd.c (find_command): Constify.
3488
3489 2017-09-27  Tom Tromey  <tom@tromey.com>
3490
3491         * ada-tasks.c (task_command_1, task_command): Constify.
3492
3493 2017-09-27  Tom Tromey  <tom@tromey.com>
3494
3495         * symtab.c (maintenance_print_symbol_cache)
3496         (maintenance_flush_symbol_cache)
3497         (maintenance_print_symbol_cache_statistics): Constify.
3498
3499 2017-09-27  Tom Tromey  <tom@tromey.com>
3500
3501         * inferior.c (detach_inferior_command, kill_inferior_command)
3502         (inferior_command): Constify.
3503
3504 2017-09-27  Tom Tromey  <tom@tromey.com>
3505
3506         * regcache.c (regcache_print, maintenance_print_registers)
3507         (maintenance_print_raw_registers)
3508         (maintenance_print_cooked_registers)
3509         (maintenance_print_register_groups)
3510         (maintenance_print_remote_registers): Constify.
3511
3512 2017-09-27  Tom Tromey  <tom@tromey.com>
3513
3514         * printcmd.c (map_display_numbers, undisplay_command)
3515         (enable_disable_display_command, enable_display_command)
3516         (disable_display_command): Constify.
3517
3518 2017-09-27  Tom Tromey  <tom@tromey.com>
3519
3520         * breakpoint.h (delete_command): Don't declare.
3521         * breakpoint.c (delete_command, enable_once_command)
3522         (enable_count_command, enable_delete_command, breakpoint_1)
3523         (maintenance_info_breakpoints, stopin_command, stopat_command)
3524         (delete_command, delete_trace_command, save_breakpoints)
3525         (save_breakpoints_command, save_tracepoints_command): Constify.
3526
3527 2017-09-27  Tom Tromey  <tom@tromey.com>
3528
3529         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3530         (skip_ws, extract_identifier, macro_define_command)
3531         (macro_undef_command, macro_list_command): Constify.
3532
3533 2017-09-27  Tom Tromey  <tom@tromey.com>
3534
3535         * infcmd.c (environment_info, set_environment_command)
3536         (unset_environment_command, path_info, info_proc_cmd_1)
3537         (info_proc_cmd_mappings, info_proc_cmd_stat)
3538         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3539         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3540
3541 2017-09-27  Tom Tromey  <tom@tromey.com>
3542
3543         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3544         Constify.
3545
3546 2017-09-27  Tom Tromey  <tom@tromey.com>
3547
3548         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3549
3550 2017-09-27  Tom Tromey  <tom@tromey.com>
3551
3552         * demangle.c (demangle_command): Constify.
3553
3554 2017-09-27  Tom Tromey  <tom@tromey.com>
3555
3556         * progspace.c (maintenance_info_program_spaces_command):
3557         Constify.
3558
3559 2017-09-27  Tom Tromey  <tom@tromey.com>
3560
3561         * compile/compile.c (check_raw_argument, compile_file_command)
3562         (compile_code_command, compile_print_command): Constify.
3563
3564 2017-09-27  Tom Tromey  <tom@tromey.com>
3565
3566         * reggroups.c (maintenance_print_reggroups): Constify.
3567
3568 2017-09-27  Tom Tromey  <tom@tromey.com>
3569
3570         * dwarf2read.c (save_gdb_index_command): Constify.
3571
3572 2017-09-27  Tom Tromey  <tom@tromey.com>
3573
3574         * stap-probe.c (info_probes_stap_command): Constify.
3575
3576 2017-09-27  Tom Tromey  <tom@tromey.com>
3577
3578         * fork-child.c (unset_exec_wrapper_command): Constify.
3579
3580 2017-09-27  Tom Tromey  <tom@tromey.com>
3581
3582         * btrace.c (get_uint, get_context_size, no_chunk)
3583         (maint_btrace_packet_history_cmd)
3584         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3585         (maint_info_btrace_cmd): Constify.
3586
3587 2017-09-27  Tom Tromey  <tom@tromey.com>
3588
3589         * reverse.c (delete_bookmark_command): Constify.
3590
3591 2017-09-27  Tom Tromey  <tom@tromey.com>
3592
3593         * remote.c (set_memory_packet_size)
3594         (set_memory_write_packet_size, show_memory_write_packet_size)
3595         (set_memory_read_packet_size, show_memory_read_packet_size)
3596         (compare_sections_command, packet_command, remote_put_command)
3597         (remote_get_command, remote_delete_command): Constify.
3598
3599 2017-09-27  Tom Tromey  <tom@tromey.com>
3600
3601         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3602         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3603         (set_mipsfpu_auto_command): Constify.
3604
3605 2017-09-27  Tom Tromey  <tom@tromey.com>
3606
3607         * cli/cli-cmds.h (cd_command): Constify.
3608         * cli/cli-cmds.c (cd_command): Constify.
3609
3610 2017-09-27  Tom Tromey  <tom@tromey.com>
3611
3612         * thread.c (thread_name_command, thread_find_command): Constify.
3613
3614 2017-09-27  Tom Tromey  <tom@tromey.com>
3615
3616         * probe.c (enable_probes_command, disable_probes_command):
3617         Constify.
3618
3619 2017-09-27  Tom Tromey  <tom@tromey.com>
3620
3621         * symfile.c (symbol_file_command): Constify.
3622         * gdbcore.h (deprecated_file_changed_hook): Constify.
3623         * exec.c (deprecated_file_changed_hook, exec_file_command)
3624         (file_command): Constify.
3625         * defs.h (symbol_file_command): Constify.
3626
3627 2017-09-27  Tom Tromey  <tom@tromey.com>
3628
3629         * remote-fileio.c (set_system_call_allowed)
3630         (show_system_call_allowed): Constify.
3631
3632 2017-09-27  Tom Tromey  <tom@tromey.com>
3633
3634         * tracepoint.c (delete_trace_variable_command)
3635         (tfind_end_command, tfind_start_command, tfind_pc_command)
3636         (tfind_tracepoint_command, tfind_line_command)
3637         (tfind_range_command, tfind_outside_command): Constify.
3638
3639 2017-09-27  Tom Tromey  <tom@tromey.com>
3640
3641         * ax-gdb.c (maint_agent_printf_command, agent_command)
3642         (agent_eval_command): Constify.
3643
3644 2017-09-27  Tom Tromey  <tom@tromey.com>
3645
3646         * tracepoint.c (info_scope_command): Constify.
3647         * python/python.c (gdbpy_decode_line): Constify.
3648         * python/py-breakpoint.c (bppy_init): Constify.
3649         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3650         * location.h: (new_linespec_location)
3651         (string_to_event_location_basic, string_to_event_location):
3652         Constify.
3653         * location.c (new_linespec_location)
3654         (string_to_event_location_basic, string_to_event_location):
3655         Constify.
3656         * linespec.h (decode_line_with_current_source)
3657         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3658         * linespec.c (linespec_lex_to_end)
3659         (decode_line_with_current_source)
3660         (decode_line_with_last_displayed): Constify.
3661         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3662         Constify.
3663         * cli/cli-cmds.c (edit_command, list_command): Constify.
3664         * breakpoint.h (until_break_command, watch_command_wrapper)
3665         (awatch_command_wrapper, rwatch_command_wrapper)
3666         (init_ada_exception_breakpoint): Constify.
3667         * breakpoint.c (break_command_1, dprintf_command)
3668         (break_range_command, watch_command_wrapper)
3669         (rwatch_command_wrapper, awatch_command_wrapper)
3670         (until_break_command, init_ada_exception_breakpoint)
3671         (strace_marker_create_sals_from_location, trace_command)
3672         (ftrace_command, strace_command, struct tracepoint): Constify.
3673         * ax-gdb.c (agent_command_1): Constify.
3674         * ada-lang.c (ada_exception_sal): Constify.
3675
3676 2017-09-27  Tom Tromey  <tom@tromey.com>
3677
3678         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3679         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3680         (get_context_size, no_chunk, get_insn_history_modifiers)
3681         (cmd_record_insn_history, get_call_history_modifiers)
3682         (cmd_record_call_history): Constify.
3683
3684 2017-09-27  Tom Tromey  <tom@tromey.com>
3685
3686         * source.c (show_substitute_path_command)
3687         (unset_substitute_path_command, set_substitute_path_command):
3688         Constify.
3689
3690 2017-09-27  Tom Tromey  <tom@tromey.com>
3691
3692         * typeprint.c (maintenance_print_type): Constify.
3693         * maint.c (maintenance_dump_me, maintenance_demangle)
3694         (maintenance_time_display, maintenance_info_sections)
3695         (maintenance_print_statistics, maintenance_deprecate)
3696         (maintenance_undeprecate): Constify.
3697         (maintenance_do_deprecate): Constify.  Use std::string.
3698         (maintenance_selftest): Constify.
3699         * gdbtypes.h (maintenance_print_type): Constify.
3700
3701 2017-09-27  Tom Tromey  <tom@tromey.com>
3702
3703         * hppa-tdep.c (unwind_command): Constify.
3704
3705 2017-09-27  Tom Tromey  <tom@tromey.com>
3706
3707         * target-descriptions.c (unset_tdesc_filename_cmd)
3708         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3709         Constify.
3710
3711 2017-09-27  Tom Tromey  <tom@tromey.com>
3712
3713         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3714
3715 2017-09-27  Tom Tromey  <tom@tromey.com>
3716
3717         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3718
3719 2017-09-27  Tom Tromey  <tom@tromey.com>
3720
3721         * tui/tui-regs.c (tui_reg_command): Constify.
3722
3723 2017-09-27  Tom Tromey  <tom@tromey.com>
3724
3725         * skip.c (skip_file_command, skip_function_command)
3726         (skip_enable_command, skip_disable_command, skip_delete_command):
3727         Constify.
3728
3729 2017-09-27  Tom Tromey  <tom@tromey.com>
3730
3731         * record-btrace.c (cmd_record_btrace_bts_start)
3732         (cmd_record_btrace_pt_start): Constify.
3733
3734 2017-09-27  Tom Tromey  <tom@tromey.com>
3735
3736         * symmisc.c (maintenance_print_symbols)
3737         (maintenance_print_msymbols, maintenance_print_objfiles)
3738         (maintenance_info_symtabs, maintenance_check_symtabs)
3739         (maintenance_expand_symtabs, maintenance_info_line_tables):
3740         Constify.
3741
3742 2017-09-27  Tom Tromey  <tom@tromey.com>
3743
3744         * top.c (new_ui_command): Constify.
3745
3746 2017-09-27  Tom Tromey  <tom@tromey.com>
3747
3748         * symfile.c (add_symbol_file_command)
3749         (remove_symbol_file_command, list_overlays_command)
3750         (map_overlay_command, unmap_overlay_command)
3751         (overlay_auto_command, overlay_manual_command)
3752         (overlay_off_command, overlay_load_command): Constify.
3753
3754 2017-09-27  Tom Tromey  <tom@tromey.com>
3755
3756         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3757         (info_spu_mailbox_command, info_spu_dma_command)
3758         (info_spu_proxydma_command): Constify.
3759
3760 2017-09-27  Tom Tromey  <tom@tromey.com>
3761
3762         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3763
3764 2017-09-27  Tom Tromey  <tom@tromey.com>
3765
3766         * cli/cli-script.c (user_defined_command): Constify.
3767
3768 2017-09-27  Tom Tromey  <tom@tromey.com>
3769
3770         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3771         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3772         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3773         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3774         (dump_binary_value, append_binary_memory, append_binary_value):
3775         Constify.
3776         (struct dump_context) <func>: Constify.
3777         (add_dump_command): Update.
3778
3779 2017-09-27  Tom Tromey  <tom@tromey.com>
3780
3781         * cli/cli-cmds.c (show_version, show_configuration)
3782         (source_command, show_user): Constify.
3783
3784 2017-09-27  Tom Tromey  <tom@tromey.com>
3785
3786         * target.c (maintenance_print_target_stack): Constify.
3787
3788 2017-09-27  Tom Tromey  <tom@tromey.com>
3789
3790         * interps.c (interpreter_exec_cmd): Constify.
3791
3792 2017-09-27  Tom Tromey  <tom@tromey.com>
3793
3794         * record-full.c (cmd_record_full_restore): Constify.
3795
3796 2017-09-27  Tom Tromey  <tom@tromey.com>
3797
3798         * memattr.c (enable_mem_command, disable_mem_command)
3799         (delete_mem_command): Constify.
3800
3801 2017-09-27  Tom Tromey  <tom@tromey.com>
3802
3803         * value.c (show_convenience): Constify.
3804
3805 2017-09-27  Tom Tromey  <tom@tromey.com>
3806
3807         * gdbcore.h (core_file_command): Update.
3808         * corefile.c (core_file_command): Constify.
3809
3810 2017-09-27  Tom Tromey  <tom@tromey.com>
3811
3812         * user-regs.c (maintenance_print_user_registers): Constify.
3813
3814 2017-09-27  Tom Tromey  <tom@tromey.com>
3815
3816         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3817
3818 2017-09-27  Tom Tromey  <tom@tromey.com>
3819
3820         * cp-support.c (first_component_command): Constify.
3821
3822 2017-09-27  Tom Tromey  <tom@tromey.com>
3823
3824         * psymtab.c (maintenance_print_psymbols)
3825         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3826         Constify.
3827
3828 2017-09-27  Tom Tromey  <tom@tromey.com>
3829
3830         * windows-tdep.c (display_tib): Constify.
3831
3832 2017-09-27  Tom Tromey  <tom@tromey.com>
3833
3834         * linux-fork.c (delete_checkpoint_command)
3835         (detach_checkpoint_command): Constify.
3836
3837 2017-09-27  Tom Tromey  <tom@tromey.com>
3838
3839         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3840
3841 2017-09-27  Tom Tromey  <tom@tromey.com>
3842
3843         * arc-tdep.c (dump_arc_instruction_command): Constify.
3844
3845 2017-09-27  Tom Tromey  <tom@tromey.com>
3846
3847         * valprint.c (set_radix, show_radix): Constify.
3848
3849 2017-09-27  Tom Tromey  <tom@tromey.com>
3850
3851         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3852
3853 2017-09-27  Tom Tromey  <tom@tromey.com>
3854
3855         * command.h (not_just_help_class_command): Update.
3856         * cli/cli-decode.h (not_just_help_class_command): Update.
3857         * cli/cli-decode.c (not_just_help_class_command): Constify.
3858
3859 2017-09-27  Tom Tromey  <tom@tromey.com>
3860
3861         * gdb_bfd.c (maintenance_info_bfds): Constify.
3862
3863 2017-09-27  Tom Tromey  <tom@tromey.com>
3864
3865         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3866         overloads.
3867         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3868         (do_const_cfunc): New function.
3869         (cmd_cfunc_eq): New overload.
3870         (cli_user_command_p): Check do_const_cfunc.
3871         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3872         const_cfunc.
3873         * command.h (add_cmd): Add const overload and no-function
3874         overload.
3875         (set_cmd_cfunc): Add const overload.
3876         (cmd_const_cfunc_ftype): Declare.
3877         (cmd_cfunc_eq): Add const overload.
3878         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3879         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3880         overload.
3881
3882 2017-09-27  Tom Tromey  <tom@tromey.com>
3883
3884         * macroexp.c (get_next_token_for_substitution): New function.
3885         (substitute_args): Call it.  Check for __VA_OPT__.
3886
3887 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3888             Pedro Alves <palves@redhat.com>
3889
3890         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3891         producer_is_icc_lt_14.
3892         (producer_is_icc_lt_14): New function.
3893         (check_producer): Add code for checking version of ICC.
3894         (producer_is_icc): Move to producer.c.
3895         (read_structure_type): Restrict ICC workaround to ICC<14.
3896         * producer.c: Include selftest.h.
3897         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3898         New functions.
3899         * producer.h (producer_is_icc): New declaration.
3900
3901 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3902
3903         * Makefile.in (SFILES): Add producer.c.
3904         (COMMON_OBS): Add producer.o
3905         * amd64-tdep.c (producer.h): Add new include.
3906         * dwarf2read.c (producer.h): Add new include.
3907         * producer.c: New file.
3908         * producer.h: New file.
3909         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3910         producer.c.
3911         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3912         producer.h.
3913
3914 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3915
3916         * configure.ac: Search ncursesw before ncurses.
3917         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3918         * gdb_curses.h: Include <ncursesw/ncurses.h>
3919         * config.in, configure: Regenerate.
3920
3921 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3922
3923         PR gdb/22185
3924         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3925         obsolete.
3926         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3927         Remove i386sol2 support.
3928         * configure.nat <i386sol2>: Remove.
3929         <sol2-64>: Fold into ...
3930         <sol2>: ... this.
3931         Move common settings to default section.
3932         Add sol-thread.o.
3933         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3934         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3935         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3936         <i[34567]86-*-solaris*>: Remove.
3937         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3938
3939         * configure.ac: Remove wctype in libw check.
3940         (_MSE_INT_H): Don't define on Solaris 7-9.
3941         <solaris*>: Remove libthread_db.so.1 check.
3942         * configure: Regenerate.
3943         * config.in: Regenerate.
3944
3945         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3946         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3947         (gdb_ps_size_t): Remove.
3948         Use base types in users.
3949         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3950
3951         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3952
3953 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3954
3955         PR build/22206
3956         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3957         (adi_is_addr_mapped): Likewise.
3958         (PSR_ICC): Don't redefine.
3959         (PSR_IMPL): Likewise.
3960
3961 2017-09-25  Tom Tromey  <tom@tromey.com>
3962
3963         * regcache.c (regcache::dump): Use string_printf.
3964
3965 2017-09-25  Tom Tromey  <tom@tromey.com>
3966
3967         * regcache.c (class regcache_invalidator): New.
3968         (struct register_to_invalidate): Remove.
3969         (make_cleanup_regcache_invalidate): Remove.
3970         (regcache::raw_write): Use regcache_invalidator.
3971
3972 2017-09-25  Tom Tromey  <tom@tromey.com>
3973
3974         * spu-tdep.c (spu2ppu_sniffer): Update.
3975         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3976         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3977         Remove.
3978         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3979         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3980         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3981         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3982         (frame_pop): Update.
3983
3984 2017-09-25  Tom Tromey  <tom@tromey.com>
3985
3986         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3987         * regcache.h (regcache_xfree): Don't declare.
3988         * regcache.c (regcache_xfree): Remove.
3989         (do_regcache_xfree): Use delete.
3990         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3991         * linux-fork.c (free_fork): Use delete.
3992         (fork_save_infrun_state): Likewise.
3993         * jit.c (jit_dealloc_cache): Use delete.
3994         * infrun.c (discard_infcall_suspend_state): Use delete.
3995
3996 2017-09-25  Tom Tromey  <tom@tromey.com>
3997
3998         * regcache.h (regcache_xmalloc): Don't declare.
3999         (regcache_raw_set_cached_value): Update comment.
4000         * regcache.c (regcache_xmalloc): Remove.
4001         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4002         * jit.c (jit_frame_sniffer): Use new.
4003         * frame.c (frame_save_as_regcache): Use new.
4004
4005 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4006
4007         * NEWS: Advertise support for guarded-storage registers on IBM z.
4008
4009 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4010
4011         * s390-linux-nat.c (have_regset_gs): New static variable.
4012         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4013         control block and guarded-storage broadcast control regsets.
4014         (s390_read_description): Detect whether the target has
4015         guarded-storage support, return appropriate tdesc.
4016         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4017         (features/s390x-gs-linux64.c): Likewise.
4018         (struct gdbarch_tdep) <have_gs>: New field.
4019         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4020         (s390_gsbc_regset): New variables.
4021         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4022         and s390_gsbc_regset, if applicable.
4023         (s390_core_read_description): Check whether core file was from a
4024         target with guarded-storage support; include appropriate regsets.
4025         (s390_gdbarch_init): Add registers for guarded-storage support.
4026         (_initialize_s390_tdep): Initialize new target descriptions that
4027         include registers for guarded-storage support.
4028         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4029         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4030         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4031         (S390_NUM_REGS): Adjust macro definition.
4032         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4033         (tdesc_s390x_gs_linux64): New declarations.
4034
4035 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4036
4037         * features/s390-gs-linux64.xml: New file.
4038         * features/s390-gs.xml: New file.
4039         * features/s390-gsbc.xml: New file.
4040         * features/s390x-gs-linux64.xml: New file.
4041         * features/Makefile (WHICH): Add s390-gs-linux64 and
4042         s390x-gs-linux64.
4043         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4044         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4045         * features/s390-gs-linux64.c: New generated file.
4046         * features/s390x-gs-linux64.c: New file.
4047         * regformats/s390-gs-linux64.dat: New file.
4048         * regformats/s390x-gs-linux64.dat: New file.
4049
4050 2017-09-23  Tom Tromey  <tom@tromey.com>
4051
4052         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4053
4054 2017-09-22  Tom Tromey  <tom@tromey.com>
4055
4056         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4057         type to scoped_restore_tmpl.
4058         <scoped_input_handler>: Initialize m_quit_handler directly.
4059
4060 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4061
4062         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4063         (cd_command): Likewise.  Free "current_directory" before
4064         assigning to it.
4065         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4066         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4067         * top.c (gdb_dirbuf): Remove global declaration.
4068         * top.h (gdb_dirbuf): Likewise.
4069
4070 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4071
4072         * gnulib/aclocal.m4: Regenerate.
4073         * gnulib/config.in: Regenerate.
4074         * gnulib/configure: Regenerate.
4075         * gnulib/import/Makefile.am: Regenerate.
4076         * gnulib/import/Makefile.in: Regenerate.
4077         * gnulib/import/assure.h: New file.
4078         * gnulib/import/at-func.c: Likewise
4079         * gnulib/import/chdir-long.c: New file.
4080         * gnulib/import/chdir-long.h: New file.
4081         * gnulib/import/cloexec.c: New file.
4082         * gnulib/import/cloexec.h: New file.
4083         * gnulib/import/close.c: New file.
4084         * gnulib/import/closedir.c: New file.
4085         * gnulib/import/dirent-private.h: New file.
4086         * gnulib/import/dup-safer.c: New file.
4087         * gnulib/import/dup.c: New file.
4088         * gnulib/import/dup2.c: New file.
4089         * gnulib/import/error.c: New file.
4090         * gnulib/import/error.h: New file.
4091         * gnulib/import/exitfail.c: New file.
4092         * gnulib/import/exitfail.h: New file.
4093         * gnulib/import/fchdir.c: New file.
4094         * gnulib/import/fcntl.c: New file.
4095         * gnulib/import/fcntl.in.h: New file.
4096         * gnulib/import/fd-hook.c: New file.
4097         * gnulib/import/fd-hook.h: New file.
4098         * gnulib/import/fd-safer.c: New file.
4099         * gnulib/import/fdopendir.c: New file.
4100         * gnulib/import/filename.h: New file.
4101         * gnulib/import/filenamecat-lgpl.c: New file.
4102         * gnulib/import/filenamecat.h: New file.
4103         * gnulib/import/fstat.c: New file.
4104         * gnulib/import/fstatat.c: New file.
4105         * gnulib/import/getcwd-lgpl.c: New file.
4106         * gnulib/import/getcwd.c: New file.
4107         * gnulib/import/getdtablesize.c: New file.
4108         * gnulib/import/getlogin_r.c: New file.
4109         * gnulib/import/getprogname.c: New file.
4110         * gnulib/import/getprogname.h: New file.
4111         * gnulib/import/gettext.h: New file.
4112         * gnulib/import/glob-libc.h: New file.
4113         * gnulib/import/glob.c: New file.
4114         * gnulib/import/glob.in.h: New file.
4115         * gnulib/import/intprops.h: New file.
4116         * gnulib/import/m4/chdir-long.m4: New file.
4117         * gnulib/import/m4/close.m4: New file.
4118         * gnulib/import/m4/closedir.m4: New file.
4119         * gnulib/import/m4/d-ino.m4: New file.
4120         * gnulib/import/m4/d-type.m4: New file.
4121         * gnulib/import/m4/dup.m4: New file.
4122         * gnulib/import/m4/dup2.m4: New file.
4123         * gnulib/import/m4/error.m4: New file.
4124         * gnulib/import/m4/fchdir.m4: New file.
4125         * gnulib/import/m4/fcntl.m4: New file.
4126         * gnulib/import/m4/fcntl_h.m4: New file.
4127         * gnulib/import/m4/fdopendir.m4: New file.
4128         * gnulib/import/m4/filenamecat.m4: New file.
4129         * gnulib/import/m4/fstat.m4: New file.
4130         * gnulib/import/m4/fstatat.m4: New file.
4131         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4132         * gnulib/import/m4/getcwd-path-max.m4: New file.
4133         * gnulib/import/m4/getcwd.m4: New file.
4134         * gnulib/import/m4/getdtablesize.m4: New file.
4135         * gnulib/import/m4/getlogin_r.m4: New file.
4136         * gnulib/import/m4/getprogname.m4: New file.
4137         * gnulib/import/m4/glob.m4: New file.
4138         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4139         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4140         * gnulib/import/m4/mempcpy.m4: New file.
4141         * gnulib/import/m4/memrchr.m4: New file.
4142         * gnulib/import/m4/mode_t.m4: New file.
4143         * gnulib/import/m4/msvc-inval.m4: New file.
4144         * gnulib/import/m4/msvc-nothrow.m4: New file.
4145         * gnulib/import/m4/open.m4: New file.
4146         * gnulib/import/m4/openat.m4: New file.
4147         * gnulib/import/m4/opendir.m4: New file.
4148         * gnulib/import/m4/readdir.m4: New file.
4149         * gnulib/import/m4/realloc.m4: New file.
4150         * gnulib/import/m4/rewinddir.m4: New file.
4151         * gnulib/import/m4/save-cwd.m4: New file.
4152         * gnulib/import/m4/strdup.m4: New file.
4153         * gnulib/import/m4/strerror.m4: New file.
4154         * gnulib/import/m4/unistd-safer.m4: New file.
4155         * gnulib/import/mempcpy.c: New file.
4156         * gnulib/import/memrchr.c: New file.
4157         * gnulib/import/msvc-inval.c: New file.
4158         * gnulib/import/msvc-inval.h: New file.
4159         * gnulib/import/msvc-nothrow.c: New file.
4160         * gnulib/import/msvc-nothrow.h: New file.
4161         * gnulib/import/open.c: New file.
4162         * gnulib/import/openat-die.c: New file.
4163         * gnulib/import/openat-priv.h: New file.
4164         * gnulib/import/openat-proc.c: New file.
4165         * gnulib/import/openat.c: New file.
4166         * gnulib/import/openat.h: New file.
4167         * gnulib/import/opendir.c: New file.
4168         * gnulib/import/pipe-safer.c: New file.
4169         * gnulib/import/readdir.c: New file.
4170         * gnulib/import/realloc.c: New file.
4171         * gnulib/import/rewinddir.c: New file.
4172         * gnulib/import/save-cwd.c: New file.
4173         * gnulib/import/save-cwd.h: New file.
4174         * gnulib/import/strdup.c: New file.
4175         * gnulib/import/strerror-override.c: New file.
4176         * gnulib/import/strerror-override.h: New file.
4177         * gnulib/import/strerror.c: New file.
4178         * gnulib/import/unistd--.h: New file.
4179         * gnulib/import/unistd-safer.h: New file.
4180         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4181         "getcwd" and "glob".
4182         * ser-tcp.c: Undefine "close" before redefining it.
4183
4184 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4185
4186         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4187         get rid of res_val.
4188
4189 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4190
4191         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4192         <sol2,sparc>: Likewise.
4193         <sol2-64,i386>: Likewise.
4194
4195         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4196         -Wdeprecated-declarations on *-*-solaris*.
4197         * configure: Regenerate.
4198
4199         * procfs.c: Include "nat/inferior.h".
4200         (procfs_info_proc): Fix typo.
4201
4202 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4203
4204         * remote.c (vector): Include.
4205         (struct private_thread_info): Add field, thread_handle.
4206         (free_private_thread_info): Deallocate storage associated with
4207         thread handle.
4208         (get_private_info_thread): Initialize `thread_handle' field.
4209         (struct thread_item): Add field, thread_handle.
4210         (clear_threads_listing_context): Deallocate storage associated
4211         with thread handle.
4212         (start_thread): Add support for "handle" attribute.
4213         (thread_attributes): Add "handle".
4214         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4215         field.
4216         (remote_update_thread_list): Update thread_handle.
4217         (remote_thread_handle_to_thread_info): New function.
4218         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4219
4220 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4221
4222         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4223         function.
4224         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4225         * python/python-internal.h (thread_object_type): Declare.
4226
4227 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4228
4229         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4230         (target_thread_handle_to_thread_info): Declare.
4231         * target.c (target_thread_handle_to_thread_info): New function.
4232         * target-delegates.c: Regenerate.
4233         * gdbthread.h (find_thread_by_handle): Declare.
4234         * thread.c (find_thread_by_handle): New function.
4235         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4236         function.
4237         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4238
4239 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4240
4241         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4242
4243 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4244
4245         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4246
4247 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4248
4249         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4250         to gdb_target_obs.
4251
4252 2017-09-20  Tom Tromey  <tom@tromey.com>
4253
4254         * breakpoint.c (struct counted_command_line): Remove.
4255         (breakpoint_commands): Update.
4256         (alloc_counted_command_line, incref_counted_command_line)
4257         (decref_counted_command_line, do_cleanup_counted_command_line)
4258         (make_cleanup_decref_counted_command_line): Remove.
4259         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4260         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4261         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4262         (save_breakpoints): Update.
4263         * breakpoint.h (counted_command_line): Now a typedef to
4264         shared_ptr.
4265         (struct breakpoint) <commands>: Now a counted_command_line.
4266         (struct bpstats) <command>: Likewise.
4267
4268 2017-09-20  Tom Tromey  <tom@tromey.com>
4269
4270         * breakpoint.c (struct commands_info, do_map_commands_command):
4271         Remove.
4272         (commands_command_1): Update.
4273         (iterate_over_related_breakpoints): Take a function_view.
4274         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4275         (delete_command): Update.
4276         (map_breakpoint_numbers): Take a function_view.
4277         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4278         (disable_command): Update.
4279         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4280         (enable_command): Update.
4281         (struct disp_data, do_enable_breakpoint_disp)
4282         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4283         (do_map_enable_delete_breakpoint): Remove.
4284         (enable_once_command, enable_count_command, enable_delete_command)
4285         (delete_trace_variable_command): Update.
4286
4287 2017-09-20  Tom Tromey  <tom@tromey.com>
4288
4289         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4290         (bpstat_clear): Use delete.
4291         (bpstats): New constructors.
4292         (bpstat_copy, bpstat_stop_status): Use new.
4293         (dprintf_after_condition_true): Update.
4294         * breakpoint.h (bpstats::bpstats): Add constructors.
4295         (bpstats::~bpstats): Add destructor.
4296
4297 2017-09-20  Pedro Alves  <palves@redhat.com>
4298
4299         * eval.c (make_params): Delete, refactored as ...
4300         (class fake_method): ... this new type's ctor.
4301         (fake_method::~fake_method): New.
4302         (evaluate_subexp_standard): Use 'fake_method'.
4303
4304 2017-09-20  Tom Tromey  <tom@tromey.com>
4305
4306         * windows-nat.c (get_windows_debug_event, windows_wait)
4307         (do_initial_windows_stuff, windows_attach): Update.
4308         * utils.c (vwarning, internal_vproblem): Update.
4309         (ui_unregister_input_event_handler_cleanup)
4310         (prepare_to_handle_input): Remove.
4311         (class scoped_input_handler): New.
4312         (defaulted_query, prompt_for_continue): Update.
4313         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4314         Update.
4315         * top.c (undo_terminal_modifications_before_exit): Update.
4316         * target/target.h (target_terminal_init, target_terminal_inferior)
4317         (target_terminal_ours): Don't declare.
4318         (class target_terminal): New.
4319         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4320         (target_terminal_ours_for_output)
4321         (make_cleanup_restore_target_terminal): Don't declare.
4322         (target_terminal_info): Remove.
4323         * target.c (enum terminal_state, terminal_state): Remove.
4324         (target_terminal::terminal_state): Define.
4325         (target_terminal::init): Rename from target_terminal_init.
4326         (target_terminal::inferior): Rename from
4327         target_terminal_inferior.
4328         (target_terminal::ours): Rename from target_terminal_ours.
4329         (target_terminal::ours_for_output): Rename from
4330         target_terminal_ours_for_output.
4331         (target_terminal::info): New method.
4332         (cleanup_restore_target_terminal)
4333         (make_cleanup_restore_target_terminal): Remove.
4334         * solib.c (handle_solib_event): Update.
4335         * remote.c (remote_serial_quit_handler): Update.
4336         (remote_terminal_inferior, remote_wait_as): Update.
4337         * record-full.c (record_full_wait_1): Update.
4338         * nto-procfs.c (procfs_create_inferior): Update.
4339         * nat/fork-inferior.c (startup_inferior): Update.
4340         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4341         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4342         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4343         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4344         (mi_breakpoint_created, mi_breakpoint_deleted)
4345         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4346         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4347         (mi_user_selected_context_changed, report_initial_inferior):
4348         Update.
4349         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4350         (linux_nat_terminal_inferior): Update.
4351         * infrun.c (follow_fork_inferior)
4352         (handle_vfork_child_exec_or_exit, do_target_resume)
4353         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4354         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4355         Update.
4356         * inflow.c (child_terminal_init, info_terminal_command): Update.
4357         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4358         (attach_command): Update.
4359         * infcall.c (call_thread_fsm_should_stop): Update.
4360         * gnu-nat.c (gnu_attach): Update.
4361         * extension.c (struct active_ext_lang_state)
4362         (restore_active_ext_lang): Update.
4363         * exceptions.c (print_flush): Update.
4364         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4365         (struct quit_handler_cleanup_data, restore_quit_handler)
4366         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4367         Remove.
4368         * cp-support.c (gdb_demangle): Update.
4369         * breakpoint.c (update_inserted_breakpoint_locations)
4370         (insert_breakpoint_locations, handle_jit_event)
4371         (disable_breakpoints_in_unloaded_shlib): Update.
4372         * annotate.c (annotate_breakpoints_invalid)
4373         (annotate_frames_invalid): Update.
4374
4375 2017-09-20  Tom Tromey  <tom@tromey.com>
4376
4377         * main.c (catch_command_errors): Rename from
4378         catch_command_errors_const.
4379         (captured_main_1): Update.
4380
4381 2017-09-20  Pedro Alves  <palves@redhat.com>
4382
4383         * cli/cli-cmds.c (list_command): Use print_sal_location.
4384         (print_sal_location): New function.
4385         (ambiguous_line_spec): Use print_sal_location.
4386         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4387         * symtab.c (find_function_start_sal): Likewise.
4388         * symtab.h (symtab_and_line::symbol): New field.
4389
4390 2017-09-20  Pedro Alves  <palves@redhat.com>
4391
4392         * linespec.c (minsym_found): Handle non-text minsyms.
4393         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4394
4395 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4396
4397         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4398         backslash.
4399
4400 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4401
4402         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4403         vmovups instead vmovaps.
4404         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4405
4406 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
4407
4408         * NEWS (Changes since GDB 8.0): Add starti.
4409         * infcmd.c (enum run_break): New.
4410         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4411         case.
4412         (run_command): Use enum run_how.
4413         (start_command): Likewise.
4414         (starti_command): New function.
4415         (RUN_ARGS_HELP): New macro.
4416         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4417         commands.  Add starti command.
4418
4419 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4420
4421         * Makefile.in (monitor.o): Remove the rule.
4422
4423 2017-09-19  Yao Qi  <yao.qi@linaro.org>
4424
4425         * annotate.h (struct annotate_arg_emitter): Use
4426         DISABLE_COPY_AND_ASSIGN.
4427         * common/refcounted-object.h (refcounted_object): Likewise.
4428         * completer.h (struct completion_result): Likewise.
4429         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4430         * filename-seen-cache.h (filename_seen_cache): Likewise.
4431         * gdbcore.h (thread_section_name): Likewise.
4432         * gdb_regex.h (compiled_regex): Likewise.
4433         * gdbthread.h (scoped_restore_current_thread): Likewise.
4434         * inferior.h (scoped_restore_current_inferior): Likewise.
4435         * jit.c (jit_reader): Likewise.
4436         * linespec.h (struct linespec_result): Likewise.
4437         * mi/mi-parse.h (struct mi_parse): Likewise.
4438         * nat/fork-inferior.c (execv_argv): Likewise.
4439         * progspace.h (scoped_restore_current_program_space): Likewise.
4440         * python/python-internal.h (class gdbpy_enter): Likewise.
4441         * regcache.h (regcache): Likewise.
4442         * target-descriptions.c (struct tdesc_reg): Likewise.
4443         (struct tdesc_type): Likewise.
4444         (struct tdesc_feature): Likewise.
4445         * ui-out.h (ui_out_emit_type): Likewise.
4446
4447 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
4448
4449         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4450         label abort_expression.
4451
4452 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4453
4454         * common/buffer.c (buffer_xml_printf): Adjust.
4455         * common/xml-utils.c (xml_escape_text): Change return type to
4456         std::string, update code accordingly.
4457         * common/xml-utils.h (xml_escape_text): Change return type to
4458         std::string.
4459         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4460         * windows-tdep.c (windows_xfer_shared_library): Adjust.
4461         * unittests/xml-utils-selftests.c (test_xml_escape_text):
4462         Adjust.
4463
4464 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4465
4466         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4467         (SUBDIR_UNITTESTS_OBS): Add new object file.
4468         * unittests/xml-utils-selftests.c: New file.
4469
4470 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4471
4472         * common/selftest.h (selftest): New struct/interface.
4473         (register_test): Add name parameter, add new overload.
4474         (run_tests): Add filter parameter.
4475         (for_each_selftest_ftype): New typedef.
4476         (for_each_selftest): New declaration.
4477         * common/selftest.c (tests): Change type to
4478         map<string, unique_ptr<selftest>>.
4479         (simple_selftest): New struct.
4480         (register_test): New function.
4481         (register_test): Add name parameter and use it.
4482         (run_tests): Add filter parameter and use it.  Add prints.
4483         Adjust to vector -> map change.
4484         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4485         registering selftests.
4486         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4487         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4488         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4489         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4490         * findvar.c (_initialize_findvar): Likewise.
4491         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4492         * maint.c (maintenance_selftest): Update call to run_tests.
4493         (maintenance_info_selftests): New function.
4494         (_initialize_maint_cmds): Register "maintenance info selftests"
4495         command.  Update "maintenance selftest" doc.
4496         * regcache.c (_initialize_regcache): Add names when registering
4497         selftests.
4498         * rust-exp.y (_initialize_rust_exp): Likewise.
4499         * selftest-arch.c (gdbarch_selftest): New struct.
4500         (gdbarch_tests): Remove.
4501         (register_test_foreach_arch): Add name parameter.  Call
4502         register_test.
4503         (tests_with_arch): Remove, move most content to
4504         gdbarch_selftest::operator().
4505         (_initialize_selftests_foreach_arch): Remove.
4506         * selftest-arch.h (register_test_foreach_arch): Add name
4507         parameter.
4508         (run_tests_with_arch): New declaration.
4509         * utils-selftests.c (_initialize_utils_selftests): Add names
4510         when registering selftests.
4511         * utils.c (_initialize_utils): Likewise.
4512         * unittests/array-view-selftests.c
4513         (_initialize_array_view_selftests): Likewise.
4514         * unittests/environ-selftests.c (_initialize_environ_selftests):
4515         Likewise.
4516         * unittests/function-view-selftests.c
4517         (_initialize_function_view_selftests): Likewise.
4518         * unittests/offset-type-selftests.c
4519         (_initialize_offset_type_selftests): Likewise.
4520         * unittests/optional-selftests.c
4521         (_initialize_optional_selftests): Likewise.
4522         * unittests/scoped_restore-selftests.c
4523         (_initialize_scoped_restore_selftests): Likewise.
4524         * NEWS: Document "maintenance selftest" and "maint info
4525         selftests".
4526
4527 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4528
4529         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4530         scoped_restore.
4531
4532 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4533
4534         * mi/mi-main.c (mi_load_progress): Make uiout variable
4535         a unique_ptr.
4536
4537 2017-09-15  Pedro Alves  <palves@redhat.com>
4538
4539         * compile/compile-c-types.c (convert_enum, convert_int)
4540         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4541
4542 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4543
4544         * dwarf2read.c (copy_string): Remove.
4545         (parse_macro_definition): Replace copy_string with savestring.
4546
4547 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4548
4549         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4550         gdb_target_obs.
4551         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4552         Likewise.
4553         (i[34567]86-*-linux*): Likewise.
4554
4555 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4556
4557         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4558         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4559         <stack>: Change type to std::vector.
4560         <stack_len, stack_allocated>: Remove.
4561         <grow_stack>: Remove.
4562         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4563         (dwarf_expr_context::~dwarf_expr_context): Remove.
4564         (dwarf_expr_context::grow_stack): Remove.
4565         (dwarf_expr_context::push): Adjust.
4566         (dwarf_expr_context::pop): Adjust.
4567         (dwarf_expr_context::fetch): Adjust.
4568         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4569         (dwarf_expr_context::stack_empty_p): Adjust.
4570         (dwarf_expr_context::execute_stack_op): Adjust.
4571
4572 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4573
4574         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4575         return type to bool.
4576         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4577
4578 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4579
4580         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4581         Change type to bool.
4582         (dwarf_stack_value) <in_stack_memory>: Likewise.
4583         (dwarf_expr_context) <push_address>: Change parameter type to
4584         bool.
4585         <fetch_in_stack_memory>: Change return type to bool.
4586         <push>: Change parameter type to bool.
4587         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4588         to bool.
4589         (dwarf_expr_context::push_address): Likewise.
4590         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4591         to bool.
4592         (dwarf_expr_context::execute_stack_op): Adjust.
4593         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4594
4595 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4596
4597         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4598         (struct dwarf_expr_context) <n_pieces>: Remove.
4599         <pieces>: Change type to std::vector.
4600         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4601         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4602         pieces.
4603         (dwarf_expr_context::add_piece): Adjust.
4604         * dwarf2loc.c (struct piece_closure): Initialize fields.
4605         <n_pieces>: Remove.
4606         <pieces>: Change type to std::vector.
4607         (allocate_piece_closure): Adjust, change parameter to
4608         std::vector rvalue and std::move it to piece_closure.
4609         (rw_pieced_value): Adjust.
4610         (check_pieced_synthetic_pointer): Adjust.
4611         (indirect_synthetic_pointer): Adjust.
4612         (coerce_pieced_ref): Adjust.
4613         (free_pieced_value_closure):  Adjust.  Use delete to free
4614         piece_closure.
4615         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4616         to allocate_piece_closure.
4617         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4618
4619 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4620
4621         * probe.h (probe_ops_cp): Remove typedef.
4622         (DEF_VEC_P (probe_ops_cp)): Remove.
4623         (all_probe_ops): Change type to std::vector.
4624         * probe.c (info_probes_for_ops): Adjust to vector change.
4625         (probe_linespec_to_ops): Likewise.
4626         (all_probe_ops): Change type to std::vector.
4627         (_initialize_probe): Adjust to vector change.
4628         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4629         * elfread.c (elf_get_probes): Likewise.
4630         * stap-probe.c (_initialize_stap_probe): Likewise.
4631
4632 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4633
4634         * probe.h (struct bound_probe): Define constructors.
4635         * probe.c (bound_probe_s): Remove typedef.
4636         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4637         (collect_probes): Change return type to std::vector, remove
4638         cleanup.
4639         (compare_probes): Return bool, change parameter type.  Change
4640         semantic to "less than".
4641         (gen_ui_out_table_header_info): Change parameter to std::vector
4642         and update.
4643         (exists_probe_with_pops): Likewise.
4644         (info_probes_for_ops): Update to std::vector change.
4645         (enable_probes_command): Likewise.
4646         (disable_probes_command): Likewise.
4647
4648 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4649
4650         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4651         vec to std::vector.
4652         * probe.c (parse_probes_in_pspace): Update.
4653         (find_probes_in_objfile): Update.
4654         (find_probe_by_pc): Update.
4655         (collect_probes): Update.
4656         (probe_any_get_probes): Update.
4657         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4658         return type to reference to std::vector.
4659         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4660         std::vector and update.
4661         (dtrace_process_dof): Likewise.
4662         (dtrace_get_probes): Likewise.
4663         * elfread.c (elf_get_probes): Change return type to std::vector,
4664         store an std::vector in bfd_data.
4665         (probe_key_free): Update to std::vector.
4666         * stap-probe.c (handle_stap_probe): Change parameter to
4667         std::vector and update.
4668         (stap_get_probes): Likewise.
4669         * symfile-debug.c (debug_sym_get_probes): Change return type to
4670         std::vector and update.
4671
4672 2017-09-11  Tom Tromey  <tom@tromey.com>
4673
4674         * breakpoint.c (program_breakpoint_here_p): Update.
4675         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4676         from make_show_memory_breakpoints_cleanup.  Return a
4677         scoped_restore_tmpl<int>.
4678         (restore_show_memory_breakpoints): Remove.
4679         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4680         * mem-break.c (memory_validate_breakpoint): Update.
4681         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4682         (ia64_memory_remove_breakpoint): Update.
4683         (ia64_breakpoint_from_pc): Update.
4684         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4685         from make_show_memory_breakpoints_cleanup.
4686
4687 2017-09-11  Tom Tromey  <tom@tromey.com>
4688
4689         * d-namespace.c (d_lookup_symbol): Use std::string.
4690         (find_symbol_in_baseclass): Likewise.
4691
4692 2017-09-11  Tom Tromey  <tom@tromey.com>
4693
4694         * ctf.c (ctf_start): Use std::string.
4695
4696 2017-09-11  Tom Tromey  <tom@tromey.com>
4697
4698         * ada-lang.c (is_known_support_routine): Update.
4699         (ada_unhandled_exception_name_addr_from_raise): Update.
4700         * guile/scm-frame.c (gdbscm_frame_name): Update.
4701         * python/py-frame.c (frapy_name): Update.
4702         (frapy_function): Update.
4703         * stack.h (find_frame_funname): Update.
4704         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4705         (print_frame): Update.
4706
4707 2017-09-11  Tom Tromey  <tom@tromey.com>
4708
4709         * findcmd.c (put_bits): Take a gdb::byte_vector.
4710         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4711         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4712         cleanups.
4713         (find_command): Update.
4714
4715 2017-09-11  Tom Tromey  <tom@tromey.com>
4716
4717         * cli/cli-script.c (class scoped_restore_hook_in): New.
4718         (clear_hook_in_cleanup): Remove.
4719         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4720         scoped_restore_hook_in.
4721
4722 2017-09-11  Tom Tromey  <tom@tromey.com>
4723
4724         * cli/cli-script.c (restore_interp): Remove.
4725         (read_command_lines): Use scoped_restore_interp.
4726         * interps.c (scoped_restore_interp::set_temp): Rename from
4727         interp_set_temp.
4728         * interps.h (class scoped_restore_interp): New.
4729         (interp_set_temp): Remove.
4730
4731 2017-09-11  Tom Tromey  <tom@tromey.com>
4732
4733         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4734         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4735         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4736         scoped_restore.
4737         (mi_cmd_break_insert_1): Update.
4738         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4739         scoped_restore.
4740
4741 2017-09-11  Tom Tromey  <tom@tromey.com>
4742
4743         * demangle.c (demangle_command): Update.
4744         * breakpoint.c (disable_command): Update.
4745         (enable_command): Update.
4746         (find_location_by_number): Make "number" const.  Use
4747         get_number_trailer.
4748         * cli/cli-utils.c (extract_arg): Return std::string.
4749         * probe.c (parse_probe_linespec): Update.  Change types.
4750         (collect_probes): Take string arguments.
4751         (parse_probe_linespec): Likewise.
4752         (info_probes_for_ops): Update.
4753         (enable_probes_command): Update.
4754         (disable_probes_command): Update.
4755         * break-catch-sig.c (catch_signal_split_args): Update.
4756         * mi/mi-parse.c (mi_parse): Update.
4757
4758 2017-09-11  Tom Tromey  <tom@tromey.com>
4759
4760         * language.h (language_enum): Make argument const.
4761         * language.c (language_enum): Make argument const.
4762
4763 2017-09-11  Tom Tromey  <tom@tromey.com>
4764
4765         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4766         as function.
4767         (skip_to_space): Rename from skip_to_space_const.
4768         * common/common-utils.c (skip_to_space): New function.
4769         (skip_to_space): Rename from skip_to_space_const.
4770         * cli/cli-utils.h (get_number): Rename from get_number_const.
4771         (extract_arg): Rename from extract_arg_const.
4772         * cli/cli-utils.c (get_number): Rename from get_number_const.
4773         (extract_arg): Rename from extract_arg_const.
4774         (number_or_range_parser::get_number): Use ::get_number.
4775         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4776         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4777         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4778         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4779         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4780         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4781         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4782         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4783
4784 2017-09-11  Tom Tromey  <tom@tromey.com>
4785
4786         * python/python.c (do_start_initialization): Use
4787         py-event-types.def to initialize types.
4788         Define all object type structures.
4789         * python/python-internal.h: Don't declare event initialization
4790         functions.
4791         * python/py-threadevent.c (thread_event_object_type): Don't
4792         define.
4793         * python/py-stopevent.c (stop_event_object_type): Don't define.
4794         * python/py-signalevent.c (signal_event_object_type): Don't
4795         declare or define.
4796         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4797         (clear_objfiles_event_object_type): Don't declare or define.
4798         * python/py-infevents.c (inferior_call_pre_event_object_type)
4799         (inferior_call_post_event_object_type)
4800         (register_changed_event_object_type)
4801         (memory_changed_event_object_type): Don't declare or define.
4802         * python/py-inferior.c (new_thread_event_object_type)
4803         (new_inferior_event_object_type)
4804         (inferior_deleted_event_object_type): Don't declare or define.
4805         * python/py-exitedevent.c (exited_event_object_type): Don't
4806         declare or define.
4807         * python/py-evts.c (gdbpy_initialize_py_events): Use
4808         py-all-events.def.
4809         * python/py-events.h (thread_event_object_type): Don't declare.
4810         (events_object): Use py-all-events.def.
4811         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4812         py-event-types.def.
4813         * python/py-event-types.def: New file.
4814         * python/py-continueevent.c (create_continue_event_object): Don't
4815         declare or define.
4816         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4817         declare or define.
4818         * python/py-all-events.def: New file.
4819
4820 2017-09-11  Tom Tromey  <tom@tromey.com>
4821
4822         * python/py-threadevent.c (create_thread_event_object): Return
4823         gdbpy_ref.
4824         * python/py-stopevent.h (create_stop_event_object)
4825         (create_breakpoint_event_object, create_signal_event_object):
4826         Update.
4827         * python/py-stopevent.c (create_stop_event_object): Return
4828         gdbpy_ref.
4829         (emit_stop_event): Update.
4830         * python/py-signalevent.c (create_signal_event_object): Return
4831         gdbpy_ref.
4832         * python/py-infevents.c (create_inferior_call_event_object):
4833         Update.
4834         * python/py-event.h (create_event_object)
4835         (create_thread_event_object): Update.
4836         * python/py-event.c (create_event_object): Return gdbpy_ref.
4837         * python/py-continueevent.c: Return gdbpy_ref.
4838         * python/py-bpevent.c (create_breakpoint_event_object): Return
4839         gdbpy_ref.
4840
4841 2017-09-11  Tom Tromey  <tom@tromey.com>
4842
4843         PR python/15622:
4844         * NEWS: Add entry.
4845         * python/python.c (do_start_initialization): Initialize new event
4846         types.
4847         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4848         (gdbpy_initialize_inferior_deleted_event)
4849         (gdbpy_initialize_new_thread_event): Declare.
4850         * python/py-threadevent.c (create_thread_event_object): Add option
4851         "thread" parameter.
4852         * python/py-inferior.c (new_thread_event_object_type)
4853         (new_inferior_event_object_type)
4854         (inferior_deleted_event_object_type): Declare.
4855         (python_new_inferior, python_inferior_deleted): New functions.
4856         (add_thread_object): Emit new_thread event.
4857         (gdbpy_initialize_inferior): Attach new functions to corresponding
4858         observers.
4859         (new_thread, new_inferior, inferior_deleted): Define new event
4860         types.
4861         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4862         registries.
4863         * python/py-events.h (events_object) <new_inferior,
4864         inferior_deleted, new_thread>: New fields.
4865         * python/py-event.h (create_thread_event_breakpoint): Add optional
4866         "thread" parameter.
4867
4868 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4869
4870         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4871         check current_ui instead.
4872         (internal_vproblem): Likewise.
4873
4874 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4875
4876         * thread.c (print_thread_info_1): Remove unnecessary calls to
4877         uiout->is_mi_like_p.
4878
4879 2017-09-09  Tom Tromey  <tom@tromey.com>
4880
4881         * namespace.h (add_using_directive): Update.
4882         * namespace.c (add_using_directive): Change type of excludes to
4883         std::vector.
4884         * dwarf2read.c (read_import_statement): Use std::vector.
4885         (read_namespace): Update.
4886         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4887
4888 2017-09-09  Tom Tromey  <tom@tromey.com>
4889
4890         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4891
4892 2017-09-09  Tom Tromey  <tom@tromey.com>
4893
4894         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4895
4896 2017-09-09  Tom Tromey  <tom@tromey.com>
4897
4898         * stack.c (func_command): Use gdb::def_vector.
4899
4900 2017-09-09  Tom Tromey  <tom@tromey.com>
4901
4902         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4903         ui_out_emit_list, ui_out_emit_tuple.
4904         (mi_cmd_var_update): Likewise.
4905
4906 2017-09-09  Tom Tromey  <tom@tromey.com>
4907
4908         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4909         ui_out_redirect_pop.
4910         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4911         ui_out_redirect_pop.
4912         * utils.c (do_ui_out_redirect_pop)
4913         (make_cleanup_ui_out_redirect_pop): Remove.
4914         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4915         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4916         * ui-out.h (ui_out_redirect_pop): New class.
4917
4918 2017-09-09  Tom Tromey  <tom@tromey.com>
4919
4920         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4921         (list_available_thread_groups, mi_cmd_list_thread_groups)
4922         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4923         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4924         Likewise.
4925
4926 2017-09-09  Tom Tromey  <tom@tromey.com>
4927
4928         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4929         ui_out_emit_tuple.
4930
4931 2017-09-09  Tom Tromey  <tom@tromey.com>
4932
4933         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4934         * stack.c (print_frame): Use ui_out_emit_tuple.
4935         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4936         (info_spu_mailbox_command, info_spu_dma_command)
4937         (info_spu_proxydma_command): Likewise.
4938         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4939         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4940         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4941         ui_out_emit_tuple.
4942         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4943
4944 2017-09-09  Tom Tromey  <tom@tromey.com>
4945
4946         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4947         (class ui_out_emit_table): Update comment.
4948         * ui-out.c (do_cleanup_table_end)
4949         (make_cleanup_ui_out_table_begin_end): Remove.
4950         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4951         (info_spu_dma_cmdlist): Likewise.
4952         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4953         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4954         ui_out_emit_table.
4955
4956 2017-09-09  Tom Tromey  <tom@tromey.com>
4957
4958         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4959         ui_out_emit_list, gdb::optional.
4960
4961 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4962
4963         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4964         prototype.
4965         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4966         prototype.
4967         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4968         prototype.
4969         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4970         * ada-exp.y: Remove _initialize_ada_exp prototype.
4971         * ada-lang.c: Remove _initialize_ada_language prototype.
4972         * ada-tasks.c: Remove _initialize_tasks prototype.
4973         * addrmap.c: Remove _initialize_addrmap prototype.
4974         * agent.c: Remove _initialize_agent prototype.
4975         * aix-thread.c: Remove _initialize_aix_thread prototype.
4976         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4977         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4978         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4979         prototype.
4980         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4981         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4982         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4983         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4984         prototype.
4985         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4986         prototype.
4987         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4988         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4989         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4990         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4991         prototype.
4992         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4993         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4994         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4995         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4996         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4997         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4998         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4999         prototype.
5000         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5001         prototype.
5002         * annotate.c: Remove _initialize_annotate prototype.
5003         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5004         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5005         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5006         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5007         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5008         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5009         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5010         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5011         prototype.
5012         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5013         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5014         * auto-load.c: Remove _initialize_auto_load prototype.
5015         * auxv.c: Remove _initialize_auxv prototype.
5016         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5017         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5018         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5019         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5020         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5021         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5022         prototype.
5023         * break-catch-throw.c: Remove _initialize_break_catch_throw
5024         prototype.
5025         * breakpoint.c: Remove _initialize_breakpoint prototype.
5026         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5027         * btrace.c: Remove _initialize_btrace prototype.
5028         * charset.c: Remove _initialize_charset prototype.
5029         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5030         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5031         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5032         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5033         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5034         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5035         * coffread.c: Remove _initialize_coffread prototype.
5036         * compile/compile.c: Remove _initialize_compile prototype.
5037         * complaints.c: Remove _initialize_complaints prototype.
5038         * completer.c: Remove _initialize_completer prototype.
5039         * copying.awk: Remove _initialize_copying prototype.
5040         * copying.c: Regenerate.
5041         * core-regset.c: Remove _initialize_core_regset prototype.
5042         * corefile.c: Remove _initialize_core prototype.
5043         * corelow.c: Remove _initialize_corelow prototype.
5044         * cp-abi.c: Remove _initialize_cp_abi prototype.
5045         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5046         * cp-support.c: Remove _initialize_cp_support prototype.
5047         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5048         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5049         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5050         * ctf.c: Remove _initialize_ctf prototype.
5051         * d-lang.c: Remove _initialize_d_language prototype.
5052         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5053         prototype.
5054         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5055         * dbxread.c: Remove _initialize_dbxread prototype.
5056         * dcache.c: Remove _initialize_dcache prototype.
5057         * demangle.c: Remove _initialize_demangler prototype.
5058         * disasm-selftests.c: Remove _initialize_disasm_selftests
5059         prototype.
5060         * disasm.c: Remove _initialize_disasm prototype.
5061         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5062         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5063         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5064         prototype.
5065         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5066         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5067         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5068         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5069         * elfread.c: Remove _initialize_elfread prototype.
5070         * exec.c: Remove _initialize_exec prototype.
5071         * extension.c: Remove _initialize_extension prototype.
5072         * f-lang.c: Remove _initialize_f_language prototype.
5073         * f-valprint.c: Remove _initialize_f_valprint prototype.
5074         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5075         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5076         * filesystem.c: Remove _initialize_filesystem prototype.
5077         * findcmd.c: Remove _initialize_mem_search prototype.
5078         * fork-child.c: Remove _initialize_fork_child prototype.
5079         * frame-base.c: Remove _initialize_frame_base prototype.
5080         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5081         * frame.c: Remove _initialize_frame prototype.
5082         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5083         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5084         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5085         * gcore.c: Remove _initialize_gcore prototype.
5086         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5087         * gdbarch.c: Regenerate.
5088         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5089         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5090         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5091         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5092         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5093         * go-lang.c: Remove _initialize_go_language prototype.
5094         * go32-nat.c: Remove _initialize_go32_nat prototype.
5095         * guile/guile.c: Remove _initialize_guile prototype.
5096         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5097         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5098         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5099         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5100         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5101         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5102         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5103         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5104         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5105         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5106         prototype.
5107         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5108         prototype.
5109         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5110         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5111         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5112         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5113         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5114         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5115         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5116         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5117         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5118         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5119         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5120         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5121         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5122         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5123         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5124         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5125         prototype.
5126         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5127         prototype.
5128         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5129         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5130         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5131         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5132         * infcall.c: Remove _initialize_infcall prototype.
5133         * infcmd.c: Remove _initialize_infcmd prototype.
5134         * inferior.c: Remove _initialize_inferiors prototype.
5135         * inflow.c: Remove _initialize_inflow prototype.
5136         * infrun.c: Remove _initialize_infrun prototype.
5137         * interps.c: Remove _initialize_interpreter prototype.
5138         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5139         * jit.c: Remove _initialize_jit prototype.
5140         * language.c: Remove _initialize_language prototype.
5141         * linux-fork.c: Remove _initialize_linux_fork prototype.
5142         * linux-nat.c: Remove _initialize_linux_nat prototype.
5143         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5144         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5145         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5146         * m2-lang.c: Remove _initialize_m2_language prototype.
5147         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5148         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5149         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5150         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5151         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5152         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5153         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5154         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5155         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5156         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5157         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5158         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5159         * machoread.c: Remove _initialize_machoread prototype.
5160         * macrocmd.c: Remove _initialize_macrocmd prototype.
5161         * macroscope.c: Remove _initialize_macroscope prototype.
5162         * maint.c: Remove _initialize_maint_cmds prototype.
5163         * mdebugread.c: Remove _initialize_mdebugread prototype.
5164         * memattr.c: Remove _initialize_mem prototype.
5165         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5166         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5167         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5168         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5169         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5170         * microblaze-linux-tdep.c: Remove
5171         _initialize_microblaze_linux_tdep prototype.
5172         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5173         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5174         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5175         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5176         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5177         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5178         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5179         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5180         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5181         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5182         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5183         prototype.
5184         * mipsread.c: Remove _initialize_mipsread prototype.
5185         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5186         prototype.
5187         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5188         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5189         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5190         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5191         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5192         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5193         prototype.
5194         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5195         * nto-procfs.c: Remove _initialize_procfs prototype.
5196         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5197         * objc-lang.c: Remove _initialize_objc_language prototype.
5198         * objfiles.c: Remove _initialize_objfiles prototype.
5199         * observer.c: Remove observer_test_first_notification_function,
5200         observer_test_second_notification_function,
5201         observer_test_third_notification_function, and
5202         _initialize_observer prototypes.
5203         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5204         * osabi.c: Remove _initialize_gdb_osabi prototype.
5205         * osdata.c: Remove _initialize_osdata prototype.
5206         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5207         * parse.c: Remove _initialize_parse prototype.
5208         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5209         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5210         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5211         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5212         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5213         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5214         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5215         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5216         * printcmd.c: Remove _initialize_printcmd prototype.
5217         * probe.c: Remove _initialize_probe prototype.
5218         * proc-api.c: Remove _initialize_proc_api prototype.
5219         * proc-events.c: Remove _initialize_proc_events prototype.
5220         * proc-service.c: Remove _initialize_proc_service prototype.
5221         * procfs.c: Remove _initialize_procfs prototype.
5222         * psymtab.c: Remove _initialize_psymtab prototype.
5223         * python/python.c: Remove _initialize_python prototype.
5224         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5225         * record-btrace.c: Remove _initialize_record_btrace prototype.
5226         * record-full.c: Remove _initialize_record_full prototype.
5227         * record.c: Remove _initialize_record prototype.
5228         * regcache.c: Remove _initialize_regcache prototype.
5229         * reggroups.c: Remove _initialize_reggroup prototype.
5230         * remote-notif.c: Remove _initialize_notif prototype.
5231         * remote-sim.c: Remove _initialize_remote_sim prototype.
5232         * remote.c: Remove _initialize_remote prototype.
5233         * reverse.c: Remove _initialize_reverse prototype.
5234         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5235         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5236         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5237         prototype.
5238         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5239         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5240         * rust-exp.y: Remove _initialize_rust_exp prototype.
5241         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5242         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5243         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5244         * score-tdep.c: Remove _initialize_score_tdep prototype.
5245         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5246         prototype.
5247         * ser-go32.c: Remove _initialize_ser_dos prototype.
5248         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5249         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5250         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5251         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5252         * serial.c: Remove _initialize_serial prototype.
5253         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5254         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5255         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5256         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5257         * skip.c: Remove _initialize_step_skip prototype.
5258         * sol-thread.c: Remove _initialize_sol_thread prototype.
5259         * solib-aix.c: Remove _initialize_solib_aix prototype.
5260         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5261         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5262         * solib-frv.c: Remove _initialize_frv_solib prototype.
5263         * solib-spu.c: Remove _initialize_spu_solib prototype.
5264         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5265         * solib-target.c: Remove _initialize_solib_target prototype.
5266         * solib.c: Remove _initialize_solib prototype.
5267         * source.c: Remove _initialize_source prototype.
5268         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5269         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5270         prototype.
5271         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5272         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5273         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5274         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5275         prototype.
5276         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5277         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5278         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5279         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5280         prototype.
5281         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5282         prototype.
5283         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5284         prototype.
5285         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5286         prototype.
5287         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5288         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5289         prototype.
5290         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5291         prototype.
5292         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5293         prototype.
5294         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5295         prototype.
5296         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5297         prototype.
5298         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5299         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5300         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5301         * stabsread.c: Remove _initialize_stabsread prototype.
5302         * stack.c: Remove _initialize_stack prototype.
5303         * stap-probe.c: Remove _initialize_stap_probe prototype.
5304         * std-regs.c: Remove _initialize_frame_reg prototype.
5305         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5306         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5307         * symfile.c: Remove _initialize_symfile prototype.
5308         * symmisc.c: Remove _initialize_symmisc prototype.
5309         * symtab.c: Remove _initialize_symtab prototype.
5310         * target-dcache.c: Remove _initialize_target_dcache prototype.
5311         * target-descriptions.c: Remove _initialize_target_descriptions
5312         prototype.
5313         * thread.c: Remove _initialize_thread prototype.
5314         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5315         prototype.
5316         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5317         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5318         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5319         prototype.
5320         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5321         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5322         * tracefile.c: Remove _initialize_tracefile prototype.
5323         * tracepoint.c: Remove _initialize_tracepoint prototype.
5324         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5325         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5326         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5327         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5328         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5329         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5330         * tui/tui.c: Remove _initialize_tui prototype.
5331         * typeprint.c: Remove _initialize_typeprint prototype.
5332         * user-regs.c: Remove _initialize_user_regs prototype.
5333         * utils.c: Remove _initialize_utils prototype.
5334         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5335         * valarith.c: Remove _initialize_valarith prototype.
5336         * valops.c: Remove _initialize_valops prototype.
5337         * valprint.c: Remove _initialize_valprint prototype.
5338         * value.c: Remove _initialize_values prototype.
5339         * varobj.c: Remove _initialize_varobj prototype.
5340         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5341         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5342         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5343         * windows-nat.c: Remove _initialize_windows_nat,
5344         _initialize_check_for_gdb_ini, and _initialize_loadable
5345         prototypes.
5346         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5347         * xcoffread.c: Remove _initialize_xcoffread prototype.
5348         * xml-support.c: Remove _initialize_xml_support prototype.
5349         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5350         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5351         prototype.
5352         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5353         prototype.
5354         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5355
5356 2017-09-08  Keith Seitz  <keiths@redhat.com>
5357
5358         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5359         field.
5360
5361 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5362
5363         * f-valprint.c (f_val_print): Remove check for one byte
5364         sized integers. Remove printing of character type.
5365
5366 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5367             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5368             Bernhard Heckel  <bernhard.heckel@intel.com>
5369
5370         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5371         to maintain proper indentation when printing pointers/refs.
5372
5373 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5374
5375         GDB 8.0.1 released.
5376
5377 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5378
5379         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5380
5381 2017-09-05  Tom Tromey  <tom@tromey.com>
5382
5383         * parse.c (funcall_chain): Now a std::vector.
5384         (start_arglist, end_arglist): Simplify.
5385         (free_funcalls): Remove.
5386         (parse_exp_in_context_1): Remove cleanup.
5387
5388 2017-09-05  Tom Tromey  <tom@tromey.com>
5389
5390         * go-exp.y (go_parse): Don't create a cleanup.
5391
5392 2017-09-05  Tom Tromey  <tom@tromey.com>
5393
5394         * d-exp.y (PrimaryExpression): Use std::string.
5395         (d_parse): Don't create a cleanup.
5396
5397 2017-09-05  Tom Tromey  <tom@tromey.com>
5398
5399         * utils.c (do_clear_parser_state): Remove.
5400         (make_cleanup_clear_parser_state): Remove.
5401         * p-exp.y (pascal_parse): Use scoped_restore.
5402         * m2-exp.y (m2_parse): Use scoped_restore.
5403         * f-exp.y (f_parse): Use scoped_restore.
5404         * d-exp.y (d_parse): Use scoped_restore.
5405         * c-exp.y (c_parse): Use scoped_restore.
5406         * ada-exp.y (ada_parse): Use scoped_restore.
5407         * utils.h (make_cleanup_clear_parser_state): Remove.
5408
5409 2017-09-06  Keith Seitz  <keiths@redhat.com>
5410
5411         * dwarf2read.c (dw2_linkage_name_attr): New function.
5412         (dw2_linkage_name): New function.
5413         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5414         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5415         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5416
5417 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5418
5419         * config/djgpp/djconfig.sh: Correct shell portability issue.
5420
5421 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5422
5423         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5424
5425 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5426
5427         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5428         * NEWS: Mention new FreeBSD/mips native configuration.
5429         * configure.host: Add aarch64*-*-freebsd*.
5430         * configure.nat: Likewise.
5431         * aarch64-fbsd-nat.c: New file.
5432
5433 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
5434
5435         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5436         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5437         * NEWS: Mention new FreeBSD/aarch64 target.
5438         * configure.tgt: Add aarch64*-*-freebsd*.
5439         * aarch64-fbsd-tdep.c: New file.
5440         * aarch64-fbsd-tdep.h: New file.
5441
5442 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
5443
5444         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5445
5446 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5447
5448         * parse.c (find_minsym_type_and_address): Don't relocate addresses
5449         of TLS symbols.
5450
5451 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5452
5453         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5454         call.
5455
5456 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5457
5458         * infrun.c (follow_exec): Call add_thread after
5459         target_find_description.
5460
5461 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5462
5463         * infrun.c (handle_inferior_event_1): When exec'ing, read
5464         stop_pc after follow_exec.
5465
5466 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5467
5468         * remote.c (process_g_packet): Update error message.
5469
5470 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5471
5472         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5473         targets.
5474
5475 2017-09-05  Pedro Alves  <palves@redhat.com>
5476
5477         * eval.c (eval_call, evaluate_funcall): New functions, factored
5478         out from ...
5479         (evaluate_subexp_standard): ... this.
5480
5481 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5482
5483         * amd64-tdep.c (amd64_target_description): Create target
5484         descriptions.
5485         (_initialize_amd64_tdep): Don't call functions
5486         initialize_tdesc_amd64_*.  Add self tests.
5487         * arch/amd64.c (amd64_create_target_description): Add parameter
5488         is_linux.  Call set_tdesc_osabi if is_linux is true.
5489         * arch/amd64.h (amd64_create_target_description): Update the
5490         declaration.
5491         * arch/i386.c (i386_create_target_description): Add parameter
5492         is_linux.  Call set_tdesc_osabi if is_linux is true.
5493         * arch/i386.h (i386_create_target_description): Update
5494         declaration.
5495         * configure.tgt: Add i386.o to gdb_target_obs.
5496         * features/Makefile (XMLTOC): Remove i386/*.xml.
5497         * features/i386/amd64-avx-avx512.c: Remove.
5498         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5499         * features/i386/amd64-avx-mpx.c: Remove.
5500         * features/i386/amd64-avx.c: Remove.
5501         * features/i386/amd64-mpx.c: Remove.
5502         * features/i386/amd64.c: Remove.
5503         * features/i386/i386-avx-avx512.c: Remove.
5504         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5505         * features/i386/i386-avx-mpx.c: Remove.
5506         * features/i386/i386-avx.c: Remove.
5507         * features/i386/i386-mmx.c: Remove.
5508         * features/i386/i386-mpx.c: Remove.
5509         * features/i386/i386.c: Remove.
5510         * i386-tdep.c: Don't include features/i386/i386*.c., include
5511         target-descriptions.h and arch/i386.h.
5512         (i386_target_description): Create target descriptions.
5513         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5514         functions.  Do self tests.
5515
5516 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5517
5518         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5519         * features/i386/amd64-avx-avx512-linux.c: Removed.
5520         * features/i386/amd64-avx-linux.c: Removed.
5521         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5522         * features/i386/amd64-avx-mpx-linux.c: Removed.
5523         * features/i386/amd64-linux.c: Removed.
5524         * features/i386/amd64-mpx-linux.c: Removed.
5525         * features/i386/x32-avx-avx512-linux.c: Removed.
5526         * features/i386/x32-avx-linux.c: Removed.
5527         * features/i386/x32-linux.c: Removed.
5528
5529 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5530
5531         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5532         features/i386/*.c.
5533         (amd64_linux_read_description): Call
5534         amd64_create_target_description.
5535         * arch/amd64.c: New file.
5536         * arch/amd64.h: New file.
5537         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5538         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5539
5540 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5541
5542         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5543         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5544         (amd64_linux_read_description): Create target descriptions.
5545         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5546         functions.  Add unit tests.
5547         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5548         x32-core.xml.
5549         * features/i386/64bit-avx.c: Generated.
5550         * features/i386/64bit-avx512.c: Generated.
5551         * features/i386/64bit-core.c: Generated.
5552         * features/i386/64bit-linux.c: Generated.
5553         * features/i386/64bit-mpx.c: Generated.
5554         * features/i386/64bit-pkeys.c: Generated.
5555         * features/i386/64bit-segments.c: Generated.
5556         * features/i386/64bit-sse.c: Generated.
5557         * features/i386/x32-core.c: Generated.
5558         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5559         c files for amd64-linux and x32-linux.
5560
5561 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5562
5563         * amd64-linux-tdep.c (amd64_linux_read_description): New
5564         function.
5565         (amd64_linux_core_read_description): Call
5566         amd64_linux_read_description.
5567         (amd64_linux_init_abi): Likewise.
5568         (amd64_x32_linux_init_abi): Likewise.
5569         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5570         * x86-linux-nat.c (x86_linux_read_description): Call
5571         amd64_linux_read_description.
5572
5573 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5574
5575         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5576         comments.
5577
5578 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5579
5580         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5581         * features/i386/i386-avx-avx512-linux.c: Remove.
5582         * features/i386/i386-avx-linux.c: Remove.
5583         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5584         * features/i386/i386-avx-mpx-linux.c: Remove.
5585         * features/i386/i386-linux.c: Remove.
5586         * features/i386/i386-mmx-linux.c: Remove.
5587         * features/i386/i386-mpx-linux.c: Remove.
5588
5589 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5590
5591         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5592         (SFILES): Add arch/i386.c.
5593         (HFILES_NO_SRCDIR): Add arch/i386.h.
5594         * arch/i386.c: New file.
5595         * arch/i386.h: New file.
5596         * arch/tdesc.h (allocate_target_description): Declare.
5597         (set_tdesc_architecture): Declare.
5598         (set_tdesc_osabi): Declare.
5599         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5600         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5601         include arch/i386.h.
5602         (i386_linux_read_description): Remove code and call
5603         i386_create_target_description.
5604         (set_tdesc_architecture): New function.
5605         (set_tdesc_osabi): New function.
5606         * target-descriptions.h (allocate_target_description): Remove.
5607
5608 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5609
5610         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5611         * target-descriptions.c (tdesc_create_feature): Likewise, and
5612         adjust code.
5613         * features/i386/32bit-avx.c: Re-generated.
5614         * features/i386/32bit-avx512.c: Re-generated.
5615         * features/i386/32bit-core.c: Re-generated.
5616         * features/i386/32bit-linux.c: Re-generated.
5617         * features/i386/32bit-mpx.c: Re-generated.
5618         * features/i386/32bit-pkeys.c: Re-generated.
5619         * features/i386/32bit-sse.c: Re-generated.
5620
5621 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5622
5623         * regformats/regdef.h (struct reg): Override operator == and !=.
5624
5625 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5626
5627         * arch/tdesc.h: New file.
5628         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5629         * target-descriptions.c: Update comments.
5630         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5631         declarations.
5632         * features/i386/32bit-avx.c: Re-generated.
5633         * features/i386/32bit-avx512.c: Re-generated.
5634         * features/i386/32bit-core.c: Re-generated.
5635         * features/i386/32bit-linux.c: Re-generated.
5636         * features/i386/32bit-mpx.c: Re-generated.
5637         * features/i386/32bit-pkeys.c: Re-generated.
5638         * features/i386/32bit-sse.c: Re-generated.
5639
5640 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5641
5642         * regformats/regdat.sh: Update generated code.
5643
5644 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5645
5646         * regformats/regdat.sh: Adjust code order.
5647
5648 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5649
5650         * expprint.c (dump_subexp_body_standard): Use constant format
5651         string in fprintf_filtered call.
5652
5653 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5654
5655         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5656         NetBSD/i386.
5657         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5658
5659 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5660
5661         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5662
5663 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5664
5665         * bsd-kvm.o: Define _KMEMUSER.
5666         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5667         * configure: Regenerate.
5668
5669 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5670
5671         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5672         * i386-fbsd-nat.c: Likewise.
5673
5674 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5675
5676         * unittests/array-view-selftests.c: Add include of <array>.
5677
5678 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5679
5680         * spu-tdep.c (flush_ea_cache): Add missing argument to
5681         call_function_by_hand.
5682
5683 2017-09-04  Pedro Alves  <palves@redhat.com>
5684
5685         * NEWS (Safer support for debugging with no debug info): New.
5686
5687 2017-09-04  Pedro Alves  <palves@redhat.com>
5688
5689         * c-exp.y (function_method, function_method_void): Add current
5690         instance flags to TYPE_INSTANCE.
5691         * dwarf2read.c (check_modifier): New.
5692         (compute_delayed_physnames): Assert that only C++ adds delayed
5693         physnames.  Mark fn_fields as const/volatile depending on
5694         physname.
5695         * eval.c (make_params): New type_instance_flags parameter.  Use
5696         it as the new type's instance flags.
5697         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5698         flags element and pass it to make_params.
5699         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5700         instance flags element.
5701         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5702         * gdbtypes.h: Include "enum-flags.h".
5703         (type_instance_flags): New enum-flags type.
5704         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5705         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5706         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5707         (follow_type_instance_flags): New function.
5708         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5709         * parser-defs.h (follow_type_instance_flags): Declare.
5710         * valops.c (value_struct_elt_for_reference): const/volatile must
5711         match too.
5712
5713 2017-09-04  Pedro Alves  <palves@redhat.com>
5714
5715         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5716         function/method scopes; lookup the nested name as a function local
5717         static variable.
5718
5719 2017-09-04  Pedro Alves  <palves@redhat.com>
5720
5721         (%type <voidval>): Add function_method.
5722         * c-exp.y (exp): New production for calls with no arguments.
5723         (function_method, function_method_void_or_typelist): New
5724         productions.
5725         (exp): New production for "method()::static_var".
5726         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5727         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5728         Handle OP_FUNC_STATIC_VAR.
5729         * parse.c (operator_length_standard):
5730         Handle OP_FUNC_STATIC_VAR.
5731
5732 2017-09-04  Pedro Alves  <palves@redhat.com>
5733
5734         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5735         handling.
5736         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5737         Ditto.
5738         * parse.c (operator_length_standard, operator_check_standard):
5739         Ditto.
5740         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5741
5742 2017-09-04  Pedro Alves  <palves@redhat.com>
5743
5744         * ax-gdb.c: Include "typeprint.h".
5745         (gen_expr_for_cast): New function.
5746         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5747         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5748         type is unknown.
5749         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5750         nodebug_data_symbol.
5751         * eval.c: Include "typeprint.h".
5752         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5753         Error out if symbol has unknown type.
5754         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5755         evaluate_subexp_for_cast.
5756         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5757         OP_VAR_MSYM_VALUE.
5758         (evaluate_subexp_for_cast): New function.
5759         * gdbtypes.c (init_nodebug_var_type): New function.
5760         (objfile_type): Use it to initialize types of variables with no
5761         debug info.
5762         * typeprint.c (error_unknown_type): New.
5763         * typeprint.h (error_unknown_type): New declaration.
5764         * compile/compile-c-types.c (convert_type_basic): Handle
5765         TYPE_CODE_ERROR; warn and fallback to int for variables with
5766         unknown type.
5767
5768 2017-09-04  Pedro Alves  <palves@redhat.com>
5769
5770         * eval.c (evaluate_var_value): New function, factored out from ...
5771         (evaluate_subexp_standard): ... here.
5772
5773 2017-09-04  Pedro Alves  <palves@redhat.com>
5774
5775         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5776         Remove useless assignments to 'op'.
5777
5778 2017-09-04  Pedro Alves  <palves@redhat.com>
5779
5780         * eval.c (eval_skip_value): New function.
5781         (evaluate_subexp_standard): Use it.
5782
5783 2017-09-04  Pedro Alves  <palves@redhat.com>
5784
5785         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5786         function name from symbol/minsym and pass it to
5787         error_call_unknown_return_type.
5788
5789 2017-09-04  Pedro Alves  <palves@redhat.com>
5790
5791         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5792         * ax-gdb.c (gen_msym_var_ref): New function.
5793         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5794         * eval.c (evaluate_var_msym_value): New function.
5795         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5796         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5797         to call_function_by_hand.
5798         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5799         Handle OP_VAR_MSYM_VALUE.
5800         (union exp_element) <msymbol>: New field.
5801         * minsyms.h (struct type): Forward declare.
5802         (find_minsym_type_and_address): Declare.
5803         * parse.c (write_exp_elt_msym): New function.
5804         (write_exp_msymbol): Delete, refactored as ...
5805         (find_minsym_type_and_address): ... this new function.
5806         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5807         (operator_length_standard, operator_check_standard): Handle
5808         OP_VAR_MSYM_VALUE.
5809         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5810
5811 2017-09-04  Pedro Alves  <palves@redhat.com>
5812
5813         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5814         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5815         unknown.
5816         * ada-typeprint.c (print_func_type): Handle functions with unknown
5817         return type.
5818         * c-typeprint.c (c_type_print_base): Handle functions and methods
5819         with unknown return type.
5820         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5821         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5822         * compile/compile-c-types.c: Include "objfiles.h".
5823         (convert_func): For functions with unknown return type, warn and
5824         default to int.
5825         * compile/compile-object-run.c (compile_object_run): Adjust call
5826         to call_function_by_hand_dummy.
5827         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5828         call_function_by_hand.
5829         * eval.c (evaluate_subexp_standard): Adjust calls to
5830         call_function_by_hand.  Handle functions and methods with unknown
5831         return type.  Pass expect_type to call_function_by_hand.
5832         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5833         return type.
5834         * gcore.c (call_target_sbrk): Adjust call to
5835         call_function_by_hand.
5836         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5837         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5838         an integer address type instead of nodebug.
5839         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5840         call_function_by_hand.
5841         * infcall.c (error_call_unknown_return_type): New function.
5842         (call_function_by_hand): New "default_return_type" parameter.
5843         Pass it down.
5844         (call_function_by_hand_dummy): New "default_return_type"
5845         parameter.  Use it instead of defaulting to int.  If there's no
5846         default and the return type is unknown, throw an error.  If
5847         there's a default return type, and the called function has no
5848         debug info, then assume the function is prototyped.
5849         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5850         New "default_return_type" parameter.
5851         (error_call_unknown_return_type): New declaration.
5852         * linux-fork.c (call_lseek): Cast return type of lseek.
5853         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5854         call_function_by_hand.
5855         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5856         calls to call_function_by_hand.
5857         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5858         return type.
5859         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5860         (value_nsstring, print_object_command): Adjust calls to
5861         call_function_by_hand.
5862         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5863         functions with unknown return type.
5864         (pascal_type_print_func_varspec_suffix): New function.
5865         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5866         TYPE_CODE_METHOD>: Use it.
5867         * python/py-value.c (valpy_call): Adjust call to
5868         call_function_by_hand.
5869         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5870         call_function_by_hand.
5871         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5872         call_function_by_hand.
5873         * valops.c (value_allocate_space_in_inferior): Adjust call to
5874         call_function_by_hand.
5875         * typeprint.c (type_print_unknown_return_type): New function.
5876         * typeprint.h (type_print_unknown_return_type): New declaration.
5877
5878 2017-09-04  Pedro Alves  <palves@redhat.com>
5879
5880         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5881         types with more than one parameter as prototyped.
5882
5883 2017-09-04  Pedro Alves  <palves@redhat.com>
5884
5885         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5886         (disassemble_command): Use gdb_disassembly_flags instead of bare
5887         int.
5888         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5889         (dump_insns, do_mixed_source_and_assembly_deprecated)
5890         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5891         Use gdb_disassembly_flags instead of bare int.
5892         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5893         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5894         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5895         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5896         (enum gdb_disassembly_flag): ... values of this new enumeration.
5897         (gdb_disassembly_flags): Define.
5898         (gdb_disassembly)
5899         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5900         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5901         gdb_disassembly_flags instead of bare int.
5902         * record-btrace.c (btrace_insn_history)
5903         (record_btrace_insn_history, record_btrace_insn_history_range)
5904         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5905         instead of bare int.
5906         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5907         Use gdb_disassembly_flags instead of bare int.
5908         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5909         Define.
5910         * target-delegates.c: Regenerate.
5911         * target.c (target_insn_history, target_insn_history_from)
5912         (target_insn_history_range): Use gdb_disassembly_flags instead of
5913         bare int.
5914         * target.h: Include "disasm.h".
5915         (struct target_ops) <to_insn_history, to_insn_history_from,
5916         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5917         int.
5918         (target_insn_history, target_insn_history_from)
5919         (target_insn_history_range): Use gdb_disassembly_flags instead of
5920         bare int.
5921
5922 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5923
5924         * cli/cli-script.c (build_command_line): For if/while commands,
5925         check whether args is empty.
5926
5927 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5928
5929         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5930         (enum command_control_type): Likewise.
5931         (struct command_line): Likewise.
5932         (free_command_lines): Likewise.
5933         (struct command_lines_deleter): Likewise.
5934         (command_line_up): Likewise.
5935         (read_command_lines): Likewise.
5936         (read_command_lines_1): Likewise.
5937         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5938         (enum command_control_type): Likewise.
5939         (struct command_line): Likewise.
5940         (free_command_lines): Likewise.
5941         (struct command_lines_deleter): Likewise.
5942         (command_line_up): Likewise.
5943         (read_command_lines): Likewise.
5944         (read_command_lines_1): Likewise.
5945         * breakpoint.h: Include cli/cli-script.h.
5946         * extension-priv.h: Likewise.
5947         * gdbcmd.h: Likewise.
5948
5949 2017-09-04  Pedro Alves  <palves@redhat.com>
5950
5951         * ada-lang.c (is_known_support_routine): Move sal declaration to
5952         where it is initialized.
5953         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5954         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5955         (clear_command, update_static_tracepoint): Remove init_sal
5956         references.  Move declarations closer to initializations.
5957         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5958         initializations.
5959         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5960         references.  Move sal declarations closer to initializations.
5961         * frame.c (find_frame_sal): Return a symtab_and_line via function
5962         return instead of output parameter.  Remove init_sal references.
5963         * frame.h (find_frame_sal): Return a symtab_and_line via function
5964         return instead of output parameter.
5965         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5966         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5967         instead of memset.
5968         (gdbscm_find_pc_line): Remove init_sal reference.
5969         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5970         references.  Move declarations closer to initializations.
5971         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5972         initializations.
5973         (finish_backward): Remove init_sal references.  Move declarations
5974         closer to initializations.
5975         * infrun.c (process_event_stop_test, handle_step_into_function)
5976         (insert_hp_step_resume_breakpoint_at_frame)
5977         (insert_step_resume_breakpoint_at_caller): Likewise.
5978         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5979         (symbol_to_sal): Likewise.
5980         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5981         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5982         to its initialization.
5983         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5984         init_sal references.  Move declarations closer to initializations.
5985         * source.c (get_current_source_symtab_and_line): Remove brace
5986         initialization.
5987         (set_current_source_symtab_and_line): Now takes the sal by const
5988         reference.  Remove brace initialization.
5989         (line_info): Remove init_sal reference.
5990         * source.h (set_current_source_symtab_and_line): Now takes a
5991         symtab_and_line via const reference.
5992         * stack.c (set_current_sal_from_frame): Adjust.
5993         (print_frame_info): Adjust.
5994         (get_last_displayed_sal): Return the sal via function return
5995         instead of via output parameter.  Simplify.
5996         (frame_info): Adjust.
5997         * stack.h (get_last_displayed_sal): Return the sal via function
5998         return instead of via output parameter.
5999         * symtab.c (init_sal): Delete.
6000         (find_pc_sect_line): Remove init_sal references.  Move
6001         declarations closer to initializations.
6002         (find_function_start_sal): Remove init_sal references.  Move
6003         declarations closer to initializations.
6004         * symtab.h (struct symtab_and_line): In-class initialize all
6005         fields.
6006         * tracepoint.c (set_traceframe_context)
6007         (print_one_static_tracepoint_marker): Remove init_sal references.
6008         Move declarations closer to initializations.
6009         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6010         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6011         declarations closer to initializations.
6012         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6013         init_sal references.  Adjust.
6014
6015 2017-09-04  Pedro Alves  <palves@redhat.com>
6016
6017         * ax-gdb.c (agent_command_1): Use range-for.
6018         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6019         * breakpoint.c: Include "common/array-view.h".
6020         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6021         parameter from struct symtabs_and_lines to
6022         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6023         (breakpoint_sals_to_pc): Change sals parameter from struct
6024         symtabs_and_lines to std::vector reference.
6025         (check_fast_tracepoint_sals): Change sals parameter from struct
6026         symtabs_and_lines to std::array_view.  Use range-for.
6027         (decode_static_tracepoint_spec): Return a std::vector instead of
6028         symtabs_and_lines.  Update.
6029         (create_breakpoint): Update.
6030         (break_range_command, until_break_command, clear_command): Update.
6031         (base_breakpoint_decode_location, bkpt_decode_location)
6032         (bkpt_probe_create_sals_from_location)
6033         (bkpt_probe_decode_location, tracepoint_decode_location)
6034         (tracepoint_probe_decode_location)
6035         (strace_marker_create_sals_from_location): Return a std::vector
6036         instead of symtabs_and_lines.
6037         (strace_marker_create_breakpoints_sal): Update.
6038         (strace_marker_decode_location): Return a std::vector instead of
6039         symtabs_and_lines.  Update.
6040         (update_breakpoint_locations): Change struct symtabs_and_lines
6041         parameters to gdb::array_view.  Adjust.
6042         (location_to_sals): Return a std::vector instead of
6043         symtabs_and_lines.  Update.
6044         (breakpoint_re_set_default): Use std::vector instead of struct
6045         symtabs_and_lines.
6046         (decode_location_default): Return a std::vector instead of
6047         symtabs_and_lines.  Update.
6048         * breakpoint.h: Include "common/array-view.h".
6049         (struct breakpoint_ops) <decode_location>: Now returns a
6050         std::vector instead of returning a symtabs_and_lines via output
6051         parameter.
6052         (update_breakpoint_locations): Change sals parameters to use
6053         gdb::array_view.
6054         * cli/cli-cmds.c (edit_command, list_command): Update to use
6055         std::vector and gdb::array_view.
6056         (ambiguous_line_spec): Adjust to use gdb::array_view and
6057         range-for.
6058         (compare_symtabs): Rename to ...
6059         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6060         const reference and adjust.
6061         (filter_sals): Rewrite using std::vector and standard algorithms.
6062         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6063         (jump_command): Update to use std::vector.
6064         * linespec.c (struct linespec_state) <canonical_names>: Update
6065         comment.
6066         (add_sal_to_sals_basic): Delete.
6067         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6068         (decode_line_2, create_sals_line_offset)
6069         (convert_address_location_to_sals, convert_linespec_to_sals)
6070         (convert_explicit_location_to_sals, parse_linespec)
6071         (event_location_to_sals, decode_line_full, decode_line_1)
6072         (decode_line_with_current_source)
6073         (decode_line_with_last_displayed, decode_objc)
6074         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6075         (linespec_result::~linespec_result): Adjust to use std::vector
6076         instead of symtabs_and_lines.
6077         * linespec.h (linespec_sals::sals): Now a std::vector.
6078         (struct linespec_result): Use std::vector, bool, and in-class
6079         initialization.
6080         (decode_line_1, decode_line_with_current_source)
6081         (decode_line_with_last_displayed): Return std::vector.
6082         * macrocmd.c (info_macros_command): Use std::vector.
6083         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6084         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6085         std::vector.
6086         * probe.h (parse_probes): Return a std::vector.
6087         * python/python.c (gdbpy_decode_line): Use std::vector and
6088         gdb::array_view.
6089         * source.c (select_source_symtab, line_info): Use std::vector.
6090         * stack.c (func_command): Use std::vector.
6091         * symtab.h (struct symtabs_and_lines): Delete.
6092         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6093
6094 2017-09-04  Pedro Alves  <palves@redhat.com>
6095
6096         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6097         unittests/array-view-selftests.c.
6098         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6099         * common/array-view.h: New file.
6100         * unittests/array-view-selftests.c: New file.
6101
6102 2017-09-04  Pedro Alves  <palves@redhat.com>
6103
6104         * cli/cli-cmds.c (edit_command): Pass message to
6105         ambiguous_line_spec.
6106         (list_command): Pass message to ambiguous_line_spec.  Say
6107         "first"/"last" instead of "start" and "end" to be consistent with
6108         the manual.
6109         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6110         them to print formatted message.
6111
6112 2017-09-04  Pedro Alves  <palves@redhat.com>
6113
6114         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6115         ftrace_update_insns by reference instead of pointer.
6116
6117 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6118
6119         * i386-go32-tdep.c: Include x86-xstate.h.
6120         (i386_go32_init_abi): Call i386_target_description.
6121         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6122         if xcr0 is X86_XSTATE_X87_MASK.
6123         * i386-tdep.h (tdesc_i386): Remove the declaration.
6124         (tdesc_i386_mmx): Likewise.
6125
6126 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6127
6128         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6129         X86_XSTATE_SSE_MASK instead of 0.
6130
6131 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6132
6133         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6134         i386_target_description.
6135         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6136         i386_target_description.
6137         * i386-tdep.c (i386_gdbarch_init): Likewise.
6138
6139 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6140
6141         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6142         (x86_darwin_init_abi_64): Call amd64_target_description.
6143         * amd64-dicos-tdep.c: Likewise.
6144         * amd64-fbsd-nat.c: Likewise.
6145         * amd64-fbsd-tdep.c: Likewise.
6146         * amd64-nbsd-tdep.c: Likewise.
6147         * amd64-obsd-tdep.c: Likewise.
6148         * amd64-sol2-tdep.c: Likewise.
6149         * amd64-windows-tdep.c: Likewise.
6150         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6151
6152 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6153
6154         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6155         (btrace_function) <insn>: Change type to use std::vector.
6156         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6157         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6158         ftrace_update_insns, ftrace_compute_global_level_offset,
6159         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6160         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6161         change to std::vector.
6162         (ftrace_update_insns): Adjust to change to std::vector, change
6163         type of INSN parameter.
6164         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6165         * record-btrace.c (btrace_call_history_insn_range,
6166         btrace_compute_src_line_range,
6167         record_btrace_frame_prev_register): Adjust to change to
6168         std::vector.
6169         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6170         to change to std::vector.
6171
6172 2017-09-03  Tom Tromey  <tom@tromey.com>
6173
6174         * corefile.c (reopen_exec_file): Use std::string.
6175
6176 2017-09-03  Tom Tromey  <tom@tromey.com>
6177
6178         * compile/compile.c (compile_register_name_mangled): Return
6179         std::string.
6180         * compile/compile-loc2c.c (pushf_register_address): Update.
6181         (pushf_register): Update.
6182         * compile/compile-c-types.c (convert_array): Update.
6183         * compile/compile-c-symbols.c (generate_vla_size): Update.
6184         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6185         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6186         (convert_one_symbol): Update.
6187         (generate_c_for_for_one_variable): Update.
6188         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6189         std::string.
6190         (generate_register_struct): Update.
6191         * compile/compile-internal.h (c_get_range_decl_name): Return a
6192         std::string.
6193         (compile_register_name_mangled): Return std::string.
6194
6195 2017-09-03  Tom Tromey  <tom@tromey.com>
6196
6197         * utils.c (perror_string): Return a std::string.
6198         (throw_perror_with_name, perror_warning_with_name): Update.
6199
6200 2017-09-03  Tom Tromey  <tom@tromey.com>
6201
6202         * demangle.c (demangle_command): Use std::string,
6203         unique_xmalloc_ptr.
6204
6205 2017-09-03  Tom Tromey  <tom@tromey.com>
6206
6207         * cli/cli-setshow.c (do_set_command): Use std::string.
6208
6209 2017-09-03  Tom Tromey  <tom@tromey.com>
6210
6211         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6212
6213 2017-09-03  Tom Tromey  <tom@tromey.com>
6214
6215         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6216
6217 2017-09-03  Tom Tromey  <tom@tromey.com>
6218
6219         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6220         gdb::unique_xmalloc_ptr.
6221
6222 2017-09-03  Tom Tromey  <tom@tromey.com>
6223
6224         * thread.c (print_thread_info_1): Use string_printf.
6225         (thread_apply_command, thread_apply_all_command): Use
6226         std::string.
6227
6228 2017-09-03  Tom Tromey  <tom@tromey.com>
6229
6230         * valprint.c (val_print_string): Update.
6231         * gdbcore.h (memory_error_message): Return std::string.
6232         * corefile.c (memory_error_message): Return std::string.
6233         (memory_error): Update.
6234         * breakpoint.c (insert_bp_location): Update.
6235
6236 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6237
6238         * target/waitstatus.h (target_waitstatus_to_string): Change
6239         return type to std::string.
6240         * target/waitstatus.c (target_waitstatus_to_string): Return
6241         std::string.
6242         * target.h (target_waitstatus_to_string): Remove declaration.
6243         * infrun.c (resume, clear_proceed_status_thread,
6244         print_target_wait_results, do_target_wait, save_waitstatus,
6245         stop_all_threads): Adjust.
6246         * record-btrace.c (record_btrace_wait): Adjust.
6247         * target-debug.h
6248         (target_debug_print_struct_target_waitstatus_p): Adjust.
6249
6250 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6251
6252         PR gdb/22046
6253         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6254         detection.
6255
6256 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6257
6258         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6259         for setting/unsetting environment variables on the remote target.
6260         (New remote packets): Add entries for QEnvironmentHexEncoded,
6261         QEnvironmentUnset and QEnvironmentReset.
6262         * common/environ.c (gdb_environ::operator=): Extend method to
6263         handle m_user_set_env_list and m_user_unset_env_list.
6264         (gdb_environ::clear): Likewise.
6265         (match_var_in_string): Change type of first parameter from 'char
6266         *' to 'const char *'.
6267         (gdb_environ::set): Extend method to handle
6268         m_user_set_env_list and m_user_unset_env_list.
6269         (gdb_environ::unset): Likewise.
6270         (gdb_environ::clear_user_set_env): New method.
6271         (gdb_environ::user_set_envp): Likewise.
6272         (gdb_environ::user_unset_envp): Likewise.
6273         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6274         m_user_unset_env_list on move constructor/assignment.
6275         (unset): Add new default parameter 'update_unset_list = true'.
6276         (clear_user_set_env): New method.
6277         (user_set_envp): Likewise.
6278         (user_unset_envp): Likewise.
6279         (m_user_set_env_list): New std::set.
6280         (m_user_unset_env_list): Likewise.
6281         * common/rsp-low.c (hex2str): New function.
6282         (bin2hex): New overload for bin2hex function.
6283         * common/rsp-low.c (hex2str): New prototype.
6284         (str2hex): New overload prototype.
6285         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6286         QEnvironmentUnset and QEnvironmentReset.
6287         (remote_protocol_features): Add QEnvironmentHexEncoded,
6288         QEnvironmentUnset and QEnvironmentReset packets.
6289         (send_environment_packet): New function.
6290         (extended_remote_environment_support): Likewise.
6291         (extended_remote_create_inferior): Call
6292         extended_remote_environment_support.
6293         (_initialize_remote): Add QEnvironmentHexEncoded,
6294         QEnvironmentUnset and QEnvironmentReset packet configs.
6295         * unittests/environ-selftests.c (gdb_selftest_env_var):
6296         New variable.
6297         (test_vector_initialization): New function.
6298         (test_init_from_host_environ): Likewise.
6299         (test_reinit_from_host_environ): Likewise.
6300         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6301         Likewise.
6302         (test_unset_set_empty_vector): Likewise.
6303         (test_vector_clear): Likewise.
6304         (test_std_move): Likewise.
6305         (test_move_constructor):
6306         (test_self_move): Likewise.
6307         (test_set_unset_reset): Likewise.
6308         (run_tests): Rewrite in terms of the functions above.
6309
6310 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6311
6312         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6313         (adi_available): Use a temp variable of type CORE_ADDR as argument
6314         3 when calling target_auxv_search.
6315         (adi_normalize_address): Use masks and xor operators to calculate
6316         normalized address.
6317         (adi_read_versions, adi_write_versions, adi_print_versions)
6318         (do_examine, do_assign): Use paddress.
6319
6320 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6321
6322         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6323         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6324         out of loop and add supply of FIR.
6325         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6326         add collect of FIR.
6327
6328 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6329
6330         PR gdb/21827
6331         * cli/cli-script.c (define_command): Don't convert command name
6332         to lower case.
6333
6334 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6335
6336         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6337         Update all callers accordingly. Remove all code blocks handling
6338         the case where DISPP is not NULL.
6339
6340 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6341
6342         PR symtab/22003
6343         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6344         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6345         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6346
6347 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6348
6349         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6350         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6351         (read_comp_units_from_section): New parameter abbrev_section, use
6352         read_and_check_comp_unit_head, allocate signatured_type if needed.
6353         (create_all_comp_units): Update read_comp_units_from_section caller.
6354
6355 2017-08-23  Pedro Alves  <palves@redhat.com>
6356
6357         PR remote/21852
6358         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6359         to null_ptid and switch to thread without reading the registers
6360         after adding the inferior.
6361
6362 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6363
6364         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6365         compile-gcc.
6366         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6367         (compile_to_object): Implement compile_gcc.
6368         (_initialize_compile): Install "set compile-gcc".  Initialize
6369         compile_gcc.
6370
6371 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6372
6373         * compile/compile.c (compile_to_object): Conditionally call
6374         set_verbose.  Conditionally call compile or compile_v0.
6375
6376 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6377
6378         * sparc64-tdep.h: (adi_normalize_address): New export.
6379         * sparc-nat.h: (open_adi_tag_fd): New export.
6380         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6381         * sparc64-linux-tdep.c:
6382         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6383         (sparc64_linux_handle_segmentation_fault): New function.
6384         (sparc64_linux_init_abi): Register
6385         sparc64_linux_handle_segmentation_fault
6386         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6387         (sparc64_addr_bits_remove): New function.
6388         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6389         (MAX_PROC_NAME_SIZE): New macro.
6390         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6391         (sparc64adilist): New variable.
6392         (adi_proc_list): New variable.
6393         (find_adi_info): New function.
6394         (add_adi_info): New function.
6395         (get_adi_info_proc): New function.
6396         (get_adi_info): New function.
6397         (info_adi_command): New function.
6398         (read_maps_entry): New function.
6399         (adi_available): New function.
6400         (adi_normalize_address): New function.
6401         (adi_align_address): New function.
6402         (adi_convert_byte_count): New function.
6403         (adi_tag_fd): New function.
6404         (adi_is_addr_mapped): New function.
6405         (adi_read_versions): New function.
6406         (adi_write_versions): New function.
6407         (adi_print_versions): New function.
6408         (do_examine): New function.
6409         (do_assign): New function.
6410         (adi_examine_command): New function.
6411         (adi_assign_command): New function.
6412         (_initialize_sparc64_adi_tdep): New function.
6413
6414 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
6415
6416         * breakpoint.c (breakpoints_info): Rename to ...
6417         (info_breakpoints_command): ... this.
6418         (watchpoints_info): Rename to ...
6419         (info_watchpoints_command): ... this.
6420         (tracepoints_info): Rename to ...
6421         (info_tracepoints_command): ... this.
6422         (_initialize_breakpoint): Adjust.
6423         * dcache.c (dcache_info): Rename to ...
6424         (info_display_command): ... this.
6425         (_initialize_dcache): Adjust.
6426         * frame.h (args_info): Rename to ...
6427         (info_args_command): ... this.
6428         (locals_info): Rename to ...
6429         (info_locals_command): ... this.
6430         * infcmd.c (nofp_registers_info): Rename to ...
6431         (info_registers_command): ... this.
6432         (float_info): Rename to ...
6433         (info_float_command): ... this.
6434         (program_info): Rename to ...
6435         (info_program_command): ... this.
6436         (all_registers_info): Rename to ...
6437         (info_all_registers_command): ... this.
6438         (vector_info): Rename to ...
6439         (info_vector_command): ... this.
6440         (float_info): Rename to ...
6441         (info_float_command): ... this.
6442         (_initialize_infcmd): Adjust.
6443         * inferior.h (term_info): Rename to ...
6444         (info_terminal_command): ... this.
6445         * inflow.c (term_info): Rename to ...
6446         (info_terminal_command): ... this.
6447         (_initialize_inflow): Adjust.
6448         * infrun.c (signals_info): Rename to ...
6449         (info_signals_command): ... this.
6450         (_initialize_infrun): Adjust.
6451         * objc-lang.c (classes_info): Rename to ...
6452         (info_classes_command): ... this.
6453         (selectors_info): Rename to ...
6454         (info_selectors_command): ... this.
6455         (_initialize_objc_language): Adjust.
6456         * printcmd.c (sym_info): Rename to ...
6457         (info_symbol_command): ... this.
6458         (address_info): Rename to ...
6459         (info_address_command): ... this.
6460         (display_info): Rename to ...
6461         (info_display_command): ... this.
6462         (_initialize_printcmd): Adjust.
6463         * reverse.c (bookmarks_info): Rename to ...
6464         (info_breakpoints_command): ... this.
6465         (_initialize_reverse): Adjust.
6466         * ser-go32.c (dos_info): Rename to ...
6467         (info_serial_command): ... this.
6468         (_initialize_ser_dos): Adjust.
6469         * skip.c (skip_info): Rename to ...
6470         (info_skip_command): ... this.
6471         (_initialize_step_skip): Adjust.
6472         * source.c (line_info): Rename to ...
6473         (info_line_command): ... this.
6474         (source_info): Rename to ...
6475         (info_source_command)
6476         * stack.c (frame_info): Rename to ...
6477         (info_frame_command): ... this.
6478         (locals_info): Rename to ...
6479         (info_locals_command): ... this.
6480         (args_info): Rename to ...
6481         (info_args_command): ... this.
6482         (_initialize_stack): Adjust.
6483         * symtab.c (sources_info): Rename to ...
6484         (info_sources_command): ... this.
6485         (variables_info): Rename to ...
6486         (info_variables_command): ... this.
6487         (functions_info): Rename to ...
6488         (info_functions_command): ... this.
6489         (types_info): Rename to ...
6490         (info_types_command): ... this.
6491         (_initialize_symtab): Adjust.
6492         * target.c (target_info): Rename to ...
6493         (info_target_command): ... this.
6494         (initialize_targets): Adjust.
6495         * tracepoint.c (tvariables_info): Rename to ...
6496         (info_tvariables_command): ... this.
6497         (scope_info): Rename to ...
6498         (info_scope_command): ... this.
6499         (trace_dump_actions): Adjust.
6500         (_initialize_tracepoint): Adjust.
6501
6502 2017-08-22  Tom Tromey  <tom@tromey.com>
6503
6504         * breakpoint.h (install_breakpoint): Update.
6505         * breakpoint.c (add_solib_catchpoint): Update.
6506         (install_breakpoint): Change argument to a std::unique_ptr.
6507         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6508         (create_breakpoint_sal, create_breakpoint): Update.
6509         (watch_command_1, catch_exec_command_1)
6510         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6511         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6512         Return the breakpoint.
6513         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6514         (new_single_step_breakpoint): Update.
6515         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6516         std::unique_ptr.
6517         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6518         std::unique_ptr.
6519         * break-catch-sig.c (create_signal_catchpoint): Use
6520         std::unique_ptr.
6521         * ada-lang.c (create_ada_exception_catchpoint): Use
6522         std::unique_ptr.
6523
6524 2017-08-22  Tom Tromey  <tom@tromey.com>
6525
6526         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6527
6528 2017-08-22  Tom Tromey  <tom@tromey.com>
6529
6530         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6531         (lookup_partial_symbol): Update.
6532
6533 2017-08-22  Tom Tromey  <tom@tromey.com>
6534
6535         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6536         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6537         (find_and_open_source, symtab_to_fullname): Update.
6538         * psymtab.c (psymtab_to_fullname): Update.
6539
6540 2017-08-22  Tom Tromey  <tom@tromey.com>
6541
6542         * exec.c (exec_file_attach): Update.
6543         * linux-thread-db.c (try_thread_db_load): Update.
6544         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6545         * utils.c (gdb_realpath): Change return type.
6546         (gdb_realpath_keepfile): Update.
6547         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6548         (_initialize_utils): Register the new self test.
6549         * source.c (openp): Update.
6550         (find_and_open_source): Update.
6551         * nto-tdep.c (nto_find_and_open_solib): Update.
6552         * main.c (set_gdb_data_directory): Update.
6553         (captured_main_1): Update.
6554         * dwarf2read.c (dwarf2_get_dwz_file): Update
6555         (dw2_map_symbol_filenames): Update.
6556         * auto-load.c (auto_load_safe_path_vec_update): Update.
6557         (filename_is_in_auto_load_safe_path_vec): Change type of
6558         "filename_realp".
6559         (auto_load_objfile_script): Update.
6560         (file_is_auto_load_safe): Update.  Use std::string.
6561         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6562
6563 2017-08-22  Tom Tromey  <tom@tromey.com>
6564
6565         * utils.c (gdb_realpath_keepfile): Return a
6566         gdb::unique_xmalloc_ptr.
6567         * exec.c (exec_file_attach): Update.
6568         * utils.h (gdb_realpath_keepfile): Return a
6569         gdb::unique_xmalloc_ptr.
6570
6571 2017-08-22  Tom Tromey  <tom@tromey.com>
6572
6573         * compile/compile.c (compile_file_command): Use
6574         gdb::unique_xmalloc_ptr, std::string.
6575         * utils.c (gdb_abspath): Change return type.
6576         * source.c (openp): Update.
6577         * objfiles.c (allocate_objfile): Update.
6578         * main.c (set_gdb_data_directory): Update.
6579         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6580
6581 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6582
6583         * cli-cmds.c (list_commands): List actual code around more than
6584         one location.
6585
6586 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6587
6588         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6589
6590 2017-08-21  Pedro Alves  <palves@redhat.com>
6591
6592         PR gdb/19487
6593         * c-exp.y (variable production): Handle function aliases.
6594         * minsyms.c (msymbol_is_text): New function.
6595         * minsyms.h (msymbol_is_text): Declare.
6596         * symtab.c (find_function_alias_target): New function.
6597         * symtab.h (find_function_alias_target): Declare.
6598
6599 2017-08-21  Pedro Alves  <palves@redhat.com>
6600
6601         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6602         typedefs.
6603         * typeprint.c (whatis_exp): If handling "whatis", and expression
6604         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6605         typedefs here.
6606         * valops.c (value_cast): Save "to" type before resolving
6607         stubs/typedefs.  Use that type as resulting value's type.
6608
6609 2017-08-18  Tom Tromey  <tom@tromey.com>
6610             Pedro Alves  <palves@redhat.com>
6611
6612         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6613         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6614         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6615         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6616         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6617         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6618         (linux_get_siginfo_data): Add "thread" argument.  Use
6619         scoped_restore.
6620         * linux-nat.c (linux_child_follow_fork)
6621         (check_stopped_by_watchpoint): Use scoped_restore.
6622         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6623         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6624         (restore_inferior_ptid, save_inferior_ptid): Remove.
6625         * btrace.c (btrace_fetch): Use scoped_restore.
6626         * bsd-uthread.c (bsd_uthread_fetch_registers)
6627         (bsd_uthread_store_registers): Use scoped_restore.
6628         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6629         scoped_restore.
6630         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6631         (aix_thread_xfer_partial): Use scoped_restore.
6632         * inferior.h (save_inferior_ptid): Remove.
6633
6634 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6635
6636         PR tdep/21818
6637         * arm-tdep.c (gdb_print_insn_arm): Mark
6638         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6639
6640 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6641
6642         * NEWS: Mention GDBserver's new option "--selftest".
6643         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6644         * selftest.c: Move it to common/selftest.c.
6645         * selftest.h: Move it to common/selftest.h.
6646         * selftest-arch.c (reset): New function.
6647         (tests_with_arch): Call reset.
6648
6649 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6650
6651         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6652         instead of exception_fprintf and printf_filtered.
6653
6654 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6655
6656         * selftest.c (register_self_test): Rename it to
6657         selftests::register_test.
6658         (run_self_tests): selftest::run_tests.
6659         * selftest.h: Update declarations.
6660         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6661         selftests::register_test_foreach_arch.
6662         * selftest-arch.h: Update declaration.
6663         * aarch64-tdep.c: Update.
6664         * arm-tdep.c: Likewise.
6665         * disasm-selftests.c: Likewise.
6666         * dwarf2loc.c: Likewise.
6667         * dwarf2-frame.c: Likewise.
6668         * findvar.c: Likewise.
6669         * gdbarch-selftests.c: Likewise.
6670         * maint.c (maintenance_selftest): Likewise.
6671         * regcache.c: Likewise.
6672         * rust-exp.y: Likewise.
6673         * selftest-arch.c: Likewise.
6674         * unittests/environ-selftests.c: Likewise.
6675         * unittests/function-view-selftests.c: Likewise.
6676         * unittests/offset-type-selftests.c: Likewise.
6677         * unittests/optional-selftests.c: Likewise.
6678         * unittests/scoped_restore-selftests.c: Likewise.
6679         * utils-selftests.c: Likewise.
6680
6681 2017-08-17  Pedro Alves  <palves@redhat.com>
6682
6683         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6684         local.
6685
6686 2017-08-17  Pedro Alves  <palves@redhat.com>
6687
6688         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6689         field.
6690         (reset_die_in_process): Delete, replaced by ...
6691         (process_die_scope): ... this new class.  Make it responsible for
6692         freeing cu->line_header too.
6693         (process_die): Use process_die_scope.
6694         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6695         cu->line_header_die_owner.  Don't release the line header if it's
6696         owned by the CU.
6697         (setup_type_unit_groups): Make the CU/DIE own the line header.
6698         Don't release the line header here.
6699
6700 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6701
6702         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6703
6704 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6705
6706         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6707         Single-Key mode
6708
6709 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6710
6711         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6712         mode command list.
6713
6714 2017-08-15  Stafford Horne  <shorne@gmail.com>
6715
6716         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6717
6718 2017-08-15  Stafford Horne  <shorne@gmail.com>
6719
6720         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6721
6722 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6723
6724         PR gdb/21954
6725         * infcmd.c (unset_environment_command): Use the 'clear' method on
6726         the environment instead of resetting it.
6727
6728 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6729
6730         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6731         platforms.
6732
6733 2017-08-14  Tom Tromey  <tom@tromey.com>
6734
6735         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6736         (print_binary_chars): Likewise.
6737         (BITS_IN_BYTES): Remove.
6738
6739 2017-08-14  Tom Tromey  <tom@tromey.com>
6740
6741         PR gdb/21675
6742         * valprint.c (LOW_ZERO): Change value to 034.
6743         (print_octal_chars): Add static_asserts for octal constants.
6744         * printcmd.c (print_scalar_formatted): Add 'd' case.
6745
6746 2017-08-11  Tom Tromey  <tom@tromey.com>
6747
6748         * symfile.c (add_symbol_file_command): Use std::vector.
6749
6750 2017-08-14  Tom Tromey  <tom@tromey.com>
6751
6752         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6753         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6754         std::move.
6755         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6756
6757 2017-08-11  Pedro Alves  <palves@redhat.com>
6758
6759         * infrun.c (process_event_stop_test): Adjust
6760         function_name_is_marked_for_skip call.
6761         * skip.c: Include <list>.
6762         (skiplist_entry): Make it a class with private fields, and
6763         getters/setters.
6764         (skiplist_entry_chain): Delete.
6765         (skiplist_entries): New.
6766         (skiplist_entry_count): Delete.
6767         (highest_skiplist_entry_num): New.
6768         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6769         (add_skiplist_entry): Delete.
6770         (skiplist_entry::skiplist_entry): New.
6771         (skiplist_entry::add_entry): New.
6772         (skip_file_command, skip_function): Adjust.
6773         (compile_skip_regexp): Delete.
6774         (skip_command): Don't compile regexp here.  Adjust to use
6775         skiplist_entry::add_entry.
6776         (skip_info): Adjust to use range-for and getters.
6777         (skip_enable_command, skip_disable_command): Adjust to use
6778         range-for and setters.
6779         (skip_delete_command): Adjust to use std::list.
6780         (add_skiplist_entry): Delete.
6781         (skip_file_p): Delete, refactored as ...
6782         (skiplist_entry::do_skip_file_p): ... this new method.
6783         (skip_gfile_p): Delete, refactored as ...
6784         (skiplist_entry::do_gskip_file_p): ... this new method.
6785         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6786         (skiplist_entry::skip_function_p): ... this new method.
6787         (function_name_is_marked_for_skip): Now returns bool, and takes
6788         the function sal by const reference.  Adjust to use range-for and
6789         skiplist_entry methods.
6790         (_initialize_step_skip): Remove references to
6791         skiplist_entry_chain, skiplist_entry_count.
6792         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6793         takes the function sal by const reference.
6794
6795 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6796
6797         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6798         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6799         (dwarf2_frame_cache):
6800         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6801         RETURN_MASK_ALL and set *this_case to NULL.
6802         * frame-unwind.h: Update comments.
6803
6804 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6805
6806         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6807         (dwarf2_frame_state_copy_regs): Remove.
6808         (dwarf2_frame_state_free_regs): Remove.
6809         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6810         (dwarf2_restore_rule): Call method .alloc_regs instead of
6811         dwarf2_frame_state_alloc_regs.
6812         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6813         constructor.  Call std::move.
6814         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6815         (dwarf2_frame_cache): Likewise.
6816
6817         [GDB_SELF_TEST]: Include selftest.h and
6818         selftest-arch.h.
6819         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6820         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6821         execute_cfa_program_test.
6822
6823         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6824         copy ctor, assignment operator, move assignment.
6825         <alloc_regs>: New method.
6826         <swap>: New method.
6827         (struct dwarf2_frame_state): Delete dtor.
6828         (dwarf2_frame_state_alloc_regs): Remove declaration.
6829         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6830         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6831
6832 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6833
6834         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6835         (dwarf2_frame_state::dwarf2_frame_state): New.
6836         (dwarf2_frame_state::~dwarf2_frame_state): New.
6837         (dwarf2_fetch_cfa_info): Update.
6838         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6839         rather than a pointer.  Update code.
6840         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6841         dtor.
6842         <data_align, code_align, retaddr_column>: Change them to const.
6843         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6844         to bool.
6845
6846 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6847
6848         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6849         <loc.exp>: New field.
6850         * dwarf2-frame.c (execute_cfa_program): Update.
6851         (dwarf2_frame_prev_register): Update.
6852
6853 2017-08-10  Pedro Alves  <palves@redhat.com>
6854
6855         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6856
6857 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6858
6859         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6860         (fbsd_pending_children): Use std::list.
6861         (fbsd_remember_child): Likewise.
6862         (fbsd_is_child_pending): Likewise.
6863         (fbsd_pending_vfork_done): Use std::forward_list.
6864         (fbsd_add_vfork_done): Likewise.
6865         (fbsd_is_vfork_done_pending): Likewise.
6866         (fbsd_next_vfork_done): Likewise.
6867
6868 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6869
6870         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6871         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6872         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6873         for `mapfilename'.
6874         (fbsd_xfer_partial): Use gdb::byte_vector.
6875         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6876
6877 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6878
6879         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6880         "filestuff.h".
6881         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6882
6883 2017-08-09  Tom Tromey  <tom@tromey.com>
6884
6885         * skip.c (skiplist_entry): New constructor.
6886         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6887         (skiplist_entry::file_is_glob): Now bool.
6888         (skiplist_entry::file, skiplist_entry::function): Now
6889         std::string.
6890         (make_skip_entry): Return a unique_ptr.  Use new.
6891         (free_skiplist_entry, free_skiplist_entry_cleanup)
6892         (make_free_skiplist_entry_cleanup): Remove.
6893         (skip_command, skip_disable_command, add_skiplist_entry)
6894         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6895         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6896         (function_name_is_marked_for_skip): Update.
6897         (skip_delete_command): Update.  Use delete.
6898
6899 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6900
6901         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6902         (aarch64_linux_core_read_description): New function.
6903         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6904
6905 2017-08-09  Pedro Alves  <palves@redhat.com>
6906
6907         * cp-name-parser.y (cp_comp_to_string): Return a
6908         gdb::unique_xmalloc_ptr<char>.
6909         * cp-support.c (replace_typedefs_qualified_name)
6910         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6911         (cp_canonicalize_string_full): Use op= instead of explicit
6912         convertion.
6913         (cp_class_name_from_physname, method_name_from_physname)
6914         (cp_func_name, cp_remove_params): Adjust to use
6915         gdb::unique_xmalloc_ptr<char>.
6916         * cp-support.h (cp_comp_to_string): Return a
6917         gdb::unique_xmalloc_ptr<char>.
6918         * python/py-type.c (typy_lookup_type): Adjust to use
6919         gdb::unique_xmalloc_ptr<char>.
6920
6921 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6922
6923         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6924
6925 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6926             Yao Qi  <yao.qi@linaro.org>
6927
6928         * cp-support.c (cp_canonicalize_string_full): Use
6929         gdb::unique_xmalloc_ptr<char>.
6930         (cp_canonicalize_string): Likewise.
6931
6932 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6933
6934         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6935         * regformats/i386/amd64-avx-avx512.dat: Remove.
6936         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6937         * regformats/i386/amd64-avx-mpx.dat:Remove.
6938         * regformats/i386/amd64-avx.dat: Remove.
6939         * regformats/i386/amd64-mpx.dat: Remove.
6940         * regformats/i386/i386-avx-avx512.dat: Remove.
6941         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6942         * regformats/i386/i386-avx-mpx.dat: Remove.
6943         * regformats/i386/i386-mmx.dat: Remove.
6944         * regformats/i386/i386-mpx.dat: Remove.
6945
6946 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6947
6948         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6949         * amd64-tdep.c: Don't include features/i386/x32*.c.
6950         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6951         functions.
6952         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6953         and i386/x32-avx-avx512.
6954         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6955         and i386/x32.xml.
6956         * features/i386/x32-avx-avx512.c: Removed.
6957         * features/i386/x32-avx-avx512.xml: Removed.
6958         * features/i386/x32-avx.c: Removed.
6959         * features/i386/x32-avx.xml: Removed.
6960         * features/i386/x32.c: Removed.
6961         * features/i386/x32.xml: Removed.
6962         * regformats/i386/x32-avx-avx512.dat: Removed.
6963         * regformats/i386/x32-avx.dat: Removed.
6964         * regformats/i386/x32.dat: Removed.
6965
6966 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6967
6968         PR breakpoints/21886
6969         * mem-break.c (default_memory_insert_breakpoint): Use
6970         `->placed_address' rather than `->reqstd_address' for the
6971         breakpoint location.
6972
6973 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6974
6975         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6976         assertions.
6977
6978 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6979
6980         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6981         a union of `tdep_info', `tdesc_data' and `id'.
6982         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6983         rather than `info.tdep_info'.
6984         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6985         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6986         * i386-tdep.c (i386_gdbarch_init): Likewise.
6987         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6988         * mips-tdep.c (mips_gdbarch_init): Likewise.
6989         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6990         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6991         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6992         `info.tdep_info'.
6993         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6994         `info.tdep_info'.
6995         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6996         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6997         `info.tdep_info'.
6998         * spu-tdep.c (spu_gdbarch_init): Likewise.
6999         * gdbarch.h: Regenerate.
7000
7001 2017-08-07  Leszek Swirski  <leszeks@google.com>
7002
7003         PR symtab/20899
7004         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7005
7006 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7007
7008         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7009         (gdbsim_open): Rename gdb_argv args object to argv.
7010
7011 2017-08-05  Tom Tromey  <tom@tromey.com>
7012
7013         * compile/compile-object-load.c (compile_object_load): Use
7014         gdb::unique_xmalloc_ptr.
7015         * cli/cli-dump.c (scan_filename): Rename from
7016         scan_filename_with_cleanup.  Change return type.
7017         (scan_expression): Rename from scan_expression_with_cleanup.
7018         Change return type.
7019         (dump_memory_to_file, dump_value_to_file, restore_command):
7020         Use gdb::unique_xmalloc_ptr.  Update.
7021         * cli/cli-cmds.c (find_and_open_script): Use
7022         gdb::unique_xmalloc_ptr.
7023         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7024         * symmisc.c (maintenance_print_symbols)
7025         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7026         * symfile.c (symfile_bfd_open, generic_load)
7027         (add_symbol_file_command, remove_symbol_file_command): Use
7028         gdb::unique_xmalloc_ptr.
7029         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7030         * psymtab.c (maintenance_print_psymbols): Use
7031         gdb::unique_xmalloc_ptr.
7032         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7033         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7034         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7035         (reload_shared_libraries_1): Likewise.
7036
7037 2017-08-05  Tom Tromey  <tom@tromey.com>
7038
7039         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7040         (rust_op_vector, rust_set_vector): New typedefs.
7041         (current_parser): New global.
7042         (work_obstack): Change to pointer type.  Update all users.
7043         (rust_ast, pstate): Remove globals.
7044         (struct rust_parser): New.
7045         (%union) <params, field_inits>: Change type.
7046         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7047         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7048         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7049         (convert_params_to_types, convert_params_to_expression): Change
7050         type of "params".
7051         (ast_string): Change type of "fields".
7052         (rust_parse): Make a rust_parser.  Remove cleanups.
7053         (rust_lex_tests): Make and install an auto_obstack.
7054
7055 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7056
7057         * configure.srv (ipa_x32_linux_regobj): New.
7058         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7059         instead of X86_TDESC_AVX512.
7060         (initialize_low_tracepoint): Call
7061         init_registers_x32_avx_avx512_linux.
7062
7063 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7064
7065         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7066
7067 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7068
7069         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7070
7071 2017-08-03  Tom Tromey  <tom@tromey.com>
7072
7073         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7074         Remove.
7075         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7076
7077 2017-08-03  Tom Tromey  <tom@tromey.com>
7078
7079         * python/py-param.c (compute_enum_values): Use gdb_argv.
7080
7081 2017-08-03  Tom Tromey  <tom@tromey.com>
7082
7083         * utils.h (struct gdb_argv_deleter): New.
7084         (gdb_argv): New class.
7085         * utils.c (gdb_argv::reset): New method.
7086         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7087         * tracefile.c (tsave_command): Use gdb_argv.
7088         * top.c (new_ui_command): Use gdb_argv.
7089         * symmisc.c (maintenance_print_symbols)
7090         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7091         * symfile.c (symbol_file_command, generic_load)
7092         (remove_symbol_file_command): Use gdb_argv.
7093         * stack.c (backtrace_command): Use gdb_argv.
7094         * source.c (add_path, show_substitute_path_command)
7095         (unset_substitute_path_command, set_substitute_path_command):
7096         Use gdb_argv.
7097         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7098         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7099         * remote.c (extended_remote_run, remote_put_command)
7100         (remote_get_command, remote_delete_command): Use gdb_argv.
7101         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7102         (gdbsim_open): Use gdb_argv.
7103         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7104         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7105         * procfs.c (procfs_info_proc): Use gdb_argv.
7106         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7107         * infrun.c (handle_command): Use gdb_argv.
7108         * inferior.c (add_inferior_command, clone_inferior_command):
7109         Use gdb_argv.
7110         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7111         * exec.c (exec_file_command): Use gdb_argv.
7112         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7113         * compile/compile.c (build_argc_argv): Use gdb_argv.
7114
7115 2017-08-03  Tom Tromey  <tom@tromey.com>
7116
7117         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7118
7119 2017-08-03  Tom Tromey  <tom@tromey.com>
7120
7121         * python/python.c (compute_python_string): Return std::string.
7122         (gdbpy_eval_from_control_command): Update.
7123         (do_start_initialization): Use std::string.
7124         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7125         xstrprintf.
7126         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7127         xstrprintf.
7128
7129 2017-08-03  Tom Tromey  <tom@tromey.com>
7130
7131         * top.h (do_restore_instream_cleanup): Remove.
7132         * top.c (do_restore_instream_cleanup): Remove.
7133         (read_command_file): Use scoped_restore.
7134         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7135
7136 2017-08-03  Tom Tromey  <tom@tromey.com>
7137
7138         * cli/cli-script.c (execute_user_command)
7139         (execute_control_command): Use scoped_restore.
7140
7141 2017-08-03  Tom Tromey  <tom@tromey.com>
7142
7143         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7144         (execute_user_command): Remove user_call_depth; use
7145         user_args_stack's size instead.
7146
7147 2017-08-03  Tom Tromey  <tom@tromey.com>
7148
7149         * top.h (in_user_command): Remove.
7150         * top.c (in_user_command): Remove.
7151         * cli/cli-script.c (do_restore_user_call_depth)
7152         (execute_user_command): Update.
7153
7154 2017-08-03  Tom Tromey  <tom@tromey.com>
7155
7156         * valops.c (search_struct_method): Use gdb::byte_vector.
7157         * valarith.c (value_concat): Use std::vector.
7158         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7159         (simple_search_memory): Likewise.
7160         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7161         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7162         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7163         * elfread.c (elf_rel_plt_read): Use std::string.
7164         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7165         * cli/cli-dump.c (restore_section_callback): Use
7166         gdb::byte_vector.
7167
7168 2017-08-03  Tom Tromey  <tom@tromey.com>
7169
7170         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7171
7172 2017-08-03  Tom Tromey  <tom@tromey.com>
7173
7174         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7175         (tui_register_format): Use scoped_restore.
7176
7177 2017-08-03  Tom Tromey  <tom@tromey.com>
7178
7179         * reverse.c (exec_direction_default): Remove.
7180         (exec_reverse_once): Use scoped_restore.
7181         * remote.c (restore_remote_timeout): Remove.
7182         (remote_flash_erase, remote_flash_write, remote_flash_done)
7183         (readchar, remote_serial_write): Use scoped_restore.
7184         * cli/cli-script.c (struct source_cleanup_lines_args)
7185         (source_cleanup_lines): Remove.
7186         (script_from_file): Use scoped_restore.
7187         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7188         (source_command): Use scoped_restore.
7189
7190 2017-08-03  Tom Tromey  <tom@tromey.com>
7191
7192         * utils.h (make_cleanup_free_so): Remove.
7193         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7194         * solist.h (struct so_deleter): New.
7195         (so_list_up): New typedef.
7196         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7197
7198 2017-08-03  Tom Tromey  <tom@tromey.com>
7199
7200         * utils.h (make_cleanup_restore_current_language): Remove.
7201         * utils.c (do_restore_current_language)
7202         (make_cleanup_restore_current_language): Remove.
7203         * parse.c (parse_exp_in_context_1)
7204         (parse_expression_with_language): Use
7205         scoped_restore_current_language.
7206         * mi/mi-main.c (mi_cmd_execute): Use
7207         scoped_restore_current_language.
7208         * language.h (scoped_restore_current_language): New class.
7209
7210 2017-08-03  Tom Tromey  <tom@tromey.com>
7211
7212         * compile/compile.c (cleanup_unlink_file): Remove.
7213         (compile_to_object): Use gdb::unlinker.
7214         (eval_compile_command): Likewise.
7215
7216 2017-08-03  Tom Tromey  <tom@tromey.com>
7217
7218         * utils.h (make_cleanup_fclose): Remove.
7219         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7220
7221 2017-08-03  Tom Tromey  <tom@tromey.com>
7222
7223         * top.c (open_terminal_stream): Return gdb_file_up.
7224         (new_ui_command): Update.
7225
7226 2017-08-03  Tom Tromey  <tom@tromey.com>
7227
7228         * source.c (print_source_lines_base, forward_search_command)
7229         (reverse_search_command): Use gdb_file_up.
7230
7231 2017-08-03  Tom Tromey  <tom@tromey.com>
7232
7233         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7234
7235 2017-08-03  Tom Tromey  <tom@tromey.com>
7236
7237         * cli/cli-cmds.c (find_and_open_script): Change return type.
7238         Remove "streamp" and "full_path" parameters.
7239         (source_script_with_search): Update.
7240         * auto-load.c (source_script_file): Update.
7241         * cli/cli-cmds.h (find_and_open_script): Change type.
7242         (open_script): New struct.
7243
7244 2017-08-03  Tom Tromey  <tom@tromey.com>
7245
7246         * xml-support.c (xml_fetch_content_from_file): Update.
7247         * ui-file.c (stdio_file::open): Update.
7248         * tracefile-tfile.c (tfile_start): Update.
7249         * remote.c (remote_file_put, remote_file_get): Update.
7250         * nat/linux-procfs.c (linux_proc_get_int)
7251         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7252         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7253         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7254         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7255         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7256         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7257         * linux-nat.c (linux_proc_pending_signals): Update.
7258         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7259         (file_closer): Remove.
7260         * compile/compile.c (compile_to_object): Update.
7261         * common/filestuff.h (struct gdb_file_deleter): New.
7262         (gdb_file_up): New typedef.
7263         (gdb_fopen_cloexec): Change return type.
7264         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7265         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7266         (dump_binary_file, restore_binary_file): Update.
7267         * auto-load.c (auto_load_objfile_script_1): Update.
7268
7269 2017-08-03  Tom Tromey  <tom@tromey.com>
7270
7271         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7272         (info_static_tracepoint_markers_command): Likewise.
7273         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7274         * skip.c (skip_info): Use ui_out_emit_table.
7275         * progspace.c (print_program_space): Use ui_out_emit_table.
7276         * osdata.c (info_osdata): Use ui_out_emit_table.
7277         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7278         ui_out_emit_table.
7279         * linux-thread-db.c (info_auto_load_libthread_db): Use
7280         ui_out_emit_table.
7281         * inferior.c (print_inferior): Use ui_out_emit_table.
7282         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7283         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7284         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7285         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7286         * ui-out.h (class ui_out_emit_table): New.
7287
7288 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7289
7290         * mips-tdep.c (mips_fpu_type_str): New function.
7291         (mips_dump_tdep): Call it.
7292
7293 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7294
7295         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7296         `->mips_fpu_type'.
7297
7298 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7299
7300         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7301
7302 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7303
7304         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7305
7306 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7307
7308         * cli/cli-cmds.c (maintenancechecklist): New variable.
7309         * gdbcmd.h (maintenancechecklist): Declare it.
7310         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7311         Call i386_linux_read_description with different masks.
7312         * maint.c (maintenance_check_command): New function.
7313         (_initialize_maint_cmds): Call add_prefix_cmd.
7314         * target-descriptions.c (tdesc_reg): override operator != and ==.
7315         (tdesc_type): Likewise.
7316         (tdesc_feature): Likewise.
7317         (target_desc): Likewise.
7318         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7319         (maintenance_check_xml_descriptions): New function.
7320         (_initialize_target_descriptions) Add command "xml-descriptions".
7321         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7322
7323 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7324
7325         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7326         Include features/i386/32bit-*.c.
7327         (i386_linux_read_description): Generate target description if it
7328         doesn't exist.
7329         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7330         functions.
7331         * features/i386/32bit-linux.c: Re-generated.
7332         * features/i386/32bit-sse.c: Likewise.
7333         * target-descriptions.c (print_c_feature::visit): Print code to
7334         set register number if needed.
7335         (print_c_feature) <m_next_regnum>: New field.
7336
7337 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7338
7339         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7340         (FEATURE_XMLFILES): New.
7341         (FEATURE_CFILES): New.
7342         New rules.
7343         (clean-cfiles): Remove generated c files.
7344         * features/i386/32bit-avx.c: Generated.
7345         * features/i386/32bit-avx512.c: Generated.
7346         * features/i386/32bit-core.c: Generated.
7347         * features/i386/32bit-linux.c: Generated.
7348         * features/i386/32bit-mpx.c: Generated.
7349         * features/i386/32bit-pkeys.c: Generated.
7350         * features/i386/32bit-sse.c: Generated.
7351         * target-descriptions.c: Include algorithm.
7352         (tdesc_element_visitor): Add method visit_end.
7353         (print_c_tdesc): Implement visit_end.
7354         (print_c_tdesc:: m_filename_after_features): Move it to
7355         protected.
7356         (print_c_feature): New class.
7357         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7358         name starts with "i386/32bit-".
7359
7360 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7361
7362         * target-descriptions.c (tdesc_element_visitor): New class.
7363         (tdesc_element): New class.
7364         (tdesc_reg): Inherit from tdesc_element.
7365         (tdesc_reg::accept): New function.
7366         (tdesc_type): Inherit from tdesc_element.
7367         (tdesc_type::accept): New function.
7368         (tdesc_feature): Inherit from tdesc_element.
7369         (tdesc_feature::accept): New function.
7370         (target_desc): Inherit from tdesc_element.
7371         (target_desc::target_desc): New.
7372         (target_desc::~target_desc): New.
7373         (target_desc::accept): New.
7374         (allocate_target_description): Use new.
7375         (free_target_description): Use delete.
7376         (print_c_tdesc): New class.
7377         (maint_print_c_tdesc_cmd): Adjust.
7378
7379         * features/aarch64.c: Re-generated.
7380         * features/arc-arcompact.c: Re-generated.
7381         * features/arc-v2.c: Re-generated.
7382         * features/arm/arm-with-iwmmxt.c: Re-generated.
7383         * features/arm/arm-with-m.c: Re-generated.
7384         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7385         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7386         * features/arm/arm-with-neon.c: Re-generated.
7387         * features/arm/arm-with-vfpv2.c: Re-generated.
7388         * features/arm/arm-with-vfpv3.c: Re-generated.
7389         * features/i386/amd64-avx-avx512.c: Re-generated.
7390         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7391         * features/i386/amd64-avx.c: Re-generated.
7392         * features/i386/amd64-avx-linux.c: Re-generated.
7393         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7394         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7395         * features/i386/amd64-avx-mpx.c: Re-generated.
7396         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7397         * features/i386/amd64.c: Re-generated.
7398         * features/i386/amd64-linux.c: Re-generated.
7399         * features/i386/amd64-mpx.c: Re-generated.
7400         * features/i386/amd64-mpx-linux.c: Re-generated.
7401         * features/i386/i386-avx-avx512.c: Re-generated.
7402         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7403         * features/i386/i386-avx.c: Re-generated.
7404         * features/i386/i386-avx-linux.c: Re-generated.
7405         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7406         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7407         * features/i386/i386-avx-mpx.c: Re-generated.
7408         * features/i386/i386-avx-mpx-linux.c: Re-generated.
7409         * features/i386/i386.c: Re-generated.
7410         * features/i386/i386-linux.c: Re-generated.
7411         * features/i386/i386-mmx.c: Re-generated.
7412         * features/i386/i386-mmx-linux.c: Re-generated.
7413         * features/i386/i386-mpx.c: Re-generated.
7414         * features/i386/i386-mpx-linux.c: Re-generated.
7415         * features/i386/x32-avx-avx512.c: Re-generated.
7416         * features/i386/x32-avx-avx512-linux.c: Re-generated.
7417         * features/i386/x32-avx.c: Re-generated.
7418         * features/i386/x32-avx-linux.c: Re-generated.
7419         * features/i386/x32.c: Re-generated.
7420         * features/i386/x32-linux.c: Re-generated.
7421         * features/microblaze.c: Re-generated.
7422         * features/microblaze-with-stack-protect.c: Re-generated.
7423         * features/mips64-dsp-linux.c: Re-generated.
7424         * features/mips64-linux.c: Re-generated.
7425         * features/mips-dsp-linux.c: Re-generated.
7426         * features/mips-linux.c: Re-generated.
7427         * features/nds32.c: Re-generated.
7428         * features/nios2.c: Re-generated.
7429         * features/nios2-linux.c: Re-generated.
7430         * features/rs6000/powerpc-32.c: Re-generated.
7431         * features/rs6000/powerpc-32l.c: Re-generated.
7432         * features/rs6000/powerpc-403.c: Re-generated.
7433         * features/rs6000/powerpc-403gc.c : Re-generated.
7434         * features/rs6000/powerpc-405.c: Re-generated.
7435         * features/rs6000/powerpc-505.c: Re-generated.
7436         * features/rs6000/powerpc-601.c: Re-generated.
7437         * features/rs6000/powerpc-602.c: Re-generated.
7438         * features/rs6000/powerpc-603.c: Re-generated.
7439         * features/rs6000/powerpc-604.c: Re-generated.
7440         * features/rs6000/powerpc-64.c: Re-generated.
7441         * features/rs6000/powerpc-64l.c: Re-generated.
7442         * features/rs6000/powerpc-7400.c: Re-generated.
7443         * features/rs6000/powerpc-750.c: Re-generated.
7444         * features/rs6000/powerpc-860.c: Re-generated.
7445         * features/rs6000/powerpc-altivec32.c: Re-generated.
7446         * features/rs6000/powerpc-altivec32l.c: Re-generated.
7447         * features/rs6000/powerpc-altivec64.c: Re-generated.
7448         * features/rs6000/powerpc-altivec64l.c: Re-generated.
7449         * features/rs6000/powerpc-cell32l.c: Re-generated.
7450         * features/rs6000/powerpc-cell64l.c: Re-generated.
7451         * features/rs6000/powerpc-e500.c: Re-generated.
7452         * features/rs6000/powerpc-e500l.c: Re-generated.
7453         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7454         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7455         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7456         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7457         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7458         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7459         * features/rs6000/powerpc-vsx32.c: Re-generated.
7460         * features/rs6000/powerpc-vsx32l.c: Re-generated.
7461         * features/rs6000/powerpc-vsx64.c: Re-generated.
7462         * features/rs6000/powerpc-vsx64l.c: Re-generated.
7463         * features/rs6000/rs6000.c: Re-generated.
7464         * features/s390-linux32.c: Re-generated.
7465         * features/s390-linux32v1.c: Re-generated.
7466         * features/s390-linux32v2.c: Re-generated.
7467         * features/s390-linux64.c: Re-generated.
7468         * features/s390-linux64v1.c: Re-generated.
7469         * features/s390-linux64v2.c: Re-generated.
7470         * features/s390-te-linux64.c: Re-generated.
7471         * features/s390-tevx-linux64.c: Re-generated.
7472         * features/s390-vx-linux64.c: Re-generated.
7473         * features/s390x-linux64.c: Re-generated.
7474         * features/s390x-linux64v1.c: Re-generated.
7475         * features/s390x-linux64v2.c: Re-generated.
7476         * features/s390x-te-linux64.c: Re-generated.
7477         * features/s390x-tevx-linux64.c: Re-generated.
7478         * features/s390x-vx-linux64.c: Re-generated.
7479         * features/sparc/sparc32-solaris.c: Re-generated.
7480         * features/sparc/sparc64-solaris.c: Re-generated.
7481         * features/tic6x-c62x.c: Re-generated.
7482         * features/tic6x-c62x-linux.c: Re-generated.
7483         * features/tic6x-c64x.c: Re-generated.
7484         * features/tic6x-c64x-linux.c: Re-generated.
7485         * features/tic6x-c64xp.c: Re-generated.
7486         * features/tic6x-c64xp-linux.c: Re-generated.
7487
7488 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7489
7490         * i386-linux-tdep.c (i386_linux_read_description): New function.
7491         (i386_linux_core_read_description): Call
7492         i386_linux_read_description.
7493         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7494         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7495         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7496         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7497         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7498         * x86-linux-nat.c (x86_linux_read_description): Call
7499         i386_linux_read_description.
7500
7501 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7502
7503         * NEWS: Mention it.
7504         * features/Makefile (%.c: %.xml): Pass the xml file name to
7505         command "maint print c-tdesc".
7506         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7507         name from 'arg'.
7508
7509 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7510
7511         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7512         in-class initialization.
7513         (tdesc_create_feature): Call new instead of XCNEW.
7514         (free_target_description): Ue delete.
7515
7516 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7517
7518         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7519
7520 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7521
7522         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7523         constant.
7524         (amd64_x32_init_abi): Likewise.
7525         * amd64-tdep.h (amd64_init_abi): Update declaration.
7526         (amd64_x32_init_abi): Likewise.
7527
7528 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7529
7530         PR tdep/21717
7531         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7532         condition for FPSCR.
7533         (arm_linux_store_inferior_registers): Likewise.
7534
7535 2017-07-22  Tom Tromey  <tom@tromey.com>
7536
7537         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7538         <syscalls_counts>: Now a std::vector.
7539         (get_catch_syscall_inferior_data): Use "new".
7540         (catch_syscall_inferior_data_cleanup): Use "delete".
7541         (insert_catch_syscall, remove_catch_syscall)
7542         (clear_syscall_counts): Update.
7543
7544 2017-07-22  Tom Tromey  <tom@tromey.com>
7545
7546         * break-catch-syscall.c (syscall_catchpoint)
7547         <syscalls_to_be_caught>: Now a std::vector<int>
7548         (~syscall_catchpoint): Remove.
7549         (insert_catch_syscall, remove_catch_syscall)
7550         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7551         (print_mention_catch_syscall, print_recreate_catch_syscall):
7552         Update.
7553         (create_syscall_event_catchpoint): Change type of "filter"
7554         parameter.
7555         (catch_syscall_split_args): Return a std::vector.
7556         (catch_syscall_command_1, catching_syscall_number_1): Update.
7557
7558 2017-07-22  Tom Tromey  <tom@tromey.com>
7559
7560         * break-catch-throw.c (struct exception_catchpoint)
7561         <exception_rx>: Now a std::string.
7562         (~exception_catchpoint): Remove.
7563         (print_one_detail_exception_catchpoint): Update.
7564         (handle_gnu_v3_exceptions): Change type of except_rx.
7565         (extract_exception_regexp): Return a std::string.
7566         (catch_exception_command_1): Update.
7567
7568 2017-07-22  Tom Tromey  <tom@tromey.com>
7569
7570         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7571         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7572         std::vector.
7573         <catch_all>: Now a bool.
7574         (~signal_catchpoint): Remove.
7575         (signal_catchpoint_insert_location)
7576         (signal_catchpoint_remove_location)
7577         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7578         (signal_catchpoint_print_mention)
7579         (signal_catchpoint_print_recreate)
7580         (signal_catchpoint_explains_signal): Update.
7581         (create_signal_catchpoint): Change type of "filter" and
7582         "catch_all".
7583         (catch_signal_split_args): Return a std::vector.  Change type of
7584         "catch_all".
7585         (catch_signal_command): Update.
7586
7587 2017-07-20  Pedro Alves  <palves@redhat.com>
7588
7589         * ada-lang.c (ada_language_defn): Make extern.
7590         (_initialize_ada_language): Remove add_language call.
7591         * c-lang.c (c_language_defn, cplus_language_defn)
7592         (asm_language_defn, minimal_language_defn): Make extern.
7593         (_initialize_c_language): Delete.
7594         * completer.c (compare_cstrings): Delete, moved to utils.h.
7595         * d-lang.c (d_language_defn): Make extern.
7596         (_initialize_d_language): Remove add_language calls.
7597         * defs.h (enum language): Add comment.
7598         * f-lang.c (f_language_defn): Make extern.
7599         (_initialize_f_language): Remove add_language call.
7600         * go-lang.c (go_language_defn): Make extern.
7601         (_initialize_go_language): Remove add_language call.
7602         * language.c: Include <algorithm>.
7603         (languages): Redefine as const array.
7604         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7605         (set_language_command): Handle "local".  Use for-range loop.
7606         (set_language): Remove loop.
7607         (language_enum): Rewrite.
7608         (language_def, language_str): Remove loops.
7609         (add_language): Delete.
7610         (add_set_language_command): New, based on add_languages.
7611         (skip_language_trampoline): Adjust.
7612         (local_language_defn): Delete.
7613         (language_gdbarch_post_init): Adjust.
7614         (_initialize_language): Remove add_language calls.  Call
7615         add_set_language_command.
7616         * language.h (add_language): Delete.
7617         (auto_language_defn)
7618         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7619         (asm_language_defn, c_language_defn, cplus_language_defn)
7620         (d_language_defn, f_language_defn, go_language_defn)
7621         (m2_language_defn, objc_language_defn, opencl_language_defn)
7622         (pascal_language_defn, rust_language_defn): Declare.
7623         * m2-lang.c (m2_language_defn): Make extern.
7624         (_initialize_m2_language): Remove add_language call.
7625         * objc-lang.c (objc_language_defn): Make extern.
7626         (_initialize_objc_language): Remove add_language call.
7627         * opencl-lang.c (opencl_language_defn): Make extern.
7628         (_initialize_opencl_language): Remove add_language call.
7629         * p-lang.c (pascal_language_defn): Make extern.
7630         (_initialize_pascal_language): Delete.
7631         * rust-lang.c (rust_language_defn): Make extern.
7632         (_initialize_rust_language): Delete.
7633         * utils.h (compare_cstrings): New static inline function.
7634
7635 2017-07-20  Pedro Alves  <palves@redhat.com>
7636
7637         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7638         (get_var_value): Constify parameters.
7639         (get_int_var_value): Change prototype.
7640         (to_fixed_range_type): Adjust.
7641         * ada-lang.h (get_int_var_value): Change prototype.
7642
7643 2017-07-20  Pedro Alves  <palves@redhat.com>
7644
7645         * dwarf2read.c (dw2_lookup_symbol): Use
7646         SYMBOL_MATCHES_SEARCH_NAME.
7647         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7648
7649 2017-07-20  Pedro Alves  <palves@redhat.com>
7650
7651         * block.c (block_iter_name_step, block_iter_name_first)
7652         (block_iter_name_next): Delete.
7653         (block_lookup_symbol_primary): Adjust to use
7654         dict_iter_match_first/dict_iter_match_next.
7655         * block.h (block_iter_name_first, block_iter_name_next): Delete
7656         declarations.
7657         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7658         dict_iter_match_first/dict_iter_match_next.
7659
7660 2017-07-20  Pedro Alves  <palves@redhat.com>
7661
7662         * cp-support.c (cp_find_first_component_aux): Add missing case for
7663         end of string.
7664
7665 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7666
7667         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7668         of dwo_cu's dwo_file.
7669
7670 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7671
7672         * remote.c (store_registers_using_G): Remove one line comment.
7673
7674 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7675
7676         * regcache.c (regcache_cpy): Simplify it.
7677         (regcache::cpy_no_passthrough): Remove it.
7678         * regcache.h (cpy_no_passthrough): Remove it.
7679         (regcache_dup, regcache_cpy): Update comments.
7680
7681 2017-07-18  Pedro Alves  <palves@redhat.com>
7682
7683         * remote-sim.c (sim_command_completer): Adjust to work with a
7684         completion_tracker instead of a VEC.
7685
7686 2017-07-17  Pedro Alves  <palves@redhat.com>
7687
7688         * completer.c (complete_source_filenames): New function.
7689         (complete_address_and_linespec_locations): New function.
7690         (location_completer): Use complete_address_and_linespec_locations.
7691         (completion_tracker::build_completion_result): Honor the tracker's
7692         request to suppress append.
7693         * completer.h (completion_tracker::suppress_append_ws)
7694         (completion_tracker::set_suppress_append_ws): New methods.
7695         (completion_tracker::m_suppress_append_ws): New field.
7696         (complete_source_filenames): New declaration.
7697         * linespec.c (linespec_complete_what): New.
7698         (struct ls_parser) <complete_what, completion_word,
7699         completion_quote_char, completion_quote_end, completion_tracker>:
7700         New fields.
7701         (string_find_incomplete_keyword_at_end): New.
7702         (linespec_lexer_lex_string): Record quote char.  If in completion
7703         mode, don't throw.
7704         (linespec_lexer_consume_token): Advance the completion word point.
7705         (linespec_lexer_peek_token): Save/restore completion info.
7706         (save_stream_and_consume_token): New.
7707         (set_completion_after_number): New.
7708         (linespec_parse_basic): Set what to complete next depending on
7709         token.  Handle function and label completions specially.
7710         (parse_linespec): Disable objc shortcut in completion mode.  Set
7711         what to complete next depending on token type.  Skip keyword if in
7712         completion mode.
7713         (complete_linespec_component, linespec_complete): New.
7714         * linespec.h (linespec_complete): Declare.
7715
7716 2017-07-17  Pedro Alves  <palves@redhat.com>
7717
7718         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7719         Handle 'operator<' / 'operator<<'.
7720
7721 2017-07-17  Pedro Alves  <palves@redhat.com>
7722
7723         * completer.c (collect_explicit_location_matches): Handle
7724         MATCH_LABEL.
7725         (convert_explicit_location_to_linespec): New, factored out from
7726         ...
7727         (convert_explicit_location_to_sals): ... this.
7728         (complete_label): New.
7729         (linespec_complete_label, find_label_symbols_in_block): New.
7730         (find_label_symbols): Add completion_mode parameter and adjust to
7731         call find_label_symbols_in_block.
7732         * linespec.h (linespec_complete_label): Declare.
7733
7734 2017-07-17  Pedro Alves  <palves@redhat.com>
7735
7736         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7737         complete_symbol_mode parameter.
7738         * cli/cli-cmds.c (complete_command): Get the completion result out
7739         of the handle_brkchars tracker if used a custom word point.
7740         * completer.c: Include "linespec.h".
7741         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7742         (advance_to_expression_complete_word_point): New.
7743         (completion_tracker::completes_to_completion_word): New.
7744         (complete_files_symbols): Pass down
7745         complete_symbol_mode::EXPRESSION.
7746         (explicit_options, probe_options): New.
7747         (collect_explicit_location_matches): Complete on the
7748         explictit_loc->foo instead of word.  Use
7749         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7750         keyword and options completions.
7751         (backup_text_ptr): Delete.
7752         (skip_keyword): New.
7753         (complete_explicit_location): Remove 'word' parameter.  Add
7754         language, quoted_arg_start and quoted_arg_end parameters.
7755         Rewrite, parsing left to right.
7756         (location_completer): Rewrite.
7757         (location_completer_handle_brkchars): New function.
7758         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7759         (enum complete_line_internal_reason): Adjust comments.
7760         (completion_tracker::discard_completions): New.
7761         (completer_handle_brkchars_func_for_completer): Handle
7762         location_completer.
7763         (gdb_custom_word_point_brkchars)
7764         (gdb_org_rl_basic_quote_characters): New.
7765         (gdb_completion_word_break_characters_throw)
7766         (completion_find_completion_word): Handle trackers that use a
7767         custom word point.
7768         (completion_tracker::advance_custom_word_point_by): New.
7769         (completion_tracker::build_completion_result): Don't rely on
7770         readline appending the quote char.
7771         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7772         use a custom word point.
7773         (gdb_rl_attempted_completion_function): Restore
7774         rl_basic_quote_characters.
7775         * completer.h (class completion_tracker): Extend intro comment.
7776         (completion_tracker::set_quote_char)
7777         (completion_tracker::quote_char)
7778         (completion_tracker::set_use_custom_word_point)
7779         (completion_tracker::use_custom_word_point)
7780         (completion_tracker::custom_word_point)
7781         (completion_tracker::set_custom_word_point)
7782         (completion_tracker::advance_custom_word_point_by)
7783         (completion_tracker::completes_to_completion_word)
7784         (completion_tracker::discard_completions): New methods.
7785         (completion_tracker::m_quote_char)
7786         (completion_tracker::m_use_custom_word_point)
7787         (completion_tracker::m_custom_word_point): New fields.
7788         (advance_to_expression_complete_word_point): Declare.
7789         * f-lang.c (f_collect_symbol_completion_matches): Add
7790         complete_symbol_mode parameter.
7791         * language.h (struct language_defn)
7792         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7793         parameter.
7794         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7795         (linespec_complete_function): New function.
7796         (linespec_lexer_lex_keyword): Adjust.
7797         * linespec.h (linespec_keywords, linespec_complete_function): New
7798         declarations.
7799         * location.c (find_end_quote): New function.
7800         (explicit_location_lex_one): Add explicit_completion_info
7801         parameter.  Save quoting info.  Don't throw if being called for
7802         completion.  Don't handle Ada operators here.
7803         (is_cp_operator, skip_op_false_positives, first_of)
7804         (explicit_location_lex_one_function): New function.
7805         (string_to_explicit_location): Replace 'dont_throw' parameter with
7806         an explicit_completion_info pointer parameter.  Handle it.  Don't
7807         use explicit_location_lex_one to lex function names.  Use
7808         explicit_location_lex_one_function instead.
7809         * location.h (struct explicit_completion_info): New.
7810         (string_to_explicit_location): Replace 'dont_throw' parameter with
7811         an explicit_completion_info pointer parameter.
7812         * symtab.c (default_collect_symbol_completion_matches_break_on):
7813         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7814         (default_collect_symbol_completion_matches)
7815         (collect_symbol_completion_matches): Add complete_symbol_mode
7816         parameter.
7817         (collect_symbol_completion_matches_type): Pass down
7818         complete_symbol_mode::EXPRESSION.
7819         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7820         parameter.  Handle LINESPEC mode.
7821         * symtab.h (complete_symbol_mode): New.
7822         (default_collect_symbol_completion_matches_break_on)
7823         (default_collect_symbol_completion_matches)
7824         (collect_symbol_completion_matches)
7825         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7826         parameter.
7827
7828 2017-07-17  Pedro Alves  <palves@redhat.com>
7829
7830         * utils.c (enum class strncmp_iw_mode): New.
7831         (strcmp_iw): Rename to ...
7832         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7833         parameters.  Handle them.
7834         (strncmp_iw): New.
7835         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7836         * utils.h (strncmp_iw): Declare.
7837         (strcmp_iw): Move describing comments here.
7838
7839 2017-07-17  Pedro Alves  <palves@redhat.com>
7840
7841         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7842         CP_OPERATOR_STR.
7843         * c-typeprint.c (is_type_conversion_operator): Use
7844         CP_OPERATOR_STR.
7845         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7846         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7847         CP_OPERATOR_LEN.
7848         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7849         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7850         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7851         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7852         CP_OPERATOR_STR.
7853         * location.c: Include "cp-support.h".
7854         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7855         CP_OPERATOR_STR.
7856         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7857         CP_OPERATOR_LEN.
7858
7859 2017-07-17  Pedro Alves  <palves@redhat.com>
7860
7861         * cli/cli-cmds.c (complete_command): Use a completion tracker
7862         along with completion_find_completion_word for handle_brkchars
7863         phase.
7864         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7865         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7866         (struct gdb_rl_completion_word_info): New.
7867         (gdb_rl_find_completion_word): New.
7868         (completion_find_completion_word): New.
7869         * completer.h (completion_find_completion_word): Declare.
7870
7871 2017-07-17  Pedro Alves  <palves@redhat.com>
7872
7873         * ada-lang.c (symbol_completion_match): Adjust comments.
7874         (symbol_completion_add): Replace vector parameter with
7875         completion_tracker parameter.  Use it.
7876         (ada_make_symbol_completion_list): Rename to...
7877         (ada_collect_symbol_completion_matches): ... this.  Add
7878         completion_tracker parameter and use it.
7879         (ada_language_defn): Adjust.
7880         * break-catch-syscall.c (catch_syscall_completer): Adjust
7881         prototype and work with completion_tracker instead of VEC.
7882         * breakpoint.c (condition_completer): Adjust prototype and work
7883         with completion_tracker instead of VEC.
7884         * c-lang.c (c_language_defn, cplus_language_defn)
7885         (asm_language_defn, minimal_language_defn): Adjust to renames.
7886         * cli/cli-cmds.c (complete_command): Rework using
7887         completion_tracker.  Catch exceptions when completing.
7888         * cli/cli-decode.c (integer_unlimited_completer)
7889         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7890         with completion_tracker instead of VEC.
7891         * command.h (struct completion_tracker): Forward declare.
7892         (completer_ftype, completer_handle_brkchars_ftype): Change
7893         types.
7894         (complete_on_cmdlist, complete_on_enum): Adjust.
7895         * completer.c: Include <algorithm>.
7896         (struct gdb_completer_state): New.
7897         (current_completion): New global.
7898         (readline_line_completion_function): Delete.
7899         (noop_completer, filename_completer)
7900         (filename_completer_handle_brkchars, complete_files_symbols)
7901         (linespec_location_completer): Adjust to work with a
7902         completion_tracker instead of a VEC.
7903         (string_or_empty): New.
7904         (collect_explicit_location_matches): Adjust to work with a
7905         completion_tracker instead of a VEC.
7906         (explicit_location_completer): Rename to ...
7907         (complete_explicit_location): ... this and adjust to work with a
7908         completion_tracker instead of a VEC.
7909         (location_completer): Adjust to work with a completion_tracker
7910         instead of a VEC.
7911         (add_struct_fields): Adjust to work with a completion_list instead
7912         of VEC.
7913         (expression_completer): Rename to ...
7914         (complete_expression): ... this and adjust to work with a
7915         completion_tracker instead of a VEC.  Use complete_files_symbols.
7916         (expression_completer): Reimplement on top of complete_expression.
7917         (symbol_completer): Adjust to work with a completion_tracker
7918         instead of a VEC.
7919         (enum complete_line_internal_reason): Add describing comments.
7920         (complete_line_internal_normal_command): Adjust to work with a
7921         completion_tracker instead of a VEC.
7922         (complete_line_internal): Rename to ...
7923         (complete_line_internal_1): ... this and adjust to work with a
7924         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7925         handle_brkchars phase.
7926         (new_completion_tracker): Delete.
7927         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7928         complete_line_internal_1.
7929         (free_completion_tracker): Delete.
7930         (INITIAL_COMPLETION_HTAB_SIZE): New.
7931         (completion_tracker::completion_tracker)
7932         (completion_tracker::~completion_tracker): New.
7933         (maybe_add_completion): Delete.
7934         (completion_tracker::maybe_add_completion)
7935         (completion_tracker::add_completion)
7936         (completion_tracker::add_completions): New.
7937         (throw_max_completions_reached_error): Delete.
7938         (complete_line): Adjust to work with a completion_tracker instead
7939         of a VEC.  Don't create a completion_tracker_t or check for max
7940         completions here.
7941         (command_completer, command_completer_handle_brkchars)
7942         (signal_completer, reg_or_group_completer_1)
7943         (reg_or_group_completer, default_completer_handle_brkchars):
7944         Adjust to work with a completion_tracker.
7945         (gdb_completion_word_break_characters_throw): New.
7946         (gdb_completion_word_break_characters): Reimplement.
7947         (line_completion_function): Delete.
7948         (completion_tracker::recompute_lowest_common_denominator)
7949         (expand_preserving_ws)
7950         (completion_tracker::build_completion_result)
7951         (completion_result::completion_result)
7952         (completion_result::completion_result)
7953         (completion_result::~completion_result)
7954         (completion_result::completion_result)
7955         (completion_result::release_match_list, compare_cstrings)
7956         (completion_result::sort_match_list)
7957         (completion_result::reset_match_list)
7958         (gdb_rl_attempted_completion_function_throw)
7959         (gdb_rl_attempted_completion_function): New.
7960         * completer.h (completion_list, struct completion_result)
7961         (class completion_tracker): New.
7962         (complete_line): Add completion_tracker parameter.
7963         (readline_line_completion_function): Delete.
7964         (gdb_rl_attempted_completion_function): New.
7965         (noop_completer, filename_completer, expression_completer)
7966         (location_completer, symbol_completer, command_completer)
7967         (signal_completer, reg_or_group_completer): Update prototypes.
7968         (completion_tracker_t, new_completion_tracker)
7969         (make_cleanup_free_completion_tracker): Delete.
7970         (enum maybe_add_completion_enum): Delete.
7971         (maybe_add_completion): Delete.
7972         (throw_max_completions_reached_error): Delete.
7973         * corefile.c (complete_set_gnutarget): Adjust to work with a
7974         completion_tracker instead of a VEC.
7975         * cp-abi.c (cp_abi_completer): Adjust to work with a
7976         completion_tracker instead of a VEC.
7977         * d-lang.c (d_language_defn): Adjust.
7978         * disasm.c (disassembler_options_completer): Adjust to work with a
7979         completion_tracker instead of a VEC.
7980         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7981         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7982         with a completion_tracker instead of a VEC.
7983         (f_language_defn): Adjust.
7984         * go-lang.c (go_language_defn): Adjust.
7985         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7986         Adjust to work with a completion_tracker instead of a VEC.
7987         * infrun.c (handle_completer): Likewise.
7988         * interps.c (interpreter_completer): Likewise.
7989         * interps.h (interpreter_completer): Likewise.
7990         * language.c (unknown_language_defn, auto_language_defn)
7991         (local_language_defn): Adjust.
7992         * language.h (language_defn::la_make_symbol_completion_list):
7993         Rename to ...
7994         (language_defn::la_collect_symbol_completion_matches): ... this
7995         and adjust to work with a completion_tracker instead of a VEC.
7996         * m2-lang.c (m2_language_defn): Adjust.
7997         * objc-lang.c (objc_language_defn): Adjust.
7998         * opencl-lang.c (opencl_language_defn): Adjust.
7999         * p-lang.c (pascal_language_defn): Adjust.
8000         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8001         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8002         with a completion_tracker.
8003         * rust-lang.c (rust_language_defn): Adjust.
8004         * symtab.c (free_completion_list, do_free_completion_list)
8005         (return_val, completion_tracker): Delete.
8006         (completion_list_add_name, completion_list_add_symbol)
8007         (completion_list_add_msymbol, completion_list_objc_symbol)
8008         (completion_list_add_fields, add_symtab_completions): Add
8009         completion_tracker parameter and use it.
8010         (default_make_symbol_completion_list_break_on_1): Rename to...
8011         (default_collect_symbol_completion_matches_break_on): ... this.
8012         Add completion_tracker parameter and use it instead of allocating
8013         a completion tracker here.
8014         (default_make_symbol_completion_list_break_on): Delete old
8015         implementation.
8016         (default_make_symbol_completion_list): Delete.
8017         (default_collect_symbol_completion_matches): New.
8018         (make_symbol_completion_list): Delete.
8019         (collect_symbol_completion_matches): New.
8020         (make_symbol_completion_type): Rename to ...
8021         (collect_symbol_completion_matches_type): ... this.  Add
8022         completion_tracker parameter and use it instead of VEC.
8023         (make_file_symbol_completion_list_1): Rename to...
8024         (collect_file_symbol_completion_matches): ... this.  Add
8025         completion_tracker parameter and use it instead of VEC.
8026         (make_file_symbol_completion_list): Delete.
8027         (add_filename_to_list): Use completion_list instead of a VEC.
8028         (add_partial_filename_data::list): Now a completion_list.
8029         (make_source_files_completion_list): Work with a completion_list
8030         instead of a VEC.
8031         * symtab.h: Include "completer.h".
8032         (default_make_symbol_completion_list_break_on)
8033         (default_make_symbol_completion_list, make_symbol_completion_list)
8034         (make_symbol_completion_type, make_file_symbol_completion_list)
8035         (make_source_files_completion_list): Delete.
8036         (default_collect_symbol_completion_matches_break_on)
8037         (default_collect_symbol_completion_matches)
8038         (collect_symbol_completion_matches)
8039         (collect_symbol_completion_matches_type)
8040         (collect_file_symbol_completion_matches)
8041         (make_source_files_completion_list): New.
8042         * top.c (init_main): Don't install a rl_completion_entry_function
8043         hook.  Install a rl_attempted_completion_function hook instead.
8044         * tui/tui-layout.c (layout_completer): Adjust to work with a
8045         completion_tracker.
8046         * tui/tui-regs.c (tui_reggroup_completer):
8047         * tui/tui-win.c (window_name_completer, focus_completer)
8048         (winheight_completer): Adjust to work with a completion_tracker.
8049         * value.c: Include "completer.h".
8050         (complete_internalvar): Adjust to work with a completion_tracker.
8051         * value.h (complete_internalvar): Likewise.
8052
8053 2017-07-17  Pedro Alves  <palves@redhat.com>
8054
8055         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8056         renames.
8057         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8058         comments to completer_ftype's declaration.
8059         <completer_handle_brkchars>: Change type to
8060         completer_handle_brkchars_ftype.
8061         * command.h (completer_ftype): Add describing comment and give
8062         names to parameters.
8063         (completer_ftype_void): Rename to ...
8064         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8065         (set_cmd_completer_handle_brkchars): Adjust.
8066         * completer.c (filename_completer_handle_brkchars): New function.
8067         (complete_line_internal_normal_command): New function, factored
8068         out from ...
8069         (complete_line_internal): ... here.
8070         (command_completer_handle_brkchars)
8071         (default_completer_handle_brkchars)
8072         (completer_handle_brkchars_func_for_completer): New functions.
8073         * completer.h (set_gdb_completion_word_break_characters): Delete
8074         declaration.
8075         (completer_handle_brkchars_func_for_completer): New declaration.
8076         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8077         completer_handle_brkchars_func_for_completer.
8078
8079 2017-07-17  Pedro Alves  <palves@redhat.com>
8080
8081         * completer.c (symbol_completer): New function, based on
8082         make_symbol_completion_list_fn.
8083         * completer.h (symbol_completer): New declaration.
8084         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8085         * python/py-cmd.c (completers): Adjust.
8086         * symtab.c (make_symbol_completion_list_fn): Delete.
8087         * symtab.h (make_symbol_completion_list_fn): Delete.
8088         * cli/cli-decode.c (add_cmd): Adjust.
8089
8090 2017-07-17  Pedro Alves  <palves@redhat.com>
8091
8092         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8093         * dwarf2read.c: Include "filename-seen-cache.h".
8094         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8095         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8096         * filename-seen-cache.c: New file.
8097         * filename-seen-cache.h: New file.
8098         * symtab.c: Include "filename-seen-cache.h".
8099         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8100         (create_filename_seen_cache, clear_filename_seen_cache)
8101         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8102         to filename-seen-cache.h/filename-seen-cache.c.
8103         (output_source_filename, sources_info)
8104         (maybe_add_partial_symtab_filename)
8105         (make_source_files_completion_list): Adjust to use
8106         filename_seen_cache.
8107
8108 2017-07-17  Pedro Alves  <palves@redhat.com>
8109
8110         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8111         fields.
8112         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8113         dwarf2_debug_sections*)): New.
8114         (dwarf2_per_objfile::dwarf2_per_objfile(const
8115         dwarf2_per_objfile&)): Declare as deleted.
8116         (dwarf2_per_objfile::operator=): Declare as deleted.
8117         (dwarf2_per_objfile::dwarf2_per_objfile)
8118         (dwarf2_per_objfile::~dwarf2_per_objfile)
8119         (dwarf2_per_objfile::free_cached_comp_units): New.
8120         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8121         ctor.  Call dwarf2_per_objfile's ctor manually.
8122         (dwarf2_locate_sections): Deleted/refactored as ...
8123         (dwarf2_per_objfile::locate_sections): ... this new method.
8124         (free_cached_comp_units): Defer to
8125         dwarf2_per_objfile::free_cached_comp_units.
8126         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8127
8128 2017-07-14  Tom Tromey  <tom@tromey.com>
8129
8130         PR rust/21764:
8131         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8132         parameter.
8133         <UNOP_SIZEOF>: Split into separate case.
8134         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8135
8136 2017-07-14  Tom Tromey  <tom@tromey.com>
8137
8138         PR rust/21763:
8139         * symtab.c (symbol_matches_domain): Add language_rust to special
8140         case.
8141         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8142         treat LOC_TYPEDEF symbols as variables.
8143
8144 2017-07-14  Pedro Alves  <palves@redhat.com>
8145
8146         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8147         symtabs matching all symtabs with SRCFILE as file name instead of
8148         only considering the first hit, with lookup_symtab.
8149
8150 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8151
8152         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8153         operator_name parameters.
8154         (gen_expr): Update function call.
8155
8156 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8157
8158         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8159         parameter.
8160         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8161         Likewise.
8162         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8163         parameter, use agent_expr::gdbarch instead, update function
8164         calls.
8165         (locexpr_tracepoint_var_ref): Likewise.
8166         (loclist_tracepoint_var_ref): Likewise.
8167         * ax-gdb.c (gen_trace_static_fields): Likewise.
8168         (gen_traced_pop): Likewise.
8169         (gen_frame_args_address): Likewise.
8170         (gen_frame_locals_address): Likewise.
8171         (gen_var_ref): Likewise.
8172         (gen_struct_ref_recursive): Likewise.
8173         (gen_static_field): Likewise.
8174         (gen_maybe_namespace_elt): Likewise.
8175         (gen_expr): Likewise.
8176         (gen_trace_for_var): Likewise.
8177         (gen_trace_for_expr): Likewise.
8178         (gen_trace_for_return_address): Likewise.
8179
8180 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8181
8182         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8183         parameter.
8184         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8185
8186 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8187
8188         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8189         from ax, update calls.
8190         (gen_usual_arithmetic): Likewise.
8191         (gen_integral_promotions): Likewise.
8192         (gen_bitfield_ref): Likewise.
8193         (gen_primitive_field): Likewise.
8194         (gen_struct_ref_recursive): Likewise.
8195         (gen_struct_ref): Likewise.
8196         (gen_maybe_namespace_elt): Likewise.
8197         (gen_struct_elt_for_reference): Likewise.
8198         (gen_namespace_elt): Likewise.
8199         (gen_aggregate_elt_ref): Likewise.
8200         (gen_expr): Get gdbarch from ax, update calls.
8201         (gen_expr_binop_rest): Likewise.
8202
8203 2017-07-13  Pedro Alves  <palves@redhat.com>
8204
8205         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8206         as default tdesc.
8207         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8208         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8209         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8210         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8211         tdep.
8212         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8213         Get final tdesc from the tdep.
8214         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8215         default tdesc.
8216         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8217         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8218         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8219         Use it as default tdesc.
8220         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8221         down to amd_init_abi.  No longer handle fallback tdesc here.
8222         * amd64-tdep.h (tdesc_x32): Declare.
8223         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8224         parameter.
8225         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8226         as default tdesc.
8227
8228 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8229
8230         * s390-linux-tdep.c (s390_process_record): Add support for
8231         instructions new in arch12.
8232
8233 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8234
8235         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8236         PT_GETFSBASE and PT_GETGSBASE.
8237         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8238         PT_SETGSBASE.
8239
8240 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8241
8242         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8243         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8244         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8245         those rules.
8246         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8247         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8248         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8249         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8250         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8251         * features/i386/amd64.xml: Add 64bit-segments.xml.
8252         * features/i386/amd64-avx-avx512.c: Regenerated.
8253         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8254         * features/i386/amd64-avx-mpx.c: Regenerated.
8255         * features/i386/amd64-avx.c: Regenerated.
8256         * features/i386/amd64-mpx.c: Regenerated.
8257         * features/i386/amd64.c: Regenerated.
8258         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8259         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8260         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8261         * regformats/i386/amd64-avx.dat: Regenerated.
8262         * regformats/i386/amd64-mpx.dat: Regenerated.
8263         * regformats/i386/amd64.dat: Regenerated.
8264
8265 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8266
8267         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8268         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8269
8270 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8271
8272         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8273         unsetenv.
8274         * gnulib/aclocal.m4: Regenerate.
8275         * gnulib/config.in: Regenerate.
8276         * gnulib/configure: Regenerate.
8277         * gnulib/import/Makefile.am: Regenerate.
8278         * gnulib/import/Makefile.in: Regenerate.
8279         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8280         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8281         * gnulib/import/m4/environ.m4: New file.
8282         * gnulib/import/m4/setenv.m4: New file.
8283         * gnulib/import/setenv.c: New file.
8284         * gnulib/import/unsetenv.c: New file.
8285
8286 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8287
8288         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8289         address when op is DW_OP_addr.
8290
8291 2017-07-09  Tom Tromey  <tom@tromey.com>
8292
8293         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8294         check and apply to outer type.
8295
8296 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8297
8298         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8299         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8300         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8301         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8302
8303 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8304
8305         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8306
8307 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8308
8309         * corelow.c (get_core_siginfo): Remove.
8310         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8311         instead of get_core_siginfo.
8312         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8313         * gdbarch.h: Re-generate.
8314         * gdbarch.c: Re-generate.
8315         * linux-tdep.c (linux_core_xfer_siginfo): New.
8316         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8317
8318 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8319
8320         * corelow.c (thread_section_name): Move to ...
8321         * gdbcore.h (thread_section_name): ... here.
8322
8323 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8324
8325         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8326         (struct siginfo32): New.
8327         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8328         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8329         via ptrace(PT_LWPINFO).
8330
8331 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8332
8333         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8334         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8335         (fbsd_get_siginfo_type): New.
8336         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8337         (_initialize_fbsd_tdep): New.
8338
8339 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8340
8341         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8342         a singular dwo_unit*) to support multiple CUs in the same way that
8343         multiple TUs are supported.
8344         (create_cus_hash_table): Replace create_dwo_cu with a function for
8345         parsing multiple CUs from a DWO file.
8346         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8347         create_dwo_cu.
8348         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8349         htab_find, rather than comparing the signature to a singleton CU in
8350         the dwo_file.
8351
8352 2017-07-06  Pedro Alves  <palves@redhat.com>
8353
8354         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8355
8356 2017-07-04  Pedro Alves  <palves@redhat.com>
8357
8358         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8359         * gdbtypes.h (TYPE_STATIC): Delete.
8360         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8361         is_synchronized, is_native>: Delete.
8362         <dummy>: Bump.
8363         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8364         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8365         (TYPE_FN_FIELD_ABSTRACT): Delete.
8366
8367 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8368
8369         * buffer.h (buffer_finish): Fix spelling mistakes.
8370
8371 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8372
8373         * .dir-locals.el: Automatically switch to C-style comments in
8374         versions of Emacs that support the feature.
8375
8376 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8377             Pedro Alves  <palves@redhat.com>
8378
8379         PR cli/21688
8380         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8381         (process_next_line): New variable 'inline_cmd'.
8382         Adjust 'if' clauses for "python", "compile" and "guile" to use
8383         'command_name_equals' and check for '!inline_cmd'.
8384
8385 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8386
8387         PR cli/21688
8388         * cli/cli-script.c (command_name_equals_not_inline): New function.
8389         (process_next_line): Adjust 'if' clauses for "python", "compile"
8390         and "guile" to use command_name_equals_not_inline.
8391
8392 2017-06-29  Pedro Alves  <palves@redhat.com>
8393
8394         * completer.c (expression_completer): Call
8395         linespec_location_completer instead of location_completer.
8396
8397 2017-06-29  Pedro Alves  <palves@redhat.com>
8398
8399         * completer.c (expression_completer): Remove code that recomputes
8400         'text' from 'word'.
8401
8402 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8403
8404         * regformats/regdat.sh: Generate code with
8405         "ifndef IN_PROCESS_AGENT".
8406
8407 2017-06-28  Pedro Alves  <palves@redhat.com>
8408
8409         * command.h: Include "common/scoped_restore.h".
8410
8411 2017-06-28  Yao Qi  <yao.qi@linaro.org>
8412
8413         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8414         instead of obstack_grow.
8415
8416 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
8417
8418         PR gdb/21337
8419         * symfile.c (reread_symbols): Call objfiles_changed just before
8420         read_symbols.
8421
8422 2017-06-27  Pedro Alves  <palves@redhat.com>
8423
8424         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8425         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8426         (completion_list_add_symbol, completion_list_add_msymbol):
8427         ... these new functions.
8428         (add_symtab_completions)
8429         (default_make_symbol_completion_list_break_on_1): Adjust.
8430
8431 2017-06-27  Pedro Alves  <palves@redhat.com>
8432
8433         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8434         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
8435         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8436         dtor.
8437         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
8438         'storage_obstack' field an auto_obstack.  In-class initialize all
8439         non-bitfield fields.  Make minsyms_read bool.
8440         * symfile.c (read_symbols): Adjust.
8441
8442 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
8443
8444         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8445         (gdbsim_store_register): Likewise.
8446
8447 2017-06-27  Pedro Alves  <palves@redhat.com>
8448
8449         * c-exp.y (name_obstack): Now an auto_obstack.
8450         (yylex): Use auto_obstack::clear.
8451         (c_parse): Use auto_obstack::clear instead of reinitializing and
8452         freeing the obstack.
8453         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8454         * d-exp.y (name_obstack): Now an auto_obstack.
8455         (yylex): Use auto_obstack::clear.
8456         (d_parse): Use auto_obstack::clear instead of reinitializing and
8457         freeing the obstack.
8458         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8459         auto_obstack.
8460         * dwarf2read.c (create_addrmap_from_index)
8461         (dwarf2_build_psymtabs_hard)
8462         (update_enumeration_type_from_children): Likewise.
8463         * gdb_obstack.h (auto_obstack): New type.
8464         * go-exp.y (name_obstack): Now an auto_obstack.
8465         (build_packaged_name): Use auto_obstack::clear.
8466         (go_parse): Use auto_obstack::clear instead of reinitializing and
8467         freeing the obstack.
8468         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8469         auto_obstack.
8470         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8471         * rust-exp.y (work_obstack): Now an auto_obstack.
8472         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8473         reinitializing and freeing the obstack.
8474         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8475         (host_char_to_target): Use auto_obstack.
8476         * utils.h (make_cleanup_obstack_free): Delete declaration.
8477         * valprint.c (generic_emit_char, generic_printstr): Use
8478         auto_obstack.
8479
8480 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8481
8482         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8483         thread.
8484         (darwin_init_thread_list): Don't update dummy thread.
8485         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8486
8487 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8488
8489         * record-full.c (netorder16): Remove.
8490
8491 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8492
8493         * common/diagnostics.h: Define macros for GCC.
8494         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8495         * common/vec.h: Include diagnostics.h.
8496         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8497         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8498         warning.
8499
8500 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8501
8502         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8503         New macro.
8504         * ada-lex.l: Ignore deprecated register warnings.
8505
8506 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8507
8508         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8509         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8510
8511 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8512
8513         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8514         its own line.
8515
8516 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8517
8518         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8519
8520 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8521
8522         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8523         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8524         (xtensa_register_read_masked): Likewise.
8525
8526 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8527
8528         * common/environ.c (gdb_environ::unset): Update comment.
8529
8530 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8531
8532         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8533         registers.
8534
8535 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8536
8537         * record-full.c (record_full_exec_insn): Use byte_vector.
8538
8539 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8540
8541         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8542         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8543
8544 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8545
8546         * remote.c (cached_reg): Move from here...
8547         * regcache.h (cached_reg): ...to here.
8548         * python/py-unwind.c (struct reg_info): Remove.
8549         (cached_frame_info): Use cached_reg_t.
8550         (pyuw_prev_register): Likewise.
8551         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8552         (pyuw_dealloc_cache): Free all registers.
8553
8554 2017-06-22  Pedro Alves  <palves@redhat.com>
8555             Simon Marchi  <simon.marchi@ericsson.com>
8556
8557         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8558         warning.
8559         * common/diagnostics.h: New file.
8560
8561 2017-06-22  Pedro Alves  <palves@redhat.com>
8562
8563         * common/agent.h: Add include guards.
8564
8565 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8566
8567         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8568         talk about addressable units instead of bytes.
8569
8570 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8571
8572         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8573         of '::const_iterator'.
8574
8575 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8576
8577         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8578         'unittests/environ-selftests.c'.
8579         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8580         * charset.c (find_charset_names): Declare object 'iconv_env'.
8581         Update code to use 'iconv_env' object.  Remove call to
8582         'free_environ'.
8583         * common/environ.c: Include <utility>.
8584         (make_environ): Delete function.
8585         (free_environ): Delete function.
8586         (gdb_environ::clear): New function.
8587         (gdb_environ::operator=): New function.
8588         (gdb_environ::get): Likewise.
8589         (environ_vector): Delete function.
8590         (set_in_environ): Delete function.
8591         (gdb_environ::set): New function.
8592         (unset_in_environ): Delete function.
8593         (gdb_environ::unset): New function.
8594         (gdb_environ::envp): Likewise.
8595         * common/environ.h: Include <vector>.
8596         (struct gdb_environ): Delete; transform into...
8597         (class gdb_environ): ... this class.
8598         (free_environ): Delete prototype.
8599         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8600         environ_vector): Likewise.
8601         * infcmd.c (run_command_1): Update code to call
8602         'envp' from 'gdb_environ' class.
8603         (environment_info): Update code to call methods from 'gdb_environ'
8604         class.
8605         (unset_environment_command): Likewise.
8606         (path_info): Likewise.
8607         (path_command): Likewise.
8608         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8609         (inferior::inferior): Initialize 'environment' using the host's
8610         information.
8611         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8612         Include "environ.h".
8613         (class inferior) <environment>: Change type from 'struct
8614         gdb_environ' to 'gdb_environ'.
8615         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8616         methods from 'gdb_environ' class.
8617         * solib.c (solib_find_1): Likewise
8618         * unittests/environ-selftests.c: New file.
8619
8620 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8621
8622         * features/i386/i386-linux.xml: Exchange the order of including
8623         32bit-linux.xml and 32bit-sse.xml.
8624         * features/i386/i386-linux.c: Regenerated.
8625
8626 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8627
8628         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8629         Delete copy ctor and assignment operator.
8630         (tdesc_type): Likewise.
8631         (tdesc_feature): Likewise.
8632         (tdesc_free_reg): Remove.
8633         (tdesc_create_reg): Use new.
8634         (tdesc_free_type): Remove.
8635         (tdesc_create_vector): Use new.
8636         (tdesc_create_union): Likewise.
8637         (tdesc_create_flags): Likewise.
8638         (tdesc_create_enum): Likewise.
8639         (tdesc_free_feature): Delete.
8640         (free_target_description): Use delete.
8641
8642 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8643
8644         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8645         registers.
8646
8647 2017-06-19  Pedro Alves  <palves@redhat.com>
8648
8649         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8650         after gdb::unlinker.
8651
8652 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8653
8654         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8655         gdb_environ to access an environment variable.
8656
8657 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8658
8659         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8660         gdb_byte*.
8661
8662 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8663
8664         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8665
8666 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8667
8668         * configure: Re-generate.
8669         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8670
8671 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8672
8673         * configure: Re-generate.
8674         * warning.m4: Pass -Werror to compiler when checking for
8675         supported warning flags.
8676
8677 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8678
8679         * Makefile.in (COMPILE.pre): Add "-x c++".
8680
8681 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8682             Pedro Alves  <palves@redhat.com>
8683             Yao Qi  <yao.qi@linaro.org>
8684
8685         * defs.h (RequireLongest): New.
8686         (extract_integer): Declare function template.
8687         (extract_signed_integer): Remove the declaration, but define it
8688         static inline.
8689         (extract_unsigned_integer): Likewise.
8690         (store_integer): Declare function template.
8691         (store_signed_integer): Remove the declaration, but define it
8692         static inline.
8693         (store_unsigned_integer): Likewise.
8694         * findvar.c (extract_integer): New function template.
8695         (extract_signed_integer): Remove.
8696         (extract_unsigned_integer): Remove.
8697         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8698         instantiations.
8699         (store_integer): New function template.
8700         (store_signed_integer): Remove.
8701         (store_unsigned_integer): Remove.
8702         (store_integer): Explicit instantiations.
8703         * regcache.c (regcache_raw_read_signed): Update.
8704         (regcache::raw_read): New function.
8705         (regcache::raw_read_signed): Remove.
8706         (regcache::raw_read_unsigned): Remove.
8707         (regcache_raw_read_unsigned): Update.
8708         (regcache_raw_write_unsigned): Update.
8709         (regcache::raw_write_signed): Remove.
8710         (regcache::raw_write): New function.
8711         (regcache_cooked_read_signed): Update.
8712         (regcache::raw_write_unsigned): Remove.
8713         (regcache::cooked_read_signed): Remove.
8714         (regcache_cooked_read_unsigned): Update.
8715         (regcache::cooked_read_unsigned): Remove.
8716         (regcache_cooked_write_signed): Update.
8717         (regcache_cooked_write_unsigned): Update.
8718         * regcache.h (regcache) <raw_read_signed>: Remove.
8719         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8720         <raw_read, raw_write>: New.
8721         <cooked_read_signed, cooked_write_signed>: Remove.
8722         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8723         <cooked_read, cooked_write>: New.
8724         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8725         (sh64_pseudo_register_write): Update.
8726
8727 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8728
8729         * arc-tdep.c (arc_disassembler_options): New variable.
8730         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8731         of default_print_insn.
8732         (arc_delayed_print_insn): Set info->section when needed,
8733         use default_print_insn to retrieve a disassembler.
8734
8735 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8736
8737         PR gdb/21574
8738         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8739         to mention $SHELL and startup-with-shell.
8740
8741 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8742
8743         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8744
8745 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8746
8747         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8748         default_print_insn instead of print_insn_aarch64.
8749         * arm-tdep.c (gdb_print_insn_arm): Call
8750         default_print_insn instead of print_insn_big_arm
8751         and print_insn_little_arm.
8752         * i386-tdep.c (i386_print_insn): Call default_print_insn
8753         instead of print_insn_i386.
8754         * ia64-tdep.c (ia64_print_insn): Call
8755         default_print_insn instead of print_insn_ia64.
8756         * mips-tdep.c (gdb_print_insn_mips): Call
8757         default_print_insn instead of print_insn_big_mips
8758         and print_insn_little_mips.
8759         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8760         instead of print_insn_spu.
8761
8762 2017-06-14  Pedro Alves  <palves@redhat.com>
8763
8764         * ada-lang.c: Include "common/byte-vector.h".
8765         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8766         * charset.c (wchar_iterator::iterate): Resize the vector instead
8767         of reserving it.
8768         * common/byte-vector.h: Include "common/def-vector.h".
8769         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8770         * cli/cli-dump.c: Include "common/byte-vector.h".
8771         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8772         * common/byte-vector.h: New file.
8773         * common/def-vector.h: New file.
8774         * common/default-init-alloc.h: New file.
8775         * dwarf2loc.c: Include "common/byte-vector.h".
8776         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8777         instead of reserving it.
8778         * dwarf2read.c: Include "common/byte-vector.h".
8779         (data_buf::m_vec): Now a gdb::byte_vector.
8780         * gdb_regex.c: Include "common/def-vector.h".
8781         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8782         * mi/mi-main.c: Include "common/byte-vector.h".
8783         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8784         * printcmd.c: Include "common/byte-vector.h".
8785         (print_scalar_formatted): Use gdb::byte_vector.
8786         * valprint.c: Include "common/byte-vector.h".
8787         (maybe_negate_by_bytes, print_decimal_chars): Use
8788         gdb::byte_vector.
8789
8790 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8791
8792         * darwin-nat.c: Include "nat/fork-inferior.h".
8793
8794 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8795
8796         * configure.nat: Factor out Darwin bits that are not
8797         architecture-specific.  Add fork-inferior.o.
8798
8799 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8800
8801         * configure.nat: Factor out AIX bits that are not
8802         architecture-specific.  Add fork-inferior.o.
8803
8804 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8805
8806         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8807         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8808         wrappers that just call rw_pieced_value.
8809
8810 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8811
8812         * dwarf2loc.c (write_pieced_value): When writing the data for a
8813         memory piece, use write_memory_with_notification instead of
8814         write_memory.
8815
8816 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8817
8818         * valops.c (read_value_memory): Change embedded_offset to
8819         represent a bit offset instead of a byte offset.
8820         * value.h (read_value_memory): Adjust comment.
8821
8822 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8823
8824         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8825         dest_offset_bits and source_offset_bits.
8826         (write_pieced_value): Likewise.
8827
8828 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8829
8830         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8831         given by DW_OP_bit_piece.
8832         (write_pieced_value): Likewise.
8833
8834 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8835
8836         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8837         some other preparations to the places where sufficient information
8838         is available.
8839         (write_pieced_value): Likewise.
8840
8841 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8842
8843         * dwarf2loc.c (bits_to_bytes): New function.
8844         (read_pieced_value): Fix offset calculations for register pieces
8845         on big-endian targets.
8846         (write_pieced_value): Likewise.
8847
8848 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8849
8850         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8851         (write_pieced_value): Likewise.
8852
8853 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8854
8855         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8856         transfer the source value's least significant bits, instead of its
8857         lowest-addressed ones.  Rename type_len to max_offset.
8858         (read_pieced_value): Mirror above changes to write_pieced_value as
8859         applicable.
8860
8861 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8862
8863         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8864         truncate full bytes from dest_offset_bits before using it as an
8865         offset into the buffer.
8866
8867 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8868
8869         * dwarf2loc.c (write_pieced_value): Include transfer size in
8870         byte-wise check.
8871
8872 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8873
8874         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8875         calculation of this_size.
8876
8877 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8878
8879         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8880         when targeting a bit-field.
8881         (write_pieced_value): Likewise.
8882
8883 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8884
8885         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8886         (allocate_piece_closure): Drop addr_size parameter.
8887         (dwarf2_evaluate_loc_desc_full): Adjust call to
8888         allocate_piece_closure.
8889
8890 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8891
8892         PR gdb/21226
8893         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8894         the LSB end, independent of endianness.
8895
8896 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8897
8898         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8899         size capping.
8900
8901 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8902
8903         * mips-linux-nat.c: Move include features/mips*-linux.c to
8904         mips-linux-tdep.c.
8905         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8906         to mips-linux-tdep.c.
8907         * mips-linux-tdep.c: Include features/mips*-linux.c
8908         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8909         functions.
8910         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8911         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8912         (tdesc_mips64_dsp_linux): Declare.
8913
8914 2017-06-12  Tom Tromey  <tom@tromey.com>
8915
8916         * valprint.h (val_print_type_code_int): Remove.
8917         * valprint.c (generic_val_print_int): Always call
8918         val_print_scalar_formatted.
8919         (val_print_type_code_int): Remove.
8920         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8921         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8922         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8923         * ada-valprint.c (ada_val_print_num): Use
8924         val_print_scalar_formatted.
8925
8926 2017-06-12  Tom Tromey  <tom@tromey.com>
8927
8928         * printcmd.c (print_scalar_formatted): Unify the two switches.
8929         Don't convert scalars to LONGEST.
8930
8931 2017-06-12  Tom Tromey  <tom@tromey.com>
8932
8933         PR exp/16225:
8934         * valprint.h (print_decimal_chars): Update.
8935         * valprint.c (maybe_negate_by_bytes): New function.
8936         (print_decimal_chars): Add "is_signed" argument.
8937         * printcmd.c (print_scalar_formatted): Update.
8938
8939 2017-06-12  Tom Tromey  <tom@tromey.com>
8940
8941         PR exp/16225:
8942         * valprint.h (print_binary_chars, print_hex_chars): Update.
8943         * valprint.c (val_print_type_code_int): Update.
8944         (print_binary_chars): Add "zero_pad" argument.
8945         (emit_octal_digit): New function.
8946         (print_octal_chars): Don't zero-pad.
8947         (print_decimal_chars): Likewise.
8948         (print_hex_chars): Add "zero_pad" argument.
8949         * sh64-tdep.c (sh64_do_fp_register): Update.
8950         * regcache.c (regcache::dump): Update.
8951         * printcmd.c (print_scalar_formatted): Update.
8952         * infcmd.c (default_print_one_register_info): Update.
8953
8954 2017-06-12  Pedro Alves  <palves@redhat.com>
8955             Alan Hayward  <alan.hayward@arm.com>
8956
8957         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8958         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8959         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8960         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8961         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8962
8963 2017-06-12  Pedro Alves  <palves@redhat.com>
8964
8965         * dwarf2read.c (mapped_symtab::data): Now a vector of
8966         symtab_index_entry instead of vector of
8967         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8968         whether an element's name is NULL instead of checking whether the
8969         element itself is NULL.
8970         (find_slot): Change return type.  Adjust.
8971         (hash_expand, , add_index_entry, uniquify_cu_indices)
8972         (write_hash_table): Adjust.
8973
8974 2017-06-12  Pedro Alves  <palves@redhat.com>
8975
8976         * dwarf2read.c (recursively_count_psymbols): New function.
8977         (write_psymtabs_to_index): Call it to compute number of psyms and
8978         pass estimate size of psyms_seen to unordered_set's ctor.
8979
8980 2017-06-12  Pedro Alves  <palves@redhat.com>
8981
8982         * dwarf2read.c (write_hash_table): Check if key already exists
8983         before emplacing.
8984
8985 2017-06-12  Pedro Alves  <palves@redhat.com>
8986
8987         * dwarf2read.c (data_buf::append_space): Rename to...
8988         (data_buf::grow): ... this, and make private.  Adjust all callers.
8989         (data_buf::append_uint): New method.
8990         (add_address_entry, write_one_signatured_type)
8991         (write_psymtabs_to_index): Use it.
8992
8993 2017-06-12  Pedro Alves  <palves@redhat.com>
8994
8995         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8996         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8997         (data_buf::file_write): Call ::fwrite directly.
8998
8999 2017-06-12  Pedro Alves  <palves@redhat.com>
9000
9001         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9002         std::vector::erase.
9003
9004 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9005
9006         Code cleanup: C++ify .gdb_index producer.
9007         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9008         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9009         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9010         (create_strtab, add_string): Remove.
9011         (file_write, data_buf): New.
9012         (struct symtab_index_entry): Use std::vector for cu_indices.
9013         (struct mapped_symtab): Use std::vector for data.
9014         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9015         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9016         Remove.
9017         (find_slot): Change return type.  Update it to the new data structures.
9018         (hash_expand, add_index_entry): Update it to the new data structures.
9019         (offset_type_compare): Remove.
9020         (uniquify_cu_indices): Update it to the new data structures.
9021         (c_str_view, c_str_view_hasher, vector_hasher): New.
9022         (add_indices_to_cpool): Remove.
9023         (write_hash_table): Update it to the new data structures.
9024         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9025         (eq_psymtab_cu_index): Remove.
9026         (psym_index_map): New typedef.
9027         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9028         reference and std::unordered_map for cu_index_htab.
9029         (add_address_entry, add_address_entry_worker, write_address_map)
9030         (write_psymbols): Update it to the new data structures.
9031         (write_obstack): Remove.
9032         (struct signatured_type_index_data): Change types_list to a data_buf
9033         reference and psyms_seen to a std::unordered_set reference.
9034         (write_one_signatured_type, recursively_write_psymbols)
9035         (write_psymtabs_to_index): Update it to the new data structures.
9036
9037 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9038
9039         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9040         separate-debug-file commands.
9041         * symfile.h (separate_debug_file_debug): New global.
9042         * symfile.c (separate_debug_file_debug): New global.
9043         (separate_debug_file_exists, find_separate_debug_file): Add
9044         debug output.
9045         (_initialize_symfile): Add "set debug separate-debug-file"
9046         command.
9047         * build-id.c (build_id_to_debug_bfd,
9048         find_separate_debug_file_by_buildid): Add debug output.
9049
9050 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9051
9052         * gdbarch.sh (displaced_step_free_closure): Remove.
9053         * gdbarch.h, gdbarch.c: Re-generate.
9054         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9055         displaced_step_free_closure.
9056         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9057         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9058         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9059         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9060         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9061         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9062         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9063         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9064         * infrun.c (displaced_step_clear): Call xfree instead of
9065         gdbarch_displaced_step_free_closure.
9066
9067 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9068
9069         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9070         NULL".
9071
9072 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9073
9074         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9075         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9076         (mn10300_push_dummy_call): Likewise.
9077
9078 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9079
9080         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9081
9082 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9083
9084         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9085
9086 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9087
9088         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9089         able to start inferiors using a shell.
9090         (New remote packets): Announce new packet "QStartupWithShell".
9091         * remote.c: Add PACKET_QStartupWithShell.
9092         (extended_remote_create_inferior): Handle new
9093         PACKET_QStartupWithShell.
9094         (remote_protocol_features) <QStartupWithShell>: New entry for
9095         PACKET_QStartupWithShell.
9096         (_initialize_remote): Call "add_packet_config_cmd" for
9097         QStartupShell.
9098
9099 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9100             Pedro Alves  <palves@redhat.com>
9101
9102         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9103         and "nat/fork-inferior.h".
9104         * common/common-inferior.h: New file, with contents from
9105         "gdb/inferior.h".
9106         * commom/common-utils.c: Include "common-utils.h".
9107         (stringify_argv): New function.
9108         * common/common-utils.h (stringify_argv): New prototype.
9109         * configure.nat: Add "fork-inferior.o" as a dependency for
9110         "*linux*", "fbsd*" and "nbsd*" hosts.
9111         * corefile.c (get_exec_file): Update comment.
9112         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9113         instead of "startup_inferior".
9114         (darwin_create_inferior): Call "add_thread_silent" after
9115         "fork_inferior".
9116         * fork-child.c: Cleanup unnecessary includes.
9117         (SHELL_FILE): Move to "common/common-fork-child.c".
9118         (environ): Likewise.
9119         (exec_wrapper): Initialize.
9120         (get_exec_wrapper): New function.
9121         (breakup_args): Move to "common/common-fork-child.c"; rename to
9122         "breakup_args_for_exec".
9123         (escape_bang_in_quoted_argument): Move to
9124         "common/common-fork-child.c".
9125         (saved_ui): New variable.
9126         (prefork_hook): New function.
9127         (postfork_hook): Likewise.
9128         (postfork_child_hook): Likewise.
9129         (gdb_startup_inferior): Likewise.
9130         (fork_inferior): Move to "common/common-fork-child.c".  Update
9131         function to support gdbserver.
9132         (startup_inferior): Likewise.
9133         * gdbcore.h (get_exec_file): Remove declaration.
9134         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9135         instead of "startup_inferior".  Call "add_thread_silent" after
9136         "fork_inferior".
9137         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9138         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9139         instead of "startup_inferior".  Call "add_thread_silent" after
9140         "fork_inferior".
9141         * inferior.h: Include "common-inferior.h".
9142         (trace_start_error): Move to "common/common-utils.h".
9143         (trace_start_error_with_name): Likewise.
9144         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9145         (startup_inferior): Likewise.
9146         (gdb_startup_inferior): New prototype.
9147         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9148         * nat/fork-inferior.h: New file.
9149         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9150         instead of "startup_inferior".  Call "add_thread_silent" after
9151         "fork_inferior".
9152         * target.h (target_terminal_init): Move prototype to
9153         "target/target.h".
9154         (target_terminal_inferior): Likewise.
9155         (target_terminal_ours): Likewise.
9156         * target/target.h (target_terminal_init): New prototype, moved
9157         from "target.h".
9158         (target_terminal_inferior): Likewise.
9159         (target_terminal_ours): Likewise.
9160         * utils.c (gdb_flush_out_err): New function.
9161
9162 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9163
9164         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9165         * common/common-gdbthread.h: New file, with parts from
9166         "gdb/gdbthread.h".
9167         * gdbthread.h: Include "common-gdbthread.h".
9168         (switch_to_thread): Moved to "common/common-gdbthread.h".
9169
9170 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9171
9172         * Makefile.in (SFILES): Add "common/job-control.c".
9173         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9174         (COMMON_OBS): Add "job-control.o".
9175         * common/job-control.c: New file, with contents from
9176         "gdb/inflow.c".
9177         * common/job-control.h: New file, with contents from "terminal.h".
9178         * fork-child.c: Include "job-control.h".
9179         * inflow.c: Include "job-control.h".
9180         (gdb_setpgid): Move to "common/common-inflow.c".
9181         (_initialize_inflow): Move setting of "job_control" to
9182         "handle_job_control".
9183         * terminal.h (job_control): Moved to "common/common-terminal.h".
9184         (gdb_setpgid): Likewise.
9185         * top.c: Include "job_control.h".
9186         * utils.c: Likewise.
9187         (job_control): Moved to "job-control.c".
9188
9189 2017-06-07  Pedro Alves  <palves@redhat.com>
9190
9191         * Makefile.in (SFILES): Add gdb_regex.c.
9192         (COMMON_OBS): Add gdb_regex.o.
9193         * ada-lang.c (ada_add_standard_exceptions)
9194         (ada_add_exceptions_from_frame, name_matches_regex)
9195         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9196         parameter type to compiled_regex.  Adjust.
9197         (ada_exceptions_list): Use compiled_regex.
9198         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9199         std::unique_ptr<compiled_regex>.
9200         (exception_catchpoint::~exception_catchpoint): Remove regfree
9201         call.
9202         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9203         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9204         * breakpoint.c (solib_catchpoint::compiled): Now a
9205         std::unique_ptr<compiled_regex>.
9206         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9207         (check_status_catch_solib): Adjust to use compiled_regex.
9208         (add_solib_catchpoint): Adjust to use compiled_regex.
9209         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9210         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9211         compiled_regex reference.  Adjust to use it.
9212         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9213         declaration.  Include "gdb_regex.h".
9214         (apropos_cmd): Change regex parameter to compiled_regex reference.
9215         * gdb_regex.c: New file.
9216         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9217         declarations.
9218         (class compiled_regex): New.
9219         * linux-tdep.c: Include "common/gdb_optional.h".
9220         (struct mapping_regexes): New, factored out from
9221         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9222         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9223         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9224         * probe.c: Include "common/gdb_optional.h".
9225         (collect_probes): Use compiled_regex and gdb::optional and remove
9226         cleanups.
9227         * skip.c: Include "common/gdb_optional.h".
9228         (skiplist_entry::compiled_function_regexp): Now a
9229         gdb::optional<compiled_regex>.
9230         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9231         (free_skiplist_entry): Remove regfree call.
9232         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9233         compiled_regex and gdb::optional.
9234         * symtab.c: Include "common/gdb_optional.h".
9235         (search_symbols): Use compiled_regex and gdb::optional.
9236         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9237         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9238         to gdb_regex.c.
9239
9240 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9241
9242         * regcache.c (regcache::save): Avoid buffer use.
9243         (regcache::dump): Likewise.
9244
9245 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9246
9247         * sh-tdep.c (sh_pseudo_register_read): Remove
9248         MAX_REGISTER_SIZE.
9249         (sh_pseudo_register_write): Likewise.
9250         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9251         (sh64_pseudo_register_write): Likewise
9252
9253 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9254
9255         * aarch64-tdep.c (aarch64_store_return_value): Use
9256         V_REGISTER_SIZE.
9257         (aarch64_pseudo_read_value): Likewise.
9258         (aarch64_pseudo_write): Likewise.
9259
9260 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9261
9262         * regformats/regdef.h (set_register_cache): Remove the
9263         declaration.
9264
9265 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9266
9267         * frame.c (frame_unwind_register_signed): Use
9268         frame_unwind_register_value.
9269
9270 2017-06-06  Pedro Alves  <palves@redhat.com>
9271
9272         PR breakpoints/21553
9273         * breakpoint.c (create_breakpoints_sal_default)
9274         (init_breakpoint_sal, create_breakpoint_sal): Use
9275         gdb::unique_xmalloc_ptr for string parameters.
9276         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9277         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9278         (base_breakpoint_create_breakpoints_sal)
9279         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9280         (strace_marker_create_breakpoints_sal)
9281         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9282         string parameters.
9283         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9284         gdb::unique_xmalloc_ptr for string parameters.
9285         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9286         parameters.
9287
9288 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9289
9290         * alpha-tdep.c (alpha_register_to_value): Use
9291         get_frame_register_value.
9292         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9293
9294 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9295
9296         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9297         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9298         (ia64_value_to_register): Likewise.
9299         (ia64_extract_return_value): Likewise.
9300         (ia64_store_return_value): Likewise.
9301         (ia64_push_dummy_call): Likewise.
9302
9303 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9304
9305         GDB 8.0 released.
9306
9307 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9308
9309         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9310
9311 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9312
9313         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9314         parameter.
9315         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9316
9317 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9318
9319         * event-loop.c (poll_timers): Unallocate timer using delete
9320         instead of xfree.
9321
9322 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9323
9324         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9325         (struct breakpoint) <~breakpoint>: New.
9326         (struct watchpoint): Inherit from breakpoint.
9327         <~watchpoint>: New.
9328         <base>: Remove.
9329         (struct tracepoint): Inherit from breakpoint.
9330         <base>: Remove.
9331         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9332         (struct longjmp_breakpoint): Inherit from breakpoint.
9333         <~longjmp_breakpoint>: New.
9334         <base>: Remove.
9335         (new_breakpoint_from_type): Remove casts.
9336         (watchpoint_in_thread_scope): Remove reference to base field.
9337         (watchpoint_del_at_next_stop): Likewise.
9338         (update_watchpoint): Likewise.
9339         (watchpoint_check): Likewise.
9340         (bpstat_check_watchpoint): Likewise.
9341         (set_longjmp_breakpoint): Likewise.
9342         (struct fork_catchpoint): Inherit from breakpoint.
9343         <base>: Remove.
9344         (struct solib_catchpoint): Inherit from breakpoint.
9345         <~solib_catchpoint>: New.
9346         <base>: Remove.
9347         (dtor_catch_solib): Change to ...
9348         (solib_catchpoint::~solib_catchpoint): ... this.
9349         (breakpoint_hit_catch_solib): Remove reference to base field.
9350         (add_solib_catchpoint): Likewise.
9351         (create_fork_vfork_event_catchpoint): Likewise.
9352         (struct exec_catchpoint): Inherit from breakpoint.
9353         <~exec_catchpoint>: New.
9354         <base>: Remove.
9355         (dtor_catch_exec): Change to ...
9356         (exec_catchpoint::~exec_catchpoint): ... this.
9357         (dtor_watchpoint): Change to ...
9358         (watchpoint::~watchpoint): ... this.
9359         (watch_command_1): Remove reference to base field.
9360         (catch_exec_command_1): Likewise.
9361         (base_breakpoint_dtor): Change to ...
9362         (breakpoint::~breakpoint): ... this.
9363         (base_breakpoint_ops): Remove dtor field value.
9364         (longjmp_bkpt_dtor): Change to ...
9365         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9366         (strace_marker_create_breakpoints_sal): Remove reference to base
9367         field.
9368         (delete_breakpoint): Don't manually call breakpoint destructor.
9369         (create_tracepoint_from_upload): Remove reference to base field.
9370         (trace_pass_set_count): Likewise.
9371         (initialize_breakpoint_ops): Don't initialize
9372         momentary_breakpoint_ops, don't set dtors.
9373         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9374         <~ada_catchpoint>: New.
9375         <base>: Remove.
9376         (create_excep_cond_exprs): Remove reference to base field.
9377         (dtor_exception): Change to ...
9378         (ada_catchpoint::~ada_catchpoint): ... this.
9379         (dtor_catch_exception): Remove.
9380         (dtor_catch_exception_unhandled): Remove.
9381         (dtor_catch_assert): Remove.
9382         (create_ada_exception_catchpoint): Remove reference to base
9383         field.
9384         (initialize_ada_catchpoint_ops): Don't set dtors.
9385         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9386         breakpoint.
9387         <~signal_catchpoint>: New.
9388         <base>: Remove.
9389         (signal_catchpoint_dtor): Change to ...
9390         (signal_catchpoint::~signal_catchpoint): ... this.
9391         (create_signal_catchpoint): Remove reference to base field.
9392         (initialize_signal_catchpoint_ops): Don't set dtor.
9393         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9394         from breakpoint.
9395         <~syscall_catchpoint>: New.
9396         <base>: Remove.
9397         (dtor_catch_syscall): Change to ...
9398         (syscall_catchpoint::~syscall_catchpoint): ... this.
9399         (create_syscall_event_catchpoint): Remove reference to base
9400         field.
9401         (initialize_syscall_catchpoint_ops): Don't set dtor.
9402         * break-catch-throw.c (struct exception_catchpoint): Inherit
9403         from breakpoint.
9404         <~exception_catchpoint>: New.
9405         <base>: Remove.
9406         (dtor_exception_catchpoint): Change to ...
9407         (exception_catchpoint::~exception_catchpoint): ... this.
9408         (handle_gnu_v3_exceptions): Remove reference to base field.
9409         (initialize_throw_catchpoint_ops): Don't set dtor.
9410         * ctf.c (ctf_get_traceframe_address): Remove reference to base
9411         field.
9412         * remote.c (remote_get_tracepoint_status): Likewise.
9413         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9414         * tracefile.c (tracefile_fetch_registers): Likewise.
9415         * tracepoint.c (actions_command): Likewise.
9416         (validate_actionline): Likewise.
9417         (tfind_1): Likewise.
9418         (get_traceframe_location): Likewise.
9419         (find_matching_tracepoint_location): Likewise.
9420         (parse_tracepoint_status): Likewise.
9421         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9422
9423 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9424
9425         * breakpoint.c (struct longjmp_breakpoint): New struct.
9426         (is_tracepoint_type): Change return type to bool.
9427         (is_longjmp_type): New function.
9428         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9429         (set_raw_breakpoint_without_location): Use
9430         new_breakpoint_from_type.
9431         (set_raw_breakpoint): Likewise.
9432
9433 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9434
9435         * breakpoint.c (new_breakpoint_from_type): New function.
9436         (create_breakpoint_sal): Use new_breakpoint_from_type and
9437         unique_ptr.
9438         (create_breakpoint): Likewise.
9439
9440 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
9441
9442         * memattr.c (mem_info_command): Rename to ...
9443         (info_mem_command): ... this.
9444         (mem_enable_command): Rename to ...
9445         (enable_mem_command): ... this.
9446         (mem_disable_command): Rename to ...
9447         (disable_mem_command): ... this.
9448         (mem_delete_command): Rename to ...
9449         (delete_mem_command): ... this.
9450         (_initialize_mem): Adjust function names.
9451
9452 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9453
9454         * btrace.c (handle_pt_insn_events): New.
9455         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
9456         STATUS.  Split into this and ...
9457         (handle_pt_insn_event_flags): ... this.
9458
9459 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
9460
9461         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9462         and struct pt_insn.resynced.
9463         * configure: Regenerated.
9464         * config.in: Regenerated.
9465
9466 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9467
9468         * btrace.c (ftrace_find_call_by_number): New function.
9469         (ftrace_new_function): Store objects, not pointers.
9470         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9471         ftrace_new_gap, ftrace_update_function,
9472         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9473         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9474         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9475         btrace_ends_with_single_insn, btrace_call_get): Account for
9476         btrace_thread_info::functions now storing objects.
9477         * btrace.h (struct btrace_thread_info): Add constructor.
9478         (struct btrace_thread_info) <functions>: Make std::vector.
9479         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9480         Initialize with default values.
9481         * record-btrace.c (record_btrace_frame_sniffer): Account for
9482         btrace_thread_info::functions now storing objects.
9483
9484 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9485
9486         * btrace.c: Remove typedef bfun_s.
9487         (ftrace_new_gap): Directly add gaps to the list of gaps.
9488         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9489         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9490         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9491         instead of gdb VEC.
9492
9493 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9494
9495         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9496         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9497         with btrace_thread_info::next_segment and
9498         btrace_thread_info::prev_segment.
9499         * btrace.h: Remove struct btrace_func_link.
9500         (struct btrace_function): Replace pair of function segment pointers
9501         with pair of indices.
9502         * python/py-record-btrace.c (btpy_call_prev_sibling,
9503         btpy_call_next_sibling): Replace references to
9504         btrace_thread_info::segment with btrace_thread_info::next_segment and
9505         btrace_thread_info::prev_segment.
9506         * record-btrace.c (record_btrace_frame_this_id): Use
9507         btrace_find_call_by_number.
9508
9509 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9510
9511         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9512         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9513         btrace_insn_next, btrace_insn_prev): Remove references to
9514         btrace_thread_info::flow.
9515         * btrace.h (struct btrace_function): Remove FLOW.
9516
9517 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9518
9519         * btrace.c (ftrace_find_call_by_number): New function.
9520         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9521         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9522         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9523         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9524         index.
9525         * btrace.h (struct btrace_function): Turn UP into an index.
9526         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9527         as an index.
9528         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9529         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9530         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9531
9532 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9533
9534         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9535         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9536         ftrace_update_function, ftrace_compute_global_level_offset,
9537         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9538         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9539         btrace_insn_end, btrace_is_empty): Remove references to
9540         btrace_thread_info::begin and btrace_thread_info::end.
9541         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9542         (struct btrace_thread_info) <functions>: Adjust comment.
9543         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9544         btrace_thread_info::begin.
9545
9546 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9547
9548         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9549         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9550         ftrace_update_function): Remove arguments that implicitly were always
9551         BTINFO->END.
9552         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9553         Don't pass BTINFO->END.
9554
9555 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9556
9557         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9558         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9559         btrace_find_insn_by_number): Replace function segment pointer with
9560         index.
9561         (btrace_insn_cmp): Simplify.
9562         * btrace.h: (struct btrace_insn_iterator) Rename index to
9563         insn_index.  Replace function segment pointer with index into function
9564         segment vector.
9565         * record-btrace.c (record_btrace_call_history): Replace function
9566         segment pointer use with index.
9567         (record_btrace_frame_sniffer): Retrieve function call segment through
9568         vector.
9569         (record_btrace_set_replay): Remove defunc't safety check.
9570
9571 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9572
9573         * btrace.c (btrace_ends_with_single_insn): New function.
9574         (btrace_call_get, btrace_call_number, btrace_call_begin,
9575         btrace_call_end, btrace_call_next, btrace_call_prev,
9576         btrace_find_call_by_number): Use index into call segment vector
9577         instead of pointer.
9578         (btrace_call_cmp): Simplify.
9579         * btrace.h (struct btrace_call_iterator): Replace function call segment
9580         pointer with index into vector.
9581         * record-btrace.c (record_btrace_call_history): Use index instead of
9582         pointer.
9583
9584 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9585
9586         * btrace.c (btrace_insn_begin, btrace_insn_end,
9587         btrace_find_insn_by_number): Add btinfo to iterator.
9588         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9589
9590 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9591
9592         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9593         and save pointers directly.
9594         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9595         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9596         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9597         changed signature of functions.
9598         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9599         (btrace_fetch): Remove code that adds btrace_function pointers to
9600         vector of btrace_functions.
9601         (btrace_clear): Simplify freeing vector of btrace_functions.
9602
9603 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9604
9605         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9606         Replace VEC_* with std::vector functions.
9607         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9608         (struct btrace_thread_info)<functions>: Change type to std::vector.
9609
9610 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9611
9612         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9613         "Removed targets and native configurations" up.  Merge duplicate
9614         "New commands" sub-sections.  Add "New options" sub-sections.
9615
9616 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9617
9618         * defs.h (copy_integer_to_size): New declaration.
9619         * findvar.c (copy_integer_to_size): New function.
9620         (do_cint_test): New selftest function.
9621         (copy_integer_to_size_test): Likewise.
9622         (_initialize_findvar): Likewise.
9623         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9624         (mips_fbsd_collect_reg): Use raw_collect_integer.
9625         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9626         (mips64_fill_gregset): Use raw_collect_integer
9627         (mips64_fill_fpregset): Use raw_supply_integer.
9628         * regcache.c (regcache::raw_supply_integer): New function.
9629         (regcache::raw_collect_integer): Likewise.
9630         * regcache.h: (regcache::raw_supply_integer): New declaration.
9631         (regcache::raw_collect_integer): Likewise.
9632
9633 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9634
9635         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9636         (COMMON_OBS): Add gdbarch-selftests.o.
9637         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9638         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9639         * gdbarch-selftests.c: New file.
9640         * regcache.h (regcache) <~regcache>: Mark it virtual if
9641         GDB_SELF_TEST.
9642         <raw_write>: Likewise.
9643
9644 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9645
9646         * regcache.c (current_regcache): Change it to
9647         regcache::current_regcache.
9648         (regcache_observer_target_changed): Update.
9649         (regcache_thread_ptid_changed): Make it a regcache static
9650         method.
9651         (regcache_thread_ptid_changed): Update.
9652         (class regcache_access): New.
9653         (current_regcache_test): Update.
9654         (_initialize_regcache): Update.
9655         * regcache.h: Include forward_list.
9656         (regcache): Declare regcache_thread_ptid_changed and declare
9657         registers_changed_ptid as friend.
9658
9659 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9660
9661         * i387-tdep.c (i387_register_to_value): Use register_size
9662         instead of TYPE_LENGTH.
9663         * m68k-tdep.c (m68k_register_to_value): Likewise.
9664
9665 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9666
9667         * i387-tdep.c (i387_convert_register_p): Return false if type
9668         code isn't TYPE_CODE_FLT.
9669
9670 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9671
9672         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9673         length is 4.
9674         (alpha_register_to_value): Remove type length check.
9675         (alpha_value_to_register): Likewise.
9676
9677 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9678
9679         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9680         TYPE_CODE_FLT.
9681
9682 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9683
9684         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9685         TYPE_CODE_FLT or not.
9686
9687 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9688
9689         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9690         * avr-tdep.c (avr_gdbarch_init): Likewise.
9691         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9692         * cris-tdep.c (cris_gdbarch_init): Likewise.
9693         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9694         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9695         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9696         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9697         * mep-tdep.c (mep_gdbarch_init): Likewise.
9698         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9699         * mips-tdep.c (mips_gdbarch_init): Likewise.
9700         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9701         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9702         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9703         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9704         * v850-tdep.c (v850_gdbarch_init): Likewise.
9705
9706 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9707
9708         * selftest-arch.c (tests_with_arch): Call registers_changed
9709         and reinit_frame_cache.
9710         * selftest.c (run_self_tests): Likewise.
9711
9712 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9713
9714         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9715         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9716
9717 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9718
9719         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9720         set_gdbarch_print_insn.
9721
9722 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9723
9724         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9725         set_gdbarch_print_insn.
9726
9727 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9728
9729         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9730         set_gdbarch_print_insn.
9731         * arc-tdep.c (arc_gdbarch_init): Likewise.
9732         * arch-utils.c: include dis-asm.h.
9733         (default_print_insn): New function.
9734         * arch-utils.h (default_print_insn): Declare.
9735         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9736         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9737         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9738         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9739         * frv-tdep.c (frv_gdbarch_init): Likewise.
9740         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9741         * gdbarch.sh (print_insn): Use default_print_insn.
9742         * gdbarch.c: Regenerated.
9743         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9744         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9745         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9746         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9747         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9748         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9749         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9750         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9751         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9752         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9753         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9754         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9755         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9756         * mt-tdep.c (mt_gdbarch_init): Likewise.
9757         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9758         * nios2-tdep.c (nios2_print_insn): Remove.
9759         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9760         * rx-tdep.c (rx_gdbarch_init): Likewise.
9761         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9762         * score-tdep.c (score_print_insn): Remove.
9763         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9764         * sh-tdep.c (sh_gdbarch_init): Likewise.
9765         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9766         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9767         * tic6x-tdep.c (tic6x_print_insn): Remove.
9768         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9769         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9770         * v850-tdep.c (v850_gdbarch_init): Likewise.
9771         * vax-tdep.c (vax_gdbarch_init): Likewise.
9772         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9773         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9774
9775 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9776
9777         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9778         (MIPS_FP0_REGNUM): Remove.
9779         (MIPS_FSR_REGNUM): Remove.
9780         (mips_fbsd_supply_fpregs): Use mips_regnum.
9781         (mips_fbsd_supply_gregs): Likewise.
9782         (mips_fbsd_collect_fpregs): Likewise.
9783         (mips_fbsd_collect_gregs): Likewise.
9784
9785 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9786
9787         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9788         (getpfpregs_supplies): New function.
9789         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9790         getfpregs_supplies.
9791         (mips_fbsd_store_inferior_registers): Likewise.
9792
9793 2017-05-22  Pedro Alves <palves@redhat.com>
9794
9795         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9796         maintainer.
9797
9798 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9799
9800         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9801         (store_register): Likewise.
9802         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9803         (get_decimal_float_return_value): Likewise.
9804         (do_ppc_sysv_return_value): Likewise.
9805         (ppc64_sysv_abi_push_integer): Likewise.
9806         (ppc64_sysv_abi_push_freg): Likewise.
9807         (ppc64_sysv_abi_return_value_base): Likewise.
9808         (ppc64_sysv_abi_return_value): Likewise.
9809         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9810         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9811         * rs6000-nat.c: Likewise.
9812         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9813         (rs6000_value_to_register): Likewise.
9814         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9815
9816 2017-05-21  Tom Tromey  <tom@tromey.com>
9817
9818         PR rust/21466:
9819         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9820         arrays as "[T]", not "[T; ]".
9821
9822 2017-05-19  Tom Tromey  <tom@tromey.com>
9823
9824         PR rust/21484:
9825         * rust-lang.c (exp_descriptor_rust): New function.
9826         (rust_language_defn): Use it.
9827         * p-lang.c (pascal_language_defn): Update.
9828         * opencl-lang.c (opencl_language_defn): Update.
9829         * objc-lang.c (objc_language_defn): Update.
9830         * m2-lang.c (m2_language_defn): Update.
9831         * language.h (struct language_defn)
9832         <la_watch_location_expression>: New member.
9833         * language.c (unknown_language_defn, auto_language_defn)
9834         (local_language_defn): Update.
9835         * go-lang.c (go_language_defn): Update.
9836         * f-lang.c (f_language_defn): Update.
9837         * d-lang.c (d_language_defn): Update.
9838         * c-lang.h (c_watch_location_expression): Declare.
9839         * c-lang.c (c_watch_location_expression): New function.
9840         (c_language_defn, cplus_language_defn, asm_language_defn)
9841         (minimal_language_defn): Use it.
9842         * breakpoint.c (watch_command_1): Call
9843         la_watch_location_expression.
9844         * ada-lang.c (ada_language_defn): Update.
9845
9846 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9847
9848         PR tui/21482
9849         * gdb_curses.h (NOMACROS): Define.
9850         (NCURSES_NOMACROS): Define.
9851
9852 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9853
9854         PR tui/21482
9855         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9856         arg to char *.
9857         * tui/tui-wingeneral.c (box_win): Likewise.
9858         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9859         (tui_show_source_line): Likewise.
9860         (tui_show_exec_info_content): Likewise.
9861
9862 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9863
9864         * sparc-tdep.c (sparc_structure_return_p)
9865         (sparc_arg_on_registers_p): New functions.
9866         (sparc32_store_arguments): Use them.
9867         * sparc64-tdep.c (sparc64_16_byte_align_p)
9868         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9869         Handle TYPE_CODE_ARRAY.
9870
9871 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9872
9873         * cli/cli-decode.c (add_alias_cmd): New function.
9874         * command.h (add_alias_cmd): Declare.
9875         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9876         instead call add_alias_cmd.
9877
9878 2017-05-17  Pedro Alves  <palves@redhat.com>
9879
9880         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9881         (nat_makefile_frag): ... this.  All references updated.
9882         * configure.ac: Likewise.
9883         * configure.nat: Likewise.  Enhance comments.
9884         * configure: Regenerate.
9885
9886 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9887
9888         * procfs.c (procfs_create_inferior): Change prototype to match
9889         definition.
9890
9891 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9892
9893         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9894         C++ compiler warning.
9895
9896 2017-05-12  Tom Tromey  <tom@tromey.com>
9897
9898         PR rust/21483:
9899         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9900         recurse, just call value_struct_elt directly.
9901
9902 2017-05-12  Tom Tromey  <tom@tromey.com>
9903
9904         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9905         OP_RUST_ARRAY>: Fix.
9906
9907 2017-05-12  Tom Tromey  <tom@tromey.com>
9908
9909         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9910
9911 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9912
9913         * regcache.c: Include <forward_list>.
9914         (struct regcache_list): Remove.
9915         (current_regcache): Update.
9916         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9917         (regcache_thread_ptid_changed): Likewise.
9918         (registers_changed_ptid): Likewise.
9919         (current_regcache_size): Likewise.
9920
9921 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9922
9923         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9924         (current_regcache_size): New function.
9925         (current_regcache_test): New function.
9926         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9927
9928 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9929
9930         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9931         (print_gp_register_row): Use get_frame_register_value.
9932
9933 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9934
9935         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9936         (mips_supply_fpregset): Likewise.
9937         (mips64_supply_gregset): Likewise.
9938
9939 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9940
9941         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9942         regcache->raw_supply_zeroed.
9943
9944 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9945
9946         * configure.nat: Rearrange 'case' statements to match
9947         host before cpu.
9948
9949 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9950
9951         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9952         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9953         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9954         "@nat_extra_makefile_frag@".
9955         (Makefile): Remove dependency on "@frags@".
9956         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9957         (data-directory/Makefile): Likewise.
9958         * config/aarch64/linux.mh: Deleted; moved contents to
9959         "gdb/configure.nat".
9960         * config/alpha/alpha-linux.mh: Likewise.
9961         * config/alpha/nbsd.mh: Likewise.
9962         * config/arm/linux.mh: Likewise.
9963         * config/arm/nbsdelf.mh: Likewise.
9964         * config/i386/cygwin.mh: Likewise.
9965         * config/i386/cygwin64.mh: Likewise.
9966         * config/i386/darwin.mh: Likewise.
9967         * config/i386/fbsd.mh: Likewise.
9968         * config/i386/fbsd64.mh: Likewise.
9969         * config/i386/go32.mh: Likewise.
9970         * config/i386/i386gnu.mh: Likewise.
9971         * config/i386/i386sol2.mh: Likewise.
9972         * config/i386/linux.mh: Likewise.
9973         * config/i386/linux64.mh: Likewise.
9974         * config/i386/mingw.mh: Likewise.
9975         * config/i386/mingw64.mh: Likewise.
9976         * config/i386/nbsd64.mh: Likewise.
9977         * config/i386/nbsdelf.mh: Likewise.
9978         * config/i386/nto.mh: Likewise.
9979         * config/i386/obsd.mh: Likewise.
9980         * config/i386/obsd64.mh: Likewise.
9981         * config/i386/sol2-64.mh: Likewise.
9982         * config/ia64/linux.mh: Likewise.
9983         * config/m32r/linux.mh: Likewise.
9984         * config/m68k/linux.mh: Likewise.
9985         * config/m68k/nbsdelf.mh: Likewise.
9986         * config/m68k/obsd.mh: Likewise.
9987         * config/m88k/obsd.mh: Likewise.
9988         * config/mips/fbsd.mh: Likewise.
9989         * config/mips/linux.mh: Likewise.
9990         * config/mips/nbsd.mh: Likewise.
9991         * config/mips/obsd64.mh: Likewise.
9992         * config/pa/linux.mh: Likewise.
9993         * config/pa/nbsd.mh: Likewise.
9994         * config/pa/obsd.mh: Likewise.
9995         * config/powerpc/aix.mh: Likewise.
9996         * config/powerpc/fbsd.mh: Likewise.
9997         * config/powerpc/linux.mh: Likewise.
9998         * config/powerpc/nbsd.mh: Likewise.
9999         * config/powerpc/obsd.mh: Likewise.
10000         * config/powerpc/ppc64-linux.mh: Likewise.
10001         * config/powerpc/spu-linux.mh: Likewise.
10002         * config/s390/linux.mh: Likewise.
10003         * config/sh/nbsd.mh: Likewise.
10004         * config/sparc/fbsd.mh: Likewise.
10005         * config/sparc/linux.mh: Likewise.
10006         * config/sparc/linux64.mh: Likewise.
10007         * config/sparc/nbsd64.mh: Likewise.
10008         * config/sparc/nbsdelf.mh: Likewise.
10009         * config/sparc/obsd64.mh: Likewise.
10010         * config/sparc/sol2.mh: Likewise.
10011         * config/tilegx/linux.mh: Likewise.
10012         * config/vax/nbsdelf.mh: Likewise.
10013         * config/vax/obsd.mh: Likewise.
10014         * config/xtensa/linux.mh: Likewise.
10015         * config/i386/i386gnu.mn: New file, with excerpts from
10016         "config/i386/i386gnu.mh".
10017         * configure: Regenerate.
10018         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10019         *.mh files under "gdb/config".
10020         * configure.nat: New file, with contents from the
10021         "gdb/config/*/*.mh" files.
10022
10023 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10024
10025         * btrace.c (btrace_clear): Free insn vector.
10026
10027 2017-05-05  Pedro Alves  <palves@redhat.com>
10028
10029         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10030         * configure: Regenerate.
10031
10032 2017-05-04  Pedro Alves  <palves@redhat.com>
10033
10034         * Makefile.in (SFILES): Add progspace-and-thread.c.
10035         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10036         (COMMON_OBS): Add progspace-and-thread.o.
10037         * breakpoint.c: Include "progspace-and-thread.h".
10038         (update_inserted_breakpoint_locations)
10039         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10040         Use scoped_restore_current_pspace_and_thread.
10041         (create_std_terminate_master_breakpoint): Use
10042         scoped_restore_current_program_space.
10043         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10044         (print_breakpoint_location): Use
10045         scoped_restore_current_program_space.
10046         (bp_loc_is_permanent): Use
10047         scoped_restore_current_pspace_and_thread.
10048         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10049         (download_tracepoint_locations): Use
10050         scoped_restore_current_pspace_and_thread.
10051         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10052         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10053         (enum step_over_calls_kind): Moved from inferior.h.
10054         (class scoped_restore_current_thread): New class.
10055         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10056         declaration.
10057         (scoped_restore_current_thread): New class.
10058         * infcmd.c: Include "common/gdb_optional.h".
10059         (continue_1, proceed_after_attach): Use
10060         scoped_restore_current_thread.
10061         (notice_new_inferior): Use scoped_restore_current_thread.
10062         * inferior.c: Include "progspace-and-thread.h".
10063         (restore_inferior, save_current_inferior): Delete.
10064         (add_inferior_command, clone_inferior_command): Use
10065         scoped_restore_current_pspace_and_thread.
10066         * inferior.h (scoped_restore_current_inferior): New class.
10067         * infrun.c: Include "progspace-and-thread.h" and
10068         "common/gdb_optional.h".
10069         (follow_fork_inferior): Use
10070         scoped_restore_current_pspace_and_thread.
10071         (scoped_restore_exited_inferior): New class.
10072         (handle_vfork_child_exec_or_exit): Use
10073         scoped_restore_exited_inferior,
10074         scoped_restore_current_pspace_and_thread,
10075         scoped_restore_current_thread and scoped_restore.
10076         (fetch_inferior_event): Use scoped_restore_current_thread.
10077         * linespec.c (decode_line_full, decode_line_1): Use
10078         scoped_restore_current_program_space.
10079         * mi/mi-main.c: Include "progspace-and-thread.h".
10080         (exec_continue): Use scoped_restore_current_thread.
10081         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10082         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10083         * proc-service.c (ps_pglobal_lookup): Use
10084         scoped_restore_current_program_space.
10085         * progspace-and-thread.c: New file.
10086         * progspace-and-thread.h: New file.
10087         * progspace.c (release_program_space, clone_program_space): Use
10088         scoped_restore_current_program_space.
10089         (restore_program_space, save_current_program_space)
10090         (save_current_space_and_thread): Delete.
10091         (switch_to_program_space_and_thread): Moved to
10092         progspace-and-thread.c.
10093         * progspace.h (save_current_program_space)
10094         (save_current_space_and_thread): Delete declarations.
10095         (scoped_restore_current_program_space): New class.
10096         * remote.c (remote_btrace_maybe_reopen): Use
10097         scoped_restore_current_thread.
10098         * symtab.c: Include "progspace-and-thread.h".
10099         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10100         * thread.c (print_thread_info_1): Use
10101         scoped_restore_current_thread.
10102         (struct current_thread_cleanup): Delete.
10103         (do_restore_current_thread_cleanup)
10104         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10105         (scoped_restore_current_thread::~scoped_restore_current_thread):
10106         ... this new dtor.
10107         (make_cleanup_restore_current_thread): Rename/convert to ...
10108         (scoped_restore_current_thread::scoped_restore_current_thread):
10109         ... this new ctor.
10110         (thread_apply_all_command): Use scoped_restore_current_thread.
10111         (thread_apply_command): Use scoped_restore_current_thread.
10112         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10113         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10114
10115 2017-05-04  Pedro Alves  <palves@redhat.com>
10116
10117         * thread.c (make_cleanup_restore_current_thread): Move
10118         find_thread_ptid call before the is_stopped call.  Assert that the
10119         thread is found.  Replace is_stopped call by checking the thread's
10120         state directly.  Remove unnecessary NULL-thread check.
10121
10122 2017-05-04  Pedro Alves  <palves@redhat.com>
10123
10124         * corelow.c (thread_section_name): New class.
10125         (get_core_register_section, get_core_siginfo): Use it.
10126
10127 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10128
10129         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10130         (get_core_register_section): Remove xfree of NULL pointer.
10131
10132 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10133
10134         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10135         * regcache.c (regcache::raw_supply_zeroed): New function.
10136         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10137
10138 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10139
10140         * gdbarch.sh: Remove commented out definition of
10141         TARGET_CHAR_BIT.
10142         * gdbarch.h: Re-generate.
10143
10144 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10145
10146         * configure: Regenerate.
10147
10148 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10149
10150         * solib-target.c (solib_target_relocate_section_addresses):
10151         Remove num_section_bases, num_bases, segment_bases variables.
10152
10153 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10154
10155         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10156
10157 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10158
10159         * solib-target.c: Include <vector>
10160         (struct lm_info_target) <~lm_info_target>: Remove.
10161         <segment_bases, section_bases>: Change type to
10162         std::vector<CORE_ADDR>.
10163         (library_list_start_segment, library_list_start_section,
10164         library_list_end_library,
10165         solib_target_relocate_section_addresses): Adjust.
10166
10167 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10168
10169         * gdbarch.sh (software_single_step): Change return type to
10170         std::vector<CORE_ADDR>.
10171         * gdbarch.c, gdbarch.h: Re-generate.
10172         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10173         Adjust.
10174         (arm_deal_with_atomic_sequence_raw): Adjust.
10175         (thumb_get_next_pcs_raw): Adjust.
10176         (arm_get_next_pcs_raw): Adjust.
10177         (arm_get_next_pcs): Adjust.
10178         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10179         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10180         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10181         (alpha_software_single_step): Adjust.
10182         * alpha-tdep.h (alpha_software_single_step): Adjust.
10183         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10184         * arm-tdep.c (arm_software_single_step): Adjust.
10185         (arm_breakpoint_kind_from_current_state): Adjust.
10186         * arm-tdep.h (arm_software_single_step): Adjust.
10187         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10188         * cris-tdep.c (cris_software_single_step): Adjust.
10189         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10190         (micromips_deal_with_atomic_sequence): Adjust.
10191         (deal_with_atomic_sequence): Adjust.
10192         (mips_software_single_step): Adjust.
10193         * mips-tdep.h (mips_software_single_step): Adjust.
10194         * moxie-tdep.c (moxie_software_single_step): Adjust.
10195         * nios2-tdep.c (nios2_software_single_step): Adjust.
10196         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10197         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10198         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10199         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10200         * sparc-tdep.c (sparc_software_single_step): Adjust.
10201         * spu-tdep.c (spu_software_single_step): Adjust.
10202         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10203
10204 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10205
10206         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10207         * gdbarch.h: Re-generate.
10208
10209 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10210
10211         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10212         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10213         * python/py-instruction.c, python/py-instruction.h: New file.
10214         * python/py-record.c: Add py-instruction.h include.
10215         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10216         gdb.RecordInstruction.
10217         * python/python-internal.h: Add gdbpy_initialize_instruction
10218         declaration.
10219         * python/python.c (do_start_initialization): Add
10220         gdbpy_initialize_instruction.
10221
10222 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10223
10224         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10225         Remove.
10226         (btrace_func_from_recpy_func): New function.
10227         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10228         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10229         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10230         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10231         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10232         Also, use new helper functions.
10233         (btpy_list_item): Use new helper functions.
10234         (recpy_bt_function_call_history): Use new type name.
10235         (btpy_call_getset): Remove.
10236         (gdbpy_initialize_btrace): Remove code to initialize
10237         gdb.BtraceFunctionCall.
10238         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10239         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10240         recpy_bt_func_prev, recpy_bt_func_next): New export.
10241         * python/py-record.c (recpy_func_type): New static object.
10242         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10243         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10244         recpy_func_next): New function.
10245         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10246         (recpy_func_getset): New static object.
10247         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10248         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10249
10250 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10251
10252         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10253         (btpy_object, btpy_insn_type, btpy_new): Remove.
10254         (btpy_list_object): Use gdb.RecordInstruction type instead of
10255         gdb.BtraceInstruction type.
10256         (btrace_insn_from_recpy_insn): New function.
10257         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10258         btpy_new.
10259         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10260         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10261         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10262         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10263         instead of btpy_object.
10264         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10265         btpy_insn_data, btpy_insn_decode): Rename to ...
10266         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10267         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10268         recpy_bt_insn_decode): This.  Also, use new helper functions.
10269         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10270         recpy_insn_type.
10271         (btpy_insn_getset): Remove.
10272         (gdbpy_initialize_btrace): Remove code to initialize
10273         gdb.BtraceInstruction.  Use recpy_element_object.
10274         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10275         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10276         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10277         * python/py-record.c (recpy_insn_type): New static object.
10278         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10279         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10280         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10281         New function.
10282         (recpy_insn_getset): New static object.
10283         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10284         * python/py-record.h (recpy_element_object): New typedef.
10285         (recpy_insn_type, recpy_insn_new): New export.
10286
10287 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10288
10289         * py-record-btrace.c (btpy_insn_new): Removed.
10290         (btpy_insn_or_gap_new): New function.
10291         (btpy_insn_error): Removed.
10292         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10293         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10294         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10295         btpy_insn_or_gap_new instead of btpy_insn_new.
10296         (btpy_insn_getset): Remove btpy_insn_error.
10297         * py-record.c (recpy_gap_type): New static object.
10298         (recpy_gap_object): New typedef.
10299         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10300         recpy_gap_reason_string): New function.
10301         (recpy_gap_getset): New static object.
10302         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10303         * py-record.h (recpy_gap_new): New export.
10304
10305 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10306
10307         * python/py-record.c (recpy_ptid): Remove.
10308         (recpy_record_getset): Remove recpy_ptid.
10309
10310 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10311
10312         * btrace.c (btrace_fetch): Set inferior_ptid.
10313         * python/py-record-btrace.c: Add "py-record.h" include.
10314         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10315         recpy_bt_end, recpy_bt_instruction_history,
10316         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10317         in gdb.Record object instead of current ptid.
10318         * python/py-record.c: Include new "py-record.h" file.
10319         (recpy_record_object): Moved to py-record.h.
10320         * python/py-record.h: New file.
10321
10322 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10323
10324         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10325         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10326         indentation.
10327
10328 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10329
10330         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10331         the past maintainers section.
10332
10333 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10334
10335         * infcmd.c (get_return_value): Use regcache ctor, and remove
10336         cleanup.
10337
10338 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10339             Pedro Alves  <palves@redhat.com>
10340
10341         * regcache.c (regcache::regcache): New tag dispatch ctor.
10342         (do_cooked_read): Moved above.
10343         (regcache_dup): Use the tag dispatch ctor..
10344         * regcache.h (regcache): Declare ctor, delete copy ctor and
10345         assignment operator, remove friend regcache_dup.
10346
10347 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10348
10349         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10350         call method save instead of regcache_cpy.
10351         * regcache.h (struct regcache): Make regcache_dup a friend.
10352
10353 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10354
10355         * regcache.c (struct regcache): Move to regcache.h
10356         (regcache::arch): New method.
10357         (regcache_get_ptid): Update.
10358         (get_regcache_arch): Call arch method.
10359         (get_regcache_aspace): Call method aspace.
10360         (register_buffer): Change it to method.
10361         (regcache_save): Change it to regcache::save.
10362         (regcache_restore): Likewise.
10363         (regcache_cpy_no_passthrough): Remove the declaration.
10364         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10365         (regcache_cpy_no_passthrough): Change it to method
10366         cpy_no_passthrough.
10367         (regcache_register_status): Change it to method
10368         get_register_status.
10369         (regcache_invalidate): Change it to method invalidate.
10370         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10371         (regcache_raw_update): Change it to method raw_update.
10372         (regcache_raw_read): Likewise.
10373         (regcache_raw_read_signed): Likewise.
10374         (regcache_raw_read_unsigned): Likewise.
10375         (regcache_raw_write_signed): Likewise.
10376         (regcache_raw_write_unsigned): Likewise.
10377         (regcache_cooked_read): Likewise.
10378         (regcache_cooked_read_value): Likewise.
10379         (regcache_cooked_read_signed): Likewise.
10380         (regcache_cooked_read_unsigned): Likewise.
10381         (regcache_cooked_write_signed): Likewise.
10382         (regcache_cooked_write_unsigned): Likewise.
10383         (regcache_raw_set_cached_value): Likewise.
10384         (regcache_raw_write): Likewise.
10385         (regcache_cooked_write): Likewise.
10386         (regcache_xfer_part): Likewise.
10387         (regcache_raw_read_part): Likewise.
10388         (regcache_raw_write_part): Likewise.
10389         (regcache_cooked_read_part): Likewise.
10390         (regcache_cooked_write_part): Likewise.
10391         (regcache_raw_supply): Likewise.
10392         (regcache_raw_collect): Likewise.
10393         (regcache_transfer_regset): Likewise.
10394         (regcache_supply_regset): Likewise.
10395         (regcache_collect_regset): Likewise.
10396         (regcache_debug_print_register): Likewise.
10397         (enum regcache_dump_what): Move it to regcache.h.
10398         (regcache_dump): Change it to method dump.
10399         * regcache.h (enum regcache_dump_what): New.
10400         (class regcache): New.
10401         * target.c (target_fetch_registers): Call method
10402         debug_print_register.
10403         (target_store_registers): Likewise.
10404
10405 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10406
10407         * windows-nat.c (struct lm_info_windows): Initialize field.
10408         (windows_make_so): Allocate lm_info_windows with new.
10409         (windows_free_so): Free lm_info_windows with delete.
10410
10411 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10412
10413         * solib-darwin.c (struct lm_info_darwin): Initialize field.
10414         (darwin_current_sos): Allocate lm_info_darwin with new, remove
10415         cleanup.
10416         (darwin_free_so): Free lm_info_darwin with delete.
10417
10418 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10419
10420         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10421         <l_addr_p>: Change type to bool.
10422         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10423         (svr4_free_so): Free lm_info_svr4 with delete.
10424         (svr4_copy_library_list): Replace memcpy with call to copy
10425         constructor.
10426         (library_list_start_library, svr4_default_sos): Allocate
10427         lm_info_svr4 with new.
10428
10429 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10430
10431         * solib-target.c (struct lm_info_target): Add destructor,
10432         initialize fields.
10433         <name>: Change type to std::string.
10434         (library_list_start_library): Allocate lm_info_target with new.
10435         (solib_target_free_library_list): Free lm_info_target with
10436         delete.
10437         (solib_target_current_sos): Adapt to std::string.
10438         (solib_target_free_so): Free lm_info_target with delete.
10439
10440 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10441
10442         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10443         fields.
10444         (frv_current_sos): Allocate lm_info_frv with new.
10445         (frv_relocate_main_executable): Free lm_info_frv with delete,
10446         allocate with new.
10447         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10448
10449 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10450
10451         * solib-frv.c (struct lm_info_frv): Fix indentation.
10452
10453 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10454
10455         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10456         map field.
10457         (dsbt_current_sos): Allocate lm_info_dsbt with new.
10458         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10459         and allocate with new.
10460         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10461
10462 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10463
10464         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10465         <filename, member_name>: Change type to std::string.
10466         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10467         (library_list_start_library): Allocate lm_info_aix with new.
10468         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10469         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10470         with copy constructor.
10471
10472 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10473
10474         * solist.h (struct lm_info): Remove.
10475         (struct lm_info_base): New class.
10476         (struct so_list) <lm_info>: Change type to lm_info_base *.
10477         * nto-tdep.c (struct lm_info): Remove.
10478         (lm_addr): Adjust.
10479         * solib-aix.c (struct lm_info): Rename to ...
10480         (struct lm_info_aix): ... this.  Extend lm_info_base.
10481         (lm_info_p): Rename to ...
10482         (lm_info_aix_p): ... this, and adjust.
10483         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10484         solib_aix_parse_libraries, library_list_start_library,
10485         solib_aix_free_library_list, solib_aix_parse_libraries,
10486         solib_aix_get_library_list,
10487         solib_aix_relocate_section_addresses, solib_aix_free_so,
10488         solib_aix_get_section_offsets,
10489         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10490         Adjust.
10491         (struct solib_aix_inferior_data) <library_list>: Adjust.
10492         * solib-darwin.c (struct lm_info): Rename to ...
10493         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10494         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10495         * solib-dsbt.c (struct lm_info): Rename to ...
10496         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10497         (struct dsbt_info) <main_executable_lm_info): Adjust.
10498         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10499         dsbt_relocate_section_addresses): Adjust.
10500         * solib-frv.c (struct lm_info): Rename to ...
10501         (struct lm_info_frv): ... this.  Extend lm_info_base.
10502         (main_executable_lm_info): Adjust.
10503         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10504         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10505         find_canonical_descriptor_in_load_object,
10506         frv_fdpic_find_canonical_descriptor): Adjust.
10507         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10508         to lm_info_svr4.
10509         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10510         svr4_clear_so, svr4_copy_library_list,
10511         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10512         svr4_current_sos, svr4_fetch_objfile_link_map,
10513         solist_update_incremental): Adjust.
10514         * solib-svr4.h (struct lm_info_svr4): Move here from
10515         solib-svr4.c.
10516         * solib-target.c (struct lm_info): Rename to ...
10517         (struct lm_info_target): ... this.  Extend lm_info_base.
10518         (lm_info_p): Rename to ...
10519         (lm_info_target_p): ... this.
10520         (solib_target_parse_libraries, library_list_start_segment,
10521         library_list_start_section, library_list_start_library,
10522         library_list_end_library, solib_target_free_library_list,
10523         solib_target_current_sos, solib_target_free_so,
10524         solib_target_relocate_section_addresses): Adjust.
10525         * windows-nat.c (struct lm_info): Rename to ...
10526         (struct lm_info_windows): ... this.  Extend lm_info_base.
10527         (windows_make_so, handle_load_dll, handle_unload_dll,
10528         windows_xfer_shared_libraries): Adjust.
10529
10530 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10531
10532         * solib-darwin.c (struct darwin_so_list): Remove.
10533         (darwin_current_sos): Allocate an so_list object instead of a
10534         darwin_so_list, separately allocate an lm_info object.
10535         (darwin_free_so): Free lm_info.
10536
10537 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10538
10539         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10540         with fprintf_filtered.
10541
10542 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10543
10544         * regcache.c (regcache::regcache): New function.
10545         (regcache::~regcache): New function.
10546         (regcache_xmalloc_1): Remove.
10547         (regcache_xmalloc): Call new regcache.
10548         (regcache_xfree): Call delete regcache.
10549         (get_thread_arch_aspace_regcache): Call new regcache.
10550
10551 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10552
10553         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10554         lwp instead of ptid_get_lwp.
10555
10556 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10557
10558         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10559         lwp_info instead of getting from inferior_ptid.
10560
10561 2017-04-27  Keith Seitz  <keiths@redhat.com>
10562
10563         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10564         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10565         (CV_CONVERSION_BADNESS): Define.
10566         (rank_one_type): Remove overly restrictive rvalue reference
10567         rank checks.
10568         Add cv-qualifier checks and subranks for type equality.
10569         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10570         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10571         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10572
10573 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10574
10575         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10576         count when creating the object.
10577
10578 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10579             Ulrich Weigand  <uweigand@de.ibm.com>
10580
10581         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10582         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10583         is used in AIX.
10584         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10585         (process_xcoff_symbol): Likewise.
10586         (scan_xcoff_symtab): Likewise.
10587
10588 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10589
10590         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10591         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10592         (ia64_access_reg): Use get_frame_register_unsigned.
10593         (ia64_access_rse_reg): Likewise.
10594         (ia64_libunwind_frame_prev_register): Likewise.
10595
10596 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10597
10598         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10599         * gdbarch.c: Regenerated.
10600         * gdbarch.h: Regenerated.
10601         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10602         visibility external.
10603         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10604         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10605         (enum cfa_how_kind): Move to ...
10606         (struct dwarf2_frame_state_reg_info): Likewise.
10607         (struct dwarf2_frame_state): Likewise.
10608         * dwarf2-frame.h: ... here.
10609         (dwarf2_frame_state_alloc_regs): New declaration.
10610         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10611         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10612
10613 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10614
10615         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10616         regcache_raw_read_unsigned.
10617         (xtensa_pseudo_register_write): Likewise.
10618
10619 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10620
10621         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10622         (nds32_pseudo_register_write): Likewise.
10623
10624 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10625
10626         * regcache.c (struct regcache) <readonly_p>: Change its type
10627         to bool.
10628         (regcache_xmalloc_1): Update parameter type and callers update.
10629
10630 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10631
10632         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10633         set_gdbarch_wchar_bit.
10634         * arm-tdep.c (arm_gdbarch_init): Likewise.
10635
10636 2017-04-25  Pedro Alves  <palves@redhat.com>
10637
10638         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10639         (BothAreRelocatable, memcopy, memmove): Don't define.
10640         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10641         macros.
10642
10643 2017-04-25  Pedro Alves  <palves@redhat.com>
10644
10645         * common/common-defs.h: Include "common/poison.h".
10646         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10647         and adjust.
10648         * common/poison.h: New file.
10649         * common/traits.h: Include <type_traits>.
10650         (Not, Or, Requires): New, moved from common/function-view.h.
10651
10652 2017-04-25  Pedro Alves  <palves@redhat.com>
10653
10654         * breakpoint.h (struct breakpoint): In-class initialize all
10655         fields.  Make boolean fields "bool".
10656         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10657         memset call and initializations no longer necessary.
10658
10659 2017-04-25  Pedro Alves  <palves@redhat.com>
10660
10661         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10662         reference.
10663         (pt_btrace_insn): New function.
10664         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10665
10666 2017-04-25  Pedro Alves  <palves@redhat.com>
10667
10668         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10669         "base" field and inherit from "bp_location" instead.  Add
10670         non-default ctor.
10671         (allocate_location_exception): Use new non-default ctor.
10672         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10673         (init_bp_location): Convert to ...
10674         (bp_location::bp_location): ... this new ctor, and remove memset
10675         call.
10676         (base_breakpoint_allocate_location): Use the new non-default ctor.
10677         * breakpoint.h (bp_location): Now a class.  Declare default and
10678         non-default ctors.  In-class initialize all members.
10679         (init_bp_location): Remove declaration.
10680
10681 2017-04-25  Pedro Alves  <palves@redhat.com>
10682
10683         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10684         assignment operator.
10685
10686 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10687
10688         * doublest.c (convert_doublest_to_floatformat): Call
10689         floatformat_totalsize_bytes.
10690
10691 2017-04-22  Tom Tromey  <tom@tromey.com>
10692
10693         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10694         ui_out_emit_list.
10695         * stack.c (print_frame): Use ui_out_emit_list.
10696         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10697         ui_out_emit_list.
10698         * mi/mi-main.c (print_one_inferior)
10699         (mi_cmd_data_list_register_names)
10700         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10701         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10702         ui_out_emit_list.
10703         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10704         (mi_output_solib_attribs): Use ui_out_emit_list,
10705         ui_out_emit_tuple.
10706         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10707         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10708         (mi_cmd_stack_list_args, list_args_or_locals): Use
10709         ui_out_emit_list.
10710         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10711         * breakpoint.c (print_solib_event, output_thread_groups): Use
10712         ui_out_emit_list.
10713
10714 2017-04-22  Tom Tromey  <tom@tromey.com>
10715
10716         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10717         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10718         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10719
10720 2017-04-22  Tom Tromey  <tom@tromey.com>
10721
10722         * tracepoint.c (tvariables_info_1)
10723         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10724
10725 2017-04-22  Tom Tromey  <tom@tromey.com>
10726
10727         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10728         annotate_arg_emitter.
10729         * breakpoint.c (print_mention_watchpoint)
10730         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10731         * annotate.h (struct annotate_arg_emitter): New.
10732
10733 2017-04-22  Tom Tromey  <tom@tromey.com>
10734
10735         * record-btrace.c (record_btrace_insn_history)
10736         (record_btrace_insn_history_range, record_btrace_call_history)
10737         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10738         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10739         ui_out_emit_tuple.
10740         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10741         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10742         * skip.c (skip_info): Use ui_out_emit_tuple.
10743         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10744         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10745         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10746         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10747         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10748         ui_out_emit_tuple.
10749         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10750         (output_register, mi_cmd_data_read_memory)
10751         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10752         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10753         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10754         Use ui_out_emit_tuple.
10755         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10756         ui_out_emit_tuple.
10757         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10758         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10759         * linux-thread-db.c (info_auto_load_libthread_db): Use
10760         ui_out_emit_tuple.
10761         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10762         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10763         * disasm.c (do_mixed_source_and_assembly_deprecated)
10764         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10765         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10766         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10767         * breakpoint.c (print_one_breakpoint_location)
10768         (print_one_breakpoint): Use ui_out_emit_tuple.
10769         * auto-load.c (print_script, info_auto_load_cmd): Use
10770         ui_out_emit_tuple.
10771         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10772
10773 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10774
10775         * thread.c (print_thread_info_1): Remove dead code.
10776
10777 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10778
10779         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10780         GDB_SELF_TEST.
10781         * arm-tdep.c (selftests::arm_record_test): Likewise.
10782
10783 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10784
10785         * regcache.c (regcache_restore): Remove argument 2.  Replace
10786         argument 3 with regcache.  Get register status from
10787         src->register_status and get register contents from
10788         register_buffer (src, regnum).
10789         (regcache_cpy): Update.
10790
10791 2017-04-19  Pedro Alves  <palves@redhat.com>
10792
10793         * gdbthread.h (thread): Add missing closing parenthesis in
10794         comment.
10795
10796 2017-04-19  Pedro Alves  <palves@redhat.com>
10797
10798         * common/refcounted-object.h: New file.
10799         * gdbthread.h: Include "common/refcounted-object.h".
10800         (thread_info): Inherit from refcounted_object and add comments.
10801         (thread_info::incref, thread_info::decref)
10802         (thread_info::m_refcount): Delete.
10803         (thread_info::deletable): Use the refcounted_object::refcount()
10804         method.
10805         * inferior.c (current_inferior_): Add comment.
10806         (set_current_inferior): Increment/decrement refcounts.
10807         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10808         not-deletable instead of comparing with the current inferior.
10809         (initialize_inferiors): Increment the initial inferior's refcount.
10810         * inferior.h (struct inferior): Forward declare.
10811         Include "common/refcounted-object.h".
10812         (current_inferior, set_current_inferior): Move declaration to
10813         before struct inferior's definition, and fix comment.
10814         (inferior): Inherit from refcounted_object.  Add comments.
10815         * thread.c (switch_to_thread_no_regs): Reference the thread's
10816         inferior pointer directly instead of doing a ptid lookup.
10817         (switch_to_no_thread): New function.
10818         (switch_to_thread(thread_info *)): New function, factored out
10819         from ...
10820         (switch_to_thread(ptid_t)): ... this.
10821         (restore_current_thread): Delete.
10822         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10823         fields, and add 'inf' field.
10824         (do_restore_current_thread_cleanup): Check whether old->inf is
10825         alive instead of looking up an inferior by ptid.  Use
10826         switch_to_thread and switch_to_no_thread.
10827         (restore_current_thread_cleanup_dtor): Use old->inf directly
10828         instead of lookup up an inferior by id.  Decref the inferior.
10829         Don't restore 'removable'.
10830         (make_cleanup_restore_current_thread): Same the inferior pointer
10831         in old, instead of the inferior number.  Incref the inferior.
10832         Don't save/clear 'removable'.
10833
10834 2017-04-19  Pedro Alves  <palves@redhat.com>
10835
10836         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10837         unittests/scoped_restore-selftests.c.
10838         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10839         * common/scoped_restore.h (scoped_restore_base): Make "class".
10840         (scoped_restore_base::release): New public method.
10841         (scoped_restore_base::scoped_restore_base): New protected ctor.
10842         (scoped_restore_base::m_saved_var): New protected field.
10843         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10844         scoped_restore_base base class instead of m_saved_var directly.
10845         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10846         (scoped_restore_tmpl::scoped_restore_tmpl(const
10847         scoped_restore_tmpl<T>&)): Likewise.
10848         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10849         method.
10850         (scoped_restore_tmpl::saved_var): New method.
10851         (scoped_restore_tmpl::m_saved_var): Delete.
10852         * inferior.h (inferior::detaching): Now a bool.
10853         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10854         cleanup.
10855         * unittests/scoped_restore-selftests.c: New file.
10856
10857 2017-04-19  Pedro Alves  <palves@redhat.com>
10858
10859         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10860         Re-sort in alphabetic order.
10861
10862 2017-04-18  Pedro Alves  <palves@redhat.com>
10863
10864         * xml-support.c (obstack_xml_printf): Delete.
10865         * xml-support.h (obstack_xml_printf): Delete.
10866
10867 2017-04-18  Pedro Alves  <palves@redhat.com>
10868
10869         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10870         vdebug, verror, body_text, start_element, end_element, name,
10871         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10872         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10873         is_xinclude>: Make private and add m_ prefix.
10874         (gdb_xml_parser::body_text): New method, based on ...
10875         (gdb_xml_body_text): ... this.  Adjust.
10876         (gdb_xml_parser::vdebug): New method, based on ...
10877         (gdb_xml_debug): ... this.  Adjust.
10878         (gdb_xml_parser::verror): New method, based on ...
10879         (gdb_xml_error): ... this.  Adjust.
10880         (gdb_xml_parser::start_element): New method, based on ...
10881         (gdb_xml_start_element): ... this.  Adjust.
10882         (gdb_xml_start_element_wrapper): Defer to
10883         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10884         (gdb_xml_parser::end_element): New method, based on ...
10885         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10886         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10887         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10888         (gdb_xml_parser::use_dtd): New method, based on ...
10889         (gdb_xml_use_dtd): ... this.  Adjust.
10890         (gdb_xml_parser::parse): New method, based on ...
10891         (gdb_xml_parse): ... this.  Adjust.
10892         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10893         (xinclude_start_include): Adjust to call the parser's name method.
10894         (xml_xinclude_default, xml_xinclude_start_doctype)
10895         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10896         method.
10897         (xml_process_xincludes): Adjust to call parser methods.
10898         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10899         declarations.
10900
10901 2017-04-18  Pedro Alves  <palves@redhat.com>
10902
10903         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10904         gdb::optional<std::string>.
10905         * xml-support.c: Include <string>.
10906         (scope_level::scope_level(scope_level &&))
10907         (scope_level::~scope_level): Delete.
10908         (scope_level::body): Now a std::string.
10909         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10910         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10911         parameter.
10912         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10913         (xinclude_parsing_data::output): Now a std::string reference.
10914         (xinclude_start_include): Adjust.
10915         (xml_xinclude_default): Adjust.
10916         (xml_process_xincludes): Add 'output' parameter, and return bool.
10917         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10918         and return bool.
10919         * xml-tdesc.c: Include <unordered_map> and <string>.
10920         (tdesc_xml_cache): Delete.
10921         (tdesc_xml_cache_s): Delete.
10922         (xml_cache): Now an std::unordered_map.
10923         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10924         (target_fetch_description_xml): Change return type to
10925         gdb::optional<std::string>, and adjust.
10926         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10927         (target_fetch_description_xml): Change return type to
10928         gdb::optional<std::string>.
10929
10930 2017-04-18  Pedro Alves  <palves@redhat.com>
10931
10932         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10933         unittests/optional-selftests.c.
10934         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10935         * unittests/optional-selftests.c: New file.
10936         * unittests/optional/assignment/1.cc: New file.
10937         * unittests/optional/assignment/2.cc: New file.
10938         * unittests/optional/assignment/3.cc: New file.
10939         * unittests/optional/assignment/4.cc: New file.
10940         * unittests/optional/assignment/5.cc: New file.
10941         * unittests/optional/assignment/6.cc: New file.
10942         * unittests/optional/assignment/7.cc: New file.
10943         * unittests/optional/cons/copy.cc: New file.
10944         * unittests/optional/cons/default.cc: New file.
10945         * unittests/optional/cons/move.cc: New file.
10946         * unittests/optional/cons/value.cc: New file.
10947         * unittests/optional/in_place.cc: New file.
10948         * unittests/optional/observers/1.cc: New file.
10949         * unittests/optional/observers/2.cc: New file.
10950
10951 2017-04-18  Pedro Alves  <palves@redhat.com>
10952
10953         * common/gdb_optional.h: Include common/traits.h.
10954         (in_place_t): New type.
10955         (in_place): New constexpr variable.
10956         (optional::optional): Remove member initialization of
10957         m_instantiated.
10958         (optional::optional(in_place_t...)): New constructor.
10959         (optional::~optional): Use reset.
10960         (optional::optional(const optional&)): New.
10961         (optional::optional(const optional&&)): New.
10962         (optional::optional(T &)): New.
10963         (optional::optional(T &&)): New.
10964         (operator::operator=(const optional &)): New.
10965         (operator::operator=(optional &&)): New.
10966         (operator::operator= (const T &))
10967         (operator::operator= (T &&))
10968         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10969         (operator::reset): New.
10970         (operator::m_instantiated):: Add in-class initializer.
10971         * common/traits.h: Include <type_traits>.
10972         (struct And): New types.
10973
10974 2017-04-18  Pedro Alves  <palves@redhat.com>
10975
10976         * xml-support.c: Include <vector>.
10977         (scope_level::scope_level(const gdb_xml_element *))
10978         (scope_level::scope_level(scope_level&&)): New.
10979         (scope_level::~scope_level): New.
10980         (scope_level_s): Delete.
10981         (gdb_xml_parser::scopes): Now a std::vector.
10982         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10983         Use std::vector.
10984         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10985         scope cleanup code.
10986         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10987         of the scopes member.  Use std::vector::emplace_back.
10988
10989 2017-04-18  Pedro Alves  <palves@redhat.com>
10990
10991         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10992         a bool.
10993         (gdb_xml_end_element): Change type of first parameter.
10994         (gdb_xml_cleanup): Rename to ...
10995         (gdb_xml_parser::~gdb_xml_parser): ... this.
10996         (gdb_xml_create_parser_and_cleanup): Delete with ...
10997         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10998         to this new ctor.
10999         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11000         using gdb_xml_create_parser_and_cleanup.
11001         (xinclude_parsing_data): Add ctor/dtor.
11002         (xml_xinclude_cleanup): Delete.
11003         (xml_process_xincludes): Create a local xinclude_parsing_data
11004         instead of heap-allocating one.  Create a local gdb_xml_parser
11005         instead of heap-allocating one with
11006         gdb_xml_create_parser_and_cleanup.
11007
11008 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11009
11010         PR threads/20743
11011         * fbsd-nat.c (resume_one_thread_cb): Remove.
11012         (resume_all_threads_cb): Remove.
11013         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11014         iterate_over_threads.
11015
11016 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11017
11018         * NEWS: Create a new section for the next release branch.
11019         Rename the section of the current branch, now that it has
11020         been cut.
11021
11022 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11023
11024         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11025         * version.in: Bump version to 8.0.50.DATE-git.
11026
11027 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11028
11029         PR gdb/21385
11030         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11031         independently of the host, and fix build breakage on Cygwin.
11032
11033 2017-04-13  Pedro Alves  <palves@redhat.com>
11034
11035         * inferior.c (free_inferior): Convert to ...
11036         (inferior::~inferior): ... this dtor.
11037         (inferior::inferior): New ctor, factored out from ...
11038         (add_inferior_silent): ... here.  Allocate the inferior with a new
11039         expression.
11040         (delete_inferior): Call delete instead of free_inferior.
11041         * inferior.h (gdb_environ, continuation): Forward declare.
11042         (inferior): Now a class.  Add in-class initialization to all
11043         members.  Make boolean fields bool, except 'detaching'.
11044         (inferior::inferior): New explicit ctor.
11045         (inferior::~inferior): New.
11046
11047 2017-04-13  Pedro Alves  <palves@redhat.com>
11048
11049         * inferior.c (init_inferior_list): Delete.
11050         * inferior.h (init_inferior_list): Delete.
11051
11052 2017-04-13  Pedro Alves  <palves@redhat.com>
11053
11054         PR threads/13217
11055         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11056         (top level): Call it twice, with different thread sets.
11057
11058 2017-04-13  Pedro Alves  <palves@redhat.com>
11059
11060         * thread.c: Include <algorithm>.
11061         (thread_array_cleanup): Delete.
11062         (scoped_inc_dec_ref): New class.
11063         (live_threads_count): New function.
11064         (set_thread_refcount): Delete.
11065         (tp_array_compar_ascending): Now a bool.
11066         (tp_array_compar): Convert to a std::sort comparison function.
11067         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11068         and live_threads_count.
11069
11070 2017-04-13  Pedro Alves  <palves@redhat.com>
11071
11072         * infrun.c (follow_fork_inferior): Also switch the current
11073         inferior.
11074
11075 2017-04-13  Pedro Alves  <palves@redhat.com>
11076
11077         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11078         before calling create_internal_breakpoint.
11079
11080 2017-04-13  Pedro Alves  <palves@redhat.com>
11081
11082         * fork-child.c (execv_argv): New class.
11083         (breakup_args): Refactored as ...
11084         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11085         Copy arguments to storage and replace separators with NULL
11086         terminators in place.
11087         (escape_bang_in_quoted_argument): Adjust to return bool.
11088         (execv_argv::execv_argv): New ctor.
11089         (execv_argv::init_for_shell): New method, factored out from
11090         fork_inferior.  Don't strdup strings into the vector.
11091         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11092         Remove free_vector_argv call.
11093
11094 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11095
11096         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11097         tdep->rx_psw_type.
11098
11099 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11100
11101         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11102         * rx-tdep.c (rx_gdbarch_init): Likewise.
11103
11104 2017-04-13  Pedro Alves  <palves@redhat.com>
11105
11106         * breakpoint.h (struct breakpoint): Reindent.
11107
11108 2017-04-13  Pedro Alves  <palves@redhat.com>
11109
11110         * breakpoint.c (bp_location): Rename to ...
11111         (bp_locations): ... this.  All references updated.
11112         (bp_location_count): Rename to ...
11113         (bp_locations_count): ... this.  All references updated.
11114         (bp_location_placed_address_before_address_max): Rename to ...
11115         (bp_locations_placed_address_before_address_max): ... this.  All
11116         references updated.
11117         (bp_location_shadow_len_after_address_max): Rename to ...
11118         (bp_locations_shadow_len_after_address_max): ... this.  All
11119         references updated.
11120         (bp_location_compare_addrs): Rename to ...
11121         (bp_locations_compare_addrs): ... this.  All references updated.
11122         (bp_location_compare):Rename to ...
11123         (bp_locations_compare): ... this.  All references updated.
11124         (bp_location_target_extensions_update): Rename to ...
11125         (bp_locations_target_extensions_update): ... this.  All references
11126         updated.
11127
11128 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11129
11130         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11131         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11132         'sgtty.h'.
11133         * common/gdb_termios.h: New file, with parts of "terminal.h".
11134         * inflow.c: Include "gdb_termios.h".
11135         * ser-unix.c: Include "gdb_termios.h".
11136         * terminal.h: Move terminal-related defines to
11137         "common/gdb_termios.h".
11138
11139 2017-04-12  Tom Tromey  <tom@tromey.com>
11140
11141         * probe.c (parse_probes): Update.
11142         * location.h (delete_event_location): Don't declare.
11143         (event_location_deleter::operator()): Update.
11144         * location.c (event_location_deleter::operator()): Rename from
11145         delete_event_location.
11146         * linespec.h (linespec_result) <location>: Change type to
11147         event_location_up.
11148         * linespec.c (canonicalize_linespec, event_location_to_sals)
11149         (decode_objc): Update.
11150         (linespec_result): Don't call delete_event_location.
11151         * breakpoint.c (create_breakpoints_sal)
11152         (bkpt_probe_create_sals_from_location)
11153         (strace_marker_create_sals_from_location): Update.
11154
11155 2017-04-12  Tom Tromey  <tom@tromey.com>
11156
11157         * linespec.h (struct linespec_result): Add constructor and
11158         destructor.
11159         (init_linespec_result, destroy_linespec_result)
11160         (make_cleanup_destroy_linespec_result): Don't declare.
11161         * linespec.c (init_linespec_result): Remove.
11162         (linespec_result::~linespec_result): Rename from
11163         destroy_linespec_result.  Update.
11164         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11165         Remove.
11166         * breakpoint.c (create_breakpoint, break_range_command)
11167         (decode_location_default): Update.
11168         * ax-gdb.c (agent_command_1): Update.
11169
11170 2017-04-12  Tom Tromey  <tom@tromey.com>
11171
11172         * remote.c (remote_download_tracepoint): Update.
11173         * python/py-breakpoint.c (bppy_get_location): Update.
11174         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11175         (gdbscm_breakpoint_location): Update.
11176         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11177         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11178         Change type to event_location_up.
11179         * breakpoint.c (create_overlay_event_breakpoint)
11180         (create_longjmp_master_breakpoint)
11181         (create_std_terminate_master_breakpoint)
11182         (create_exception_master_breakpoint)
11183         (breakpoint_event_location_empty_p, print_breakpoint_location)
11184         (print_one_breakpoint_location, create_thread_event_breakpoint)
11185         (init_breakpoint_sal, create_breakpoint)
11186         (print_recreate_ranged_breakpoint, break_range_command)
11187         (init_ada_exception_breakpoint, say_where): Update.
11188         (base_breakpoint_dtor): Don't call delete_event_location.
11189         (bkpt_print_recreate, tracepoint_print_recreate)
11190         (dprintf_print_recreate, update_static_tracepoint)
11191         (breakpoint_re_set_default): Update.
11192
11193 2017-04-12  Tom Tromey  <tom@tromey.com>
11194
11195         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11196         type of "to_do".  Update.
11197         (compute_stack_depth): Use std::vector.
11198
11199 2017-04-12  Tom Tromey  <tom@tromey.com>
11200
11201         * printcmd.c (find_instruction_backward): Use std::vector.
11202
11203 2017-04-12  Tom Tromey  <tom@tromey.com>
11204
11205         * symfile.c (objfilep): Remove typedef.
11206         (reread_symbols): Use a std::vector.
11207
11208 2017-04-12  Tom Tromey  <tom@tromey.com>
11209
11210         * mi/mi-main.c (exec_direction_forward): Remove.
11211         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11212         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11213         scoped_restore.
11214         * guile/guile.c (guile_repl_command, guile_command)
11215         (gdbscm_execute_gdb_command): Use scoped_restore.
11216         * go-exp.y (go_parse): Use scoped_restore.
11217         * d-exp.y (d_parse): Use scoped_restore.
11218         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11219         * c-exp.y (c_parse): Use scoped_restore.
11220
11221 2017-04-12  Tom Tromey  <tom@tromey.com>
11222
11223         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11224         (mi_parse): Update return type.
11225         (mi_parse_free): Remove.
11226         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11227         (mi_parse::~mi_parse): Rename from mi_parse_free.
11228         (mi_parse_cleanup): Remove.
11229         (mi_parse): Return a unique_ptr.  Use new.
11230         * mi/mi-main.c (mi_execute_command): Update.
11231
11232 2017-04-12  Tom Tromey  <tom@tromey.com>
11233
11234         * location.c (explicit_location_lex_one): Return a
11235         unique_xmalloc_ptr.
11236         (string_to_explicit_location): Update.  Remove cleanups.
11237
11238 2017-04-12  Tom Tromey  <tom@tromey.com>
11239
11240         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11241         (compare_value_and_voffset): Change type.  Update.
11242         (compute_vtable_size): Change type of "offset_vec".
11243         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11244         (gnuv3_get_typeid): Remove extraneous declaration.
11245
11246 2017-04-12  Tom Tromey  <tom@tromey.com>
11247
11248         * charset.h (wchar_iterator): Fix comment.
11249
11250 2017-04-12  Tom Tromey  <tom@tromey.com>
11251
11252         * charset.c (iconv_wrapper): New class.
11253         (cleanup_iconv): Remove.
11254         (convert_between_encodings): Use it.
11255
11256 2017-04-12  Tom Tromey  <tom@tromey.com>
11257
11258         * symfile.h (increment_reading_symtab): Update type.
11259         * symfile.c (decrement_reading_symtab): Remove.
11260         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11261         * psymtab.c (psymtab_to_symtab): Update.
11262         * dwarf2read.c (dw2_instantiate_symtab): Update.
11263
11264 2017-04-12  Tom Tromey  <tom@tromey.com>
11265
11266         * jit.c (struct jit_reader): Declare separately.  Add constructor
11267         and destructor.  Change type of "handle".
11268         (loaded_jit_reader): Define separately.
11269         (jit_reader_load): Update.  New "new".
11270         (jit_reader_unload_command): Use "delete".
11271         * gdb-dlfcn.h (struct dlclose_deleter): New.
11272         (gdb_dlhandle_up): New typedef.
11273         (gdb_dlopen, gdb_dlsym): Update types.
11274         (gdb_dlclose): Remove.
11275         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11276         (gdb_dlsym): Change type of "handle".
11277         (make_cleanup_dlclose): Remove.
11278         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11279         * compile/compile-c-support.c (load_libcc): Update.
11280
11281 2017-04-12  Tom Tromey  <tom@tromey.com>
11282
11283         * symtab.h (find_pcs_for_symtab_line): Change return type.
11284         * symtab.c (find_pcs_for_symtab_line): Change return type.
11285         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11286         type of "vec".  Update.
11287         (ltpy_get_pcs_for_line): Update.
11288         * linespec.c (decode_digits_ordinary): Update.
11289
11290 2017-04-12  Tom Tromey  <tom@tromey.com>
11291
11292         * tracepoint.c (actions_command): Update.
11293         * python/python.c (python_command, python_interactive_command):
11294         Update.
11295         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11296         * guile/guile.c (guile_command): Update.
11297         * defs.h (read_command_lines, read_command_lines_1): Return
11298         command_line_up.
11299         (command_lines_deleter): New struct.
11300         (command_line_up): New typedef.
11301         * compile/compile.c (compile_code_command)
11302         (compile_print_command): Update.
11303         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11304         command_line_up.
11305         (make_cleanup_free_command_lines): Remove.
11306         * cli/cli-script.c (get_command_line, read_command_lines_1)
11307         (copy_command_lines): Return command_line_up.
11308         (while_command, if_command, read_command_lines, define_command)
11309         (document_command): Update.
11310         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11311         Remove.
11312         * breakpoint.h (breakpoint_set_commands): Change type of
11313         "commands".
11314         * breakpoint.c (breakpoint_set_commands): Change type of
11315         "commands".  Update.
11316         (do_map_commands_command, update_dprintf_command_list)
11317         (create_tracepoint_from_upload): Update.
11318
11319 2017-04-12  Tom Tromey  <tom@tromey.com>
11320
11321         * tracepoint.c (scope_info): Update.
11322         * spu-tdep.c (spu_catch_start): Update.
11323         * python/python.c (gdbpy_decode_line): Update.
11324         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11325         * python/py-breakpoint.c (bppy_init): Update.
11326         * probe.c (parse_probes): Update.
11327         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11328         * location.h (event_location_deleter): New struct.
11329         (event_location_up): New typedef.
11330         (new_linespec_location, new_address_location, new_probe_location)
11331         (new_explicit_location, copy_event_location)
11332         (string_to_event_location, string_to_event_location_basic)
11333         (string_to_explicit_location): Update return type.
11334         (make_cleanup_delete_event_location): Remove.
11335         * location.c (new_linespec_location, new_address_location)
11336         (new_probe_location, new_explicit_location, copy_event_location):
11337         Return event_location_up.
11338         (delete_event_location_cleanup)
11339         (make_cleanup_delete_event_location): Remove.
11340         (string_to_explicit_location, string_to_event_location_basic)
11341         (string_to_event_location): Return event_location_up.
11342         * linespec.c (canonicalize_linespec, event_location_to_sals)
11343         (decode_line_with_current_source)
11344         (decode_line_with_last_displayed, decode_objc): Update.
11345         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11346         * completer.c (location_completer): Update.
11347         * cli/cli-cmds.c (edit_command, list_command): Update.
11348         * breakpoint.c (create_overlay_event_breakpoint)
11349         (create_longjmp_master_breakpoint)
11350         (create_std_terminate_master_breakpoint)
11351         (create_exception_master_breakpoint)
11352         (create_thread_event_breakpoint): Update.
11353         (init_breakpoint_sal): Update.  Remove some dead code.
11354         (create_breakpoint_sal): Change type of "location".  Update.
11355         (create_breakpoints_sal, create_breakpoint, break_command_1)
11356         (dprintf_command, break_range_command, until_break_command)
11357         (init_ada_exception_breakpoint)
11358         (strace_marker_create_sals_from_location)
11359         (update_static_tracepoint, trace_command, ftrace_command)
11360         (strace_command, create_tracepoint_from_upload): Update.
11361         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11362         * ax-gdb.c (agent_command_1): Update.
11363
11364 2017-04-12  Pedro Alves  <palves@redhat.com>
11365
11366         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11367         * configure.tgt: Handle i[34567]86-*-go32* and
11368         i[34567]86-*-msdosdjgpp*.
11369         * i386-tdep.c (i386_svr4_reg_to_regnum):
11370         Make extern.
11371         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11372         i386-go32-tdep.c.
11373         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11374         * i386-go32-tdep.c: New file.
11375         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11376         declarations.
11377
11378 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11379
11380         * aix-thread.c (pd_status2str): Change return type to const char *.
11381
11382 2017-04-12  Pedro Alves  <palves@redhat.com>
11383
11384         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11385         calls to set_gdbarch_gnu_triplet_regexp.
11386
11387 2017-04-12  Pedro Alves  <palves@redhat.com>
11388
11389         PR gdb/21323
11390         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11391         New enum value.
11392         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11393         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11394         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11395         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11396         * gdbarch.h, gdbarch.c: Regenerate.
11397         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11398         gdbarch_wchar_bit and gdbarch_wchar_signed.
11399         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11400         * arm-tdep.c (arm_gdbarch_init): Likewise.
11401         * avr-tdep.c (avr_gdbarch_init): Likewise.
11402         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11403         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11404         * i386-tdep.c (i386_go32_init_abi): Likewise.
11405         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11406         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11407         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11408         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11409         * sh-tdep.c (sh_gdbarch_init): Likewise.
11410         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11411         * sparc64-tdep.c (sparc64_init_abi): Likewise.
11412         * windows-tdep.c (windows_init_abi): Likewise.
11413         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11414
11415 2017-04-12  Pedro Alves  <palves@redhat.com>
11416
11417         PR c++/21323
11418         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11419         cplus_primitive_type_char32_t>: New enum values.
11420         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11421         and cplus_primitive_type_char32_t.
11422         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11423         32, use the archtecture's built-in type for char16_t and char32_t,
11424         respectively.  Otherwise, fallback to init_integer_type as before,
11425         but make the type unsigned, and issue a complaint.
11426         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11427
11428 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
11429
11430         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11431         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11432
11433 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11434
11435         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11436         'const char *'.
11437
11438 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11439
11440         * common/common-utils.c (free_vector_argv): New function.
11441         * common/common-utils.h: Include <vector>.
11442         (free_vector_argv): New prototype.
11443         * darwin-nat.c (darwin_create_inferior): Rewrite function
11444         prototype in order to constify "exec_file" and accept a
11445         "std::string" for "allargs".
11446         * fork-child.c: Include <vector>.
11447         (breakup_args): Rewrite function, using C++.
11448         (fork_inferior): Rewrite function header, constify "exec_file_arg"
11449         and accept "std::string" for "allargs".  Update the code to
11450         calculate "argv" based on "allargs".  Update calls to "exec_fun"
11451         and "execvp".
11452         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11453         order to constify "exec_file" and accept a "std::string" for
11454         "allargs".
11455         * go32-nat.c (go32_create_inferior): Likewise.
11456         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11457         * infcmd.c (run_command_1): Constify "exec_file".  Use
11458         "std::string" for inferior arguments.
11459         * inferior.h (fork_inferior): Update prototype.
11460         * linux-nat.c (linux_nat_create_inferior): Rewrite function
11461         prototype in order to constify "exec_file" and accept a
11462         "std::string" for "allargs".
11463         * nto-procfs.c (procfs_create_inferior): Likewise.
11464         * procfs.c (procfs_create_inferior): Likewise.
11465         * remote-sim.c (gdbsim_create_inferior): Likewise.
11466         * remote.c (extended_remote_run): Update code to accept
11467         "std::string" as argument.
11468         (extended_remote_create_inferior): Rewrite function prototype in
11469         order to constify "exec_file" and accept a "std::string" for
11470         "allargs".
11471         * rs6000-nat.c (super_create_inferior): Likewise.
11472         (rs6000_create_inferior): Likewise.
11473         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11474         * windows-nat.c (windows_create_inferior): Likewise.
11475
11476 2017-04-11  Pedro Alves  <palves@redhat.com>
11477
11478         * thread.c: Fix whitespace throughout.
11479
11480 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11481
11482         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11483
11484 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11485
11486         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11487
11488 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11489
11490         PR gdb/21364
11491         * osdata.c (info_osdata): Check if 'type' is an empty string
11492         instead of NULL.
11493
11494 2017-04-10  Pedro Alves  <palves@redhat.com>
11495
11496         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11497         (ptid_to_global_thread_id, in_thread_list)
11498         (do_captured_list_thread_ids, set_resumed, set_running)
11499         (set_executing, set_stop_requested, finish_thread_state)
11500         (validate_registers_access, can_access_registers_ptid)
11501         (print_thread_info_1, switch_to_thread)
11502         (do_restore_current_thread_cleanup)
11503         (make_cleanup_restore_current_thread, thread_command)
11504         (thread_name_command): Use operator== instead of ptid_equal.
11505
11506 2017-04-10  Pedro Alves  <palves@redhat.com>
11507
11508         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11509         (current_thread_cleanup_chain): Delete.
11510         (restore_current_thread_cleanup_dtor)
11511         (make_cleanup_restore_current_thread): Remove references to
11512         current_thread_cleanup_chain.
11513
11514 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11515
11516         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11517         REG_UNKNOWN.
11518
11519 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11520
11521         PR gdb/19942
11522         * gdbthread.h (thread_info::deletable): New method.
11523         (thread_info::incref): New method.
11524         (thread_info::decref): New method.
11525         (thread_info::refcount): Move it to private.
11526         * infrun.c (save_stop_context): Call inc_refcount.
11527         (release_stop_context_cleanup): Likewise.
11528         * thread.c (set_thread_exited): New function.
11529         (init_thread_list): Delete "tp" only it is deletable, otherwise
11530         call set_thread_exited.
11531         (delete_thread_1): Call set_thread_exited.
11532         (current_thread_cleanup) <inferior_pid>: Remove.
11533         <thread>: New field.
11534         (restore_current_thread_ptid_changed): Removed.
11535         (do_restore_current_thread_cleanup): Adjust.
11536         (restore_current_thread_cleanup_dtor): Don't call
11537         find_thread_ptid.
11538         (set_thread_refcount): Use dec_refcount.
11539         (make_cleanup_restore_current_thread): Adjust.
11540         (thread_apply_all_command): Call inc_refcount.
11541         (_initialize_thread): Don't call
11542         observer_attach_thread_ptid_changed.
11543
11544 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11545
11546         * thread.c (delete_thread_1): Hoist code on marking thread as
11547         exited.
11548
11549 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11550
11551         * windows-nat.c (windows_detach): Initialize ptid with
11552         minus_one_ptid.
11553
11554 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11555
11556         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11557
11558 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11559
11560         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11561         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11562         (bfin_pseudo_register_write): Likewise
11563
11564 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11565
11566         * common/ptid.h (struct ptid): Change to...
11567         (class ptid_t): ... this.
11568         <ptid_t>: New constructors.
11569         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11570         matches>: New methods.
11571         <make_null, make_minus_one>: New static methods.
11572         <pid>: Rename to...
11573         <m_pid>: ...this.
11574         <lwp>: Rename to...
11575         <m_lwp>: ...this.
11576         <tid>: Rename to...
11577         <m_tid>: ...this.
11578         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11579         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11580         as references, move comment to class ptid_t.
11581         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11582         ptid_t static methods.
11583         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11584         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11585         Take ptid arguments as references, implement using ptid_t methods.
11586         * unittests/ptid-selftests.c: New file.
11587         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11588         unittests/ptid-selftests.c.
11589         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11590
11591 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11592
11593         * python/python.c (python_run_simple_file): Cast mode literal to
11594         non-const char pointer as expected by PyFile_FromString.
11595
11596 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11597
11598         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11599         minus_one_ptid and null_ptid.
11600
11601 2017-04-05  Pedro Alves  <palves@redhat.com>
11602
11603         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11604         * configure: Regenerate.
11605
11606 2017-04-05  Pedro Alves  <palves@redhat.com>
11607
11608         * ada-exp.y (yyerror): Constify.
11609         * ada-lang.c (bound_name, get_selections)
11610         (ada_variant_discrim_type)
11611         (ada_variant_discrim_name, ada_value_struct_elt)
11612         (ada_lookup_struct_elt_type, is_unchecked_variant)
11613         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11614         (catch_ada_exception_command_split)
11615         (catch_ada_assert_command_split, catch_assert_command)
11616         (ada_op_name): Constify.
11617         * ada-lang.h (ada_yyerror, get_selections)
11618         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11619         * arc-tdep.c (arc_print_frame_cache): Constify.
11620         * arm-tdep.c (arm_skip_stub): Constify.
11621         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11622         (gen_aggregate_elt_ref): Constify.
11623         * bcache.c (print_bcache_statistics): Constify.
11624         * bcache.h (print_bcache_statistics): Constify.
11625         * break-catch-throw.c (catch_exception_command_1):
11626         * breakpoint.c (struct ep_type_description::description):
11627         Constify.
11628         (add_solib_catchpoint): Constify.
11629         (catch_fork_command_1): Add cast.
11630         (add_catch_command): Constify.
11631         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11632         Constify.
11633         * bsd-uthread.c (bsd_uthread_state): Constify.
11634         * buildsym.c (patch_subfile_names): Constify.
11635         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11636         Constify.
11637         * c-exp.y (yyerror): Constify.
11638         (token::oper): Constify.
11639         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11640         * c-varobj.c (cplus_describe_child): Constify.
11641         * charset.c (find_charset_names): Add cast.
11642         (find_charset_names): Constify array and add const_cast.
11643         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11644         (edit_command): Constify.
11645         * cli/cli-decode.c (lookup_cmd): Constify.
11646         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11647         Constify.
11648         (struct dump_context): Constify.
11649         (add_dump_command, restore_command): Constify.
11650         * cli/cli-script.c (get_command_line): Constify.
11651         * cli/cli-script.h (get_command_line): Constify.
11652         * cli/cli-utils.c (check_for_argument): Constify.
11653         * cli/cli-utils.h (check_for_argument): Constify.
11654         * coff-pe-read.c (struct read_pe_section_data): Constify.
11655         * command.h (lookup_cmd): Constify.
11656         * common/print-utils.c (decimal2str): Constify.
11657         * completer.c (gdb_print_filename): Constify.
11658         * corefile.c (set_gnutarget): Constify.
11659         * cp-name-parser.y (yyerror): Constify.
11660         * cp-valprint.c (cp_print_class_member): Constify.
11661         * cris-tdep.c (cris_register_name, crisv32_register_name):
11662         Constify.
11663         * d-exp.y (yyerror): Constify.
11664         (struct token::oper): Constify.
11665         * d-lang.h (d_yyerror): Constify.
11666         * dbxread.c (struct header_file_location::name): Constify.
11667         (add_old_header_file, add_new_header_file, last_function_name)
11668         (dbx_next_symbol_text, add_bincl_to_list)
11669         (find_corresponding_bincl_psymtab, set_namestring)
11670         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11671         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11672         * defs.h (command_line_input, print_address_symbolic)
11673         (deprecated_readline_begin_hook): Constify.
11674         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11675         Constify.
11676         * event-top.c (handle_line_of_input): Constify and add cast.
11677         * exceptions.c (catch_errors): Constify.
11678         * exceptions.h (catch_errors): Constify.
11679         * expprint.c (print_subexp_standard, op_string, op_name)
11680         (op_name_standard, dump_raw_expression, dump_raw_expression):
11681         * expression.h (op_name, op_string, dump_raw_expression):
11682         Constify.
11683         * f-exp.y (yyerror): Constify.
11684         (struct token::oper): Constify.
11685         (struct f77_boolean_val::name): Constify.
11686         * f-lang.c (f_word_break_characters): Constify.
11687         * f-lang.h (f_yyerror): Constify.
11688         * fork-child.c (fork_inferior): Add cast.
11689         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11690         (new_variant): Constify.
11691         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11692         * gdbarch.c: Regenerate.
11693         * gdbcore.h (set_gnutarget): Constify.
11694         * go-exp.y (yyerror): Constify.
11695         (token::oper): Constify.
11696         * go-lang.h (go_yyerror): Constify.
11697         * go32-nat.c (go32_sysinfo): Constify.
11698         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11699         * guile/scm-cmd.c (cmdscm_function): Constify.
11700         * guile/scm-param.c (pascm_param_value): Constify.
11701         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11702         (h8300sx_register_name): Constify.
11703         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11704         Constify.
11705         * ia64-tdep.c (ia64_register_names): Constify.
11706         * infcmd.c (construct_inferior_arguments): Constify.
11707         (path_command, attach_post_wait): Constify.
11708         * language.c (show_range_command, show_case_command)
11709         (unk_lang_error): Constify.
11710         * language.h (language_defn::la_error)
11711         (language_defn::la_name_of_this): Constify.
11712         * linespec.c (decode_line_2): Constify.
11713         * linux-thread-db.c (thread_db_err_str): Constify.
11714         * lm32-tdep.c (lm32_register_name): Constify.
11715         * m2-exp.y (yyerror): Constify.
11716         * m2-lang.h (m2_yyerror): Constify.
11717         * m32r-tdep.c (m32r_register_names): Constify and make static.
11718         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11719         * m88k-tdep.c (m88k_register_name): Constify.
11720         * macroexp.c (appendmem): Constify.
11721         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11722         (upgrade_type, parse_external, parse_partial_symbols)
11723         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11724         (new_symbol): Constify.
11725         * memattr.c (mem_info_command): Constify.
11726         * mep-tdep.c (register_name_from_keyword): Constify.
11727         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11728         Constify.
11729         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11730         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11731         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11732         cast.
11733         (mi_execute_async_cli_command): Constify.
11734         * mips-tdep.c (mips_register_name): Constify.
11735         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11736         (am33_register_name, am33_2_register_name)
11737         * moxie-tdep.c (moxie_register_names): Constify.
11738         * nat/linux-osdata.c (osdata_type): Constify fields.
11739         * nto-tdep.c (nto_parse_redirection): Constify.
11740         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11741         (lookup_child_selector): Constify.
11742         (objc_methcall::name): Constify.
11743         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11744         (lookup_struct_typedef): Constify.
11745         * objfiles.c (pc_in_section): Constify.
11746         * objfiles.h (pc_in_section): Constify.
11747         * p-exp.y (struct token::oper): Constify.
11748         (yyerror): Constify.
11749         * p-lang.h (pascal_yyerror): Constify.
11750         * parser-defs.h (op_name_standard): Constify.
11751         (op_print::string): Constify.
11752         (exp_descriptor::op_name): Constify.
11753         * printcmd.c (print_address_symbolic): Constify.
11754         * psymtab.c (print_partial_symbols): Constify.
11755         * python/py-breakpoint.c (stop_func): Constify.
11756         (bppy_get_expression): Constify.
11757         * python/py-cmd.c (cmdpy_completer::name): Constify.
11758         (cmdpy_function): Constify.
11759         * python/py-event.c (evpy_add_attribute)
11760         (gdbpy_initialize_event_generic): Constify.
11761         * python/py-event.h (evpy_add_attribute)
11762         (gdbpy_initialize_event_generic): Constify.
11763         * python/py-evts.c (add_new_registry): Constify.
11764         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11765         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11766         * python/py-inferior.c (get_buffer): Add cast.
11767         * python/py-param.c (parm_constant::name): Constify.
11768         * python/py-unwind.c (fprint_frame_id): Constify.
11769         * python/python.c (gdbpy_parameter_value): Constify.
11770         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11771         * remote.c (memory_packet_config::name): Constify.
11772         (show_packet_config_cmd, remote_write_bytes)
11773         (remote_buffer_add_string):
11774         * reverse.c (exec_reverse_once): Constify.
11775         * rs6000-tdep.c (variant::name, variant::description): Constify.
11776         * rust-exp.y (rustyyerror): Constify.
11777         * rust-lang.c (rust_op_name): Constify.
11778         * rust-lang.h (rustyyerror): Constify.
11779         * serial.h (serial_ops::name): Constify.
11780         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11781         (sh_sh3e_register_name, sh_sh2e_register_name)
11782         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11783         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11784         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11785         (sh_sh4al_dsp_register_name): Constify.
11786         * sh64-tdep.c (sh64_register_name): Constify.
11787         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11788         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11789         * stabsread.c (patch_block_stabs, read_type_number)
11790         (ref_map::stabs, ref_add, process_reference)
11791         (symbol_reference_defined, define_symbol, define_symbol)
11792         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11793         (read_one_struct_field, read_struct_fields, read_baseclasses)
11794         (read_tilde_fields, read_struct_type, read_array_type)
11795         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11796         (read_huge_number, read_range_type, read_args, common_block_start)
11797         (find_name_end): Constify.
11798         * stabsread.h (common_block_start, define_symbol)
11799         (process_one_symbol, symbol_reference_defined, ref_add):
11800         * symfile.c (get_section_index, add_symbol_file_command):
11801         * symfile.h (get_section_index): Constify.
11802         * target-descriptions.c (tdesc_type::name): Constify.
11803         (tdesc_free_type): Add cast.
11804         * target.c (find_default_run_target):
11805         (add_deprecated_target_alias, find_default_run_target)
11806         (target_announce_detach): Constify.
11807         (do_option): Constify.
11808         * target.h (add_deprecated_target_alias): Constify.
11809         * thread.c (print_thread_info_1): Constify.
11810         * top.c (deprecated_readline_begin_hook, command_line_input):
11811         Constify.
11812         (init_main): Add casts.
11813         * top.h (handle_line_of_input): Constify.
11814         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11815         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11816         (tfind_command): Rename to ...
11817         (tfind_command_1): ... this and constify.
11818         (tfind_command): New function.
11819         (tfind_end_command, tfind_start_command): Adjust.
11820         (encode_source_string): Constify.
11821         * tracepoint.h (encode_source_string): Constify.
11822         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11823         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11824         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11825         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11826         * tui/tui-win.c (parse_scrolling_args): Constify.
11827         * tui/tui-windata.c (tui_erase_data_content): Constify.
11828         * tui/tui-windata.h (tui_erase_data_content): Constify.
11829         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11830         * tui/tui.c (tui_enable): Add cast.
11831         * utils.c (defaulted_query): Constify.
11832         (init_page_info): Add cast.
11833         (puts_debug, subset_compare): Constify.
11834         * utils.h (subset_compare): Constify.
11835         * varobj.c (varobj_format_string): Constify.
11836         * varobj.h (varobj_format_string): Constify.
11837         * vax-tdep.c (vax_register_name): Constify.
11838         * windows-nat.c (windows_detach): Constify.
11839         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11840         * xml-support.c (gdb_xml_end_element): Constify.
11841         * xml-tdesc.c (tdesc_start_reg): Constify.
11842         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11843         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11844         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11845
11846 2017-04-05  Pedro Alves  <palves@redhat.com>
11847
11848         * proc-api.c (struct trans): Constify.
11849         (procfs_note): Constify.
11850         * proc-events.c (struct trans, syscall_table):
11851         * proc-flags.c (struct trans): Constify.
11852         * proc-utils.h (procfs_note): Constify.
11853         * proc-why.c (struct trans): Constify.
11854         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11855         (procfs_detach): Constify.
11856         * sol-thread.c (struct string_map): Constify.
11857         (td_err_string, td_state_string): Constify.
11858
11859 2017-04-05  Pedro Alves  <palves@redhat.com>
11860
11861         * proc-api.c (procfs_filename): Don't initialize
11862         procfs_filename.
11863         (prepare_to_trace): Assume procfs_filename is non-NULL.
11864         (_initialize_proc_api): Give procfs_filename a default value here.
11865
11866 2017-04-05  Pedro Alves  <palves@redhat.com>
11867
11868         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11869         'cond_string' parameter.
11870         (extract_exception_regexp): Constify 'string' parameter.
11871         (catch_exception_command_1): Constify.
11872         * breakpoint.c (init_catchpoint)
11873         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11874         parameter.
11875         (ep_parse_optional_if_clause, catch_fork_command_1)
11876         (catch_exec_command_1): Constify.
11877         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11878         parameter.
11879         (ep_parse_optional_if_clause): Constify.
11880         * cli/cli-utils.c (remove_trailing_whitespace)
11881         (check_for_argument): Constify.
11882         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11883         non-const overload.
11884         (check_for_argument): Likewise.
11885
11886 2017-04-05  Pedro Alves  <palves@redhat.com>
11887
11888         * event-top.c (command_line_handler): Add cast to execute_command
11889         call.
11890         * record-btrace.c (cmd_record_btrace_bts_start)
11891         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11892         (cmd_record_btrace_start): Add cast to execute_command call.
11893         * record-full.c (record_full_goto_insn):
11894         * record.c (record_start, record_stop): Add cast to
11895         execute_command_to_string calls.
11896         (cmd_record_start): Add cast to execute_command calls.
11897
11898 2017-04-05  Pedro Alves  <palves@redhat.com>
11899
11900         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11901         static inline function.
11902         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11903         array and use gdb_PyArg_ParseTupleAndKeywords.
11904         * python/py-cmd.c (cmdpy_init): Likewise.
11905         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11906         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11907         (infpy_search_memory): Likewise.
11908         * python/py-objfile.c (objfpy_add_separate_debug_file)
11909         (gdbpy_lookup_objfile): Likewise.
11910         * python/py-symbol.c (gdbpy_lookup_symbol)
11911         (gdbpy_lookup_global_symbol): Likewise.
11912         * python/py-type.c (gdbpy_lookup_type): Likewise.
11913         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11914         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11915         Likewise.
11916
11917 2017-04-05  Pedro Alves  <palves@redhat.com>
11918
11919         * python/python-internal.h (gdb_PyGetSetDef): New type.
11920         * python/py-block.c (block_object_getset)
11921         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11922         * python/py-event.c (event_object_getset)
11923         (finish_breakpoint_object_getset): Likewise.
11924         * python/py-inferior.c (inferior_object_getset): Likewise.
11925         * python/py-infthread.c (thread_object_getset): Likewise.
11926         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11927         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11928         * python/py-objfile.c (objfile_getset): Likewise.
11929         * python/py-progspace.c (pspace_getset): Likewise.
11930         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11931         Likewise.
11932         * python/py-record.c (recpy_record_getset): Likewise.
11933         * python/py-symbol.c (symbol_object_getset): Likewise.
11934         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11935         Likewise.
11936         * python/py-type.c (type_object_getset, field_object_getset):
11937         Likewise.
11938         * python/py-value.c (value_object_getset): Likewise.
11939
11940 2017-04-05  Pedro Alves  <palves@redhat.com>
11941
11942         * python/python-internal.h (gdb_PyObject_CallMethod)
11943         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11944         New functions.
11945         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11946         (PySys_GetObject, PySys_SetPath): New macros.
11947
11948 2017-04-05  Pedro Alves  <palves@redhat.com>
11949
11950         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11951         info_osdata_command.
11952         * osdata.c (info_osdata_command): Rename to ...
11953         (info_osdata): ... this.  Constify 'type' parameter, and remove
11954         the 'from_tty' parameter.  Accept NULL TYPE.
11955         (info_osdata_command): New function.
11956         * osdata.h (info_osdata_command): Remove declaration.
11957         (info_osdata): New declaration.
11958
11959 2017-04-05  Pedro Alves  <palves@redhat.com>
11960
11961         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11962         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11963         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11964         parameter.
11965         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11966         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11967         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11968         parameter.
11969         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11970         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11971         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11972         (mi_cmd_file_list_exec_source_files)
11973         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11974         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11975         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11976         parameter.
11977         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11978         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11979         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11980         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11981         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11982         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11983         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11984         'command' parameter.
11985         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11986         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11987         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11988         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11989         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11990         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11991         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11992         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11993         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11994         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11995         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11996         parameter.
11997         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11998         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11999         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12000         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12001         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12002         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12003         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12004         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12005         (mi_cmd_data_list_changed_registers)
12006         (mi_cmd_data_write_register_values)
12007         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12008         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12009         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12010         (mi_cmd_list_features, mi_cmd_list_target_features)
12011         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12012         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12013         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12014         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12015         (mi_cmd_trace_frame_collected): Constify 'command'
12016         parameter.
12017         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12018         'command' parameter.
12019
12020 2017-04-05  Pedro Alves  <palves@redhat.com>
12021
12022         * ada-lang.c (ada_completer_word_break_characters): Now a const
12023         array.
12024         (ada_get_gdb_completer_word_break_characters): Constify.
12025         * completer.c (gdb_completer_command_word_break_characters)
12026         (gdb_completer_file_name_break_characters)
12027         (gdb_completer_quote_characters): Now const arrays.
12028         (get_gdb_completer_quote_characters): Constify.
12029         (set_rl_completer_word_break_characters): New function.
12030         (set_gdb_completion_word_break_characters)
12031         (complete_line_internal): Use it.
12032         * completer.h (get_gdb_completer_quote_characters): Constify.
12033         (set_rl_completer_word_break_characters): Declare.
12034         * f-lang.c (f_word_break_characters): Constify.
12035         * language.c (default_word_break_characters): Constify.
12036         * language.h (language_defn::la_word_break_characters): Constify.
12037         (default_word_break_characters): Constify.
12038         * top.c (init_main): Use set_rl_completer_word_break_characters.
12039
12040 2017-04-05  Pedro Alves  <palves@redhat.com>
12041
12042         * aix-thread.c (aix_thread_pid_to_str)
12043         (aix_thread_extra_thread_info): Constify.
12044         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12045         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12046         (bsd_uthread_pid_to_str): Constify.
12047         * corelow.c (core_pid_to_str): Constify.
12048         * darwin-nat.c (darwin_pid_to_str): Constify.
12049         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12050         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12051         Constify.
12052         * gnu-nat.c (gnu_pid_to_str): Constify.
12053         * go32-nat.c (go32_pid_to_str): Constify.
12054         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12055         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12056         * inferior.c (inferior_pid_to_str): Constify.
12057         * linux-nat.c (linux_nat_pid_to_str): Constify.
12058         * linux-tdep.c (linux_core_pid_to_str): Constify.
12059         * linux-thread-db.c (thread_db_pid_to_str)
12060         (thread_db_extra_thread_info): Constify.
12061         * nto-tdep.c (nto_extra_thread_info): Constify.
12062         * nto-tdep.h (nto_extra_thread_info): Constify.
12063         * obsd-nat.c (obsd_pid_to_str): Constify.
12064         * procfs.c (procfs_pid_to_str): Constify.
12065         * ravenscar-thread.c (ravenscar_extra_thread_info)
12066         (ravenscar_pid_to_str): Constify.
12067         * remote-sim.c (gdbsim_pid_to_str): Constify.
12068         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12069         Constify.
12070         * sol-thread.c (solaris_pid_to_str): Constify.
12071         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12072         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12073         * target.c (default_pid_to_str, target_pid_to_str)
12074         (normal_pid_to_str, default_pid_to_str): Constify.
12075         * target.h (target_ops::to_pid_to_str)
12076         (target_ops::to_extra_thread_info): Constify.
12077         (target_pid_to_str, normal_pid_to_str): Constify.
12078         * windows-nat.c (windows_pid_to_str): Constify.
12079         * gdbarch.sh (core_pid_to_str): Constify.
12080         * target-delegates.c: Regenerate.
12081         * gdbarch.h, gdbarch.c: Regenerate.
12082
12083 2017-04-05  Pedro Alves  <palves@redhat.com>
12084
12085         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12086         the memory of the temporary warning_pre_print override.
12087         * utils.c (warning_pre_print): Constify.
12088         * utils.h (warning_pre_print): Constify.
12089
12090 2017-04-05  Pedro Alves  <palves@redhat.com>
12091
12092         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12093         (shell_command): New function.
12094         (make_command): Use std::string.
12095         (init_cli_cmds): Register shell_command instead of shell_escape.
12096
12097 2017-04-05  Pedro Alves  <palves@redhat.com>
12098
12099         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12100         * tracepoint.c (default_collect): Don't initialize.
12101
12102 2017-04-05  Pedro Alves  <palves@redhat.com>
12103
12104         * macroexp.c (macro_buffer::shared): Now a bool.
12105         (init_buffer): Update.
12106         (init_shared_buffer): Constify 'addr' parameter.
12107         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12108         casts.
12109
12110 2017-04-05  Pedro Alves  <palves@redhat.com>
12111
12112         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12113         * disasm.c (set_disassembler_options): Constify local.
12114         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12115
12116 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12117
12118         PR gdb/21352
12119         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12120         option.
12121
12122 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12123
12124         * frame.c (frame_unwind_register_unsigned): Call
12125         frame_unwind_register_value.
12126
12127 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12128
12129         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12130         Use gdb_test_multiple, and don't match anchor.
12131
12132 2017-04-05  Pedro Alves  <palves@redhat.com>
12133
12134         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12135         (Write After Approval): Remove Simon Marchi.
12136
12137 2017-04-05  Pedro Alves  <palves@redhat.com>
12138
12139         * common/gdb_optional.h (optional::optional): Make constexpr and
12140         initialize m_dummy.
12141
12142 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12143
12144         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12145         (amd64fbsd_jmp_buf_reg_offset): Remove.
12146         (amd64fbsd_supply_uthread): Remove function.
12147         (amd64fbsd_collect_uthread): Remove function.
12148         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12149         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12150         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12151         (fbsd-nat.c): Update comment.
12152         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12153         (i386fbsd_jmp_buf_reg_offset): Remove.
12154         (i386fbsd_supply_uthread): Remove function.
12155         (i386fbsd_collect_uthread): Remove function.
12156         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12157
12158 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12159
12160         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12161         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12162         * NEWS: Mention that support for FreeBSD/alpha was removed.
12163         * alpha-fbsd-tdep.c: Delete file.
12164         * config/alpha/fbsd.mh: Delete file.
12165         * configure.host: Delete alpha*-*-freebsd* and
12166         alpha*-*-kfreebsd*-gnu.
12167         * configure.tgt: Delete alpha*-*-freebsd* and
12168         alpha*-*-kfreebsd*-gnu.
12169
12170 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12171
12172         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12173         amd64bsd_store_inferior_registers): Use ptid from regcache.
12174
12175 2017-04-04  Pedro Alves  <palves@redhat.com>
12176
12177         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12178         data fields, make them private and add "m_" prefixes.
12179         (lnp_state_machine::lnp_state_machine): New ctor.
12180         (record_line, check_line_address, handle_set_discriminator)
12181         (handle_set_address, handle_advance_pc, handle_special_opcode)
12182         (handle_advance_line, handle_set_file, handle_negate_stmt)
12183         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12184         (end_sequence, advance_line): New methods.
12185         (m_gdbarch, m_record_lines_p): New fields.
12186         (lnp_reader_state): Delete.
12187         (dwarf_record_line): Rename to ...
12188         (lnp_state_machine::record_line): ... adjust.
12189         (init_lnp_state_machine): Delete.
12190         (lnp_state_machine::lnp_state_machine): New.
12191         (check_line_address): Rename to ...
12192         (lnp_state_machine::check_line_address): This.
12193         (dwarf_decode_lines_1): Remove reference to "reader_state".
12194         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12195         State machine internal state manipulation moved to
12196         lnp_state_machine methods.
12197
12198 2017-04-04  Pedro Alves  <palves@redhat.com>
12199
12200         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12201         unittests/offset-type-selftests.c.
12202         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12203         * common/offset-type.h: New file.
12204         * common/preprocessor.h: New file.
12205         * common/traits.h: New file.
12206         * common/valid-expr.h: New file.
12207         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12208         sect_offset and cu_offset strong typedefs throughout.
12209         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12210         typedefs throughout.
12211         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12212         sect_offset and cu_offset strong typedefs throughout.
12213         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12214         typedefs throughout.
12215         * gdbtypes.h: Include "common/offset-type.h".
12216         (cu_offset): Now an offset type (strong typedef) instead of a
12217         struct.
12218         (sect_offset): Likewise.
12219         (union call_site_parameter_u): Rename "param_offset" field to
12220         "param_cu_off".
12221         * unittests/offset-type-selftests.c: New file.
12222
12223 2017-04-04  Pedro Alves  <palves@redhat.com>
12224
12225         * common/underlying.h: New file.
12226         * dwarf2read.c: Include "common/gdb_optional.h" and
12227         "common/underlying.h".
12228         (dir_index, file_name_index): New types.
12229         (file_entry): Use them.
12230         (file_entry::include): Use to_underlying.
12231         (line_header::add_file_name): Use dir_index.
12232         (read_formatted_entries): Use gdb::optional.  Read form before
12233         writting to file_entry.
12234         (dwarf_decode_line_header): Use dir_index.
12235         (lnp_state_machine::current_file): Use to_underlying.
12236         (lnp_state_machine::file): Change type to file_name_index.
12237         (dwarf_record_line): Use to_underlying.
12238         (init_lnp_state_machine): Use file_name_index.
12239         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12240
12241 2017-04-04  Pedro Alves  <palves@redhat.com>
12242
12243         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12244         operator bool, has_value and get methods.
12245
12246 2017-04-04  Pedro Alves  <palves@redhat.com>
12247
12248         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12249         fields.
12250         (line_header): Initialize all data fields.  Change type of
12251         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12252         Change type of include_dirs to std::vector<const char *>.  Remove
12253         num_include_dirs, include_dirs_size.  Change type of file_names to
12254         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12255         (line_header::line_header): New.
12256         (line_header::add_include_dir, line_header::add_file_name): New
12257         methods.
12258         (line_header::include_dir_at): Remove NULL check.
12259         (line_header::file_name_at): Add const overload.
12260         (line_header_up): New unique_ptr typedef.
12261         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12262         std::vector.  Remove free_line_header call.
12263         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12264         free_line_header call.
12265         (free_cu_line_header): Delete.
12266         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12267         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12268         Adjust to use std::vector.
12269         (free_line_header): Delete.
12270         (free_line_header_voidp): Use delete.
12271         (add_include_dir): Replace with ...
12272         (line_header::add_include_dir): ... this method.  Use std::vector.
12273         (add_file_name): Replace with ...
12274         (line_header::add_file_name): ... this method.  Use std::vector.
12275         (add_include_dir_stub): Delete.
12276         (read_formatted_entries): Remove memset.
12277         (dwarf_decode_line_header): Return a line_header_up instead of a
12278         raw pointer.  Remove cleanup handling.  Pass lambdas to
12279         read_formatted_entries.  Adjust to use line_header methods.
12280         (dwarf_decode_lines_1): Adjust to use line_header methods.
12281         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12282         use std::vector.
12283
12284 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12285
12286         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12287         instead of struct ptid.
12288
12289 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12290
12291         * frame.c (get_frame_register_bytes): Unwind using value.
12292         (put_frame_register_bytes): Likewise.
12293
12294 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12295
12296         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12297         aggregate-like.
12298
12299 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12300
12301         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12302
12303 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12304
12305         * gdbthread.h (struct thread_info): Declare constructor and
12306         destructor.  Add some in-class member initializers.
12307         * thread.c (free_thread): Remove.
12308         (init_thread_list): Call delete instead of free_thread.
12309         (new_thread): Call thread_info constructor.
12310         (thread_info::thread_info): New function.
12311         (thread_info::~thread_info): New function.
12312         (delete_thread_1): Call delete instead of free_thread.
12313         (make_cleanup_restore_current_thread): Move tp and frame to
12314         inner block.
12315
12316 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12317
12318         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12319         (arc_skip_prologue): Likewise.
12320         (arc_make_frame_cache): Likewise.
12321         (arc_pv_get_operand): New function.
12322         (arc_is_in_prologue): Likewise.
12323         (arc_analyze_prologue): Likewise.
12324         (arc_print_frame_cache): Likewise.
12325         (MAX_PROLOGUE_LENGTH): New constant.
12326
12327 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12328
12329         * configure.tgt: Add arc-insn.o.
12330         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12331         (dump_arc_instruction_command): New function.
12332         (arc_fprintf_disasm): Likewise.
12333         (arc_disassemble_info): Likewise.
12334         (arc_insn_get_operand_value): Likewise.
12335         (arc_insn_get_operand_value_signed): Likewise.
12336         (arc_insn_get_memory_base_reg): Likewise.
12337         (arc_insn_get_memory_offset): Likewise.
12338         (arc_insn_get_branch_target): Likewise.
12339         (arc_insn_dump): Likewise.
12340         (arc_insn_get_linear_next_pc): Likewise.
12341         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12342         (arc_disassemble_info): Likewise.
12343         (arc_insn_get_branch_target): Likewise.
12344         (arc_insn_get_linear_next_pc): Likewise.
12345         * NEWS: Mention new "maint print arc arc-instruction".
12346
12347 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12348
12349         * arc-tdep (maintenance_print_arc_list): New variable.
12350         (maintenance_print_arc_command): New function.
12351
12352 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12353
12354         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12355         Add "limm" and "reserved".
12356         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12357         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12358         * arc-tdep.h (arc_regnum): Likewise.
12359
12360 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12361
12362         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12363         for THREADPTR register.
12364         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12365         register.
12366         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12367         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12368         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12369
12370 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12371
12372         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12373         registers above gdbarch_num_regs (gdbarch) as privileged in
12374         call0 ABI.
12375
12376 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12377
12378         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12379         for a single specified register or for all registers in
12380         a0_base..a0_base + C0_NREGS range.
12381         (supply_gregset_reg): Call regcache_raw_supply for a single
12382         specified register or for all registers in a0_base..a0_base +
12383         C0_NREGS range.
12384
12385 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12386
12387         * arch/xtensa.h (C0_NREGS): Add definition.
12388         * xtensa-tdep.c (C0_NREGS): Remove definition.
12389
12390 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12391
12392         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12393         Drop xtensa_default_isa initialization.
12394         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12395
12396 2017-03-27  Pedro Alves  <palves@redhat.com>
12397
12398         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12399         (file_entry::include_dir): New method.
12400         (line_header::include_dir_at, line_header::file_name_at): New
12401         methods.
12402         (setup_type_unit_groups, setup_type_unit_groups)
12403         (psymtab_include_file_name): Simplify using the new methods.
12404         (lnp_state_machine) <the_line_header>: New field.
12405         <file>: Add comment.
12406         (lnp_state_machine::current_file): New method.
12407         (dwarf_record_line): Simplify using the new methods.
12408         (init_lnp_state_machine): Initialize the "the_line_header" field.
12409         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12410         Simplify using the new methods.
12411
12412 2017-03-27  Pedro Alves  <palves@redhat.com>
12413
12414         * cp-name-parser.y (make_empty): Delete.
12415         (demangler_special, nested_name, ptr_operator, array_indicator)
12416         (direct_declarator, declarator_1): Use fill_comp instead of
12417         make_empty.
12418
12419 2017-03-27  Pedro Alves  <palves@redhat.com>
12420
12421         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12422         to ATTRIBUTE_PRINTF.
12423         * solib-target.c (library_list_start_list): Print "string" not
12424         "version".
12425         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12426         gdb_xml_error call.
12427
12428 2017-03-27  Pedro Alves  <palves@redhat.com>
12429
12430         * dwarf2read.c (struct file_and_directory): New.
12431         (dwarf2_get_dwz_file): Adjust to use std::string.
12432         (dw2_get_file_names_reader): Adjust to use file_and_directory.
12433         (find_file_and_directory): Adjust to return a file_and_directory
12434         object.
12435         (read_file_scope): Adjust to use file_and_directory.  Remove
12436         make_cleanup/do_cleanups calls.
12437         (open_and_init_dwp_file): Adjust to use std::string.  Remove
12438         make_cleanup/do_cleanups calls.
12439         * python/python.c (do_start_initialization): Adjust to ldirname
12440         returning a std::string.
12441         * utils.c (ldirname): Now returns a std::string.
12442         * utils.h (ldirname): Change return type to std::string.
12443         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12444         returning a std::string.
12445         * xml-tdesc.c (file_read_description_xml): Likewise.
12446
12447 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
12448
12449         * regcache.c (regcache_debug_print_register): New function.
12450         * regcache.h (regcache_debug_print_register): New declaration.
12451         * target.c (debug_print_register): Remove.
12452         (target_fetch_registers): Call regcache_debug_print_register.
12453         (target_store_registers): Likewise.
12454
12455 2017-03-24  Pádraig Brady  <pbrady@fb.com>
12456
12457         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12458         reference beyond the 'lh->include_dirs' array before accessing to
12459         it.
12460         (psymtab_include_file_name): Likewise.
12461         (dwarf_decode_lines_1): Likewise.
12462         (dwarf_decode_lines): Likewise.
12463         (file_file_name): Likewise.
12464
12465 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12466
12467         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12468         inferior_ptid.
12469         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12470         ps_lsetfpregs): Likewise.
12471         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12472         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12473         ps_lsetfpregs): Likewise.
12474         * target.c (target_fetch_registers, target_store_registers):
12475         Remove asserts.
12476
12477 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12478
12479         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12480
12481 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12482
12483         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12484         (_initialize_aarch64_tdep): Register it.
12485         (aarch64_record_load_store): Handle PRFM instruction.
12486         (aarch64_process_record_test): New function.
12487
12488 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12489
12490         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12491         indentation.
12492
12493 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12494
12495         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12496
12497 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12498
12499         python/python.c (do_start_initialization): Fix memory leak.
12500
12501 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12502
12503         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12504         using get_ptrace_pid.
12505         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12506         inferior_ptid.
12507         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12508         inferior_ptid instead of pid.
12509
12510 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12511
12512         * aarch64-tdep.c: Wrap locally used classes in anonymous
12513         namespace.
12514         * arm-tdep.c: Likewise.
12515         * linespec.c: Likewise.
12516         * ui-out.c: Likewise.
12517
12518 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12519
12520         PR gdb/19637
12521         * python/lib/gdb/printer/bound_registers.py: Import sys.
12522
12523 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12524
12525         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12526         windows_thread_info parameter and use it instead of
12527         current_thread.
12528         (windows_fetch_inferior_registers): Don't set current_thread,
12529         pass the thread to do_windows_fetch_inferior_registers.  Use
12530         ptid from regcache instead of inferior_ptid.
12531         (do_windows_store_inferior_registers): Add windows_thread_info
12532         parameter and use it instead of current_thread.
12533         (windows_store_inferior_registers): Don't set current_thread,
12534         pass the thread to do_windows_store_inferior_registers.  Use
12535         ptid from regcache instead of inferior_ptid.
12536
12537 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12538
12539         * ser-mingw.c (ser_windows_raw): Remove reference to
12540         struct serial::current_timeout.
12541
12542 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12543
12544         PR tdep/20928
12545         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12546         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12547         (sparc64_fsr_type): Fix %fsr decoding.
12548
12549 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12550
12551         * python/py-record-btrace.c (btpy_insn_data): Change return type
12552         for Python 2.
12553
12554 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12555
12556         * spu-linux-nat.c (spu_fetch_inferior_registers,
12557         spu_store_inferior_registers): Use ptid from regcache, set and
12558         restore inferior_ptid.
12559         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12560         Likewise.
12561
12562 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12563
12564         * i386-linux-nat.c (fetch_register, store_register,
12565         i386_linux_fetch_inferior_registers,
12566         i386_linux_store_inferior_registers): Use ptid from regcache.
12567         * ia64-linux-nat.c (ia64_linux_fetch_register,
12568         ia64_linux_store_register): Likewise.
12569         * inf-ptrace.c (inf_ptrace_fetch_register,
12570         inf_ptrace_store_register): Likewise.
12571         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12572         m32r_linux_store_inferior_registers): Likewise.
12573         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12574         m68kbsd_store_inferior_registers): Likewise.
12575         * m68k-linux-nat.c (fetch_register, store_register,
12576         m68k_linux_fetch_inferior_registers,
12577         m68k_linux_store_inferior_registers): Likewise.
12578         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12579         m88kbsd_store_inferior_registers): Likewise.
12580         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12581         mips_fbsd_store_inferior_registers): Likewise.
12582         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12583         mips64_linux_regsets_store_registers): Likewise.
12584         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12585         mipsnbsd_store_inferior_registers): Likewise.
12586         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12587         mips64obsd_store_inferior_registers): Likewise.
12588         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12589         Likewise.
12590         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12591         ppcfbsd_store_inferior_registers): Likewise.
12592         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12593         ppc_linux_store_inferior_registers): Likewise.
12594         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12595         ppcnbsd_store_inferior_registers): Likewise.
12596         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12597         ppcobsd_store_registers): Likewise.
12598         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12599         Likewise.
12600         * ravenscar-thread.c (ravenscar_fetch_registers,
12601         ravenscar_store_registers, ravenscar_prepare_to_store):
12602         Likewise.
12603         * record-btrace.c (record_btrace_fetch_registers,
12604         record_btrace_store_registers, record_btrace_prepare_to_store):
12605         Likewise.
12606         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12607         Lookup inferior using ptid from regcache, instead of
12608         current_inferior.
12609         * remote.c (remote_fetch_registers, remote_store_registers): Use
12610         ptid from regcache.
12611         * rs6000-nat.c (fetch_register, store_register): Likewise.
12612         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12613         s390_linux_store_inferior_registers): Likewise.
12614         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12615         shnbsd_store_inferior_registers): Likewise.
12616         * sol-thread.c (sol_thread_fetch_registers,
12617         sol_thread_store_registers): Likewise.
12618         * sparc-nat.c (sparc_fetch_inferior_registers,
12619         sparc_store_inferior_registers): Likewise.
12620         * tilegx-linux-nat.c (fetch_inferior_registers,
12621         store_inferior_registers): Likewise.
12622         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12623         vaxbsd_store_inferior_registers): Likewise.
12624         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12625         store_xtregs): Likewise.
12626
12627 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12628
12629         PR gdb/14441
12630         * NEWS: Mention support for rvalue references in GDB and python.
12631         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12632         supports both lvalue and rvalue references.
12633
12634 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12635
12636         PR gdb/14441
12637         * gdbtypes.c (rank_one_type): Implement overloading
12638         resolution rules regarding rvalue references.
12639
12640 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12641
12642         PR gdb/14441
12643         * aarch64-tdep.c (aarch64_type_align)
12644         (aarch64_extract_return_value, aarch64_store_return_value): Change
12645         lvalue reference type checks to general reference type checks.
12646         * amd64-tdep.c (amd64_classify): Likewise.
12647         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12648         Likewise.
12649         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12650         (arm_store_return_value): Likewise.
12651         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12652         * c-typeprint.c (c_print_type): Likewise.
12653         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12654         (cplus_number_of_children, cplus_describe_child): Likewise.
12655         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12656         * completer.c (expression_completer): Likewise.
12657         * cp-support.c (make_symbol_overload_list_adl_namespace):
12658         Likewise.
12659         * darwin-nat-info.c (info_mach_region_command): Likewise.
12660         * dwarf2loc.c (entry_data_value_coerce_ref)
12661         (value_of_dwarf_reg_entry): Likewise.
12662         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12663         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12664         Likewise.
12665         * findvar.c (extract_typed_address, store_typed_address):
12666         Likewise.
12667         * gdbtypes.c (rank_one_type): Likewise.
12668         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12669         * infcall.c (value_arg_coerce): Likewise.
12670         * language.c (pointer_type): Likewise.
12671         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12672         Likewise.
12673         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12674         * mn10300-tdep.c (mn10300_type_align): Likewise.
12675         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12676         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12677         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12678         Likewise.
12679         * printcmd.c (print_formatted, x_command): Likewise.
12680         * python/py-type.c (typy_get_composite, typy_template_argument):
12681         Likewise.
12682         * python/py-value.c (valpy_referenced_value)
12683         (valpy_get_dynamic_type, value_has_field): Likewise.
12684         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12685         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12686         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12687         * spu-tdep.c (spu_scalar_value_p): Likewise.
12688         * symtab.c (lookup_symbol_aux): Likewise.
12689         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12690         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12691         Likewise.
12692         * valops.c (value_cast_pointers, value_cast)
12693         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12694         (value_struct_elt, value_struct_elt_bitpos)
12695         (value_find_oload_method_list, find_overload_match)
12696         (value_rtti_indirect_type): Likewise.
12697         * valprint.c (val_print_scalar_type_p, generic_val_print):
12698         Likewise.
12699         * value.c (value_actual_type, value_as_address, unpack_long)
12700         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12701         (coerce_ref): Likewise.
12702         * varobj.c (varobj_get_value_type): Likewise.
12703
12704 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12705
12706         PR gdb/14441
12707         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12708         table of constants.
12709         * python/lib/gdb/command/explore.py: Support exploring values
12710         of rvalue reference types.
12711         * python/lib/gdb/types.py: Implement get_basic_type() for
12712         rvalue reference types.
12713         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12714         constant.
12715         * python/py-value.c (valpy_getitem): Add an rvalue reference
12716         check.
12717         (valpy_reference_value): Add new parameter "refcode".
12718         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12719         New wrappers for valpy_reference_value().
12720         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12721         (gdbpy_invoke_xmethod): Likewise.
12722
12723 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12724
12725         PR gdb/14441
12726         * dwarf2read.c (process_die, read_type_die_1): Handle the
12727         DW_TAG_rvalue_reference_type DIE.
12728         (read_tag_reference_type): Add new parameter "refcode".
12729
12730 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12731
12732         PR gdb/14441
12733         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12734         (c_type_print_modifier, c_type_print_varspec_suffix)
12735         (c_type_print_base): Support printing rvalue reference types.
12736         * c-valprint.c (c_val_print, c_value_print): Support printing
12737         rvalue reference values.
12738
12739 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12740
12741         PR gdb/14441
12742         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12743         typename.
12744         * cp-support.c (replace_typedefs): Handle
12745         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12746         * python/py-type.c (typy_lookup_type): Likewise.
12747
12748 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12749
12750         PR gdb/14441
12751         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12752         * parse.c (insert_type): Change assert statement.
12753         (follow_types): Handle rvalue reference types.
12754         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12755         constant.
12756
12757 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12758
12759         PR gdb/14441
12760         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12761         value_ref() interface.
12762         * c-valprint.c (c_value_print): Likewise.
12763         * infcall.c (value_arg_coerce): Likewise.
12764         * python/py-value.c (valpy_reference_value): Likewise.
12765         * valops.c (value_cast, value_reinterpret_cast)
12766         (value_dynamic_cast, typecmp): Likewise.
12767         (value_ref): Parameterize by kind of return value reference type.
12768         * value.h (value_ref): Add new parameter "refcode".
12769
12770 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12771
12772         PR gdb/14441
12773         * dwarf2read.c (read_tag_reference_type): Use
12774         lookup_lvalue_reference_type() instead of lookup_reference_type().
12775         * eval.c (evaluate_subexp_standard): Likewise.
12776         * f-exp.y: Likewise.
12777         * gdbtypes.c (make_reference_type, lookup_reference_type):
12778         Generalize with rvalue reference types.
12779         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12780         convenience wrappers for lookup_reference_type().
12781         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12782         reference kind parameter.
12783         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12784         wrappers for lookup_reference_type().
12785         * guile/scm-type.c (gdbscm_type_reference): Use
12786         lookup_lvalue_reference_type() instead of lookup_reference_type().
12787         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12788         * parse.c (follow_types): Likewise.
12789         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12790         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12791         Likewise.
12792         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12793         (gdbpy_invoke_xmethod): Likewise.
12794         * stabsread.c: Provide extra argument to make_reference_type()
12795         call.
12796         * valops.c (value_ref, value_rtti_indirect_type): Use
12797         lookup_lvalue_reference_type() instead of lookup_reference_type().
12798
12799 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12800
12801         PR gdb/14441
12802         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12803         (TYPE_IS_REFERENCE): New macro.
12804         (struct type): Add rvalue_reference_type field.
12805         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12806
12807 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12808
12809         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12810         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12811         New function definition.
12812         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12813         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12814         New function declaration.
12815         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12816         * mi/mi-interp.h: New file.
12817         * solib.c (info_sharedlibrary_command): Replace for loop with
12818         ALL_SO_LIBS macro
12819         * solib.h (update_solib_list): New function declaration.
12820         (so_list_head): Move macro.
12821         * solist.h (ALL_SO_LIBS): New macro.
12822
12823 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12824
12825         * infcmd.c (post_create_inferior): Remove unused argument in
12826         call to solib_add.
12827         * remote.c (remote_start_remote): Likewise.
12828         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12829         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12830         (enable_break): Likewise.
12831         * solib.c (update_solib_list): Remove unused target argument
12832         and its documentation.
12833         (solib_add): Remove unused target argument.  Remove unused
12834         argument in call to update_solib_list.
12835         (info_sharedlibrary_command): Remove unused argument in call
12836         to update_solib_list.
12837         (sharedlibrary_command): Remove unused argument in call to
12838         solib_add.
12839         (handle_solib_event): Likewise.
12840         (reload_shared_libraries): Likewise.
12841         * solib.h (solib_add): Remove unused target argument.
12842
12843 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12844
12845         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12846         (s390_displaced_step_fixup): Cover relative branches with the
12847         default fixup handling.  This fixes lack of support for some
12848         relative branch instructions.
12849
12850 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12851
12852         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12853         ptid from regcache.
12854
12855 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12856
12857         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12858         i386_darwin_store_inferior_registers): Use ptid from regcache.
12859
12860 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12861
12862         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12863         i386bsd_store_inferior_registers): Use ptid from regcache.
12864
12865 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12866
12867         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12868         hppaobsd_store_registers): Use ptid from regcache.
12869
12870 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12871
12872         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12873         hppanbsd_store_registers): Use ptid from regcache.
12874
12875 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12876
12877         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12878         from regcache.  Use get_ptrace_pid.
12879
12880 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12881
12882         * corelow.c (get_core_register_section): Use ptid from regcache,
12883         update doc.
12884
12885 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12886
12887         * bsd-uthread.c (bsd_uthread_fetch_registers,
12888         bsd_uthread_store_registers): Use ptid from regcache, set and
12889         restore inferior_ptid.
12890
12891 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12892
12893         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12894         fetch_fp_regs, store_register, store_regs, store_fp_register,
12895         store_fp_regs): Use ptid from regcache.
12896
12897 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12898
12899         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12900         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12901         store_vfp_regs): Use ptid from regcache.
12902
12903 2017-03-17  Pedro Alves  <palves@redhat.com>
12904
12905         PR remote/21188
12906         * ser-base.c (ser_base_wait_for): Add comment.
12907         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12908         version.
12909         * ser-unix.c (hardwire_raw): Remove reference to
12910         scb->current_timeout.
12911         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12912         (hardwire_ops): Install ser_base_readchar instead of
12913         hardwire_readchar.
12914         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12915         Remove fields.
12916
12917 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12918
12919         PR gdb/19637
12920         * python/lib/gdb/printer/bound_registers.py: Add support for
12921         Python 3.
12922
12923 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12924
12925         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12926         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12927         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12928         byte_offset to subobj_byte_offset.  Fix the handling of
12929         DWARF_VALUE_STACK on big-endian targets when coming via an
12930         implicit pointer.
12931         (dwarf2_evaluate_loc_desc): Adjust call to
12932         dwarf2_evaluate_loc_desc_full.
12933         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12934         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12935
12936 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12937
12938         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12939         and REVSH instructions.
12940
12941 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12942
12943         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12944         (arm_record_test): Declare.
12945         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12946         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12947         align with the manual.
12948         (thumb_record_misc): Adjust the code order to align with the
12949         manual.
12950         (thumb2_record_decode_insn_handler): Fix instruction matching.
12951         (instruction_reader_thumb): New class.
12952         (arm_record_test): New function.
12953
12954 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12955
12956         * arm-tdep.c (abstract_memory_reader): New class.
12957         (instruction_reader): New class.
12958         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12959         (decode_insn): Likewise.
12960
12961 2017-03-16  Doug Evans  <dje@google.com>
12962
12963         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12964         member.  Change type of TYPE member to SCM.  All uses updated.
12965         (lsscm_make_lazy_string_smob): Add assert.
12966         (lsscm_make_lazy_string): Flag bad length values.
12967         (lsscm_elt_type): New function.
12968         (gdbscm_lazy_string_to_value): Rewrite to use
12969         lsscm_safe_lazy_string_to_value.
12970         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12971         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12972         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12973         in incoming type.
12974         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12975         * guile/scm-type.c (tyscm_scm_to_type): New function.
12976
12977 2017-03-15  Doug Evans  <dje@google.com>
12978
12979         PR python/17728, python/18439, python/18779
12980         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12981         member.  Change type of TYPE member to PyObject *.  All uses updated.
12982         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12983         (gdbpy_create_lazy_string_object): Flag bad length values.
12984         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12985         Handle typedefs in incoming type.
12986         (stpy_lazy_string_elt_type): New function.
12987         (gdbpy_extract_lazy_string): Call it.
12988         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12989         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12990         typedefs in incoming type.
12991
12992 2017-03-16  Doug Evans  <dje@google.com>
12993
12994         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12995         * guile/scm-type.c (tyscm_scm_to_type): New function.
12996
12997 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12998
12999         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13000         "ULONGEST" for "skip".
13001
13002 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13003
13004         PR gdb/21220
13005         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13006         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13007         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13008         over ptrace peek/poke until end of buffer or error.
13009
13010 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13011
13012         * parse.c (length_of_subexp): Make static.
13013         * parser-defs.h (length_of_subexp): Remove.
13014
13015 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13016
13017         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13018         as well.
13019
13020 2017-03-14  Pedro Alves  <palves@redhat.com>
13021
13022         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13023         (main): Use std::unique_ptr.  Remove calls to
13024         cp_demangled_name_parse_free.
13025
13026 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13027
13028         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13029         alphabsd_store_inferior_registers): Use regcache->ptid instead
13030         of inferior_ptid.
13031
13032 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13033
13034         * aix-thread.c (aix_thread_fetch_registers,
13035         aix_thread_store_registers): Use regcache->ptid instead of
13036         inferior_ptid.
13037
13038 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13039
13040         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13041         store_gregs_to_thread, fetch_fpregs_from_thread,
13042         store_fpregs_to_thread): Use regcache->ptid instead of
13043         inferior_ptid.
13044
13045 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13046
13047         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13048         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13049         instead of inferior_ptid.
13050
13051 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13052
13053         * target.c (target_fetch_registers, target_store_registers): Add
13054         assert.
13055
13056 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13057
13058         * regcache.h (regcache_get_ptid): New function.
13059         * regcache.c (regcache_get_ptid): New function.
13060
13061 2017-03-13  Mark Wielaard  <mark@klomp.org>
13062
13063         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13064
13065 2017-03-10  Keith Seitz  <keiths@redhat.com>
13066
13067         PR c++/8218
13068         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13069
13070 2017-03-08  Pedro Alves  <palves@redhat.com>
13071
13072         PR gdb/18360
13073         * infrun.c (start_step_over, do_target_resume, resume)
13074         (restart_threads): Assert we're not resuming a thread that is
13075         meant to be stopped.
13076         (infrun_thread_stop_requested_callback): Delete.
13077         (infrun_thread_stop_requested): If the thread is internally
13078         stopped, queue a pending stop event and clear the thread's
13079         inline-frame state.
13080         (handle_stop_requested): New function.
13081         (handle_syscall_event, handle_inferior_event_1): Use
13082         handle_stop_requested.
13083         (handle_stop_requested): New function.
13084         (handle_signal_stop): Set the thread's stop_signal here instead of
13085         at caller.
13086         (finish_step_over): Clear step over info unconditionally.
13087         (handle_signal_stop): If the user had interrupted the event
13088         thread, consider the stop a random signal.
13089         (handle_signal_stop) <signal arrived while stepping over
13090         breakpoint>: Don't restart threads here.
13091         (stop_waiting): Don't clear step-over info here.
13092
13093 2017-03-08  Pedro Alves  <palves@redhat.com>
13094
13095         PR 21206
13096         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13097         goes to argument 2, not 1.
13098
13099 2017-03-08  Pedro Alves  <palves@redhat.com>
13100
13101         PR cli/21218
13102         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13103         display_gdb_prompt.
13104         (command_line_input): Add comment.
13105
13106 2017-03-08  Pedro Alves  <palves@redhat.com>
13107
13108         PR tui/21216
13109         * tui/tui-file.c (tui_file::write): New.
13110         * tui/tui-file.h (tui_file): Override "write".
13111         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13112         factored out from ...
13113         (tui_puts): ... here.
13114         (tui_putc): Use them.
13115         (tui_write): New function.
13116         * tui/tui-io.h (tui_write): Declare.
13117
13118 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13119
13120         * Makefile.in (SFILES): Replace "environ.c" with
13121         "common/environ.c".
13122         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13123         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13124         to...
13125         * common/environ.c: ... here.
13126         * environ.h: Moved to...
13127         * common/environ.h: ... here.
13128
13129 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13130
13131         * gdbarch.sh (pstring_ptr): New static function.
13132         (gdbarch_disassembler_options): Use it.
13133         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13134         not valid_disassembler_option->name.
13135         * gdbarch.c: Regenerate.
13136
13137 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13138
13139         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13140
13141 2017-03-07  Pedro Alves  <palves@redhat.com>
13142
13143         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13144
13145 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13146
13147         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13148         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13149         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13150         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13151
13152 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13153
13154         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13155
13156 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13157
13158         * remote.c (remote_add_target_side_commands): Use range-based
13159         for loop.
13160
13161 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13162
13163         PR gdb/21165
13164         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13165         value is lazy.
13166         * valprint.c (common_val_print): Likewise.
13167
13168 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13169
13170         * NEWS: Mention new set/show disassembler-options commands.
13171         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13172         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13173         (prospective_options): New static variable.
13174         (gdb_disassembler::gdb_disassembler): Initialize
13175         m_di.disassembler_options.
13176         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13177         (get_disassembler_options): New function.
13178         (set_disassembler_options): Likewise.
13179         (set_disassembler_options_sfunc): Likewise.
13180         (show_disassembler_options_sfunc): Likewise.
13181         (disassembler_options_completer): Likewise.
13182         (_initialize_disasm): Likewise.
13183         * disasm.h (get_disassembler_options): New prototype.
13184         (set_disassembler_options): Likewise.
13185         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13186         (gdbarch_verify_disassembler_options): Likewise.
13187         * gdbarch.c: Regenerate.
13188         * gdbarch.h: Likewise.
13189         * arm-tdep.c (num_disassembly_options): Delete.
13190         (set_disassembly_style): Likewise.
13191         (arm_disassembler_options): New static variable.
13192         (set_disassembly_style_sfunc): Convert short style name into long
13193         option name.  Call set_disassembler_options.
13194         (show_disassembly_style_sfunc): New function.
13195         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13196         set_gdbarch_verify_disassembler_options.
13197         (_initialize_arm_tdep): Delete regnames variable and update callers.
13198         (arm_disassembler_options): Initialize.
13199         (disasm_options): New variable.
13200         (num_disassembly_options): Rename from this...
13201         (num_disassembly_styles): ...to this.  Compute by scanning through
13202         disasm_options.
13203         (valid_disassembly_styles): Initialize using disasm_options.
13204         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13205         set_arm_regname_option.
13206         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13207         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13208         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13209         set_gdbarch_verify_disassembler_options.
13210         * s390-tdep.c (s390_disassembler_options): New static variable.
13211         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13212         set_gdbarch_verify_disassembler_options.
13213
13214 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13215
13216         * remote.c (remote_add_target_side_condition): Remove "struct"
13217         keyword from range-based for loop.
13218
13219 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13220
13221         * remote.c (remote_add_target_side_condition): Use range-based
13222         for loop.  Update comment.
13223
13224 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13225
13226         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13227
13228 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13229
13230         * regcache.c (regcache_raw_update): New function.
13231         (regcache_raw_read): Move code to regcache_raw_update.
13232         * regcache.h (regcache_raw_update): New declaration.
13233         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13234
13235 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13236
13237         * dwarf2read.c (create_debug_type_hash_table): Initialize
13238         header.signature and header.type_offset_in_tu.
13239
13240 2017-02-24  Pedro Alves  <palves@redhat.com>
13241
13242         * symtab.c (make_file_symbol_completion_list_1): Use
13243         add_symtab_completions.
13244
13245 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13246
13247         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13248
13249 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13250
13251         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13252         I386_MAX_REGISTER_SIZE.
13253         (i386_pseudo_register_write): Likewise.
13254         (i386_process_record): Likewise.
13255         * i387-tdep.c (i387_supply_xsave): Likewise.
13256         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13257         (store_register): Likewise.
13258
13259 2017-02-23  Pedro Alves  <palves@redhat.com>
13260
13261         * ada-lang.c: Include "common/function-view.h".
13262         (ada_iterate_over_symbols): Adjust to use function_view as
13263         callback type.
13264         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13265         (ada_make_symbol_completion_list): Use a lambda.
13266         (ada_exc_search_name_matches): Delete.
13267         (name_matches_regex): New.
13268         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13269         * compile/compile-c-support.c: Include "common/function-view.h".
13270         (print_one_macro): Change prototype to accept a ui_file pointer.
13271         (write_macro_definitions): Use a lambda.
13272         * dwarf2read.c: Include "common/function-view.h".
13273         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13274         (dw2_expand_symtabs_matching): Adjust to use function_view as
13275         callback type.
13276         * language.h: Include "common/function-view.h".
13277         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13278         function_view as callback type.
13279         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13280         * linespec.c: Include "common/function-view.h".
13281         (collect_info::add_symbol): New method.
13282         (struct symbol_and_data_callback, iterate_inline_only, struct
13283         symbol_matcher_data, iterate_name_matcher): Delete.
13284         (iterate_over_all_matching_symtabs): Adjust to use function_view
13285         as callback type and lambdas.
13286         (iterate_over_file_blocks): Adjust to use function_view as
13287         callback type.
13288         (decode_compound_collector): Now a class with private fields.
13289         (decode_compound_collector::release_symbols): New method.
13290         (collect_one_symbol): Rename to...
13291         (decode_compound_collector::operator()): ... this and adjust.
13292         (lookup_prefix_sym): decode_compound_collector construction bits
13293         move to decode_compound_collector ctor.  Pass the
13294         decode_compound_collector object directly as callback.  Remove
13295         cleanups and use decode_compound_collector::release_symbols
13296         instead.
13297         (symtab_collector): Now a class with private fields.
13298         (symtab_collector::release_symtabs): New method.
13299         (add_symtabs_to_list): Rename to...
13300         (symtab_collector::operator()): ... this and adjust.
13301         (collect_symtabs_from_filename): symtab_collector construction
13302         bits move to symtab_collector ctor.  Pass the symtab_collector
13303         object directly as callback.  Remove cleanups and use
13304         symtab_collector::release_symtabs instead.
13305         (collect_symbols): Delete.
13306         (add_matching_symbols_to_info): Use lambdas.
13307         * macrocmd.c (print_macro_callback): Delete.
13308         (info_macro_command): Use a lambda.
13309         (info_macros_command): Pass print_macro_definition as callable
13310         directly.
13311         (print_one_macro): Remove 'ignore' parameter.
13312         (macro_list_command): Adjust.
13313         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13314         (macro_for_each_data::user_data): Delete field.
13315         (foreach_macro): Adjust to call the function_view.
13316         (macro_for_each): Adjust to use function_view as callback type.
13317         (foreach_macro_in_scope): Adjust to call the function_view.
13318         (macro_for_each_in_scope): Adjust to use function_view as callback
13319         type.
13320         * macrotab.h: Include "common/function-view.h".
13321         (macro_callback_fn): Declare a prototype instead of a pointer.
13322         Remove "user_data" parameter.
13323         (macro_for_each, macro_for_each_in_scope): Adjust to use
13324         function_view as callback type.
13325         * psymtab.c (partial_map_expand_apply)
13326         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13327         Adjust to use function_view as callback type and to return bool.
13328         (psym_expand_symtabs_matching): Adjust to use function_view as
13329         callback types.
13330         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13331         to use function_view as callback type and to return bool.
13332         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13333         callback types.
13334         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13335         as callback types.
13336         * symfile.h: Include "common/function-view.h".
13337         (expand_symtabs_file_matcher_ftype)
13338         (expand_symtabs_symbol_matcher_ftype)
13339         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13340         return bool.
13341         (quick_symbol_functions::map_symtabs_matching_filename)
13342         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13343         function_view as callback type and return bool.
13344         (expand_symtabs_matching): Adjust to use function_view as callback
13345         type.
13346         (maintenance_expand_name_matcher)
13347         (maintenance_expand_file_matcher): Delete.
13348         (maintenance_expand_symtabs): Use lambdas.
13349         * symtab.c (iterate_over_some_symtabs): Adjust to use
13350         function_view as callback types and return bool.
13351         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13352         of a cleanup.
13353         (lookup_symtab_callback): Delete.
13354         (lookup_symtab): Use a lambda.
13355         (iterate_over_symbols): Adjust to use function_view as callback
13356         type.
13357         (struct search_symbols_data, search_symbols_file_matches)
13358         (search_symbols_name_matches): Delete.
13359         (search_symbols): Use a pair of lambdas.
13360         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13361         (symtab_expansion_callback): Delete.
13362         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13363         * symtab.h: Include "common/function-view.h".
13364         (iterate_over_some_symtabs): Adjust to use function_view as
13365         callback type and return bool.
13366         (iterate_over_symtabs): Adjust to use function_view as callback
13367         type.
13368         (symbol_found_callback_ftype): Remove 'data' parameter and return
13369         bool.
13370         (iterate_over_symbols): Adjust to use function_view as callback
13371         type.
13372
13373 2017-02-23  Pedro Alves  <palves@redhat.com>
13374
13375         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13376         (%.o) <unittests/%.c>: New pattern.
13377         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13378         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13379         * common/function-view.h: New file.
13380         * unittests/function-view-selftests.c: New file.
13381         * configure: Regenerate.
13382
13383 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13384
13385         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13386         inferior_ptid.
13387         * go32-nat.c (go32_thread_alive): Likewise.
13388
13389 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13390
13391         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13392         delete.
13393
13394 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13395
13396         * varobj.c (varobj_clear_saved_item): Use delete instead of
13397         xfree.
13398         (update_dynamic_varobj_children): Likewise.
13399
13400 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13401
13402         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13403
13404 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
13405
13406         * common/enum-flags.h (enum_flags::enum_flags): Initialize
13407         m_enum_value to 0 in default constructor.
13408
13409 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
13410
13411         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13412         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13413         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13414         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13415         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13416         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13417         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13418         IS_STORE_CONDITIONAL_INSN.
13419
13420 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13421
13422         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13423
13424 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13425
13426         * NEWS (Changes since GDB 7.12): Add DWARF-5.
13427
13428 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13429
13430         * dwarf2read.c (skip_one_die, read_attribute_value)
13431         (dwarf2_const_value_attr, dump_die_shallow)
13432         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13433         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13434
13435 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13436
13437         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13438         (dwarf_parse_macro_header): Accept DWARF version 5.
13439         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13440
13441 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13442
13443         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13444         DW_AT_GNU_*.
13445         * common/common-exceptions.h (enum errors): Likewise.
13446         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13447         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13448         (dwarf_expr_context::execute_stack_op): Likewise.
13449         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13450         Likewise.
13451         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13452         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13453         (show_entry_values_debug, call_site_to_target_addr)
13454         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13455         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13456         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13457         (value_of_dwarf_block_entry, indirect_pieced_value)
13458         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13459         (disassemble_dwarf_expression): Likewise.
13460         * dwarf2read.c (process_die, inherit_abstract_dies)
13461         (read_call_site_scope): Likewise.
13462         * gdbtypes.h (struct func_type, struct call_site_parameter)
13463         (struct call_site): Likewise.
13464         * stack.c (read_frame_arg): Likewise.
13465         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13466
13467 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13468
13469         * defs.h (read_unsigned_leb128): New declaration.
13470         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13471         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13472         (dwarf2_find_location_expression): Call also
13473         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13474         * dwarf2loc.h (dwarf2_version): New declaration.
13475         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13476         rnglists.
13477         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13478         .debug_rnglists.
13479         (struct dwop_section_names): Add loclists_dwo.
13480         (dwop_section_names): Add .debug_loclists.dwo.
13481         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13482         (struct dwarf2_per_cu_data): Add dwarf_version.
13483         (struct dwo_sections): Add loclists.
13484         (struct attr_abbrev): Add implicit_const.
13485         (read_indirect_line_string): New declaration.
13486         (read_unsigned_leb128): Delete declaration.
13487         (rcuh_kind): New definition.
13488         (read_and_check_comp_unit_head): Change parameter
13489         is_debug_types_section to section_kind.
13490         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13491         (read_comp_unit_head): Change parameter abfd to section, add parameter
13492         section_kind.  Handle DWARF-5.
13493         (error_check_comp_unit_head): Accept also DWARF version 5.
13494         (read_and_check_comp_unit_head): Change parameter
13495         is_debug_types_section to section_kind.
13496         (read_and_check_type_unit_head): Delete function.
13497         (read_abbrev_offset): Handle DWARF-5.
13498         (create_debug_type_hash_table): Add parameter section_kind.  Process
13499         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13500         comp_unit_head.
13501         (create_debug_types_hash_table): Update create_debug_type_hash_table
13502         caller.
13503         (create_all_type_units): Call create_debug_type_hash_table.
13504         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13505         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13506         caller.
13507         (skip_one_die): Handle DW_FORM_implicit_const.
13508         (dwarf2_rnglists_process): New function.
13509         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13510         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13511         (read_attribute_value): Handle DW_FORM_implicit_const,
13512         DW_FORM_line_strp.
13513         (read_attribute): Handle DW_FORM_implicit_const.
13514         (read_indirect_string_at_offset_from): New function from
13515         read_indirect_string_at_offset.
13516         (read_indirect_string_at_offset): Call
13517         read_indirect_string_at_offset_from.
13518         (read_indirect_line_string_at_offset): New function.
13519         (read_indirect_string): New function comment.
13520         (read_indirect_line_string): New function.
13521         (read_unsigned_leb128): Make it global.
13522         (dwarf2_string_attr): Handle DWARF-5.
13523         (add_include_dir_stub, read_formatted_entries): New functions.
13524         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13525         Handle DWARF-5.
13526         (per_cu_header_read_in): Update read_comp_unit_head caller.
13527         (dwarf2_version): New function.
13528         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13529         rnglists.
13530         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13531         fields.
13532
13533 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13534
13535         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13536
13537 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13538
13539         * dwarf2read.c (dwarf2_ranges_process): New function from
13540         dwarf2_ranges_read.
13541         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13542         dwarf2_ranges_process.
13543
13544 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13545
13546         * dwarf2read.c (create_debug_type_hash_table): New function from
13547         create_debug_types_hash_table.
13548         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13549         (create_all_type_units, open_and_init_dwo_file): Update
13550         create_debug_types_hash_table callers.
13551
13552 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13553
13554         PR gdb/16188
13555         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13556         refer to 'ap', not 'args'.
13557
13558 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13559             Pedro Alves  <palves@redhat.com>
13560
13561         PR gdb/16188
13562         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13563         calls succeeded.
13564         * fork-child.c (trace_start_error): New function.
13565         (trace_start_error_with_name): Likewise.
13566         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13567         * inf-ptrace.c (inf_ptrace_me): Likewise.
13568         * inferior.h (trace_start_error): New prototype.
13569         (trace_start_error_with_name): Likewise.
13570
13571 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13572
13573         PR gdb/21164
13574         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13575         NULL before using it.
13576         * symmisc.c (maintenance_print_symbols): Likewise.
13577         (maintenance_print_msymbols): Likewise.
13578
13579 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13580
13581         * NEWS: Add record Python bindings entry.
13582
13583 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13584
13585         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13586         py-record-full.o.
13587         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13588         * python/py-record-btrace.c, python/py-record-btrace.h,
13589         python/py-record-full.c, python/py-record-full.h: New file.
13590         * python/py-record.c: Add include for py-record-btrace.h and
13591         py-record-full.h.
13592         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13593         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13594         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13595         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13596         New definition.
13597         (gdbpy_initialize_btrace): New export.
13598         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13599
13600 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13601
13602         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13603         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13604         * python/py-record.c: New file.
13605         * python/python-internal.h (gdbpy_start_recording,
13606         gdbpy_current_recording, gdpy_stop_recording,
13607         gdbpy_initialize_record): New export.
13608         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13609         (python_GdbMethods): Add gdbpy_start_recording,
13610         gdbpy_current_recording and gdbpy_stop_recording.
13611
13612 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13613
13614         * record-btrace.c (record_btrace_record_method): New function.
13615         (init_record_btrace_ops): Initialize to_record_method.
13616         * record-full.c (record_full_record_method): New function.
13617         (init_record_full_ops, init_record_full_core_ops): Add
13618         record_full_record_method.
13619         * record.h (enum record_method): New enum.
13620         * target-debug.h (target_debug_print_enum_record_method: New define.
13621         * target-delegates.c: Regenerate.
13622         * target.c (target_record_method): New function.
13623         * target.h: Include record.h.
13624         (struct target_ops) <to_record_method>: New field.
13625         (target_record_method): New export.
13626
13627 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13628
13629         * record.h (record_start, record_stop): New export.
13630         * record.c (record_start, record_stop): New function.
13631
13632 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13633
13634         * btrace.c (btrace_fetch): Copy function call segments pointer
13635         into a vector.
13636         (btrace_clear): Clear the vector.
13637         (btrace_find_insn_by_number): Use binary search to find the correct
13638         function call segment.
13639         * btrace.h (brace_fun_p): New typedef.
13640         (struct btrace_thread_info) <functions>: New field.
13641
13642 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13643
13644         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13645         * btrace.c (btrace_decode_error): ... here.  New function.
13646         * btrace.h (btrace_decode_error): New export.
13647
13648 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13649
13650         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13651         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13652         btrace_find_insn_by_number): Remove special case for gaps.
13653         * btrace.h (btrace_insn_get_error): New export.
13654         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13655         * record-btrace.c (btrace_insn_history): Print number for gaps.
13656         (record_btrace_info, record_btrace_goto): Handle gaps.
13657
13658 2017-02-14  Tom Tromey  <tom@tromey.com>
13659
13660         PR python/13598:
13661         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13662         event.
13663         * python/py-evts.c (gdbpy_initialize_py_events): Add
13664         before_prompt registry.
13665         * python/py-events.h (events_object) <before_prompt>: New field.
13666
13667 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13668
13669         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13670
13671 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13672
13673         * symfile (_initialize_symfile): Add usage text to the load command's
13674         help text.
13675
13676 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13677
13678         * utils.c (defaulted_query): Don't query on secondary UIs.
13679
13680 2017-02-10  Tom Tromey  <tom@tromey.com>
13681
13682         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13683
13684 2017-02-10  Tom Tromey  <tom@tromey.com>
13685
13686         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13687         "cleanup" local.
13688         * python/py-type.c (typy_legacy_template_argument): Remove
13689         unnecessary "cleanup" local.
13690
13691 2017-02-10  Tom Tromey  <tom@tromey.com>
13692
13693         * python/python.c (do_start_initialization): New function, from
13694         _initialize_python.
13695         (_initialize_python): Call do_start_initialization.
13696         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13697         goto.
13698
13699 2017-02-10  Tom Tromey  <tom@tromey.com>
13700
13701         * python/py-prettyprint.c (pretty_print_one_value): Use
13702         gdbpy_ref.
13703
13704 2017-02-10  Tom Tromey  <tom@tromey.com>
13705
13706         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13707         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13708         gdbpy_ref.
13709         * python/py-type.c (field_new): Use gdbpy_ref.
13710         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13711         gdbpy_ref.
13712         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13713         (py_free_pspace): Likewise.
13714         (pspace_to_pspace_object): Likewise.
13715         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13716         (py_free_objfile): Likewise.
13717         (objfile_to_objfile_object): Likewise.
13718         * python/py-inferior.c (delete_thread_object): Use
13719         gdbpy_ref.
13720         (infpy_read_memory): Likewise.
13721         (py_free_inferior): Likewise.
13722         * python/py-evtregistry.c (create_eventregistry_object): Use
13723         gdbpy_ref.
13724         * python/py-event.c (create_event_object): Use gdbpy_ref.
13725
13726 2017-02-10  Tom Tromey  <tom@tromey.com>
13727
13728         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13729         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13730         used.
13731         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13732         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13733         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13734         python/py-framefilter.c, python/py-function.c,
13735         python/py-inferior.c, python/py-infevents.c,
13736         python/py-linetable.c, python/py-newobjfileevent.c,
13737         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13738         python/py-signalevent.c, python/py-stopevent.c,
13739         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13740         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13741         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13742         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13743
13744 2017-02-10  Tom Tromey  <tom@tromey.com>
13745
13746         * ui-out.h (ui_out_emit_type): New class.
13747         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13748         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13749         and ui_out_emit_tuple.
13750         (enumerate_locals): Likewise.
13751         (py_mi_print_variables, py_print_locals, py_print_args): Use
13752         ui_out_emit_list.
13753         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13754         ui_out_emit_list.
13755         * common/gdb_optional.h: New file.
13756
13757 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13758
13759         * MAINTAINERS (Write After Approval): Update my e-mail address.
13760
13761 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13762
13763         PR gdb/21122
13764         * breakpoint.c (_initialize_breakpoint): Update the help description
13765         of the 'commands' command to indicate that it takes a list argument.
13766
13767 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13768
13769         * interps.c (current_interp_set_logging): Remove "return".
13770
13771 2017-02-09  Gary Benson  <gbenson@redhat.com>
13772
13773         * symtab.c (add_symtab_completions): Prevent NULL pointer
13774         dereference.
13775
13776 2017-02-08  Pedro Alves  <palves@redhat.com>
13777
13778         * interps.c (interp::interp): Remove reference to quiet_p.
13779         (interp_set): Make static.  Remove dead "Switching to" output
13780         code.
13781         (interp_quiet_p, interp_set_quiet): Delete.
13782         (interpreter_exec_cmd): Don't set the interpreter quiet.
13783         * interps.h (interp_quiet_p): Make static.
13784         (class interp) <quiet_p>: Remove field
13785
13786 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13787
13788         * cli/cli-decode.c (find_command_name_length): Make it extern.
13789         * cli/cli-decode.h (find_command_name_length): Declare.
13790         * cli/cli-script.c (command_name_equals, line_first_arg):
13791         New functions.
13792         (process_next_line): Use cli-decode to parse command names.
13793         (build_command_line): Make args a constant pointer.
13794
13795 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13796
13797         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13798         Remove case-insensitive search.
13799
13800 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13801
13802         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13803         at the end of the line.  Avoids an ARI warning.
13804
13805 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13806
13807         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13808         rdseed instructions.
13809         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13810
13811 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13812
13813         PR tdep/20936
13814         Provide and use sparc32 and sparc64 target description XML files.
13815         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13816         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13817         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13818         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13819         * features/sparc/sparc32-solaris.xml: New file.
13820         * features/sparc/sparc64-solaris.xml: New file.
13821         * features/sparc/sparc32-solaris.c: Generated.
13822         * features/sparc/sparc64-solaris.c: Generated.
13823         * sparc-tdep.h: Account for differences in target descriptions.
13824         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13825         (sparc32_register_type): Use target provided registers.
13826         (validate_tdesc_registers): New function.
13827         (sparc32_gdbarch_init): Use tdesc_has_registers.
13828         Set pseudoregister functions.
13829         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13830         (sparc64_register_type): Use target provided registers.
13831         (sparc64_init_abi): Set pseudoregister functions.
13832
13833 2017-02-03  Tom Tromey  <tom@tromey.com>
13834
13835         PR rust/21097:
13836         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13837         with a single member.
13838
13839 2017-02-03  Pedro Alves  <palves@redhat.com>
13840
13841         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13842         (cli_interp_base::~cli_interp_base): New.
13843         (cli_interp): New struct.
13844         (as_cli_interp): Cast the interp itself to cli_interp.
13845         (cli_interpreter_pre_command_loop): Rename to ...
13846         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13847         parameter.
13848         (cli_interpreter_init): Rename to ...
13849         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13850         boolean.  Make extern.
13851         (cli_interpreter_resume): Rename to ...
13852         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13853         extern.
13854         (cli_interpreter_suspend): Rename to ...
13855         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13856         extern.
13857         (cli_interpreter_exec): Rename to ...
13858         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13859         extern.
13860         (cli_interpreter_supports_command_editing): Rename to ...
13861         (cli_interp_base::supports_command_editing): ... this.  Remove
13862         'interp' parameter.  Make extern.
13863         (cli_ui_out): Rename to ...
13864         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13865         Make extern.
13866         (cli_set_logging): Rename to ...
13867         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13868         parameter.  Make extern.
13869         (cli_interp_procs): Delete.
13870         (cli_interp_factory): Adjust to use "new".
13871         * cli/cli-interp.h: Include "interps.h".
13872         (struct cli_interp_base): New struct.
13873         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13874         (interp_new): Delete.
13875         (interp::interp, interp::~interp): New.
13876         (interp_set): Use bool, and return void.  Assume the interpreter
13877         has suspend, init and resume methods, and that the all return
13878         void.
13879         (set_top_level_interpreter): interp_set returns void.
13880         (interp_ui_out): Adapt.
13881         (current_interp_set_logging): Adapt.
13882         (interp_data): Delete.
13883         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13884         (interp_exec): Adapt.
13885         (top_level_interpreter_data): Delete.
13886         * interps.h (interp_init_ftype, interp_resume_ftype)
13887         (interp_suspend_ftype, interp_exec_ftype)
13888         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13889         (class interp): New.
13890         (interp_new): Delete.
13891         (interp_set): Now returns void.  Use bool.
13892         (interp_data, top_level_interpreter_data): Delete.
13893         * mi/mi-common.h: Include interps.h.
13894         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13895         init, resume, suspect, exec, interp_ui_out, set_logging and
13896         pre_command_loop methods.
13897         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13898         (mi_interpreter_init): Rename to ...
13899         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13900         bool, return void and make extern.  Adjust.
13901         (mi_interpreter_resume): ... Rename to ...
13902         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13903         return void and make extern.  Adjust.
13904         (mi_interpreter_suspend): ... Rename to ...
13905         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13906         return void and make extern.  Adjust.
13907         (mi_interpreter_exec): ... Rename to ...
13908         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13909         extern.  Adjust.
13910         (mi_interpreter_pre_command_loop): ... Rename to ...
13911         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13912         parameter and make extern.
13913         (mi_on_normal_stop_1): Adjust.
13914         (mi_ui_out): Rename to ...
13915         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13916         parameter and make extern.  Adjust.
13917         (mi_set_logging): Rename to ...
13918         (mi_interp::set_logging): ... this.  Remove the 'interp'
13919         parameter and make extern.  Adjust.
13920         (mi_interp_procs): Delete.
13921         (mi_interp_factory): Adjust to use 'new'.
13922         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13923         (mi_print_exception, mi_execute_command, mi_load_progress):
13924         Adjust.
13925         * tui/tui-interp.c (tui_interp): New class.
13926         (as_tui_interp): Return a tui_interp pointer.
13927         (tui_on_normal_stop, tui_on_signal_received)
13928         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13929         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13930         to use interp::interp_ui_out.
13931         (tui_init): Rename to ...
13932         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13933         bool, return void and make extern.  Adjust.
13934         (tui_resume): Rename to ...
13935         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13936         return void and make extern.  Adjust.
13937         (tui_suspend): Rename to ...
13938         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13939         return void and make extern.  Adjust.
13940         (tui_ui_out): Rename to ...
13941         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13942         parameter, and make extern.  Adjust.
13943         (tui_exec): Rename to ...
13944         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13945         make extern.
13946         (tui_interp_procs): Delete.
13947         (tui_interp_factory): Use "new".
13948
13949 2017-02-02  Tom Tromey  <tom@tromey.com>
13950
13951         * rust-exp.y (ends_raw_string, space_then_number)
13952         (rust_identifier_start_p): Return bool.
13953         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13954         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13955         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13956         (rust_chartype_p): Return bool.
13957         (val_print_struct, rust_print_struct_def, rust_print_type):
13958         Update.
13959         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13960         Return bool.
13961
13962 2017-02-02  Tom Tromey  <tom@tromey.com>
13963
13964         * rust-lang.c: Reindent.
13965
13966 2017-02-02  Tom Tromey  <tom@tromey.com>
13967
13968         * rust-lang.h (rust_crate_for_block): Update.
13969         * rust-lang.c (rust_crate_for_block): Return std::string.
13970         (rust_get_disr_info): Use std:;string, not
13971         gdb::unique_xmalloc_ptr.
13972         * rust-exp.y (crate_name): Update.
13973
13974 2017-02-02  Pedro Alves  <palves@redhat.com>
13975
13976         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13977         field out of gdb_disassembler_test and make it static.
13978
13979 2017-02-02  Pedro Alves  <palves@redhat.com>
13980
13981         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13982         mi1_interp and mi_interp fields.
13983
13984 2017-02-02  Pedro Alves  <palves@redhat.com>
13985
13986         * cli/cli-interp.c (struct saved_output_files, saved_output):
13987         Moved from cli/cli-logging.c.
13988         (cli_set_logging): New function.
13989         (cli_interp_procs): Install cli_set_logging.
13990         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13991         Declare.
13992         * cli/cli-logging.c (struct saved_output_files, saved_output):
13993         Moved to cli/cli-interp.c.
13994         (pop_output_files): Don't save outputs here.
13995         (make_logging_output): New function.
13996         (handle_redirections): Don't build tee nor save previous outputs
13997         here.
13998         * interps.c (current_interp_set_logging): Change prototype.
13999         Assume there's always a set_logging_proc method installed.
14000         * interps.h (interp_set_logging_ftype): Change prototype.
14001         (current_interp_set_logging): Change prototype and adjust comment.
14002         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14003         use make_logging_output.
14004         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14005 2017-02-02  Pedro Alves  <palves@redhat.com>
14006
14007         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14008         from ...
14009         (set_logging_overwrite): ... here.
14010         (logging_no_redirect_file): Delete.
14011         (set_logging_redirect): Don't handle redirection on the fly.
14012         Instead warn that "logging off" / "logging on" is necessary.
14013         (pop_output_files): Delete references to logging_no_redirect_file.
14014         (show_logging_command): Always speak in terms of what will happen
14015         once logging is reenabled.
14016
14017 2017-02-02  Pedro Alves  <palves@redhat.com>
14018
14019         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14020
14021 2017-02-02  Pedro Alves  <palves@redhat.com>
14022
14023         * disasm.c (gdb_pretty_print_insn): Rename to ...
14024         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14025         Remove gdbarch parameter.  Adapt to clear the object's buffers
14026         instead of allocating new buffers, and to print using the object's
14027         gdb_disassembler instead of calling gdb_print_insn.
14028         (dump_insns): Use gdb_pretty_print_disassembler.
14029         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14030         (gdb_pretty_print_disassembler): New class.
14031         * record-btrace.c (btrace_insn_history): Use
14032         gdb_pretty_print_disassembler.
14033
14034 2017-02-02  Pedro Alves  <palves@redhat.com>
14035
14036         * ada-lang.c (type_as_string): Use string_file.
14037         * ada-valprint.c (ada_print_floating): Use string_file.
14038         * ada-varobj.c (ada_varobj_scalar_image)
14039         (ada_varobj_get_value_image): Use string_file.
14040         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14041         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14042         * breakpoint.c (update_inserted_breakpoint_locations)
14043         (insert_breakpoint_locations, reattach_breakpoints)
14044         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14045         (print_it_watchpoint): Use string_file.
14046         (save_breakpoints): Use stdio_file.
14047         * c-exp.y (oper): Use string_file.
14048         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14049         tee_file.
14050         (pop_output_files): Use delete.
14051         (handle_redirections): Use stdio_file and tee_file.
14052         * cli/cli-setshow.c (do_show_command): Use string_file.
14053         * compile/compile-c-support.c (c_compute_program): Use
14054         string_file.
14055         * compile/compile-c-symbols.c (generate_vla_size): Take a
14056         'string_file &' instead of a 'ui_file *'.
14057         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14058         of a 'ui_file *'.  Use string_file.
14059         (generate_c_for_variable_locations): Take a 'string_file &'
14060         instead of a 'ui_file *'.
14061         * compile/compile-internal.h (generate_c_for_for_one_variable):
14062         Take a 'string_file &' instead of a 'ui_file *'.
14063         * compile/compile-loc2c.c (push, pushf, unary, binary)
14064         (print_label, pushf_register_address, pushf_register)
14065         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14066         'ui_file *'.  Adjust.
14067         * compile/compile.c (compile_to_object): Use string_file.
14068         * compile/compile.h (compile_dwarf_expr_to_c)
14069         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14070         'ui_file *'.
14071         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14072         (replace_typedefs_qualified_name): Use string_file and
14073         obstack_copy0.
14074         * disasm.c (gdb_pretty_print_insn): Use string_file.
14075         (gdb_disassembly): Adjust reference the null_stream global.
14076         (do_ui_file_delete): Delete.
14077         (gdb_insn_length): Use null_stream.
14078         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14079         * dwarf2loc.c (dwarf2_compile_property_to_c)
14080         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14081         'string_file &' instead of a 'ui_file *'.
14082         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14083         * dwarf2read.c (do_ui_file_peek_last): Delete.
14084         (dwarf2_compute_name): Use string_file.
14085         * event-top.c (gdb_setup_readline): Use stdio_file.
14086         * gdbarch.sh (verify_gdbarch): Use string_file.
14087         * gdbtypes.c (safe_parse_type): Use null_stream.
14088         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14089         string_file.
14090         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14091         'string_file *' instead of a 'ui_file *'.
14092         (gdbscm_arch_disassemble): Use string_file.
14093         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14094         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14095         inherits from ui_file.
14096         (ioscm_file_port_delete, ioscm_file_port_rewind)
14097         (ioscm_file_port_put): Delete.
14098         (ioscm_file_port_write): Rename to ...
14099         (ioscm_file_port::write): ... this.  Remove file_port_magic
14100         checks.
14101         (ioscm_file_port_new): Delete.
14102         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14103         ui_file_up.
14104         * guile/scm-type.c (tyscm_type_name): Use string_file.
14105         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14106         Use string_file.
14107         * infcmd.c (print_return_value_1): Use string_file.
14108         * infrun.c (print_target_wait_results): Use string_file.
14109         * language.c (add_language): Use string_file.
14110         * location.c (explicit_to_string_internal): Use string_file.
14111         * main.c (captured_main_1): Use null_file.
14112         * maint.c (maintenance_print_architecture): Use stdio_file.
14113         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14114         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14115         event_channel>: Change type to mi_console_file pointer.
14116         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14117         (mi_console_file_delete): Delete.
14118         (struct mi_console_file): Delete.
14119         (mi_console_file_magic): Delete.
14120         (mi_console_file_new): Delete.
14121         (mi_console_file::mi_console_file): New.
14122         (mi_console_file_delete): Delete.
14123         (mi_console_file_fputs): Delete.
14124         (mi_console_file::write): New.
14125         (mi_console_raw_packet): Delete.
14126         (mi_console_file::flush): New.
14127         (mi_console_file_flush): Delete.
14128         (mi_console_set_raw): Rename to ...
14129         (mi_console_file::set_raw): ... this.
14130         * mi/mi-console.h (class mi_console_file): New class.
14131         (mi_console_file_new, mi_console_set_raw): Delete.
14132         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14133         (mi_set_logging): Use delete and tee_file.  Adjust.
14134         * mi/mi-main.c (output_register): Use string_file.
14135         (mi_cmd_data_evaluate_expression): Use string_file.
14136         (mi_cmd_data_read_memory): Use string_file.
14137         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14138         * mi/mi-out.c (mi_ui_out::main_stream): New.
14139         (mi_ui_out::rewind): Use main_stream and
14140         string_file.
14141         (mi_ui_out::put): Use main_stream and string_file.
14142         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14143         Allocate a 'string_file' instead.
14144         (mi_out_new): Don't allocate a mem_fileopen stream here.
14145         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14146         (mi_ui_out::main_stream): Declare method.
14147         * printcmd.c (eval_command): Use string_file.
14148         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14149         * python/py-arch.c (archpy_disassemble): Use string_file.
14150         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14151         * python/py-frame.c (frapy_str): Use string_file.
14152         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14153         Use string_file.
14154         * python/py-type.c (typy_str): Use string_file.
14155         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14156         * python/py-value.c (valpy_str): Use string_file.
14157         * record-btrace.c (btrace_insn_history): Use string_file.
14158         * regcache.c (regcache_print): Use stdio_file.
14159         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14160         * remote.c (escape_buffer): Use string_file.
14161         * rust-lang.c (rust_get_disr_info): Use string_file.
14162         * serial.c (serial_open_ops_1): Use stdio_file.
14163         (do_serial_close): Use delete.
14164         * stack.c (print_frame_arg): Use string_file.
14165         (print_frame_args): Remove local mem_fileopen stream, not used.
14166         (print_frame): Use string_file.
14167         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14168         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14169         Take a 'string_file *' instead of a 'ui_file *'.
14170         * top.c (new_ui): Use stdio_file and stderr_file.
14171         (free_ui): Use delete.
14172         (execute_command_to_string): Use string_file.
14173         (quit_confirm): Use string_file.
14174         * tracepoint.c (collection_list::append_exp): Use string_file.
14175         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14176         * tui/tui-file.c: Don't include "ui-file.h".
14177         (enum streamtype, struct tui_stream): Delete.
14178         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14179         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14180         (tui_file::tui_file): New method.
14181         (tui_file_fputs): Delete.
14182         (tui_file_get_strbuf): Delete.
14183         (tui_file::puts): New method.
14184         (tui_file_adjust_strbuf): Delete.
14185         (tui_file_flush): Delete.
14186         (tui_file::flush): New method.
14187         * tui/tui-file.h: Tweak intro comment.
14188         Include ui-file.h.
14189         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14190         (tui_file_adjust_strbuf): Delete declarations.
14191         (class tui_file): New class.
14192         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14193         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14194         (tui_register_format): Use string_stream.
14195         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14196         (tui_get_function_from_frame): Use string_file.
14197         * typeprint.c (type_to_string): Use string_file.
14198         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14199         (null_stream): New global.
14200         (ui_file_delete): Delete.
14201         (ui_file::ui_file): New.
14202         (null_file_isatty): Delete.
14203         (ui_file::~ui_file): New.
14204         (null_file_rewind): Delete.
14205         (ui_file::printf): New.
14206         (null_file_put): Delete.
14207         (null_file_flush): Delete.
14208         (ui_file::putstr): New.
14209         (null_file_write): Delete.
14210         (ui_file::putstrn): New.
14211         (null_file_read): Delete.
14212         (ui_file::putc): New.
14213         (null_file_fputs): Delete.
14214         (null_file_write_async_safe): Delete.
14215         (ui_file::vprintf): New.
14216         (null_file_delete): Delete.
14217         (null_file::write): New.
14218         (null_file_fseek): Delete.
14219         (null_file::puts): New.
14220         (ui_file_data): Delete.
14221         (null_file::write_async_safe): New.
14222         (gdb_flush, ui_file_isatty): Adjust.
14223         (ui_file_put, ui_file_rewind): Delete.
14224         (ui_file_write): Adjust.
14225         (ui_file_write_for_put): Delete.
14226         (ui_file_write_async_safe, ui_file_read): Adjust.
14227         (ui_file_fseek): Delete.
14228         (fputs_unfiltered): Adjust.
14229         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14230         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14231         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14232         (set_ui_file_data): Delete.
14233         (string_file::~string_file, string_file::write)
14234         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14235         (do_ui_file_as_string, ui_file_as_string): Delete.
14236         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14237         (struct mem_file): Delete.
14238         (mem_file_new): Delete.
14239         (stdio_file::stdio_file): New.
14240         (mem_file_delete): Delete.
14241         (stdio_file::stdio_file): New.
14242         (mem_fileopen): Delete.
14243         (stdio_file::~stdio_file): New.
14244         (mem_file_rewind): Delete.
14245         (stdio_file::set_stream): New.
14246         (mem_file_put): Delete.
14247         (stdio_file::open): New.
14248         (mem_file_write): Delete.
14249         (stdio_file_magic, struct stdio_file): Delete.
14250         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14251         (stdio_file::flush): New.
14252         (stdio_file_read): Rename to ...
14253         (stdio_file::read): ... this.  Adjust.
14254         (stdio_file_write): Rename to ...
14255         (stdio_file::write): ... this.  Adjust.
14256         (stdio_file_write_async_safe): Rename to ...
14257         (stdio_file::write_async_safe) ... this.  Adjust.
14258         (stdio_file_fputs): Rename to ...
14259         (stdio_file::puts) ... this.  Adjust.
14260         (stdio_file_isatty): Delete.
14261         (stdio_file_fseek): Delete.
14262         (stdio_file::isatty): New.
14263         (stderr_file_write): Rename to ...
14264         (stderr_file::write) ... this.  Adjust.
14265         (stderr_file_fputs): Rename to ...
14266         (stderr_file::puts) ... this.  Adjust.
14267         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14268         (stderr_file::stderr_file): New.
14269         (tee_file_magic): Delete.
14270         (struct tee_file): Delete.
14271         (tee_file::tee_file): New.
14272         (tee_file_new): Delete.
14273         (tee_file::~tee_file): New.
14274         (tee_file_delete): Delete.
14275         (tee_file_flush): Rename to ...
14276         (tee_file::flush): ... this.  Adjust.
14277         (tee_file_write): Rename to ...
14278         (tee_file::write): ... this.  Adjust.
14279         (tee_file::write_async_safe): New.
14280         (tee_file_fputs): Rename to ...
14281         (tee_file::puts): ... this.  Adjust.
14282         (tee_file_isatty): Rename to ...
14283         (tee_file::isatty): ... this.  Adjust.
14284         * ui-file.h (struct obstack, struct ui_file): Don't
14285         forward-declare.
14286         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14287         (ui_file_write_ftype)
14288         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14289         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14290         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14291         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14292         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14293         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14294         (set_ui_file_fseek): Delete.
14295         (ui_file_data, ui_file_delete, ui_file_rewind)
14296         (struct ui_file): New.
14297         (ui_file_up): New.
14298         (class null_file): New.
14299         (null_stream): Declare.
14300         (ui_file_write_for_put, ui_file_put): Delete.
14301         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14302         Delete.
14303         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14304         (gdb_fopen, tee_file_new): Delete.
14305         (struct string_file): New.
14306         (struct stdio_file): New.
14307         (stdio_file_up): New.
14308         (struct stderr_file): New.
14309         (class tee_file): New.
14310         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14311         of a 'ui_file *'.  Adjust.
14312         * ui-out.h (class ui_out) <field_stream>: Likewise.
14313         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14314         (null_stream): Delete.
14315         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14316         Adjust.
14317         * utils.h (struct ui_file): Delete forward declaration..
14318         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14319         (error_stream): Take a 'string_file &' instead of a
14320         'ui_file *'.
14321         * varobj.c (varobj_value_get_print_value): Use string_file.
14322         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14323         * gdbarch.c: Regenerate.
14324
14325 2017-02-02  Pedro Alves  <palves@redhat.com>
14326
14327         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14328         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14329         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14330         Adjust to call gdb_print_insn instead of
14331         gdb_disassembler::print_insn.
14332         (dump_insns, do_mixed_source_and_assembly_deprecated)
14333         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14334         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14335         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14336         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14337         declaration.
14338         (gdb_pretty_print_insn): Re-add declaration.
14339         * record-btrace.c (btrace_insn_history): Don't allocate a
14340         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14341
14342 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14343
14344         * disasm.h (gdb_disassembly): Remove file_string parameter.
14345         * disasm.c (gdb_disassembly): Likewise.
14346         * cli/cli-cmds.c (print_disassembly): Adapt.
14347         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14348         * stack.c (do_gdb_disassembly): Likewise.
14349
14350 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14351
14352         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14353         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14354         targets.  And if the implicit value is longer than needed, extract
14355         the first bytes instead of the "least significant" ones.
14356
14357 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14358
14359         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14360         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14361         (btrace_fetch): Assert can_access_registers_ptid.
14362         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14363         validate_registers_access.
14364
14365 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14366
14367         * gdbthread.h (can_access_registers_ptid): New.
14368         * thread.c (can_access_registers_ptid): New.
14369
14370 2017-02-01  Pedro Alves  <palves@redhat.com>
14371
14372         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14373
14374 2017-01-31  Pedro Alves  <palves@redhat.com>
14375
14376         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14377         Fix typos.
14378
14379 2017-01-31  Pedro Alves  <palves@redhat.com>
14380
14381         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14382         not used.
14383
14384 2017-01-31  Pedro Alves  <palves@redhat.com>
14385
14386         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14387
14388 2017-01-31  Pedro Alves  <palves@redhat.com>
14389
14390         * common/scoped_restore.h
14391         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14392         change the value's parameter type to T2.
14393         (make_scoped_restore): Likewise.
14394
14395 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14396             Richard Henderson  <rth@redhat.com>
14397
14398         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14399         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14400         GS_BASE for older kernels.
14401         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14402         GS_BASE for older kernels.
14403         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14404         and GS_BASE to the offset table.
14405         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14406         system register group.
14407         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14408         for older kernels.
14409         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14410         amd64 ABI.
14411         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14412         AMD64_GSBASE_REGNUM.
14413         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14414         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14415         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14416         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14417         i386/64bit-segments.xml in those rules.
14418         * features/i386/64bit-segments.xml: New file.
14419         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14420         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14421         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14422         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14423         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14424         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14425         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14426         * features/i386/amd64-avx-linux.c: Regenerated.
14427         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14428         * features/i386/amd64-avx-mpx.c: Regenerated.
14429         * features/i386/amd64-avx512-linux.c: Regenerated.
14430         * features/i386/amd64-linux.c: Regenerated.
14431         * features/i386/amd64-mpx-linux.c: Regenerated.
14432         * features/i386/i386-avx-mpx-linux.c: Regenerated.
14433         * features/i386/i386-avx-mpx.c: Regenerated.
14434         * features/i386/x32-avx-linux.c: Regenerated.
14435         * features/i386/x32-avx512-linux.c: Regenerated.
14436         * regformats/i386/amd64-avx-linux.dat: Regenerated.
14437         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14438         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14439         * regformats/i386/amd64-linux.dat: Regenerated.
14440         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14441         * regformats/i386/x32-avx-linux.dat: Regenerated.
14442         * regformats/i386/x32-avx512-linux.dat: Regenerated.
14443         * regformats/i386/x32-linux.dat: Regenerated.
14444
14445 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14446
14447         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14448         Set to AMD64_NUM_REGS.
14449
14450 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14451
14452         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14453         that checks validity of a register number.
14454
14455 2017-01-27  Kees Cook  <keescook@google.com>
14456
14457         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14458         fetch_fpregs if target has fpa registers.
14459         (arm_linux_store_inferior_registers): Call store_fpregs if target
14460         has fpa registers.
14461
14462 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14463
14464         * cris-tdep.c (cris_gdbarch_init): Remove check for
14465         info.byte_order and force it to BFD_ENDIAN_LITTLE.
14466
14467 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
14468
14469         * corelow.c (get_core_register_section): Check for regset
14470         existence before checking for REGSET_VARIABLE_SIZE.
14471
14472 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14473             Pedro Alves  <palves@redhat.com>
14474
14475         PR gdb/20939
14476         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14477         call memory_error, save memaddr instead.
14478         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14479         negative, cal memory_error.
14480         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14481
14482 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14483
14484         * disasm-selftests.c (memory_error_test): New function.
14485         (_initialize_disasm_selftests): Register memory_error_test.
14486
14487 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14488
14489         * Makefile.in (SFILES): Add disasm-selftests.c and
14490         selftest-arch.c.
14491         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14492         * disasm-selftests.c: New file.
14493         * selftest-arch.c: New file.
14494         * selftest-arch.h: New file.
14495
14496 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14497
14498         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14499         to bfd_arch_mep.  Don't return 0 if section is not
14500         found.  Call print_insn_mep.
14501
14502 2017-01-26  Pedro Alves  <palves@redhat.com>
14503             Yao Qi  <yao.qi@linaro.org>
14504
14505         * arm-tdep.c: Include "disasm.h".
14506         (gdb_print_insn_arm): Update code to get gdbarch.
14507         * disasm.c (dis_asm_read_memory): Change it to
14508         gdb_disassembler::dis_asm_read_memory.
14509         (dis_asm_memory_error): Likewise.
14510         (dis_asm_print_address): Likewise.
14511         (gdb_pretty_print_insn): Change it to
14512         gdb_disassembler::pretty_print_insn.
14513         (dump_insns): Add one argument gdb_disassemlber.  All
14514         callers updated.
14515         (do_mixed_source_and_assembly_deprecated): Likewise.
14516         (do_mixed_source_and_assembly): Likewise.
14517         (do_assembly_only): Likewise.
14518         (gdb_disassembler::gdb_disassembler): New.
14519         (gdb_disassembler::print_insn): New.
14520         * disasm.h (class gdb_disassembler): New.
14521         (gdb_pretty_print_insn): Remove declaration.
14522         (gdb_disassemble_info): Likewise.
14523         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14524         (gdbscm_disasm_read_memory_worker): Update.
14525         (gdbscm_disasm_read_memory): Update.
14526         (gdbscm_disasm_memory_error): Remove.
14527         (gdbscm_disasm_print_address): Remove.
14528         (gdbscm_disassembler::gdbscm_disassembler): New.
14529         (gdbscm_print_insn_from_port): Update.
14530         * mips-tdep.c: Include disasm.h.
14531         (gdb_print_insn_mips): Update code to get gdbarch.
14532         * record-btrace.c (btrace_insn_history): Update.
14533         * spu-tdep.c: Include disasm.h.
14534         (struct spu_dis_asm_data): Remove.
14535         (struct spu_dis_asm_info): New.
14536         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14537         SPU id.
14538         (gdb_print_insn_spu): Cast disassemble_info to
14539         spu_dis_asm_info.
14540
14541 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14542
14543         * disasm.c (do_ui_file_delete): Delete.
14544         (gdb_insn_length): Move code creating stream to ...
14545         * utils.c (null_stream): ... here.  New function.
14546         * utils.h (null_stream): Declare.
14547
14548 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14549
14550         * python/py-inferior.c (find_thread_object): Return directly
14551         from the loop.  Remove "found" variable.
14552
14553 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14554
14555         GDB 7.12.1 released.
14556
14557 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14558
14559         * python/py-function.c (fnpy_call): Reorder declarations to have
14560         the gdbpy_enter object declared first.
14561         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14562
14563 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14564
14565         PR python/21068
14566         * python/python-internal.h (PyMem_RawMalloc): Define for
14567         Python < 3.4.
14568         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14569         PyMem_RawMalloc instead of PyMem_Malloc.
14570
14571 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14572             Luis Machado  <lgustavo@codesourcery.com>
14573
14574         * NEWS (New commands): Mention flash-erase.
14575         (New MI commands): Mention target-flash-erase.
14576         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14577         command.
14578         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14579         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14580         * target.c (flash_erase_command): New function.
14581         (initialize_targets): Add new flash-erase command.
14582         * target.h (flash_erase_command): New declaration.
14583
14584 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14585
14586         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14587         HAVE_SYS_PROCFS_H is defined.
14588
14589 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14590
14591         * remote.c (struct cached_reg): Change data into a pointer.
14592         * (stop_reply_dtr): Free data pointers before deleting vector.
14593         (process_stop_reply): Likewise.
14594         (remote_parse_stop_reply): Allocate space for data
14595
14596 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14597
14598         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14599         MAX_REGISTER_SIZE.
14600         (amd64_pseudo_register_read_value): Likewise.
14601         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14602         (store_register_using_P): Likewise.
14603         * regcache.c (regcache_xfer_part): Likewise.
14604
14605 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14606
14607         Split real and pseudo registers.
14608         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14609         (sparc32_pseudo_regnum): New enum.
14610         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14611         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14612         (SPARC32_CP0_REGISTERS): New macro.
14613         (sparc32_pseudo_register_name): New function.
14614         (sparc32_register_name): Use sparc32_pseudo_register_name.
14615         (sparc32_pseudo_register_type): New function.
14616         (sparc32_register_type): Use sparc32_pseudo_register_type.
14617         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14618         pseudo register numbers.
14619         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14620         (SPARC64_CP0_REGISTERS): New macro.
14621         (sparc64_pseudo_register_name): New function.
14622         (sparc64_register_name): Use sparc64_pseudo_register_name.
14623         (sparc64_pseudo_register_type): New function.
14624         (sparc64_register_type): Use sparc64_pseudo_register_type.
14625         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14626         pseudo register numbers.
14627         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14628         sparc64_store_arguments): Handle pseudo register numbers.
14629
14630 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14631
14632         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14633         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14634         output.
14635         (getpkt_or_notif_sane_1): Likewise.
14636
14637 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14638
14639         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14640         of CC.  Pass "-x c++-header" instead of "-x c".
14641
14642 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14643
14644         * remote.c (remote_can_async_p): Update comment.
14645
14646 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14647
14648         * linux-nat.c (linux_nat_can_async_p): Update comment.
14649
14650 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14651
14652         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14653
14654 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14655
14656         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14657
14658 2017-01-10  Tom Tromey  <tom@tromey.com>
14659
14660         * python/py-type.c (typy_legacy_template_argument): Update.
14661         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14662         ~demangle_parse_info): Declare new members.
14663         (cp_demangled_name_to_comp): Return unique_ptr.
14664         (cp_demangled_name_parse_free)
14665         (make_cleanup_cp_demangled_name_parse_free)
14666         (cp_new_demangle_parse_info): Remove.
14667         * cp-support.c (do_demangled_name_parse_free_cleanup)
14668         (make_cleanup_cp_demangled_name_parse_free): Remove.
14669         (inspect_type, cp_canonicalize_string_full)
14670         (cp_canonicalize_string): Update.
14671         (mangled_name_to_comp): Change return type.
14672         (cp_class_name_from_physname, method_name_from_physname)
14673         (cp_func_name, cp_remove_params): Update.
14674         * cp-name-parser.y (demangle_parse_info): New constructor, from
14675         cp_new_demangle_parse_info.
14676         (~demangle_parse_info): New destructor, from
14677         cp_demangled_name_parse_free.
14678         (cp_merge_demangle_parse_infos): Update.
14679         (cp_demangled_name_to_comp): Change return type.
14680
14681 2017-01-10  Tom Tromey  <tom@tromey.com>
14682
14683         * top.c (prevent_dont_repeat): Change return type.
14684         * python/python.c (execute_gdb_command): Use std::string.
14685         Update.
14686         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14687         * command.h (prevent_dont_repeat): Change return type.
14688         * breakpoint.c (bpstat_do_actions_1): Update.
14689
14690 2017-01-10  Tom Tromey  <tom@tromey.com>
14691
14692         * value.h (scoped_value_mark::~scoped_value_mark): Call
14693         free_to_mark.
14694         (scoped_value_mark::free_to_mark): New method.
14695         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14696         scoped_value_mark.
14697
14698 2017-01-10  Tom Tromey  <tom@tromey.com>
14699
14700         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14701         (valpy_reference_value, valpy_const_value, valpy_get_address)
14702         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14703         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14704         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14705         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14706         scoped_value_mark.
14707         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14708         * value.h (scoped_value_mark): New class.
14709
14710 2017-01-10  Tom Tromey  <tom@tromey.com>
14711
14712         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14713         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14714         * psymtab.c (discard_psymtabs_upto): Remove.
14715         (make_cleanup_discard_psymtabs): Remove.
14716         (struct psymtab_state): Remove.
14717
14718 2017-01-10  Tom Tromey  <tom@tromey.com>
14719
14720         * record-full.c (record_full_save_cleanups): Remove.
14721         (record_full_save): Use gdb::unlinker.
14722         * gcore.c (do_bfd_delete_cleanup): Remove.
14723         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14724         cleanups.
14725         * dwarf2read.c (unlink_if_set): Remove.
14726         (write_psymtabs_to_index): Use gdb::unlinker.
14727         * common/gdb_unlinker.h: New file.
14728
14729 2017-01-10  Tom Tromey  <tom@tromey.com>
14730
14731         * windows-tdep.c (windows_xfer_shared_library): Update.
14732         * windows-nat.c (windows_make_so): Update.
14733         * utils.h (make_cleanup_bfd_unref): Remove.
14734         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14735         * symfile.h (symfile_bfd_open)
14736         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14737         * symfile.c (read_symbols, symbol_file_add)
14738         (separate_debug_file_exists): Update.
14739         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14740         (generic_load, reread_symbols): Update.
14741         * symfile-mem.c (symbol_file_add_from_memory): Update.
14742         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14743         (spu_symbol_file_add_from_memory): Update.
14744         * solist.h (struct target_so_ops) <bfd_open>: Return
14745         gdb_bfd_ref_ptr.
14746         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14747         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14748         gdb_bfd_ref_ptr.
14749         (solib_map_sections, reload_shared_libraries_1): Update.
14750         * solib-svr4.c (enable_break): Update.
14751         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14752         * solib-frv.c (enable_break2): Update.
14753         * solib-dsbt.c (enable_break): Update.
14754         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14755         gdb_bfd_ref_ptr.
14756         (darwin_solib_get_all_image_info_addr_at_init): Update.
14757         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14758         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14759         * record-full.c (record_full_save): Update.
14760         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14761         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14762         * minidebug.c (find_separate_debug_file_in_section): Return
14763         gdb_bfd_ref_ptr.
14764         * machoread.c (macho_add_oso_symfile): Change abfd to
14765         gdb_bfd_ref_ptr.
14766         (macho_symfile_read_all_oso): Update.
14767         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14768         (macho_symfile_read): Update.
14769         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14770         (jit_bfd_try_read_symtab): Update.
14771         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14772         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14773         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14774         gdb_bfd_ref_ptr.
14775         (gdb_bfd_ref_policy): New struct.
14776         (gdb_bfd_ref_ptr): New typedef.
14777         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14778         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14779         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14780         gdb_bfd_ref_ptr.
14781         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14782         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14783         (gcore_command): Update.
14784         * exec.c (exec_file_attach): Update.
14785         * elfread.c (elf_symfile_read): Update.
14786         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14787         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14788         (open_and_init_dwo_file): Update.
14789         (open_dwp_file): Return gdb_bfd_ref_ptr.
14790         (open_and_init_dwp_file): Update.
14791         * corelow.c (core_open): Update.
14792         * compile/compile-object-load.c (compile_object_load): Update.
14793         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14794         * coffread.c (coff_symfile_read): Update.
14795         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14796         gdb_bfd_ref_ptr.  Rename.
14797         (dump_bfd_file, restore_command): Update.
14798         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14799         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14800         (find_separate_debug_file_by_buildid): Update.
14801
14802 2017-01-10  Tom Tromey  <tom@tromey.com>
14803
14804         * common/gdb_ref_ptr.h: New file.
14805         * python/py-ref.h (struct gdbpy_ref_policy): New.
14806         (gdbpy_ref): Now a typedef.
14807
14808 2017-01-10  Tom Tromey  <tom@tromey.com>
14809
14810         * utils.h (make_cleanup_htab_delete): Don't declare.
14811         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14812         Remove.
14813         * linespec.c (decode_compound_collector): Add constructor,
14814         destructor.
14815         (lookup_prefix_sym): Remove cleanup.
14816         (symtab_collector): Add constructor, destructor.
14817         (collect_symtabs_from_filename): Remove cleanup.
14818         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14819         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14820         Use htab_up.
14821         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14822         * dwarf2read.c (dw2_expand_symtabs_matching)
14823         (dw2_map_symbol_filenames, dwarf_decode_macros)
14824         (write_psymtabs_to_index): Use htab_up.
14825         * dwarf2loc.c (func_verify_no_selftailcall)
14826         (call_site_find_chain_1, func_verify_no_selftailcall)
14827         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14828         std::vector, gdb::unique_xmalloc_ptr.
14829         (call_sitep): Remove typedef.
14830         (dwarf2_locexpr_baton_eval): Remove unused variable.
14831
14832 2017-01-10  Tom Tromey  <tom@tromey.com>
14833
14834         * python/python-internal.h (make_cleanup_py_decref)
14835         (make_cleanup_py_xdecref): Don't declare.
14836         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14837         (py_xdecref, make_cleanup_py_xdecref): Remove.
14838
14839 2017-01-10  Tom Tromey  <tom@tromey.com>
14840
14841         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14842         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14843
14844 2017-01-10  Tom Tromey  <tom@tromey.com>
14845
14846         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14847
14848 2017-01-10  Tom Tromey  <tom@tromey.com>
14849
14850         * python/py-utils.c (unicode_to_encoded_string)
14851         (python_string_to_target_string)
14852         (python_string_to_target_python_string)
14853         (python_string_to_host_string, gdbpy_obj_to_string)
14854         (get_addr_from_python): Use gdbpy_ref.
14855
14856 2017-01-10  Tom Tromey  <tom@tromey.com>
14857
14858         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14859         gdbpy_ref.
14860
14861 2017-01-10  Tom Tromey  <tom@tromey.com>
14862
14863         * python/python.c (eval_python_command, gdbpy_decode_line)
14864         (gdbpy_run_events, gdbpy_start_type_printers)
14865         (gdbpy_apply_type_printers): Use gdbpy_ref.
14866
14867 2017-01-10  Tom Tromey  <tom@tromey.com>
14868
14869         * python/py-param.c (get_doc_string, compute_enum_values): Use
14870         gdbpy_ref.
14871
14872 2017-01-10  Tom Tromey  <tom@tromey.com>
14873
14874         * python/py-inferior.c (find_thread_object, build_inferior_list):
14875         Use gdbpy_ref.
14876
14877 2017-01-10  Tom Tromey  <tom@tromey.com>
14878
14879         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14880
14881 2017-01-10  Tom Tromey  <tom@tromey.com>
14882
14883         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14884         gdbpy_ref.
14885
14886 2017-01-10  Tom Tromey  <tom@tromey.com>
14887
14888         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14889         extra incref.
14890         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14891         Use gdbpy_ref.
14892
14893 2017-01-10  Tom Tromey  <tom@tromey.com>
14894
14895         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14896         gdbpy_ref.
14897
14898 2017-01-10  Tom Tromey  <tom@tromey.com>
14899
14900         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14901         decref results of PyArg_ParseTupleAndKeywords.
14902
14903 2017-01-10  Tom Tromey  <tom@tromey.com>
14904
14905         * python/python.c (python_run_simple_file): Use
14906         unique_xmalloc_ptr, gdbpy_ref.
14907
14908 2017-01-10  Tom Tromey  <tom@tromey.com>
14909
14910         * python/py-prettyprint.c (print_stack_unless_memory_error)
14911         (print_string_repr, print_children): Use gdbpy_ref.
14912         (dummy_python_frame): New class.
14913         (dummy_python_frame::dummy_python_frame): Rename from
14914         push_dummy_python_frame.
14915         (py_restore_tstate): Remove.
14916
14917 2017-01-10  Tom Tromey  <tom@tromey.com>
14918
14919         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14920
14921 2017-01-10  Tom Tromey  <tom@tromey.com>
14922
14923         * python/python.c (ensure_python_env, restore_python_env):
14924         Remove.
14925         * python/python-internal.h (ensure_python_env): Don't declare.
14926         * varobj.h (varobj_ensure_python_env): Don't declare.
14927         * varobj.c (varobj_ensure_python_env): Remove.
14928
14929 2017-01-10  Tom Tromey  <tom@tromey.com>
14930
14931         * varobj.c (varobj_value_get_print_value): Use
14932         gdbpy_enter_varobj.
14933
14934 2017-01-10  Tom Tromey  <tom@tromey.com>
14935
14936         * python/py-prettyprint.c (print_string_repr, print_children):
14937         Update.
14938         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14939         of "encoding".
14940         * varobj.c (varobj_value_get_print_value): Update.
14941         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14942
14943 2017-01-10  Tom Tromey  <tom@tromey.com>
14944
14945         * varobj.c (varobj_get_display_hint)
14946         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14947         (varobj_set_visualizer, free_variable): Use
14948         gdbpy_enter_varobj.
14949
14950 2017-01-10  Tom Tromey  <tom@tromey.com>
14951
14952         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14953         (do_finish_initialization): New function.  Use gdbpy_ref.
14954         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14955         do_finish_initialization.
14956
14957 2017-01-10  Tom Tromey  <tom@tromey.com>
14958
14959         * python/py-param.c (get_set_value, get_show_value): Use
14960         gdbpy_enter, gdbpy_ref.
14961
14962 2017-01-10  Tom Tromey  <tom@tromey.com>
14963
14964         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14965
14966 2017-01-10  Tom Tromey  <tom@tromey.com>
14967
14968         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14969
14970 2017-01-10  Tom Tromey  <tom@tromey.com>
14971
14972         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14973         Use gdbpy_enter_varobj.
14974
14975 2017-01-10  Tom Tromey  <tom@tromey.com>
14976
14977         * varobj.c (gdbpy_enter_varobj): New constructor.
14978         * python/python-internal.h (gdbpy_enter_varobj): New class.
14979         * python/py-varobj.c (py_varobj_get_iterator): Use
14980         gdbpy_enter_varobj.
14981
14982 2017-01-10  Tom Tromey  <tom@tromey.com>
14983
14984         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14985         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14986         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14987         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14988         unique_xmalloc_ptr.
14989         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14990
14991 2017-01-10  Tom Tromey  <tom@tromey.com>
14992
14993         * python/py-xmethods.c (invoke_match_method): Use
14994         gdbpy_ref.
14995
14996 2017-01-10  Tom Tromey  <tom@tromey.com>
14997
14998         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14999         gdbpy_enter, gdbpy_ref.
15000
15001 2017-01-10  Tom Tromey  <tom@tromey.com>
15002
15003         * python/python.c (python_interactive_command): Use gdbpy_enter.
15004
15005 2017-01-10  Tom Tromey  <tom@tromey.com>
15006
15007         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15008         gdbpy_ref.
15009
15010 2017-01-10  Tom Tromey  <tom@tromey.com>
15011
15012         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15013         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15014
15015 2017-01-10  Tom Tromey  <tom@tromey.com>
15016
15017         * utils.h (htab_deleter): New struct.
15018         (htab_up): New typedef.
15019         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15020         gdbpy_enter, gdbpy_ref, htab_up.
15021
15022 2017-01-10  Tom Tromey  <tom@tromey.com>
15023
15024         * python/py-unwind.c (pending_frame_invalidate): Remove.
15025         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15026
15027 2017-01-10  Tom Tromey  <tom@tromey.com>
15028
15029         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15030         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15031
15032 2017-01-10  Tom Tromey  <tom@tromey.com>
15033
15034         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15035
15036 2017-01-10  Tom Tromey  <tom@tromey.com>
15037
15038         * python/python.c (gdbpy_eval_from_control_command)
15039         (gdbpy_source_script, gdbpy_run_events)
15040         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15041         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15042         gdbpy_enter.
15043
15044 2017-01-10  Tom Tromey  <tom@tromey.com>
15045
15046         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15047
15048 2017-01-10  Tom Tromey  <tom@tromey.com>
15049
15050         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15051
15052 2017-01-10  Tom Tromey  <tom@tromey.com>
15053
15054         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15055         (python_on_inferior_call_pre, python_on_inferior_call_post)
15056         (python_on_memory_change, python_on_register_change)
15057         (python_inferior_exit, python_new_objfile, add_thread_object)
15058         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15059
15060 2017-01-10  Tom Tromey  <tom@tromey.com>
15061
15062         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15063         (bpfinishpy_handle_exit): Use gdbpy_enter.
15064
15065 2017-01-10  Tom Tromey  <tom@tromey.com>
15066
15067         * python/py-cmd.c (cmdpy_destroyer)
15068         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15069         gdbpy_enter.
15070
15071 2017-01-10  Tom Tromey  <tom@tromey.com>
15072
15073         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15074         gdbpy_enter.
15075         (gdbpy_breakpoint_has_cond): Likewise.
15076
15077 2017-01-10  Tom Tromey  <tom@tromey.com>
15078
15079         * python/python.c (gdbpy_enter): New constructor.
15080         (~gdbpy_enter): New destructor.
15081         (restore_python_env, ensure_python_env): Rewrite.
15082         * python/python-internal.h (gdbpy_enter): New class.
15083
15084 2017-01-10  Tom Tromey  <tom@tromey.com>
15085
15086         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15087
15088 2017-01-10  Tom Tromey  <tom@tromey.com>
15089
15090         * python/py-value.c (value_has_field, get_field_flag)
15091         (get_field_type, valpy_getitem, convert_value_from_python): Use
15092         gdbpy_ref.
15093
15094 2017-01-10  Tom Tromey  <tom@tromey.com>
15095
15096         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15097         gdbpy_ref.
15098
15099 2017-01-10  Tom Tromey  <tom@tromey.com>
15100
15101         * python/py-prettyprint.c (search_pp_list)
15102         (find_pretty_printer_from_objfiles)
15103         (find_pretty_printer_from_progspace)
15104         (find_pretty_printer_from_gdb, find_pretty_printer)
15105         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15106         gdbpy_ref.
15107
15108 2017-01-10  Tom Tromey  <tom@tromey.com>
15109
15110         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15111
15112 2017-01-10  Tom Tromey  <tom@tromey.com>
15113
15114         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15115         (ltpy_get_all_source_lines): Use gdbpy_ref.
15116
15117 2017-01-10  Tom Tromey  <tom@tromey.com>
15118
15119         * python/py-framefilter.c (extract_sym, extract_value)
15120         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15121         gdbpy_ref.
15122
15123 2017-01-10  Tom Tromey  <tom@tromey.com>
15124
15125         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15126
15127 2017-01-10  Tom Tromey  <tom@tromey.com>
15128
15129         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15130
15131 2017-01-10  Tom Tromey  <tom@tromey.com>
15132
15133         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15134         gdbpy_ref.
15135
15136 2017-01-10  Tom Tromey  <tom@tromey.com>
15137
15138         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15139
15140 2017-01-10  Tom Tromey  <tom@tromey.com>
15141
15142         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15143         (typy_range): Use gdbpy_ref.
15144
15145 2017-01-10  Tom Tromey  <tom@tromey.com>
15146
15147         * python/py-threadevent.c (create_thread_event_object): Use
15148         gdbpy_ref.
15149         * python/py-stopevent.c (create_stop_event_object): Simplify.
15150         (emit_stop_event): Use gdbpy_ref.
15151         * python/py-signalevent.c (create_signal_event_object): Use
15152         gdbpy_ref.
15153         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15154         (emit_new_objfile_event, create_clear_objfiles_event_object)
15155         (emit_clear_objfiles_event): Use gdbpy_ref.
15156         * python/py-infevents.c (create_inferior_call_event_object)
15157         (create_register_changed_event_object)
15158         (create_memory_changed_event_object, emit_inferior_call_event)
15159         (emit_memory_changed_event, emit_register_changed_event): Use
15160         gdbpy_ref.
15161         * python/py-exitedevent.c (create_exited_event_object)
15162         (emit_exited_event): Use gdbpy_ref.
15163         * python/py-event.h (evpy_emit_event): Remove
15164         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15165         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15166         * python/py-continueevent.c (emit_continue_event): Use
15167         gdbpy_ref.
15168         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15169         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15170         gdbpy_ref.
15171         * python/py-bpevent.c (create_breakpoint_event_object): Use
15172         gdbpy_ref.
15173
15174 2017-01-10  Tom Tromey  <tom@tromey.com>
15175
15176         * python/py-ref.h: New file.
15177
15178 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15179
15180         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15181         void.
15182         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15183         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15184         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15185         * ui-out.c (ui_out::redirect): Likewise.
15186         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15187         * cli/cli-logging.c (set_logging_redirect): Update call site of
15188         ui_out::redirect.
15189         (handle_redirections): Likewise.
15190         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15191         * top.c (execute_command_to_string): Likewise.
15192         * utils.c (do_ui_out_redirect_pop): Likewise.
15193
15194 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15195
15196         * stack.c (_initialize_stack): Update "frame" command help message.
15197
15198 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15199
15200         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15201
15202 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15203
15204         * x86-linux-nat.h: Include gdb_proc_service.h.
15205
15206 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15207
15208         * ser-base.h: Include serial.h.
15209
15210 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15211
15212         * ppc-linux-tdep.h: Include ppc-tdep.h.
15213
15214 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15215
15216         * nat/amd64-linux-siginfo.h: Include signal.h.
15217
15218 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15219
15220         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15221
15222 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15223
15224         * mi/mi-parse.h: Include mi-cmds.h.
15225
15226 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15227
15228         * inf-loop.c: Don't include "target.h".
15229         * inf-loop.h: Include it here.
15230
15231 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15232
15233         * dfp.h: Include "dboulest.h" and "expression.h".
15234
15235 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15236
15237         * ax-gdb.h: Include "ax.h".
15238
15239 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15240
15241         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15242         with nat/gdb_ptrace.h.
15243
15244 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15245
15246         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15247         new line.
15248         (mips64_fbsd_sigframe_init): Likewise.
15249
15250 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15251
15252         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15253         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15254
15255 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15256
15257         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15258         * NEWS: Mention new FreeBSD/mips native configuration.
15259         * config/mips/fbsd.mh: New file.
15260         * configure.host: Add mips*-*-freebsd*.
15261         * mips-fbsd-nat.c: New file.
15262
15263 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15264
15265         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15266         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15267         * NEWS: Mention new FreeBSD/mips target.
15268         * configure.tgt: Add mips*-*-freebsd*.
15269         * mips-fbsd-tdep.c: New file.
15270         * mips-fbsd-tdep.h: New file.
15271
15272 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15273
15274         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15275         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15276
15277 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15278
15279         Update copyright year range in all GDB files.
15280
15281 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15282
15283         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15284
15285 For older changes see ChangeLog-2016.
15286 \f
15287 Local Variables:
15288 mode: change-log
15289 left-margin: 8
15290 fill-column: 74
15291 version-control: never
15292 coding: utf-8
15293 End: