Constify add_setshow_*
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-07 Tom Tromey <tom@tromey.com>
2
3 * ada-lang.c (catch_ada_exception_command): Constify.
4 (catch_assert_command): Constify.
5 * break-catch-throw.c (catch_catch_command, catch_throw_command)
6 (catch_rethrow_command): Constify.
7 (catch_exception_command_1): Constify.
8 * breakpoint.h (add_catch_command): Constify.
9 * break-catch-syscall.c (catch_syscall_command_1): Constify.
10 (catch_syscall_split_args): Constify.
11 * break-catch-sig.c (catch_signal_command): Constify.
12 (catch_signal_split_args): Constify.
13 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
14 cmd_const_sfunc_ftype.
15 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
16 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
17 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
18 (add_setshow_string_cmd, struct cmd_list_element)
19 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
20 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
21 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
22 Constify.
23 (set_cmd_sfunc): Constify.
24 (empty_sfunc): Constify.
25 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
26 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
27 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
28 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
29 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
30 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
31 Constify.
32 (set_cmd_sfunc): Constify.
33 (cmd_sfunc_ftype): Remove.
34 * compile/compile.c (set_compile_args): Constify.
35 * infrun.c (set_disable_randomization): Constify.
36 * infcmd.c (set_args_command, set_cwd_command): Constify.
37 * breakpoint.c (set_condition_evaluation_mode): Constify.
38 (add_catch_command): Constify.
39 (catch_fork_command_1, catch_exec_command_1)
40 (catch_load_command_1, catch_unload_command_1): Constify.
41 (catch_load_or_unload): Constify.
42 * guile/scm-param.c (pascm_set_func): Constify.
43 (add_setshow_generic): Constify.
44 * python/py-param.c (get_set_value): Constify.
45 * top.h (set_verbose): Constify.
46 * tui/tui-win.c (tui_set_var_cmd): Constify.
47 * mi/mi-main.c (set_mi_async_command): Constify.
48 * cli/cli-logging.c (set_logging_overwrite)
49 (set_logging_redirect): Constify.
50 * value.c (set_max_value_size): Constify.
51 * valprint.c (set_input_radix, set_output_radix): Constify.
52 * utils.c (set_width_command, set_height_command): Constify.
53 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
54 * tracepoint.c (set_disconnected_tracing)
55 (set_circular_trace_buffer, set_trace_buffer_size)
56 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
57 * top.c (set_history_size_command, set_verbose, set_editing)
58 (set_gdb_datadir, set_history_filename): Constify.
59 * target.c (set_targetdebug, maint_set_target_async_command)
60 (maint_set_target_non_stop_command, set_target_permissions)
61 (set_write_memory_permission): Constify.
62 (open_target): Constify.
63 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
64 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
65 * symtab.c (set_symbol_cache_size_handler): Constify.
66 * symfile.c (set_ext_lang_command): Constify.
67 * symfile-debug.c (set_debug_symfile): Constify.
68 * source.c (set_directories_command): Constify.
69 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
70 * serial.c (set_parity): Constify.
71 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
72 * remote.c (set_remote_exec_file, set_remotebreak)
73 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
74 * record.c (set_record_insn_history_size)
75 (set_record_call_history_size): Constify.
76 * record-full.c (set_record_full_insn_max_num): Constify.
77 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
78 * osabi.c (set_osabi): Constify.
79 * mips-tdep.c (set_mips64_transfers_32bit_regs)
80 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
81 * maint.c (maintenance_set_profile_cmd): Constify.
82 * linux-thread-db.c (set_libthread_db_search_path): Constify.
83 * language.c (set_language_command, set_range_command)
84 (set_case_command): Constify.
85 * infrun.c (set_non_stop, set_observer_mode)
86 (set_stop_on_solib_events, set_schedlock_func)
87 (set_exec_direction_func): Constify.
88 * infcmd.c (set_inferior_tty_command): Constify.
89 * disasm.c (set_disassembler_options_sfunc): Constify.
90 * demangle.c (set_demangling_command): Constify.
91 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
92 * cris-tdep.c (set_cris_version, set_cris_mode)
93 (set_cris_dwarf2_cfi): Constify.
94 * corefile.c (set_gnutarget_command): Constify.
95 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
96 (set_target_wide_charset_sfunc): Constify.
97 * breakpoint.c (update_dprintf_commands): Constify.
98 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
99 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
100 (set_disassembly_style_sfunc): Constify.
101 * arch-utils.c (set_endian, set_architecture): Constify.
102 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
103 * agent.c (set_can_use_agent): Constify.
104
105 2017-11-07 Tom Tromey <tom@tromey.com>
106
107 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
108 (go32_pde, go32_pte, go32_pte_for_address): Constify.
109 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
110 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
111 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
112 (parse_int_arg, show_thread_default_detach_sc_cmd)
113 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
114 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
115 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
116 (show_task_pause_cmd, set_task_detach_sc_cmd)
117 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
118 (set_noninvasive_cmd, set_thread_pause_cmd)
119 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
120 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
121 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
122 * windows-nat.c (display_selectors): Constify.
123 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
124 non-const "cfunc".
125 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
126 (cmd_cfunc_eq): Likewise.
127 (struct cmd_list_element): Likewise.
128 (do_cfunc): Remove.
129 (cli_user_command_p): Update.
130 * command.h (add_cmd): Remove non-const overload.
131 (cmd_cfunc_ftype): Remove typedef.
132 (cmd_cfunc_eq): Remove non-const overload.
133 * value.c (show_values): Constify.
134 * thread.c (thread_apply_all_command): Constify.
135 * symfile.c (load_command): Constify.
136 * source.c (directory_command): Constify.
137 * maint.c (maintenance_internal_error)
138 (maintenance_demangler_warning, maintenance_space_display)
139 (maintenance_print_architecture, maintenance_translate_address)
140 (maintenance_info_selftests, maintenance_internal_warning):
141 Constify.
142 * breakpoint.c (disable_trace_command, enable_trace_command):
143 Constify.
144 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
145 Constify.
146 (add_auto_load_safe_path): Constify.
147 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
148 * top.h (show_commands): Constify.
149 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
150 * sparc64-tdep.c (adi_examine_command): Constify.
151 (adi_assign_command): Constify.
152
153 2017-11-07 Tom Tromey <tom@tromey.com>
154
155 * frame.h (info_locals_command, info_args_command): Constify.
156 * auto-load.h (auto_load_info_scripts): Constify.
157 * inferior.h (registers_info): Constify.
158 * copying.c: Rebuild.
159 * copying.awk: Constify generated commands.
160 * auto-load.c (auto_load_info_scripts)
161 (info_auto_load_gdb_scripts): Constify.
162 * cli/cli-decode.c (struct cmd_list_element): Take a
163 cmd_const_cfunc_ftype.
164 * command.h (add_info): Take a cmd_const_cfunc_ftype.
165 * tui/tui-win.c (tui_all_windows_info): Constify.
166 * python/py-auto-load.c (info_auto_load_python_scripts):
167 Constify.
168 * cli/cli-cmds.c (show_command): Remove non-const overload.
169 * tracepoint.c (info_tvariables_command, info_scope_command):
170 Constify.
171 (info_static_tracepoint_markers_command): Constify.
172 * thread.c (info_threads_command): Constify.
173 (print_thread_info_1): Constify.
174 * target.c (info_target_command): Constify.
175 * symtab.c (info_sources_command, info_functions_command)
176 (info_types_command): Constify.
177 (info_variables_command): Remove non-const overload.
178 * symfile.c (info_ext_lang_command): Constify.
179 * stack.c (info_frame_command, info_locals_command)
180 (info_args_command): Constify.
181 (backtrace_command): Remove non-const overload.
182 * source.c (info_source_command, info_line_command): Constify.
183 * solib.c (info_sharedlibrary_command): Constify.
184 * skip.c (info_skip_command): Constify.
185 * ser-go32.c (info_serial_command): Constify.
186 * reverse.c (info_bookmarks_command): Constify.
187 * printcmd.c (info_symbol_command, info_address_command)
188 (info_display_command): Constify.
189 * osdata.c (info_osdata_command): Constify.
190 * objc-lang.c (info_selectors_command, info_classes_command):
191 Constify.
192 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
193 * memattr.c (info_mem_command): Constify.
194 * macrocmd.c (info_macro_command, info_macros_command): Constify.
195 * linux-fork.c (info_checkpoints_command): Constify.
196 * infrun.c (info_signals_command): Constify.
197 * inflow.c (info_terminal_command): Constify.
198 * inferior.c (info_inferiors_command): Constify.
199 (print_inferior): Constify.
200 * infcmd.c (info_program_command, info_all_registers_command)
201 (info_registers_command, info_vector_command)
202 (info_float_command): Constify.
203 (registers_info): Constify.
204 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
205 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
206 Constify.
207 * f-valprint.c (info_common_command): Constify.
208 * dcache.c (info_dcache_command): Constify.
209 (dcache_info_1): Constify.
210 * darwin-nat-info.c (info_mach_tasks_command)
211 (info_mach_task_command, info_mach_ports_command)
212 (info_mach_port_command, info_mach_threads_command)
213 (info_mach_thread_command, info_mach_regions_command)
214 (info_mach_regions_recurse_command, info_mach_region_command)
215 (info_mach_exceptions_command): Constify.
216 (get_task_from_args): Constify.
217 * cp-support.c (info_vtbl_command): Constify.
218 * breakpoint.c (info_watchpoints_command)
219 (info_tracepoints_command): Constify.
220 (info_breakpoints_command): Remove non-const overload.
221 * avr-tdep.c (avr_io_reg_read_command): Constify.
222 * auxv.c (info_auxv_command): Constify.
223 * ada-tasks.c (info_tasks_command): Constify.
224 (info_task): Constify.
225 * ada-lang.c (info_exceptions_command): Constify.
226
227 2017-11-07 Tom Tromey <tom@tromey.com>
228
229 * solib.h (no_shared_libraries): Constify.
230 * frame.h (return_command): Constify.
231 * cli/cli-cmds.h (quit_command): Constify.
232 * top.h (quit_command, execute_command): Constify.
233 * target.h (flash_erase_command): Constify.
234 * inferior.h (set_inferior_args, attach_command): Constify.
235 * tracepoint.h (start_tracing, stop_tracing): Constify.
236 * breakpoint.h (break_command, tbreak_command)
237 (hbreak_command_wrapper, thbreak_command_wrapper)
238 (rbreak_command_wrapper, watch_command_wrapper)
239 (awatch_command_wrapper, rwatch_command_wrapper)
240 (get_tracepoint_by_number): Constify.
241 * symtab.c (info_variables_command, rbreak_command)
242 (symtab_symbol_info): Constify.
243 (info_variables_command): Add non-const overload.
244 * top.c (dont_repeat_command): Constify.
245 * breakpoint.c (ignore_command, commands_command)
246 (condition_command, tbreak_command, hbreak_command)
247 (thbreak_command, clear_command, break_command)
248 (info_breakpoints_command, watch_command, rwatch_command)
249 (awatch_command, trace_command, ftrace_command, strace_command)
250 (trace_pass_command, break_range_command, dprintf_command)
251 (agent_printf_command, get_tracepoint_by_number)
252 (watch_maybe_just_location, trace_pass_command): Constify.
253 (info_breakpoints_command): Add non-const overload.
254 * tracefile.c (tsave_command): Constify.
255 * infcmd.c (attach_command, disconnect_command, signal_command)
256 (queue_signal_command, stepi_command, nexti_command)
257 (finish_command, next_command, step_command, until_command)
258 (advance_command, jump_command, continue_command, run_command)
259 (start_command, starti_command, interrupt_command)
260 (run_command_1, set_inferior_args, step_1): Constify.
261 * inferior.c (add_inferior_command, remove_inferior_command)
262 (clone_inferior_command): Constify.
263 * linux-fork.c (checkpoint_command, restart_command): Constify.
264 * windows-nat.c (signal_event_command): Constify.
265 * guile/guile.c (guile_repl_command, guile_command): Constify.
266 * printcmd.c (x_command, display_command, printf_command)
267 (output_command, set_command, call_command, print_command)
268 (eval_command): Constify.
269 (non_const_set_command): Remove.
270 (_initialize_printcmd): Update.
271 * source.c (forward_search_command, reverse_search_command):
272 Constify.
273 * jit.c (jit_reader_load_command, jit_reader_unload_command):
274 Constify.
275 * infrun.c (handle_command): Constify.
276 * memattr.c (mem_command): Constify.
277 * stack.c (return_command, up_command, up_silently_command)
278 (down_command, down_silently_command, frame_command)
279 (backtrace_command, func_command, backtrace_command_1): Constify.
280 (backtrace_command): Add non-const overload.
281 * remote-sim.c (simulator_command): Constify.
282 * exec.c (set_section_command): Constify.
283 * tracepoint.c (tdump_command, trace_variable_command)
284 (tstatus_command, tstop_command, tstart_command)
285 (end_actions_pseudocommand, while_stepping_pseudocommand)
286 (collect_pseudocommand, teval_pseudocommand, actions_command)
287 (start_tracing, stop_tracing): Constify.
288 * value.c (init_if_undefined_command): Constify.
289 * tui/tui-stack.c (tui_update_command): Constify.
290 * tui/tui-win.c (tui_refresh_all_command)
291 (tui_set_tab_width_command, tui_set_win_height_command)
292 (tui_set_focus_command, tui_scroll_forward_command)
293 (tui_scroll_backward_command, tui_scroll_left_command)
294 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
295 (tui_set_win_height): Constify.
296 * tui/tui-layout.c (tui_layout_command): Constify.
297 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
298 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
299 (proc_untrace_sysexit_cmd): Constify.
300 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
301 (threadset_test_cmd, threadlist_update_test_cmd)
302 (threadalive_test): Constify.
303 * objc-lang.c (print_object_command): Constify.
304 * command.h (add_com): Constify.
305 * cli/cli-dump.c (restore_command): Constify.
306 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
307 (help_command, complete_command, shell_command, edit_command)
308 (list_command, disassemble_command, make_command)
309 (apropos_command, alias_command): Constify.
310 * cli/cli-script.c (document_command, define_command)
311 (while_command, if_command, validate_comname): Constify.
312 * cli/cli-decode.c (struct cmd_list_element): Change type of
313 "fun".
314 * target.c (do_monitor_command, flash_erase_command): Constify.
315 * regcache.c (reg_flush_command): Constify.
316 * reverse.c (reverse_step, reverse_next, reverse_stepi)
317 (reverse_nexti, reverse_continue, reverse_finish)
318 (save_bookmark_command, goto_bookmark_command)
319 (exec_reverse_once): Constify.
320 * python/python.c (python_interactive_command, python_command):
321 Constify.
322 * typeprint.c (ptype_command, whatis_command, whatis_exp):
323 Constify.
324 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
325 * gcore.c (gcore_command): Constify.
326
327 2017-11-07 Tom Tromey <tom@tromey.com>
328
329 * printcmd.c (x_command): Call set_repeat_arguments.
330 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
331 * top.c (repeat_arguments): New global.
332 (set_repeat_arguments): New function.
333 (execute_command): Handle repeat_arguments.
334 (show_commands): Calls set_repeat_arguments.
335 * command.h (set_repeat_arguments): Declare.
336
337 2017-11-07 Tom Tromey <tom@tromey.com>
338
339 * stack.c (backtrace_command): Use std::string.
340 (backtrace_command_1): Make "count_exp" const.
341
342 2017-11-07 Tom Tromey <tom@tromey.com>
343
344 * source.c (directory_switch, mod_path, add_path): Constify.
345 * defs.h (add_path, mod_path, directory_switch): Constify.
346 * mi/mi-cmd-env.c (env_mod_path): Constify.
347
348 2017-11-07 Tom Tromey <tom@tromey.com>
349
350 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
351 (run_command_1, continue_command, step_1, jump_command)
352 (signal_command, until_command, advance_command, finish_command)
353 (attach_command): Update.
354
355 2017-11-07 Tom Tromey <tom@tromey.com>
356
357 * command.h (set_cmd_cfunc): Don't declare.
358 * cli/cli-decode.c (set_cmd_cfunc): Now static.
359
360 2017-11-07 Tom Tromey <tom@tromey.com>
361
362 * stack.c (select_frame_command): Constify.
363 * cli/cli-decode.c (add_com_suppress_notification): Constify.
364 * command.h (add_com_suppress_notification): Constify.
365
366 2017-11-07 Tom Tromey <tom@tromey.com>
367
368 * breakpoint.c (stop_command): Constify.
369 * cli/cli-decode.c (struct cmd_list_element): Constify.
370 * command.h (add_abbrev_prefix_cmd): Constify.
371
372 2017-11-07 Pedro Alves <palves@redhat.com>
373
374 * breakpoint.c (extract_bp_kind): New enum.
375 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
376 factored out from ...
377 (extract_bp_number_and_location): ... here.
378 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
379
380 2017-11-07 Pedro Alves <palves@redhat.com>
381
382 * breakpoint.c (extract_bp_number_and_location): Change return
383 type to void. Throw error instead of warning.
384 (enable_disable_command): Adjust.
385
386 2017-11-07 Xavier Roirand <roirand@adacore.com>
387 Pedro Alves <palves@redhat.com>
388
389 * breakpoint.c (map_breakpoint_number_range): New, factored out
390 from ...
391 (map_breakpoint_numbers): ... here.
392 (find_location_by_number): Change parameters from string to
393 breakpoint number and location.
394 (extract_bp_number_and_location): New function.
395 (enable_disable_bp_num_loc)
396 (enable_disable_breakpoint_location_range)
397 (enable_disable_command): New functions, factored out ...
398 (enable_command, disable_command): ... these functions, and
399 adjusted to support ranges.
400 * NEWS: Document enable/disable breakpoint location range feature.
401
402 2017-11-06 Luis Machado <luis.machado@linaro.org>
403
404 * MAINTAINERS (Write After Approval): Update my e-mail address.
405
406 2017-11-06 Pedro Alves <palves@redhat.com>
407
408 * gnu-nat.c (gnu_terminal_init): Delete.
409 (gnu_target): Don't install gnu_terminal_init.
410 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
411 (child_terminal_init): ... this function.
412
413 2017-11-06 Pedro Alves <palves@redhat.com>
414
415 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
416 sgtty.h.
417 * config.in, configure: Regenerate.
418
419 2017-11-06 Pedro Alves <palves@redhat.com>
420
421 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
422 (async_init_signals): Adjust.
423 (handle_stop_sig): Rename to ...
424 (handle_sigtstp): ... this.
425 (async_stop_sig): Rename to ...
426 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
427 SIGTSTP path.
428 * event-top.h: Move signal.h include to the top. Check SIGTSTP
429 instead of STOP_SIGNAL thoughout.
430 (handle_stop_sig): Rename to ...
431 (handle_sigtstp): ... this.
432 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
433
434 2017-11-06 Pedro Alves <palves@redhat.com>
435
436 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
437 longer set flags twice in row.
438
439 2017-11-06 Pedro Alves <palves@redhat.com>
440
441 * Makefile.in (SER_HARDWIRE): Update comment.
442 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
443 * common/gdb_termios.h: Delete file.
444 * common/job-control.c: Include termios.h and unistd.h instead of
445 gdb_termios.h.
446 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
447 check.
448 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
449 Remove sgtty code.
450 * configure.ac: No longer check for termio.h and sgtty.h.
451 * configure: Regenerate.
452 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
453 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
454 Replace PROCESS_GROUP_TYPE references with pid_t references
455 throughout.
456 (gdb_getpgrp): Delete.
457 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
458 (child_terminal_inferior): Remove comment. Remove sgtty code.
459 (child_terminal_ours_1): Use tcgetpgrp directly instead of
460 gdb_getpgrp. Use serial_set_tty_state instead aof
461 serial_noflush_set_tty_state. Remove sgtty code.
462 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
463 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
464 (inferior_process_group): Now returns pid_t.
465 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
466 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
467 * ser-event.c (serial_event_ops): Update.
468 * ser-go32.c (dos_noflush_set_tty_state): Delete.
469 (dos_ops): Update.
470 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
471 * ser-pipe.c (pipe_ops): Update.
472 * ser-tcp.c (tcp_ops): Update.
473 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
474 HAVE_TERMIOS checks.
475 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
476 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
477 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
478 assume termios.
479 (hardwire_noflush_set_tty_state): Delete.
480 (hardwire_print_tty_state, hardwire_drain_output)
481 (hardwire_flush_output, hardwire_flush_input)
482 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
483 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
484 code, and assume termios.
485 (hardwire_ops): Update.
486 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
487 * serial.c (serial_noflush_set_tty_state): Delete.
488 * serial.h (serial_noflush_set_tty_state): Delete.
489 (serial_ops::noflush_set_tty_state): Delete.
490
491 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
492
493 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
494 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
495 (COMMON_OBS): Remove doublest.o and dfp.o.
496 Do not build target-float.c (instead of doublest.c)
497 with -Wformat-nonliteral.
498
499 * doublest.c: Remove file.
500 * doublest.h: Remove file.
501 * dfp.c: Remove file.
502 * dfp.h: Remove file.
503
504 * target-float.c: Do not include "doublest.h" and "dfp.h".
505 (DOUBLEST): Move here from doublest.h.
506 (enum float_kind): Likewise.
507 (FLOATFORMAT_CHAR_BIT): Likewise.
508 (FLOATFORMAT_LARGEST_BYTES): Likewise.
509 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
510 (floatformat_precision): Likewise.
511 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
512 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
513 Likewise.
514 (host_float_format, host_double_format, host_long_double_format):
515 Likewise.
516 (floatformat_to_string, floatformat_from_string): Likewise.
517 (floatformat_to_doublest): Likewise. Also, inline the original
518 convert_floatformat_to_doublest.
519 (floatformat_from_doublest): Likewise. Also, inline the original
520 convert_floatformat_from_doublest.
521
522 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
523 (MAX_DECIMAL_STRING): Move here from dfp.c.
524 (match_endianness): Likewise.
525 (set_decnumber_context, decimal_check_errors): Likewise.
526 (decimal_from_number, decimal_to_number): Likewise.
527 (decimal_to_string, decimal_from_string): Likewise. Make static.
528 (decimal_from_longest, decimal_from_ulongest): Likewise.
529 (decimal_to_longest): Likewise.
530 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
531 (decimal_convert): Likewise.
532
533 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
534
535 * doublest.c: Do not include "gdbtypes.h".
536 (extract_typed_floating): Remove.
537 (store_typed_floating): Remove.
538 (convert_typed_floating): Remove.
539 * doublest.h (struct type): Remove.
540 (DOUBLEST_PRINT_FORMAT): Remove.
541 (DOUBLEST_SCAN_FORMAT): Remove.
542 (extract_typed_floating): Remove.
543 (store_typed_floating): Remove.
544 (convert_typed_floating): Remove.
545
546 * dfp.c (decimal_from_doublest): Remove.
547 (decimal_to_doublest): Remove.
548 * dfp.h: Do not include "doublest.h".
549 (decimal_from_doublest): Remove.
550 (decimal_to_doublest): Remove.
551
552 * value.c: Do not include "doublest.h" and "dfp.h".
553 (value_as_double): Remove.
554 (unpack_double): Remove.
555 (value_from_double): Remove.
556 (value_from_decfloat): Remove.
557 * value.h: Do not include "doublest.h".
558 (value_as_double): Remove.
559 (unpack_double): Remove.
560 (value_from_double): Remove.
561 (value_from_decfloat): Remove.
562
563 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
564
565 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
566 (i386_extract_return_value): Use target_float_convert.
567 (i386_store_return_value): Likewise.
568 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
569 (i387_value_to_register): Likewise.
570 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
571 (ia64_register_to_value): Use target_float_convert.
572 (ia64_value_to_register): Likewise.
573 (ia64_extract_return_value): Likewise.
574 (ia64_store_return_value): Likewise.
575 (ia64_push_dummy_call): Likewise.
576 * m68k-tdep.c: Include "target-float.h".
577 (m68k_register_to_value): Use target_float_convert.
578 (m68k_value_to_register): Likewise.
579 (m68k_svr4_extract_return_value): Likewise.
580 (m68k_svr4_store_return_value): Likewise.
581 * ppc-sysv-tdep.c: Include "target-float.h".
582 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
583 (do_ppc_sysv_return_value): Likewise.
584 (ppc64_sysv_abi_push_freg): Likewise.
585 (ppc64_sysv_abi_return_value_base): Likewise.
586 * rs6000-aix-tdep.c: Include "target-float.h".
587 (rs6000_push_dummy_call): Use target_float_convert.
588 (rs6000_return_value): Likewise.
589 * rs6000-lynx178-tdep.c: Include "target-float.h".
590 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
591 (rs6000_lynx178_return_value): Likewise.
592 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
593 (rs6000_register_to_value): Use target_float_convert.
594 (rs6000_value_to_register): Likewise.
595 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
596 (arm_extract_return_value): Use target_float_convert.
597 (arm_store_return_value): Likewise.
598 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
599 (sh_register_convert_to_virtual): Use target_float_convert.
600 (sh_register_convert_to_raw): Likewise.
601 * sh64-tdep.c: Include "target-float.h".
602 (sh64_extract_return_value): Use target_float_convert.
603 (sh64_register_convert_to_virtual): Likewise.
604 (sh64_register_convert_to_raw): Likewise. Fix argument types.
605
606 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
607
608 * target-float.c (floatformat_to_host_double): New function.
609 (floatformat_from_host_double): Likewise.
610 (target_float_to_host_double): Likewise.
611 (target_float_from_host_double): Likewise.
612 * target-float.h (target_float_to_host_double): Add prototype.
613 (target_float_from_host_double): Likewise.
614
615 * guile/scm-value.c: Include "target-float.h".
616 (gdbscm_value_to_real): Use target_float_to_host_double.
617 Handle integer source values via value_as_long.
618 * guile/scm-math.c: Include "target-float.h". Do not include
619 "doublest.h", "dfp.h", and "expression.h".
620 (vlscm_convert_typed_number): Use target_float_from_host_double.
621 (vlscm_convert_number): Likewise.
622
623 * python/py-value.c (valpy_float): Use target_float_to_host_double.
624 (convert_value_from_python): Use target_float_from_host_double.
625
626 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
627
628 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
629 (cast_from_fixed): Likewise.
630 (ada_scaling_type): New function.
631 (ada_delta): Return value instead of DOUBLEST. Perform target
632 arithmetic instead of host arithmetic.
633 (scaling_factor): Rename to ...
634 (ada_scaling_factor) ... this. Make non-static. Return value instead
635 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
636 (ada_fixed_to_float): Remove.
637 (ada_float_to_fixed): Remove.
638 * ada-lang.h (ada_fixed_to_float): Remove.
639 (ada_float_to_fixed): Remove.
640 (ada_delta): Return value instead of DOUBLEST.
641 (ada_scaling_factor): Add prototype.
642
643 * ada-typeprint.c: Include "target-float.h".
644 (print_fixed_point_type): Perform target arithmetic instead of
645 host arithmetic.
646 * ada-valprint.c: Include "target-float.h".
647 (ada_val_print_num): Perform target arithmetic instead of
648 host arithmetic for fixed-point types.
649
650 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
651
652 * target-float.c: Include <math.h>.
653 (floatformat_binop): New function.
654 (floatformat_compare): Likewise.
655 (target_float_binop): Likewise.
656 (target_float_compare): Likewise.
657 * target-float.h: Include "expression.h".
658 (target_float_binop): Add prototype.
659 (target_float_compare): Likewise.
660
661 * valarith.c: Do not include "doublest.h" and "dfp.h".
662 Include "common/byte-vector.h".
663 (value_args_as_decimal): Remove, replace by ...
664 (value_args_as_target_float): ... this function. Handle both
665 binary and decimal target floating-point formats.
666 (scalar_binop): Handle both binary and decimal FP using
667 value_args_as_target_float and target_float_binop.
668 (value_equal): Handle both binary and decimal FP using
669 value_args_as_target_float and target_float_compare.
670 (value_less): Likewise.
671 (value_pos): Handle all scalar types as simple copy.
672 (value_neg): Handle all scalar types via BINOP_SUB from 0.
673 * dfp.c (decimal_binop): Throw error instead of internal_error
674 when called with an unsupported operation code.
675
676 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
677
678 * target-float.c (target_float_to_string): New function.
679 (target_float_from_string): New function.
680 * target-float.h (target_float_to_string): Add prototype.
681 (target_float_from_string): Add prototype.
682
683 * valprint.c: Include "target-float.h". Do not include
684 "doublest.h" and "dfp.h".
685 (print_floating): Use target_float_to_string.
686 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
687 (printf_floating): Use target_float_to_string.
688 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
689 (print_i387_value): Use target_float_to_string.
690 * mips-tdep.c: Include "target-float.h".
691 (mips_print_fp_register): Use target_float_to_string.
692 * sh64-tdep.c: Include "target-float.h".
693 (sh64_do_fp_register): Use target_float_to_string.
694
695 * parse.c: Include "target-float.h". Do not include
696 "doublest.h" and "dfp.h".
697 (parse_float): Use target_float_from_string.
698 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
699 (define_symbol): Use target_float_from_string.
700 * gdbarch-selftests.c: Include "target-float.h".
701 (register_to_value_test): Use target_float_from_string.
702
703 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
704
705 * Makefile.c (SFILES): Add target-float.c.
706 (HFILES_NO_SRCDIR): Add target-float.h.
707 (COMMON_OBS): Add target-float.o.
708 * target-float.h: New file.
709 * target-float.c: New file.
710
711 * doublest.c (floatformat_classify): Fix detection of float_zero.
712
713 * gdbtypes.c (is_floating_type): New function.
714 * gdbtypes.h (is_floating_type): Add prototype.
715
716 * value.c: Do not include "floatformat.h".
717 (unpack_double): Use target_float_is_valid.
718 (is_floating_value): New function.
719 * value.h (is_floating_value): Add prototype-
720
721 * valarith.c: Include "target-float.h".
722 (value_logical_not): Use target_float_is_zero.
723
724 * python/py-value.c: Include "target-float.h".
725 (valpy_nonzero): Use target_float_is_zero.
726
727 2017-11-04 Tom Tromey <tom@tromey.com>
728
729 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
730
731 2017-11-04 Tom Tromey <tom@tromey.com>
732
733 * breakpoint.c (set_momentary_breakpoint): Return
734 breakpoint_up.
735 (until_break_command): Update.
736 (new_until_break_fsm): Change argument types to
737 breakpoint_up.
738 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
739 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
740 Remove.
741 * infcmd.c (finish_forward): Update.
742 * breakpoint.h (set_momentary_breakpoint)
743 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
744 (make_cleanup_delete_breakpoint): Remove.
745 (struct breakpoint_deleter): New.
746 (breakpoint_up): New typedef.
747 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
748 (insert_exception_resume_breakpoint): Update.
749 (insert_exception_resume_from_probe): Update.
750 (insert_longjmp_resume_breakpoint): Update.
751 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
752 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
753 * infcall.c (call_function_by_hand_dummy): Update
754
755 2017-11-04 Tom Tromey <tom@tromey.com>
756
757 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
758
759 2017-11-04 Tom Tromey <tom@tromey.com>
760
761 * linux-tdep.c (linux_core_info_proc_mappings): Use
762 gdb::def_vector.
763 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
764 "size" argument.
765 (linux_corefile_thread): Update.
766 (linux_make_corefile_notes): Remove unused variable.
767
768 2017-11-04 Tom Tromey <tom@tromey.com>
769
770 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
771 gdb::byte_vector.
772
773 2017-11-04 Tom Tromey <tom@tromey.com>
774
775 * objfiles.c (do_free_objfile_cleanup): Remove.
776 * compile/compile-object-load.c (compile_object_load): Update.
777 * objfiles.h (make_cleanup_free_objfile): Remove.
778
779 2017-11-04 Tom Tromey <tom@tromey.com>
780
781 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
782 (adi_read_versions): Change "tags" to "gdb_byte *".
783 (adi_print_versions): Likewise.
784
785 2017-11-04 Tom Tromey <tom@tromey.com>
786
787 * breakpoint.c
788 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
789 from start_rbreak_breakpoints.
790 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
791 * breakpoint.h (class scoped_rbreak_breakpoints): New.
792 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
793 * symtab.c (do_end_rbreak_breakpoints): Remove.
794 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
795
796 2017-11-04 Tom Tromey <tom@tromey.com>
797
798 * cp-namespace.c (reset_directive_searched): Remove.
799 (cp_lookup_symbol_via_imports): Use scoped_restore.
800 * cp-support.c (reset_directive_searched): Remove.
801 (make_symbol_overload_list_using): Use scoped_restore.
802 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
803 (reset_directive_searched): Remove.
804
805 2017-11-04 Tom Tromey <tom@tromey.com>
806
807 * symfile.c (find_separate_debug_file_by_debuglink): Use
808 unique_xmalloc_ptr.
809
810 2017-11-04 Tom Tromey <tom@tromey.com>
811
812 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
813 type of "info".
814 (compute_stack_depth): Likewise.
815 (do_compile_dwarf_expr_to_c): Use std::vector.
816
817 2017-11-04 Tom Tromey <tom@tromey.com>
818
819 * compile/compile-object-load.c (link_callbacks_einfo): Use
820 std::string.
821
822 2017-11-04 Tom Tromey <tom@tromey.com>
823
824 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
825 Use scoped_free_pendings.
826 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
827 scoped_free_pendings.
828 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
829 (xcoff_initial_scan): Likewise.
830 * buildsym.c (reset_symtab_globals): Update comment.
831 (scoped_free_pendings): Rename from really_free_pendings.
832 (prepare_for_building): Update comment.
833 (buildsym_init): Likewise.
834 * buildsym.h (class scoped_free_pendings): New class.
835 (really_free_pendings): Don't declare.
836
837 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
838
839 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
840 output when converting a zero value to a special byteorder format.
841
842 2017-11-02 Yao Qi <yao.qi@linaro.org>
843
844 * frame.c (do_frame_register_read): Remove aspace.
845 * jit.c (jit_frame_sniffer): Likwise.
846 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
847 * regcache.c (regcache::regcache): Pass nullptr.
848 (regcache_print): Caller updated.
849 * regcache.h (regcache::regcache): Remove one constructor
850 parameter aspace.
851
852 2017-11-02 Yao Qi <yao.qi@linaro.org>
853
854 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
855
856 2017-11-02 Yao Qi <yao.qi@linaro.org>
857
858 * breakpoint.c (insert_single_step_breakpoints): Update.
859 * frame.c (struct frame_info) <aspace>: Add const.
860 (frame_save_as_regcache): Add const.
861 (get_frame_address_space): Return const address_space *.
862 * frame.h (get_frame_address_space): Update declaration.
863 * infrun.c (struct step_over_info) <aspace>: Add const.
864 (set_step_over_info): Make aspace const.
865 (displaced_step_prepare_throw): Change variable const.
866 (resume): Likewise.
867 (proceed): Likewise.
868 (adjust_pc_after_break): Likewise.
869 (save_waitstatus): Likewise.
870 (handle_signal_stop): Likewise.
871 (keep_going_pass_signal): Likewise.
872 * jit.c (jit_frame_sniffer): Add const.
873 * mips-tdep.c (mips_single_step_through_delay): Likewise.
874 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
875 * record-full.c (record_full_wait_1): Likewise.
876 * regcache.c (regcache::regcache): Change parameter to const.
877 * regcache.h (regcache::regcache): Likewise.
878 (regcache::aspace): Return const address_space *.
879 (regcache) <m_aspace>: Add const.
880
881 2017-11-02 Yao Qi <yao.qi@linaro.org>
882
883 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
884 * frame.c (create_sentinel_frame): Likewise.
885 * infrun.c (displaced_step_prepare_throw): Likewise.
886 (resume): Likewise.
887 (thread_still_needs_step_over_bp): Likewise.
888 (proceed): Likewise.
889 (do_target_wait): Likewise.
890 (adjust_pc_after_break): Likewise.
891 (handle_syscall_event): Likewise.
892 (save_waitstatus): Likewise.
893 (handle_inferior_event_1): Likewise.
894 (handle_signal_stop): Likewise.
895 (keep_going_pass_signal): Likewise.
896 * linux-nat.c (status_callback): Likewise.
897 (save_stop_reason): Likewise.
898 (resume_stopped_resumed_lwps): Likewise.
899 * record-full.c (record_full_exec_insn): Likewise.
900 (record_full_wait_1): Likewise.
901 * regcache.c (get_regcache_aspace): Remove.
902 * regcache.h (get_regcache_aspace): Remove.
903
904 2017-11-02 Yao Qi <yao.qi@linaro.org>
905
906 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
907 (init_regcache_descr): Use gdbarch_num_regs.
908 (regcache::regcache): Likewise.
909 (regcache::get_register_status): Likewise.
910 (regcache::assert_raw_regnum): Likewise.
911 (regcache::cooked_read): Likewise.
912 (regcache::cooked_read_value): Likewise.
913 (regcache::cooked_write): Likewise.
914 (regcache::dump): Likewise.
915 (regcache::num_raw_registers): New method.
916 * regcache.h (class regcache) <num_raw_registers>: New.
917
918 2017-11-02 Yao Qi <yao.qi@linaro.org>
919
920 * regcache.c (regcache::assert_regnum): New method.
921 (regcache::invalidate): Call assert_regnum.
922 (regcache::raw_update): Likewise.
923 (regcache::raw_write): Likewise.
924 (regcache::raw_read_part): Likewise.
925 (regcache::raw_write_part): Likewise.
926 (regcache::raw_supply): Likewise.
927 (regcache::raw_supply_integer): Likewise.
928 (regcache::raw_supply_zeroed): Likewise.
929 (regcache::raw_collect): Likewise.
930 (regcache::raw_collect_integer): Likewise.
931 * regcache.h (regcache::assert_regnum): Declare.
932
933 2017-11-02 Yao Qi <yao.qi@linaro.org>
934
935 * regcache.c (regcache::dump): Remove code.
936
937 2017-11-02 Yao Qi <yao.qi@linaro.org>
938
939 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
940 Remove.
941 <sizeof_cooked_register_status>: Remove.
942 (init_regcache_descr): Update.
943 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
944 (regcache::save): Likewise.
945 (regcache::dump): Likewise.
946
947 2017-11-01 James Bowman <james.bowman@ftdichip.com>
948
949 * ft32-tdep.c (ft32_fetch_instruction): New function.
950 (ft32_analyze_prologue): Use ft32_fetch_instruction().
951
952 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
953
954 * cli/cli-script.c (execute_control_command): Rename to ...
955 (execute_control_command_1): ... this.
956 (execute_control_command): New function.
957
958 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
959
960 * tracepoint.c (tfind_command): Remove const_cast.
961
962 2017-10-30 Mike Gulick <mgulick@mathworks.com>
963
964 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
965
966 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
967
968 * common/common-utils.h (in_inclusive_range): New function.
969 * arm-tdep.c (arm_record_extension_space): Use
970 in_inclusive_range.
971 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
972 * cris-tdep.c (cris_spec_reg_applicable): Use
973 in_inclusive_range.
974
975 2017-10-30 Pedro Alves <palves@redhat.com>
976 Simon Marchi <simon.marchi@ericsson.com>
977
978 * remote.c (remote_set_syscall_catchpoint): Build a std::string
979 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
980
981 2017-10-30 Pedro Alves <palves@redhat.com>
982
983 * common/common-utils.c (string_appendf, string_vappendf): New
984 functions.
985 * common/common-utils.h (string_appendf, string_vappendf): New
986 declarations.
987 * unittests/common-utils-selftests.c (string_appendf_func)
988 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
989 (string_vappendf_tests): New functions.
990 (_initialize_common_utils_selftests): Register "string_appendf" and
991 "string_vappendf tests".
992
993 2017-10-30 Pedro Alves <palves@redhat.com>
994
995 * unittests/common-utils-selftests.c (format_func): New typedef.
996 (string_printf_tests, string_vprintf_tests): Tests factored out
997 and merged to ...
998 (test_format_func): ... this new function.
999 (string_printf_tests, string_vprintf_tests): Reimplement on top of
1000 test_format_func.
1001
1002 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1003
1004 * darwin-nat.c: Remove include of gdb.h.
1005
1006 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1007
1008 * xtensa-xtregs.c: Fix formatting issues.
1009
1010 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
1011
1012 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1013
1014 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
1015
1016 PR python/21213
1017 * python/py-infthread.c (thpy_get_inferior): Increment reference
1018 of inferior before returning it.
1019
1020 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1021
1022 * unittests/common-utils-selftests.c (format): Add
1023 ATTRIBUTE_PRINTF.
1024
1025 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1026
1027 * xml-syscall.c (struct syscall_desc): Add constructor.
1028 <name>: Change type to std::string.
1029 (syscall_desc_up): New typedef.
1030 (syscall_desc_p): Remove typeder.
1031 (DEF_VEC_P(syscall_desc_p)): Remove.
1032 (struct syscall_group_desc): Add constructor.
1033 <name>: Change type to std::string.
1034 <syscalls>: Change type to std::vector.
1035 (syscall_group_desc_up): New typedef.
1036 (syscall_group_desc_p): Remove typedef.
1037 (DEF_VEC_P(syscall_group_desc_p)): Remove.
1038 (struct syscalls_info) <syscalls>: Change type to std::vector of
1039 unique_ptr.
1040 <groups>: Likewise.
1041 <my_gdb_datadir>: Change type to std::string.
1042 (syscalls_info_up): New typedef.
1043 (allocate_syscalls_info): Remove.
1044 (syscalls_info_free_syscalls_desc): Remove.
1045 (syscalls_info_free_syscall_group_desc): Remove.
1046 (free_syscalls_info): Remove.
1047 (make_cleanup_free_syscalls_info): Remove.
1048 (syscall_group_create_syscall_group_desc): Adjust.
1049 (syscall_group_add_syscall): Adjust.
1050 (syscall_create_syscall_desc): Adjust.
1051 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1052 (init_syscalls_info): Adjust.
1053 (syscall_group_get_group_by_name): Adjust.
1054 (xml_get_syscall_number): Adjust.
1055 (xml_get_syscall_name): Adjust.
1056 (xml_list_of_syscalls): Adjust.
1057 (xml_list_syscalls_by_group): Adjust.
1058 (xml_list_of_groups): Adjust.
1059
1060 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1061
1062 * probe.h: Don't include gdb_vecs.h.
1063 (DEF_VEC_P (probe_p)): Remove.
1064 (find_probes_in_objfile): Return an std::vector.
1065 * probe.c (find_probes_in_objfile): Likewise.
1066 * breakpoint.c (breakpoint_objfile_data)
1067 <longjmp_probes>: Change type to std::vector.
1068 <exception_probes>: Likewise.
1069 (free_breakpoint_probes): Don't manually free vectors.
1070 (create_longjmp_master_breakpoint): Adjust.
1071 (create_exception_master_breakpoint): Adjust.
1072 * solib-svr4.c (svr4_create_probe_breakpoints): Change
1073 parameter type, adjust.
1074 (svr4_create_solib_event_breakpoints): Adjust.
1075
1076 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1077
1078 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1079 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1080 with new.
1081 (free_breakpoint_probes): Rename to ...
1082 (free_breakpoint_objfile_data): ... this, and call delete on
1083 bp_objfile_data..
1084
1085 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
1086
1087 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1088 (loaded_script_ptr): Remove typedef.
1089 (DEF_VEC_P (loaded_script_ptr)): Remove.
1090 (struct collect_matching_scripts_data): Add constructor.
1091 <scripts_p>: Change type to (pointer to) std::vector.
1092 (collect_matching_scripts_data): Adjust.
1093 (sort_scripts_by_name): Make suitable for std::sort.
1094 (print_scripts): Don't sort vector, adjust to std::vector.
1095 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1096
1097 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1098
1099 * symfile.c (filename_language): Make struct, not typedef. Add
1100 constructor.
1101 <ext>: Change type to std::string.
1102 (DEF_VEC_O (filename_language)): Remove.
1103 (filename_language_table): Change type to std::vector.
1104 (add_filename_language): Adjust.
1105 (set_ext_lang_command): Adjust.
1106 (info_ext_lang_command): Adjust.
1107 (deduce_language_from_filename): Adjust.
1108 (class scoped_restore_filename_language_table): Remove.
1109 (test_filename_language): Use scoped_restore.
1110 (test_set_ext_lang_command): Use scoped_restore, adjust to
1111 std::vector change.
1112
1113 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1114
1115 * symfile.c: Include selftest.h.
1116 (class scoped_restore_filename_language_table): New.
1117 (test_filename_language): New test.
1118 (test_set_ext_lang_command): New test.
1119 (_initialize_symfile): Register tests.
1120
1121 2017-10-27 Keith Seitz <keiths@redhat.com>
1122
1123 * breakpoint.c (print_breakpoint_location): Use the symbol saved
1124 in the bp_location, falling back to find_pc_sect_function when
1125 needed.
1126 (add_location_to_breakpoint): Save sal->symbol.
1127 * breakpoint.h (struct bp_location) <symbol>: New field.
1128 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1129 * symtab.h (struct symtab_and_line) <symbol>: New field.
1130
1131 2017-10-26 Patrick Frants <osscontribute@gmail.com>
1132
1133 PR gdb/13669
1134 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1135 to rewind obstack.
1136
1137 2017-10-26 Pedro Alves <palves@redhat.com>
1138
1139 * remote.c (remote_async_terminal_ours_p): Delete.
1140 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1141 Remove references to 'remote_async_terminal_ours_p'.
1142
1143 2017-10-26 Yao Qi <yao.qi@linaro.org>
1144
1145 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1146
1147 2017-10-26 Yao Qi <yao.qi@linaro.org>
1148
1149 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1150 aspace const.
1151 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1152 Likewise.
1153 * breakpoint.c (bpstat_check_location): Remove cast.
1154 (breakpoint_hit_catch_fork): Make aspce const.
1155 (breakpoint_hit_catch_solib): Likewise.
1156 (breakpoint_hit_catch_exec): Likewise.
1157 (breakpoint_hit_ranged_breakpoint): Likewise.
1158 (breakpoint_hit_watchpoint): Likewise.
1159 (base_breakpoint_breakpoint_hit): Likewise.
1160 (bkpt_breakpoint_hit): Likewise.
1161 (dprintf_breakpoint_hit): Likewise.
1162 (tracepoint_breakpoint_hit): Likewise.
1163 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1164
1165 2017-10-26 Yao Qi <yao.qi@linaro.org>
1166
1167 * breakpoint.c (breakpoint_location_address_match): Change
1168 "struct address_space *" to "const address_space".
1169 (breakpoint_location_address_range_overlap): Likewise.
1170 (breakpoint_here_p): Likewise.
1171 (breakpoint_in_range_p): Likewise.
1172 (moribund_breakpoint_here_p): Likewise.
1173 (bp_location_inserted_here_p): Likewise.
1174 (software_breakpoint_inserted_here_p): Likewise.
1175 (hardware_breakpoint_inserted_here_p): Likewise.
1176 (hardware_watchpoint_inserted_in_range): Likewise.
1177 (bpstat_check_location): Likewise.
1178 (bpstat_stop_status): Likewise.
1179 (breakpoint_address_match): Likewise.
1180 (breakpoint_address_match_range): Likewise.
1181 (breakpoint_location_address_match): Likewise.
1182 (breakpoint_location_address_range_overlap): Likewise.
1183 (insert_single_step_breakpoint): Likewise.
1184 (breakpoint_has_location_inserted_here): Likewise.
1185 (single_step_breakpoint_inserted_here_p): Likewise.
1186 (pc_at_non_inline_function): Likewise.
1187 * breakpoint.h (bpstat_stop_status): Update declaration.
1188 (breakpoint_here_p): Likewise.
1189 (breakpoint_in_range_p): Likewise.
1190 (moribund_breakpoint_here_p): Likewise.
1191 (breakpoint_inserted_here_p): Likewise.
1192 (software_breakpoint_inserted_here_p): Likewise.
1193 (hardware_breakpoint_inserted_here_p): Likewise.
1194 (breakpoint_has_location_inserted_here): Likewise.
1195 (single_step_breakpoint_inserted_here_p): Likewise.
1196 (hardware_watchpoint_inserted_in_range): Likewise.
1197 (breakpoint_address_match): Likewise.
1198 (insert_single_step_breakpoint): Likewise.
1199 (pc_at_non_inline_function): Likewise.
1200 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1201 * record.c (record_check_stopped_by_breakpoint): Likewise.
1202 * record.h (record_check_stopped_by_breakpoint): Likewise.
1203 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1204
1205 2017-10-25 Yao Qi <yao.qi@linaro.org>
1206
1207 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1208 regcache->arch () instead get_regcache_arch.
1209 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1210 Likewise.
1211 (aarch64_fbsd_store_inferior_registers): Likewise.
1212 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1213 (store_gregs_to_thread): Likewise.
1214 (fetch_fpregs_from_thread): Likewise.
1215 (store_fpregs_to_thread): Likewise.
1216 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1217 (aarch64_store_return_value): Likewise.
1218 (aarch64_software_single_step): Likewise.
1219 * aix-thread.c (aix_thread_wait): Likewise.
1220 (supply_reg32): Likewise.
1221 (supply_sprs64): Likewise.
1222 (supply_sprs32): Likewise.
1223 (fill_gprs64): Likewise.
1224 (fill_gprs32): Likewise.
1225 (fill_sprs64): Likewise.
1226 (fill_sprs32): Likewise.
1227 (store_regs_user_thread): Likewise.
1228 (store_regs_kernel_thread): Likewise.
1229 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1230 (alphabsd_store_inferior_registers): Likewise.
1231 * alpha-tdep.c (alpha_extract_return_value): Likewise.
1232 (alpha_store_return_value): Likewise.
1233 (alpha_deal_with_atomic_sequence): Likewise.
1234 (alpha_next_pc): Likewise.
1235 (alpha_software_single_step): Likewise.
1236 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1237 (amd64bsd_store_inferior_registers): Likewise.
1238 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1239 Likewise.
1240 (amd64_linux_store_inferior_registers): Likewise.
1241 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1242 (amd64_collect_native_gregset): Likewise.
1243 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1244 (amd64obsd_collect_uthread): Likewise.
1245 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1246 (amd64_collect_fpregset): Likewise.
1247 (amd64_supply_fxsave): Likewise.
1248 (amd64_supply_xsave): Likewise.
1249 (amd64_collect_fxsave): Likewise.
1250 (amd64_collect_xsave): Likewise.
1251 * arc-tdep.c (arc_write_pc): Likewise.
1252 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1253 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1254 (arm_fbsd_store_inferior_registers): Likewise.
1255 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1256 (store_vfp_regs): Likewise.
1257 (arm_linux_fetch_inferior_registers): Likewise.
1258 (arm_linux_store_inferior_registers): Likewise.
1259 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1260 (arm_linux_sigreturn_next_pc): Likewise.
1261 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1262 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1263 (fetch_register): Likewise.
1264 (store_register): Likewise.
1265 * arm-tdep.c (arm_is_thumb): Likewise.
1266 (displaced_in_arm_mode): Likewise.
1267 (bx_write_pc): Likewise.
1268 (arm_get_next_pcs_addr_bits_remove): Likewise.
1269 (arm_software_single_step): Likewise.
1270 (arm_extract_return_value): Likewise.
1271 (arm_store_return_value): Likewise.
1272 (arm_write_pc): Likewise.
1273 * bfin-tdep.c (bfin_extract_return_value): Likewise.
1274 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1275 (bsd_uthread_store_registers): Likewise.
1276 * core-regset.c (fetch_core_registers): Likewise.
1277 * corelow.c (get_core_registers): Likewise.
1278 * cris-tdep.c (cris_store_return_value): Likewise.
1279 (cris_extract_return_value): Likewise.
1280 (find_step_target): Likewise.
1281 (find_step_target): Likewise.
1282 (cris_software_single_step): Likewise.
1283 * ctf.c (ctf_fetch_registers): Likewise.
1284 * darwin-nat.c (cancel_breakpoint): Likewise.
1285 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1286 * frv-tdep.c (frv_extract_return_value): Likewise.
1287 * ft32-tdep.c (ft32_store_return_value): Likewise.
1288 (ft32_extract_return_value): Likewise.
1289 * go32-nat.c (fetch_register): Likewise.
1290 (go32_fetch_registers): Likewise.
1291 (go32_store_registers): Likewise.
1292 (store_register): Likewise.
1293 * h8300-tdep.c (h8300_extract_return_value): Likewise.
1294 (h8300_store_return_value): Likewise.
1295 * hppa-linux-nat.c (fetch_register): Likewise.
1296 (store_register): Likewise.
1297 (hppa_linux_fetch_inferior_registers): Likewise.
1298 (hppa_linux_store_inferior_registers): Likewise.
1299 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
1300 (i386_darwin_store_inferior_registers): Likewise.
1301 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
1302 (gnu_store_registers): Likewise.
1303 * i386-linux-nat.c (fetch_register): Likewise.
1304 (store_register): Likewise.
1305 (supply_gregset): Likewise.
1306 (fill_gregset): Likewise.
1307 (i386_linux_fetch_inferior_registers): Likewise.
1308 (i386_linux_store_inferior_registers): Likewise.
1309 (i386_linux_resume): Likewise.
1310 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
1311 Likewise.
1312 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
1313 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
1314 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
1315 (i386obsd_collect_uthread): Likewise.
1316 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1317 (i386_supply_gregset): Likewise.
1318 (i386_collect_gregset): Likewise.
1319 (i386_supply_fpregset): Likewise.
1320 (i386_collect_fpregset): Likewise.
1321 (i386_mpx_bd_base): Likewise.
1322 * i386-v4-nat.c (supply_fpregset): Likewise.
1323 (fill_fpregset): Likewise.
1324 * i387-tdep.c (i387_supply_fsave): Likewise.
1325 (i387_collect_fsave): Likewise.
1326 (i387_supply_fxsave): Likewise.
1327 (i387_collect_fxsave): Likewise.
1328 (i387_supply_xsave): Likewise.
1329 (i387_collect_xsave): Likewise.
1330 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
1331 (ia64_linux_store_registers): Likewise.
1332 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
1333 (ia64_extract_return_value): Likewise.
1334 (ia64_store_return_value): Likewise.
1335 (find_func_descr): Likewise.
1336 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
1337 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
1338 (inf_ptrace_store_registers): Likewise.
1339 * infrun.c (use_displaced_stepping): Likewise.
1340 (displaced_step_prepare_throw): Likewise.
1341 (resume): Likewise.
1342 (proceed): Likewise.
1343 (do_target_wait): Likewise.
1344 (adjust_pc_after_break): Likewise.
1345 (handle_inferior_event_1): Likewise.
1346 (handle_signal_stop): Likewise.
1347 (save_infcall_suspend_state): Likewise.
1348 (restore_infcall_suspend_state): Likewise.
1349 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
1350 * jit.c (jit_frame_prev_register): Likewise.
1351 * linux-nat.c (save_stop_reason): Likewise.
1352 (linux_nat_wait_1): Likewise.
1353 (resume_stopped_resumed_lwps): Likewise.
1354 * linux-record.c (record_linux_sockaddr): Likewise.
1355 (record_linux_msghdr): Likewise.
1356 (record_linux_system_call): Likewise.
1357 * linux-tdep.c (linux_collect_thread_registers): Likewise.
1358 * lm32-tdep.c (lm32_extract_return_value): Likewise.
1359 (lm32_store_return_value): Likewise.
1360 * m32c-tdep.c (m32c_read_flg): Likewise.
1361 (m32c_pseudo_register_read): Likewise.
1362 (m32c_pseudo_register_write): Likewise.
1363 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
1364 (m32r_linux_collect_gregset): Likewise.
1365 * m32r-tdep.c (m32r_store_return_value): Likewise.
1366 (m32r_extract_return_value): Likewise.
1367 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1368 (m68kbsd_collect_fpregset): Likewise.
1369 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1370 * m68k-linux-nat.c (fetch_register): Likewise.
1371 (old_fetch_inferior_registers): Likewise.
1372 (old_store_inferior_registers): Likewise.
1373 (store_regs): Likewise.
1374 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1375 (m68k_svr4_store_return_value): Likewise.
1376 * m88k-tdep.c (m88k_store_arguments): Likewise.
1377 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1378 (mi_cmd_data_write_register_values): Likewise.
1379 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1380 (mips_fbsd_store_inferior_registers): Likewise.
1381 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1382 (mips_fbsd_supply_gregs): Likewise.
1383 (mips_fbsd_collect_fpregs): Likewise.
1384 (mips_fbsd_collect_gregs): Likewise.
1385 (mips_fbsd_supply_fpregset): Likewise.
1386 (mips_fbsd_collect_fpregset): Likewise.
1387 (mips_fbsd_supply_gregset): Likewise.
1388 (mips_fbsd_collect_gregset): Likewise.
1389 * mips-linux-nat.c (supply_gregset): Likewise.
1390 (fill_gregset): Likewise.
1391 (supply_fpregset): Likewise.
1392 (fill_fpregset): Likewise.
1393 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1394 (mips_fill_gregset): Likewise.
1395 (mips_supply_fpregset): Likewise.
1396 (mips_fill_fpregset): Likewise.
1397 (mips64_supply_gregset): Likewise.
1398 (micromips_linux_sigframe_validate): Likewise.
1399 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1400 (mipsnbsd_fetch_inferior_registers): Likewise.
1401 (mipsnbsd_store_inferior_registers): Likewise.
1402 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1403 (mipsnbsd_supply_gregset): Likewise.
1404 (mipsnbsd_iterate_over_regset_sections): Likewise.
1405 (mipsnbsd_supply_reg): Likewise.
1406 (mipsnbsd_supply_fpreg): Likewise.
1407 * mips-tdep.c (mips_in_frame_stub): Likewise.
1408 (mips_dummy_id): Likewise.
1409 (is_octeon_bbit_op): Likewise.
1410 (micromips_bc1_pc): Likewise.
1411 (extended_mips16_next_pc): Likewise.
1412 (mips16_next_pc): Likewise.
1413 (deal_with_atomic_sequence): Likewise.
1414 * moxie-tdep.c (moxie_process_readu): Likewise.
1415 * nios2-tdep.c (nios2_get_next_pc): Likewise.
1416 * nto-procfs.c (procfs_store_registers): Likewise.
1417 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1418 (ppcfbsd_store_inferior_registers): Likewise.
1419 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1420 (fetch_altivec_register): Likewise.
1421 (get_spe_registers): Likewise.
1422 (fetch_spe_register): Likewise.
1423 (fetch_altivec_registers): Likewise.
1424 (fetch_all_gp_regs): Likewise.
1425 (fetch_all_fp_regs): Likewise.
1426 (store_vsx_register): Likewise.
1427 (store_altivec_register): Likewise.
1428 (set_spe_registers): Likewise.
1429 (store_spe_register): Likewise.
1430 (store_altivec_registers): Likewise.
1431 (store_all_gp_regs): Likewise.
1432 (store_all_fp_regs): Likewise.
1433 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1434 (ppc_linux_collect_gregset): Likewise.
1435 (ppc_canonicalize_syscall): Likewise.
1436 (ppc_linux_record_signal): Likewise.
1437 (ppu2spu_prev_register): Likewise.
1438 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1439 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1440 (ppcobsd_store_registers): Likewise.
1441 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1442 Likewise.
1443 (ppc_ravenscar_generic_store_registers): Likewise.
1444 * procfs.c (procfs_fetch_registers): Likewise.
1445 (procfs_store_registers): Likewise.
1446 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1447 (ravenscar_store_registers): Likewise.
1448 (ravenscar_prepare_to_store): Likewise.
1449 * record-btrace.c (record_btrace_fetch_registers): Likewise.
1450 * record-full.c (record_full_wait_1): Likewise.
1451 (record_full_registers_change): Likewise.
1452 (record_full_store_registers): Likewise.
1453 (record_full_core_fetch_registers): Likewise.
1454 (record_full_save): Likewise.
1455 (record_full_goto_insn): Likewise.
1456 * regcache.c (regcache_register_size): Likewise.
1457 (get_regcache_arch): Remove.
1458 (regcache_read_pc): Likewise.
1459 * regcache.h (get_regcache_arch): Remove.
1460 * remote-sim.c (gdbsim_fetch_register): Likewise.
1461 (gdbsim_store_register): Likewise.
1462 * remote.c (fetch_register_using_p): Likewise.
1463 (send_g_packet): Likewise.
1464 (remote_prepare_to_store): Likewise.
1465 (store_registers_using_G): Likewise.
1466 * reverse.c (save_bookmark_command): Likewise.
1467 (goto_bookmark_command): Likewise.
1468 * rs6000-aix-tdep.c (branch_dest): Likewise.
1469 * rs6000-nat.c (rs6000_ptrace64): Likewise.
1470 (fetch_register): Likewise.
1471 * rs6000-tdep.c (ppc_supply_reg): Likewise.
1472 (ppc_collect_reg): Likewise.
1473 (ppc_collect_gregset): Likewise.
1474 (ppc_collect_fpregset): Likewise.
1475 (ppc_collect_vsxregset): Likewise.
1476 (ppc_collect_vrregset): Likewise.
1477 (ppc_displaced_step_hw_singlestep): Likewise.
1478 (rs6000_pseudo_register_read): Likewise.
1479 (rs6000_pseudo_register_write): Likewise.
1480 * s390-linux-nat.c (supply_gregset): Likewise.
1481 (fill_gregset): Likewise.
1482 (s390_linux_fetch_inferior_registers): Likewise.
1483 * s390-linux-tdep.c (s390_write_pc): Likewise.
1484 (s390_software_single_step): Likewise.
1485 (s390_all_but_pc_registers_record): Likewise.
1486 (s390_linux_syscall_record): Likewise.
1487 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1488 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1489 (shnbsd_store_inferior_registers): Likewise.
1490 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1491 (sh_extract_return_value_fpu): Likewise.
1492 (sh_store_return_value_nofpu): Likewise.
1493 (sh_corefile_supply_regset): Likewise.
1494 (sh_corefile_collect_regset): Likewise.
1495 * sh64-tdep.c (sh64_extract_return_value): Likewise.
1496 (sh64_store_return_value): Likewise.
1497 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1498 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1499 (sparc_store_inferior_registers): Likewise.
1500 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1501 (sparc_ravenscar_prepare_to_store): Likewise.
1502 * sparc-tdep.c (sparc32_store_arguments): Likewise.
1503 (sparc_analyze_control_transfer): Likewise.
1504 (sparc_step_trap): Likewise.
1505 (sparc_software_single_step): Likewise.
1506 (sparc32_gdbarch_init): Likewise.
1507 (sparc_supply_rwindow): Likewise.
1508 (sparc_collect_rwindow): Likewise.
1509 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1510 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1511 (sparc64nbsd_collect_gregset): Likewise.
1512 (sparc64nbsd_supply_fpregset): Likewise.
1513 (sparc64nbsd_collect_fpregset): Likewise.
1514 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1515 (sparc64_supply_gregset): Likewise.
1516 (sparc64_collect_gregset): Likewise.
1517 (sparc64_supply_fpregset): Likewise.
1518 (sparc64_collect_fpregset): Likewise.
1519 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1520 * spu-tdep.c (spu_unwind_sp): Likewise.
1521 (spu2ppu_prev_register): Likewise.
1522 (spu_memory_remove_breakpoint): Likewise.
1523 * stack.c (return_command): Likewise.
1524 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1525 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1526 * tracefile.c (trace_save_ctf): Likewise.
1527 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1528 (do_windows_store_inferior_registers): Likewise.
1529 (windows_resume): Likewise.
1530 * xtensa-linux-nat.c (fill_gregset): Likewise.
1531 (supply_gregset_reg): Likewise.
1532 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1533 (xtensa_register_read_masked): Likewise.
1534 (xtensa_supply_gregset): Likewise.
1535 (xtensa_extract_return_value): Likewise.
1536 (xtensa_store_return_value): Likewise.
1537
1538 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
1539
1540 * doublest.c (floatformat_from_string): New function.
1541 * doublest.h (floatformat_from_string): Add prototype.
1542
1543 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1544 (OP_FLOAT): ... this.
1545 * expression.h: Do not include "doublest.h".
1546 (union exp_element): Replace doubleconst and decfloatconst by
1547 new element floatconst.
1548 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1549 (ada_evaluate_subexp): Likewise.
1550 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1551 OP_DOUBLE and OP_DECFLOAT.
1552 * expprint.c (print_subexp_standard): Likewise.
1553 (dump_subexp_body_standard): Likewise.
1554 * breakpoint.c (watchpoint_exp_is_const): Likewise.
1555
1556 * parse.c: Include "dfp.h".
1557 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1558 (write_exp_elt_floatcst): New function.
1559 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1560 and OP_DECFLOAT.
1561 (operator_check_standard): Likewise.
1562 (parse_float): Do not accept suffix. Take type as input. Return bool.
1563 Return target format buffer instead of host DOUBLEST.
1564 Use floatformat_from_string and decimal_from_string to parse
1565 either binary or decimal floating-point types.
1566 (parse_c_float): Remove.
1567 * parser-defs.h: Do not include "doublest.h".
1568 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1569 (write_exp_elt_floatcst): Add prototype.
1570 (parse_float): Update prototype.
1571 (parse_c_float): Remove.
1572
1573 * c-exp.y: Do not include "dfp.h".
1574 (typed_val_float): Use byte buffer instead of DOUBLEST.
1575 (typed_val_decfloat): Remove.
1576 (DECFLOAT): Remove.
1577 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1578 (parse_number): Update to new parse_float interface.
1579 Parse suffixes and determine type before calling parse_float.
1580 Handle decimal and binary FP types the same way.
1581
1582 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1583 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1584 (parse_number): Update to new parse_float interface.
1585 Parse suffixes and determine type before calling parse_float.
1586
1587 * f-exp.y: Replace dval by typed_val_float.
1588 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1589 (parse_number): Use parse_float instead of atof.
1590
1591 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1592 (parse_go_float): Remove.
1593 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1594 (parse_number): Call parse_float instead of parse_go_float.
1595 Parse suffixes and determine type before calling parse_float.
1596
1597 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1598 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1599 (parse_number): Update to new parse_float interface.
1600 Parse suffixes and determine type before calling parse_float.
1601
1602 * m2-exp.y: Replace dval by byte buffer val.
1603 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1604 (parse_number): Call parse_float instead of atof.
1605
1606 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1607 (lex_number): Call parse_float instead of strtod.
1608 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1609 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1610 Use write_exp_elt_floatcst.
1611 (unit_testing): Remove static variable.
1612 (rust_type): Do not check unit_testing.
1613 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
1614
1615 * ada-exp.y (type_float, type_double): Remove.
1616 (typed_val_float): Use byte buffer instead of DOUBLEST.
1617 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1618 * ada-lex.l (processReal): Use parse_float instead of sscanf.
1619
1620 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1621
1622 * aarch64-tdep.h (enum aarch64_regnum): Remove.
1623 * arch/aarch64.h: New file.
1624
1625 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1626
1627 * dfp.h (decimal_from_string): Use const reference for argument.
1628 * dfp.c (decimal_from_string): Likewise.
1629
1630 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1631
1632 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1633 * sh64-tdep.c (sh64_do_fp_register): Likewise.
1634 * mips-tdep.c (mips_print_fp_register): Likewise.
1635
1636 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1637
1638 * common/format.h (enum argclass): Replace decfloat_arg by
1639 dec32float_arg, dec64float_arg, and dec128float_arg.
1640 * common/format.c (parse_format_string): Update to return
1641 new decimal float argument classes.
1642
1643 * printcmd.c (printf_decfloat): Rename to ...
1644 (printf_floating): ... this. Add argclass argument, and use it
1645 instead of parsing the format string again. Add support for
1646 binary floating-point values, using floatformat_to_string.
1647 Convert value to the target format if it doesn't already match.
1648 (ui_printf): Call printf_floating instead of printf_decfloat,
1649 also for double_arg / long_double_arg. Pass argclass.
1650
1651 * dfp.c (decimal_to_string): Add format string argument.
1652 * dfp.h (decimal_to_string): Likewise.
1653
1654 * doublest.c (floatformat_to_string): Add format string argument.
1655 * doublest.h (floatformat_to_string): Likewise.
1656
1657 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1658
1659 * doublest.c (floatformat_precision): New routine.
1660 (floatformat_to_string): Likewise.
1661 * doublest.c (floatformat_to_string): Add prototype.
1662
1663 * printcmd.c (print_scalar_formatted): Only call print_floating
1664 on floating-point types.
1665 * valprint.c: Do not include "floatformat.h".
1666 (generic_val_print_decfloat): Remove.
1667 (generic_val_print): Call generic_val_print_float for both
1668 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1669 (print_floating): Use floatformat_to_string. Handle decimal float.
1670 (print_decimal_floating): Remove, merge into floatformat_to_string.
1671 * value.h (print_decimal_floating): Remove.
1672
1673 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1674
1675 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
1676
1677 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1678
1679 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1680
1681 * memattr.h: Don't include vec.h.
1682 (struct mem_attrib): Initialize fields.
1683 <unknown>: New static method.
1684 (struct mem_region): Add constructors, operator<, initialize
1685 fields.
1686 * memattr.c: Include algorithm.
1687 (default_mem_attrib, unknown_mem_attrib): Remove.
1688 (user_mem_region_list): New global.
1689 (target_mem_region_list, mem_region_list): Change type to
1690 std::vector<mem_region>.
1691 (mem_use_target): Now a function.
1692 (target_mem_regions_valid): Change type to bool.
1693 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1694 (require_user_regions): Adjust.
1695 (require_target_regions): Adjust.
1696 (create_mem_region): Adjust.
1697 (lookup_mem_region): Adjust.
1698 (invalidate_target_mem_regions): Adjust.
1699 (mem_clear): Rename to...
1700 (user_mem_clear): ... this, and adjust.
1701 (mem_command): Adjust.
1702 (info_mem_command): Adjust.
1703 (mem_enable, enable_mem_command, mem_disable,
1704 disable_mem_command): Adjust.
1705 (mem_delete): Adjust.
1706 (delete_mem_command): Adjust.
1707 * memory-map.h (parse_memory_map): Return an std::vector.
1708 * memory-map.c (parse_memory_map): Likewise.
1709 (struct memory_map_parsing_data): Add constructor.
1710 <memory_map>: Point to std::vector.
1711 (memory_map_start_memory): Adjust.
1712 (memory_map_end_memory): Adjust.
1713 (memory_map_end_property): Adjust.
1714 (clear_result): Remove.
1715 * remote.c (remote_memory_map): Return an std::vector.
1716 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1717 Remove.
1718 (target_debug_print_mem_region_vector): New.
1719 * target-delegates.c: Regenerate.
1720 * target.h (mem_region_vector): New typedef.
1721 (to_memory_map): Return mem_region_vector.
1722 (target_memory_map): Return an std::vector.
1723 * target.c (target_memory_map): Return an std::vector.
1724 (flash_erase_command): Adjust.
1725
1726 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1727
1728 * memory-map.c (struct memory_map_parsing_data) <property_name>:
1729 Change type to std::string.
1730 (memory_map_start_property): Adjust.
1731 (memory_map_end_property): Adjust.
1732
1733 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1734
1735 * infrun.h: Include common/byte-vector.h.
1736 (struct displaced_step_closure): New struct.
1737 (struct buf_displaced_step_closure): New struct.
1738 * infrun.c (displaced_step_closure::~displaced_step_closure):
1739 Provide default implementation.
1740 (displaced_step_clear): Deallocate step closure with delete.
1741 * aarch64-tdep.c (displaced_step_closure): Rename to ...
1742 (aarch64_displaced_step_closure): ... this, extend
1743 displaced_step_closure.
1744 (aarch64_displaced_step_data) <dsc>: Change type to
1745 aarch64_displaced_step_closure.
1746 (aarch64_displaced_step_copy_insn): Adjust to type change, use
1747 unique_ptr.
1748 (aarch64_displaced_step_fixup): Add cast for displaced step
1749 closure.
1750 * amd64-tdep.c (displaced_step_closure): Rename to ...
1751 (amd64_displaced_step_closure): ... this, extend
1752 displaced_step_closure.
1753 <insn_buf>: Change type to std::vector<gdb_byte>.
1754 <max_len>: Remove.
1755 (fixup_riprel): Change type of DSC parameter, adjust to type
1756 change of insn_buf.
1757 (fixup_displaced_copy): Change type of DSC parameter.
1758 (amd64_displaced_step_copy_insn): Instantiate
1759 amd64_displaced_step_closure.
1760 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1761 to type change of insn_buf.
1762 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1763 parameter DSC.
1764 (arm_linux_copy_svc): Likewise.
1765 (cleanup_kernel_helper_return): Likewise.
1766 (arm_catch_kernel_helper_return): Likewise.
1767 (arm_linux_displaced_step_copy_insn): Instantiate
1768 arm_displaced_step_closure.
1769 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1770 (displaced_read_reg): Change type of parameter DSC.
1771 (branch_write_pc): Likewise.
1772 (load_write_pc): Likewise.
1773 (alu_write_pc): Likewise.
1774 (displaced_write_reg): Likewise.
1775 (arm_copy_unmodified): Likewise.
1776 (thumb_copy_unmodified_32bit): Likewise.
1777 (thumb_copy_unmodified_16bit): Likewise.
1778 (cleanup_preload): Likewise.
1779 (install_preload): Likewise.
1780 (arm_copy_preload): Likewise.
1781 (thumb2_copy_preload): Likewise.
1782 (install_preload_reg): Likewise.
1783 (arm_copy_preload_reg): Likewise.
1784 (cleanup_copro_load_store): Likewise.
1785 (install_copro_load_store): Likewise.
1786 (arm_copy_copro_load_store) Likewise.
1787 (thumb2_copy_copro_load_store): Likewise.
1788 (cleanup_branch): Likewise.
1789 (install_b_bl_blx): Likewise.
1790 (arm_copy_b_bl_blx): Likewise.
1791 (thumb2_copy_b_bl_blx): Likewise.
1792 (thumb_copy_b): Likewise.
1793 (install_bx_blx_reg): Likewise.
1794 (arm_copy_bx_blx_reg): Likewise.
1795 (thumb_copy_bx_blx_reg): Likewise.
1796 (cleanup_alu_imm): Likewise.
1797 (arm_copy_alu_imm): Likewise.
1798 (thumb2_copy_alu_imm): Likewise.
1799 (cleanup_alu_reg): Likewise.
1800 (install_alu_reg): Likewise.
1801 (arm_copy_alu_reg): Likewise.
1802 (thumb_copy_alu_reg): Likewise.
1803 (cleanup_alu_shifted_reg): Likewise.
1804 (install_alu_shifted_reg): Likewise.
1805 (arm_copy_alu_shifted_reg): Likewise.
1806 (cleanup_load): Likewise.
1807 (cleanup_store): Likewise.
1808 (arm_copy_extra_ld_st): Likewise.
1809 (install_load_store): Likewise.
1810 (thumb2_copy_load_literal): Likewise.
1811 (thumb2_copy_load_reg_imm): Likewise.
1812 (arm_copy_ldr_str_ldrb_strb): Likewise.
1813 (cleanup_block_load_all): Likewise.
1814 (cleanup_block_store_pc): Likewise.
1815 (cleanup_block_load_pc): Likewise.
1816 (arm_copy_block_xfer): Likewise.
1817 (thumb2_copy_block_xfer): Likewise.
1818 (cleanup_svc): Likewise.
1819 (install_svc): Likewise.
1820 (arm_copy_svc): Likewise.
1821 (thumb_copy_svc): Likewise.
1822 (arm_copy_undef): Likewise.
1823 (thumb_32bit_copy_undef): Likewise.
1824 (arm_copy_unpred): Likewise.
1825 (arm_decode_misc_memhint_neon): Likewise.
1826 (arm_decode_unconditional): Likewise.
1827 (arm_decode_miscellaneous): Likewise.
1828 (arm_decode_dp_misc): Likewise.
1829 (arm_decode_ld_st_word_ubyte): Likewise.
1830 (arm_decode_media): Likewise.
1831 (arm_decode_b_bl_ldmstm): Likewise.
1832 (arm_decode_ext_reg_ld_st): Likewise.
1833 (thumb2_decode_dp_shift_reg): Likewise.
1834 (thumb2_decode_ext_reg_ld_st): Likewise.
1835 (arm_decode_svc_copro): Likewise.
1836 (thumb2_decode_svc_copro): Likewise.
1837 (install_pc_relative): Likewise.
1838 (thumb_copy_pc_relative_16bit): Likewise.
1839 (thumb_decode_pc_relative_16bit): Likewise.
1840 (thumb_copy_pc_relative_32bit): Likewise.
1841 (thumb_copy_16bit_ldr_literal): Likewise.
1842 (thumb_copy_cbnz_cbz): Likewise.
1843 (thumb2_copy_table_branch): Likewise.
1844 (cleanup_pop_pc_16bit_all): Likewise.
1845 (thumb_copy_pop_pc_16bit): Likewise.
1846 (thumb_process_displaced_16bit_insn): Likewise.
1847 (decode_thumb_32bit_ld_mem_hints): Likewise.
1848 (thumb_process_displaced_32bit_insn): Likewise.
1849 (thumb_process_displaced_insn): Likewise.
1850 (arm_process_displaced_insn): Likewise.
1851 (arm_displaced_init_closure): Likewise.
1852 (arm_displaced_step_fixup): Add cast for closure.
1853 * arm-tdep.h: Include infrun.h.
1854 (displaced_step_closure): Rename to ...
1855 (arm_displaced_step_closure): ... this, extend
1856 displaced_step_closure.
1857 <u::svc::copy_svc_os>: Change type of parameter DSC.
1858 <cleanup>: Likewise.
1859 (arm_process_displaced_insn): Likewise.
1860 (arm_displaced_init_closure): Likewise.
1861 (displaced_read_reg): Likewise.
1862 (displaced_write_reg): Likewise.
1863 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1864 Adjust.
1865 * i386-tdep.h: Include infrun.h.
1866 (i386_displaced_step_closure): New typedef.
1867 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1868 i386_displaced_step_closure.
1869 (i386_displaced_step_fixup): Adjust.
1870 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1871 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1872 and unique_ptr.
1873 (ppc_displaced_step_fixup): Adjust.
1874 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1875 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1876 and unique_ptr.
1877 (s390_displaced_step_fixup): Adjust.
1878
1879 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1880
1881 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1882 Remove declarations.
1883
1884 2017-10-20 Tom Tromey <tom@tromey.com>
1885
1886 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1887 std::vector.
1888 (gdb_bfd_record_inclusion): Update.
1889 (bfdp): Remove typedef.
1890
1891 2017-10-20 Tom Tromey <tom@tromey.com>
1892
1893 * gdb_bfd.c (gdb_bfd_ref): Use new.
1894 (struct gdb_bfd_data): Add constructor, destructor, and member
1895 initializers.
1896 (gdb_bfd_unref): Use delete.
1897
1898 2017-10-20 Tom Tromey <tom@tromey.com>
1899
1900 * exec.c (exec_file_attach): Use new_bfd_ref.
1901 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1902 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1903 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1904 new_bfd_ref.
1905 * gdb_bfd.h (new_bfd_ref): New function.
1906
1907 2017-10-20 Pedro Alves <palves@redhat.com>
1908
1909 * main.c (captured_command_loop): Add attribute noinline.
1910
1911 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1912
1913 * interps.c (struct interp_factory): Add constructor.
1914 (interp_factory_p): Remove typedef.
1915 (DEF_VEC_P(interp_factory_p)): Remove.
1916 (interpreter_factories): Change type to std::vector.
1917 (interp_factory_register): Adjust.
1918 (interp_lookup): Adjust.
1919 (interpreter_completer): Adjust.
1920
1921 2017-10-19 Tom Tromey <tom@tromey.com>
1922
1923 * break-catch-syscall.c (catch_syscall_completer): Use
1924 std::string, gdb::unique_xmalloc_ptr.
1925
1926 2017-10-19 Tom Tromey <tom@tromey.com>
1927
1928 * infcall.c (call_function_by_hand_dummy): Use std::string.
1929
1930 2017-10-19 Tom Tromey <tom@tromey.com>
1931
1932 * mi/mi-main.c (mi_cmd_execute): Update.
1933 * top.h (prepare_execute_command): Return scoped_value_mark.
1934 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1935 Add move constructor.
1936 * top.c (prepare_execute_command): Return scoped_value_mark.
1937 (execute_command): Update.
1938
1939 2017-10-19 Pedro Alves <palves@redhat.com>
1940
1941 * xml-support.c (xml_fetch_content_from_file): Check fread's
1942 return.
1943
1944 2017-10-19 Pedro Alves <palves@redhat.com>
1945
1946 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1947 async.
1948 (handle_error_fd): New function.
1949 (ser_base_async): Add/delete an event loop file handler for
1950 error_fd.
1951
1952 2017-10-19 Pedro Alves <palves@redhat.com>
1953
1954 * xml-support.c (xml_fetch_content_from_file): Don't read in
1955 chunks. Instead use fseek to determine the file's size, and read
1956 it in one go.
1957
1958 2017-11-18 Keith Seitz <keiths@redhat.com>
1959
1960 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1961 types.
1962 Add whitespace to front of type name.
1963
1964 2017-10-18 Keith Seitz <keiths@redhat.com>
1965
1966 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1967 DW_AT_accessibility.
1968
1969 2017-10-18 Yao Qi <yao.qi@linaro.org>
1970
1971 * features/tic6x-c62x-linux.c: Remove.
1972
1973 2017-10-17 Tom Tromey <tom@tromey.com>
1974
1975 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1976 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1977 (do_mixed_source_and_assembly): Likewise.
1978
1979 2017-10-17 Tom Tromey <tom@tromey.com>
1980
1981 * regcache.c (regcache::xfer_part): Remove assertion.
1982
1983 2017-10-17 Pedro Alves <palves@redhat.com>
1984
1985 * xml-support.c (xml_fetch_content_from_file): Call
1986 unique_ptr::release() instead unique_ptr::get() when passing
1987 through xrealloc.
1988
1989 2017-10-17 Yao Qi <yao.qi@linaro.org>
1990
1991 * regcache.c (regcache::xfer_part): Remove parameters read and
1992 write, add parameter is_raw. All callers are updated.
1993
1994 2017-10-16 Keith Seitz <keiths@redhat.com>
1995
1996 * c-typeprint.c (enum access_specifier): Moved here from
1997 c_type_print_base.
1998 (output_access_specifier): New function.
1999 (c_type_print_base): Consider typedefs when assessing
2000 whether access labels are needed.
2001 Use output_access_specifier as needed.
2002 Output access specifier for typedefs, if needed.
2003 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2004 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2005 fields.
2006 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2007 accessor macros.
2008
2009 2017-10-16 Tom Tromey <tom@tromey.com>
2010
2011 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2012 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2013 * target.c (target_fileio_read_stralloc): Update.
2014 * sparc64-tdep.c (adi_is_addr_mapped): Update.
2015 * target.h (target_fileio_read_stralloc): Return
2016 unique_xmalloc_ptr.
2017
2018 2017-10-16 Tom Tromey <tom@tromey.com>
2019
2020 * xml-syscall.c (xml_init_syscalls_info): Update.
2021 * xml-support.c (xinclude_start_include): Update.
2022 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2023 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2024 (xml_fetch_content_from_file): Likewise.
2025 * osdata.c (get_osdata): Update.
2026 * target.h (target_read_stralloc, target_get_osdata): Return
2027 unique_xmalloc_ptr.
2028 * solib-aix.c (solib_aix_get_library_list): Update.
2029 * solib-target.c (solib_target_current_sos): Update.
2030 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2031 * xml-tdesc.c (fetch_available_features_from_target): Update.
2032 (target_fetch_description_xml): Update.
2033 (file_read_description_xml): Update.
2034 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2035 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2036 (remote_pid_to_exec_file): Update.
2037 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2038 (target_get_osdata): Likewise.
2039
2040 2017-10-16 Tom Tromey <tom@tromey.com>
2041
2042 * remote.c (remote_register_number_and_offset): Use std::vector.
2043 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2044 (putpkt_binary): Use gdb::def_vector.
2045 (compare_sections_command): Use gdb::byte_vector.
2046
2047 2017-10-16 Tom Tromey <tom@tromey.com>
2048
2049 * ppc-linux-nat.c (hwdebug_insert_point): Use
2050 gdb::unique_xmalloc_ptr, XDUP.
2051
2052 2017-10-16 Tom Tromey <tom@tromey.com>
2053
2054 * probe.c (parse_probes): Use std::string.
2055 (info_probes_for_ops, enable_probes_command)
2056 (disable_probes_command): Remove cleanups.
2057
2058 2017-10-16 Tom Tromey <tom@tromey.com>
2059
2060 * buildsym.c (block_compar): Remove.
2061 (end_symtab_get_static_block): Use std::vector.
2062
2063 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
2064
2065 * memrange.h (struct mem_range): Define operator< and operator==.
2066 (mem_range_s): Remove.
2067 (DEF_VEC_O (mem_range_s)): Remove.
2068 (normalize_mem_ranges): Change parameter type to std::vector.
2069 * memrange.c (compare_mem_ranges): Remove.
2070 (normalize_mem_ranges): Change parameter type to std::vector,
2071 adjust to vector change.
2072 * exec.c (section_table_available_memory): Return vector, remove
2073 parameter.
2074 (section_table_read_available_memory): Adjust to std::vector
2075 change.
2076 * remote.c (remote_read_bytes): Adjust to std::vector
2077 change.
2078 * tracepoint.h (traceframe_available_memory): Change parameter
2079 type to std::vector.
2080 * tracepoint.c (traceframe_available_memory): Change parameter
2081 type to std::vector, adjust.
2082 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2083 std::vector change.
2084 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2085 unittests/memrange-selftests.c.
2086 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2087 * gdb/unittests/memrange-selftests.c: New file.
2088
2089 2017-10-16 Pedro Alves <palves@redhat.com>
2090
2091 * elfread.c (probe_key_free): Rename range-for variable.
2092 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2093 (find_probe_by_pc, collect_probes): Rename range-for variable.
2094
2095 2017-10-16 Yao Qi <yao.qi@linaro.org>
2096
2097 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2098 * features/tic6x-c62x.c: Remove.
2099 * features/tic6x-c64x-linux.c: Remove.
2100 * features/tic6x-c64x.c: Remove.
2101 * features/tic6x-c64xp-linux.c: Remove.
2102 * features/tic6x-c64xp.c: Remove.
2103 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2104 initialize_tdesc_tic6x_*_linux functions.
2105 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2106 initialize_tdesc_tic6x_* functions.
2107
2108 2017-10-16 Yao Qi <yao.qi@linaro.org>
2109
2110 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2111 tic6x-c62x.
2112 * regformats/tic6x-c62x.dat: Remove.
2113 * regformats/tic6x-c64x.dat: Remove.
2114 * regformats/tic6x-c64xp.dat: Remove.
2115
2116 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
2117
2118 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2119 (the !HAVE_LIBEXPAT version).
2120
2121 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2122
2123 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2124 const.
2125
2126 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2127
2128 * target.h: Include tracepoint.h.
2129 (enum trace_find_type): Move to tracepoint.h.
2130 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2131 * tracepoint.h: Don't include target.h
2132 (enum trace_find_type): Move from target.h.
2133 (parse_traceframe_info): Return a unique ptr.
2134 * tracepoint.c (current_traceframe_info): Change type to unique
2135 ptr.
2136 (free_traceframe_info): Remove.
2137 (clear_traceframe_info): Don't manually free
2138 current_traceframe_info.
2139 (free_result): Remove.
2140 (parse_traceframe_info): Return a unique ptr.
2141 (get_traceframe_info): Adjust to unique ptr.
2142 * ctf.c (ctf_traceframe_info): Return a unique ptr.
2143 * remote.c (remote_traceframe_info): Return a unique ptr.
2144 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2145 ptr.
2146 * target-debug.h (target_debug_print_traceframe_info_up): New
2147 macro.
2148 * target-delegates.c: Regenerate.
2149
2150 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2151
2152 * memrange.h (struct mem_range): Add constructors.
2153 * tracepoint.h (struct traceframe_info) <memory>: Change type to
2154 std::vector<mem_range>.
2155 * tracepoint.c (free_traceframe_info): Don't manually free
2156 vector.
2157 (traceframe_info_start_memory): Adjust to vector change.
2158 (traceframe_available_memory): Likewise.
2159 * tracefile-tfile.c (build_traceframe_info): Likewise.
2160 * ctf.c (ctf_traceframe_info): Likewise.
2161
2162 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2163
2164 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2165 std::vector<int>.
2166 * tracepoint.c (free_traceframe_info): Deallocate with delete.
2167 (traceframe_info_start_tvar): Adjust to vector change.
2168 (parse_traceframe_info): Allocate with new.
2169 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2170 vector change.
2171 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2172 change.
2173 tfile_traceframe_info): Allocate with new.
2174 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2175 change.
2176
2177 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2178
2179 * tracepoint.c (traceframe_info): Rename to...
2180 (current_traceframe_info): ...this.
2181 (clear_traceframe_info): Adjust.
2182 (get_traceframe_info): Adjust.
2183
2184 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2185
2186 * nat/linux-osdata.c: Include algorithm.
2187 (compare_processes): Remove.
2188 (struct pid_pgid_entry): New struct.
2189 (linux_xfer_osdata_processgroups): Use std::vector instead of
2190 XNEWVEC.
2191
2192 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
2193
2194 * objfiles.h: Don't include symfile.h.
2195 (struct partial_symbol): Remove forward-declaration.
2196 (struct objfile) <global_psymbols, static_psymbols>: Change type
2197 to std::vector<partial_symbol *>.
2198 * objfiles.c (objfile::objfile): Don't memset those fields.
2199 (objfile::~objfile): Don't free those fields.
2200 * psympriv.h (struct psymbol_allocation_list): Remove
2201 forward-declaration.
2202 (add_psymbol_to_list): Change psymbol_allocation_list parameter
2203 to std::vector.
2204 (start_psymtab_common): Change parameters to std::vector.
2205 * psymtab.c: Include algorithm.
2206 (require_partial_symbols): Call shrink_to_fit.
2207 (find_pc_sect_psymbol): Adjust to vector change.
2208 (match_partial_symbol): Likewise.
2209 (lookup_partial_symbol): Likewise.
2210 (psym_relocate): Likewise.
2211 (dump_psymtab): Likewise.
2212 (recursively_search_psymtabs): Likewise.
2213 (compare_psymbols): Remove.
2214 (sort_pst_symbols): Adjust to vector change.
2215 (start_psymtab_common): Likewise.
2216 (end_psymtab_common): Likewise.
2217 (psymbol_bcache_full): De-constify return value.
2218 (add_psymbol_to_bcache): Likewise.
2219 (extend_psymbol_list): Remove.
2220 (append_psymbol_to_list): Adjust to vector change.
2221 (add_psymbol_to_list): Likewise.
2222 (init_psymbol_list): Likewise.
2223 (maintenance_info_psymtabs): Likewise.
2224 (maintenance_check_psymtabs): Likewise.
2225 * symfile.h (struct psymbol_allocation_list): Remove.
2226 * symfile.c (reread_symbols): Adjust to vector change.
2227 * dbxread.c (start_psymtab): Change type of parameters.
2228 (dbx_symfile_read): Adjust to vector change.
2229 (read_dbx_symtab): Likewise.
2230 (start_psymtab): Change type of parameters.
2231 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2232 (create_partial_symtab): Likewise.
2233 (add_partial_symbol): Likewise.
2234 (write_one_signatured_type): Likewise.
2235 (recursively_write_psymbols): Likewise.
2236 * mdebugread.c (parse_partial_symbols): Likewise.
2237 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2238 (scan_xcoff_symtab): Adjust to vector change.
2239 (xcoff_initial_scan): Likewise.
2240
2241 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
2242
2243 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2244
2245 2017-10-13 Yao Qi <yao.qi@linaro.org>
2246
2247 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2248 Remove s390x-*-expedite, add s390x-expedite.
2249
2250 2017-10-13 Yao Qi <yao.qi@linaro.org>
2251
2252 * features/s390-gs-linux64.c: Regenerated.
2253 * features/s390x-gs-linux64.c: Regenerated.
2254
2255 2017-10-13 Tom Tromey <tom@tromey.com>
2256
2257 * compile/compile-object-run.c (do_module_cleanup): Use delete.
2258 * solib.c (update_solib_list, reload_shared_libraries_1): Use
2259 delete.
2260 * symfile.c (symbol_file_add_with_addrs): Use new.
2261 (symbol_file_add_separate): Update comment.
2262 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2263 * jit.c (jit_object_close_impl): Use new.
2264 (jit_unregister_code): Use delete.
2265 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2266 (~objfile): Rename from free_objfile.
2267 (free_objfile_separate_debug, do_free_objfile_cleanup)
2268 (free_all_objfiles, objfile_purge_solibs): Use delete.
2269 * objfiles.h (struct objfile): Add constructor and destructor.
2270 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
2271 (allocate_objfile, free_objfile): Don't declare.
2272 (struct objstats): Add initializers.
2273
2274 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2275
2276 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2277 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2278 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2279 * gdbarch.h: Regenerate.
2280 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2281 Adjust comment.
2282 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2283 (i386_displaced_step_fixup): Adjust comment.
2284 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2285
2286 2017-10-12 Tom Tromey <tom@tromey.com>
2287
2288 * prologue-value.h (pv_area::store_would_trash): Return bool.
2289 (pv_area::find_reg): Likewise.
2290 * prologue-value.c (pv_area::store_would_trash): Return bool.
2291 (pv_area::find_reg): Likewise.
2292
2293 2017-10-12 Tom Tromey <tom@tromey.com>
2294
2295 * s390-linux-tdep.c (s390_store, s390_load)
2296 (s390_check_for_saved, s390_analyze_prologue): Update.
2297 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2298 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
2299 * prologue-value.h (class pv_area): Move from prologue-value.c.
2300 Change names of members. Add constructor, destructor, member
2301 functions.
2302 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
2303 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
2304 (pv_area_fetch, pv_area_scan): Don't declare.
2305 * prologue-value.c (struct pv_area::area_entry): Now member of
2306 pv_area.
2307 (struct pv_area): Move to prologue-value.h.
2308 (pv_area::pv_area): Rename from make_pv_area.
2309 (pv_area::~pv_area): Rename from free_pv_area.
2310 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
2311 (clear_entries, find_entry, overlaps, store_would_trash, store)
2312 (fetch, find_reg, scan): Now member of pv_area.
2313 Remove "area" argument. Update.
2314 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
2315 Update.
2316 * mn10300-tdep.c (push_reg, check_for_saved)
2317 (mn10300_analyze_prologue): Update.
2318 * mep-tdep.c (is_arg_spill, check_for_saved)
2319 (mep_analyze_prologue): Update.
2320 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
2321 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
2322 (m32c_is_struct_return, m32c_analyze_prologue): Update.
2323 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
2324 Update.
2325 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
2326 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
2327
2328 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2329
2330 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
2331 * linux-nat.c (linux_nat_delete_thread): New variable.
2332 (lwp_free): Invoke linux_nat_delete_thread if set.
2333 (linux_nat_set_delete_thread): New function.
2334 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
2335 thread delete callback.
2336 * arm-linux-nat.c (arm_linux_delete_thread): New function.
2337 (_initialize_arm_linux_nat): Assign thread delete callback.
2338 * s390-linux-nat.c (s390_delete_thread): New function.
2339 (_initialize_s390_nat): Assign thread delete callback.
2340 * x86-linux-nat.c (x86_linux_add_target): Likewise.
2341 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
2342 function.
2343 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
2344 declaration.
2345 * nat/x86-linux.c (x86_linux_delete_thread): New function.
2346 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
2347
2348 2017-10-09 Tom Tromey <tom@tromey.com>
2349
2350 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
2351 std::string.
2352 * tui/tui-layout.c (enum tui_status): Use std::string.
2353
2354 2017-10-11 Tom Tromey <tom@tromey.com>
2355
2356 * gdbthread.h (thread_command): Constify.
2357 * inferior.h (detach_command): Constify.
2358 * top.h (set_history, show_history): Constify.
2359 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
2360 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
2361 * bsd-kvm.c (bsd_kvm_cmd): Constify.
2362 * printcmd.c (set_command): Constify.
2363 (non_const_set_command): New function.
2364 * dcache.c (set_dcache_command, show_dcache_command): Constify.
2365 * breakpoint.c (enable_command, disable_command, delete_command)
2366 (catch_command, tcatch_command, set_breakpoint_cmd)
2367 (show_breakpoint_cmd): Constify.
2368 * macrocmd.c (macro_command): Constify.
2369 * infcmd.c (unset_command, kill_command, detach_command)
2370 (info_proc_cmd): Constify.
2371 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2372 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2373 (info_auto_load_cmd): Constify.
2374 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2375 (unset_tdesc_cmd): Constify.
2376 * ada-lang.c (set_ada_command, show_ada_command)
2377 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2378 * guile/guile.c (set_guile_command, show_guile_command)
2379 (info_guile_command): Constify.
2380 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2381 Constify.
2382 * skip.c (skip_command): Constify.
2383 * compile/compile.c (_initialize_compile): Constify.
2384 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2385 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2386 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2387 (maint_btrace_pt_show_cmd): Constify.
2388 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2389 Constify.
2390 * python/python.c (user_show_python, user_set_python): Constify.
2391 * mips-tdep.c (set_mips_command, show_mips_command)
2392 (set_mipsfpu_command): Constify.
2393 * record-btrace.c (cmd_record_btrace_start)
2394 (cmd_set_record_btrace, cmd_show_record_btrace)
2395 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2396 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2397 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2398 Constify.
2399 * symfile.c (overlay_command): Constify.
2400 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2401 * cli/cli-logging.c (set_logging_command, show_logging_command):
2402 Constify.
2403 * cli/cli-dump.c (dump_command, append_command)
2404 (srec_dump_command, ihex_dump_command, verilog_dump_command)
2405 (tekhex_dump_command, binary_dump_command)
2406 (binary_append_command): Constify.
2407 * cli/cli-decode.c (struct cmd_list_element): Change type of
2408 "fun".
2409 * cli/cli-cmds.c (info_command, show_command, set_debug)
2410 (show_debug): Constify.
2411 (show_command): Add non-const overload.
2412 * top.c (set_history, show_history): Constify.
2413 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2414 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2415 * target.c (target_command): Constify.
2416 * sparc64-tdep.c (info_adi_command): Constify.
2417 * record-full.c (cmd_record_full_start): Constify.
2418 (set_record_full_command): Constify. Fix typo.
2419 (show_record_full_command): Constify.
2420 * thread.c (thread_command, thread_apply_command): Constify.
2421 * memattr.c (dummy_cmd): Constify.
2422 * value.c (function_command): Constify.
2423 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2424 * probe.c (info_probes_command): Constify.
2425 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2426 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2427 (show_thread_cmd, set_thread_default_cmd)
2428 (show_thread_default_cmd): Constify.
2429 (check_empty): Constify.
2430 * tracepoint.c (tfind_command): Constify.
2431 * cp-support.c (maint_cplus_command): Constify.
2432 * windows-tdep.c (info_w32_command): Constify.
2433 * record.c (cmd_record_start, set_record_command)
2434 (show_record_command, info_record_command, cmd_record_goto):
2435 Constify.
2436 * ravenscar-thread.c (set_ravenscar_command)
2437 (show_ravenscar_command): Constify.
2438 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2439 Constify.
2440 (add_internal_problem_command): Remove casts.
2441 * arc-tdep.c (maintenance_print_arc_command): Constify.
2442 * valprint.c (set_print, show_print, set_print_raw)
2443 (show_print_raw): Constify.
2444 * maint.c (maintenance_command, maintenance_info_command)
2445 (maintenance_print_command, maintenance_set_cmd)
2446 (maintenance_show_cmd, set_per_command_cmd)
2447 (show_per_command_cmd, maintenance_check_command): Constify.
2448 * language.c (set_check, show_check): Constify.
2449 * typeprint.c (show_print_type, set_print_type): Constify.
2450 * go32-nat.c (go32_info_dos_command): Constify.
2451
2452 2017-10-11 Tom Tromey <tom@tromey.com>
2453
2454 * breakpoint.c (prepare_re_set_context): Remove.
2455 (breakpoint_re_set_one): Update. Don't use cleanups.
2456 (breakpoint_re_set): Use scoped_restore, std::string, and
2457 scoped_restore_current_language.
2458
2459 2017-10-11 Tom Tromey <tom@tromey.com>
2460
2461 * breakpoint.c (commands_command_1): Use std::string.
2462 (cleanup_executing_breakpoints): Remove.
2463 (bpstat_do_actions_1): Use scoped_restore.
2464 (bpstat_check_watchpoint): Use std::string.
2465 (decode_static_tracepoint_spec): Likewise.
2466 (break_range_command): Likewise.
2467 (watch_command_1): Likewise.
2468 (compare_breakpoints): Change argument types.
2469 (clear_command): Use std::vector.
2470 (cleanup_executing_breakpoints): Remove.
2471 (update_global_location_list): Use unique_xmalloc_ptr.
2472 (strace_command): Remove unused declaration.
2473
2474 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2475
2476 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2477 * NEWS: Mention new FreeBSD/arm native configuration.
2478 * configure.host: Add arm*-*-freebsd*.
2479 * configure.nat: Likewise.
2480 * arm-fbsd-nat.c: New file.
2481
2482 2017-10-11 John Baldwin <jhb@FreeBSD.org>
2483
2484 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2485 (ALLDEPFILES): Add arm-fbsd-tdep.c.
2486 * NEWS: Mention new FreeBSD/arm target.
2487 * configure.tgt: Add arm*-*-freebsd*.
2488 * arm-fbsd-tdep.c: New file.
2489 * arm-fbsd-tdep.h: New file.
2490
2491 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2492
2493 * linux-tdep.c (linux_make_corefile_notes): Remove call to
2494 `gdbarch_elfcore_write_linux_prpsinfo'.
2495 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2496 method.
2497 (elf_internal_linux_prpsinfo): Remove declaration.
2498 * gdbarch.h: Regenerate.
2499 * gdbarch.c: Regenerate.
2500
2501 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
2502
2503 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2504 `set_gdbarch_elfcore_write_linux_prpsinfo'.
2505
2506 2017-10-11 Pedro Alves <palves@redhat.com>
2507
2508 * breakpoint.c (reattach_breakpoints): Delete.
2509 * breakpoint.h (reattach_breakpoints): Delete.
2510
2511 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
2512
2513 * symfile.c (registered_sym_fns): Make struct, not typedef.
2514 (DEF_VEC_O (registered_sym_fns)): Remove.
2515 (symtab_fns): Change type to std::vector.
2516 (add_symtab_fns): Adjust.
2517 (find_sym_fns): Adjust.
2518
2519 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
2520
2521 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2522 * arc-tdep.h (arc_arch_is_em): New function.
2523 (arc_arch_is_hs): Likewise.
2524
2525 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
2526
2527 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2528 parentheses in the declaration.
2529 (macro_lookup_inclusion): Likewise.
2530 (macro_lookup_definition): Likewise.
2531 * p-lang.h (pascal_builtin_types): Likewise.
2532 * tui/tui-data.c (tui_win_list): Likewise.
2533 * tui/tui-data.h (tui_win_list): Likewise.
2534 * utils.h (make_cleanup_free_section_addr_info): Likewise.
2535
2536 2017-10-11 Mark Rages <markrages@gmail.com>
2537
2538 * target-memory.c (block_boundaries): Fix for block address not
2539 aligned on block size.
2540
2541 2017-10-10 Pedro Alves <palves@redhat.com>
2542 Tom Tromey <tom@tromey.com>
2543
2544 * breakpoint.c (struct captured_breakpoint_query_args)
2545 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2546 (print_breakpoint): New.
2547 * breakpoint.h (print_breakpoint): Declare.
2548 * common/common-exceptions.h (enum return_reason): Remove
2549 references to catch_exceptions.
2550 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2551 Delete.
2552 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2553 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2554 * gdb.h: Delete.
2555 * gdbthread.h (thread_select): Declare.
2556 * mi/mi-cmd-break.c: Don't include gdb.h.
2557 (breakpoint_notify): Use print_breakpoint.
2558 * mi/mi-cmd-catch.c: Don't include gdb.h.
2559 * mi/mi-interp.c: Don't include gdb.h.
2560 (mi_print_breakpoint_for_event): New.
2561 (mi_breakpoint_created, mi_breakpoint_modified): Use
2562 mi_print_breakpoint_for_event.
2563 * mi/mi-main.c: Don't include gdb.h.
2564 (mi_cmd_thread_select): Parse the global thread ID here. Use
2565 thread_select instead of gdb_thread_select.
2566 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2567 of using gdb_list_thread_ids.
2568 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
2569 FILEIO_ENOSYS here.
2570 (remote_fileio_request): Use TRY/CATCH instead of
2571 catch_exceptions.
2572 * symfile-mem.c (struct symbol_file_add_from_memory_args)
2573 (symbol_file_add_from_memory_wrapper): Delete.
2574 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2575 * thread.c: Don't include gdb.h.
2576 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2577 (thread_alive): Use thread_select.
2578 (do_captured_thread_select): Delete, parts salvaged as ...
2579 (thread_select): ... this new function.
2580 (gdb_thread_select): Delete.
2581
2582 2017-10-10 Pedro Alves <palves@redhat.com>
2583 Tom Tromey <tom@tromey.com>
2584
2585 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2586 and reverse logic.
2587 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2588 No longer macros. Instead ...
2589 (enum wp_check_result): They're now values of this new
2590 enumeration.
2591 (watchpoint_check): Change return type to wp_check_result and
2592 parameter type to bpstat.
2593 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2594 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2595 catch_errors. Reverse logic of watchpoint_check call.
2596 (breakpoint_re_set_one): Now returns void and takes a breakpoint
2597 pointer as parameter.
2598 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2599 * common/common-exceptions.c (throw_exception_sjlj): Update
2600 comments to avoid mentioning catch_errors.
2601 * exceptions.c (catch_errors): Delete.
2602 * exceptions.h: Update comments to avoid mentioning catch_errors.
2603 (catch_errors_ftype, catch_errors): Delete.
2604 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2605 (hook_stop_stub): Delete.
2606 (restore_selected_frame): Change return type to void, and
2607 parameter type to const frame_id &.
2608 (restore_infcall_control_state): Use TRY/CATCH instead of
2609 catch_errors.
2610 * main.c (captured_command_loop): Return void and remove
2611 parameter. Remove references to catch_errors.
2612 (captured_main): Use TRY/CATCH instead of catch_errors.
2613 * objc-lang.c (objc_submethod_helper_data)
2614 (find_objc_msgcall_submethod_helper): Delete.
2615 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2616 catch_errors.
2617 * record-full.c (record_full_message): Return void.
2618 (record_full_message_args, record_full_message_wrapper): Delete.
2619 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2620 instead of catch_errors.
2621 * solib-aix.c (solib_aix_open_symbol_file_object): Change
2622 parameter type to int.
2623 * solib-darwin.c (open_symbol_file_object): Ditto.
2624 * solib-dsbt.c (open_symbol_file_object): Ditto.
2625 * solib-frv.c (open_symbol_file_object): Ditto.
2626 * solib-svr4.c (open_symbol_file_object): Ditto.
2627 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2628 * solib.c (update_solib_list): Use TRY/CATCH instead of
2629 catch_errors.
2630 * solist.h (struct target_so_ops) <open_symbol_file_object>:
2631 Change type.
2632 * symmisc.c (struct print_symbol_args): Remove.
2633 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2634 (print_symbol): Change type.
2635 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2636 and remove parameters.
2637 (catch_errors): New.
2638 (get_windows_debug_event): Adjust.
2639
2640 2017-10-09 Tom Tromey <tom@tromey.com>
2641
2642 * mi/mi-main.c (free_splay_tree): Remove.
2643 (list_available_thread_groups): Use splay_tree_up.
2644 * common/gdb_splay_tree.h: New file.
2645
2646 2017-10-09 Tom Tromey <tom@tromey.com>
2647
2648 * mi/mi-main.c (do_nothing): Remove.
2649 (list_available_thread_groups): Update.
2650
2651 2017-10-09 Pedro Alves <palves@redhat.com>
2652
2653 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2654 reading registers when switching context.
2655
2656 2017-10-09 John Baldwin <jhb@FreeBSD.org>
2657
2658 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2659 (fbsd_convert_siginfo): Likewise.
2660 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2661
2662 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
2663
2664 * configure.ac (try_guile_versions): Remove guile-2.2.
2665 * configure: Regenerate.
2666
2667 2017-10-09 Tom Tromey <tom@tromey.com>
2668
2669 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2670 (COMPILE.pre): Use $(CXX).
2671
2672 2017-10-09 Pedro Alves <palves@redhat.com>
2673
2674 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2675 Use bool.
2676 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2677 * cp-support.h (cp_remove_params): Now returns a
2678 gdb::unique_xmalloc_ptr.
2679 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2680 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2681 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2682 returning a gdb::unique_xmalloc_ptr.
2683 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2684 * stack.c (find_frame_funname): Adjust to cp_remove_params
2685 returning a gdb::unique_xmalloc_ptr.
2686
2687 2017-10-08 Tom Tromey <tom@tromey.com>
2688
2689 * dwarf2read.c (dwarf2_get_dwz_file): Use
2690 gdb::unique_xmalloc_ptr.
2691 (find_slot_in_mapped_hash): Likewise.
2692 (dwarf2_physname): Likewise.
2693 (create_dwo_unit_in_dwp_v1): Use std::string.
2694 (create_dwo_unit_in_dwp_v2): Likewise.
2695 (lookup_dwo_cutu): Likewise.
2696 (inherit_abstract_dies): Use std::vector.
2697 (read_array_type): Likewise.
2698 (dwarf_decode_macros): Remove unused declaration.
2699 (unsigned_int_compar): Remove.
2700 (dwarf2_build_psymtabs_hard): Use scoped_restore.
2701 (psymtabs_addrmap_cleanup): Remove.
2702
2703 2017-10-08 Tom Tromey <tom@tromey.com>
2704
2705 * frame-unwind.c (frame_unwind_try_unwinder): Update.
2706 * frame.h (frame_cleanup_after_sniffer): Declare.
2707 (frame_prepare_for_sniffer): Return void.
2708 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
2709 type of argument.
2710 (frame_prepare_for_sniffer): Return void.
2711
2712 2017-10-08 Tom Tromey <tom@tromey.com>
2713
2714 * utils.h (make_cleanup_value_free): Remove.
2715 * utils.c (do_value_free, struct cleanup): Remove.
2716 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2717 Use gdb_value_up.
2718 * value.h (struct value_deleter): New.
2719 (gdb_value_up): New typedef.
2720
2721 2017-10-08 Tom Tromey <tom@tromey.com>
2722
2723 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2724 (make_cleanup_free_search_symbols): Remove.
2725 (search_symbols): Return std::vector.
2726 (symbol_search::compare_search_syms): Now member of
2727 symbol_search. Change arguments.
2728 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
2729 (symtab_symbol_info, rbreak_command): Update.
2730 * symtab.h (struct symbol_search) <next>: Remove.
2731 Add constructors.
2732 (symbol_search::operator<): New function.
2733 (symbol_search::operator==): New function.
2734 (search_symbols): Remove std::vector.
2735 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2736 (symbol_search::compare_search_syms): Declare.
2737
2738 2017-10-06 Yao Qi <yao.qi@linaro.org>
2739
2740 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2741 arch/aarch64-insn.o.
2742 Remove one rule.
2743 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2744
2745 2017-10-06 Yao Qi <yao.qi@linaro.org>
2746
2747 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2748 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2749 arch/arm-linux.o respectively.
2750 * configure.tgt: Likewise.
2751
2752 2017-10-06 Yao Qi <yao.qi@linaro.org>
2753
2754 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2755 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2756
2757 2017-10-06 Pedro Alves <palves@redhat.com>
2758
2759 * windows-nat.c: Include <algorithm>.
2760
2761 2017-10-06 Yao Qi <yao.qi@linaro.org>
2762
2763 * configure.tgt (i386_tobjs): New variable.
2764 (amd64_tobjs): New variable.
2765 Set $cpu_obs and $os_obs.
2766
2767 2017-10-06 Yao Qi <yao.qi@linaro.org>
2768
2769 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2770 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2771 (clean): Remove object files and dependency files.
2772 (distclean): Remove the directory.
2773 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2774 * configure: Re-generated.
2775 * configure.tgt: Replace amd64.o with arch/amd64.o.
2776
2777 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2778
2779 PR build/22188
2780 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2781 and SETEND.
2782
2783 2017-10-05 Pedro Alves <palves@redhat.com>
2784
2785 * linux-nat.c (linux_child_follow_fork): When following the parent
2786 and detaching the child, consult the parent thread's architecture
2787 instead of the child's.
2788
2789 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2790
2791 * ax.h: Do not include "doublest.h".
2792 (union agent_val): Remove.
2793
2794 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2795
2796 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2797 (decimal_to_string): Return std::string object.
2798 (decimal_from_string): Accept std::string object. Return bool.
2799 (decimal_from_integral, decimal_from_doublest): Remove.
2800 (decimal_from_longest): Add prototype.
2801 (decimal_from_ulongest): Likewise.
2802 (decimal_to_longest): Likewise.
2803 (decimal_from_doublest): Likewise.
2804 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2805 (MAX_DECIMAL_STRING): Move here.
2806 (decimal_to_string): Return std::string object.
2807 (decimal_from_string): Accept std::string object. Return bool.
2808 (decimal_from_integral): Remove, replace by ...
2809 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2810 (decimal_to_longest): New function.
2811 (decimal_from_floating): Remove, replace by ...
2812 (decimal_from_doublest): ... this new function.
2813 (decimal_to_doublest): Update to new decimal_to_string interface.
2814
2815 * value.c (unpack_long): Use decimal_to_longest.
2816 * valops.c (value_cast): Use decimal_from_doublest instead of
2817 decimal_from_floating. Use decimal_from_[u]longest isntead of
2818 decimal_from_integral.
2819 * valarith.c (value_args_as_decimal): Likewise.
2820 * valprint.c (print_decimal_floating): Update to new
2821 decimal_to_string interface.
2822 * printcmd.c (printf_decfloat): Likewise.
2823 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2824
2825 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2826
2827 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2828 * gdbtypes.c: Include "floatformat.h".
2829 * value.c: Likewise.
2830 * m68k-tdep.c: Likewise.
2831
2832 * findvar.c: Do not include "floatformat.h".
2833 * amd64-darwin-tdep.c: Likewise.
2834 * arm-linux-tdep.c: Likewise.
2835 * i386-darwin-tdep.c: Likewise.
2836 * i387-tdep.c: Likewise.
2837 * m68k-linux-tdep.c: Likewise.
2838 * mep-tdep.c: Likewise.
2839 * mips-tdep.c: Likewise.
2840 * nios2-tdep.c: Likewise.
2841 * s390-linux-tdep.c: Likewise.
2842 * sparc-obsd-tdep.c: Likewise.
2843 * sparc-tdep.c: Likewise.
2844 * sparc64-tdep.c: Likewise.
2845 * spu-tdep.c: Likewise.
2846 * tic6x-tdep.c: Likewise.
2847 * tilegx-tdep.c: Likewise.
2848 * vax-tdep.c: Likewise.
2849 * xstormy16-tdep.c: Likewise.
2850 * xtensa-tdep.c: Likewise.
2851
2852 * top.c: Do not include "doublest.h".
2853 * aarch64-tdep.c: Likewise.
2854 * alpha-tdep.c: Likewise.
2855 * arm-linux-tdep.c: Likewise.
2856 * m68k-linux-tdep.c: Likewise.
2857 * tilegx-tdep.c: Likewise.
2858 * xstormy16-tdep.c: Likewise.
2859
2860 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2861
2862 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2863 (mipsn32_fbsd_sigframe): Define.
2864 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2865 for FreeBSD/mipsn32.
2866
2867 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2868
2869 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2870 AT_HWCAP.
2871
2872 2017-10-05 Tristan Gingold <tgingold@free.fr>
2873
2874 * MAINTAINERS (Misc): Update my email address.
2875
2876 2017-10-04 Pedro Alves <palves@redhat.com>
2877
2878 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2879 it instead of target_gdbarch.
2880 (get_remote_state, get_remote_packet_size): Adjust
2881 get_remote_arch_state calls, passing down target_gdbarch
2882 explicitly.
2883 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2884 'gdbarch' and use it instead of target_gdbarch.
2885 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2886 passing down target_gdbarch explicitly.
2887 (struct stop_reply) <arch>: New field.
2888 (remote_parse_stop_reply): Use the stopped thread's architecture,
2889 not the current inferior's. Save the architecture in the
2890 stop_reply.
2891 (process_stop_reply): Use the stop reply's architecture.
2892 (process_g_packet, remote_fetch_registers)
2893 (remote_prepare_to_store, store_registers_using_G)
2894 (remote_store_registers): Adjust get_remote_arch_state calls,
2895 using the regcache's architecture.
2896 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2897 passing down target_gdbarch explicitly.
2898 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2899 beneath instead of calling target_gdbarch.
2900 * target.c (default_thread_architecture): Use the specified
2901 inferior's architecture, instead of the current inferior's
2902 architecture (via target_gdbarch).
2903
2904 2017-10-04 Pedro Alves <palves@redhat.com>
2905
2906 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2907 case.
2908 (regcache_print): Handle !target_has_registers here instead.
2909
2910 2017-10-04 Pedro Alves <palves@redhat.com>
2911
2912 * frame.c (create_test_frame): Delete.
2913 * frame.h (create_test_frame): Delete.
2914 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2915 (class regcache_test): Delete.
2916 (test_target_has_registers, test_target_has_stack)
2917 (test_target_has_memory, test_target_prepare_to_store)
2918 (test_target_store_registers): New functions.
2919 (test_target_ops): New class.
2920 (register_to_value_test): Error out if there's already a
2921 process_stratum (or higher) target pushed. Create a fuller mock
2922 environment, with mock target_ops, inferior, address space, thread
2923 and inferior_ptid.
2924 * progspace.c (struct address_space): Move to ...
2925 * progspace.h (struct address_space): ... here.
2926 * regcache.h (regcache::~regcache, regcache::raw_write)
2927 [GDB_SELF_TEST]: No longer virtual.
2928
2929 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2930
2931 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2932
2933 2017-10-04 Pedro Alves <palves@redhat.com>
2934
2935 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2936 out of 'between TRY and CATCH'.
2937
2938 2017-10-04 Pedro Alves <palves@redhat.com>
2939
2940 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2941 * common/common-exceptions.h (TRY): Open an outermost scope.
2942 Expand intro comment.
2943 (CATCH): Reindent.
2944 (END_CATCH): Close the outermost scope.
2945 * completer.c (complete_line_internal): Add missing END_CATCH.
2946
2947 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2948
2949 * NEWS (Changes since GDB 8.0): Add entry about new
2950 'set-cwd-on-gdbserver' feature.
2951 (New remote packets): Add entry for QSetWorkingDir.
2952 * common/common-inferior.h (set_inferior_cwd): New prototype.
2953 * infcmd.c (set_inferior_cwd): Remove "static".
2954 (show_cwd_command): Expand text to include remote debugging.
2955 * remote.c: Add PACKET_QSetWorkingDir.
2956 (remote_protocol_features) <QSetWorkingDir>: New entry for
2957 PACKET_QSetWorkingDir.
2958 (extended_remote_set_inferior_cwd): New function.
2959 (extended_remote_create_inferior): Call
2960 "extended_remote_set_inferior_cwd".
2961 (_initialize_remote): Call "add_packet_config_cmd" for
2962 QSetWorkingDir.
2963
2964 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2965
2966 * NEWS (New commands): Mention "set/show cwd".
2967 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2968 "cd" command's help text.
2969 * common/common-inferior.h (get_inferior_cwd): New prototype.
2970 * infcmd.c (inferior_cwd_scratch): New global variable.
2971 (set_inferior_cwd): New function.
2972 (get_inferior_cwd): Likewise.
2973 (set_cwd_command): Likewise.
2974 (show_cwd_command): Likewise.
2975 (_initialize_infcmd): Add "set/show cwd" commands.
2976 * inferior.h (class inferior) <cwd>: New field.
2977 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2978 (fork_inferior): Change inferior's cwd before its execution.
2979 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2980 to CreateProcess.
2981
2982 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2983
2984 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2985 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2986 (COMMON_OBS): Add gdb_tilde_expand.o.
2987 * common/gdb_tilde_expand.c: New file.
2988 * common/gdb_tilde_expand.h: Likewise.
2989
2990 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2991
2992 * gdbarch.sh (objfile): Remove duplicate declaration.
2993 * gdbarch.h: Regenerate.
2994
2995 2017-10-03 Tom Tromey <tom@tromey.com>
2996
2997 * utils.c (internal_vproblem): Use string_vprintf.
2998
2999 2017-10-03 Tom Tromey <tom@tromey.com>
3000
3001 * printcmd.c (info_symbol_command): Use std::string.
3002
3003 2017-10-03 Tom Tromey <tom@tromey.com>
3004
3005 * top.c (gdb_safe_append_history): Use std::string.
3006
3007 2017-10-03 Tom Tromey <tom@tromey.com>
3008
3009 * event-top.c (stdin_event_handler): Update.
3010 * main.c (captured_main_1): Update.
3011 * top.h (make_delete_ui_cleanup): Remove.
3012 (struct ui): Add constructor and destructor.
3013 (new_ui, delete_ui): Remove.
3014 * top.c (make_delete_ui_cleanup): Remove.
3015 (new_ui_command): Use std::unique_ptr.
3016 (delete_ui_cleanup): Remove.
3017 (ui::ui): Rename from new_ui. Update.
3018 (free_ui): Remove.
3019 (ui::~ui): Rename from delete_ui. Update.
3020
3021 2017-10-03 Tom Tromey <tom@tromey.com>
3022
3023 * symfile.c (load_progress): Use gdb::byte_vector.
3024
3025 2017-10-03 Tom Tromey <tom@tromey.com>
3026
3027 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3028 declaration.
3029 * printcmd.c (x_command): Remove unused declaration.
3030 * symfile.c (symbol_file_command): Remove unused declaration.
3031
3032 2017-10-03 Tom Tromey <tom@tromey.com>
3033
3034 * utils.c (internal_vproblem): Use std::string.
3035 (defaulted_query): Likewise.
3036
3037 2017-10-03 Tom Tromey <tom@tromey.com>
3038
3039 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3040 * top.c (execute_command_to_string): Update.
3041 * utils.c (make_cleanup_restore_page_info): Remove.
3042 (do_restore_page_info_cleanup): Remove.
3043 (set_batch_flag_and_restore_page_info):
3044 New.
3045 (make_cleanup_restore_page_info): Remove.
3046 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3047 (~set_batch_flag_and_restore_page_info): New
3048 (make_cleanup_restore_uinteger): Remove.
3049 (make_cleanup_restore_integer): Remove.
3050 (struct restore_integer_closure): Remove.
3051 (restore_integer): Remove.
3052 * utils.h (struct set_batch_flag_and_restore_page_info): New
3053 class.
3054 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3055 (make_cleanup_restore_page_info): Remove.
3056 (make_cleanup_restore_uinteger) Remove.
3057 (make_cleanup_restore_integer) Remove.
3058
3059 2017-10-03 Tom Tromey <tom@tromey.com>
3060
3061 * record-full.h (record_full_gdb_operation_disable_set): Return
3062 scoped_restore_tmpl<int>.
3063 * infrun.c (adjust_pc_after_break): Update.
3064 (handle_signal_stop): Update.
3065 * record-full.c (record_full_gdb_operation_disable_set): Return
3066 scoped_restore_tmpl<int>.
3067 (record_full_wait_1, record_full_insert_breakpoint)
3068 (record_full_remove_breakpoint, record_full_save)
3069 (record_full_goto_insn): Update.
3070
3071 2017-10-02 Tom Tromey <tom@tromey.com>
3072
3073 PR rust/22236:
3074 * rust-lang.c (rust_val_print_str): New function.
3075 (val_print_struct): Call it.
3076 (rust_subscript): Preserve name of slice type.
3077
3078 2017-10-02 Tom Tromey <tom@tromey.com>
3079
3080 * rust-lang.c (rust_subscript): Handle slices in
3081 EVAL_AVOID_SIDE_EFFECTS case.
3082
3083 2017-10-02 Tom Tromey <tom@tromey.com>
3084
3085 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3086
3087 2017-10-02 Tom Tromey <tom@tromey.com>
3088
3089 * rust-lang.h (rust_slice_type): Add "extern".
3090
3091 2017-10-02 Tom Tromey <tom@tromey.com>
3092 Pedro Alves <palves@redhat.com>
3093
3094 * ada-lang.h (ada_exc_info::operator<): Make const.
3095 (ada_exc_info::operator==): Make const.
3096 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3097 Make const.
3098
3099 2017-09-29 Tom Tromey <tom@tromey.com>
3100
3101 * target.c (read_whatever_is_readable): Change type of "result".
3102 Update.
3103 (free_memory_read_result_vector): Remove.
3104 (read_memory_robust): Change return type. Update.
3105 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
3106 bin2hex, std::string.
3107 * target.h (memory_read_result_s): Remove typedef.
3108 (free_memory_read_result_vector): Remove.
3109 (read_memory_robust): Return std::vector.
3110
3111 2017-09-29 Tom Tromey <tom@tromey.com>
3112
3113 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3114
3115 2017-09-29 Tom Tromey <tom@tromey.com>
3116
3117 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3118 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
3119 operator< and operator==.
3120 (ada_exceptions_list): Return a std::vector.
3121 * ada-lang.c (ada_exc_info::operator<): Rename from
3122 compare_ada_exception_info.
3123 (ada_exc_info::operator==): New.
3124 (sort_remove_dups_ada_exceptions_list): Change type of
3125 "exceptions".
3126 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3127 (ada_add_global_exceptions): Likewise.
3128 (ada_exceptions_list_1): Return a std::vector.
3129 (ada_exceptions_list): Likewise.
3130
3131 2017-09-29 Tom Tromey <tom@tromey.com>
3132
3133 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3134 'std::set *'.
3135 (print_one_inferior): Update.
3136 (free_vector_of_ints): Remove.
3137 (list_available_thread_groups): Change "ids" to std::set.
3138 (mi_cmd_list_thread_groups): Update.
3139 (struct collect_cores_data) <core>: Now a std::set.
3140 (collect_cores): Update.
3141 (unique): Remove.
3142 (print_one_inferior): Update.
3143
3144 2017-09-29 Tom Tromey <tom@tromey.com>
3145
3146 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3147 (mi_execute_async_cli_command): Likewise.
3148 (mi_cmd_trace_frame_collected): Use field_fmt.
3149
3150 2017-09-29 Tom Tromey <tom@tromey.com>
3151
3152 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3153 gdb::byte_vector.
3154
3155 2017-09-29 Tom Tromey <tom@tromey.com>
3156
3157 * mi/mi-parse.c (mi_parse): Remove unused declaration.
3158
3159 2017-09-29 Tom Tromey <tom@tromey.com>
3160
3161 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3162
3163 2017-09-29 Tom Tromey <tom@tromey.com>
3164
3165 * varobj.h (varobj_gen_name): Return std::string.
3166 * varobj.c (varobj_gen_name): Return std::string.
3167 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3168 (mi_cmd_var_delete): Don't copy "name".
3169
3170 2017-09-29 Tom Tromey <tom@tromey.com>
3171
3172 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3173 (mi_cmd_break_insert_1): Update.
3174
3175 2017-09-29 Tom Tromey <tom@tromey.com>
3176
3177 * target.h (make_scoped_defer_target_commit_resume): Update.
3178 * target.c (make_scoped_defer_target_commit_resume): Rename from
3179 make_cleanup_defer_target_commit_resume. Return a
3180 scoped_restore.
3181 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3182
3183 2017-09-29 Tom Tromey <tom@tromey.com>
3184
3185 * main.c (captured_main_1): Remove unused declaration.
3186 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3187
3188 2017-09-29 Tom Tromey <tom@tromey.com>
3189
3190 * symtab.c (search_symbols): Remove unused outer cleanup.
3191 (make_source_files_completion_list): Remove unused declaration.
3192
3193 2017-09-29 Tom Tromey <tom@tromey.com>
3194
3195 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3196
3197 2017-09-29 Tom Tromey <tom@tromey.com>
3198
3199 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3200 gdb::byte_vector.
3201
3202 2017-09-29 Tom Tromey <tom@tromey.com>
3203
3204 * complaints.c (vcomplaint): Use std::string.
3205
3206 2017-09-29 Tom Tromey <tom@tromey.com>
3207
3208 * tracepoint.c (trace_variable_command): Use std::string.
3209 (encode_actions_1): Remove unused declarations.
3210 (create_tsv_from_upload): Use std::string.
3211
3212 2017-09-29 Tom Tromey <tom@tromey.com>
3213
3214 * cp-support.c (gdb_demangle): Use std::string.
3215
3216 2017-09-29 Tom Tromey <tom@tromey.com>
3217
3218 * stack.c (parse_frame_specification): Use std::string
3219 (info_frame_command): Use gdb::unique_xmalloc_ptr.
3220
3221 2017-09-29 Tom Tromey <tom@tromey.com>
3222
3223 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3224
3225 2017-09-29 Tom Tromey <tom@tromey.com>
3226
3227 * utils.c (vfprintf_maybe_filtered): Use std::string.
3228 (vfprintf_unfiltered): Likewise.
3229
3230 2017-09-29 Tom Tromey <tom@tromey.com>
3231
3232 * event-top.c (top_level_prompt): Return std::string.
3233 (display_gdb_prompt): Update.
3234
3235 2017-09-29 Tom Tromey <tom@tromey.com>
3236
3237 * unittests/common-utils-selftests.c (format): New function.
3238 (string_vprintf_tests): New function.
3239 (_initialize_common_utils_selftests): Register new tests.
3240 * common/common-utils.c (string_vprintf): New function.
3241 * common/common-utils.h (string_vprintf): Declare.
3242
3243 2017-09-29 Pedro Alves <palves@redhat.com>
3244
3245 * common/rsp-low.c (unpack_varlen_hex): Constify.
3246 * common/rsp-low.h (unpack_varlen_hex): Constify.
3247 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3248 Constify.
3249 * remote.c (remote_set_permissions, read_ptid)
3250 (remote_current_thread, remote_get_threads_with_qthreadinfo)
3251 (remote_static_tracepoint_marker_at)
3252 (remote_static_tracepoint_markers_by_strid)
3253 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3254 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3255 (parse_tracepoint_definition, parse_tsv_definition)
3256 (parse_static_tracepoint_marker_definition): Constify.
3257 * tracepoint.h (parse_static_tracepoint_marker_definition)
3258 (parse_trace_status, parse_tracepoint_status)
3259 (parse_tracepoint_definition, parse_tsv_definition): Constify.
3260
3261 2017-09-29 Pedro Alves <palves@redhat.com>
3262
3263 * remote.c (target_buf, target_buf_size): Delete.
3264 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3265 Use the connection's packet buffer instead.
3266 All callers adjusted.
3267 (_initialize_remote): Remove references to target_buf and
3268 target_buf_size.
3269
3270 2017-09-28 Pedro Alves <palves@redhat.com>
3271
3272 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3273 unittests/common-utils-selftests.c.
3274 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3275 (COMMON_OBS): Remove utils-selftests.o.
3276 * utils-selftests.c: Move to ...
3277 * unittests/common-utils-selftests.c: ... here and rename self
3278 test to "string_printf".
3279
3280 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3281
3282 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3283 having NULL cus or tus.
3284
3285 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3286
3287 * arm-tdep.c: (convert_from_extended): Remove.
3288 (convert_to_extended): Likewise.
3289 (arm_extract_return_value): Use convert_typed_floating.
3290 (arm_store_return_value): Likewise.
3291
3292 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3293 * sh-tdep.c: Do not include "floatformat.h".
3294 (sh_littlebyte_bigword_type): New function.
3295 (sh_register_convert_to_virtual): Use convert_typed_floating.
3296 (sh_register_convert_to_raw): Likewise.
3297 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3298 (sh64_littlebyte_bigword_type): New function.
3299 (sh64_extract_return_value): Use convert_typed_floating.
3300 (sh64_register_convert_to_virtual): Likewise.
3301 (sh64_register_convert_to_raw): Likewise.
3302
3303 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3304
3305 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
3306 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
3307
3308 * gdbtypes.h (union type_specific): Make field floatformat hold
3309 just a single struct floatformat, not an array.
3310 (floatformat_from_type): Move here.
3311 * gdbtypes.c (floatformat_from_type): Move here. Update to
3312 changed TYPE_FLOATFORMAT definition.
3313 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
3314 (recursive_dump_type): Likewise.
3315 (init_float_type): Install correct floatformat for byte order.
3316 (arch_float_type): Likewise.
3317
3318 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
3319
3320 * gdbtypes.c (init_type): Change incoming argument from
3321 length-in-bytes to length-in-bits. Assert length is a
3322 multiple of TARGET_CHAR_BITS.
3323 (arch_type, arch_flags_type): Likewise.
3324 (init_integer_type): Update call to init_type.
3325 (init_character_type): Likewise.
3326 (init_boolean_type): Likewise.
3327 (init_float_type): Likewise.
3328 (init_decfloat_type): Likewise.
3329 (init_complex_type): Likewise.
3330 (init_pointer_type): Likewise.
3331 (objfile_type): Likewise.
3332 (arch_integer_type): Update call to arch_type.
3333 (arch_character_type): Likewise.
3334 (arch_boolean_type): Likewise.
3335 (arch_float_type): Likewise.
3336 (arch_decfloat_type): Likewise.
3337 (arch_complex_type): Likewise.
3338 (arch_pointer_type): Likewise.
3339 (gdbtypes_post_init): Likewise.
3340
3341 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
3342 (read_base_type): Likewise.
3343 * mdebugread.c (basic_type): Likewise.
3344 * stabsread.c (dbx_init_float_type): Likewise.
3345 (rs6000_builtin_type): Likewise.
3346 (read_range_type): Likewise. Also, fix call to init_integer_type
3347 with erroneous length argument.
3348
3349 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
3350 * d-lang.c (build_d_types): Likewise.
3351 * f-lang.c (build_fortran_types): Likewise.
3352 * go-lang.c (build_go_types): Likewise.
3353 * opencl-lang.c (build_opencl_types): Likewise.
3354 * jit.c (finalize_symtab): Likewise.
3355 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3356 (build_std_type_info_type): Likewise.
3357 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
3358 update call to arch_flags_type.
3359
3360 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
3361 arch_type.
3362 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
3363 * windows-tdep.c (windows_get_tlb_type): Likewise.
3364
3365 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3366 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3367 * m32c-tdep.c (make_types): Likewise.
3368 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3369 (rl78_psw_type): Update call to arch_flags_type.
3370 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3371 * rx-tdep.c (rx_psw_type): Likewise.
3372 (rx_fpsw_type): Likewise.
3373 * sparc-tdep.c (sparc_psr_type): Likewise.
3374 (sparc_fsr_type): Likewise.
3375 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3376 (sparc64_ccr_type): Likewise.
3377 (sparc64_fsr_type): Likewise.
3378 (sparc64_fprs_type): Likewise.
3379
3380 2017-09-27 Tom Tromey <tom@tromey.com>
3381
3382 * findcmd.c (find_command): Constify.
3383
3384 2017-09-27 Tom Tromey <tom@tromey.com>
3385
3386 * ada-tasks.c (task_command_1, task_command): Constify.
3387
3388 2017-09-27 Tom Tromey <tom@tromey.com>
3389
3390 * symtab.c (maintenance_print_symbol_cache)
3391 (maintenance_flush_symbol_cache)
3392 (maintenance_print_symbol_cache_statistics): Constify.
3393
3394 2017-09-27 Tom Tromey <tom@tromey.com>
3395
3396 * inferior.c (detach_inferior_command, kill_inferior_command)
3397 (inferior_command): Constify.
3398
3399 2017-09-27 Tom Tromey <tom@tromey.com>
3400
3401 * regcache.c (regcache_print, maintenance_print_registers)
3402 (maintenance_print_raw_registers)
3403 (maintenance_print_cooked_registers)
3404 (maintenance_print_register_groups)
3405 (maintenance_print_remote_registers): Constify.
3406
3407 2017-09-27 Tom Tromey <tom@tromey.com>
3408
3409 * printcmd.c (map_display_numbers, undisplay_command)
3410 (enable_disable_display_command, enable_display_command)
3411 (disable_display_command): Constify.
3412
3413 2017-09-27 Tom Tromey <tom@tromey.com>
3414
3415 * breakpoint.h (delete_command): Don't declare.
3416 * breakpoint.c (delete_command, enable_once_command)
3417 (enable_count_command, enable_delete_command, breakpoint_1)
3418 (maintenance_info_breakpoints, stopin_command, stopat_command)
3419 (delete_command, delete_trace_command, save_breakpoints)
3420 (save_breakpoints_command, save_tracepoints_command): Constify.
3421
3422 2017-09-27 Tom Tromey <tom@tromey.com>
3423
3424 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3425 (skip_ws, extract_identifier, macro_define_command)
3426 (macro_undef_command, macro_list_command): Constify.
3427
3428 2017-09-27 Tom Tromey <tom@tromey.com>
3429
3430 * infcmd.c (environment_info, set_environment_command)
3431 (unset_environment_command, path_info, info_proc_cmd_1)
3432 (info_proc_cmd_mappings, info_proc_cmd_stat)
3433 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3434 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3435
3436 2017-09-27 Tom Tromey <tom@tromey.com>
3437
3438 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3439 Constify.
3440
3441 2017-09-27 Tom Tromey <tom@tromey.com>
3442
3443 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3444
3445 2017-09-27 Tom Tromey <tom@tromey.com>
3446
3447 * demangle.c (demangle_command): Constify.
3448
3449 2017-09-27 Tom Tromey <tom@tromey.com>
3450
3451 * progspace.c (maintenance_info_program_spaces_command):
3452 Constify.
3453
3454 2017-09-27 Tom Tromey <tom@tromey.com>
3455
3456 * compile/compile.c (check_raw_argument, compile_file_command)
3457 (compile_code_command, compile_print_command): Constify.
3458
3459 2017-09-27 Tom Tromey <tom@tromey.com>
3460
3461 * reggroups.c (maintenance_print_reggroups): Constify.
3462
3463 2017-09-27 Tom Tromey <tom@tromey.com>
3464
3465 * dwarf2read.c (save_gdb_index_command): Constify.
3466
3467 2017-09-27 Tom Tromey <tom@tromey.com>
3468
3469 * stap-probe.c (info_probes_stap_command): Constify.
3470
3471 2017-09-27 Tom Tromey <tom@tromey.com>
3472
3473 * fork-child.c (unset_exec_wrapper_command): Constify.
3474
3475 2017-09-27 Tom Tromey <tom@tromey.com>
3476
3477 * btrace.c (get_uint, get_context_size, no_chunk)
3478 (maint_btrace_packet_history_cmd)
3479 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3480 (maint_info_btrace_cmd): Constify.
3481
3482 2017-09-27 Tom Tromey <tom@tromey.com>
3483
3484 * reverse.c (delete_bookmark_command): Constify.
3485
3486 2017-09-27 Tom Tromey <tom@tromey.com>
3487
3488 * remote.c (set_memory_packet_size)
3489 (set_memory_write_packet_size, show_memory_write_packet_size)
3490 (set_memory_read_packet_size, show_memory_read_packet_size)
3491 (compare_sections_command, packet_command, remote_put_command)
3492 (remote_get_command, remote_delete_command): Constify.
3493
3494 2017-09-27 Tom Tromey <tom@tromey.com>
3495
3496 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3497 (set_mipsfpu_double_command, set_mipsfpu_none_command)
3498 (set_mipsfpu_auto_command): Constify.
3499
3500 2017-09-27 Tom Tromey <tom@tromey.com>
3501
3502 * cli/cli-cmds.h (cd_command): Constify.
3503 * cli/cli-cmds.c (cd_command): Constify.
3504
3505 2017-09-27 Tom Tromey <tom@tromey.com>
3506
3507 * thread.c (thread_name_command, thread_find_command): Constify.
3508
3509 2017-09-27 Tom Tromey <tom@tromey.com>
3510
3511 * probe.c (enable_probes_command, disable_probes_command):
3512 Constify.
3513
3514 2017-09-27 Tom Tromey <tom@tromey.com>
3515
3516 * symfile.c (symbol_file_command): Constify.
3517 * gdbcore.h (deprecated_file_changed_hook): Constify.
3518 * exec.c (deprecated_file_changed_hook, exec_file_command)
3519 (file_command): Constify.
3520 * defs.h (symbol_file_command): Constify.
3521
3522 2017-09-27 Tom Tromey <tom@tromey.com>
3523
3524 * remote-fileio.c (set_system_call_allowed)
3525 (show_system_call_allowed): Constify.
3526
3527 2017-09-27 Tom Tromey <tom@tromey.com>
3528
3529 * tracepoint.c (delete_trace_variable_command)
3530 (tfind_end_command, tfind_start_command, tfind_pc_command)
3531 (tfind_tracepoint_command, tfind_line_command)
3532 (tfind_range_command, tfind_outside_command): Constify.
3533
3534 2017-09-27 Tom Tromey <tom@tromey.com>
3535
3536 * ax-gdb.c (maint_agent_printf_command, agent_command)
3537 (agent_eval_command): Constify.
3538
3539 2017-09-27 Tom Tromey <tom@tromey.com>
3540
3541 * tracepoint.c (info_scope_command): Constify.
3542 * python/python.c (gdbpy_decode_line): Constify.
3543 * python/py-breakpoint.c (bppy_init): Constify.
3544 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3545 * location.h: (new_linespec_location)
3546 (string_to_event_location_basic, string_to_event_location):
3547 Constify.
3548 * location.c (new_linespec_location)
3549 (string_to_event_location_basic, string_to_event_location):
3550 Constify.
3551 * linespec.h (decode_line_with_current_source)
3552 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3553 * linespec.c (linespec_lex_to_end)
3554 (decode_line_with_current_source)
3555 (decode_line_with_last_displayed): Constify.
3556 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3557 Constify.
3558 * cli/cli-cmds.c (edit_command, list_command): Constify.
3559 * breakpoint.h (until_break_command, watch_command_wrapper)
3560 (awatch_command_wrapper, rwatch_command_wrapper)
3561 (init_ada_exception_breakpoint): Constify.
3562 * breakpoint.c (break_command_1, dprintf_command)
3563 (break_range_command, watch_command_wrapper)
3564 (rwatch_command_wrapper, awatch_command_wrapper)
3565 (until_break_command, init_ada_exception_breakpoint)
3566 (strace_marker_create_sals_from_location, trace_command)
3567 (ftrace_command, strace_command, struct tracepoint): Constify.
3568 * ax-gdb.c (agent_command_1): Constify.
3569 * ada-lang.c (ada_exception_sal): Constify.
3570
3571 2017-09-27 Tom Tromey <tom@tromey.com>
3572
3573 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3574 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3575 (get_context_size, no_chunk, get_insn_history_modifiers)
3576 (cmd_record_insn_history, get_call_history_modifiers)
3577 (cmd_record_call_history): Constify.
3578
3579 2017-09-27 Tom Tromey <tom@tromey.com>
3580
3581 * source.c (show_substitute_path_command)
3582 (unset_substitute_path_command, set_substitute_path_command):
3583 Constify.
3584
3585 2017-09-27 Tom Tromey <tom@tromey.com>
3586
3587 * typeprint.c (maintenance_print_type): Constify.
3588 * maint.c (maintenance_dump_me, maintenance_demangle)
3589 (maintenance_time_display, maintenance_info_sections)
3590 (maintenance_print_statistics, maintenance_deprecate)
3591 (maintenance_undeprecate): Constify.
3592 (maintenance_do_deprecate): Constify. Use std::string.
3593 (maintenance_selftest): Constify.
3594 * gdbtypes.h (maintenance_print_type): Constify.
3595
3596 2017-09-27 Tom Tromey <tom@tromey.com>
3597
3598 * hppa-tdep.c (unwind_command): Constify.
3599
3600 2017-09-27 Tom Tromey <tom@tromey.com>
3601
3602 * target-descriptions.c (unset_tdesc_filename_cmd)
3603 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3604 Constify.
3605
3606 2017-09-27 Tom Tromey <tom@tromey.com>
3607
3608 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3609
3610 2017-09-27 Tom Tromey <tom@tromey.com>
3611
3612 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3613
3614 2017-09-27 Tom Tromey <tom@tromey.com>
3615
3616 * tui/tui-regs.c (tui_reg_command): Constify.
3617
3618 2017-09-27 Tom Tromey <tom@tromey.com>
3619
3620 * skip.c (skip_file_command, skip_function_command)
3621 (skip_enable_command, skip_disable_command, skip_delete_command):
3622 Constify.
3623
3624 2017-09-27 Tom Tromey <tom@tromey.com>
3625
3626 * record-btrace.c (cmd_record_btrace_bts_start)
3627 (cmd_record_btrace_pt_start): Constify.
3628
3629 2017-09-27 Tom Tromey <tom@tromey.com>
3630
3631 * symmisc.c (maintenance_print_symbols)
3632 (maintenance_print_msymbols, maintenance_print_objfiles)
3633 (maintenance_info_symtabs, maintenance_check_symtabs)
3634 (maintenance_expand_symtabs, maintenance_info_line_tables):
3635 Constify.
3636
3637 2017-09-27 Tom Tromey <tom@tromey.com>
3638
3639 * top.c (new_ui_command): Constify.
3640
3641 2017-09-27 Tom Tromey <tom@tromey.com>
3642
3643 * symfile.c (add_symbol_file_command)
3644 (remove_symbol_file_command, list_overlays_command)
3645 (map_overlay_command, unmap_overlay_command)
3646 (overlay_auto_command, overlay_manual_command)
3647 (overlay_off_command, overlay_load_command): Constify.
3648
3649 2017-09-27 Tom Tromey <tom@tromey.com>
3650
3651 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3652 (info_spu_mailbox_command, info_spu_dma_command)
3653 (info_spu_proxydma_command): Constify.
3654
3655 2017-09-27 Tom Tromey <tom@tromey.com>
3656
3657 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3658
3659 2017-09-27 Tom Tromey <tom@tromey.com>
3660
3661 * cli/cli-script.c (user_defined_command): Constify.
3662
3663 2017-09-27 Tom Tromey <tom@tromey.com>
3664
3665 * cli/cli-dump.c (dump_memory_command, dump_value_command)
3666 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3667 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3668 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3669 (dump_binary_value, append_binary_memory, append_binary_value):
3670 Constify.
3671 (struct dump_context) <func>: Constify.
3672 (add_dump_command): Update.
3673
3674 2017-09-27 Tom Tromey <tom@tromey.com>
3675
3676 * cli/cli-cmds.c (show_version, show_configuration)
3677 (source_command, show_user): Constify.
3678
3679 2017-09-27 Tom Tromey <tom@tromey.com>
3680
3681 * target.c (maintenance_print_target_stack): Constify.
3682
3683 2017-09-27 Tom Tromey <tom@tromey.com>
3684
3685 * interps.c (interpreter_exec_cmd): Constify.
3686
3687 2017-09-27 Tom Tromey <tom@tromey.com>
3688
3689 * record-full.c (cmd_record_full_restore): Constify.
3690
3691 2017-09-27 Tom Tromey <tom@tromey.com>
3692
3693 * memattr.c (enable_mem_command, disable_mem_command)
3694 (delete_mem_command): Constify.
3695
3696 2017-09-27 Tom Tromey <tom@tromey.com>
3697
3698 * value.c (show_convenience): Constify.
3699
3700 2017-09-27 Tom Tromey <tom@tromey.com>
3701
3702 * gdbcore.h (core_file_command): Update.
3703 * corefile.c (core_file_command): Constify.
3704
3705 2017-09-27 Tom Tromey <tom@tromey.com>
3706
3707 * user-regs.c (maintenance_print_user_registers): Constify.
3708
3709 2017-09-27 Tom Tromey <tom@tromey.com>
3710
3711 * cp-namespace.c (maintenance_cplus_namespace): Constify.
3712
3713 2017-09-27 Tom Tromey <tom@tromey.com>
3714
3715 * cp-support.c (first_component_command): Constify.
3716
3717 2017-09-27 Tom Tromey <tom@tromey.com>
3718
3719 * psymtab.c (maintenance_print_psymbols)
3720 (maintenance_info_psymtabs, maintenance_check_psymtabs):
3721 Constify.
3722
3723 2017-09-27 Tom Tromey <tom@tromey.com>
3724
3725 * windows-tdep.c (display_tib): Constify.
3726
3727 2017-09-27 Tom Tromey <tom@tromey.com>
3728
3729 * linux-fork.c (delete_checkpoint_command)
3730 (detach_checkpoint_command): Constify.
3731
3732 2017-09-27 Tom Tromey <tom@tromey.com>
3733
3734 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3735
3736 2017-09-27 Tom Tromey <tom@tromey.com>
3737
3738 * arc-tdep.c (dump_arc_instruction_command): Constify.
3739
3740 2017-09-27 Tom Tromey <tom@tromey.com>
3741
3742 * valprint.c (set_radix, show_radix): Constify.
3743
3744 2017-09-27 Tom Tromey <tom@tromey.com>
3745
3746 * dtrace-probe.c (info_probes_dtrace_command): Constify.
3747
3748 2017-09-27 Tom Tromey <tom@tromey.com>
3749
3750 * command.h (not_just_help_class_command): Update.
3751 * cli/cli-decode.h (not_just_help_class_command): Update.
3752 * cli/cli-decode.c (not_just_help_class_command): Constify.
3753
3754 2017-09-27 Tom Tromey <tom@tromey.com>
3755
3756 * gdb_bfd.c (maintenance_info_bfds): Constify.
3757
3758 2017-09-27 Tom Tromey <tom@tromey.com>
3759
3760 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3761 overloads.
3762 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3763 (do_const_cfunc): New function.
3764 (cmd_cfunc_eq): New overload.
3765 (cli_user_command_p): Check do_const_cfunc.
3766 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3767 const_cfunc.
3768 * command.h (add_cmd): Add const overload and no-function
3769 overload.
3770 (set_cmd_cfunc): Add const overload.
3771 (cmd_const_cfunc_ftype): Declare.
3772 (cmd_cfunc_eq): Add const overload.
3773 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3774 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3775 overload.
3776
3777 2017-09-27 Tom Tromey <tom@tromey.com>
3778
3779 * macroexp.c (get_next_token_for_substitution): New function.
3780 (substitute_args): Call it. Check for __VA_OPT__.
3781
3782 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3783 Pedro Alves <palves@redhat.com>
3784
3785 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3786 producer_is_icc_lt_14.
3787 (producer_is_icc_lt_14): New function.
3788 (check_producer): Add code for checking version of ICC.
3789 (producer_is_icc): Move to producer.c.
3790 (read_structure_type): Restrict ICC workaround to ICC<14.
3791 * producer.c: Include selftest.h.
3792 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3793 New functions.
3794 * producer.h (producer_is_icc): New declaration.
3795
3796 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3797
3798 * Makefile.in (SFILES): Add producer.c.
3799 (COMMON_OBS): Add producer.o
3800 * amd64-tdep.c (producer.h): Add new include.
3801 * dwarf2read.c (producer.h): Add new include.
3802 * producer.c: New file.
3803 * producer.h: New file.
3804 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3805 producer.c.
3806 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3807 producer.h.
3808
3809 2017-09-26 Matthias Klose <doko@ubuntu.com>
3810
3811 * configure.ac: Search ncursesw before ncurses.
3812 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3813 * gdb_curses.h: Include <ncursesw/ncurses.h>
3814 * config.in, configure: Regenerate.
3815
3816 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3817
3818 PR gdb/22185
3819 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3820 obsolete.
3821 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3822 Remove i386sol2 support.
3823 * configure.nat <i386sol2>: Remove.
3824 <sol2-64>: Fold into ...
3825 <sol2>: ... this.
3826 Move common settings to default section.
3827 Add sol-thread.o.
3828 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3829 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3830 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3831 <i[34567]86-*-solaris*>: Remove.
3832 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3833
3834 * configure.ac: Remove wctype in libw check.
3835 (_MSE_INT_H): Don't define on Solaris 7-9.
3836 <solaris*>: Remove libthread_db.so.1 check.
3837 * configure: Regenerate.
3838 * config.in: Regenerate.
3839
3840 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3841 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3842 (gdb_ps_size_t): Remove.
3843 Use base types in users.
3844 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3845
3846 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3847
3848 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3849
3850 PR build/22206
3851 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3852 (adi_is_addr_mapped): Likewise.
3853 (PSR_ICC): Don't redefine.
3854 (PSR_IMPL): Likewise.
3855
3856 2017-09-25 Tom Tromey <tom@tromey.com>
3857
3858 * regcache.c (regcache::dump): Use string_printf.
3859
3860 2017-09-25 Tom Tromey <tom@tromey.com>
3861
3862 * regcache.c (class regcache_invalidator): New.
3863 (struct register_to_invalidate): Remove.
3864 (make_cleanup_regcache_invalidate): Remove.
3865 (regcache::raw_write): Use regcache_invalidator.
3866
3867 2017-09-25 Tom Tromey <tom@tromey.com>
3868
3869 * spu-tdep.c (spu2ppu_sniffer): Update.
3870 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3871 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3872 Remove.
3873 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3874 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3875 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3876 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3877 (frame_pop): Update.
3878
3879 2017-09-25 Tom Tromey <tom@tromey.com>
3880
3881 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3882 * regcache.h (regcache_xfree): Don't declare.
3883 * regcache.c (regcache_xfree): Remove.
3884 (do_regcache_xfree): Use delete.
3885 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3886 * linux-fork.c (free_fork): Use delete.
3887 (fork_save_infrun_state): Likewise.
3888 * jit.c (jit_dealloc_cache): Use delete.
3889 * infrun.c (discard_infcall_suspend_state): Use delete.
3890
3891 2017-09-25 Tom Tromey <tom@tromey.com>
3892
3893 * regcache.h (regcache_xmalloc): Don't declare.
3894 (regcache_raw_set_cached_value): Update comment.
3895 * regcache.c (regcache_xmalloc): Remove.
3896 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3897 * jit.c (jit_frame_sniffer): Use new.
3898 * frame.c (frame_save_as_regcache): Use new.
3899
3900 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3901
3902 * NEWS: Advertise support for guarded-storage registers on IBM z.
3903
3904 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3905
3906 * s390-linux-nat.c (have_regset_gs): New static variable.
3907 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3908 control block and guarded-storage broadcast control regsets.
3909 (s390_read_description): Detect whether the target has
3910 guarded-storage support, return appropriate tdesc.
3911 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3912 (features/s390x-gs-linux64.c): Likewise.
3913 (struct gdbarch_tdep) <have_gs>: New field.
3914 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3915 (s390_gsbc_regset): New variables.
3916 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3917 and s390_gsbc_regset, if applicable.
3918 (s390_core_read_description): Check whether core file was from a
3919 target with guarded-storage support; include appropriate regsets.
3920 (s390_gdbarch_init): Add registers for guarded-storage support.
3921 (_initialize_s390_tdep): Initialize new target descriptions that
3922 include registers for guarded-storage support.
3923 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3924 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3925 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3926 (S390_NUM_REGS): Adjust macro definition.
3927 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3928 (tdesc_s390x_gs_linux64): New declarations.
3929
3930 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3931
3932 * features/s390-gs-linux64.xml: New file.
3933 * features/s390-gs.xml: New file.
3934 * features/s390-gsbc.xml: New file.
3935 * features/s390x-gs-linux64.xml: New file.
3936 * features/Makefile (WHICH): Add s390-gs-linux64 and
3937 s390x-gs-linux64.
3938 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3939 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3940 * features/s390-gs-linux64.c: New generated file.
3941 * features/s390x-gs-linux64.c: New file.
3942 * regformats/s390-gs-linux64.dat: New file.
3943 * regformats/s390x-gs-linux64.dat: New file.
3944
3945 2017-09-23 Tom Tromey <tom@tromey.com>
3946
3947 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3948
3949 2017-09-22 Tom Tromey <tom@tromey.com>
3950
3951 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3952 type to scoped_restore_tmpl.
3953 <scoped_input_handler>: Initialize m_quit_handler directly.
3954
3955 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3956
3957 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3958 (cd_command): Likewise. Free "current_directory" before
3959 assigning to it.
3960 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3961 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3962 * top.c (gdb_dirbuf): Remove global declaration.
3963 * top.h (gdb_dirbuf): Likewise.
3964
3965 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3966
3967 * gnulib/aclocal.m4: Regenerate.
3968 * gnulib/config.in: Regenerate.
3969 * gnulib/configure: Regenerate.
3970 * gnulib/import/Makefile.am: Regenerate.
3971 * gnulib/import/Makefile.in: Regenerate.
3972 * gnulib/import/assure.h: New file.
3973 * gnulib/import/at-func.c: Likewise
3974 * gnulib/import/chdir-long.c: New file.
3975 * gnulib/import/chdir-long.h: New file.
3976 * gnulib/import/cloexec.c: New file.
3977 * gnulib/import/cloexec.h: New file.
3978 * gnulib/import/close.c: New file.
3979 * gnulib/import/closedir.c: New file.
3980 * gnulib/import/dirent-private.h: New file.
3981 * gnulib/import/dup-safer.c: New file.
3982 * gnulib/import/dup.c: New file.
3983 * gnulib/import/dup2.c: New file.
3984 * gnulib/import/error.c: New file.
3985 * gnulib/import/error.h: New file.
3986 * gnulib/import/exitfail.c: New file.
3987 * gnulib/import/exitfail.h: New file.
3988 * gnulib/import/fchdir.c: New file.
3989 * gnulib/import/fcntl.c: New file.
3990 * gnulib/import/fcntl.in.h: New file.
3991 * gnulib/import/fd-hook.c: New file.
3992 * gnulib/import/fd-hook.h: New file.
3993 * gnulib/import/fd-safer.c: New file.
3994 * gnulib/import/fdopendir.c: New file.
3995 * gnulib/import/filename.h: New file.
3996 * gnulib/import/filenamecat-lgpl.c: New file.
3997 * gnulib/import/filenamecat.h: New file.
3998 * gnulib/import/fstat.c: New file.
3999 * gnulib/import/fstatat.c: New file.
4000 * gnulib/import/getcwd-lgpl.c: New file.
4001 * gnulib/import/getcwd.c: New file.
4002 * gnulib/import/getdtablesize.c: New file.
4003 * gnulib/import/getlogin_r.c: New file.
4004 * gnulib/import/getprogname.c: New file.
4005 * gnulib/import/getprogname.h: New file.
4006 * gnulib/import/gettext.h: New file.
4007 * gnulib/import/glob-libc.h: New file.
4008 * gnulib/import/glob.c: New file.
4009 * gnulib/import/glob.in.h: New file.
4010 * gnulib/import/intprops.h: New file.
4011 * gnulib/import/m4/chdir-long.m4: New file.
4012 * gnulib/import/m4/close.m4: New file.
4013 * gnulib/import/m4/closedir.m4: New file.
4014 * gnulib/import/m4/d-ino.m4: New file.
4015 * gnulib/import/m4/d-type.m4: New file.
4016 * gnulib/import/m4/dup.m4: New file.
4017 * gnulib/import/m4/dup2.m4: New file.
4018 * gnulib/import/m4/error.m4: New file.
4019 * gnulib/import/m4/fchdir.m4: New file.
4020 * gnulib/import/m4/fcntl.m4: New file.
4021 * gnulib/import/m4/fcntl_h.m4: New file.
4022 * gnulib/import/m4/fdopendir.m4: New file.
4023 * gnulib/import/m4/filenamecat.m4: New file.
4024 * gnulib/import/m4/fstat.m4: New file.
4025 * gnulib/import/m4/fstatat.m4: New file.
4026 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4027 * gnulib/import/m4/getcwd-path-max.m4: New file.
4028 * gnulib/import/m4/getcwd.m4: New file.
4029 * gnulib/import/m4/getdtablesize.m4: New file.
4030 * gnulib/import/m4/getlogin_r.m4: New file.
4031 * gnulib/import/m4/getprogname.m4: New file.
4032 * gnulib/import/m4/glob.m4: New file.
4033 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4034 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4035 * gnulib/import/m4/mempcpy.m4: New file.
4036 * gnulib/import/m4/memrchr.m4: New file.
4037 * gnulib/import/m4/mode_t.m4: New file.
4038 * gnulib/import/m4/msvc-inval.m4: New file.
4039 * gnulib/import/m4/msvc-nothrow.m4: New file.
4040 * gnulib/import/m4/open.m4: New file.
4041 * gnulib/import/m4/openat.m4: New file.
4042 * gnulib/import/m4/opendir.m4: New file.
4043 * gnulib/import/m4/readdir.m4: New file.
4044 * gnulib/import/m4/realloc.m4: New file.
4045 * gnulib/import/m4/rewinddir.m4: New file.
4046 * gnulib/import/m4/save-cwd.m4: New file.
4047 * gnulib/import/m4/strdup.m4: New file.
4048 * gnulib/import/m4/strerror.m4: New file.
4049 * gnulib/import/m4/unistd-safer.m4: New file.
4050 * gnulib/import/mempcpy.c: New file.
4051 * gnulib/import/memrchr.c: New file.
4052 * gnulib/import/msvc-inval.c: New file.
4053 * gnulib/import/msvc-inval.h: New file.
4054 * gnulib/import/msvc-nothrow.c: New file.
4055 * gnulib/import/msvc-nothrow.h: New file.
4056 * gnulib/import/open.c: New file.
4057 * gnulib/import/openat-die.c: New file.
4058 * gnulib/import/openat-priv.h: New file.
4059 * gnulib/import/openat-proc.c: New file.
4060 * gnulib/import/openat.c: New file.
4061 * gnulib/import/openat.h: New file.
4062 * gnulib/import/opendir.c: New file.
4063 * gnulib/import/pipe-safer.c: New file.
4064 * gnulib/import/readdir.c: New file.
4065 * gnulib/import/realloc.c: New file.
4066 * gnulib/import/rewinddir.c: New file.
4067 * gnulib/import/save-cwd.c: New file.
4068 * gnulib/import/save-cwd.h: New file.
4069 * gnulib/import/strdup.c: New file.
4070 * gnulib/import/strerror-override.c: New file.
4071 * gnulib/import/strerror-override.h: New file.
4072 * gnulib/import/strerror.c: New file.
4073 * gnulib/import/unistd--.h: New file.
4074 * gnulib/import/unistd-safer.h: New file.
4075 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4076 "getcwd" and "glob".
4077 * ser-tcp.c: Undefine "close" before redefining it.
4078
4079 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4080
4081 * guile/scm-value.c (gdbscm_value_address): Initialize address,
4082 get rid of res_val.
4083
4084 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4085
4086 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4087 <sol2,sparc>: Likewise.
4088 <sol2-64,i386>: Likewise.
4089
4090 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4091 -Wdeprecated-declarations on *-*-solaris*.
4092 * configure: Regenerate.
4093
4094 * procfs.c: Include "nat/inferior.h".
4095 (procfs_info_proc): Fix typo.
4096
4097 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4098
4099 * remote.c (vector): Include.
4100 (struct private_thread_info): Add field, thread_handle.
4101 (free_private_thread_info): Deallocate storage associated with
4102 thread handle.
4103 (get_private_info_thread): Initialize `thread_handle' field.
4104 (struct thread_item): Add field, thread_handle.
4105 (clear_threads_listing_context): Deallocate storage associated
4106 with thread handle.
4107 (start_thread): Add support for "handle" attribute.
4108 (thread_attributes): Add "handle".
4109 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4110 field.
4111 (remote_update_thread_list): Update thread_handle.
4112 (remote_thread_handle_to_thread_info): New function.
4113 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4114
4115 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4116
4117 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4118 function.
4119 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4120 * python/python-internal.h (thread_object_type): Declare.
4121
4122 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4123
4124 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4125 (target_thread_handle_to_thread_info): Declare.
4126 * target.c (target_thread_handle_to_thread_info): New function.
4127 * target-delegates.c: Regenerate.
4128 * gdbthread.h (find_thread_by_handle): Declare.
4129 * thread.c (find_thread_by_handle): New function.
4130 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4131 function.
4132 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4133
4134 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4135
4136 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4137
4138 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
4139
4140 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4141
4142 2017-09-21 Yao Qi <yao.qi@linaro.org>
4143
4144 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4145 to gdb_target_obs.
4146
4147 2017-09-20 Tom Tromey <tom@tromey.com>
4148
4149 * breakpoint.c (struct counted_command_line): Remove.
4150 (breakpoint_commands): Update.
4151 (alloc_counted_command_line, incref_counted_command_line)
4152 (decref_counted_command_line, do_cleanup_counted_command_line)
4153 (make_cleanup_decref_counted_command_line): Remove.
4154 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4155 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4156 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4157 (save_breakpoints): Update.
4158 * breakpoint.h (counted_command_line): Now a typedef to
4159 shared_ptr.
4160 (struct breakpoint) <commands>: Now a counted_command_line.
4161 (struct bpstats) <command>: Likewise.
4162
4163 2017-09-20 Tom Tromey <tom@tromey.com>
4164
4165 * breakpoint.c (struct commands_info, do_map_commands_command):
4166 Remove.
4167 (commands_command_1): Update.
4168 (iterate_over_related_breakpoints): Take a function_view.
4169 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4170 (delete_command): Update.
4171 (map_breakpoint_numbers): Take a function_view.
4172 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4173 (disable_command): Update.
4174 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4175 (enable_command): Update.
4176 (struct disp_data, do_enable_breakpoint_disp)
4177 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4178 (do_map_enable_delete_breakpoint): Remove.
4179 (enable_once_command, enable_count_command, enable_delete_command)
4180 (delete_trace_variable_command): Update.
4181
4182 2017-09-20 Tom Tromey <tom@tromey.com>
4183
4184 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
4185 (bpstat_clear): Use delete.
4186 (bpstats): New constructors.
4187 (bpstat_copy, bpstat_stop_status): Use new.
4188 (dprintf_after_condition_true): Update.
4189 * breakpoint.h (bpstats::bpstats): Add constructors.
4190 (bpstats::~bpstats): Add destructor.
4191
4192 2017-09-20 Pedro Alves <palves@redhat.com>
4193
4194 * eval.c (make_params): Delete, refactored as ...
4195 (class fake_method): ... this new type's ctor.
4196 (fake_method::~fake_method): New.
4197 (evaluate_subexp_standard): Use 'fake_method'.
4198
4199 2017-09-20 Tom Tromey <tom@tromey.com>
4200
4201 * windows-nat.c (get_windows_debug_event, windows_wait)
4202 (do_initial_windows_stuff, windows_attach): Update.
4203 * utils.c (vwarning, internal_vproblem): Update.
4204 (ui_unregister_input_event_handler_cleanup)
4205 (prepare_to_handle_input): Remove.
4206 (class scoped_input_handler): New.
4207 (defaulted_query, prompt_for_continue): Update.
4208 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4209 Update.
4210 * top.c (undo_terminal_modifications_before_exit): Update.
4211 * target/target.h (target_terminal_init, target_terminal_inferior)
4212 (target_terminal_ours): Don't declare.
4213 (class target_terminal): New.
4214 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4215 (target_terminal_ours_for_output)
4216 (make_cleanup_restore_target_terminal): Don't declare.
4217 (target_terminal_info): Remove.
4218 * target.c (enum terminal_state, terminal_state): Remove.
4219 (target_terminal::terminal_state): Define.
4220 (target_terminal::init): Rename from target_terminal_init.
4221 (target_terminal::inferior): Rename from
4222 target_terminal_inferior.
4223 (target_terminal::ours): Rename from target_terminal_ours.
4224 (target_terminal::ours_for_output): Rename from
4225 target_terminal_ours_for_output.
4226 (target_terminal::info): New method.
4227 (cleanup_restore_target_terminal)
4228 (make_cleanup_restore_target_terminal): Remove.
4229 * solib.c (handle_solib_event): Update.
4230 * remote.c (remote_serial_quit_handler): Update.
4231 (remote_terminal_inferior, remote_wait_as): Update.
4232 * record-full.c (record_full_wait_1): Update.
4233 * nto-procfs.c (procfs_create_inferior): Update.
4234 * nat/fork-inferior.c (startup_inferior): Update.
4235 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4236 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4237 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4238 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4239 (mi_breakpoint_created, mi_breakpoint_deleted)
4240 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4241 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4242 (mi_user_selected_context_changed, report_initial_inferior):
4243 Update.
4244 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4245 (linux_nat_terminal_inferior): Update.
4246 * infrun.c (follow_fork_inferior)
4247 (handle_vfork_child_exec_or_exit, do_target_resume)
4248 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4249 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4250 Update.
4251 * inflow.c (child_terminal_init, info_terminal_command): Update.
4252 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4253 (attach_command): Update.
4254 * infcall.c (call_thread_fsm_should_stop): Update.
4255 * gnu-nat.c (gnu_attach): Update.
4256 * extension.c (struct active_ext_lang_state)
4257 (restore_active_ext_lang): Update.
4258 * exceptions.c (print_flush): Update.
4259 * event-top.c (async_enable_stdin, default_quit_handler): Update.
4260 (struct quit_handler_cleanup_data, restore_quit_handler)
4261 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4262 Remove.
4263 * cp-support.c (gdb_demangle): Update.
4264 * breakpoint.c (update_inserted_breakpoint_locations)
4265 (insert_breakpoint_locations, handle_jit_event)
4266 (disable_breakpoints_in_unloaded_shlib): Update.
4267 * annotate.c (annotate_breakpoints_invalid)
4268 (annotate_frames_invalid): Update.
4269
4270 2017-09-20 Tom Tromey <tom@tromey.com>
4271
4272 * main.c (catch_command_errors): Rename from
4273 catch_command_errors_const.
4274 (captured_main_1): Update.
4275
4276 2017-09-20 Pedro Alves <palves@redhat.com>
4277
4278 * cli/cli-cmds.c (list_command): Use print_sal_location.
4279 (print_sal_location): New function.
4280 (ambiguous_line_spec): Use print_sal_location.
4281 * linespec.c (symbol_to_sal): Record the symbol in the sal.
4282 * symtab.c (find_function_start_sal): Likewise.
4283 * symtab.h (symtab_and_line::symbol): New field.
4284
4285 2017-09-20 Pedro Alves <palves@redhat.com>
4286
4287 * linespec.c (minsym_found): Handle non-text minsyms.
4288 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4289
4290 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4291
4292 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4293 backslash.
4294
4295 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4296
4297 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4298 vmovups instead vmovaps.
4299 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
4300
4301 2017-09-19 John Baldwin <jhb@FreeBSD.org>
4302
4303 * NEWS (Changes since GDB 8.0): Add starti.
4304 * infcmd.c (enum run_break): New.
4305 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
4306 case.
4307 (run_command): Use enum run_how.
4308 (start_command): Likewise.
4309 (starti_command): New function.
4310 (RUN_ARGS_HELP): New macro.
4311 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
4312 commands. Add starti command.
4313
4314 2017-09-19 Yao Qi <yao.qi@linaro.org>
4315
4316 * Makefile.in (monitor.o): Remove the rule.
4317
4318 2017-09-19 Yao Qi <yao.qi@linaro.org>
4319
4320 * annotate.h (struct annotate_arg_emitter): Use
4321 DISABLE_COPY_AND_ASSIGN.
4322 * common/refcounted-object.h (refcounted_object): Likewise.
4323 * completer.h (struct completion_result): Likewise.
4324 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
4325 * filename-seen-cache.h (filename_seen_cache): Likewise.
4326 * gdbcore.h (thread_section_name): Likewise.
4327 * gdb_regex.h (compiled_regex): Likewise.
4328 * gdbthread.h (scoped_restore_current_thread): Likewise.
4329 * inferior.h (scoped_restore_current_inferior): Likewise.
4330 * jit.c (jit_reader): Likewise.
4331 * linespec.h (struct linespec_result): Likewise.
4332 * mi/mi-parse.h (struct mi_parse): Likewise.
4333 * nat/fork-inferior.c (execv_argv): Likewise.
4334 * progspace.h (scoped_restore_current_program_space): Likewise.
4335 * python/python-internal.h (class gdbpy_enter): Likewise.
4336 * regcache.h (regcache): Likewise.
4337 * target-descriptions.c (struct tdesc_reg): Likewise.
4338 (struct tdesc_type): Likewise.
4339 (struct tdesc_feature): Likewise.
4340 * ui-out.h (ui_out_emit_type): Likewise.
4341
4342 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
4343
4344 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4345 label abort_expression.
4346
4347 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4348
4349 * common/buffer.c (buffer_xml_printf): Adjust.
4350 * common/xml-utils.c (xml_escape_text): Change return type to
4351 std::string, update code accordingly.
4352 * common/xml-utils.h (xml_escape_text): Change return type to
4353 std::string.
4354 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
4355 * windows-tdep.c (windows_xfer_shared_library): Adjust.
4356 * unittests/xml-utils-selftests.c (test_xml_escape_text):
4357 Adjust.
4358
4359 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4360
4361 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
4362 (SUBDIR_UNITTESTS_OBS): Add new object file.
4363 * unittests/xml-utils-selftests.c: New file.
4364
4365 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4366
4367 * common/selftest.h (selftest): New struct/interface.
4368 (register_test): Add name parameter, add new overload.
4369 (run_tests): Add filter parameter.
4370 (for_each_selftest_ftype): New typedef.
4371 (for_each_selftest): New declaration.
4372 * common/selftest.c (tests): Change type to
4373 map<string, unique_ptr<selftest>>.
4374 (simple_selftest): New struct.
4375 (register_test): New function.
4376 (register_test): Add name parameter and use it.
4377 (run_tests): Add filter parameter and use it. Add prints.
4378 Adjust to vector -> map change.
4379 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4380 registering selftests.
4381 * arm-tdep.c (_initialize_arm_tdep): Likewise.
4382 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4383 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4384 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4385 * findvar.c (_initialize_findvar): Likewise.
4386 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4387 * maint.c (maintenance_selftest): Update call to run_tests.
4388 (maintenance_info_selftests): New function.
4389 (_initialize_maint_cmds): Register "maintenance info selftests"
4390 command. Update "maintenance selftest" doc.
4391 * regcache.c (_initialize_regcache): Add names when registering
4392 selftests.
4393 * rust-exp.y (_initialize_rust_exp): Likewise.
4394 * selftest-arch.c (gdbarch_selftest): New struct.
4395 (gdbarch_tests): Remove.
4396 (register_test_foreach_arch): Add name parameter. Call
4397 register_test.
4398 (tests_with_arch): Remove, move most content to
4399 gdbarch_selftest::operator().
4400 (_initialize_selftests_foreach_arch): Remove.
4401 * selftest-arch.h (register_test_foreach_arch): Add name
4402 parameter.
4403 (run_tests_with_arch): New declaration.
4404 * utils-selftests.c (_initialize_utils_selftests): Add names
4405 when registering selftests.
4406 * utils.c (_initialize_utils): Likewise.
4407 * unittests/array-view-selftests.c
4408 (_initialize_array_view_selftests): Likewise.
4409 * unittests/environ-selftests.c (_initialize_environ_selftests):
4410 Likewise.
4411 * unittests/function-view-selftests.c
4412 (_initialize_function_view_selftests): Likewise.
4413 * unittests/offset-type-selftests.c
4414 (_initialize_offset_type_selftests): Likewise.
4415 * unittests/optional-selftests.c
4416 (_initialize_optional_selftests): Likewise.
4417 * unittests/scoped_restore-selftests.c
4418 (_initialize_scoped_restore_selftests): Likewise.
4419 * NEWS: Document "maintenance selftest" and "maint info
4420 selftests".
4421
4422 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4423
4424 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4425 scoped_restore.
4426
4427 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4428
4429 * mi/mi-main.c (mi_load_progress): Make uiout variable
4430 a unique_ptr.
4431
4432 2017-09-15 Pedro Alves <palves@redhat.com>
4433
4434 * compile/compile-c-types.c (convert_enum, convert_int)
4435 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4436
4437 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4438
4439 * dwarf2read.c (copy_string): Remove.
4440 (parse_macro_definition): Replace copy_string with savestring.
4441
4442 2017-09-15 Yao Qi <yao.qi@linaro.org>
4443
4444 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4445 gdb_target_obs.
4446 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4447 Likewise.
4448 (i[34567]86-*-linux*): Likewise.
4449
4450 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4451
4452 * dwarf2expr.h (dwarf_stack_value): Add constructor.
4453 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4454 <stack>: Change type to std::vector.
4455 <stack_len, stack_allocated>: Remove.
4456 <grow_stack>: Remove.
4457 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4458 (dwarf_expr_context::~dwarf_expr_context): Remove.
4459 (dwarf_expr_context::grow_stack): Remove.
4460 (dwarf_expr_context::push): Adjust.
4461 (dwarf_expr_context::pop): Adjust.
4462 (dwarf_expr_context::fetch): Adjust.
4463 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4464 (dwarf_expr_context::stack_empty_p): Adjust.
4465 (dwarf_expr_context::execute_stack_op): Adjust.
4466
4467 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4468
4469 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4470 return type to bool.
4471 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4472
4473 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4474
4475 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4476 Change type to bool.
4477 (dwarf_stack_value) <in_stack_memory>: Likewise.
4478 (dwarf_expr_context) <push_address>: Change parameter type to
4479 bool.
4480 <fetch_in_stack_memory>: Change return type to bool.
4481 <push>: Change parameter type to bool.
4482 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4483 to bool.
4484 (dwarf_expr_context::push_address): Likewise.
4485 (dwarf_expr_context::fetch_in_stack_memory): Change return type
4486 to bool.
4487 (dwarf_expr_context::execute_stack_op): Adjust.
4488 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4489
4490 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
4491
4492 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4493 (struct dwarf_expr_context) <n_pieces>: Remove.
4494 <pieces>: Change type to std::vector.
4495 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4496 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4497 pieces.
4498 (dwarf_expr_context::add_piece): Adjust.
4499 * dwarf2loc.c (struct piece_closure): Initialize fields.
4500 <n_pieces>: Remove.
4501 <pieces>: Change type to std::vector.
4502 (allocate_piece_closure): Adjust, change parameter to
4503 std::vector rvalue and std::move it to piece_closure.
4504 (rw_pieced_value): Adjust.
4505 (check_pieced_synthetic_pointer): Adjust.
4506 (indirect_synthetic_pointer): Adjust.
4507 (coerce_pieced_ref): Adjust.
4508 (free_pieced_value_closure): Adjust. Use delete to free
4509 piece_closure.
4510 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
4511 to allocate_piece_closure.
4512 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4513
4514 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4515
4516 * probe.h (probe_ops_cp): Remove typedef.
4517 (DEF_VEC_P (probe_ops_cp)): Remove.
4518 (all_probe_ops): Change type to std::vector.
4519 * probe.c (info_probes_for_ops): Adjust to vector change.
4520 (probe_linespec_to_ops): Likewise.
4521 (all_probe_ops): Change type to std::vector.
4522 (_initialize_probe): Adjust to vector change.
4523 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4524 * elfread.c (elf_get_probes): Likewise.
4525 * stap-probe.c (_initialize_stap_probe): Likewise.
4526
4527 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4528
4529 * probe.h (struct bound_probe): Define constructors.
4530 * probe.c (bound_probe_s): Remove typedef.
4531 (DEF_VEC_O (bound_probe_s)): Remove VEC.
4532 (collect_probes): Change return type to std::vector, remove
4533 cleanup.
4534 (compare_probes): Return bool, change parameter type. Change
4535 semantic to "less than".
4536 (gen_ui_out_table_header_info): Change parameter to std::vector
4537 and update.
4538 (exists_probe_with_pops): Likewise.
4539 (info_probes_for_ops): Update to std::vector change.
4540 (enable_probes_command): Likewise.
4541 (disable_probes_command): Likewise.
4542
4543 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
4544
4545 * probe.h (struct probe_ops) <get_probes>: Change parameter from
4546 vec to std::vector.
4547 * probe.c (parse_probes_in_pspace): Update.
4548 (find_probes_in_objfile): Update.
4549 (find_probe_by_pc): Update.
4550 (collect_probes): Update.
4551 (probe_any_get_probes): Update.
4552 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4553 return type to reference to std::vector.
4554 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4555 std::vector and update.
4556 (dtrace_process_dof): Likewise.
4557 (dtrace_get_probes): Likewise.
4558 * elfread.c (elf_get_probes): Change return type to std::vector,
4559 store an std::vector in bfd_data.
4560 (probe_key_free): Update to std::vector.
4561 * stap-probe.c (handle_stap_probe): Change parameter to
4562 std::vector and update.
4563 (stap_get_probes): Likewise.
4564 * symfile-debug.c (debug_sym_get_probes): Change return type to
4565 std::vector and update.
4566
4567 2017-09-11 Tom Tromey <tom@tromey.com>
4568
4569 * breakpoint.c (program_breakpoint_here_p): Update.
4570 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4571 from make_show_memory_breakpoints_cleanup. Return a
4572 scoped_restore_tmpl<int>.
4573 (restore_show_memory_breakpoints): Remove.
4574 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4575 * mem-break.c (memory_validate_breakpoint): Update.
4576 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4577 (ia64_memory_remove_breakpoint): Update.
4578 (ia64_breakpoint_from_pc): Update.
4579 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4580 from make_show_memory_breakpoints_cleanup.
4581
4582 2017-09-11 Tom Tromey <tom@tromey.com>
4583
4584 * d-namespace.c (d_lookup_symbol): Use std::string.
4585 (find_symbol_in_baseclass): Likewise.
4586
4587 2017-09-11 Tom Tromey <tom@tromey.com>
4588
4589 * ctf.c (ctf_start): Use std::string.
4590
4591 2017-09-11 Tom Tromey <tom@tromey.com>
4592
4593 * ada-lang.c (is_known_support_routine): Update.
4594 (ada_unhandled_exception_name_addr_from_raise): Update.
4595 * guile/scm-frame.c (gdbscm_frame_name): Update.
4596 * python/py-frame.c (frapy_name): Update.
4597 (frapy_function): Update.
4598 * stack.h (find_frame_funname): Update.
4599 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4600 (print_frame): Update.
4601
4602 2017-09-11 Tom Tromey <tom@tromey.com>
4603
4604 * findcmd.c (put_bits): Take a gdb::byte_vector.
4605 (parse_find_args): Return gdb::byte_vector. "args" now const.
4606 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
4607 cleanups.
4608 (find_command): Update.
4609
4610 2017-09-11 Tom Tromey <tom@tromey.com>
4611
4612 * cli/cli-script.c (class scoped_restore_hook_in): New.
4613 (clear_hook_in_cleanup): Remove.
4614 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4615 scoped_restore_hook_in.
4616
4617 2017-09-11 Tom Tromey <tom@tromey.com>
4618
4619 * cli/cli-script.c (restore_interp): Remove.
4620 (read_command_lines): Use scoped_restore_interp.
4621 * interps.c (scoped_restore_interp::set_temp): Rename from
4622 interp_set_temp.
4623 * interps.h (class scoped_restore_interp): New.
4624 (interp_set_temp): Remove.
4625
4626 2017-09-11 Tom Tromey <tom@tromey.com>
4627
4628 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4629 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4630 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4631 scoped_restore.
4632 (mi_cmd_break_insert_1): Update.
4633 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4634 scoped_restore.
4635
4636 2017-09-11 Tom Tromey <tom@tromey.com>
4637
4638 * demangle.c (demangle_command): Update.
4639 * breakpoint.c (disable_command): Update.
4640 (enable_command): Update.
4641 (find_location_by_number): Make "number" const. Use
4642 get_number_trailer.
4643 * cli/cli-utils.c (extract_arg): Return std::string.
4644 * probe.c (parse_probe_linespec): Update. Change types.
4645 (collect_probes): Take string arguments.
4646 (parse_probe_linespec): Likewise.
4647 (info_probes_for_ops): Update.
4648 (enable_probes_command): Update.
4649 (disable_probes_command): Update.
4650 * break-catch-sig.c (catch_signal_split_args): Update.
4651 * mi/mi-parse.c (mi_parse): Update.
4652
4653 2017-09-11 Tom Tromey <tom@tromey.com>
4654
4655 * language.h (language_enum): Make argument const.
4656 * language.c (language_enum): Make argument const.
4657
4658 2017-09-11 Tom Tromey <tom@tromey.com>
4659
4660 * common/common-utils.h (skip_to_space): Remove macro, redeclare
4661 as function.
4662 (skip_to_space): Rename from skip_to_space_const.
4663 * common/common-utils.c (skip_to_space): New function.
4664 (skip_to_space): Rename from skip_to_space_const.
4665 * cli/cli-utils.h (get_number): Rename from get_number_const.
4666 (extract_arg): Rename from extract_arg_const.
4667 * cli/cli-utils.c (get_number): Rename from get_number_const.
4668 (extract_arg): Rename from extract_arg_const.
4669 (number_or_range_parser::get_number): Use ::get_number.
4670 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4671 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4672 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4673 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4674 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4675 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4676 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4677 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4678
4679 2017-09-11 Tom Tromey <tom@tromey.com>
4680
4681 * python/python.c (do_start_initialization): Use
4682 py-event-types.def to initialize types.
4683 Define all object type structures.
4684 * python/python-internal.h: Don't declare event initialization
4685 functions.
4686 * python/py-threadevent.c (thread_event_object_type): Don't
4687 define.
4688 * python/py-stopevent.c (stop_event_object_type): Don't define.
4689 * python/py-signalevent.c (signal_event_object_type): Don't
4690 declare or define.
4691 * python/py-newobjfileevent.c (new_objfile_event_object_type)
4692 (clear_objfiles_event_object_type): Don't declare or define.
4693 * python/py-infevents.c (inferior_call_pre_event_object_type)
4694 (inferior_call_post_event_object_type)
4695 (register_changed_event_object_type)
4696 (memory_changed_event_object_type): Don't declare or define.
4697 * python/py-inferior.c (new_thread_event_object_type)
4698 (new_inferior_event_object_type)
4699 (inferior_deleted_event_object_type): Don't declare or define.
4700 * python/py-exitedevent.c (exited_event_object_type): Don't
4701 declare or define.
4702 * python/py-evts.c (gdbpy_initialize_py_events): Use
4703 py-all-events.def.
4704 * python/py-events.h (thread_event_object_type): Don't declare.
4705 (events_object): Use py-all-events.def.
4706 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
4707 py-event-types.def.
4708 * python/py-event-types.def: New file.
4709 * python/py-continueevent.c (create_continue_event_object): Don't
4710 declare or define.
4711 * python/py-bpevent.c (breakpoint_event_object_type): Don't
4712 declare or define.
4713 * python/py-all-events.def: New file.
4714
4715 2017-09-11 Tom Tromey <tom@tromey.com>
4716
4717 * python/py-threadevent.c (create_thread_event_object): Return
4718 gdbpy_ref.
4719 * python/py-stopevent.h (create_stop_event_object)
4720 (create_breakpoint_event_object, create_signal_event_object):
4721 Update.
4722 * python/py-stopevent.c (create_stop_event_object): Return
4723 gdbpy_ref.
4724 (emit_stop_event): Update.
4725 * python/py-signalevent.c (create_signal_event_object): Return
4726 gdbpy_ref.
4727 * python/py-infevents.c (create_inferior_call_event_object):
4728 Update.
4729 * python/py-event.h (create_event_object)
4730 (create_thread_event_object): Update.
4731 * python/py-event.c (create_event_object): Return gdbpy_ref.
4732 * python/py-continueevent.c: Return gdbpy_ref.
4733 * python/py-bpevent.c (create_breakpoint_event_object): Return
4734 gdbpy_ref.
4735
4736 2017-09-11 Tom Tromey <tom@tromey.com>
4737
4738 PR python/15622:
4739 * NEWS: Add entry.
4740 * python/python.c (do_start_initialization): Initialize new event
4741 types.
4742 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4743 (gdbpy_initialize_inferior_deleted_event)
4744 (gdbpy_initialize_new_thread_event): Declare.
4745 * python/py-threadevent.c (create_thread_event_object): Add option
4746 "thread" parameter.
4747 * python/py-inferior.c (new_thread_event_object_type)
4748 (new_inferior_event_object_type)
4749 (inferior_deleted_event_object_type): Declare.
4750 (python_new_inferior, python_inferior_deleted): New functions.
4751 (add_thread_object): Emit new_thread event.
4752 (gdbpy_initialize_inferior): Attach new functions to corresponding
4753 observers.
4754 (new_thread, new_inferior, inferior_deleted): Define new event
4755 types.
4756 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4757 registries.
4758 * python/py-events.h (events_object) <new_inferior,
4759 inferior_deleted, new_thread>: New fields.
4760 * python/py-event.h (create_thread_event_breakpoint): Add optional
4761 "thread" parameter.
4762
4763 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4764
4765 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4766 check current_ui instead.
4767 (internal_vproblem): Likewise.
4768
4769 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4770
4771 * thread.c (print_thread_info_1): Remove unnecessary calls to
4772 uiout->is_mi_like_p.
4773
4774 2017-09-09 Tom Tromey <tom@tromey.com>
4775
4776 * namespace.h (add_using_directive): Update.
4777 * namespace.c (add_using_directive): Change type of excludes to
4778 std::vector.
4779 * dwarf2read.c (read_import_statement): Use std::vector.
4780 (read_namespace): Update.
4781 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4782
4783 2017-09-09 Tom Tromey <tom@tromey.com>
4784
4785 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4786
4787 2017-09-09 Tom Tromey <tom@tromey.com>
4788
4789 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4790
4791 2017-09-09 Tom Tromey <tom@tromey.com>
4792
4793 * stack.c (func_command): Use gdb::def_vector.
4794
4795 2017-09-09 Tom Tromey <tom@tromey.com>
4796
4797 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4798 ui_out_emit_list, ui_out_emit_tuple.
4799 (mi_cmd_var_update): Likewise.
4800
4801 2017-09-09 Tom Tromey <tom@tromey.com>
4802
4803 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4804 ui_out_redirect_pop.
4805 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4806 ui_out_redirect_pop.
4807 * utils.c (do_ui_out_redirect_pop)
4808 (make_cleanup_ui_out_redirect_pop): Remove.
4809 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4810 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4811 * ui-out.h (ui_out_redirect_pop): New class.
4812
4813 2017-09-09 Tom Tromey <tom@tromey.com>
4814
4815 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4816 (list_available_thread_groups, mi_cmd_list_thread_groups)
4817 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4818 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4819 Likewise.
4820
4821 2017-09-09 Tom Tromey <tom@tromey.com>
4822
4823 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4824 ui_out_emit_tuple.
4825
4826 2017-09-09 Tom Tromey <tom@tromey.com>
4827
4828 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4829 * stack.c (print_frame): Use ui_out_emit_tuple.
4830 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4831 (info_spu_mailbox_command, info_spu_dma_command)
4832 (info_spu_proxydma_command): Likewise.
4833 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4834 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4835 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4836 ui_out_emit_tuple.
4837 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4838
4839 2017-09-09 Tom Tromey <tom@tromey.com>
4840
4841 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4842 (class ui_out_emit_table): Update comment.
4843 * ui-out.c (do_cleanup_table_end)
4844 (make_cleanup_ui_out_table_begin_end): Remove.
4845 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4846 (info_spu_dma_cmdlist): Likewise.
4847 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4848 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4849 ui_out_emit_table.
4850
4851 2017-09-09 Tom Tromey <tom@tromey.com>
4852
4853 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4854 ui_out_emit_list, gdb::optional.
4855
4856 2017-09-09 John Baldwin <jhb@FreeBSD.org>
4857
4858 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4859 prototype.
4860 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4861 prototype.
4862 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4863 prototype.
4864 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4865 * ada-exp.y: Remove _initialize_ada_exp prototype.
4866 * ada-lang.c: Remove _initialize_ada_language prototype.
4867 * ada-tasks.c: Remove _initialize_tasks prototype.
4868 * addrmap.c: Remove _initialize_addrmap prototype.
4869 * agent.c: Remove _initialize_agent prototype.
4870 * aix-thread.c: Remove _initialize_aix_thread prototype.
4871 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4872 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4873 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4874 prototype.
4875 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4876 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4877 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4878 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4879 prototype.
4880 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4881 prototype.
4882 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4883 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4884 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4885 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4886 prototype.
4887 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4888 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4889 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4890 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4891 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4892 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4893 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4894 prototype.
4895 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4896 prototype.
4897 * annotate.c: Remove _initialize_annotate prototype.
4898 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4899 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4900 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4901 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4902 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4903 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4904 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4905 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4906 prototype.
4907 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4908 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4909 * auto-load.c: Remove _initialize_auto_load prototype.
4910 * auxv.c: Remove _initialize_auxv prototype.
4911 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4912 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4913 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4914 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4915 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4916 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4917 prototype.
4918 * break-catch-throw.c: Remove _initialize_break_catch_throw
4919 prototype.
4920 * breakpoint.c: Remove _initialize_breakpoint prototype.
4921 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4922 * btrace.c: Remove _initialize_btrace prototype.
4923 * charset.c: Remove _initialize_charset prototype.
4924 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4925 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4926 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4927 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4928 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4929 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4930 * coffread.c: Remove _initialize_coffread prototype.
4931 * compile/compile.c: Remove _initialize_compile prototype.
4932 * complaints.c: Remove _initialize_complaints prototype.
4933 * completer.c: Remove _initialize_completer prototype.
4934 * copying.awk: Remove _initialize_copying prototype.
4935 * copying.c: Regenerate.
4936 * core-regset.c: Remove _initialize_core_regset prototype.
4937 * corefile.c: Remove _initialize_core prototype.
4938 * corelow.c: Remove _initialize_corelow prototype.
4939 * cp-abi.c: Remove _initialize_cp_abi prototype.
4940 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4941 * cp-support.c: Remove _initialize_cp_support prototype.
4942 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4943 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4944 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4945 * ctf.c: Remove _initialize_ctf prototype.
4946 * d-lang.c: Remove _initialize_d_language prototype.
4947 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4948 prototype.
4949 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4950 * dbxread.c: Remove _initialize_dbxread prototype.
4951 * dcache.c: Remove _initialize_dcache prototype.
4952 * demangle.c: Remove _initialize_demangler prototype.
4953 * disasm-selftests.c: Remove _initialize_disasm_selftests
4954 prototype.
4955 * disasm.c: Remove _initialize_disasm prototype.
4956 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4957 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4958 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4959 prototype.
4960 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4961 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4962 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4963 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4964 * elfread.c: Remove _initialize_elfread prototype.
4965 * exec.c: Remove _initialize_exec prototype.
4966 * extension.c: Remove _initialize_extension prototype.
4967 * f-lang.c: Remove _initialize_f_language prototype.
4968 * f-valprint.c: Remove _initialize_f_valprint prototype.
4969 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4970 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4971 * filesystem.c: Remove _initialize_filesystem prototype.
4972 * findcmd.c: Remove _initialize_mem_search prototype.
4973 * fork-child.c: Remove _initialize_fork_child prototype.
4974 * frame-base.c: Remove _initialize_frame_base prototype.
4975 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4976 * frame.c: Remove _initialize_frame prototype.
4977 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4978 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4979 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4980 * gcore.c: Remove _initialize_gcore prototype.
4981 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4982 * gdbarch.c: Regenerate.
4983 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4984 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4985 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4986 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4987 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4988 * go-lang.c: Remove _initialize_go_language prototype.
4989 * go32-nat.c: Remove _initialize_go32_nat prototype.
4990 * guile/guile.c: Remove _initialize_guile prototype.
4991 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4992 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4993 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4994 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4995 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4996 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4997 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4998 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4999 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5000 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5001 prototype.
5002 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5003 prototype.
5004 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5005 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5006 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5007 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5008 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5009 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5010 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5011 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5012 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5013 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5014 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5015 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5016 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5017 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5018 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5019 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5020 prototype.
5021 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5022 prototype.
5023 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5024 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5025 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5026 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5027 * infcall.c: Remove _initialize_infcall prototype.
5028 * infcmd.c: Remove _initialize_infcmd prototype.
5029 * inferior.c: Remove _initialize_inferiors prototype.
5030 * inflow.c: Remove _initialize_inflow prototype.
5031 * infrun.c: Remove _initialize_infrun prototype.
5032 * interps.c: Remove _initialize_interpreter prototype.
5033 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5034 * jit.c: Remove _initialize_jit prototype.
5035 * language.c: Remove _initialize_language prototype.
5036 * linux-fork.c: Remove _initialize_linux_fork prototype.
5037 * linux-nat.c: Remove _initialize_linux_nat prototype.
5038 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5039 * linux-thread-db.c: Remove _initialize_thread_db prototype.
5040 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5041 * m2-lang.c: Remove _initialize_m2_language prototype.
5042 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5043 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5044 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5045 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5046 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5047 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5048 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5049 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5050 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5051 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5052 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5053 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5054 * machoread.c: Remove _initialize_machoread prototype.
5055 * macrocmd.c: Remove _initialize_macrocmd prototype.
5056 * macroscope.c: Remove _initialize_macroscope prototype.
5057 * maint.c: Remove _initialize_maint_cmds prototype.
5058 * mdebugread.c: Remove _initialize_mdebugread prototype.
5059 * memattr.c: Remove _initialize_mem prototype.
5060 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5061 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5062 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5063 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5064 * mi/mi-main.c: Remove _initialize_mi_main prototype.
5065 * microblaze-linux-tdep.c: Remove
5066 _initialize_microblaze_linux_tdep prototype.
5067 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5068 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5069 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5070 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5071 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5072 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5073 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5074 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5075 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5076 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5077 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5078 prototype.
5079 * mipsread.c: Remove _initialize_mipsread prototype.
5080 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5081 prototype.
5082 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5083 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5084 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5085 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5086 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5087 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5088 prototype.
5089 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5090 * nto-procfs.c: Remove _initialize_procfs prototype.
5091 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5092 * objc-lang.c: Remove _initialize_objc_language prototype.
5093 * objfiles.c: Remove _initialize_objfiles prototype.
5094 * observer.c: Remove observer_test_first_notification_function,
5095 observer_test_second_notification_function,
5096 observer_test_third_notification_function, and
5097 _initialize_observer prototypes.
5098 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5099 * osabi.c: Remove _initialize_gdb_osabi prototype.
5100 * osdata.c: Remove _initialize_osdata prototype.
5101 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5102 * parse.c: Remove _initialize_parse prototype.
5103 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5104 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5105 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5106 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5107 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5108 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5109 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5110 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5111 * printcmd.c: Remove _initialize_printcmd prototype.
5112 * probe.c: Remove _initialize_probe prototype.
5113 * proc-api.c: Remove _initialize_proc_api prototype.
5114 * proc-events.c: Remove _initialize_proc_events prototype.
5115 * proc-service.c: Remove _initialize_proc_service prototype.
5116 * procfs.c: Remove _initialize_procfs prototype.
5117 * psymtab.c: Remove _initialize_psymtab prototype.
5118 * python/python.c: Remove _initialize_python prototype.
5119 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5120 * record-btrace.c: Remove _initialize_record_btrace prototype.
5121 * record-full.c: Remove _initialize_record_full prototype.
5122 * record.c: Remove _initialize_record prototype.
5123 * regcache.c: Remove _initialize_regcache prototype.
5124 * reggroups.c: Remove _initialize_reggroup prototype.
5125 * remote-notif.c: Remove _initialize_notif prototype.
5126 * remote-sim.c: Remove _initialize_remote_sim prototype.
5127 * remote.c: Remove _initialize_remote prototype.
5128 * reverse.c: Remove _initialize_reverse prototype.
5129 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5130 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5131 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5132 prototype.
5133 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5134 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5135 * rust-exp.y: Remove _initialize_rust_exp prototype.
5136 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5137 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5138 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5139 * score-tdep.c: Remove _initialize_score_tdep prototype.
5140 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5141 prototype.
5142 * ser-go32.c: Remove _initialize_ser_dos prototype.
5143 * ser-mingw.c: Remove _initialize_ser_windows prototype.
5144 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5145 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5146 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5147 * serial.c: Remove _initialize_serial prototype.
5148 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5149 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5150 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5151 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5152 * skip.c: Remove _initialize_step_skip prototype.
5153 * sol-thread.c: Remove _initialize_sol_thread prototype.
5154 * solib-aix.c: Remove _initialize_solib_aix prototype.
5155 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5156 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5157 * solib-frv.c: Remove _initialize_frv_solib prototype.
5158 * solib-spu.c: Remove _initialize_spu_solib prototype.
5159 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5160 * solib-target.c: Remove _initialize_solib_target prototype.
5161 * solib.c: Remove _initialize_solib prototype.
5162 * source.c: Remove _initialize_source prototype.
5163 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5164 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5165 prototype.
5166 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5167 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5168 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5169 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5170 prototype.
5171 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5172 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5173 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5174 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5175 prototype.
5176 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5177 prototype.
5178 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5179 prototype.
5180 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5181 prototype.
5182 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5183 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5184 prototype.
5185 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5186 prototype.
5187 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5188 prototype.
5189 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5190 prototype.
5191 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5192 prototype.
5193 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5194 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5195 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5196 * stabsread.c: Remove _initialize_stabsread prototype.
5197 * stack.c: Remove _initialize_stack prototype.
5198 * stap-probe.c: Remove _initialize_stap_probe prototype.
5199 * std-regs.c: Remove _initialize_frame_reg prototype.
5200 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5201 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5202 * symfile.c: Remove _initialize_symfile prototype.
5203 * symmisc.c: Remove _initialize_symmisc prototype.
5204 * symtab.c: Remove _initialize_symtab prototype.
5205 * target-dcache.c: Remove _initialize_target_dcache prototype.
5206 * target-descriptions.c: Remove _initialize_target_descriptions
5207 prototype.
5208 * thread.c: Remove _initialize_thread prototype.
5209 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5210 prototype.
5211 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5212 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5213 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5214 prototype.
5215 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5216 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5217 * tracefile.c: Remove _initialize_tracefile prototype.
5218 * tracepoint.c: Remove _initialize_tracepoint prototype.
5219 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5220 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5221 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5222 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5223 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5224 * tui/tui-win.c: Remove _initialize_tui_win prototype.
5225 * tui/tui.c: Remove _initialize_tui prototype.
5226 * typeprint.c: Remove _initialize_typeprint prototype.
5227 * user-regs.c: Remove _initialize_user_regs prototype.
5228 * utils.c: Remove _initialize_utils prototype.
5229 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5230 * valarith.c: Remove _initialize_valarith prototype.
5231 * valops.c: Remove _initialize_valops prototype.
5232 * valprint.c: Remove _initialize_valprint prototype.
5233 * value.c: Remove _initialize_values prototype.
5234 * varobj.c: Remove _initialize_varobj prototype.
5235 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5236 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5237 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5238 * windows-nat.c: Remove _initialize_windows_nat,
5239 _initialize_check_for_gdb_ini, and _initialize_loadable
5240 prototypes.
5241 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5242 * xcoffread.c: Remove _initialize_xcoffread prototype.
5243 * xml-support.c: Remove _initialize_xml_support prototype.
5244 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5245 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5246 prototype.
5247 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5248 prototype.
5249 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5250
5251 2017-09-08 Keith Seitz <keiths@redhat.com>
5252
5253 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5254 field.
5255
5256 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
5257
5258 * f-valprint.c (f_val_print): Remove check for one byte
5259 sized integers. Remove printing of character type.
5260
5261 2017-09-08 Frank Penczek <frank.penczek@intel.com>
5262 Christoph Weinmann <christoph.t.weinmann@intel.com>
5263 Bernhard Heckel <bernhard.heckel@intel.com>
5264
5265 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5266 to maintain proper indentation when printing pointers/refs.
5267
5268 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5269
5270 GDB 8.0.1 released.
5271
5272 2017-09-07 Joel Brobecker <brobecker@adacore.com>
5273
5274 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5275
5276 2017-09-05 Tom Tromey <tom@tromey.com>
5277
5278 * parse.c (funcall_chain): Now a std::vector.
5279 (start_arglist, end_arglist): Simplify.
5280 (free_funcalls): Remove.
5281 (parse_exp_in_context_1): Remove cleanup.
5282
5283 2017-09-05 Tom Tromey <tom@tromey.com>
5284
5285 * go-exp.y (go_parse): Don't create a cleanup.
5286
5287 2017-09-05 Tom Tromey <tom@tromey.com>
5288
5289 * d-exp.y (PrimaryExpression): Use std::string.
5290 (d_parse): Don't create a cleanup.
5291
5292 2017-09-05 Tom Tromey <tom@tromey.com>
5293
5294 * utils.c (do_clear_parser_state): Remove.
5295 (make_cleanup_clear_parser_state): Remove.
5296 * p-exp.y (pascal_parse): Use scoped_restore.
5297 * m2-exp.y (m2_parse): Use scoped_restore.
5298 * f-exp.y (f_parse): Use scoped_restore.
5299 * d-exp.y (d_parse): Use scoped_restore.
5300 * c-exp.y (c_parse): Use scoped_restore.
5301 * ada-exp.y (ada_parse): Use scoped_restore.
5302 * utils.h (make_cleanup_clear_parser_state): Remove.
5303
5304 2017-09-06 Keith Seitz <keiths@redhat.com>
5305
5306 * dwarf2read.c (dw2_linkage_name_attr): New function.
5307 (dw2_linkage_name): New function.
5308 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
5309 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
5310 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
5311
5312 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5313
5314 * config/djgpp/djconfig.sh: Correct shell portability issue.
5315
5316 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5317
5318 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
5319
5320 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5321
5322 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5323 * NEWS: Mention new FreeBSD/mips native configuration.
5324 * configure.host: Add aarch64*-*-freebsd*.
5325 * configure.nat: Likewise.
5326 * aarch64-fbsd-nat.c: New file.
5327
5328 2017-09-06 John Baldwin <jhb@FreeBSD.org>
5329
5330 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
5331 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
5332 * NEWS: Mention new FreeBSD/aarch64 target.
5333 * configure.tgt: Add aarch64*-*-freebsd*.
5334 * aarch64-fbsd-tdep.c: New file.
5335 * aarch64-fbsd-tdep.h: New file.
5336
5337 2017-09-06 Kamil Rytarowski <n54@gmx.com>
5338
5339 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
5340
5341 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5342
5343 * parse.c (find_minsym_type_and_address): Don't relocate addresses
5344 of TLS symbols.
5345
5346 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5347
5348 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
5349 call.
5350
5351 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5352
5353 * infrun.c (follow_exec): Call add_thread after
5354 target_find_description.
5355
5356 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5357
5358 * infrun.c (handle_inferior_event_1): When exec'ing, read
5359 stop_pc after follow_exec.
5360
5361 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5362
5363 * remote.c (process_g_packet): Update error message.
5364
5365 2017-09-05 Yao Qi <yao.qi@linaro.org>
5366
5367 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5368 targets.
5369
5370 2017-09-05 Pedro Alves <palves@redhat.com>
5371
5372 * eval.c (eval_call, evaluate_funcall): New functions, factored
5373 out from ...
5374 (evaluate_subexp_standard): ... this.
5375
5376 2017-09-05 Yao Qi <yao.qi@linaro.org>
5377
5378 * amd64-tdep.c (amd64_target_description): Create target
5379 descriptions.
5380 (_initialize_amd64_tdep): Don't call functions
5381 initialize_tdesc_amd64_*. Add self tests.
5382 * arch/amd64.c (amd64_create_target_description): Add parameter
5383 is_linux. Call set_tdesc_osabi if is_linux is true.
5384 * arch/amd64.h (amd64_create_target_description): Update the
5385 declaration.
5386 * arch/i386.c (i386_create_target_description): Add parameter
5387 is_linux. Call set_tdesc_osabi if is_linux is true.
5388 * arch/i386.h (i386_create_target_description): Update
5389 declaration.
5390 * configure.tgt: Add i386.o to gdb_target_obs.
5391 * features/Makefile (XMLTOC): Remove i386/*.xml.
5392 * features/i386/amd64-avx-avx512.c: Remove.
5393 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5394 * features/i386/amd64-avx-mpx.c: Remove.
5395 * features/i386/amd64-avx.c: Remove.
5396 * features/i386/amd64-mpx.c: Remove.
5397 * features/i386/amd64.c: Remove.
5398 * features/i386/i386-avx-avx512.c: Remove.
5399 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5400 * features/i386/i386-avx-mpx.c: Remove.
5401 * features/i386/i386-avx.c: Remove.
5402 * features/i386/i386-mmx.c: Remove.
5403 * features/i386/i386-mpx.c: Remove.
5404 * features/i386/i386.c: Remove.
5405 * i386-tdep.c: Don't include features/i386/i386*.c., include
5406 target-descriptions.h and arch/i386.h.
5407 (i386_target_description): Create target descriptions.
5408 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5409 functions. Do self tests.
5410
5411 2017-09-05 Yao Qi <yao.qi@linaro.org>
5412
5413 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5414 * features/i386/amd64-avx-avx512-linux.c: Removed.
5415 * features/i386/amd64-avx-linux.c: Removed.
5416 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5417 * features/i386/amd64-avx-mpx-linux.c: Removed.
5418 * features/i386/amd64-linux.c: Removed.
5419 * features/i386/amd64-mpx-linux.c: Removed.
5420 * features/i386/x32-avx-avx512-linux.c: Removed.
5421 * features/i386/x32-avx-linux.c: Removed.
5422 * features/i386/x32-linux.c: Removed.
5423
5424 2017-09-05 Yao Qi <yao.qi@linaro.org>
5425
5426 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
5427 features/i386/*.c.
5428 (amd64_linux_read_description): Call
5429 amd64_create_target_description.
5430 * arch/amd64.c: New file.
5431 * arch/amd64.h: New file.
5432 * configure.tgt (x86_64-*-linux*): Append amd64.o.
5433 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5434
5435 2017-09-05 Yao Qi <yao.qi@linaro.org>
5436
5437 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5438 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
5439 (amd64_linux_read_description): Create target descriptions.
5440 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5441 functions. Add unit tests.
5442 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5443 x32-core.xml.
5444 * features/i386/64bit-avx.c: Generated.
5445 * features/i386/64bit-avx512.c: Generated.
5446 * features/i386/64bit-core.c: Generated.
5447 * features/i386/64bit-linux.c: Generated.
5448 * features/i386/64bit-mpx.c: Generated.
5449 * features/i386/64bit-pkeys.c: Generated.
5450 * features/i386/64bit-segments.c: Generated.
5451 * features/i386/64bit-sse.c: Generated.
5452 * features/i386/x32-core.c: Generated.
5453 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5454 c files for amd64-linux and x32-linux.
5455
5456 2017-09-05 Yao Qi <yao.qi@linaro.org>
5457
5458 * amd64-linux-tdep.c (amd64_linux_read_description): New
5459 function.
5460 (amd64_linux_core_read_description): Call
5461 amd64_linux_read_description.
5462 (amd64_linux_init_abi): Likewise.
5463 (amd64_x32_linux_init_abi): Likewise.
5464 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5465 * x86-linux-nat.c (x86_linux_read_description): Call
5466 amd64_linux_read_description.
5467
5468 2017-09-05 Yao Qi <yao.qi@linaro.org>
5469
5470 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5471 comments.
5472
5473 2017-09-05 Yao Qi <yao.qi@linaro.org>
5474
5475 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5476 * features/i386/i386-avx-avx512-linux.c: Remove.
5477 * features/i386/i386-avx-linux.c: Remove.
5478 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5479 * features/i386/i386-avx-mpx-linux.c: Remove.
5480 * features/i386/i386-linux.c: Remove.
5481 * features/i386/i386-mmx-linux.c: Remove.
5482 * features/i386/i386-mpx-linux.c: Remove.
5483
5484 2017-09-05 Yao Qi <yao.qi@linaro.org>
5485
5486 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5487 (SFILES): Add arch/i386.c.
5488 (HFILES_NO_SRCDIR): Add arch/i386.h.
5489 * arch/i386.c: New file.
5490 * arch/i386.h: New file.
5491 * arch/tdesc.h (allocate_target_description): Declare.
5492 (set_tdesc_architecture): Declare.
5493 (set_tdesc_osabi): Declare.
5494 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5495 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5496 include arch/i386.h.
5497 (i386_linux_read_description): Remove code and call
5498 i386_create_target_description.
5499 (set_tdesc_architecture): New function.
5500 (set_tdesc_osabi): New function.
5501 * target-descriptions.h (allocate_target_description): Remove.
5502
5503 2017-09-05 Yao Qi <yao.qi@linaro.org>
5504
5505 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5506 * target-descriptions.c (tdesc_create_feature): Likewise, and
5507 adjust code.
5508 * features/i386/32bit-avx.c: Re-generated.
5509 * features/i386/32bit-avx512.c: Re-generated.
5510 * features/i386/32bit-core.c: Re-generated.
5511 * features/i386/32bit-linux.c: Re-generated.
5512 * features/i386/32bit-mpx.c: Re-generated.
5513 * features/i386/32bit-pkeys.c: Re-generated.
5514 * features/i386/32bit-sse.c: Re-generated.
5515
5516 2017-09-05 Yao Qi <yao.qi@linaro.org>
5517
5518 * regformats/regdef.h (struct reg): Override operator == and !=.
5519
5520 2017-09-05 Yao Qi <yao.qi@linaro.org>
5521
5522 * arch/tdesc.h: New file.
5523 * regformats/regdat.sh: Generate code using tdesc_create_reg.
5524 * target-descriptions.c: Update comments.
5525 * target-descriptions.h: Include "arch/tdesc.h". Remove the
5526 declarations.
5527 * features/i386/32bit-avx.c: Re-generated.
5528 * features/i386/32bit-avx512.c: Re-generated.
5529 * features/i386/32bit-core.c: Re-generated.
5530 * features/i386/32bit-linux.c: Re-generated.
5531 * features/i386/32bit-mpx.c: Re-generated.
5532 * features/i386/32bit-pkeys.c: Re-generated.
5533 * features/i386/32bit-sse.c: Re-generated.
5534
5535 2017-09-05 Yao Qi <yao.qi@linaro.org>
5536
5537 * regformats/regdat.sh: Update generated code.
5538
5539 2017-09-05 Yao Qi <yao.qi@linaro.org>
5540
5541 * regformats/regdat.sh: Adjust code order.
5542
5543 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
5544
5545 * expprint.c (dump_subexp_body_standard): Use constant format
5546 string in fprintf_filtered call.
5547
5548 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5549
5550 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5551 NetBSD/i386.
5552 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5553
5554 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5555
5556 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5557
5558 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5559
5560 * bsd-kvm.o: Define _KMEMUSER.
5561 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5562 * configure: Regenerate.
5563
5564 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5565
5566 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5567 * i386-fbsd-nat.c: Likewise.
5568
5569 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5570
5571 * unittests/array-view-selftests.c: Add include of <array>.
5572
5573 2017-09-04 John Baldwin <jhb@FreeBSD.org>
5574
5575 * spu-tdep.c (flush_ea_cache): Add missing argument to
5576 call_function_by_hand.
5577
5578 2017-09-04 Pedro Alves <palves@redhat.com>
5579
5580 * NEWS (Safer support for debugging with no debug info): New.
5581
5582 2017-09-04 Pedro Alves <palves@redhat.com>
5583
5584 * c-exp.y (function_method, function_method_void): Add current
5585 instance flags to TYPE_INSTANCE.
5586 * dwarf2read.c (check_modifier): New.
5587 (compute_delayed_physnames): Assert that only C++ adds delayed
5588 physnames. Mark fn_fields as const/volatile depending on
5589 physname.
5590 * eval.c (make_params): New type_instance_flags parameter. Use
5591 it as the new type's instance flags.
5592 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5593 flags element and pass it to make_params.
5594 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5595 instance flags element.
5596 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5597 * gdbtypes.h: Include "enum-flags.h".
5598 (type_instance_flags): New enum-flags type.
5599 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5600 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5601 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5602 (follow_type_instance_flags): New function.
5603 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5604 * parser-defs.h (follow_type_instance_flags): Declare.
5605 * valops.c (value_struct_elt_for_reference): const/volatile must
5606 match too.
5607
5608 2017-09-04 Pedro Alves <palves@redhat.com>
5609
5610 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5611 function/method scopes; lookup the nested name as a function local
5612 static variable.
5613
5614 2017-09-04 Pedro Alves <palves@redhat.com>
5615
5616 (%type <voidval>): Add function_method.
5617 * c-exp.y (exp): New production for calls with no arguments.
5618 (function_method, function_method_void_or_typelist): New
5619 productions.
5620 (exp): New production for "method()::static_var".
5621 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5622 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5623 Handle OP_FUNC_STATIC_VAR.
5624 * parse.c (operator_length_standard):
5625 Handle OP_FUNC_STATIC_VAR.
5626
5627 2017-09-04 Pedro Alves <palves@redhat.com>
5628
5629 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5630 handling.
5631 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5632 Ditto.
5633 * parse.c (operator_length_standard, operator_check_standard):
5634 Ditto.
5635 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5636
5637 2017-09-04 Pedro Alves <palves@redhat.com>
5638
5639 * ax-gdb.c: Include "typeprint.h".
5640 (gen_expr_for_cast): New function.
5641 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5642 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5643 type is unknown.
5644 * dwarf2read.c (new_symbol_full): Fallback to int instead of
5645 nodebug_data_symbol.
5646 * eval.c: Include "typeprint.h".
5647 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5648 Error out if symbol has unknown type.
5649 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5650 evaluate_subexp_for_cast.
5651 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5652 OP_VAR_MSYM_VALUE.
5653 (evaluate_subexp_for_cast): New function.
5654 * gdbtypes.c (init_nodebug_var_type): New function.
5655 (objfile_type): Use it to initialize types of variables with no
5656 debug info.
5657 * typeprint.c (error_unknown_type): New.
5658 * typeprint.h (error_unknown_type): New declaration.
5659 * compile/compile-c-types.c (convert_type_basic): Handle
5660 TYPE_CODE_ERROR; warn and fallback to int for variables with
5661 unknown type.
5662
5663 2017-09-04 Pedro Alves <palves@redhat.com>
5664
5665 * eval.c (evaluate_var_value): New function, factored out from ...
5666 (evaluate_subexp_standard): ... here.
5667
5668 2017-09-04 Pedro Alves <palves@redhat.com>
5669
5670 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5671 Remove useless assignments to 'op'.
5672
5673 2017-09-04 Pedro Alves <palves@redhat.com>
5674
5675 * eval.c (eval_skip_value): New function.
5676 (evaluate_subexp_standard): Use it.
5677
5678 2017-09-04 Pedro Alves <palves@redhat.com>
5679
5680 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5681 function name from symbol/minsym and pass it to
5682 error_call_unknown_return_type.
5683
5684 2017-09-04 Pedro Alves <palves@redhat.com>
5685
5686 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5687 * ax-gdb.c (gen_msym_var_ref): New function.
5688 (gen_expr): Handle OP_VAR_MSYM_VALUE.
5689 * eval.c (evaluate_var_msym_value): New function.
5690 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5691 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5692 to call_function_by_hand.
5693 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5694 Handle OP_VAR_MSYM_VALUE.
5695 (union exp_element) <msymbol>: New field.
5696 * minsyms.h (struct type): Forward declare.
5697 (find_minsym_type_and_address): Declare.
5698 * parse.c (write_exp_elt_msym): New function.
5699 (write_exp_msymbol): Delete, refactored as ...
5700 (find_minsym_type_and_address): ... this new function.
5701 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5702 (operator_length_standard, operator_check_standard): Handle
5703 OP_VAR_MSYM_VALUE.
5704 * std-operator.def (OP_VAR_MSYM_VALUE): New.
5705
5706 2017-09-04 Pedro Alves <palves@redhat.com>
5707
5708 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5709 TYPE_GNU_IFUNC specially here. Throw error if return type is
5710 unknown.
5711 * ada-typeprint.c (print_func_type): Handle functions with unknown
5712 return type.
5713 * c-typeprint.c (c_type_print_base): Handle functions and methods
5714 with unknown return type.
5715 * compile/compile-c-symbols.c (convert_symbol_bmsym)
5716 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5717 * compile/compile-c-types.c: Include "objfiles.h".
5718 (convert_func): For functions with unknown return type, warn and
5719 default to int.
5720 * compile/compile-object-run.c (compile_object_run): Adjust call
5721 to call_function_by_hand_dummy.
5722 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5723 call_function_by_hand.
5724 * eval.c (evaluate_subexp_standard): Adjust calls to
5725 call_function_by_hand. Handle functions and methods with unknown
5726 return type. Pass expect_type to call_function_by_hand.
5727 * f-typeprint.c (f_type_print_base): Handle functions with unknown
5728 return type.
5729 * gcore.c (call_target_sbrk): Adjust call to
5730 call_function_by_hand.
5731 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5732 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
5733 an integer address type instead of nodebug.
5734 * guile/scm-value.c (gdbscm_value_call): Adjust call to
5735 call_function_by_hand.
5736 * infcall.c (error_call_unknown_return_type): New function.
5737 (call_function_by_hand): New "default_return_type" parameter.
5738 Pass it down.
5739 (call_function_by_hand_dummy): New "default_return_type"
5740 parameter. Use it instead of defaulting to int. If there's no
5741 default and the return type is unknown, throw an error. If
5742 there's a default return type, and the called function has no
5743 debug info, then assume the function is prototyped.
5744 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5745 New "default_return_type" parameter.
5746 (error_call_unknown_return_type): New declaration.
5747 * linux-fork.c (call_lseek): Cast return type of lseek.
5748 (inferior_call_waitpid, checkpoint_command): Adjust calls to
5749 call_function_by_hand.
5750 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5751 calls to call_function_by_hand.
5752 * m2-typeprint.c (m2_procedure): Handle functions with unknown
5753 return type.
5754 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5755 (value_nsstring, print_object_command): Adjust calls to
5756 call_function_by_hand.
5757 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5758 functions with unknown return type.
5759 (pascal_type_print_func_varspec_suffix): New function.
5760 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5761 TYPE_CODE_METHOD>: Use it.
5762 * python/py-value.c (valpy_call): Adjust call to
5763 call_function_by_hand.
5764 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5765 call_function_by_hand.
5766 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5767 call_function_by_hand.
5768 * valops.c (value_allocate_space_in_inferior): Adjust call to
5769 call_function_by_hand.
5770 * typeprint.c (type_print_unknown_return_type): New function.
5771 * typeprint.h (type_print_unknown_return_type): New declaration.
5772
5773 2017-09-04 Pedro Alves <palves@redhat.com>
5774
5775 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5776 types with more than one parameter as prototyped.
5777
5778 2017-09-04 Pedro Alves <palves@redhat.com>
5779
5780 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5781 (disassemble_command): Use gdb_disassembly_flags instead of bare
5782 int.
5783 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5784 (dump_insns, do_mixed_source_and_assembly_deprecated)
5785 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5786 Use gdb_disassembly_flags instead of bare int.
5787 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5788 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5789 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5790 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5791 (enum gdb_disassembly_flag): ... values of this new enumeration.
5792 (gdb_disassembly_flags): Define.
5793 (gdb_disassembly)
5794 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5795 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5796 gdb_disassembly_flags instead of bare int.
5797 * record-btrace.c (btrace_insn_history)
5798 (record_btrace_insn_history, record_btrace_insn_history_range)
5799 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5800 instead of bare int.
5801 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5802 Use gdb_disassembly_flags instead of bare int.
5803 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5804 Define.
5805 * target-delegates.c: Regenerate.
5806 * target.c (target_insn_history, target_insn_history_from)
5807 (target_insn_history_range): Use gdb_disassembly_flags instead of
5808 bare int.
5809 * target.h: Include "disasm.h".
5810 (struct target_ops) <to_insn_history, to_insn_history_from,
5811 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5812 int.
5813 (target_insn_history, target_insn_history_from)
5814 (target_insn_history_range): Use gdb_disassembly_flags instead of
5815 bare int.
5816
5817 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5818
5819 * cli/cli-script.c (build_command_line): For if/while commands,
5820 check whether args is empty.
5821
5822 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5823
5824 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5825 (enum command_control_type): Likewise.
5826 (struct command_line): Likewise.
5827 (free_command_lines): Likewise.
5828 (struct command_lines_deleter): Likewise.
5829 (command_line_up): Likewise.
5830 (read_command_lines): Likewise.
5831 (read_command_lines_1): Likewise.
5832 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5833 (enum command_control_type): Likewise.
5834 (struct command_line): Likewise.
5835 (free_command_lines): Likewise.
5836 (struct command_lines_deleter): Likewise.
5837 (command_line_up): Likewise.
5838 (read_command_lines): Likewise.
5839 (read_command_lines_1): Likewise.
5840 * breakpoint.h: Include cli/cli-script.h.
5841 * extension-priv.h: Likewise.
5842 * gdbcmd.h: Likewise.
5843
5844 2017-09-04 Pedro Alves <palves@redhat.com>
5845
5846 * ada-lang.c (is_known_support_routine): Move sal declaration to
5847 where it is initialized.
5848 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5849 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5850 (clear_command, update_static_tracepoint): Remove init_sal
5851 references. Move declarations closer to initializations.
5852 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5853 initializations.
5854 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5855 references. Move sal declarations closer to initializations.
5856 * frame.c (find_frame_sal): Return a symtab_and_line via function
5857 return instead of output parameter. Remove init_sal references.
5858 * frame.h (find_frame_sal): Return a symtab_and_line via function
5859 return instead of output parameter.
5860 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5861 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5862 instead of memset.
5863 (gdbscm_find_pc_line): Remove init_sal reference.
5864 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5865 references. Move declarations closer to initializations.
5866 * infcmd.c (set_step_frame): Update. Move declarations closer to
5867 initializations.
5868 (finish_backward): Remove init_sal references. Move declarations
5869 closer to initializations.
5870 * infrun.c (process_event_stop_test, handle_step_into_function)
5871 (insert_hp_step_resume_breakpoint_at_frame)
5872 (insert_step_resume_breakpoint_at_caller): Likewise.
5873 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5874 (symbol_to_sal): Likewise.
5875 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5876 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5877 to its initialization.
5878 * reverse.c (save_bookmark_command): Use new/delete. Remove
5879 init_sal references. Move declarations closer to initializations.
5880 * source.c (get_current_source_symtab_and_line): Remove brace
5881 initialization.
5882 (set_current_source_symtab_and_line): Now takes the sal by const
5883 reference. Remove brace initialization.
5884 (line_info): Remove init_sal reference.
5885 * source.h (set_current_source_symtab_and_line): Now takes a
5886 symtab_and_line via const reference.
5887 * stack.c (set_current_sal_from_frame): Adjust.
5888 (print_frame_info): Adjust.
5889 (get_last_displayed_sal): Return the sal via function return
5890 instead of via output parameter. Simplify.
5891 (frame_info): Adjust.
5892 * stack.h (get_last_displayed_sal): Return the sal via function
5893 return instead of via output parameter.
5894 * symtab.c (init_sal): Delete.
5895 (find_pc_sect_line): Remove init_sal references. Move
5896 declarations closer to initializations.
5897 (find_function_start_sal): Remove init_sal references. Move
5898 declarations closer to initializations.
5899 * symtab.h (struct symtab_and_line): In-class initialize all
5900 fields.
5901 * tracepoint.c (set_traceframe_context)
5902 (print_one_static_tracepoint_marker): Remove init_sal references.
5903 Move declarations closer to initializations.
5904 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5905 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5906 declarations closer to initializations.
5907 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5908 init_sal references. Adjust.
5909
5910 2017-09-04 Pedro Alves <palves@redhat.com>
5911
5912 * ax-gdb.c (agent_command_1): Use range-for.
5913 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5914 * breakpoint.c: Include "common/array-view.h".
5915 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5916 parameter from struct symtabs_and_lines to
5917 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5918 (breakpoint_sals_to_pc): Change sals parameter from struct
5919 symtabs_and_lines to std::vector reference.
5920 (check_fast_tracepoint_sals): Change sals parameter from struct
5921 symtabs_and_lines to std::array_view. Use range-for.
5922 (decode_static_tracepoint_spec): Return a std::vector instead of
5923 symtabs_and_lines. Update.
5924 (create_breakpoint): Update.
5925 (break_range_command, until_break_command, clear_command): Update.
5926 (base_breakpoint_decode_location, bkpt_decode_location)
5927 (bkpt_probe_create_sals_from_location)
5928 (bkpt_probe_decode_location, tracepoint_decode_location)
5929 (tracepoint_probe_decode_location)
5930 (strace_marker_create_sals_from_location): Return a std::vector
5931 instead of symtabs_and_lines.
5932 (strace_marker_create_breakpoints_sal): Update.
5933 (strace_marker_decode_location): Return a std::vector instead of
5934 symtabs_and_lines. Update.
5935 (update_breakpoint_locations): Change struct symtabs_and_lines
5936 parameters to gdb::array_view. Adjust.
5937 (location_to_sals): Return a std::vector instead of
5938 symtabs_and_lines. Update.
5939 (breakpoint_re_set_default): Use std::vector instead of struct
5940 symtabs_and_lines.
5941 (decode_location_default): Return a std::vector instead of
5942 symtabs_and_lines. Update.
5943 * breakpoint.h: Include "common/array-view.h".
5944 (struct breakpoint_ops) <decode_location>: Now returns a
5945 std::vector instead of returning a symtabs_and_lines via output
5946 parameter.
5947 (update_breakpoint_locations): Change sals parameters to use
5948 gdb::array_view.
5949 * cli/cli-cmds.c (edit_command, list_command): Update to use
5950 std::vector and gdb::array_view.
5951 (ambiguous_line_spec): Adjust to use gdb::array_view and
5952 range-for.
5953 (compare_symtabs): Rename to ...
5954 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5955 const reference and adjust.
5956 (filter_sals): Rewrite using std::vector and standard algorithms.
5957 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5958 (jump_command): Update to use std::vector.
5959 * linespec.c (struct linespec_state) <canonical_names>: Update
5960 comment.
5961 (add_sal_to_sals_basic): Delete.
5962 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5963 (decode_line_2, create_sals_line_offset)
5964 (convert_address_location_to_sals, convert_linespec_to_sals)
5965 (convert_explicit_location_to_sals, parse_linespec)
5966 (event_location_to_sals, decode_line_full, decode_line_1)
5967 (decode_line_with_current_source)
5968 (decode_line_with_last_displayed, decode_objc)
5969 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5970 (linespec_result::~linespec_result): Adjust to use std::vector
5971 instead of symtabs_and_lines.
5972 * linespec.h (linespec_sals::sals): Now a std::vector.
5973 (struct linespec_result): Use std::vector, bool, and in-class
5974 initialization.
5975 (decode_line_1, decode_line_with_current_source)
5976 (decode_line_with_last_displayed): Return std::vector.
5977 * macrocmd.c (info_macros_command): Use std::vector.
5978 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5979 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5980 std::vector.
5981 * probe.h (parse_probes): Return a std::vector.
5982 * python/python.c (gdbpy_decode_line): Use std::vector and
5983 gdb::array_view.
5984 * source.c (select_source_symtab, line_info): Use std::vector.
5985 * stack.c (func_command): Use std::vector.
5986 * symtab.h (struct symtabs_and_lines): Delete.
5987 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5988
5989 2017-09-04 Pedro Alves <palves@redhat.com>
5990
5991 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5992 unittests/array-view-selftests.c.
5993 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5994 * common/array-view.h: New file.
5995 * unittests/array-view-selftests.c: New file.
5996
5997 2017-09-04 Pedro Alves <palves@redhat.com>
5998
5999 * cli/cli-cmds.c (edit_command): Pass message to
6000 ambiguous_line_spec.
6001 (list_command): Pass message to ambiguous_line_spec. Say
6002 "first"/"last" instead of "start" and "end" to be consistent with
6003 the manual.
6004 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
6005 them to print formatted message.
6006
6007 2017-09-04 Pedro Alves <palves@redhat.com>
6008
6009 * btrace.c (ftrace_add_pt): Pass btrace_insn to
6010 ftrace_update_insns by reference instead of pointer.
6011
6012 2017-09-04 Yao Qi <yao.qi@linaro.org>
6013
6014 * i386-go32-tdep.c: Include x86-xstate.h.
6015 (i386_go32_init_abi): Call i386_target_description.
6016 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6017 if xcr0 is X86_XSTATE_X87_MASK.
6018 * i386-tdep.h (tdesc_i386): Remove the declaration.
6019 (tdesc_i386_mmx): Likewise.
6020
6021 2017-09-04 Yao Qi <yao.qi@linaro.org>
6022
6023 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6024 X86_XSTATE_SSE_MASK instead of 0.
6025
6026 2017-09-04 Yao Qi <yao.qi@linaro.org>
6027
6028 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6029 i386_target_description.
6030 * i386-fbsd-nat.c (i386fbsd_read_description): Call
6031 i386_target_description.
6032 * i386-tdep.c (i386_gdbarch_init): Likewise.
6033
6034 2017-09-04 Yao Qi <yao.qi@linaro.org>
6035
6036 * amd64-darwin-tdep.c: Include "x86-xstate.h".
6037 (x86_darwin_init_abi_64): Call amd64_target_description.
6038 * amd64-dicos-tdep.c: Likewise.
6039 * amd64-fbsd-nat.c: Likewise.
6040 * amd64-fbsd-tdep.c: Likewise.
6041 * amd64-nbsd-tdep.c: Likewise.
6042 * amd64-obsd-tdep.c: Likewise.
6043 * amd64-sol2-tdep.c: Likewise.
6044 * amd64-windows-tdep.c: Likewise.
6045 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6046
6047 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6048
6049 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6050 (btrace_function) <insn>: Change type to use std::vector.
6051 * btrace.c (ftrace_debug, ftrace_call_num_insn,
6052 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6053 ftrace_update_insns, ftrace_compute_global_level_offset,
6054 btrace_stitch_bts, btrace_clear, btrace_insn_get,
6055 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6056 change to std::vector.
6057 (ftrace_update_insns): Adjust to change to std::vector, change
6058 type of INSN parameter.
6059 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6060 * record-btrace.c (btrace_call_history_insn_range,
6061 btrace_compute_src_line_range,
6062 record_btrace_frame_prev_register): Adjust to change to
6063 std::vector.
6064 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6065 to change to std::vector.
6066
6067 2017-09-03 Tom Tromey <tom@tromey.com>
6068
6069 * corefile.c (reopen_exec_file): Use std::string.
6070
6071 2017-09-03 Tom Tromey <tom@tromey.com>
6072
6073 * compile/compile.c (compile_register_name_mangled): Return
6074 std::string.
6075 * compile/compile-loc2c.c (pushf_register_address): Update.
6076 (pushf_register): Update.
6077 * compile/compile-c-types.c (convert_array): Update.
6078 * compile/compile-c-symbols.c (generate_vla_size): Update.
6079 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6080 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6081 (convert_one_symbol): Update.
6082 (generate_c_for_for_one_variable): Update.
6083 * compile/compile-c-support.c (c_get_range_decl_name): Return a
6084 std::string.
6085 (generate_register_struct): Update.
6086 * compile/compile-internal.h (c_get_range_decl_name): Return a
6087 std::string.
6088 (compile_register_name_mangled): Return std::string.
6089
6090 2017-09-03 Tom Tromey <tom@tromey.com>
6091
6092 * utils.c (perror_string): Return a std::string.
6093 (throw_perror_with_name, perror_warning_with_name): Update.
6094
6095 2017-09-03 Tom Tromey <tom@tromey.com>
6096
6097 * demangle.c (demangle_command): Use std::string,
6098 unique_xmalloc_ptr.
6099
6100 2017-09-03 Tom Tromey <tom@tromey.com>
6101
6102 * cli/cli-setshow.c (do_set_command): Use std::string.
6103
6104 2017-09-03 Tom Tromey <tom@tromey.com>
6105
6106 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6107
6108 2017-09-03 Tom Tromey <tom@tromey.com>
6109
6110 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6111
6112 2017-09-03 Tom Tromey <tom@tromey.com>
6113
6114 * mi/mi-cmd-env.c (env_execute_cli_command): Use
6115 gdb::unique_xmalloc_ptr.
6116
6117 2017-09-03 Tom Tromey <tom@tromey.com>
6118
6119 * thread.c (print_thread_info_1): Use string_printf.
6120 (thread_apply_command, thread_apply_all_command): Use
6121 std::string.
6122
6123 2017-09-03 Tom Tromey <tom@tromey.com>
6124
6125 * valprint.c (val_print_string): Update.
6126 * gdbcore.h (memory_error_message): Return std::string.
6127 * corefile.c (memory_error_message): Return std::string.
6128 (memory_error): Update.
6129 * breakpoint.c (insert_bp_location): Update.
6130
6131 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6132
6133 * target/waitstatus.h (target_waitstatus_to_string): Change
6134 return type to std::string.
6135 * target/waitstatus.c (target_waitstatus_to_string): Return
6136 std::string.
6137 * target.h (target_waitstatus_to_string): Remove declaration.
6138 * infrun.c (resume, clear_proceed_status_thread,
6139 print_target_wait_results, do_target_wait, save_waitstatus,
6140 stop_all_threads): Adjust.
6141 * record-btrace.c (record_btrace_wait): Adjust.
6142 * target-debug.h
6143 (target_debug_print_struct_target_waitstatus_p): Adjust.
6144
6145 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6146
6147 PR gdb/22046
6148 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6149 detection.
6150
6151 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6152
6153 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6154 for setting/unsetting environment variables on the remote target.
6155 (New remote packets): Add entries for QEnvironmentHexEncoded,
6156 QEnvironmentUnset and QEnvironmentReset.
6157 * common/environ.c (gdb_environ::operator=): Extend method to
6158 handle m_user_set_env_list and m_user_unset_env_list.
6159 (gdb_environ::clear): Likewise.
6160 (match_var_in_string): Change type of first parameter from 'char
6161 *' to 'const char *'.
6162 (gdb_environ::set): Extend method to handle
6163 m_user_set_env_list and m_user_unset_env_list.
6164 (gdb_environ::unset): Likewise.
6165 (gdb_environ::clear_user_set_env): New method.
6166 (gdb_environ::user_set_envp): Likewise.
6167 (gdb_environ::user_unset_envp): Likewise.
6168 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6169 m_user_unset_env_list on move constructor/assignment.
6170 (unset): Add new default parameter 'update_unset_list = true'.
6171 (clear_user_set_env): New method.
6172 (user_set_envp): Likewise.
6173 (user_unset_envp): Likewise.
6174 (m_user_set_env_list): New std::set.
6175 (m_user_unset_env_list): Likewise.
6176 * common/rsp-low.c (hex2str): New function.
6177 (bin2hex): New overload for bin2hex function.
6178 * common/rsp-low.c (hex2str): New prototype.
6179 (str2hex): New overload prototype.
6180 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6181 QEnvironmentUnset and QEnvironmentReset.
6182 (remote_protocol_features): Add QEnvironmentHexEncoded,
6183 QEnvironmentUnset and QEnvironmentReset packets.
6184 (send_environment_packet): New function.
6185 (extended_remote_environment_support): Likewise.
6186 (extended_remote_create_inferior): Call
6187 extended_remote_environment_support.
6188 (_initialize_remote): Add QEnvironmentHexEncoded,
6189 QEnvironmentUnset and QEnvironmentReset packet configs.
6190 * unittests/environ-selftests.c (gdb_selftest_env_var):
6191 New variable.
6192 (test_vector_initialization): New function.
6193 (test_init_from_host_environ): Likewise.
6194 (test_reinit_from_host_environ): Likewise.
6195 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6196 Likewise.
6197 (test_unset_set_empty_vector): Likewise.
6198 (test_vector_clear): Likewise.
6199 (test_std_move): Likewise.
6200 (test_move_constructor):
6201 (test_self_move): Likewise.
6202 (test_set_unset_reset): Likewise.
6203 (run_tests): Rewrite in terms of the functions above.
6204
6205 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
6206
6207 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6208 (adi_available): Use a temp variable of type CORE_ADDR as argument
6209 3 when calling target_auxv_search.
6210 (adi_normalize_address): Use masks and xor operators to calculate
6211 normalized address.
6212 (adi_read_versions, adi_write_versions, adi_print_versions)
6213 (do_examine, do_assign): Use paddress.
6214
6215 2017-08-29 John Baldwin <jhb@FreeBSD.org>
6216
6217 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6218 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6219 out of loop and add supply of FIR.
6220 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6221 add collect of FIR.
6222
6223 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
6224
6225 PR gdb/21827
6226 * cli/cli-script.c (define_command): Don't convert command name
6227 to lower case.
6228
6229 2017-08-25 Joel Brobecker <brobecker@adacore.com>
6230
6231 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6232 Update all callers accordingly. Remove all code blocks handling
6233 the case where DISPP is not NULL.
6234
6235 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6236
6237 PR symtab/22003
6238 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6239 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6240 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6241
6242 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6243
6244 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6245 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6246 (read_comp_units_from_section): New parameter abbrev_section, use
6247 read_and_check_comp_unit_head, allocate signatured_type if needed.
6248 (create_all_comp_units): Update read_comp_units_from_section caller.
6249
6250 2017-08-23 Pedro Alves <palves@redhat.com>
6251
6252 PR remote/21852
6253 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6254 to null_ptid and switch to thread without reading the registers
6255 after adding the inferior.
6256
6257 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6258
6259 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6260 compile-gcc.
6261 * compile/compile.c (compile_gcc, show_compile_gcc): New.
6262 (compile_to_object): Implement compile_gcc.
6263 (_initialize_compile): Install "set compile-gcc". Initialize
6264 compile_gcc.
6265
6266 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6267
6268 * compile/compile.c (compile_to_object): Conditionally call
6269 set_verbose. Conditionally call compile or compile_v0.
6270
6271 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
6272
6273 * sparc64-tdep.h: (adi_normalize_address): New export.
6274 * sparc-nat.h: (open_adi_tag_fd): New export.
6275 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6276 * sparc64-linux-tdep.c:
6277 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6278 (sparc64_linux_handle_segmentation_fault): New function.
6279 (sparc64_linux_init_abi): Register
6280 sparc64_linux_handle_segmentation_fault
6281 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6282 (sparc64_addr_bits_remove): New function.
6283 (sparc64_init_abi): Register sparc64_addr_bits_remove.
6284 (MAX_PROC_NAME_SIZE): New macro.
6285 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6286 (sparc64adilist): New variable.
6287 (adi_proc_list): New variable.
6288 (find_adi_info): New function.
6289 (add_adi_info): New function.
6290 (get_adi_info_proc): New function.
6291 (get_adi_info): New function.
6292 (info_adi_command): New function.
6293 (read_maps_entry): New function.
6294 (adi_available): New function.
6295 (adi_normalize_address): New function.
6296 (adi_align_address): New function.
6297 (adi_convert_byte_count): New function.
6298 (adi_tag_fd): New function.
6299 (adi_is_addr_mapped): New function.
6300 (adi_read_versions): New function.
6301 (adi_write_versions): New function.
6302 (adi_print_versions): New function.
6303 (do_examine): New function.
6304 (do_assign): New function.
6305 (adi_examine_command): New function.
6306 (adi_assign_command): New function.
6307 (_initialize_sparc64_adi_tdep): New function.
6308
6309 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
6310
6311 * breakpoint.c (breakpoints_info): Rename to ...
6312 (info_breakpoints_command): ... this.
6313 (watchpoints_info): Rename to ...
6314 (info_watchpoints_command): ... this.
6315 (tracepoints_info): Rename to ...
6316 (info_tracepoints_command): ... this.
6317 (_initialize_breakpoint): Adjust.
6318 * dcache.c (dcache_info): Rename to ...
6319 (info_display_command): ... this.
6320 (_initialize_dcache): Adjust.
6321 * frame.h (args_info): Rename to ...
6322 (info_args_command): ... this.
6323 (locals_info): Rename to ...
6324 (info_locals_command): ... this.
6325 * infcmd.c (nofp_registers_info): Rename to ...
6326 (info_registers_command): ... this.
6327 (float_info): Rename to ...
6328 (info_float_command): ... this.
6329 (program_info): Rename to ...
6330 (info_program_command): ... this.
6331 (all_registers_info): Rename to ...
6332 (info_all_registers_command): ... this.
6333 (vector_info): Rename to ...
6334 (info_vector_command): ... this.
6335 (float_info): Rename to ...
6336 (info_float_command): ... this.
6337 (_initialize_infcmd): Adjust.
6338 * inferior.h (term_info): Rename to ...
6339 (info_terminal_command): ... this.
6340 * inflow.c (term_info): Rename to ...
6341 (info_terminal_command): ... this.
6342 (_initialize_inflow): Adjust.
6343 * infrun.c (signals_info): Rename to ...
6344 (info_signals_command): ... this.
6345 (_initialize_infrun): Adjust.
6346 * objc-lang.c (classes_info): Rename to ...
6347 (info_classes_command): ... this.
6348 (selectors_info): Rename to ...
6349 (info_selectors_command): ... this.
6350 (_initialize_objc_language): Adjust.
6351 * printcmd.c (sym_info): Rename to ...
6352 (info_symbol_command): ... this.
6353 (address_info): Rename to ...
6354 (info_address_command): ... this.
6355 (display_info): Rename to ...
6356 (info_display_command): ... this.
6357 (_initialize_printcmd): Adjust.
6358 * reverse.c (bookmarks_info): Rename to ...
6359 (info_breakpoints_command): ... this.
6360 (_initialize_reverse): Adjust.
6361 * ser-go32.c (dos_info): Rename to ...
6362 (info_serial_command): ... this.
6363 (_initialize_ser_dos): Adjust.
6364 * skip.c (skip_info): Rename to ...
6365 (info_skip_command): ... this.
6366 (_initialize_step_skip): Adjust.
6367 * source.c (line_info): Rename to ...
6368 (info_line_command): ... this.
6369 (source_info): Rename to ...
6370 (info_source_command)
6371 * stack.c (frame_info): Rename to ...
6372 (info_frame_command): ... this.
6373 (locals_info): Rename to ...
6374 (info_locals_command): ... this.
6375 (args_info): Rename to ...
6376 (info_args_command): ... this.
6377 (_initialize_stack): Adjust.
6378 * symtab.c (sources_info): Rename to ...
6379 (info_sources_command): ... this.
6380 (variables_info): Rename to ...
6381 (info_variables_command): ... this.
6382 (functions_info): Rename to ...
6383 (info_functions_command): ... this.
6384 (types_info): Rename to ...
6385 (info_types_command): ... this.
6386 (_initialize_symtab): Adjust.
6387 * target.c (target_info): Rename to ...
6388 (info_target_command): ... this.
6389 (initialize_targets): Adjust.
6390 * tracepoint.c (tvariables_info): Rename to ...
6391 (info_tvariables_command): ... this.
6392 (scope_info): Rename to ...
6393 (info_scope_command): ... this.
6394 (trace_dump_actions): Adjust.
6395 (_initialize_tracepoint): Adjust.
6396
6397 2017-08-22 Tom Tromey <tom@tromey.com>
6398
6399 * breakpoint.h (install_breakpoint): Update.
6400 * breakpoint.c (add_solib_catchpoint): Update.
6401 (install_breakpoint): Change argument to a std::unique_ptr.
6402 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6403 (create_breakpoint_sal, create_breakpoint): Update.
6404 (watch_command_1, catch_exec_command_1)
6405 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6406 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6407 Return the breakpoint.
6408 (set_raw_breakpoint_without_location, set_raw_breakpoint)
6409 (new_single_step_breakpoint): Update.
6410 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6411 std::unique_ptr.
6412 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6413 std::unique_ptr.
6414 * break-catch-sig.c (create_signal_catchpoint): Use
6415 std::unique_ptr.
6416 * ada-lang.c (create_ada_exception_catchpoint): Use
6417 std::unique_ptr.
6418
6419 2017-08-22 Tom Tromey <tom@tromey.com>
6420
6421 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6422
6423 2017-08-22 Tom Tromey <tom@tromey.com>
6424
6425 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6426 (lookup_partial_symbol): Update.
6427
6428 2017-08-22 Tom Tromey <tom@tromey.com>
6429
6430 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6431 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6432 (find_and_open_source, symtab_to_fullname): Update.
6433 * psymtab.c (psymtab_to_fullname): Update.
6434
6435 2017-08-22 Tom Tromey <tom@tromey.com>
6436
6437 * exec.c (exec_file_attach): Update.
6438 * linux-thread-db.c (try_thread_db_load): Update.
6439 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6440 * utils.c (gdb_realpath): Change return type.
6441 (gdb_realpath_keepfile): Update.
6442 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6443 (_initialize_utils): Register the new self test.
6444 * source.c (openp): Update.
6445 (find_and_open_source): Update.
6446 * nto-tdep.c (nto_find_and_open_solib): Update.
6447 * main.c (set_gdb_data_directory): Update.
6448 (captured_main_1): Update.
6449 * dwarf2read.c (dwarf2_get_dwz_file): Update
6450 (dw2_map_symbol_filenames): Update.
6451 * auto-load.c (auto_load_safe_path_vec_update): Update.
6452 (filename_is_in_auto_load_safe_path_vec): Change type of
6453 "filename_realp".
6454 (auto_load_objfile_script): Update.
6455 (file_is_auto_load_safe): Update. Use std::string.
6456 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6457
6458 2017-08-22 Tom Tromey <tom@tromey.com>
6459
6460 * utils.c (gdb_realpath_keepfile): Return a
6461 gdb::unique_xmalloc_ptr.
6462 * exec.c (exec_file_attach): Update.
6463 * utils.h (gdb_realpath_keepfile): Return a
6464 gdb::unique_xmalloc_ptr.
6465
6466 2017-08-22 Tom Tromey <tom@tromey.com>
6467
6468 * compile/compile.c (compile_file_command): Use
6469 gdb::unique_xmalloc_ptr, std::string.
6470 * utils.c (gdb_abspath): Change return type.
6471 * source.c (openp): Update.
6472 * objfiles.c (allocate_objfile): Update.
6473 * main.c (set_gdb_data_directory): Update.
6474 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6475
6476 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
6477
6478 * cli-cmds.c (list_commands): List actual code around more than
6479 one location.
6480
6481 2017-08-21 John Baldwin <jhb@FreeBSD.org>
6482
6483 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6484
6485 2017-08-21 Pedro Alves <palves@redhat.com>
6486
6487 PR gdb/19487
6488 * c-exp.y (variable production): Handle function aliases.
6489 * minsyms.c (msymbol_is_text): New function.
6490 * minsyms.h (msymbol_is_text): Declare.
6491 * symtab.c (find_function_alias_target): New function.
6492 * symtab.h (find_function_alias_target): Declare.
6493
6494 2017-08-21 Pedro Alves <palves@redhat.com>
6495
6496 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6497 typedefs.
6498 * typeprint.c (whatis_exp): If handling "whatis", and expression
6499 is OP_TYPE, strip one typedef level. Otherwise don't strip
6500 typedefs here.
6501 * valops.c (value_cast): Save "to" type before resolving
6502 stubs/typedefs. Use that type as resulting value's type.
6503
6504 2017-08-18 Tom Tromey <tom@tromey.com>
6505 Pedro Alves <palves@redhat.com>
6506
6507 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6508 * sol-thread.c (sol_thread_resume, sol_thread_wait)
6509 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6510 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6511 * proc-service.c (ps_xfer_memory): Use scoped_restore.
6512 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6513 (linux_get_siginfo_data): Add "thread" argument. Use
6514 scoped_restore.
6515 * linux-nat.c (linux_child_follow_fork)
6516 (check_stopped_by_watchpoint): Use scoped_restore.
6517 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6518 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6519 (restore_inferior_ptid, save_inferior_ptid): Remove.
6520 * btrace.c (btrace_fetch): Use scoped_restore.
6521 * bsd-uthread.c (bsd_uthread_fetch_registers)
6522 (bsd_uthread_store_registers): Use scoped_restore.
6523 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6524 scoped_restore.
6525 * aix-thread.c (aix_thread_resume, aix_thread_wait)
6526 (aix_thread_xfer_partial): Use scoped_restore.
6527 * inferior.h (save_inferior_ptid): Remove.
6528
6529 2017-08-18 Yao Qi <yao.qi@linaro.org>
6530
6531 PR tdep/21818
6532 * arm-tdep.c (gdb_print_insn_arm): Mark
6533 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6534
6535 2017-08-18 Yao Qi <yao.qi@linaro.org>
6536
6537 * NEWS: Mention GDBserver's new option "--selftest".
6538 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6539 * selftest.c: Move it to common/selftest.c.
6540 * selftest.h: Move it to common/selftest.h.
6541 * selftest-arch.c (reset): New function.
6542 (tests_with_arch): Call reset.
6543
6544 2017-08-18 Yao Qi <yao.qi@linaro.org>
6545
6546 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
6547 instead of exception_fprintf and printf_filtered.
6548
6549 2017-08-18 Yao Qi <yao.qi@linaro.org>
6550
6551 * selftest.c (register_self_test): Rename it to
6552 selftests::register_test.
6553 (run_self_tests): selftest::run_tests.
6554 * selftest.h: Update declarations.
6555 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6556 selftests::register_test_foreach_arch.
6557 * selftest-arch.h: Update declaration.
6558 * aarch64-tdep.c: Update.
6559 * arm-tdep.c: Likewise.
6560 * disasm-selftests.c: Likewise.
6561 * dwarf2loc.c: Likewise.
6562 * dwarf2-frame.c: Likewise.
6563 * findvar.c: Likewise.
6564 * gdbarch-selftests.c: Likewise.
6565 * maint.c (maintenance_selftest): Likewise.
6566 * regcache.c: Likewise.
6567 * rust-exp.y: Likewise.
6568 * selftest-arch.c: Likewise.
6569 * unittests/environ-selftests.c: Likewise.
6570 * unittests/function-view-selftests.c: Likewise.
6571 * unittests/offset-type-selftests.c: Likewise.
6572 * unittests/optional-selftests.c: Likewise.
6573 * unittests/scoped_restore-selftests.c: Likewise.
6574 * utils-selftests.c: Likewise.
6575
6576 2017-08-17 Pedro Alves <palves@redhat.com>
6577
6578 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6579 local.
6580
6581 2017-08-17 Pedro Alves <palves@redhat.com>
6582
6583 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6584 field.
6585 (reset_die_in_process): Delete, replaced by ...
6586 (process_die_scope): ... this new class. Make it responsible for
6587 freeing cu->line_header too.
6588 (process_die): Use process_die_scope.
6589 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6590 cu->line_header_die_owner. Don't release the line header if it's
6591 owned by the CU.
6592 (setup_type_unit_groups): Make the CU/DIE own the line header.
6593 Don't release the line header here.
6594
6595 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
6596
6597 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6598
6599 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
6600
6601 * NEWS: Mention new shortcuts for nexti and stepi in TUI
6602 Single-Key mode
6603
6604 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
6605
6606 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6607 mode command list.
6608
6609 2017-08-15 Stafford Horne <shorne@gmail.com>
6610
6611 * MAINTAINERS (Write After Approval): Add Stafford Horne.
6612
6613 2017-08-15 Stafford Horne <shorne@gmail.com>
6614
6615 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6616
6617 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
6618
6619 PR gdb/21954
6620 * infcmd.c (unset_environment_command): Use the 'clear' method on
6621 the environment instead of resetting it.
6622
6623 2017-08-15 John Baldwin <jhb@FreeBSD.org>
6624
6625 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6626 platforms.
6627
6628 2017-08-14 Tom Tromey <tom@tromey.com>
6629
6630 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6631 (print_binary_chars): Likewise.
6632 (BITS_IN_BYTES): Remove.
6633
6634 2017-08-14 Tom Tromey <tom@tromey.com>
6635
6636 PR gdb/21675
6637 * valprint.c (LOW_ZERO): Change value to 034.
6638 (print_octal_chars): Add static_asserts for octal constants.
6639 * printcmd.c (print_scalar_formatted): Add 'd' case.
6640
6641 2017-08-11 Tom Tromey <tom@tromey.com>
6642
6643 * symfile.c (add_symbol_file_command): Use std::vector.
6644
6645 2017-08-14 Tom Tromey <tom@tromey.com>
6646
6647 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6648 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6649 std::move.
6650 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6651
6652 2017-08-11 Pedro Alves <palves@redhat.com>
6653
6654 * infrun.c (process_event_stop_test): Adjust
6655 function_name_is_marked_for_skip call.
6656 * skip.c: Include <list>.
6657 (skiplist_entry): Make it a class with private fields, and
6658 getters/setters.
6659 (skiplist_entry_chain): Delete.
6660 (skiplist_entries): New.
6661 (skiplist_entry_count): Delete.
6662 (highest_skiplist_entry_num): New.
6663 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6664 (add_skiplist_entry): Delete.
6665 (skiplist_entry::skiplist_entry): New.
6666 (skiplist_entry::add_entry): New.
6667 (skip_file_command, skip_function): Adjust.
6668 (compile_skip_regexp): Delete.
6669 (skip_command): Don't compile regexp here. Adjust to use
6670 skiplist_entry::add_entry.
6671 (skip_info): Adjust to use range-for and getters.
6672 (skip_enable_command, skip_disable_command): Adjust to use
6673 range-for and setters.
6674 (skip_delete_command): Adjust to use std::list.
6675 (add_skiplist_entry): Delete.
6676 (skip_file_p): Delete, refactored as ...
6677 (skiplist_entry::do_skip_file_p): ... this new method.
6678 (skip_gfile_p): Delete, refactored as ...
6679 (skiplist_entry::do_gskip_file_p): ... this new method.
6680 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6681 (skiplist_entry::skip_function_p): ... this new method.
6682 (function_name_is_marked_for_skip): Now returns bool, and takes
6683 the function sal by const reference. Adjust to use range-for and
6684 skiplist_entry methods.
6685 (_initialize_step_skip): Remove references to
6686 skiplist_entry_chain, skiplist_entry_count.
6687 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6688 takes the function sal by const reference.
6689
6690 2017-08-11 Yao Qi <yao.qi@linaro.org>
6691
6692 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6693 (dwarf2_frame_cache): Remove reset_cache_cleanup.
6694 (dwarf2_frame_cache):
6695 * frame-unwind.c (frame_unwind_try_unwinder): Catch
6696 RETURN_MASK_ALL and set *this_case to NULL.
6697 * frame-unwind.h: Update comments.
6698
6699 2017-08-11 Yao Qi <yao.qi@linaro.org>
6700
6701 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6702 (dwarf2_frame_state_copy_regs): Remove.
6703 (dwarf2_frame_state_free_regs): Remove.
6704 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6705 (dwarf2_restore_rule): Call method .alloc_regs instead of
6706 dwarf2_frame_state_alloc_regs.
6707 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
6708 constructor. Call std::move.
6709 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6710 (dwarf2_frame_cache): Likewise.
6711
6712 [GDB_SELF_TEST]: Include selftest.h and
6713 selftest-arch.h.
6714 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6715 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6716 execute_cfa_program_test.
6717
6718 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6719 copy ctor, assignment operator, move assignment.
6720 <alloc_regs>: New method.
6721 <swap>: New method.
6722 (struct dwarf2_frame_state): Delete dtor.
6723 (dwarf2_frame_state_alloc_regs): Remove declaration.
6724 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6725 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6726
6727 2017-08-11 Yao Qi <yao.qi@linaro.org>
6728
6729 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6730 (dwarf2_frame_state::dwarf2_frame_state): New.
6731 (dwarf2_frame_state::~dwarf2_frame_state): New.
6732 (dwarf2_fetch_cfa_info): Update.
6733 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
6734 rather than a pointer. Update code.
6735 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6736 dtor.
6737 <data_align, code_align, retaddr_column>: Change them to const.
6738 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6739 to bool.
6740
6741 2017-08-11 Yao Qi <yao.qi@linaro.org>
6742
6743 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6744 <loc.exp>: New field.
6745 * dwarf2-frame.c (execute_cfa_program): Update.
6746 (dwarf2_frame_prev_register): Update.
6747
6748 2017-08-10 Pedro Alves <palves@redhat.com>
6749
6750 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6751
6752 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6753
6754 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6755 (fbsd_pending_children): Use std::list.
6756 (fbsd_remember_child): Likewise.
6757 (fbsd_is_child_pending): Likewise.
6758 (fbsd_pending_vfork_done): Use std::forward_list.
6759 (fbsd_add_vfork_done): Likewise.
6760 (fbsd_is_vfork_done_pending): Likewise.
6761 (fbsd_next_vfork_done): Likewise.
6762
6763 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6764
6765 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6766 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6767 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6768 for `mapfilename'.
6769 (fbsd_xfer_partial): Use gdb::byte_vector.
6770 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6771
6772 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6773
6774 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6775 "filestuff.h".
6776 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6777
6778 2017-08-09 Tom Tromey <tom@tromey.com>
6779
6780 * skip.c (skiplist_entry): New constructor.
6781 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6782 (skiplist_entry::file_is_glob): Now bool.
6783 (skiplist_entry::file, skiplist_entry::function): Now
6784 std::string.
6785 (make_skip_entry): Return a unique_ptr. Use new.
6786 (free_skiplist_entry, free_skiplist_entry_cleanup)
6787 (make_free_skiplist_entry_cleanup): Remove.
6788 (skip_command, skip_disable_command, add_skiplist_entry)
6789 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6790 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6791 (function_name_is_marked_for_skip): Update.
6792 (skip_delete_command): Update. Use delete.
6793
6794 2017-08-09 Jiong Wang <jiong.wang@arm.com>
6795
6796 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6797 (aarch64_linux_core_read_description): New function.
6798 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6799
6800 2017-08-09 Pedro Alves <palves@redhat.com>
6801
6802 * cp-name-parser.y (cp_comp_to_string): Return a
6803 gdb::unique_xmalloc_ptr<char>.
6804 * cp-support.c (replace_typedefs_qualified_name)
6805 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6806 (cp_canonicalize_string_full): Use op= instead of explicit
6807 convertion.
6808 (cp_class_name_from_physname, method_name_from_physname)
6809 (cp_func_name, cp_remove_params): Adjust to use
6810 gdb::unique_xmalloc_ptr<char>.
6811 * cp-support.h (cp_comp_to_string): Return a
6812 gdb::unique_xmalloc_ptr<char>.
6813 * python/py-type.c (typy_lookup_type): Adjust to use
6814 gdb::unique_xmalloc_ptr<char>.
6815
6816 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6817
6818 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6819
6820 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6821 Yao Qi <yao.qi@linaro.org>
6822
6823 * cp-support.c (cp_canonicalize_string_full): Use
6824 gdb::unique_xmalloc_ptr<char>.
6825 (cp_canonicalize_string): Likewise.
6826
6827 2017-08-09 Yao Qi <yao.qi@linaro.org>
6828
6829 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6830 * regformats/i386/amd64-avx-avx512.dat: Remove.
6831 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6832 * regformats/i386/amd64-avx-mpx.dat:Remove.
6833 * regformats/i386/amd64-avx.dat: Remove.
6834 * regformats/i386/amd64-mpx.dat: Remove.
6835 * regformats/i386/i386-avx-avx512.dat: Remove.
6836 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6837 * regformats/i386/i386-avx-mpx.dat: Remove.
6838 * regformats/i386/i386-mmx.dat: Remove.
6839 * regformats/i386/i386-mpx.dat: Remove.
6840
6841 2017-08-09 Yao Qi <yao.qi@linaro.org>
6842
6843 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6844 * amd64-tdep.c: Don't include features/i386/x32*.c.
6845 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6846 functions.
6847 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6848 and i386/x32-avx-avx512.
6849 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6850 and i386/x32.xml.
6851 * features/i386/x32-avx-avx512.c: Removed.
6852 * features/i386/x32-avx-avx512.xml: Removed.
6853 * features/i386/x32-avx.c: Removed.
6854 * features/i386/x32-avx.xml: Removed.
6855 * features/i386/x32.c: Removed.
6856 * features/i386/x32.xml: Removed.
6857 * regformats/i386/x32-avx-avx512.dat: Removed.
6858 * regformats/i386/x32-avx.dat: Removed.
6859 * regformats/i386/x32.dat: Removed.
6860
6861 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6862
6863 PR breakpoints/21886
6864 * mem-break.c (default_memory_insert_breakpoint): Use
6865 `->placed_address' rather than `->reqstd_address' for the
6866 breakpoint location.
6867
6868 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6869
6870 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6871 assertions.
6872
6873 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6874
6875 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6876 a union of `tdep_info', `tdesc_data' and `id'.
6877 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6878 rather than `info.tdep_info'.
6879 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6880 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6881 * i386-tdep.c (i386_gdbarch_init): Likewise.
6882 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6883 * mips-tdep.c (mips_gdbarch_init): Likewise.
6884 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6885 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6886 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6887 `info.tdep_info'.
6888 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6889 `info.tdep_info'.
6890 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6891 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6892 `info.tdep_info'.
6893 * spu-tdep.c (spu_gdbarch_init): Likewise.
6894 * gdbarch.h: Regenerate.
6895
6896 2017-08-07 Leszek Swirski <leszeks@google.com>
6897
6898 PR symtab/20899
6899 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6900
6901 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6902
6903 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6904 (gdbsim_open): Rename gdb_argv args object to argv.
6905
6906 2017-08-05 Tom Tromey <tom@tromey.com>
6907
6908 * compile/compile-object-load.c (compile_object_load): Use
6909 gdb::unique_xmalloc_ptr.
6910 * cli/cli-dump.c (scan_filename): Rename from
6911 scan_filename_with_cleanup. Change return type.
6912 (scan_expression): Rename from scan_expression_with_cleanup.
6913 Change return type.
6914 (dump_memory_to_file, dump_value_to_file, restore_command):
6915 Use gdb::unique_xmalloc_ptr. Update.
6916 * cli/cli-cmds.c (find_and_open_script): Use
6917 gdb::unique_xmalloc_ptr.
6918 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6919 * symmisc.c (maintenance_print_symbols)
6920 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6921 * symfile.c (symfile_bfd_open, generic_load)
6922 (add_symbol_file_command, remove_symbol_file_command): Use
6923 gdb::unique_xmalloc_ptr.
6924 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6925 * psymtab.c (maintenance_print_psymbols): Use
6926 gdb::unique_xmalloc_ptr.
6927 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6928 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6929 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6930 (reload_shared_libraries_1): Likewise.
6931
6932 2017-08-05 Tom Tromey <tom@tromey.com>
6933
6934 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6935 (rust_op_vector, rust_set_vector): New typedefs.
6936 (current_parser): New global.
6937 (work_obstack): Change to pointer type. Update all users.
6938 (rust_ast, pstate): Remove globals.
6939 (struct rust_parser): New.
6940 (%union) <params, field_inits>: Change type.
6941 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6942 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6943 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6944 (convert_params_to_types, convert_params_to_expression): Change
6945 type of "params".
6946 (ast_string): Change type of "fields".
6947 (rust_parse): Make a rust_parser. Remove cleanups.
6948 (rust_lex_tests): Make and install an auto_obstack.
6949
6950 2017-08-04 Yao Qi <yao.qi@linaro.org>
6951
6952 * configure.srv (ipa_x32_linux_regobj): New.
6953 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6954 instead of X86_TDESC_AVX512.
6955 (initialize_low_tracepoint): Call
6956 init_registers_x32_avx_avx512_linux.
6957
6958 2017-08-04 Yao Qi <yao.qi@linaro.org>
6959
6960 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6961
6962 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6963
6964 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6965
6966 2017-08-03 Tom Tromey <tom@tromey.com>
6967
6968 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6969 Remove.
6970 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6971
6972 2017-08-03 Tom Tromey <tom@tromey.com>
6973
6974 * python/py-param.c (compute_enum_values): Use gdb_argv.
6975
6976 2017-08-03 Tom Tromey <tom@tromey.com>
6977
6978 * utils.h (struct gdb_argv_deleter): New.
6979 (gdb_argv): New class.
6980 * utils.c (gdb_argv::reset): New method.
6981 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6982 * tracefile.c (tsave_command): Use gdb_argv.
6983 * top.c (new_ui_command): Use gdb_argv.
6984 * symmisc.c (maintenance_print_symbols)
6985 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6986 * symfile.c (symbol_file_command, generic_load)
6987 (remove_symbol_file_command): Use gdb_argv.
6988 * stack.c (backtrace_command): Use gdb_argv.
6989 * source.c (add_path, show_substitute_path_command)
6990 (unset_substitute_path_command, set_substitute_path_command):
6991 Use gdb_argv.
6992 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6993 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6994 * remote.c (extended_remote_run, remote_put_command)
6995 (remote_get_command, remote_delete_command): Use gdb_argv.
6996 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6997 (gdbsim_open): Use gdb_argv.
6998 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6999 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7000 * procfs.c (procfs_info_proc): Use gdb_argv.
7001 * interps.c (interpreter_exec_cmd): Use gdb_argv.
7002 * infrun.c (handle_command): Use gdb_argv.
7003 * inferior.c (add_inferior_command, clone_inferior_command):
7004 Use gdb_argv.
7005 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7006 * exec.c (exec_file_command): Use gdb_argv.
7007 * cli/cli-cmds.c (alias_command): Use gdb_argv.
7008 * compile/compile.c (build_argc_argv): Use gdb_argv.
7009
7010 2017-08-03 Tom Tromey <tom@tromey.com>
7011
7012 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7013
7014 2017-08-03 Tom Tromey <tom@tromey.com>
7015
7016 * python/python.c (compute_python_string): Return std::string.
7017 (gdbpy_eval_from_control_command): Update.
7018 (do_start_initialization): Use std::string.
7019 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7020 xstrprintf.
7021 * python/py-breakpoint.c (local_setattro): Use string_printf, not
7022 xstrprintf.
7023
7024 2017-08-03 Tom Tromey <tom@tromey.com>
7025
7026 * top.h (do_restore_instream_cleanup): Remove.
7027 * top.c (do_restore_instream_cleanup): Remove.
7028 (read_command_file): Use scoped_restore.
7029 * cli/cli-script.c (execute_user_command): Use scoped_restore.
7030
7031 2017-08-03 Tom Tromey <tom@tromey.com>
7032
7033 * cli/cli-script.c (execute_user_command)
7034 (execute_control_command): Use scoped_restore.
7035
7036 2017-08-03 Tom Tromey <tom@tromey.com>
7037
7038 * cli/cli-script.c (do_restore_user_call_depth): Remove.
7039 (execute_user_command): Remove user_call_depth; use
7040 user_args_stack's size instead.
7041
7042 2017-08-03 Tom Tromey <tom@tromey.com>
7043
7044 * top.h (in_user_command): Remove.
7045 * top.c (in_user_command): Remove.
7046 * cli/cli-script.c (do_restore_user_call_depth)
7047 (execute_user_command): Update.
7048
7049 2017-08-03 Tom Tromey <tom@tromey.com>
7050
7051 * valops.c (search_struct_method): Use gdb::byte_vector.
7052 * valarith.c (value_concat): Use std::vector.
7053 * target.c (memory_xfer_partial): Use gdb::byte_vector.
7054 (simple_search_memory): Likewise.
7055 * printcmd.c (find_string_backward): Use gdb::byte_vector.
7056 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7057 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7058 * elfread.c (elf_rel_plt_read): Use std::string.
7059 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7060 * cli/cli-dump.c (restore_section_callback): Use
7061 gdb::byte_vector.
7062
7063 2017-08-03 Tom Tromey <tom@tromey.com>
7064
7065 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7066
7067 2017-08-03 Tom Tromey <tom@tromey.com>
7068
7069 * tui/tui-regs.c (tui_restore_gdbout): Remove.
7070 (tui_register_format): Use scoped_restore.
7071
7072 2017-08-03 Tom Tromey <tom@tromey.com>
7073
7074 * reverse.c (exec_direction_default): Remove.
7075 (exec_reverse_once): Use scoped_restore.
7076 * remote.c (restore_remote_timeout): Remove.
7077 (remote_flash_erase, remote_flash_write, remote_flash_done)
7078 (readchar, remote_serial_write): Use scoped_restore.
7079 * cli/cli-script.c (struct source_cleanup_lines_args)
7080 (source_cleanup_lines): Remove.
7081 (script_from_file): Use scoped_restore.
7082 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7083 (source_command): Use scoped_restore.
7084
7085 2017-08-03 Tom Tromey <tom@tromey.com>
7086
7087 * utils.h (make_cleanup_free_so): Remove.
7088 * utils.c (do_free_so, make_cleanup_free_so): Remove.
7089 * solist.h (struct so_deleter): New.
7090 (so_list_up): New typedef.
7091 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7092
7093 2017-08-03 Tom Tromey <tom@tromey.com>
7094
7095 * utils.h (make_cleanup_restore_current_language): Remove.
7096 * utils.c (do_restore_current_language)
7097 (make_cleanup_restore_current_language): Remove.
7098 * parse.c (parse_exp_in_context_1)
7099 (parse_expression_with_language): Use
7100 scoped_restore_current_language.
7101 * mi/mi-main.c (mi_cmd_execute): Use
7102 scoped_restore_current_language.
7103 * language.h (scoped_restore_current_language): New class.
7104
7105 2017-08-03 Tom Tromey <tom@tromey.com>
7106
7107 * compile/compile.c (cleanup_unlink_file): Remove.
7108 (compile_to_object): Use gdb::unlinker.
7109 (eval_compile_command): Likewise.
7110
7111 2017-08-03 Tom Tromey <tom@tromey.com>
7112
7113 * utils.h (make_cleanup_fclose): Remove.
7114 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7115
7116 2017-08-03 Tom Tromey <tom@tromey.com>
7117
7118 * top.c (open_terminal_stream): Return gdb_file_up.
7119 (new_ui_command): Update.
7120
7121 2017-08-03 Tom Tromey <tom@tromey.com>
7122
7123 * source.c (print_source_lines_base, forward_search_command)
7124 (reverse_search_command): Use gdb_file_up.
7125
7126 2017-08-03 Tom Tromey <tom@tromey.com>
7127
7128 * fbsd-nat.c (fbsd_find_memory_regions): Update.
7129
7130 2017-08-03 Tom Tromey <tom@tromey.com>
7131
7132 * cli/cli-cmds.c (find_and_open_script): Change return type.
7133 Remove "streamp" and "full_path" parameters.
7134 (source_script_with_search): Update.
7135 * auto-load.c (source_script_file): Update.
7136 * cli/cli-cmds.h (find_and_open_script): Change type.
7137 (open_script): New struct.
7138
7139 2017-08-03 Tom Tromey <tom@tromey.com>
7140
7141 * xml-support.c (xml_fetch_content_from_file): Update.
7142 * ui-file.c (stdio_file::open): Update.
7143 * tracefile-tfile.c (tfile_start): Update.
7144 * remote.c (remote_file_put, remote_file_get): Update.
7145 * nat/linux-procfs.c (linux_proc_get_int)
7146 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7147 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7148 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7149 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7150 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7151 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7152 * linux-nat.c (linux_proc_pending_signals): Update.
7153 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7154 (file_closer): Remove.
7155 * compile/compile.c (compile_to_object): Update.
7156 * common/filestuff.h (struct gdb_file_deleter): New.
7157 (gdb_file_up): New typedef.
7158 (gdb_fopen_cloexec): Change return type.
7159 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7160 * cli/cli-dump.c (fopen_with_cleanup): Remove.
7161 (dump_binary_file, restore_binary_file): Update.
7162 * auto-load.c (auto_load_objfile_script_1): Update.
7163
7164 2017-08-03 Tom Tromey <tom@tromey.com>
7165
7166 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7167 (info_static_tracepoint_markers_command): Likewise.
7168 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7169 * skip.c (skip_info): Use ui_out_emit_table.
7170 * progspace.c (print_program_space): Use ui_out_emit_table.
7171 * osdata.c (info_osdata): Use ui_out_emit_table.
7172 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7173 ui_out_emit_table.
7174 * linux-thread-db.c (info_auto_load_libthread_db): Use
7175 ui_out_emit_table.
7176 * inferior.c (print_inferior): Use ui_out_emit_table.
7177 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7178 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7179 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7180 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7181 * ui-out.h (class ui_out_emit_table): New.
7182
7183 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
7184
7185 * mips-tdep.c (mips_fpu_type_str): New function.
7186 (mips_dump_tdep): Call it.
7187
7188 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
7189
7190 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7191 `->mips_fpu_type'.
7192
7193 2017-07-31 Xavier Roirand <roirand@adacore.com>
7194
7195 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7196
7197 2017-07-27 Xavier Roirand <roirand@adacore.com>
7198
7199 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7200
7201 2017-07-26 Yao Qi <yao.qi@linaro.org>
7202
7203 * cli/cli-cmds.c (maintenancechecklist): New variable.
7204 * gdbcmd.h (maintenancechecklist): Declare it.
7205 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7206 Call i386_linux_read_description with different masks.
7207 * maint.c (maintenance_check_command): New function.
7208 (_initialize_maint_cmds): Call add_prefix_cmd.
7209 * target-descriptions.c (tdesc_reg): override operator != and ==.
7210 (tdesc_type): Likewise.
7211 (tdesc_feature): Likewise.
7212 (target_desc): Likewise.
7213 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7214 (maintenance_check_xml_descriptions): New function.
7215 (_initialize_target_descriptions) Add command "xml-descriptions".
7216 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7217
7218 2017-07-26 Yao Qi <yao.qi@linaro.org>
7219
7220 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7221 Include features/i386/32bit-*.c.
7222 (i386_linux_read_description): Generate target description if it
7223 doesn't exist.
7224 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7225 functions.
7226 * features/i386/32bit-linux.c: Re-generated.
7227 * features/i386/32bit-sse.c: Likewise.
7228 * target-descriptions.c (print_c_feature::visit): Print code to
7229 set register number if needed.
7230 (print_c_feature) <m_next_regnum>: New field.
7231
7232 2017-07-26 Yao Qi <yao.qi@linaro.org>
7233
7234 * features/Makefile (CFILES): Rename with TDESC_CFILES.
7235 (FEATURE_XMLFILES): New.
7236 (FEATURE_CFILES): New.
7237 New rules.
7238 (clean-cfiles): Remove generated c files.
7239 * features/i386/32bit-avx.c: Generated.
7240 * features/i386/32bit-avx512.c: Generated.
7241 * features/i386/32bit-core.c: Generated.
7242 * features/i386/32bit-linux.c: Generated.
7243 * features/i386/32bit-mpx.c: Generated.
7244 * features/i386/32bit-pkeys.c: Generated.
7245 * features/i386/32bit-sse.c: Generated.
7246 * target-descriptions.c: Include algorithm.
7247 (tdesc_element_visitor): Add method visit_end.
7248 (print_c_tdesc): Implement visit_end.
7249 (print_c_tdesc:: m_filename_after_features): Move it to
7250 protected.
7251 (print_c_feature): New class.
7252 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7253 name starts with "i386/32bit-".
7254
7255 2017-07-26 Yao Qi <yao.qi@linaro.org>
7256
7257 * target-descriptions.c (tdesc_element_visitor): New class.
7258 (tdesc_element): New class.
7259 (tdesc_reg): Inherit from tdesc_element.
7260 (tdesc_reg::accept): New function.
7261 (tdesc_type): Inherit from tdesc_element.
7262 (tdesc_type::accept): New function.
7263 (tdesc_feature): Inherit from tdesc_element.
7264 (tdesc_feature::accept): New function.
7265 (target_desc): Inherit from tdesc_element.
7266 (target_desc::target_desc): New.
7267 (target_desc::~target_desc): New.
7268 (target_desc::accept): New.
7269 (allocate_target_description): Use new.
7270 (free_target_description): Use delete.
7271 (print_c_tdesc): New class.
7272 (maint_print_c_tdesc_cmd): Adjust.
7273
7274 * features/aarch64.c: Re-generated.
7275 * features/arc-arcompact.c: Re-generated.
7276 * features/arc-v2.c: Re-generated.
7277 * features/arm/arm-with-iwmmxt.c: Re-generated.
7278 * features/arm/arm-with-m.c: Re-generated.
7279 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7280 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7281 * features/arm/arm-with-neon.c: Re-generated.
7282 * features/arm/arm-with-vfpv2.c: Re-generated.
7283 * features/arm/arm-with-vfpv3.c: Re-generated.
7284 * features/i386/amd64-avx-avx512.c: Re-generated.
7285 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7286 * features/i386/amd64-avx.c: Re-generated.
7287 * features/i386/amd64-avx-linux.c: Re-generated.
7288 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7289 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7290 * features/i386/amd64-avx-mpx.c: Re-generated.
7291 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7292 * features/i386/amd64.c: Re-generated.
7293 * features/i386/amd64-linux.c: Re-generated.
7294 * features/i386/amd64-mpx.c: Re-generated.
7295 * features/i386/amd64-mpx-linux.c: Re-generated.
7296 * features/i386/i386-avx-avx512.c: Re-generated.
7297 * features/i386/i386-avx-avx512-linux.c: Re-generated.
7298 * features/i386/i386-avx.c: Re-generated.
7299 * features/i386/i386-avx-linux.c: Re-generated.
7300 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
7301 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
7302 * features/i386/i386-avx-mpx.c: Re-generated.
7303 * features/i386/i386-avx-mpx-linux.c: Re-generated.
7304 * features/i386/i386.c: Re-generated.
7305 * features/i386/i386-linux.c: Re-generated.
7306 * features/i386/i386-mmx.c: Re-generated.
7307 * features/i386/i386-mmx-linux.c: Re-generated.
7308 * features/i386/i386-mpx.c: Re-generated.
7309 * features/i386/i386-mpx-linux.c: Re-generated.
7310 * features/i386/x32-avx-avx512.c: Re-generated.
7311 * features/i386/x32-avx-avx512-linux.c: Re-generated.
7312 * features/i386/x32-avx.c: Re-generated.
7313 * features/i386/x32-avx-linux.c: Re-generated.
7314 * features/i386/x32.c: Re-generated.
7315 * features/i386/x32-linux.c: Re-generated.
7316 * features/microblaze.c: Re-generated.
7317 * features/microblaze-with-stack-protect.c: Re-generated.
7318 * features/mips64-dsp-linux.c: Re-generated.
7319 * features/mips64-linux.c: Re-generated.
7320 * features/mips-dsp-linux.c: Re-generated.
7321 * features/mips-linux.c: Re-generated.
7322 * features/nds32.c: Re-generated.
7323 * features/nios2.c: Re-generated.
7324 * features/nios2-linux.c: Re-generated.
7325 * features/rs6000/powerpc-32.c: Re-generated.
7326 * features/rs6000/powerpc-32l.c: Re-generated.
7327 * features/rs6000/powerpc-403.c: Re-generated.
7328 * features/rs6000/powerpc-403gc.c : Re-generated.
7329 * features/rs6000/powerpc-405.c: Re-generated.
7330 * features/rs6000/powerpc-505.c: Re-generated.
7331 * features/rs6000/powerpc-601.c: Re-generated.
7332 * features/rs6000/powerpc-602.c: Re-generated.
7333 * features/rs6000/powerpc-603.c: Re-generated.
7334 * features/rs6000/powerpc-604.c: Re-generated.
7335 * features/rs6000/powerpc-64.c: Re-generated.
7336 * features/rs6000/powerpc-64l.c: Re-generated.
7337 * features/rs6000/powerpc-7400.c: Re-generated.
7338 * features/rs6000/powerpc-750.c: Re-generated.
7339 * features/rs6000/powerpc-860.c: Re-generated.
7340 * features/rs6000/powerpc-altivec32.c: Re-generated.
7341 * features/rs6000/powerpc-altivec32l.c: Re-generated.
7342 * features/rs6000/powerpc-altivec64.c: Re-generated.
7343 * features/rs6000/powerpc-altivec64l.c: Re-generated.
7344 * features/rs6000/powerpc-cell32l.c: Re-generated.
7345 * features/rs6000/powerpc-cell64l.c: Re-generated.
7346 * features/rs6000/powerpc-e500.c: Re-generated.
7347 * features/rs6000/powerpc-e500l.c: Re-generated.
7348 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
7349 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
7350 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
7351 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
7352 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
7353 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
7354 * features/rs6000/powerpc-vsx32.c: Re-generated.
7355 * features/rs6000/powerpc-vsx32l.c: Re-generated.
7356 * features/rs6000/powerpc-vsx64.c: Re-generated.
7357 * features/rs6000/powerpc-vsx64l.c: Re-generated.
7358 * features/rs6000/rs6000.c: Re-generated.
7359 * features/s390-linux32.c: Re-generated.
7360 * features/s390-linux32v1.c: Re-generated.
7361 * features/s390-linux32v2.c: Re-generated.
7362 * features/s390-linux64.c: Re-generated.
7363 * features/s390-linux64v1.c: Re-generated.
7364 * features/s390-linux64v2.c: Re-generated.
7365 * features/s390-te-linux64.c: Re-generated.
7366 * features/s390-tevx-linux64.c: Re-generated.
7367 * features/s390-vx-linux64.c: Re-generated.
7368 * features/s390x-linux64.c: Re-generated.
7369 * features/s390x-linux64v1.c: Re-generated.
7370 * features/s390x-linux64v2.c: Re-generated.
7371 * features/s390x-te-linux64.c: Re-generated.
7372 * features/s390x-tevx-linux64.c: Re-generated.
7373 * features/s390x-vx-linux64.c: Re-generated.
7374 * features/sparc/sparc32-solaris.c: Re-generated.
7375 * features/sparc/sparc64-solaris.c: Re-generated.
7376 * features/tic6x-c62x.c: Re-generated.
7377 * features/tic6x-c62x-linux.c: Re-generated.
7378 * features/tic6x-c64x.c: Re-generated.
7379 * features/tic6x-c64x-linux.c: Re-generated.
7380 * features/tic6x-c64xp.c: Re-generated.
7381 * features/tic6x-c64xp-linux.c: Re-generated.
7382
7383 2017-07-26 Yao Qi <yao.qi@linaro.org>
7384
7385 * i386-linux-tdep.c (i386_linux_read_description): New function.
7386 (i386_linux_core_read_description): Call
7387 i386_linux_read_description.
7388 * i386-linux-tdep.h (i386_linux_read_description): Declare.
7389 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7390 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7391 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7392 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7393 * x86-linux-nat.c (x86_linux_read_description): Call
7394 i386_linux_read_description.
7395
7396 2017-07-26 Yao Qi <yao.qi@linaro.org>
7397
7398 * NEWS: Mention it.
7399 * features/Makefile (%.c: %.xml): Pass the xml file name to
7400 command "maint print c-tdesc".
7401 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7402 name from 'arg'.
7403
7404 2017-07-26 Yao Qi <yao.qi@linaro.org>
7405
7406 * target-descriptions.c (target_desc): Add ctor and dtor. Do
7407 in-class initialization.
7408 (tdesc_create_feature): Call new instead of XCNEW.
7409 (free_target_description): Ue delete.
7410
7411 2017-07-25 John Baldwin <jhb@FreeBSD.org>
7412
7413 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7414
7415 2017-07-25 Yao Qi <yao.qi@linaro.org>
7416
7417 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7418 constant.
7419 (amd64_x32_init_abi): Likewise.
7420 * amd64-tdep.h (amd64_init_abi): Update declaration.
7421 (amd64_x32_init_abi): Likewise.
7422
7423 2017-07-25 Yao Qi <yao.qi@linaro.org>
7424
7425 PR tdep/21717
7426 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7427 condition for FPSCR.
7428 (arm_linux_store_inferior_registers): Likewise.
7429
7430 2017-07-22 Tom Tromey <tom@tromey.com>
7431
7432 * break-catch-syscall.c (struct catch_syscall_inferior_data)
7433 <syscalls_counts>: Now a std::vector.
7434 (get_catch_syscall_inferior_data): Use "new".
7435 (catch_syscall_inferior_data_cleanup): Use "delete".
7436 (insert_catch_syscall, remove_catch_syscall)
7437 (clear_syscall_counts): Update.
7438
7439 2017-07-22 Tom Tromey <tom@tromey.com>
7440
7441 * break-catch-syscall.c (syscall_catchpoint)
7442 <syscalls_to_be_caught>: Now a std::vector<int>
7443 (~syscall_catchpoint): Remove.
7444 (insert_catch_syscall, remove_catch_syscall)
7445 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7446 (print_mention_catch_syscall, print_recreate_catch_syscall):
7447 Update.
7448 (create_syscall_event_catchpoint): Change type of "filter"
7449 parameter.
7450 (catch_syscall_split_args): Return a std::vector.
7451 (catch_syscall_command_1, catching_syscall_number_1): Update.
7452
7453 2017-07-22 Tom Tromey <tom@tromey.com>
7454
7455 * break-catch-throw.c (struct exception_catchpoint)
7456 <exception_rx>: Now a std::string.
7457 (~exception_catchpoint): Remove.
7458 (print_one_detail_exception_catchpoint): Update.
7459 (handle_gnu_v3_exceptions): Change type of except_rx.
7460 (extract_exception_regexp): Return a std::string.
7461 (catch_exception_command_1): Update.
7462
7463 2017-07-22 Tom Tromey <tom@tromey.com>
7464
7465 * break-catch-sig.c (gdb_signal_type): Remove typedef.
7466 (struct signal_catchpoint) <signals_to_be_caught>: Now a
7467 std::vector.
7468 <catch_all>: Now a bool.
7469 (~signal_catchpoint): Remove.
7470 (signal_catchpoint_insert_location)
7471 (signal_catchpoint_remove_location)
7472 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7473 (signal_catchpoint_print_mention)
7474 (signal_catchpoint_print_recreate)
7475 (signal_catchpoint_explains_signal): Update.
7476 (create_signal_catchpoint): Change type of "filter" and
7477 "catch_all".
7478 (catch_signal_split_args): Return a std::vector. Change type of
7479 "catch_all".
7480 (catch_signal_command): Update.
7481
7482 2017-07-20 Pedro Alves <palves@redhat.com>
7483
7484 * ada-lang.c (ada_language_defn): Make extern.
7485 (_initialize_ada_language): Remove add_language call.
7486 * c-lang.c (c_language_defn, cplus_language_defn)
7487 (asm_language_defn, minimal_language_defn): Make extern.
7488 (_initialize_c_language): Delete.
7489 * completer.c (compare_cstrings): Delete, moved to utils.h.
7490 * d-lang.c (d_language_defn): Make extern.
7491 (_initialize_d_language): Remove add_language calls.
7492 * defs.h (enum language): Add comment.
7493 * f-lang.c (f_language_defn): Make extern.
7494 (_initialize_f_language): Remove add_language call.
7495 * go-lang.c (go_language_defn): Make extern.
7496 (_initialize_go_language): Remove add_language call.
7497 * language.c: Include <algorithm>.
7498 (languages): Redefine as const array.
7499 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7500 (set_language_command): Handle "local". Use for-range loop.
7501 (set_language): Remove loop.
7502 (language_enum): Rewrite.
7503 (language_def, language_str): Remove loops.
7504 (add_language): Delete.
7505 (add_set_language_command): New, based on add_languages.
7506 (skip_language_trampoline): Adjust.
7507 (local_language_defn): Delete.
7508 (language_gdbarch_post_init): Adjust.
7509 (_initialize_language): Remove add_language calls. Call
7510 add_set_language_command.
7511 * language.h (add_language): Delete.
7512 (auto_language_defn)
7513 (unknown_language_defn, minimal_language_defn, ada_language_defn)
7514 (asm_language_defn, c_language_defn, cplus_language_defn)
7515 (d_language_defn, f_language_defn, go_language_defn)
7516 (m2_language_defn, objc_language_defn, opencl_language_defn)
7517 (pascal_language_defn, rust_language_defn): Declare.
7518 * m2-lang.c (m2_language_defn): Make extern.
7519 (_initialize_m2_language): Remove add_language call.
7520 * objc-lang.c (objc_language_defn): Make extern.
7521 (_initialize_objc_language): Remove add_language call.
7522 * opencl-lang.c (opencl_language_defn): Make extern.
7523 (_initialize_opencl_language): Remove add_language call.
7524 * p-lang.c (pascal_language_defn): Make extern.
7525 (_initialize_pascal_language): Delete.
7526 * rust-lang.c (rust_language_defn): Make extern.
7527 (_initialize_rust_language): Delete.
7528 * utils.h (compare_cstrings): New static inline function.
7529
7530 2017-07-20 Pedro Alves <palves@redhat.com>
7531
7532 * ada-lang.c (ada_to_fixed_type_1): Adjust.
7533 (get_var_value): Constify parameters.
7534 (get_int_var_value): Change prototype.
7535 (to_fixed_range_type): Adjust.
7536 * ada-lang.h (get_int_var_value): Change prototype.
7537
7538 2017-07-20 Pedro Alves <palves@redhat.com>
7539
7540 * dwarf2read.c (dw2_lookup_symbol): Use
7541 SYMBOL_MATCHES_SEARCH_NAME.
7542 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7543
7544 2017-07-20 Pedro Alves <palves@redhat.com>
7545
7546 * block.c (block_iter_name_step, block_iter_name_first)
7547 (block_iter_name_next): Delete.
7548 (block_lookup_symbol_primary): Adjust to use
7549 dict_iter_match_first/dict_iter_match_next.
7550 * block.h (block_iter_name_first, block_iter_name_next): Delete
7551 declarations.
7552 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7553 dict_iter_match_first/dict_iter_match_next.
7554
7555 2017-07-20 Pedro Alves <palves@redhat.com>
7556
7557 * cp-support.c (cp_find_first_component_aux): Add missing case for
7558 end of string.
7559
7560 2017-07-18 David Blaikie <dblaikie@gmail.com>
7561
7562 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7563 of dwo_cu's dwo_file.
7564
7565 2017-07-18 Yao Qi <yao.qi@linaro.org>
7566
7567 * remote.c (store_registers_using_G): Remove one line comment.
7568
7569 2017-07-18 Yao Qi <yao.qi@linaro.org>
7570
7571 * regcache.c (regcache_cpy): Simplify it.
7572 (regcache::cpy_no_passthrough): Remove it.
7573 * regcache.h (cpy_no_passthrough): Remove it.
7574 (regcache_dup, regcache_cpy): Update comments.
7575
7576 2017-07-18 Pedro Alves <palves@redhat.com>
7577
7578 * remote-sim.c (sim_command_completer): Adjust to work with a
7579 completion_tracker instead of a VEC.
7580
7581 2017-07-17 Pedro Alves <palves@redhat.com>
7582
7583 * completer.c (complete_source_filenames): New function.
7584 (complete_address_and_linespec_locations): New function.
7585 (location_completer): Use complete_address_and_linespec_locations.
7586 (completion_tracker::build_completion_result): Honor the tracker's
7587 request to suppress append.
7588 * completer.h (completion_tracker::suppress_append_ws)
7589 (completion_tracker::set_suppress_append_ws): New methods.
7590 (completion_tracker::m_suppress_append_ws): New field.
7591 (complete_source_filenames): New declaration.
7592 * linespec.c (linespec_complete_what): New.
7593 (struct ls_parser) <complete_what, completion_word,
7594 completion_quote_char, completion_quote_end, completion_tracker>:
7595 New fields.
7596 (string_find_incomplete_keyword_at_end): New.
7597 (linespec_lexer_lex_string): Record quote char. If in completion
7598 mode, don't throw.
7599 (linespec_lexer_consume_token): Advance the completion word point.
7600 (linespec_lexer_peek_token): Save/restore completion info.
7601 (save_stream_and_consume_token): New.
7602 (set_completion_after_number): New.
7603 (linespec_parse_basic): Set what to complete next depending on
7604 token. Handle function and label completions specially.
7605 (parse_linespec): Disable objc shortcut in completion mode. Set
7606 what to complete next depending on token type. Skip keyword if in
7607 completion mode.
7608 (complete_linespec_component, linespec_complete): New.
7609 * linespec.h (linespec_complete): Declare.
7610
7611 2017-07-17 Pedro Alves <palves@redhat.com>
7612
7613 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7614 Handle 'operator<' / 'operator<<'.
7615
7616 2017-07-17 Pedro Alves <palves@redhat.com>
7617
7618 * completer.c (collect_explicit_location_matches): Handle
7619 MATCH_LABEL.
7620 (convert_explicit_location_to_linespec): New, factored out from
7621 ...
7622 (convert_explicit_location_to_sals): ... this.
7623 (complete_label): New.
7624 (linespec_complete_label, find_label_symbols_in_block): New.
7625 (find_label_symbols): Add completion_mode parameter and adjust to
7626 call find_label_symbols_in_block.
7627 * linespec.h (linespec_complete_label): Declare.
7628
7629 2017-07-17 Pedro Alves <palves@redhat.com>
7630
7631 * ada-lang.c (ada_collect_symbol_completion_matches): Add
7632 complete_symbol_mode parameter.
7633 * cli/cli-cmds.c (complete_command): Get the completion result out
7634 of the handle_brkchars tracker if used a custom word point.
7635 * completer.c: Include "linespec.h".
7636 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7637 (advance_to_expression_complete_word_point): New.
7638 (completion_tracker::completes_to_completion_word): New.
7639 (complete_files_symbols): Pass down
7640 complete_symbol_mode::EXPRESSION.
7641 (explicit_options, probe_options): New.
7642 (collect_explicit_location_matches): Complete on the
7643 explictit_loc->foo instead of word. Use
7644 linespec_complete_function. Handle MATCH_LINE. Handle offering
7645 keyword and options completions.
7646 (backup_text_ptr): Delete.
7647 (skip_keyword): New.
7648 (complete_explicit_location): Remove 'word' parameter. Add
7649 language, quoted_arg_start and quoted_arg_end parameters.
7650 Rewrite, parsing left to right.
7651 (location_completer): Rewrite.
7652 (location_completer_handle_brkchars): New function.
7653 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7654 (enum complete_line_internal_reason): Adjust comments.
7655 (completion_tracker::discard_completions): New.
7656 (completer_handle_brkchars_func_for_completer): Handle
7657 location_completer.
7658 (gdb_custom_word_point_brkchars)
7659 (gdb_org_rl_basic_quote_characters): New.
7660 (gdb_completion_word_break_characters_throw)
7661 (completion_find_completion_word): Handle trackers that use a
7662 custom word point.
7663 (completion_tracker::advance_custom_word_point_by): New.
7664 (completion_tracker::build_completion_result): Don't rely on
7665 readline appending the quote char.
7666 (gdb_rl_attempted_completion_function_throw): Handle trackers that
7667 use a custom word point.
7668 (gdb_rl_attempted_completion_function): Restore
7669 rl_basic_quote_characters.
7670 * completer.h (class completion_tracker): Extend intro comment.
7671 (completion_tracker::set_quote_char)
7672 (completion_tracker::quote_char)
7673 (completion_tracker::set_use_custom_word_point)
7674 (completion_tracker::use_custom_word_point)
7675 (completion_tracker::custom_word_point)
7676 (completion_tracker::set_custom_word_point)
7677 (completion_tracker::advance_custom_word_point_by)
7678 (completion_tracker::completes_to_completion_word)
7679 (completion_tracker::discard_completions): New methods.
7680 (completion_tracker::m_quote_char)
7681 (completion_tracker::m_use_custom_word_point)
7682 (completion_tracker::m_custom_word_point): New fields.
7683 (advance_to_expression_complete_word_point): Declare.
7684 * f-lang.c (f_collect_symbol_completion_matches): Add
7685 complete_symbol_mode parameter.
7686 * language.h (struct language_defn)
7687 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7688 parameter.
7689 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
7690 (linespec_complete_function): New function.
7691 (linespec_lexer_lex_keyword): Adjust.
7692 * linespec.h (linespec_keywords, linespec_complete_function): New
7693 declarations.
7694 * location.c (find_end_quote): New function.
7695 (explicit_location_lex_one): Add explicit_completion_info
7696 parameter. Save quoting info. Don't throw if being called for
7697 completion. Don't handle Ada operators here.
7698 (is_cp_operator, skip_op_false_positives, first_of)
7699 (explicit_location_lex_one_function): New function.
7700 (string_to_explicit_location): Replace 'dont_throw' parameter with
7701 an explicit_completion_info pointer parameter. Handle it. Don't
7702 use explicit_location_lex_one to lex function names. Use
7703 explicit_location_lex_one_function instead.
7704 * location.h (struct explicit_completion_info): New.
7705 (string_to_explicit_location): Replace 'dont_throw' parameter with
7706 an explicit_completion_info pointer parameter.
7707 * symtab.c (default_collect_symbol_completion_matches_break_on):
7708 Add complete_symbol_mode parameter. Handle LINESPEC mode.
7709 (default_collect_symbol_completion_matches)
7710 (collect_symbol_completion_matches): Add complete_symbol_mode
7711 parameter.
7712 (collect_symbol_completion_matches_type): Pass down
7713 complete_symbol_mode::EXPRESSION.
7714 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7715 parameter. Handle LINESPEC mode.
7716 * symtab.h (complete_symbol_mode): New.
7717 (default_collect_symbol_completion_matches_break_on)
7718 (default_collect_symbol_completion_matches)
7719 (collect_symbol_completion_matches)
7720 (collect_file_symbol_completion_matches): Add complete_symbol_mode
7721 parameter.
7722
7723 2017-07-17 Pedro Alves <palves@redhat.com>
7724
7725 * utils.c (enum class strncmp_iw_mode): New.
7726 (strcmp_iw): Rename to ...
7727 (strncmp_iw_with_mode): ... this. Add string2_len and mode
7728 parameters. Handle them.
7729 (strncmp_iw): New.
7730 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7731 * utils.h (strncmp_iw): Declare.
7732 (strcmp_iw): Move describing comments here.
7733
7734 2017-07-17 Pedro Alves <palves@redhat.com>
7735
7736 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7737 CP_OPERATOR_STR.
7738 * c-typeprint.c (is_type_conversion_operator): Use
7739 CP_OPERATOR_STR.
7740 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7741 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7742 CP_OPERATOR_LEN.
7743 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7744 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7745 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7746 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7747 CP_OPERATOR_STR.
7748 * location.c: Include "cp-support.h".
7749 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7750 CP_OPERATOR_STR.
7751 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7752 CP_OPERATOR_LEN.
7753
7754 2017-07-17 Pedro Alves <palves@redhat.com>
7755
7756 * cli/cli-cmds.c (complete_command): Use a completion tracker
7757 along with completion_find_completion_word for handle_brkchars
7758 phase.
7759 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7760 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7761 (struct gdb_rl_completion_word_info): New.
7762 (gdb_rl_find_completion_word): New.
7763 (completion_find_completion_word): New.
7764 * completer.h (completion_find_completion_word): Declare.
7765
7766 2017-07-17 Pedro Alves <palves@redhat.com>
7767
7768 * ada-lang.c (symbol_completion_match): Adjust comments.
7769 (symbol_completion_add): Replace vector parameter with
7770 completion_tracker parameter. Use it.
7771 (ada_make_symbol_completion_list): Rename to...
7772 (ada_collect_symbol_completion_matches): ... this. Add
7773 completion_tracker parameter and use it.
7774 (ada_language_defn): Adjust.
7775 * break-catch-syscall.c (catch_syscall_completer): Adjust
7776 prototype and work with completion_tracker instead of VEC.
7777 * breakpoint.c (condition_completer): Adjust prototype and work
7778 with completion_tracker instead of VEC.
7779 * c-lang.c (c_language_defn, cplus_language_defn)
7780 (asm_language_defn, minimal_language_defn): Adjust to renames.
7781 * cli/cli-cmds.c (complete_command): Rework using
7782 completion_tracker. Catch exceptions when completing.
7783 * cli/cli-decode.c (integer_unlimited_completer)
7784 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7785 with completion_tracker instead of VEC.
7786 * command.h (struct completion_tracker): Forward declare.
7787 (completer_ftype, completer_handle_brkchars_ftype): Change
7788 types.
7789 (complete_on_cmdlist, complete_on_enum): Adjust.
7790 * completer.c: Include <algorithm>.
7791 (struct gdb_completer_state): New.
7792 (current_completion): New global.
7793 (readline_line_completion_function): Delete.
7794 (noop_completer, filename_completer)
7795 (filename_completer_handle_brkchars, complete_files_symbols)
7796 (linespec_location_completer): Adjust to work with a
7797 completion_tracker instead of a VEC.
7798 (string_or_empty): New.
7799 (collect_explicit_location_matches): Adjust to work with a
7800 completion_tracker instead of a VEC.
7801 (explicit_location_completer): Rename to ...
7802 (complete_explicit_location): ... this and adjust to work with a
7803 completion_tracker instead of a VEC.
7804 (location_completer): Adjust to work with a completion_tracker
7805 instead of a VEC.
7806 (add_struct_fields): Adjust to work with a completion_list instead
7807 of VEC.
7808 (expression_completer): Rename to ...
7809 (complete_expression): ... this and adjust to work with a
7810 completion_tracker instead of a VEC. Use complete_files_symbols.
7811 (expression_completer): Reimplement on top of complete_expression.
7812 (symbol_completer): Adjust to work with a completion_tracker
7813 instead of a VEC.
7814 (enum complete_line_internal_reason): Add describing comments.
7815 (complete_line_internal_normal_command): Adjust to work with a
7816 completion_tracker instead of a VEC.
7817 (complete_line_internal): Rename to ...
7818 (complete_line_internal_1): ... this and adjust to work with a
7819 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7820 handle_brkchars phase.
7821 (new_completion_tracker): Delete.
7822 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7823 complete_line_internal_1.
7824 (free_completion_tracker): Delete.
7825 (INITIAL_COMPLETION_HTAB_SIZE): New.
7826 (completion_tracker::completion_tracker)
7827 (completion_tracker::~completion_tracker): New.
7828 (maybe_add_completion): Delete.
7829 (completion_tracker::maybe_add_completion)
7830 (completion_tracker::add_completion)
7831 (completion_tracker::add_completions): New.
7832 (throw_max_completions_reached_error): Delete.
7833 (complete_line): Adjust to work with a completion_tracker instead
7834 of a VEC. Don't create a completion_tracker_t or check for max
7835 completions here.
7836 (command_completer, command_completer_handle_brkchars)
7837 (signal_completer, reg_or_group_completer_1)
7838 (reg_or_group_completer, default_completer_handle_brkchars):
7839 Adjust to work with a completion_tracker.
7840 (gdb_completion_word_break_characters_throw): New.
7841 (gdb_completion_word_break_characters): Reimplement.
7842 (line_completion_function): Delete.
7843 (completion_tracker::recompute_lowest_common_denominator)
7844 (expand_preserving_ws)
7845 (completion_tracker::build_completion_result)
7846 (completion_result::completion_result)
7847 (completion_result::completion_result)
7848 (completion_result::~completion_result)
7849 (completion_result::completion_result)
7850 (completion_result::release_match_list, compare_cstrings)
7851 (completion_result::sort_match_list)
7852 (completion_result::reset_match_list)
7853 (gdb_rl_attempted_completion_function_throw)
7854 (gdb_rl_attempted_completion_function): New.
7855 * completer.h (completion_list, struct completion_result)
7856 (class completion_tracker): New.
7857 (complete_line): Add completion_tracker parameter.
7858 (readline_line_completion_function): Delete.
7859 (gdb_rl_attempted_completion_function): New.
7860 (noop_completer, filename_completer, expression_completer)
7861 (location_completer, symbol_completer, command_completer)
7862 (signal_completer, reg_or_group_completer): Update prototypes.
7863 (completion_tracker_t, new_completion_tracker)
7864 (make_cleanup_free_completion_tracker): Delete.
7865 (enum maybe_add_completion_enum): Delete.
7866 (maybe_add_completion): Delete.
7867 (throw_max_completions_reached_error): Delete.
7868 * corefile.c (complete_set_gnutarget): Adjust to work with a
7869 completion_tracker instead of a VEC.
7870 * cp-abi.c (cp_abi_completer): Adjust to work with a
7871 completion_tracker instead of a VEC.
7872 * d-lang.c (d_language_defn): Adjust.
7873 * disasm.c (disassembler_options_completer): Adjust to work with a
7874 completion_tracker instead of a VEC.
7875 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7876 (f_collect_symbol_completion_matches): ... this. Adjust to work
7877 with a completion_tracker instead of a VEC.
7878 (f_language_defn): Adjust.
7879 * go-lang.c (go_language_defn): Adjust.
7880 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7881 Adjust to work with a completion_tracker instead of a VEC.
7882 * infrun.c (handle_completer): Likewise.
7883 * interps.c (interpreter_completer): Likewise.
7884 * interps.h (interpreter_completer): Likewise.
7885 * language.c (unknown_language_defn, auto_language_defn)
7886 (local_language_defn): Adjust.
7887 * language.h (language_defn::la_make_symbol_completion_list):
7888 Rename to ...
7889 (language_defn::la_collect_symbol_completion_matches): ... this
7890 and adjust to work with a completion_tracker instead of a VEC.
7891 * m2-lang.c (m2_language_defn): Adjust.
7892 * objc-lang.c (objc_language_defn): Adjust.
7893 * opencl-lang.c (opencl_language_defn): Adjust.
7894 * p-lang.c (pascal_language_defn): Adjust.
7895 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7896 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7897 with a completion_tracker.
7898 * rust-lang.c (rust_language_defn): Adjust.
7899 * symtab.c (free_completion_list, do_free_completion_list)
7900 (return_val, completion_tracker): Delete.
7901 (completion_list_add_name, completion_list_add_symbol)
7902 (completion_list_add_msymbol, completion_list_objc_symbol)
7903 (completion_list_add_fields, add_symtab_completions): Add
7904 completion_tracker parameter and use it.
7905 (default_make_symbol_completion_list_break_on_1): Rename to...
7906 (default_collect_symbol_completion_matches_break_on): ... this.
7907 Add completion_tracker parameter and use it instead of allocating
7908 a completion tracker here.
7909 (default_make_symbol_completion_list_break_on): Delete old
7910 implementation.
7911 (default_make_symbol_completion_list): Delete.
7912 (default_collect_symbol_completion_matches): New.
7913 (make_symbol_completion_list): Delete.
7914 (collect_symbol_completion_matches): New.
7915 (make_symbol_completion_type): Rename to ...
7916 (collect_symbol_completion_matches_type): ... this. Add
7917 completion_tracker parameter and use it instead of VEC.
7918 (make_file_symbol_completion_list_1): Rename to...
7919 (collect_file_symbol_completion_matches): ... this. Add
7920 completion_tracker parameter and use it instead of VEC.
7921 (make_file_symbol_completion_list): Delete.
7922 (add_filename_to_list): Use completion_list instead of a VEC.
7923 (add_partial_filename_data::list): Now a completion_list.
7924 (make_source_files_completion_list): Work with a completion_list
7925 instead of a VEC.
7926 * symtab.h: Include "completer.h".
7927 (default_make_symbol_completion_list_break_on)
7928 (default_make_symbol_completion_list, make_symbol_completion_list)
7929 (make_symbol_completion_type, make_file_symbol_completion_list)
7930 (make_source_files_completion_list): Delete.
7931 (default_collect_symbol_completion_matches_break_on)
7932 (default_collect_symbol_completion_matches)
7933 (collect_symbol_completion_matches)
7934 (collect_symbol_completion_matches_type)
7935 (collect_file_symbol_completion_matches)
7936 (make_source_files_completion_list): New.
7937 * top.c (init_main): Don't install a rl_completion_entry_function
7938 hook. Install a rl_attempted_completion_function hook instead.
7939 * tui/tui-layout.c (layout_completer): Adjust to work with a
7940 completion_tracker.
7941 * tui/tui-regs.c (tui_reggroup_completer):
7942 * tui/tui-win.c (window_name_completer, focus_completer)
7943 (winheight_completer): Adjust to work with a completion_tracker.
7944 * value.c: Include "completer.h".
7945 (complete_internalvar): Adjust to work with a completion_tracker.
7946 * value.h (complete_internalvar): Likewise.
7947
7948 2017-07-17 Pedro Alves <palves@redhat.com>
7949
7950 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7951 renames.
7952 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7953 comments to completer_ftype's declaration.
7954 <completer_handle_brkchars>: Change type to
7955 completer_handle_brkchars_ftype.
7956 * command.h (completer_ftype): Add describing comment and give
7957 names to parameters.
7958 (completer_ftype_void): Rename to ...
7959 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7960 (set_cmd_completer_handle_brkchars): Adjust.
7961 * completer.c (filename_completer_handle_brkchars): New function.
7962 (complete_line_internal_normal_command): New function, factored
7963 out from ...
7964 (complete_line_internal): ... here.
7965 (command_completer_handle_brkchars)
7966 (default_completer_handle_brkchars)
7967 (completer_handle_brkchars_func_for_completer): New functions.
7968 * completer.h (set_gdb_completion_word_break_characters): Delete
7969 declaration.
7970 (completer_handle_brkchars_func_for_completer): New declaration.
7971 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7972 completer_handle_brkchars_func_for_completer.
7973
7974 2017-07-17 Pedro Alves <palves@redhat.com>
7975
7976 * completer.c (symbol_completer): New function, based on
7977 make_symbol_completion_list_fn.
7978 * completer.h (symbol_completer): New declaration.
7979 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7980 * python/py-cmd.c (completers): Adjust.
7981 * symtab.c (make_symbol_completion_list_fn): Delete.
7982 * symtab.h (make_symbol_completion_list_fn): Delete.
7983 * cli/cli-decode.c (add_cmd): Adjust.
7984
7985 2017-07-17 Pedro Alves <palves@redhat.com>
7986
7987 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7988 * dwarf2read.c: Include "filename-seen-cache.h".
7989 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7990 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7991 * filename-seen-cache.c: New file.
7992 * filename-seen-cache.h: New file.
7993 * symtab.c: Include "filename-seen-cache.h".
7994 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7995 (create_filename_seen_cache, clear_filename_seen_cache)
7996 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7997 to filename-seen-cache.h/filename-seen-cache.c.
7998 (output_source_filename, sources_info)
7999 (maybe_add_partial_symtab_filename)
8000 (make_source_files_completion_list): Adjust to use
8001 filename_seen_cache.
8002
8003 2017-07-17 Pedro Alves <palves@redhat.com>
8004
8005 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8006 fields.
8007 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8008 dwarf2_debug_sections*)): New.
8009 (dwarf2_per_objfile::dwarf2_per_objfile(const
8010 dwarf2_per_objfile&)): Declare as deleted.
8011 (dwarf2_per_objfile::operator=): Declare as deleted.
8012 (dwarf2_per_objfile::dwarf2_per_objfile)
8013 (dwarf2_per_objfile::~dwarf2_per_objfile)
8014 (dwarf2_per_objfile::free_cached_comp_units): New.
8015 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8016 ctor. Call dwarf2_per_objfile's ctor manually.
8017 (dwarf2_locate_sections): Deleted/refactored as ...
8018 (dwarf2_per_objfile::locate_sections): ... this new method.
8019 (free_cached_comp_units): Defer to
8020 dwarf2_per_objfile::free_cached_comp_units.
8021 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8022
8023 2017-07-14 Tom Tromey <tom@tromey.com>
8024
8025 PR rust/21764:
8026 * rust-exp.y (convert_ast_to_expression): Add "want_type"
8027 parameter.
8028 <UNOP_SIZEOF>: Split into separate case.
8029 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
8030
8031 2017-07-14 Tom Tromey <tom@tromey.com>
8032
8033 PR rust/21763:
8034 * symtab.c (symbol_matches_domain): Add language_rust to special
8035 case.
8036 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8037 treat LOC_TYPEDEF symbols as variables.
8038
8039 2017-07-14 Pedro Alves <palves@redhat.com>
8040
8041 * symtab.c (make_file_symbol_completion_list_1): Iterate over
8042 symtabs matching all symtabs with SRCFILE as file name instead of
8043 only considering the first hit, with lookup_symtab.
8044
8045 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8046
8047 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8048 operator_name parameters.
8049 (gen_expr): Update function call.
8050
8051 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8052
8053 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8054 parameter.
8055 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8056 Likewise.
8057 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8058 parameter, use agent_expr::gdbarch instead, update function
8059 calls.
8060 (locexpr_tracepoint_var_ref): Likewise.
8061 (loclist_tracepoint_var_ref): Likewise.
8062 * ax-gdb.c (gen_trace_static_fields): Likewise.
8063 (gen_traced_pop): Likewise.
8064 (gen_frame_args_address): Likewise.
8065 (gen_frame_locals_address): Likewise.
8066 (gen_var_ref): Likewise.
8067 (gen_struct_ref_recursive): Likewise.
8068 (gen_static_field): Likewise.
8069 (gen_maybe_namespace_elt): Likewise.
8070 (gen_expr): Likewise.
8071 (gen_trace_for_var): Likewise.
8072 (gen_trace_for_expr): Likewise.
8073 (gen_trace_for_return_address): Likewise.
8074
8075 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8076
8077 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8078 parameter.
8079 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8080
8081 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
8082
8083 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8084 from ax, update calls.
8085 (gen_usual_arithmetic): Likewise.
8086 (gen_integral_promotions): Likewise.
8087 (gen_bitfield_ref): Likewise.
8088 (gen_primitive_field): Likewise.
8089 (gen_struct_ref_recursive): Likewise.
8090 (gen_struct_ref): Likewise.
8091 (gen_maybe_namespace_elt): Likewise.
8092 (gen_struct_elt_for_reference): Likewise.
8093 (gen_namespace_elt): Likewise.
8094 (gen_aggregate_elt_ref): Likewise.
8095 (gen_expr): Get gdbarch from ax, update calls.
8096 (gen_expr_binop_rest): Likewise.
8097
8098 2017-07-13 Pedro Alves <palves@redhat.com>
8099
8100 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8101 as default tdesc.
8102 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8103 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8104 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8105 tdesc_amd64_linux as default tdesc. Get final tdesc from the
8106 tdep.
8107 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8108 Get final tdesc from the tdep.
8109 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8110 default tdesc.
8111 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8112 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8113 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8114 Use it as default tdesc.
8115 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8116 down to amd_init_abi. No longer handle fallback tdesc here.
8117 * amd64-tdep.h (tdesc_x32): Declare.
8118 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8119 parameter.
8120 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8121 as default tdesc.
8122
8123 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8124
8125 * s390-linux-tdep.c (s390_process_record): Add support for
8126 instructions new in arch12.
8127
8128 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8129
8130 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8131 PT_GETFSBASE and PT_GETGSBASE.
8132 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8133 PT_SETGSBASE.
8134
8135 2017-07-11 John Baldwin <jhb@FreeBSD.org>
8136
8137 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8138 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8139 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8140 those rules.
8141 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8142 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8143 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8144 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8145 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8146 * features/i386/amd64.xml: Add 64bit-segments.xml.
8147 * features/i386/amd64-avx-avx512.c: Regenerated.
8148 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8149 * features/i386/amd64-avx-mpx.c: Regenerated.
8150 * features/i386/amd64-avx.c: Regenerated.
8151 * features/i386/amd64-mpx.c: Regenerated.
8152 * features/i386/amd64.c: Regenerated.
8153 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8154 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8155 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8156 * regformats/i386/amd64-avx.dat: Regenerated.
8157 * regformats/i386/amd64-mpx.dat: Regenerated.
8158 * regformats/i386/amd64.dat: Regenerated.
8159
8160 2017-07-10 Yao Qi <yao.qi@linaro.org>
8161
8162 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8163 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8164
8165 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
8166
8167 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8168 unsetenv.
8169 * gnulib/aclocal.m4: Regenerate.
8170 * gnulib/config.in: Regenerate.
8171 * gnulib/configure: Regenerate.
8172 * gnulib/import/Makefile.am: Regenerate.
8173 * gnulib/import/Makefile.in: Regenerate.
8174 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8175 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8176 * gnulib/import/m4/environ.m4: New file.
8177 * gnulib/import/m4/setenv.m4: New file.
8178 * gnulib/import/setenv.c: New file.
8179 * gnulib/import/unsetenv.c: New file.
8180
8181 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
8182
8183 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8184 address when op is DW_OP_addr.
8185
8186 2017-07-09 Tom Tromey <tom@tromey.com>
8187
8188 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8189 check and apply to outer type.
8190
8191 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8192
8193 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8194 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8195 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8196 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8197
8198 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8199
8200 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8201
8202 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8203
8204 * corelow.c (get_core_siginfo): Remove.
8205 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8206 instead of get_core_siginfo.
8207 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8208 * gdbarch.h: Re-generate.
8209 * gdbarch.c: Re-generate.
8210 * linux-tdep.c (linux_core_xfer_siginfo): New.
8211 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8212
8213 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8214
8215 * corelow.c (thread_section_name): Move to ...
8216 * gdbcore.h (thread_section_name): ... here.
8217
8218 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8219
8220 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8221 (struct siginfo32): New.
8222 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8223 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8224 via ptrace(PT_LWPINFO).
8225
8226 2017-07-07 John Baldwin <jhb@FreeBSD.org>
8227
8228 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8229 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8230 (fbsd_get_siginfo_type): New.
8231 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8232 (_initialize_fbsd_tdep): New.
8233
8234 2017-07-06 David Blaikie <dblaikie@gmail.com>
8235
8236 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8237 a singular dwo_unit*) to support multiple CUs in the same way that
8238 multiple TUs are supported.
8239 (create_cus_hash_table): Replace create_dwo_cu with a function for
8240 parsing multiple CUs from a DWO file.
8241 (open_and_init_dwo_file): Use create_cus_hash_table rather than
8242 create_dwo_cu.
8243 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8244 htab_find, rather than comparing the signature to a singleton CU in
8245 the dwo_file.
8246
8247 2017-07-06 Pedro Alves <palves@redhat.com>
8248
8249 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8250
8251 2017-07-04 Pedro Alves <palves@redhat.com>
8252
8253 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8254 * gdbtypes.h (TYPE_STATIC): Delete.
8255 (struct fn_field) <is_public, is_abstract, is_static, is_final,
8256 is_synchronized, is_native>: Delete.
8257 <dummy>: Bump.
8258 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8259 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8260 (TYPE_FN_FIELD_ABSTRACT): Delete.
8261
8262 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
8263
8264 * buffer.h (buffer_finish): Fix spelling mistakes.
8265
8266 2017-07-01 Eli Zaretskii <eliz@gnu.org>
8267
8268 * .dir-locals.el: Automatically switch to C-style comments in
8269 versions of Emacs that support the feature.
8270
8271 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8272 Pedro Alves <palves@redhat.com>
8273
8274 PR cli/21688
8275 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8276 (process_next_line): New variable 'inline_cmd'.
8277 Adjust 'if' clauses for "python", "compile" and "guile" to use
8278 'command_name_equals' and check for '!inline_cmd'.
8279
8280 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
8281
8282 PR cli/21688
8283 * cli/cli-script.c (command_name_equals_not_inline): New function.
8284 (process_next_line): Adjust 'if' clauses for "python", "compile"
8285 and "guile" to use command_name_equals_not_inline.
8286
8287 2017-06-29 Pedro Alves <palves@redhat.com>
8288
8289 * completer.c (expression_completer): Call
8290 linespec_location_completer instead of location_completer.
8291
8292 2017-06-29 Pedro Alves <palves@redhat.com>
8293
8294 * completer.c (expression_completer): Remove code that recomputes
8295 'text' from 'word'.
8296
8297 2017-06-29 Yao Qi <yao.qi@linaro.org>
8298
8299 * regformats/regdat.sh: Generate code with
8300 "ifndef IN_PROCESS_AGENT".
8301
8302 2017-06-28 Pedro Alves <palves@redhat.com>
8303
8304 * command.h: Include "common/scoped_restore.h".
8305
8306 2017-06-28 Yao Qi <yao.qi@linaro.org>
8307
8308 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
8309 instead of obstack_grow.
8310
8311 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
8312
8313 PR gdb/21337
8314 * symfile.c (reread_symbols): Call objfiles_changed just before
8315 read_symbols.
8316
8317 2017-06-27 Pedro Alves <palves@redhat.com>
8318
8319 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
8320 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
8321 (completion_list_add_symbol, completion_list_add_msymbol):
8322 ... these new functions.
8323 (add_symtab_completions)
8324 (default_make_symbol_completion_list_break_on_1): Adjust.
8325
8326 2017-06-27 Pedro Alves <palves@redhat.com>
8327
8328 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
8329 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
8330 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
8331 dtor.
8332 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
8333 'storage_obstack' field an auto_obstack. In-class initialize all
8334 non-bitfield fields. Make minsyms_read bool.
8335 * symfile.c (read_symbols): Adjust.
8336
8337 2017-06-27 Alan Hayward <alan.hayward@arm.com>
8338
8339 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
8340 (gdbsim_store_register): Likewise.
8341
8342 2017-06-27 Pedro Alves <palves@redhat.com>
8343
8344 * c-exp.y (name_obstack): Now an auto_obstack.
8345 (yylex): Use auto_obstack::clear.
8346 (c_parse): Use auto_obstack::clear instead of reinitializing and
8347 freeing the obstack.
8348 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
8349 * d-exp.y (name_obstack): Now an auto_obstack.
8350 (yylex): Use auto_obstack::clear.
8351 (d_parse): Use auto_obstack::clear instead of reinitializing and
8352 freeing the obstack.
8353 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
8354 auto_obstack.
8355 * dwarf2read.c (create_addrmap_from_index)
8356 (dwarf2_build_psymtabs_hard)
8357 (update_enumeration_type_from_children): Likewise.
8358 * gdb_obstack.h (auto_obstack): New type.
8359 * go-exp.y (name_obstack): Now an auto_obstack.
8360 (build_packaged_name): Use auto_obstack::clear.
8361 (go_parse): Use auto_obstack::clear instead of reinitializing and
8362 freeing the obstack.
8363 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
8364 auto_obstack.
8365 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8366 * rust-exp.y (work_obstack): Now an auto_obstack.
8367 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8368 reinitializing and freeing the obstack.
8369 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8370 (host_char_to_target): Use auto_obstack.
8371 * utils.h (make_cleanup_obstack_free): Delete declaration.
8372 * valprint.c (generic_emit_char, generic_printstr): Use
8373 auto_obstack.
8374
8375 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
8376
8377 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8378 thread.
8379 (darwin_init_thread_list): Don't update dummy thread.
8380 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8381
8382 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8383
8384 * record-full.c (netorder16): Remove.
8385
8386 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8387
8388 * common/diagnostics.h: Define macros for GCC.
8389 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8390 * common/vec.h: Include diagnostics.h.
8391 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8392 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8393 warning.
8394
8395 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
8396
8397 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8398 New macro.
8399 * ada-lex.l: Ignore deprecated register warnings.
8400
8401 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8402
8403 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8404 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8405
8406 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8407
8408 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8409 its own line.
8410
8411 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
8412
8413 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8414
8415 2017-06-23 Alan Hayward <alan.hayward@arm.com>
8416
8417 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8418 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8419 (xtensa_register_read_masked): Likewise.
8420
8421 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
8422
8423 * common/environ.c (gdb_environ::unset): Update comment.
8424
8425 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8426
8427 * python/py-unwind.c (pyuw_sniffer): Allocate space for
8428 registers.
8429
8430 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8431
8432 * record-full.c (record_full_exec_insn): Use byte_vector.
8433
8434 2017-06-22 Yao Qi <yao.qi@linaro.org>
8435
8436 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8437 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8438
8439 2017-06-22 Alan Hayward <alan.hayward@arm.com>
8440
8441 * remote.c (cached_reg): Move from here...
8442 * regcache.h (cached_reg): ...to here.
8443 * python/py-unwind.c (struct reg_info): Remove.
8444 (cached_frame_info): Use cached_reg_t.
8445 (pyuw_prev_register): Likewise.
8446 (pyuw_sniffer): Use cached_reg_t and allocate registers.
8447 (pyuw_dealloc_cache): Free all registers.
8448
8449 2017-06-22 Pedro Alves <palves@redhat.com>
8450 Simon Marchi <simon.marchi@ericsson.com>
8451
8452 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8453 warning.
8454 * common/diagnostics.h: New file.
8455
8456 2017-06-22 Pedro Alves <palves@redhat.com>
8457
8458 * common/agent.h: Add include guards.
8459
8460 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
8461
8462 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8463 talk about addressable units instead of bytes.
8464
8465 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8466
8467 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8468 of '::const_iterator'.
8469
8470 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
8471
8472 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8473 'unittests/environ-selftests.c'.
8474 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8475 * charset.c (find_charset_names): Declare object 'iconv_env'.
8476 Update code to use 'iconv_env' object. Remove call to
8477 'free_environ'.
8478 * common/environ.c: Include <utility>.
8479 (make_environ): Delete function.
8480 (free_environ): Delete function.
8481 (gdb_environ::clear): New function.
8482 (gdb_environ::operator=): New function.
8483 (gdb_environ::get): Likewise.
8484 (environ_vector): Delete function.
8485 (set_in_environ): Delete function.
8486 (gdb_environ::set): New function.
8487 (unset_in_environ): Delete function.
8488 (gdb_environ::unset): New function.
8489 (gdb_environ::envp): Likewise.
8490 * common/environ.h: Include <vector>.
8491 (struct gdb_environ): Delete; transform into...
8492 (class gdb_environ): ... this class.
8493 (free_environ): Delete prototype.
8494 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8495 environ_vector): Likewise.
8496 * infcmd.c (run_command_1): Update code to call
8497 'envp' from 'gdb_environ' class.
8498 (environment_info): Update code to call methods from 'gdb_environ'
8499 class.
8500 (unset_environment_command): Likewise.
8501 (path_info): Likewise.
8502 (path_command): Likewise.
8503 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8504 (inferior::inferior): Initialize 'environment' using the host's
8505 information.
8506 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8507 Include "environ.h".
8508 (class inferior) <environment>: Change type from 'struct
8509 gdb_environ' to 'gdb_environ'.
8510 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8511 methods from 'gdb_environ' class.
8512 * solib.c (solib_find_1): Likewise
8513 * unittests/environ-selftests.c: New file.
8514
8515 2017-06-20 Yao Qi <yao.qi@linaro.org>
8516
8517 * features/i386/i386-linux.xml: Exchange the order of including
8518 32bit-linux.xml and 32bit-sse.xml.
8519 * features/i386/i386-linux.c: Regenerated.
8520
8521 2017-06-20 Yao Qi <yao.qi@linaro.org>
8522
8523 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8524 Delete copy ctor and assignment operator.
8525 (tdesc_type): Likewise.
8526 (tdesc_feature): Likewise.
8527 (tdesc_free_reg): Remove.
8528 (tdesc_create_reg): Use new.
8529 (tdesc_free_type): Remove.
8530 (tdesc_create_vector): Use new.
8531 (tdesc_create_union): Likewise.
8532 (tdesc_create_flags): Likewise.
8533 (tdesc_create_enum): Likewise.
8534 (tdesc_free_feature): Delete.
8535 (free_target_description): Use delete.
8536
8537 2017-06-19 John Baldwin <jhb@FreeBSD.org>
8538
8539 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8540 registers.
8541
8542 2017-06-19 Pedro Alves <palves@redhat.com>
8543
8544 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8545 after gdb::unlinker.
8546
8547 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
8548
8549 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8550 gdb_environ to access an environment variable.
8551
8552 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8553
8554 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8555 gdb_byte*.
8556
8557 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8558
8559 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8560
8561 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8562
8563 * configure: Re-generate.
8564 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8565
8566 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8567
8568 * configure: Re-generate.
8569 * warning.m4: Pass -Werror to compiler when checking for
8570 supported warning flags.
8571
8572 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
8573
8574 * Makefile.in (COMPILE.pre): Add "-x c++".
8575
8576 2017-06-16 Alan Hayward <alan.hayward@arm.com>
8577 Pedro Alves <palves@redhat.com>
8578 Yao Qi <yao.qi@linaro.org>
8579
8580 * defs.h (RequireLongest): New.
8581 (extract_integer): Declare function template.
8582 (extract_signed_integer): Remove the declaration, but define it
8583 static inline.
8584 (extract_unsigned_integer): Likewise.
8585 (store_integer): Declare function template.
8586 (store_signed_integer): Remove the declaration, but define it
8587 static inline.
8588 (store_unsigned_integer): Likewise.
8589 * findvar.c (extract_integer): New function template.
8590 (extract_signed_integer): Remove.
8591 (extract_unsigned_integer): Remove.
8592 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8593 instantiations.
8594 (store_integer): New function template.
8595 (store_signed_integer): Remove.
8596 (store_unsigned_integer): Remove.
8597 (store_integer): Explicit instantiations.
8598 * regcache.c (regcache_raw_read_signed): Update.
8599 (regcache::raw_read): New function.
8600 (regcache::raw_read_signed): Remove.
8601 (regcache::raw_read_unsigned): Remove.
8602 (regcache_raw_read_unsigned): Update.
8603 (regcache_raw_write_unsigned): Update.
8604 (regcache::raw_write_signed): Remove.
8605 (regcache::raw_write): New function.
8606 (regcache_cooked_read_signed): Update.
8607 (regcache::raw_write_unsigned): Remove.
8608 (regcache::cooked_read_signed): Remove.
8609 (regcache_cooked_read_unsigned): Update.
8610 (regcache::cooked_read_unsigned): Remove.
8611 (regcache_cooked_write_signed): Update.
8612 (regcache_cooked_write_unsigned): Update.
8613 * regcache.h (regcache) <raw_read_signed>: Remove.
8614 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8615 <raw_read, raw_write>: New.
8616 <cooked_read_signed, cooked_write_signed>: Remove.
8617 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8618 <cooked_read, cooked_write>: New.
8619 * sh64-tdep.c (sh64_pseudo_register_read): Update.
8620 (sh64_pseudo_register_write): Update.
8621
8622 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
8623
8624 * arc-tdep.c (arc_disassembler_options): New variable.
8625 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8626 of default_print_insn.
8627 (arc_delayed_print_insn): Set info->section when needed,
8628 use default_print_insn to retrieve a disassembler.
8629
8630 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
8631
8632 PR gdb/21574
8633 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8634 to mention $SHELL and startup-with-shell.
8635
8636 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
8637
8638 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8639
8640 2017-06-14 Yao Qi <yao.qi@linaro.org>
8641
8642 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8643 default_print_insn instead of print_insn_aarch64.
8644 * arm-tdep.c (gdb_print_insn_arm): Call
8645 default_print_insn instead of print_insn_big_arm
8646 and print_insn_little_arm.
8647 * i386-tdep.c (i386_print_insn): Call default_print_insn
8648 instead of print_insn_i386.
8649 * ia64-tdep.c (ia64_print_insn): Call
8650 default_print_insn instead of print_insn_ia64.
8651 * mips-tdep.c (gdb_print_insn_mips): Call
8652 default_print_insn instead of print_insn_big_mips
8653 and print_insn_little_mips.
8654 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8655 instead of print_insn_spu.
8656
8657 2017-06-14 Pedro Alves <palves@redhat.com>
8658
8659 * ada-lang.c: Include "common/byte-vector.h".
8660 (ada_value_primitive_packed_val): Use gdb::byte_vector.
8661 * charset.c (wchar_iterator::iterate): Resize the vector instead
8662 of reserving it.
8663 * common/byte-vector.h: Include "common/def-vector.h".
8664 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8665 * cli/cli-dump.c: Include "common/byte-vector.h".
8666 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8667 * common/byte-vector.h: New file.
8668 * common/def-vector.h: New file.
8669 * common/default-init-alloc.h: New file.
8670 * dwarf2loc.c: Include "common/byte-vector.h".
8671 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8672 instead of reserving it.
8673 * dwarf2read.c: Include "common/byte-vector.h".
8674 (data_buf::m_vec): Now a gdb::byte_vector.
8675 * gdb_regex.c: Include "common/def-vector.h".
8676 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8677 * mi/mi-main.c: Include "common/byte-vector.h".
8678 (mi_cmd_data_read_memory): Use gdb::byte_vector.
8679 * printcmd.c: Include "common/byte-vector.h".
8680 (print_scalar_formatted): Use gdb::byte_vector.
8681 * valprint.c: Include "common/byte-vector.h".
8682 (maybe_negate_by_bytes, print_decimal_chars): Use
8683 gdb::byte_vector.
8684
8685 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8686
8687 * darwin-nat.c: Include "nat/fork-inferior.h".
8688
8689 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8690
8691 * configure.nat: Factor out Darwin bits that are not
8692 architecture-specific. Add fork-inferior.o.
8693
8694 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
8695
8696 * configure.nat: Factor out AIX bits that are not
8697 architecture-specific. Add fork-inferior.o.
8698
8699 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8700
8701 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
8702 (read_pieced_value, write_pieced_value): ...here. Reduce to
8703 wrappers that just call rw_pieced_value.
8704
8705 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8706
8707 * dwarf2loc.c (write_pieced_value): When writing the data for a
8708 memory piece, use write_memory_with_notification instead of
8709 write_memory.
8710
8711 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8712
8713 * valops.c (read_value_memory): Change embedded_offset to
8714 represent a bit offset instead of a byte offset.
8715 * value.h (read_value_memory): Adjust comment.
8716
8717 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8718
8719 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8720 dest_offset_bits and source_offset_bits.
8721 (write_pieced_value): Likewise.
8722
8723 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8724
8725 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8726 given by DW_OP_bit_piece.
8727 (write_pieced_value): Likewise.
8728
8729 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8730
8731 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8732 some other preparations to the places where sufficient information
8733 is available.
8734 (write_pieced_value): Likewise.
8735
8736 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8737
8738 * dwarf2loc.c (bits_to_bytes): New function.
8739 (read_pieced_value): Fix offset calculations for register pieces
8740 on big-endian targets.
8741 (write_pieced_value): Likewise.
8742
8743 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8744
8745 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8746 (write_pieced_value): Likewise.
8747
8748 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8749
8750 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8751 transfer the source value's least significant bits, instead of its
8752 lowest-addressed ones. Rename type_len to max_offset.
8753 (read_pieced_value): Mirror above changes to write_pieced_value as
8754 applicable.
8755
8756 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8757
8758 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8759 truncate full bytes from dest_offset_bits before using it as an
8760 offset into the buffer.
8761
8762 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8763
8764 * dwarf2loc.c (write_pieced_value): Include transfer size in
8765 byte-wise check.
8766
8767 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8768
8769 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8770 calculation of this_size.
8771
8772 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8773
8774 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8775 when targeting a bit-field.
8776 (write_pieced_value): Likewise.
8777
8778 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8779
8780 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8781 (allocate_piece_closure): Drop addr_size parameter.
8782 (dwarf2_evaluate_loc_desc_full): Adjust call to
8783 allocate_piece_closure.
8784
8785 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8786
8787 PR gdb/21226
8788 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8789 the LSB end, independent of endianness.
8790
8791 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8792
8793 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8794 size capping.
8795
8796 2017-06-13 Yao Qi <yao.qi@linaro.org>
8797
8798 * mips-linux-nat.c: Move include features/mips*-linux.c to
8799 mips-linux-tdep.c.
8800 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8801 to mips-linux-tdep.c.
8802 * mips-linux-tdep.c: Include features/mips*-linux.c
8803 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8804 functions.
8805 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8806 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8807 (tdesc_mips64_dsp_linux): Declare.
8808
8809 2017-06-12 Tom Tromey <tom@tromey.com>
8810
8811 * valprint.h (val_print_type_code_int): Remove.
8812 * valprint.c (generic_val_print_int): Always call
8813 val_print_scalar_formatted.
8814 (val_print_type_code_int): Remove.
8815 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8816 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8817 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8818 * ada-valprint.c (ada_val_print_num): Use
8819 val_print_scalar_formatted.
8820
8821 2017-06-12 Tom Tromey <tom@tromey.com>
8822
8823 * printcmd.c (print_scalar_formatted): Unify the two switches.
8824 Don't convert scalars to LONGEST.
8825
8826 2017-06-12 Tom Tromey <tom@tromey.com>
8827
8828 PR exp/16225:
8829 * valprint.h (print_decimal_chars): Update.
8830 * valprint.c (maybe_negate_by_bytes): New function.
8831 (print_decimal_chars): Add "is_signed" argument.
8832 * printcmd.c (print_scalar_formatted): Update.
8833
8834 2017-06-12 Tom Tromey <tom@tromey.com>
8835
8836 PR exp/16225:
8837 * valprint.h (print_binary_chars, print_hex_chars): Update.
8838 * valprint.c (val_print_type_code_int): Update.
8839 (print_binary_chars): Add "zero_pad" argument.
8840 (emit_octal_digit): New function.
8841 (print_octal_chars): Don't zero-pad.
8842 (print_decimal_chars): Likewise.
8843 (print_hex_chars): Add "zero_pad" argument.
8844 * sh64-tdep.c (sh64_do_fp_register): Update.
8845 * regcache.c (regcache::dump): Update.
8846 * printcmd.c (print_scalar_formatted): Update.
8847 * infcmd.c (default_print_one_register_info): Update.
8848
8849 2017-06-12 Pedro Alves <palves@redhat.com>
8850 Alan Hayward <alan.hayward@arm.com>
8851
8852 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8853 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8854 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8855 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8856 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8857
8858 2017-06-12 Pedro Alves <palves@redhat.com>
8859
8860 * dwarf2read.c (mapped_symtab::data): Now a vector of
8861 symtab_index_entry instead of vector of
8862 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8863 whether an element's name is NULL instead of checking whether the
8864 element itself is NULL.
8865 (find_slot): Change return type. Adjust.
8866 (hash_expand, , add_index_entry, uniquify_cu_indices)
8867 (write_hash_table): Adjust.
8868
8869 2017-06-12 Pedro Alves <palves@redhat.com>
8870
8871 * dwarf2read.c (recursively_count_psymbols): New function.
8872 (write_psymtabs_to_index): Call it to compute number of psyms and
8873 pass estimate size of psyms_seen to unordered_set's ctor.
8874
8875 2017-06-12 Pedro Alves <palves@redhat.com>
8876
8877 * dwarf2read.c (write_hash_table): Check if key already exists
8878 before emplacing.
8879
8880 2017-06-12 Pedro Alves <palves@redhat.com>
8881
8882 * dwarf2read.c (data_buf::append_space): Rename to...
8883 (data_buf::grow): ... this, and make private. Adjust all callers.
8884 (data_buf::append_uint): New method.
8885 (add_address_entry, write_one_signatured_type)
8886 (write_psymtabs_to_index): Use it.
8887
8888 2017-06-12 Pedro Alves <palves@redhat.com>
8889
8890 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8891 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8892 (data_buf::file_write): Call ::fwrite directly.
8893
8894 2017-06-12 Pedro Alves <palves@redhat.com>
8895
8896 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8897 std::vector::erase.
8898
8899 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8900
8901 Code cleanup: C++ify .gdb_index producer.
8902 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8903 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8904 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8905 (create_strtab, add_string): Remove.
8906 (file_write, data_buf): New.
8907 (struct symtab_index_entry): Use std::vector for cu_indices.
8908 (struct mapped_symtab): Use std::vector for data.
8909 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8910 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8911 Remove.
8912 (find_slot): Change return type. Update it to the new data structures.
8913 (hash_expand, add_index_entry): Update it to the new data structures.
8914 (offset_type_compare): Remove.
8915 (uniquify_cu_indices): Update it to the new data structures.
8916 (c_str_view, c_str_view_hasher, vector_hasher): New.
8917 (add_indices_to_cpool): Remove.
8918 (write_hash_table): Update it to the new data structures.
8919 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8920 (eq_psymtab_cu_index): Remove.
8921 (psym_index_map): New typedef.
8922 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8923 reference and std::unordered_map for cu_index_htab.
8924 (add_address_entry, add_address_entry_worker, write_address_map)
8925 (write_psymbols): Update it to the new data structures.
8926 (write_obstack): Remove.
8927 (struct signatured_type_index_data): Change types_list to a data_buf
8928 reference and psyms_seen to a std::unordered_set reference.
8929 (write_one_signatured_type, recursively_write_psymbols)
8930 (write_psymtabs_to_index): Update it to the new data structures.
8931
8932 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8933
8934 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8935 separate-debug-file commands.
8936 * symfile.h (separate_debug_file_debug): New global.
8937 * symfile.c (separate_debug_file_debug): New global.
8938 (separate_debug_file_exists, find_separate_debug_file): Add
8939 debug output.
8940 (_initialize_symfile): Add "set debug separate-debug-file"
8941 command.
8942 * build-id.c (build_id_to_debug_bfd,
8943 find_separate_debug_file_by_buildid): Add debug output.
8944
8945 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8946
8947 * gdbarch.sh (displaced_step_free_closure): Remove.
8948 * gdbarch.h, gdbarch.c: Re-generate.
8949 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8950 displaced_step_free_closure.
8951 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8952 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8953 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8954 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8955 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8956 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8957 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8958 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8959 * infrun.c (displaced_step_clear): Call xfree instead of
8960 gdbarch_displaced_step_free_closure.
8961
8962 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8963
8964 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8965 NULL".
8966
8967 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8968
8969 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8970 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8971 (mn10300_push_dummy_call): Likewise.
8972
8973 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8974
8975 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8976
8977 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8978
8979 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8980
8981 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8982
8983 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8984 able to start inferiors using a shell.
8985 (New remote packets): Announce new packet "QStartupWithShell".
8986 * remote.c: Add PACKET_QStartupWithShell.
8987 (extended_remote_create_inferior): Handle new
8988 PACKET_QStartupWithShell.
8989 (remote_protocol_features) <QStartupWithShell>: New entry for
8990 PACKET_QStartupWithShell.
8991 (_initialize_remote): Call "add_packet_config_cmd" for
8992 QStartupShell.
8993
8994 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8995 Pedro Alves <palves@redhat.com>
8996
8997 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8998 and "nat/fork-inferior.h".
8999 * common/common-inferior.h: New file, with contents from
9000 "gdb/inferior.h".
9001 * commom/common-utils.c: Include "common-utils.h".
9002 (stringify_argv): New function.
9003 * common/common-utils.h (stringify_argv): New prototype.
9004 * configure.nat: Add "fork-inferior.o" as a dependency for
9005 "*linux*", "fbsd*" and "nbsd*" hosts.
9006 * corefile.c (get_exec_file): Update comment.
9007 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9008 instead of "startup_inferior".
9009 (darwin_create_inferior): Call "add_thread_silent" after
9010 "fork_inferior".
9011 * fork-child.c: Cleanup unnecessary includes.
9012 (SHELL_FILE): Move to "common/common-fork-child.c".
9013 (environ): Likewise.
9014 (exec_wrapper): Initialize.
9015 (get_exec_wrapper): New function.
9016 (breakup_args): Move to "common/common-fork-child.c"; rename to
9017 "breakup_args_for_exec".
9018 (escape_bang_in_quoted_argument): Move to
9019 "common/common-fork-child.c".
9020 (saved_ui): New variable.
9021 (prefork_hook): New function.
9022 (postfork_hook): Likewise.
9023 (postfork_child_hook): Likewise.
9024 (gdb_startup_inferior): Likewise.
9025 (fork_inferior): Move to "common/common-fork-child.c". Update
9026 function to support gdbserver.
9027 (startup_inferior): Likewise.
9028 * gdbcore.h (get_exec_file): Remove declaration.
9029 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9030 instead of "startup_inferior". Call "add_thread_silent" after
9031 "fork_inferior".
9032 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9033 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9034 instead of "startup_inferior". Call "add_thread_silent" after
9035 "fork_inferior".
9036 * inferior.h: Include "common-inferior.h".
9037 (trace_start_error): Move to "common/common-utils.h".
9038 (trace_start_error_with_name): Likewise.
9039 (fork_inferior): Move prototype to "nat/fork-inferior.h".
9040 (startup_inferior): Likewise.
9041 (gdb_startup_inferior): New prototype.
9042 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9043 * nat/fork-inferior.h: New file.
9044 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9045 instead of "startup_inferior". Call "add_thread_silent" after
9046 "fork_inferior".
9047 * target.h (target_terminal_init): Move prototype to
9048 "target/target.h".
9049 (target_terminal_inferior): Likewise.
9050 (target_terminal_ours): Likewise.
9051 * target/target.h (target_terminal_init): New prototype, moved
9052 from "target.h".
9053 (target_terminal_inferior): Likewise.
9054 (target_terminal_ours): Likewise.
9055 * utils.c (gdb_flush_out_err): New function.
9056
9057 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9058
9059 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9060 * common/common-gdbthread.h: New file, with parts from
9061 "gdb/gdbthread.h".
9062 * gdbthread.h: Include "common-gdbthread.h".
9063 (switch_to_thread): Moved to "common/common-gdbthread.h".
9064
9065 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
9066
9067 * Makefile.in (SFILES): Add "common/job-control.c".
9068 (HFILES_NO_SRCDIR): Add "common/job-control.h".
9069 (COMMON_OBS): Add "job-control.o".
9070 * common/job-control.c: New file, with contents from
9071 "gdb/inflow.c".
9072 * common/job-control.h: New file, with contents from "terminal.h".
9073 * fork-child.c: Include "job-control.h".
9074 * inflow.c: Include "job-control.h".
9075 (gdb_setpgid): Move to "common/common-inflow.c".
9076 (_initialize_inflow): Move setting of "job_control" to
9077 "handle_job_control".
9078 * terminal.h (job_control): Moved to "common/common-terminal.h".
9079 (gdb_setpgid): Likewise.
9080 * top.c: Include "job_control.h".
9081 * utils.c: Likewise.
9082 (job_control): Moved to "job-control.c".
9083
9084 2017-06-07 Pedro Alves <palves@redhat.com>
9085
9086 * Makefile.in (SFILES): Add gdb_regex.c.
9087 (COMMON_OBS): Add gdb_regex.o.
9088 * ada-lang.c (ada_add_standard_exceptions)
9089 (ada_add_exceptions_from_frame, name_matches_regex)
9090 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9091 parameter type to compiled_regex. Adjust.
9092 (ada_exceptions_list): Use compiled_regex.
9093 * break-catch-throw.c (exception_catchpoint::pattern): Now a
9094 std::unique_ptr<compiled_regex>.
9095 (exception_catchpoint::~exception_catchpoint): Remove regfree
9096 call.
9097 (check_status_exception_catchpoint): Adjust to use compiled_regex.
9098 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9099 * breakpoint.c (solib_catchpoint::compiled): Now a
9100 std::unique_ptr<compiled_regex>.
9101 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9102 (check_status_catch_solib): Adjust to use compiled_regex.
9103 (add_solib_catchpoint): Adjust to use compiled_regex.
9104 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9105 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9106 compiled_regex reference. Adjust to use it.
9107 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9108 declaration. Include "gdb_regex.h".
9109 (apropos_cmd): Change regex parameter to compiled_regex reference.
9110 * gdb_regex.c: New file.
9111 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9112 declarations.
9113 (class compiled_regex): New.
9114 * linux-tdep.c: Include "common/gdb_optional.h".
9115 (struct mapping_regexes): New, factored out from
9116 mapping_is_anonymous_p, and adjusted to use compiled_regex.
9117 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9118 gdb::optional and remove cleanups. Adjust to compiled_regex.
9119 * probe.c: Include "common/gdb_optional.h".
9120 (collect_probes): Use compiled_regex and gdb::optional and remove
9121 cleanups.
9122 * skip.c: Include "common/gdb_optional.h".
9123 (skiplist_entry::compiled_function_regexp): Now a
9124 gdb::optional<compiled_regex>.
9125 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9126 (free_skiplist_entry): Remove regfree call.
9127 (compile_skip_regexp, skip_rfunction_p): Adjust to use
9128 compiled_regex and gdb::optional.
9129 * symtab.c: Include "common/gdb_optional.h".
9130 (search_symbols): Use compiled_regex and gdb::optional.
9131 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9132 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
9133 to gdb_regex.c.
9134
9135 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9136
9137 * regcache.c (regcache::save): Avoid buffer use.
9138 (regcache::dump): Likewise.
9139
9140 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9141
9142 * sh-tdep.c (sh_pseudo_register_read): Remove
9143 MAX_REGISTER_SIZE.
9144 (sh_pseudo_register_write): Likewise.
9145 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9146 (sh64_pseudo_register_write): Likewise
9147
9148 2017-06-07 Alan Hayward <alan.hayward@arm.com>
9149
9150 * aarch64-tdep.c (aarch64_store_return_value): Use
9151 V_REGISTER_SIZE.
9152 (aarch64_pseudo_read_value): Likewise.
9153 (aarch64_pseudo_write): Likewise.
9154
9155 2017-06-06 Yao Qi <yao.qi@linaro.org>
9156
9157 * regformats/regdef.h (set_register_cache): Remove the
9158 declaration.
9159
9160 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9161
9162 * frame.c (frame_unwind_register_signed): Use
9163 frame_unwind_register_value.
9164
9165 2017-06-06 Pedro Alves <palves@redhat.com>
9166
9167 PR breakpoints/21553
9168 * breakpoint.c (create_breakpoints_sal_default)
9169 (init_breakpoint_sal, create_breakpoint_sal): Use
9170 gdb::unique_xmalloc_ptr for string parameters.
9171 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9172 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
9173 (base_breakpoint_create_breakpoints_sal)
9174 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9175 (strace_marker_create_breakpoints_sal)
9176 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9177 string parameters.
9178 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9179 gdb::unique_xmalloc_ptr for string parameters.
9180 (create_breakpoint): Constify 'extra_string' and 'cond_string'
9181 parameters.
9182
9183 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9184
9185 * alpha-tdep.c (alpha_register_to_value): Use
9186 get_frame_register_value.
9187 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9188
9189 2017-06-06 Alan Hayward <alan.hayward@arm.com>
9190
9191 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9192 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9193 (ia64_value_to_register): Likewise.
9194 (ia64_extract_return_value): Likewise.
9195 (ia64_store_return_value): Likewise.
9196 (ia64_push_dummy_call): Likewise.
9197
9198 2017-06-04 Joel Brobecker <brobecker@adacore.com>
9199
9200 GDB 8.0 released.
9201
9202 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
9203
9204 * x86-linux-nat.c (struct arch_lwp_info): Remove.
9205
9206 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
9207
9208 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9209 parameter.
9210 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9211
9212 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
9213
9214 * event-loop.c (poll_timers): Unallocate timer using delete
9215 instead of xfree.
9216
9217 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9218
9219 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9220 (struct breakpoint) <~breakpoint>: New.
9221 (struct watchpoint): Inherit from breakpoint.
9222 <~watchpoint>: New.
9223 <base>: Remove.
9224 (struct tracepoint): Inherit from breakpoint.
9225 <base>: Remove.
9226 * breakpoint.c (longjmp_breakpoint_ops): Remove.
9227 (struct longjmp_breakpoint): Inherit from breakpoint.
9228 <~longjmp_breakpoint>: New.
9229 <base>: Remove.
9230 (new_breakpoint_from_type): Remove casts.
9231 (watchpoint_in_thread_scope): Remove reference to base field.
9232 (watchpoint_del_at_next_stop): Likewise.
9233 (update_watchpoint): Likewise.
9234 (watchpoint_check): Likewise.
9235 (bpstat_check_watchpoint): Likewise.
9236 (set_longjmp_breakpoint): Likewise.
9237 (struct fork_catchpoint): Inherit from breakpoint.
9238 <base>: Remove.
9239 (struct solib_catchpoint): Inherit from breakpoint.
9240 <~solib_catchpoint>: New.
9241 <base>: Remove.
9242 (dtor_catch_solib): Change to ...
9243 (solib_catchpoint::~solib_catchpoint): ... this.
9244 (breakpoint_hit_catch_solib): Remove reference to base field.
9245 (add_solib_catchpoint): Likewise.
9246 (create_fork_vfork_event_catchpoint): Likewise.
9247 (struct exec_catchpoint): Inherit from breakpoint.
9248 <~exec_catchpoint>: New.
9249 <base>: Remove.
9250 (dtor_catch_exec): Change to ...
9251 (exec_catchpoint::~exec_catchpoint): ... this.
9252 (dtor_watchpoint): Change to ...
9253 (watchpoint::~watchpoint): ... this.
9254 (watch_command_1): Remove reference to base field.
9255 (catch_exec_command_1): Likewise.
9256 (base_breakpoint_dtor): Change to ...
9257 (breakpoint::~breakpoint): ... this.
9258 (base_breakpoint_ops): Remove dtor field value.
9259 (longjmp_bkpt_dtor): Change to ...
9260 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9261 (strace_marker_create_breakpoints_sal): Remove reference to base
9262 field.
9263 (delete_breakpoint): Don't manually call breakpoint destructor.
9264 (create_tracepoint_from_upload): Remove reference to base field.
9265 (trace_pass_set_count): Likewise.
9266 (initialize_breakpoint_ops): Don't initialize
9267 momentary_breakpoint_ops, don't set dtors.
9268 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9269 <~ada_catchpoint>: New.
9270 <base>: Remove.
9271 (create_excep_cond_exprs): Remove reference to base field.
9272 (dtor_exception): Change to ...
9273 (ada_catchpoint::~ada_catchpoint): ... this.
9274 (dtor_catch_exception): Remove.
9275 (dtor_catch_exception_unhandled): Remove.
9276 (dtor_catch_assert): Remove.
9277 (create_ada_exception_catchpoint): Remove reference to base
9278 field.
9279 (initialize_ada_catchpoint_ops): Don't set dtors.
9280 * break-catch-sig.c (struct signal_catchpoint): Inherit from
9281 breakpoint.
9282 <~signal_catchpoint>: New.
9283 <base>: Remove.
9284 (signal_catchpoint_dtor): Change to ...
9285 (signal_catchpoint::~signal_catchpoint): ... this.
9286 (create_signal_catchpoint): Remove reference to base field.
9287 (initialize_signal_catchpoint_ops): Don't set dtor.
9288 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9289 from breakpoint.
9290 <~syscall_catchpoint>: New.
9291 <base>: Remove.
9292 (dtor_catch_syscall): Change to ...
9293 (syscall_catchpoint::~syscall_catchpoint): ... this.
9294 (create_syscall_event_catchpoint): Remove reference to base
9295 field.
9296 (initialize_syscall_catchpoint_ops): Don't set dtor.
9297 * break-catch-throw.c (struct exception_catchpoint): Inherit
9298 from breakpoint.
9299 <~exception_catchpoint>: New.
9300 <base>: Remove.
9301 (dtor_exception_catchpoint): Change to ...
9302 (exception_catchpoint::~exception_catchpoint): ... this.
9303 (handle_gnu_v3_exceptions): Remove reference to base field.
9304 (initialize_throw_catchpoint_ops): Don't set dtor.
9305 * ctf.c (ctf_get_traceframe_address): Remove reference to base
9306 field.
9307 * remote.c (remote_get_tracepoint_status): Likewise.
9308 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
9309 * tracefile.c (tracefile_fetch_registers): Likewise.
9310 * tracepoint.c (actions_command): Likewise.
9311 (validate_actionline): Likewise.
9312 (tfind_1): Likewise.
9313 (get_traceframe_location): Likewise.
9314 (find_matching_tracepoint_location): Likewise.
9315 (parse_tracepoint_status): Likewise.
9316 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
9317
9318 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9319
9320 * breakpoint.c (struct longjmp_breakpoint): New struct.
9321 (is_tracepoint_type): Change return type to bool.
9322 (is_longjmp_type): New function.
9323 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
9324 (set_raw_breakpoint_without_location): Use
9325 new_breakpoint_from_type.
9326 (set_raw_breakpoint): Likewise.
9327
9328 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
9329
9330 * breakpoint.c (new_breakpoint_from_type): New function.
9331 (create_breakpoint_sal): Use new_breakpoint_from_type and
9332 unique_ptr.
9333 (create_breakpoint): Likewise.
9334
9335 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
9336
9337 * memattr.c (mem_info_command): Rename to ...
9338 (info_mem_command): ... this.
9339 (mem_enable_command): Rename to ...
9340 (enable_mem_command): ... this.
9341 (mem_disable_command): Rename to ...
9342 (disable_mem_command): ... this.
9343 (mem_delete_command): Rename to ...
9344 (delete_mem_command): ... this.
9345 (_initialize_mem): Adjust function names.
9346
9347 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9348
9349 * btrace.c (handle_pt_insn_events): New.
9350 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
9351 STATUS. Split into this and ...
9352 (handle_pt_insn_event_flags): ... this.
9353
9354 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
9355
9356 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
9357 and struct pt_insn.resynced.
9358 * configure: Regenerated.
9359 * config.in: Regenerated.
9360
9361 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9362
9363 * btrace.c (ftrace_find_call_by_number): New function.
9364 (ftrace_new_function): Store objects, not pointers.
9365 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9366 ftrace_new_gap, ftrace_update_function,
9367 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9368 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9369 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9370 btrace_ends_with_single_insn, btrace_call_get): Account for
9371 btrace_thread_info::functions now storing objects.
9372 * btrace.h (struct btrace_thread_info): Add constructor.
9373 (struct btrace_thread_info) <functions>: Make std::vector.
9374 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9375 Initialize with default values.
9376 * record-btrace.c (record_btrace_frame_sniffer): Account for
9377 btrace_thread_info::functions now storing objects.
9378
9379 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9380
9381 * btrace.c: Remove typedef bfun_s.
9382 (ftrace_new_gap): Directly add gaps to the list of gaps.
9383 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9384 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9385 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9386 instead of gdb VEC.
9387
9388 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9389
9390 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9391 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9392 with btrace_thread_info::next_segment and
9393 btrace_thread_info::prev_segment.
9394 * btrace.h: Remove struct btrace_func_link.
9395 (struct btrace_function): Replace pair of function segment pointers
9396 with pair of indices.
9397 * python/py-record-btrace.c (btpy_call_prev_sibling,
9398 btpy_call_next_sibling): Replace references to
9399 btrace_thread_info::segment with btrace_thread_info::next_segment and
9400 btrace_thread_info::prev_segment.
9401 * record-btrace.c (record_btrace_frame_this_id): Use
9402 btrace_find_call_by_number.
9403
9404 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9405
9406 * btrace.c (ftrace_new_function, ftrace_fixup_level,
9407 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9408 btrace_insn_next, btrace_insn_prev): Remove references to
9409 btrace_thread_info::flow.
9410 * btrace.h (struct btrace_function): Remove FLOW.
9411
9412 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9413
9414 * btrace.c (ftrace_find_call_by_number): New function.
9415 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9416 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9417 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9418 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9419 index.
9420 * btrace.h (struct btrace_function): Turn UP into an index.
9421 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9422 as an index.
9423 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9424 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9425 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9426
9427 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9428
9429 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9430 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9431 ftrace_update_function, ftrace_compute_global_level_offset,
9432 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9433 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9434 btrace_insn_end, btrace_is_empty): Remove references to
9435 btrace_thread_info::begin and btrace_thread_info::end.
9436 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9437 (struct btrace_thread_info) <functions>: Adjust comment.
9438 * record-btrace.c (record_btrace_start_replaying): Remove reference to
9439 btrace_thread_info::begin.
9440
9441 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9442
9443 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9444 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9445 ftrace_update_function): Remove arguments that implicitly were always
9446 BTINFO->END.
9447 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9448 Don't pass BTINFO->END.
9449
9450 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9451
9452 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9453 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9454 btrace_find_insn_by_number): Replace function segment pointer with
9455 index.
9456 (btrace_insn_cmp): Simplify.
9457 * btrace.h: (struct btrace_insn_iterator) Rename index to
9458 insn_index. Replace function segment pointer with index into function
9459 segment vector.
9460 * record-btrace.c (record_btrace_call_history): Replace function
9461 segment pointer use with index.
9462 (record_btrace_frame_sniffer): Retrieve function call segment through
9463 vector.
9464 (record_btrace_set_replay): Remove defunc't safety check.
9465
9466 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9467
9468 * btrace.c (btrace_ends_with_single_insn): New function.
9469 (btrace_call_get, btrace_call_number, btrace_call_begin,
9470 btrace_call_end, btrace_call_next, btrace_call_prev,
9471 btrace_find_call_by_number): Use index into call segment vector
9472 instead of pointer.
9473 (btrace_call_cmp): Simplify.
9474 * btrace.h (struct btrace_call_iterator): Replace function call segment
9475 pointer with index into vector.
9476 * record-btrace.c (record_btrace_call_history): Use index instead of
9477 pointer.
9478
9479 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9480
9481 * btrace.c (btrace_insn_begin, btrace_insn_end,
9482 btrace_find_insn_by_number): Add btinfo to iterator.
9483 * btrace.h (struct btrace_insn_iterator): Add btinfo.
9484
9485 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9486
9487 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9488 and save pointers directly.
9489 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9490 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9491 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
9492 changed signature of functions.
9493 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9494 (btrace_fetch): Remove code that adds btrace_function pointers to
9495 vector of btrace_functions.
9496 (btrace_clear): Simplify freeing vector of btrace_functions.
9497
9498 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
9499
9500 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9501 Replace VEC_* with std::vector functions.
9502 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9503 (struct btrace_thread_info)<functions>: Change type to std::vector.
9504
9505 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
9506
9507 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
9508 "Removed targets and native configurations" up. Merge duplicate
9509 "New commands" sub-sections. Add "New options" sub-sections.
9510
9511 2017-05-26 Alan Hayward <alan.hayward@arm.com>
9512
9513 * defs.h (copy_integer_to_size): New declaration.
9514 * findvar.c (copy_integer_to_size): New function.
9515 (do_cint_test): New selftest function.
9516 (copy_integer_to_size_test): Likewise.
9517 (_initialize_findvar): Likewise.
9518 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9519 (mips_fbsd_collect_reg): Use raw_collect_integer.
9520 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9521 (mips64_fill_gregset): Use raw_collect_integer
9522 (mips64_fill_fpregset): Use raw_supply_integer.
9523 * regcache.c (regcache::raw_supply_integer): New function.
9524 (regcache::raw_collect_integer): Likewise.
9525 * regcache.h: (regcache::raw_supply_integer): New declaration.
9526 (regcache::raw_collect_integer): Likewise.
9527
9528 2017-05-24 Yao Qi <yao.qi@linaro.org>
9529
9530 * Makefile.in (SFILES): Add gdbarch-selftests.c.
9531 (COMMON_OBS): Add gdbarch-selftests.o.
9532 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9533 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9534 * gdbarch-selftests.c: New file.
9535 * regcache.h (regcache) <~regcache>: Mark it virtual if
9536 GDB_SELF_TEST.
9537 <raw_write>: Likewise.
9538
9539 2017-05-24 Yao Qi <yao.qi@linaro.org>
9540
9541 * regcache.c (current_regcache): Change it to
9542 regcache::current_regcache.
9543 (regcache_observer_target_changed): Update.
9544 (regcache_thread_ptid_changed): Make it a regcache static
9545 method.
9546 (regcache_thread_ptid_changed): Update.
9547 (class regcache_access): New.
9548 (current_regcache_test): Update.
9549 (_initialize_regcache): Update.
9550 * regcache.h: Include forward_list.
9551 (regcache): Declare regcache_thread_ptid_changed and declare
9552 registers_changed_ptid as friend.
9553
9554 2017-05-24 Yao Qi <yao.qi@linaro.org>
9555
9556 * i387-tdep.c (i387_register_to_value): Use register_size
9557 instead of TYPE_LENGTH.
9558 * m68k-tdep.c (m68k_register_to_value): Likewise.
9559
9560 2017-05-24 Yao Qi <yao.qi@linaro.org>
9561
9562 * i387-tdep.c (i387_convert_register_p): Return false if type
9563 code isn't TYPE_CODE_FLT.
9564
9565 2017-05-24 Yao Qi <yao.qi@linaro.org>
9566
9567 * alpha-tdep.c (alpha_convert_register_p): Return true if type
9568 length is 4.
9569 (alpha_register_to_value): Remove type length check.
9570 (alpha_value_to_register): Likewise.
9571
9572 2017-05-24 Yao Qi <yao.qi@linaro.org>
9573
9574 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9575 TYPE_CODE_FLT.
9576
9577 2017-05-24 Yao Qi <yao.qi@linaro.org>
9578
9579 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9580 TYPE_CODE_FLT or not.
9581
9582 2017-05-24 Yao Qi <yao.qi@linaro.org>
9583
9584 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9585 * avr-tdep.c (avr_gdbarch_init): Likewise.
9586 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9587 * cris-tdep.c (cris_gdbarch_init): Likewise.
9588 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9589 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9590 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9591 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9592 * mep-tdep.c (mep_gdbarch_init): Likewise.
9593 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9594 * mips-tdep.c (mips_gdbarch_init): Likewise.
9595 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9596 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9597 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9598 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9599 * v850-tdep.c (v850_gdbarch_init): Likewise.
9600
9601 2017-05-24 Yao Qi <yao.qi@linaro.org>
9602
9603 * selftest-arch.c (tests_with_arch): Call registers_changed
9604 and reinit_frame_cache.
9605 * selftest.c (run_self_tests): Likewise.
9606
9607 2017-05-24 Yao Qi <yao.qi@linaro.org>
9608
9609 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9610 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9611
9612 2017-05-24 Yao Qi <yao.qi@linaro.org>
9613
9614 * rl78-tdep.c (rl78_gdbarch_init): Don't call
9615 set_gdbarch_print_insn.
9616
9617 2017-05-24 Yao Qi <yao.qi@linaro.org>
9618
9619 * h8300-tdep.c (h8300_gdbarch_init): Don't call
9620 set_gdbarch_print_insn.
9621
9622 2017-05-24 Yao Qi <yao.qi@linaro.org>
9623
9624 * alpha-tdep.c (alpha_gdbarch_init): Don't call
9625 set_gdbarch_print_insn.
9626 * arc-tdep.c (arc_gdbarch_init): Likewise.
9627 * arch-utils.c: include dis-asm.h.
9628 (default_print_insn): New function.
9629 * arch-utils.h (default_print_insn): Declare.
9630 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9631 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9632 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9633 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9634 * frv-tdep.c (frv_gdbarch_init): Likewise.
9635 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9636 * gdbarch.sh (print_insn): Use default_print_insn.
9637 * gdbarch.c: Regenerated.
9638 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9639 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9640 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9641 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9642 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9643 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9644 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9645 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9646 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9647 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9648 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9649 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9650 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9651 * mt-tdep.c (mt_gdbarch_init): Likewise.
9652 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9653 * nios2-tdep.c (nios2_print_insn): Remove.
9654 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9655 * rx-tdep.c (rx_gdbarch_init): Likewise.
9656 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9657 * score-tdep.c (score_print_insn): Remove.
9658 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9659 * sh-tdep.c (sh_gdbarch_init): Likewise.
9660 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9661 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9662 * tic6x-tdep.c (tic6x_print_insn): Remove.
9663 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9664 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9665 * v850-tdep.c (v850_gdbarch_init): Likewise.
9666 * vax-tdep.c (vax_gdbarch_init): Likewise.
9667 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9668 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9669
9670 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9671
9672 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9673 (MIPS_FP0_REGNUM): Remove.
9674 (MIPS_FSR_REGNUM): Remove.
9675 (mips_fbsd_supply_fpregs): Use mips_regnum.
9676 (mips_fbsd_supply_gregs): Likewise.
9677 (mips_fbsd_collect_fpregs): Likewise.
9678 (mips_fbsd_collect_gregs): Likewise.
9679
9680 2017-05-23 John Baldwin <jhb@FreeBSD.org>
9681
9682 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9683 (getpfpregs_supplies): New function.
9684 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9685 getfpregs_supplies.
9686 (mips_fbsd_store_inferior_registers): Likewise.
9687
9688 2017-05-22 Pedro Alves <palves@redhat.com>
9689
9690 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9691 maintainer.
9692
9693 2017-05-22 Alan Hayward <alan.hayward@arm.com>
9694
9695 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9696 (store_register): Likewise.
9697 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9698 (get_decimal_float_return_value): Likewise.
9699 (do_ppc_sysv_return_value): Likewise.
9700 (ppc64_sysv_abi_push_integer): Likewise.
9701 (ppc64_sysv_abi_push_freg): Likewise.
9702 (ppc64_sysv_abi_return_value_base): Likewise.
9703 (ppc64_sysv_abi_return_value): Likewise.
9704 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9705 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9706 * rs6000-nat.c: Likewise.
9707 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9708 (rs6000_value_to_register): Likewise.
9709 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9710
9711 2017-05-21 Tom Tromey <tom@tromey.com>
9712
9713 PR rust/21466:
9714 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9715 arrays as "[T]", not "[T; ]".
9716
9717 2017-05-19 Tom Tromey <tom@tromey.com>
9718
9719 PR rust/21484:
9720 * rust-lang.c (exp_descriptor_rust): New function.
9721 (rust_language_defn): Use it.
9722 * p-lang.c (pascal_language_defn): Update.
9723 * opencl-lang.c (opencl_language_defn): Update.
9724 * objc-lang.c (objc_language_defn): Update.
9725 * m2-lang.c (m2_language_defn): Update.
9726 * language.h (struct language_defn)
9727 <la_watch_location_expression>: New member.
9728 * language.c (unknown_language_defn, auto_language_defn)
9729 (local_language_defn): Update.
9730 * go-lang.c (go_language_defn): Update.
9731 * f-lang.c (f_language_defn): Update.
9732 * d-lang.c (d_language_defn): Update.
9733 * c-lang.h (c_watch_location_expression): Declare.
9734 * c-lang.c (c_watch_location_expression): New function.
9735 (c_language_defn, cplus_language_defn, asm_language_defn)
9736 (minimal_language_defn): Use it.
9737 * breakpoint.c (watch_command_1): Call
9738 la_watch_location_expression.
9739 * ada-lang.c (ada_language_defn): Update.
9740
9741 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9742
9743 PR tui/21482
9744 * gdb_curses.h (NOMACROS): Define.
9745 (NCURSES_NOMACROS): Define.
9746
9747 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9748
9749 PR tui/21482
9750 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9751 arg to char *.
9752 * tui/tui-wingeneral.c (box_win): Likewise.
9753 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9754 (tui_show_source_line): Likewise.
9755 (tui_show_exec_info_content): Likewise.
9756
9757 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9758
9759 * sparc-tdep.c (sparc_structure_return_p)
9760 (sparc_arg_on_registers_p): New functions.
9761 (sparc32_store_arguments): Use them.
9762 * sparc64-tdep.c (sparc64_16_byte_align_p)
9763 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9764 Handle TYPE_CODE_ARRAY.
9765
9766 2017-05-17 Yao Qi <yao.qi@linaro.org>
9767
9768 * cli/cli-decode.c (add_alias_cmd): New function.
9769 * command.h (add_alias_cmd): Declare.
9770 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9771 instead call add_alias_cmd.
9772
9773 2017-05-17 Pedro Alves <palves@redhat.com>
9774
9775 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9776 (nat_makefile_frag): ... this. All references updated.
9777 * configure.ac: Likewise.
9778 * configure.nat: Likewise. Enhance comments.
9779 * configure: Regenerate.
9780
9781 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9782
9783 * procfs.c (procfs_create_inferior): Change prototype to match
9784 definition.
9785
9786 2017-05-13 Eli Zaretskii <eliz@gnu.org>
9787
9788 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9789 C++ compiler warning.
9790
9791 2017-05-12 Tom Tromey <tom@tromey.com>
9792
9793 PR rust/21483:
9794 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9795 recurse, just call value_struct_elt directly.
9796
9797 2017-05-12 Tom Tromey <tom@tromey.com>
9798
9799 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9800 OP_RUST_ARRAY>: Fix.
9801
9802 2017-05-12 Tom Tromey <tom@tromey.com>
9803
9804 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9805
9806 2017-05-09 Yao Qi <yao.qi@linaro.org>
9807
9808 * regcache.c: Include <forward_list>.
9809 (struct regcache_list): Remove.
9810 (current_regcache): Update.
9811 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9812 (regcache_thread_ptid_changed): Likewise.
9813 (registers_changed_ptid): Likewise.
9814 (current_regcache_size): Likewise.
9815
9816 2017-05-09 Yao Qi <yao.qi@linaro.org>
9817
9818 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9819 (current_regcache_size): New function.
9820 (current_regcache_test): New function.
9821 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9822
9823 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9824
9825 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9826 (print_gp_register_row): Use get_frame_register_value.
9827
9828 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9829
9830 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9831 (mips_supply_fpregset): Likewise.
9832 (mips64_supply_gregset): Likewise.
9833
9834 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9835
9836 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9837 regcache->raw_supply_zeroed.
9838
9839 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9840
9841 * configure.nat: Rearrange 'case' statements to match
9842 host before cpu.
9843
9844 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9845
9846 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9847 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9848 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9849 "@nat_extra_makefile_frag@".
9850 (Makefile): Remove dependency on "@frags@".
9851 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9852 (data-directory/Makefile): Likewise.
9853 * config/aarch64/linux.mh: Deleted; moved contents to
9854 "gdb/configure.nat".
9855 * config/alpha/alpha-linux.mh: Likewise.
9856 * config/alpha/nbsd.mh: Likewise.
9857 * config/arm/linux.mh: Likewise.
9858 * config/arm/nbsdelf.mh: Likewise.
9859 * config/i386/cygwin.mh: Likewise.
9860 * config/i386/cygwin64.mh: Likewise.
9861 * config/i386/darwin.mh: Likewise.
9862 * config/i386/fbsd.mh: Likewise.
9863 * config/i386/fbsd64.mh: Likewise.
9864 * config/i386/go32.mh: Likewise.
9865 * config/i386/i386gnu.mh: Likewise.
9866 * config/i386/i386sol2.mh: Likewise.
9867 * config/i386/linux.mh: Likewise.
9868 * config/i386/linux64.mh: Likewise.
9869 * config/i386/mingw.mh: Likewise.
9870 * config/i386/mingw64.mh: Likewise.
9871 * config/i386/nbsd64.mh: Likewise.
9872 * config/i386/nbsdelf.mh: Likewise.
9873 * config/i386/nto.mh: Likewise.
9874 * config/i386/obsd.mh: Likewise.
9875 * config/i386/obsd64.mh: Likewise.
9876 * config/i386/sol2-64.mh: Likewise.
9877 * config/ia64/linux.mh: Likewise.
9878 * config/m32r/linux.mh: Likewise.
9879 * config/m68k/linux.mh: Likewise.
9880 * config/m68k/nbsdelf.mh: Likewise.
9881 * config/m68k/obsd.mh: Likewise.
9882 * config/m88k/obsd.mh: Likewise.
9883 * config/mips/fbsd.mh: Likewise.
9884 * config/mips/linux.mh: Likewise.
9885 * config/mips/nbsd.mh: Likewise.
9886 * config/mips/obsd64.mh: Likewise.
9887 * config/pa/linux.mh: Likewise.
9888 * config/pa/nbsd.mh: Likewise.
9889 * config/pa/obsd.mh: Likewise.
9890 * config/powerpc/aix.mh: Likewise.
9891 * config/powerpc/fbsd.mh: Likewise.
9892 * config/powerpc/linux.mh: Likewise.
9893 * config/powerpc/nbsd.mh: Likewise.
9894 * config/powerpc/obsd.mh: Likewise.
9895 * config/powerpc/ppc64-linux.mh: Likewise.
9896 * config/powerpc/spu-linux.mh: Likewise.
9897 * config/s390/linux.mh: Likewise.
9898 * config/sh/nbsd.mh: Likewise.
9899 * config/sparc/fbsd.mh: Likewise.
9900 * config/sparc/linux.mh: Likewise.
9901 * config/sparc/linux64.mh: Likewise.
9902 * config/sparc/nbsd64.mh: Likewise.
9903 * config/sparc/nbsdelf.mh: Likewise.
9904 * config/sparc/obsd64.mh: Likewise.
9905 * config/sparc/sol2.mh: Likewise.
9906 * config/tilegx/linux.mh: Likewise.
9907 * config/vax/nbsdelf.mh: Likewise.
9908 * config/vax/obsd.mh: Likewise.
9909 * config/xtensa/linux.mh: Likewise.
9910 * config/i386/i386gnu.mn: New file, with excerpts from
9911 "config/i386/i386gnu.mh".
9912 * configure: Regenerate.
9913 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9914 *.mh files under "gdb/config".
9915 * configure.nat: New file, with contents from the
9916 "gdb/config/*/*.mh" files.
9917
9918 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9919
9920 * btrace.c (btrace_clear): Free insn vector.
9921
9922 2017-05-05 Pedro Alves <palves@redhat.com>
9923
9924 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9925 * configure: Regenerate.
9926
9927 2017-05-04 Pedro Alves <palves@redhat.com>
9928
9929 * Makefile.in (SFILES): Add progspace-and-thread.c.
9930 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9931 (COMMON_OBS): Add progspace-and-thread.o.
9932 * breakpoint.c: Include "progspace-and-thread.h".
9933 (update_inserted_breakpoint_locations)
9934 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9935 Use scoped_restore_current_pspace_and_thread.
9936 (create_std_terminate_master_breakpoint): Use
9937 scoped_restore_current_program_space.
9938 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9939 (print_breakpoint_location): Use
9940 scoped_restore_current_program_space.
9941 (bp_loc_is_permanent): Use
9942 scoped_restore_current_pspace_and_thread.
9943 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9944 (download_tracepoint_locations): Use
9945 scoped_restore_current_pspace_and_thread.
9946 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9947 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9948 (enum step_over_calls_kind): Moved from inferior.h.
9949 (class scoped_restore_current_thread): New class.
9950 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9951 declaration.
9952 (scoped_restore_current_thread): New class.
9953 * infcmd.c: Include "common/gdb_optional.h".
9954 (continue_1, proceed_after_attach): Use
9955 scoped_restore_current_thread.
9956 (notice_new_inferior): Use scoped_restore_current_thread.
9957 * inferior.c: Include "progspace-and-thread.h".
9958 (restore_inferior, save_current_inferior): Delete.
9959 (add_inferior_command, clone_inferior_command): Use
9960 scoped_restore_current_pspace_and_thread.
9961 * inferior.h (scoped_restore_current_inferior): New class.
9962 * infrun.c: Include "progspace-and-thread.h" and
9963 "common/gdb_optional.h".
9964 (follow_fork_inferior): Use
9965 scoped_restore_current_pspace_and_thread.
9966 (scoped_restore_exited_inferior): New class.
9967 (handle_vfork_child_exec_or_exit): Use
9968 scoped_restore_exited_inferior,
9969 scoped_restore_current_pspace_and_thread,
9970 scoped_restore_current_thread and scoped_restore.
9971 (fetch_inferior_event): Use scoped_restore_current_thread.
9972 * linespec.c (decode_line_full, decode_line_1): Use
9973 scoped_restore_current_program_space.
9974 * mi/mi-main.c: Include "progspace-and-thread.h".
9975 (exec_continue): Use scoped_restore_current_thread.
9976 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9977 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9978 * proc-service.c (ps_pglobal_lookup): Use
9979 scoped_restore_current_program_space.
9980 * progspace-and-thread.c: New file.
9981 * progspace-and-thread.h: New file.
9982 * progspace.c (release_program_space, clone_program_space): Use
9983 scoped_restore_current_program_space.
9984 (restore_program_space, save_current_program_space)
9985 (save_current_space_and_thread): Delete.
9986 (switch_to_program_space_and_thread): Moved to
9987 progspace-and-thread.c.
9988 * progspace.h (save_current_program_space)
9989 (save_current_space_and_thread): Delete declarations.
9990 (scoped_restore_current_program_space): New class.
9991 * remote.c (remote_btrace_maybe_reopen): Use
9992 scoped_restore_current_thread.
9993 * symtab.c: Include "progspace-and-thread.h".
9994 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9995 * thread.c (print_thread_info_1): Use
9996 scoped_restore_current_thread.
9997 (struct current_thread_cleanup): Delete.
9998 (do_restore_current_thread_cleanup)
9999 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10000 (scoped_restore_current_thread::~scoped_restore_current_thread):
10001 ... this new dtor.
10002 (make_cleanup_restore_current_thread): Rename/convert to ...
10003 (scoped_restore_current_thread::scoped_restore_current_thread):
10004 ... this new ctor.
10005 (thread_apply_all_command): Use scoped_restore_current_thread.
10006 (thread_apply_command): Use scoped_restore_current_thread.
10007 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10008 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10009
10010 2017-05-04 Pedro Alves <palves@redhat.com>
10011
10012 * thread.c (make_cleanup_restore_current_thread): Move
10013 find_thread_ptid call before the is_stopped call. Assert that the
10014 thread is found. Replace is_stopped call by checking the thread's
10015 state directly. Remove unnecessary NULL-thread check.
10016
10017 2017-05-04 Pedro Alves <palves@redhat.com>
10018
10019 * corelow.c (thread_section_name): New class.
10020 (get_core_register_section, get_core_siginfo): Use it.
10021
10022 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
10023
10024 * corelow.c (sniff_core_bfd): Remove extra semicolon.
10025 (get_core_register_section): Remove xfree of NULL pointer.
10026
10027 2017-05-03 Alan Hayward <alan.hayward@arm.com>
10028
10029 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10030 * regcache.c (regcache::raw_supply_zeroed): New function.
10031 * regcache.h (regcache::raw_supply_zeroed): New declaration.
10032
10033 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
10034
10035 * gdbarch.sh: Remove commented out definition of
10036 TARGET_CHAR_BIT.
10037 * gdbarch.h: Re-generate.
10038
10039 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
10040
10041 * configure: Regenerate.
10042
10043 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
10044
10045 * solib-target.c (solib_target_relocate_section_addresses):
10046 Remove num_section_bases, num_bases, segment_bases variables.
10047
10048 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10049
10050 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10051
10052 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10053
10054 * solib-target.c: Include <vector>
10055 (struct lm_info_target) <~lm_info_target>: Remove.
10056 <segment_bases, section_bases>: Change type to
10057 std::vector<CORE_ADDR>.
10058 (library_list_start_segment, library_list_start_section,
10059 library_list_end_library,
10060 solib_target_relocate_section_addresses): Adjust.
10061
10062 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10063
10064 * gdbarch.sh (software_single_step): Change return type to
10065 std::vector<CORE_ADDR>.
10066 * gdbarch.c, gdbarch.h: Re-generate.
10067 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10068 Adjust.
10069 (arm_deal_with_atomic_sequence_raw): Adjust.
10070 (thumb_get_next_pcs_raw): Adjust.
10071 (arm_get_next_pcs_raw): Adjust.
10072 (arm_get_next_pcs): Adjust.
10073 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10074 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10075 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10076 (alpha_software_single_step): Adjust.
10077 * alpha-tdep.h (alpha_software_single_step): Adjust.
10078 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10079 * arm-tdep.c (arm_software_single_step): Adjust.
10080 (arm_breakpoint_kind_from_current_state): Adjust.
10081 * arm-tdep.h (arm_software_single_step): Adjust.
10082 * breakpoint.c (insert_single_step_breakpoint): Adjust.
10083 * cris-tdep.c (cris_software_single_step): Adjust.
10084 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10085 (micromips_deal_with_atomic_sequence): Adjust.
10086 (deal_with_atomic_sequence): Adjust.
10087 (mips_software_single_step): Adjust.
10088 * mips-tdep.h (mips_software_single_step): Adjust.
10089 * moxie-tdep.c (moxie_software_single_step): Adjust.
10090 * nios2-tdep.c (nios2_software_single_step): Adjust.
10091 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10092 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10093 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10094 * s390-linux-tdep.c (s390_software_single_step): Adjust.
10095 * sparc-tdep.c (sparc_software_single_step): Adjust.
10096 * spu-tdep.c (spu_software_single_step): Adjust.
10097 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10098
10099 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
10100
10101 * gdbarch.sh: Use semi-colon as field separator instead of colon.
10102 * gdbarch.h: Re-generate.
10103
10104 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10105
10106 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10107 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10108 * python/py-instruction.c, python/py-instruction.h: New file.
10109 * python/py-record.c: Add py-instruction.h include.
10110 (gdbpy_initialize_record): Make gdb.Instruction a super class of
10111 gdb.RecordInstruction.
10112 * python/python-internal.h: Add gdbpy_initialize_instruction
10113 declaration.
10114 * python/python.c (do_start_initialization): Add
10115 gdbpy_initialize_instruction.
10116
10117 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10118
10119 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10120 Remove.
10121 (btrace_func_from_recpy_func): New function.
10122 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10123 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10124 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10125 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10126 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10127 Also, use new helper functions.
10128 (btpy_list_item): Use new helper functions.
10129 (recpy_bt_function_call_history): Use new type name.
10130 (btpy_call_getset): Remove.
10131 (gdbpy_initialize_btrace): Remove code to initialize
10132 gdb.BtraceFunctionCall.
10133 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10134 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10135 recpy_bt_func_prev, recpy_bt_func_next): New export.
10136 * python/py-record.c (recpy_func_type): New static object.
10137 (recpy_func_new, recpy_func_level, recpy_func_symbol,
10138 recpy_func_instructions, recpy_func_up, recpy_func_prev,
10139 recpy_func_next): New function.
10140 (recpy_element_hash, recpy_element_richcompare): Updated comment.
10141 (recpy_func_getset): New static object.
10142 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10143 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10144
10145 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10146
10147 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10148 (btpy_object, btpy_insn_type, btpy_new): Remove.
10149 (btpy_list_object): Use gdb.RecordInstruction type instead of
10150 gdb.BtraceInstruction type.
10151 (btrace_insn_from_recpy_insn): New function.
10152 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10153 btpy_new.
10154 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10155 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10156 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10157 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10158 instead of btpy_object.
10159 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10160 btpy_insn_data, btpy_insn_decode): Rename to ...
10161 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10162 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10163 recpy_bt_insn_decode): This. Also, use new helper functions.
10164 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10165 recpy_insn_type.
10166 (btpy_insn_getset): Remove.
10167 (gdbpy_initialize_btrace): Remove code to initialize
10168 gdb.BtraceInstruction. Use recpy_element_object.
10169 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10170 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10171 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10172 * python/py-record.c (recpy_insn_type): New static object.
10173 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10174 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10175 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10176 New function.
10177 (recpy_insn_getset): New static object.
10178 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10179 * python/py-record.h (recpy_element_object): New typedef.
10180 (recpy_insn_type, recpy_insn_new): New export.
10181
10182 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10183
10184 * py-record-btrace.c (btpy_insn_new): Removed.
10185 (btpy_insn_or_gap_new): New function.
10186 (btpy_insn_error): Removed.
10187 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10188 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10189 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10190 btpy_insn_or_gap_new instead of btpy_insn_new.
10191 (btpy_insn_getset): Remove btpy_insn_error.
10192 * py-record.c (recpy_gap_type): New static object.
10193 (recpy_gap_object): New typedef.
10194 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10195 recpy_gap_reason_string): New function.
10196 (recpy_gap_getset): New static object.
10197 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10198 * py-record.h (recpy_gap_new): New export.
10199
10200 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10201
10202 * python/py-record.c (recpy_ptid): Remove.
10203 (recpy_record_getset): Remove recpy_ptid.
10204
10205 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10206
10207 * btrace.c (btrace_fetch): Set inferior_ptid.
10208 * python/py-record-btrace.c: Add "py-record.h" include.
10209 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10210 recpy_bt_end, recpy_bt_instruction_history,
10211 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10212 in gdb.Record object instead of current ptid.
10213 * python/py-record.c: Include new "py-record.h" file.
10214 (recpy_record_object): Moved to py-record.h.
10215 * python/py-record.h: New file.
10216
10217 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
10218
10219 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10220 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10221 indentation.
10222
10223 2017-05-01 Joel Brobecker <brobecker@adacore.com>
10224
10225 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10226 the past maintainers section.
10227
10228 2017-04-28 Yao Qi <yao.qi@linaro.org>
10229
10230 * infcmd.c (get_return_value): Use regcache ctor, and remove
10231 cleanup.
10232
10233 2017-04-28 Yao Qi <yao.qi@linaro.org>
10234 Pedro Alves <palves@redhat.com>
10235
10236 * regcache.c (regcache::regcache): New tag dispatch ctor.
10237 (do_cooked_read): Moved above.
10238 (regcache_dup): Use the tag dispatch ctor..
10239 * regcache.h (regcache): Declare ctor, delete copy ctor and
10240 assignment operator, remove friend regcache_dup.
10241
10242 2017-04-28 Yao Qi <yao.qi@linaro.org>
10243
10244 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10245 call method save instead of regcache_cpy.
10246 * regcache.h (struct regcache): Make regcache_dup a friend.
10247
10248 2017-04-28 Yao Qi <yao.qi@linaro.org>
10249
10250 * regcache.c (struct regcache): Move to regcache.h
10251 (regcache::arch): New method.
10252 (regcache_get_ptid): Update.
10253 (get_regcache_arch): Call arch method.
10254 (get_regcache_aspace): Call method aspace.
10255 (register_buffer): Change it to method.
10256 (regcache_save): Change it to regcache::save.
10257 (regcache_restore): Likewise.
10258 (regcache_cpy_no_passthrough): Remove the declaration.
10259 (regcache_cpy): Call methods restore and cpy_no_passthrough.
10260 (regcache_cpy_no_passthrough): Change it to method
10261 cpy_no_passthrough.
10262 (regcache_register_status): Change it to method
10263 get_register_status.
10264 (regcache_invalidate): Change it to method invalidate.
10265 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10266 (regcache_raw_update): Change it to method raw_update.
10267 (regcache_raw_read): Likewise.
10268 (regcache_raw_read_signed): Likewise.
10269 (regcache_raw_read_unsigned): Likewise.
10270 (regcache_raw_write_signed): Likewise.
10271 (regcache_raw_write_unsigned): Likewise.
10272 (regcache_cooked_read): Likewise.
10273 (regcache_cooked_read_value): Likewise.
10274 (regcache_cooked_read_signed): Likewise.
10275 (regcache_cooked_read_unsigned): Likewise.
10276 (regcache_cooked_write_signed): Likewise.
10277 (regcache_cooked_write_unsigned): Likewise.
10278 (regcache_raw_set_cached_value): Likewise.
10279 (regcache_raw_write): Likewise.
10280 (regcache_cooked_write): Likewise.
10281 (regcache_xfer_part): Likewise.
10282 (regcache_raw_read_part): Likewise.
10283 (regcache_raw_write_part): Likewise.
10284 (regcache_cooked_read_part): Likewise.
10285 (regcache_cooked_write_part): Likewise.
10286 (regcache_raw_supply): Likewise.
10287 (regcache_raw_collect): Likewise.
10288 (regcache_transfer_regset): Likewise.
10289 (regcache_supply_regset): Likewise.
10290 (regcache_collect_regset): Likewise.
10291 (regcache_debug_print_register): Likewise.
10292 (enum regcache_dump_what): Move it to regcache.h.
10293 (regcache_dump): Change it to method dump.
10294 * regcache.h (enum regcache_dump_what): New.
10295 (class regcache): New.
10296 * target.c (target_fetch_registers): Call method
10297 debug_print_register.
10298 (target_store_registers): Likewise.
10299
10300 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10301
10302 * windows-nat.c (struct lm_info_windows): Initialize field.
10303 (windows_make_so): Allocate lm_info_windows with new.
10304 (windows_free_so): Free lm_info_windows with delete.
10305
10306 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10307
10308 * solib-darwin.c (struct lm_info_darwin): Initialize field.
10309 (darwin_current_sos): Allocate lm_info_darwin with new, remove
10310 cleanup.
10311 (darwin_free_so): Free lm_info_darwin with delete.
10312
10313 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10314
10315 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
10316 <l_addr_p>: Change type to bool.
10317 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
10318 (svr4_free_so): Free lm_info_svr4 with delete.
10319 (svr4_copy_library_list): Replace memcpy with call to copy
10320 constructor.
10321 (library_list_start_library, svr4_default_sos): Allocate
10322 lm_info_svr4 with new.
10323
10324 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10325
10326 * solib-target.c (struct lm_info_target): Add destructor,
10327 initialize fields.
10328 <name>: Change type to std::string.
10329 (library_list_start_library): Allocate lm_info_target with new.
10330 (solib_target_free_library_list): Free lm_info_target with
10331 delete.
10332 (solib_target_current_sos): Adapt to std::string.
10333 (solib_target_free_so): Free lm_info_target with delete.
10334
10335 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10336
10337 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
10338 fields.
10339 (frv_current_sos): Allocate lm_info_frv with new.
10340 (frv_relocate_main_executable): Free lm_info_frv with delete,
10341 allocate with new.
10342 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
10343
10344 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10345
10346 * solib-frv.c (struct lm_info_frv): Fix indentation.
10347
10348 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10349
10350 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
10351 map field.
10352 (dsbt_current_sos): Allocate lm_info_dsbt with new.
10353 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
10354 and allocate with new.
10355 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
10356
10357 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10358
10359 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
10360 <filename, member_name>: Change type to std::string.
10361 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
10362 (library_list_start_library): Allocate lm_info_aix with new.
10363 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
10364 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10365 with copy constructor.
10366
10367 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10368
10369 * solist.h (struct lm_info): Remove.
10370 (struct lm_info_base): New class.
10371 (struct so_list) <lm_info>: Change type to lm_info_base *.
10372 * nto-tdep.c (struct lm_info): Remove.
10373 (lm_addr): Adjust.
10374 * solib-aix.c (struct lm_info): Rename to ...
10375 (struct lm_info_aix): ... this. Extend lm_info_base.
10376 (lm_info_p): Rename to ...
10377 (lm_info_aix_p): ... this, and adjust.
10378 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10379 solib_aix_parse_libraries, library_list_start_library,
10380 solib_aix_free_library_list, solib_aix_parse_libraries,
10381 solib_aix_get_library_list,
10382 solib_aix_relocate_section_addresses, solib_aix_free_so,
10383 solib_aix_get_section_offsets,
10384 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10385 Adjust.
10386 (struct solib_aix_inferior_data) <library_list>: Adjust.
10387 * solib-darwin.c (struct lm_info): Rename to ...
10388 (struct lm_info_darwin): ... this. Extend lm_info_base.
10389 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10390 * solib-dsbt.c (struct lm_info): Rename to ...
10391 (struct lm_info_dsbt): ... this. Extend lm_info_base.
10392 (struct dsbt_info) <main_executable_lm_info): Adjust.
10393 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10394 dsbt_relocate_section_addresses): Adjust.
10395 * solib-frv.c (struct lm_info): Rename to ...
10396 (struct lm_info_frv): ... this. Extend lm_info_base.
10397 (main_executable_lm_info): Adjust.
10398 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10399 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10400 find_canonical_descriptor_in_load_object,
10401 frv_fdpic_find_canonical_descriptor): Adjust.
10402 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10403 to lm_info_svr4.
10404 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10405 svr4_clear_so, svr4_copy_library_list,
10406 library_list_start_library, svr4_default_sos, svr4_read_so_list,
10407 svr4_current_sos, svr4_fetch_objfile_link_map,
10408 solist_update_incremental): Adjust.
10409 * solib-svr4.h (struct lm_info_svr4): Move here from
10410 solib-svr4.c.
10411 * solib-target.c (struct lm_info): Rename to ...
10412 (struct lm_info_target): ... this. Extend lm_info_base.
10413 (lm_info_p): Rename to ...
10414 (lm_info_target_p): ... this.
10415 (solib_target_parse_libraries, library_list_start_segment,
10416 library_list_start_section, library_list_start_library,
10417 library_list_end_library, solib_target_free_library_list,
10418 solib_target_current_sos, solib_target_free_so,
10419 solib_target_relocate_section_addresses): Adjust.
10420 * windows-nat.c (struct lm_info): Rename to ...
10421 (struct lm_info_windows): ... this. Extend lm_info_base.
10422 (windows_make_so, handle_load_dll, handle_unload_dll,
10423 windows_xfer_shared_libraries): Adjust.
10424
10425 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
10426
10427 * solib-darwin.c (struct darwin_so_list): Remove.
10428 (darwin_current_sos): Allocate an so_list object instead of a
10429 darwin_so_list, separately allocate an lm_info object.
10430 (darwin_free_so): Free lm_info.
10431
10432 2017-04-28 John Baldwin <jhb@FreeBSD.org>
10433
10434 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10435 with fprintf_filtered.
10436
10437 2017-04-28 Yao Qi <yao.qi@linaro.org>
10438
10439 * regcache.c (regcache::regcache): New function.
10440 (regcache::~regcache): New function.
10441 (regcache_xmalloc_1): Remove.
10442 (regcache_xmalloc): Call new regcache.
10443 (regcache_xfree): Call delete regcache.
10444 (get_thread_arch_aspace_regcache): Call new regcache.
10445
10446 2017-04-28 Yao Qi <yao.qi@linaro.org>
10447
10448 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10449 lwp instead of ptid_get_lwp.
10450
10451 2017-04-28 Yao Qi <yao.qi@linaro.org>
10452
10453 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10454 lwp_info instead of getting from inferior_ptid.
10455
10456 2017-04-27 Keith Seitz <keiths@redhat.com>
10457
10458 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10459 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10460 (CV_CONVERSION_BADNESS): Define.
10461 (rank_one_type): Remove overly restrictive rvalue reference
10462 rank checks.
10463 Add cv-qualifier checks and subranks for type equality.
10464 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10465 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10466 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10467
10468 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
10469
10470 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10471 count when creating the object.
10472
10473 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
10474 Ulrich Weigand <uweigand@de.ibm.com>
10475
10476 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10477 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10478 is used in AIX.
10479 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10480 (process_xcoff_symbol): Likewise.
10481 (scan_xcoff_symtab): Likewise.
10482
10483 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10484
10485 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10486 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10487 (ia64_access_reg): Use get_frame_register_unsigned.
10488 (ia64_access_rse_reg): Likewise.
10489 (ia64_libunwind_frame_prev_register): Likewise.
10490
10491 2017-04-26 Jiong Wang <jiong.wang@arm.com>
10492
10493 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10494 * gdbarch.c: Regenerated.
10495 * gdbarch.h: Regenerated.
10496 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10497 visibility external.
10498 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10499 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10500 (enum cfa_how_kind): Move to ...
10501 (struct dwarf2_frame_state_reg_info): Likewise.
10502 (struct dwarf2_frame_state): Likewise.
10503 * dwarf2-frame.h: ... here.
10504 (dwarf2_frame_state_alloc_regs): New declaration.
10505 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10506 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10507
10508 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10509
10510 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10511 regcache_raw_read_unsigned.
10512 (xtensa_pseudo_register_write): Likewise.
10513
10514 2017-04-26 Alan Hayward <alan.hayward@arm.com>
10515
10516 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10517 (nds32_pseudo_register_write): Likewise.
10518
10519 2017-04-25 Yao Qi <yao.qi@linaro.org>
10520
10521 * regcache.c (struct regcache) <readonly_p>: Change its type
10522 to bool.
10523 (regcache_xmalloc_1): Update parameter type and callers update.
10524
10525 2017-04-25 Yao Qi <yao.qi@linaro.org>
10526
10527 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10528 set_gdbarch_wchar_bit.
10529 * arm-tdep.c (arm_gdbarch_init): Likewise.
10530
10531 2017-04-25 Pedro Alves <palves@redhat.com>
10532
10533 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10534 (BothAreRelocatable, memcopy, memmove): Don't define.
10535 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10536 macros.
10537
10538 2017-04-25 Pedro Alves <palves@redhat.com>
10539
10540 * common/common-defs.h: Include "common/poison.h".
10541 * common/function-view.h: (Not, Or, Requires): Move to traits.h
10542 and adjust.
10543 * common/poison.h: New file.
10544 * common/traits.h: Include <type_traits>.
10545 (Not, Or, Requires): New, moved from common/function-view.h.
10546
10547 2017-04-25 Pedro Alves <palves@redhat.com>
10548
10549 * breakpoint.h (struct breakpoint): In-class initialize all
10550 fields. Make boolean fields "bool".
10551 * breakpoint.c (init_raw_breakpoint_without_location): Remove
10552 memset call and initializations no longer necessary.
10553
10554 2017-04-25 Pedro Alves <palves@redhat.com>
10555
10556 * btrace.c (pt_btrace_insn_flags): Change parameter type to
10557 reference.
10558 (pt_btrace_insn): New function.
10559 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10560
10561 2017-04-25 Pedro Alves <palves@redhat.com>
10562
10563 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
10564 "base" field and inherit from "bp_location" instead. Add
10565 non-default ctor.
10566 (allocate_location_exception): Use new non-default ctor.
10567 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10568 (init_bp_location): Convert to ...
10569 (bp_location::bp_location): ... this new ctor, and remove memset
10570 call.
10571 (base_breakpoint_allocate_location): Use the new non-default ctor.
10572 * breakpoint.h (bp_location): Now a class. Declare default and
10573 non-default ctors. In-class initialize all members.
10574 (init_bp_location): Remove declaration.
10575
10576 2017-04-25 Pedro Alves <palves@redhat.com>
10577
10578 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10579 assignment operator.
10580
10581 2017-04-24 Yao Qi <yao.qi@linaro.org>
10582
10583 * doublest.c (convert_doublest_to_floatformat): Call
10584 floatformat_totalsize_bytes.
10585
10586 2017-04-22 Tom Tromey <tom@tromey.com>
10587
10588 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10589 ui_out_emit_list.
10590 * stack.c (print_frame): Use ui_out_emit_list.
10591 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10592 ui_out_emit_list.
10593 * mi/mi-main.c (print_one_inferior)
10594 (mi_cmd_data_list_register_names)
10595 (mi_cmd_data_list_register_values, mi_cmd_list_features)
10596 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10597 ui_out_emit_list.
10598 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10599 (mi_output_solib_attribs): Use ui_out_emit_list,
10600 ui_out_emit_tuple.
10601 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10602 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10603 (mi_cmd_stack_list_args, list_args_or_locals): Use
10604 ui_out_emit_list.
10605 * disasm.c (do_assembly_only): Use ui_out_emit_list.
10606 * breakpoint.c (print_solib_event, output_thread_groups): Use
10607 ui_out_emit_list.
10608
10609 2017-04-22 Tom Tromey <tom@tromey.com>
10610
10611 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10612 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10613 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10614
10615 2017-04-22 Tom Tromey <tom@tromey.com>
10616
10617 * tracepoint.c (tvariables_info_1)
10618 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10619
10620 2017-04-22 Tom Tromey <tom@tromey.com>
10621
10622 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10623 annotate_arg_emitter.
10624 * breakpoint.c (print_mention_watchpoint)
10625 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10626 * annotate.h (struct annotate_arg_emitter): New.
10627
10628 2017-04-22 Tom Tromey <tom@tromey.com>
10629
10630 * record-btrace.c (record_btrace_insn_history)
10631 (record_btrace_insn_history_range, record_btrace_call_history)
10632 (record_btrace_call_history_range): Use ui_out_emit_tuple.
10633 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10634 ui_out_emit_tuple.
10635 * stack.c (print_frame_info): Use ui_out_emit_tuple.
10636 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10637 * skip.c (skip_info): Use ui_out_emit_tuple.
10638 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10639 * progspace.c (print_program_space): Use ui_out_emit_tuple.
10640 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10641 * osdata.c (info_osdata): Use ui_out_emit_tuple.
10642 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10643 ui_out_emit_tuple.
10644 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10645 (output_register, mi_cmd_data_read_memory)
10646 (mi_cmd_data_read_memory_bytes, mi_load_progress)
10647 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10648 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10649 Use ui_out_emit_tuple.
10650 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10651 ui_out_emit_tuple.
10652 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10653 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10654 * linux-thread-db.c (info_auto_load_libthread_db): Use
10655 ui_out_emit_tuple.
10656 * inferior.c (print_inferior): Use ui_out_emit_tuple.
10657 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10658 * disasm.c (do_mixed_source_and_assembly_deprecated)
10659 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10660 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10661 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10662 * breakpoint.c (print_one_breakpoint_location)
10663 (print_one_breakpoint): Use ui_out_emit_tuple.
10664 * auto-load.c (print_script, info_auto_load_cmd): Use
10665 ui_out_emit_tuple.
10666 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10667
10668 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
10669
10670 * thread.c (print_thread_info_1): Remove dead code.
10671
10672 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10673
10674 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10675 GDB_SELF_TEST.
10676 * arm-tdep.c (selftests::arm_record_test): Likewise.
10677
10678 2017-04-21 Yao Qi <yao.qi@linaro.org>
10679
10680 * regcache.c (regcache_restore): Remove argument 2. Replace
10681 argument 3 with regcache. Get register status from
10682 src->register_status and get register contents from
10683 register_buffer (src, regnum).
10684 (regcache_cpy): Update.
10685
10686 2017-04-19 Pedro Alves <palves@redhat.com>
10687
10688 * gdbthread.h (thread): Add missing closing parenthesis in
10689 comment.
10690
10691 2017-04-19 Pedro Alves <palves@redhat.com>
10692
10693 * common/refcounted-object.h: New file.
10694 * gdbthread.h: Include "common/refcounted-object.h".
10695 (thread_info): Inherit from refcounted_object and add comments.
10696 (thread_info::incref, thread_info::decref)
10697 (thread_info::m_refcount): Delete.
10698 (thread_info::deletable): Use the refcounted_object::refcount()
10699 method.
10700 * inferior.c (current_inferior_): Add comment.
10701 (set_current_inferior): Increment/decrement refcounts.
10702 (prune_inferiors, remove_inferior_command): Skip inferiors marked
10703 not-deletable instead of comparing with the current inferior.
10704 (initialize_inferiors): Increment the initial inferior's refcount.
10705 * inferior.h (struct inferior): Forward declare.
10706 Include "common/refcounted-object.h".
10707 (current_inferior, set_current_inferior): Move declaration to
10708 before struct inferior's definition, and fix comment.
10709 (inferior): Inherit from refcounted_object. Add comments.
10710 * thread.c (switch_to_thread_no_regs): Reference the thread's
10711 inferior pointer directly instead of doing a ptid lookup.
10712 (switch_to_no_thread): New function.
10713 (switch_to_thread(thread_info *)): New function, factored out
10714 from ...
10715 (switch_to_thread(ptid_t)): ... this.
10716 (restore_current_thread): Delete.
10717 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10718 fields, and add 'inf' field.
10719 (do_restore_current_thread_cleanup): Check whether old->inf is
10720 alive instead of looking up an inferior by ptid. Use
10721 switch_to_thread and switch_to_no_thread.
10722 (restore_current_thread_cleanup_dtor): Use old->inf directly
10723 instead of lookup up an inferior by id. Decref the inferior.
10724 Don't restore 'removable'.
10725 (make_cleanup_restore_current_thread): Same the inferior pointer
10726 in old, instead of the inferior number. Incref the inferior.
10727 Don't save/clear 'removable'.
10728
10729 2017-04-19 Pedro Alves <palves@redhat.com>
10730
10731 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10732 unittests/scoped_restore-selftests.c.
10733 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10734 * common/scoped_restore.h (scoped_restore_base): Make "class".
10735 (scoped_restore_base::release): New public method.
10736 (scoped_restore_base::scoped_restore_base): New protected ctor.
10737 (scoped_restore_base::m_saved_var): New protected field.
10738 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10739 scoped_restore_base base class instead of m_saved_var directly.
10740 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10741 (scoped_restore_tmpl::scoped_restore_tmpl(const
10742 scoped_restore_tmpl<T>&)): Likewise.
10743 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10744 method.
10745 (scoped_restore_tmpl::saved_var): New method.
10746 (scoped_restore_tmpl::m_saved_var): Delete.
10747 * inferior.h (inferior::detaching): Now a bool.
10748 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10749 cleanup.
10750 * unittests/scoped_restore-selftests.c: New file.
10751
10752 2017-04-19 Pedro Alves <palves@redhat.com>
10753
10754 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10755 Re-sort in alphabetic order.
10756
10757 2017-04-18 Pedro Alves <palves@redhat.com>
10758
10759 * xml-support.c (obstack_xml_printf): Delete.
10760 * xml-support.h (obstack_xml_printf): Delete.
10761
10762 2017-04-18 Pedro Alves <palves@redhat.com>
10763
10764 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10765 vdebug, verror, body_text, start_element, end_element, name,
10766 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10767 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10768 is_xinclude>: Make private and add m_ prefix.
10769 (gdb_xml_parser::body_text): New method, based on ...
10770 (gdb_xml_body_text): ... this. Adjust.
10771 (gdb_xml_parser::vdebug): New method, based on ...
10772 (gdb_xml_debug): ... this. Adjust.
10773 (gdb_xml_parser::verror): New method, based on ...
10774 (gdb_xml_error): ... this. Adjust.
10775 (gdb_xml_parser::start_element): New method, based on ...
10776 (gdb_xml_start_element): ... this. Adjust.
10777 (gdb_xml_start_element_wrapper): Defer to
10778 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10779 (gdb_xml_parser::end_element): New method, based on ...
10780 (gdb_xml_end_element_wrapper): ... this. Adjust.
10781 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10782 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10783 (gdb_xml_parser::use_dtd): New method, based on ...
10784 (gdb_xml_use_dtd): ... this. Adjust.
10785 (gdb_xml_parser::parse): New method, based on ...
10786 (gdb_xml_parse): ... this. Adjust.
10787 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10788 (xinclude_start_include): Adjust to call the parser's name method.
10789 (xml_xinclude_default, xml_xinclude_start_doctype)
10790 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10791 method.
10792 (xml_process_xincludes): Adjust to call parser methods.
10793 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10794 declarations.
10795
10796 2017-04-18 Pedro Alves <palves@redhat.com>
10797
10798 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10799 gdb::optional<std::string>.
10800 * xml-support.c: Include <string>.
10801 (scope_level::scope_level(scope_level &&))
10802 (scope_level::~scope_level): Delete.
10803 (scope_level::body): Now a std::string.
10804 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10805 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10806 parameter.
10807 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10808 (xinclude_parsing_data::output): Now a std::string reference.
10809 (xinclude_start_include): Adjust.
10810 (xml_xinclude_default): Adjust.
10811 (xml_process_xincludes): Add 'output' parameter, and return bool.
10812 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10813 and return bool.
10814 * xml-tdesc.c: Include <unordered_map> and <string>.
10815 (tdesc_xml_cache): Delete.
10816 (tdesc_xml_cache_s): Delete.
10817 (xml_cache): Now an std::unordered_map.
10818 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10819 (target_fetch_description_xml): Change return type to
10820 gdb::optional<std::string>, and adjust.
10821 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10822 (target_fetch_description_xml): Change return type to
10823 gdb::optional<std::string>.
10824
10825 2017-04-18 Pedro Alves <palves@redhat.com>
10826
10827 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10828 unittests/optional-selftests.c.
10829 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10830 * unittests/optional-selftests.c: New file.
10831 * unittests/optional/assignment/1.cc: New file.
10832 * unittests/optional/assignment/2.cc: New file.
10833 * unittests/optional/assignment/3.cc: New file.
10834 * unittests/optional/assignment/4.cc: New file.
10835 * unittests/optional/assignment/5.cc: New file.
10836 * unittests/optional/assignment/6.cc: New file.
10837 * unittests/optional/assignment/7.cc: New file.
10838 * unittests/optional/cons/copy.cc: New file.
10839 * unittests/optional/cons/default.cc: New file.
10840 * unittests/optional/cons/move.cc: New file.
10841 * unittests/optional/cons/value.cc: New file.
10842 * unittests/optional/in_place.cc: New file.
10843 * unittests/optional/observers/1.cc: New file.
10844 * unittests/optional/observers/2.cc: New file.
10845
10846 2017-04-18 Pedro Alves <palves@redhat.com>
10847
10848 * common/gdb_optional.h: Include common/traits.h.
10849 (in_place_t): New type.
10850 (in_place): New constexpr variable.
10851 (optional::optional): Remove member initialization of
10852 m_instantiated.
10853 (optional::optional(in_place_t...)): New constructor.
10854 (optional::~optional): Use reset.
10855 (optional::optional(const optional&)): New.
10856 (optional::optional(const optional&&)): New.
10857 (optional::optional(T &)): New.
10858 (optional::optional(T &&)): New.
10859 (operator::operator=(const optional &)): New.
10860 (operator::operator=(optional &&)): New.
10861 (operator::operator= (const T &))
10862 (operator::operator= (T &&))
10863 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10864 (operator::reset): New.
10865 (operator::m_instantiated):: Add in-class initializer.
10866 * common/traits.h: Include <type_traits>.
10867 (struct And): New types.
10868
10869 2017-04-18 Pedro Alves <palves@redhat.com>
10870
10871 * xml-support.c: Include <vector>.
10872 (scope_level::scope_level(const gdb_xml_element *))
10873 (scope_level::scope_level(scope_level&&)): New.
10874 (scope_level::~scope_level): New.
10875 (scope_level_s): Delete.
10876 (gdb_xml_parser::scopes): Now a std::vector.
10877 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10878 Use std::vector.
10879 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10880 scope cleanup code.
10881 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10882 of the scopes member. Use std::vector::emplace_back.
10883
10884 2017-04-18 Pedro Alves <palves@redhat.com>
10885
10886 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10887 a bool.
10888 (gdb_xml_end_element): Change type of first parameter.
10889 (gdb_xml_cleanup): Rename to ...
10890 (gdb_xml_parser::~gdb_xml_parser): ... this.
10891 (gdb_xml_create_parser_and_cleanup): Delete with ...
10892 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10893 to this new ctor.
10894 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10895 using gdb_xml_create_parser_and_cleanup.
10896 (xinclude_parsing_data): Add ctor/dtor.
10897 (xml_xinclude_cleanup): Delete.
10898 (xml_process_xincludes): Create a local xinclude_parsing_data
10899 instead of heap-allocating one. Create a local gdb_xml_parser
10900 instead of heap-allocating one with
10901 gdb_xml_create_parser_and_cleanup.
10902
10903 2017-04-18 John Baldwin <jhb@FreeBSD.org>
10904
10905 PR threads/20743
10906 * fbsd-nat.c (resume_one_thread_cb): Remove.
10907 (resume_all_threads_cb): Remove.
10908 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10909 iterate_over_threads.
10910
10911 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10912
10913 * NEWS: Create a new section for the next release branch.
10914 Rename the section of the current branch, now that it has
10915 been cut.
10916
10917 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10918
10919 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10920 * version.in: Bump version to 8.0.50.DATE-git.
10921
10922 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10923
10924 PR gdb/21385
10925 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10926 independently of the host, and fix build breakage on Cygwin.
10927
10928 2017-04-13 Pedro Alves <palves@redhat.com>
10929
10930 * inferior.c (free_inferior): Convert to ...
10931 (inferior::~inferior): ... this dtor.
10932 (inferior::inferior): New ctor, factored out from ...
10933 (add_inferior_silent): ... here. Allocate the inferior with a new
10934 expression.
10935 (delete_inferior): Call delete instead of free_inferior.
10936 * inferior.h (gdb_environ, continuation): Forward declare.
10937 (inferior): Now a class. Add in-class initialization to all
10938 members. Make boolean fields bool, except 'detaching'.
10939 (inferior::inferior): New explicit ctor.
10940 (inferior::~inferior): New.
10941
10942 2017-04-13 Pedro Alves <palves@redhat.com>
10943
10944 * inferior.c (init_inferior_list): Delete.
10945 * inferior.h (init_inferior_list): Delete.
10946
10947 2017-04-13 Pedro Alves <palves@redhat.com>
10948
10949 PR threads/13217
10950 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10951 (top level): Call it twice, with different thread sets.
10952
10953 2017-04-13 Pedro Alves <palves@redhat.com>
10954
10955 * thread.c: Include <algorithm>.
10956 (thread_array_cleanup): Delete.
10957 (scoped_inc_dec_ref): New class.
10958 (live_threads_count): New function.
10959 (set_thread_refcount): Delete.
10960 (tp_array_compar_ascending): Now a bool.
10961 (tp_array_compar): Convert to a std::sort comparison function.
10962 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10963 and live_threads_count.
10964
10965 2017-04-13 Pedro Alves <palves@redhat.com>
10966
10967 * infrun.c (follow_fork_inferior): Also switch the current
10968 inferior.
10969
10970 2017-04-13 Pedro Alves <palves@redhat.com>
10971
10972 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10973 before calling create_internal_breakpoint.
10974
10975 2017-04-13 Pedro Alves <palves@redhat.com>
10976
10977 * fork-child.c (execv_argv): New class.
10978 (breakup_args): Refactored as ...
10979 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10980 Copy arguments to storage and replace separators with NULL
10981 terminators in place.
10982 (escape_bang_in_quoted_argument): Adjust to return bool.
10983 (execv_argv::execv_argv): New ctor.
10984 (execv_argv::init_for_shell): New method, factored out from
10985 fork_inferior. Don't strdup strings into the vector.
10986 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10987 Remove free_vector_argv call.
10988
10989 2017-04-13 Yao Qi <yao.qi@linaro.org>
10990
10991 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10992 tdep->rx_psw_type.
10993
10994 2017-04-13 Yao Qi <yao.qi@linaro.org>
10995
10996 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10997 * rx-tdep.c (rx_gdbarch_init): Likewise.
10998
10999 2017-04-13 Pedro Alves <palves@redhat.com>
11000
11001 * breakpoint.h (struct breakpoint): Reindent.
11002
11003 2017-04-13 Pedro Alves <palves@redhat.com>
11004
11005 * breakpoint.c (bp_location): Rename to ...
11006 (bp_locations): ... this. All references updated.
11007 (bp_location_count): Rename to ...
11008 (bp_locations_count): ... this. All references updated.
11009 (bp_location_placed_address_before_address_max): Rename to ...
11010 (bp_locations_placed_address_before_address_max): ... this. All
11011 references updated.
11012 (bp_location_shadow_len_after_address_max): Rename to ...
11013 (bp_locations_shadow_len_after_address_max): ... this. All
11014 references updated.
11015 (bp_location_compare_addrs): Rename to ...
11016 (bp_locations_compare_addrs): ... this. All references updated.
11017 (bp_location_compare):Rename to ...
11018 (bp_locations_compare): ... this. All references updated.
11019 (bp_location_target_extensions_update): Rename to ...
11020 (bp_locations_target_extensions_update): ... this. All references
11021 updated.
11022
11023 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11024
11025 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11026 * common/common.m4: Check headers 'termios.h', 'termio.h' and
11027 'sgtty.h'.
11028 * common/gdb_termios.h: New file, with parts of "terminal.h".
11029 * inflow.c: Include "gdb_termios.h".
11030 * ser-unix.c: Include "gdb_termios.h".
11031 * terminal.h: Move terminal-related defines to
11032 "common/gdb_termios.h".
11033
11034 2017-04-12 Tom Tromey <tom@tromey.com>
11035
11036 * probe.c (parse_probes): Update.
11037 * location.h (delete_event_location): Don't declare.
11038 (event_location_deleter::operator()): Update.
11039 * location.c (event_location_deleter::operator()): Rename from
11040 delete_event_location.
11041 * linespec.h (linespec_result) <location>: Change type to
11042 event_location_up.
11043 * linespec.c (canonicalize_linespec, event_location_to_sals)
11044 (decode_objc): Update.
11045 (linespec_result): Don't call delete_event_location.
11046 * breakpoint.c (create_breakpoints_sal)
11047 (bkpt_probe_create_sals_from_location)
11048 (strace_marker_create_sals_from_location): Update.
11049
11050 2017-04-12 Tom Tromey <tom@tromey.com>
11051
11052 * linespec.h (struct linespec_result): Add constructor and
11053 destructor.
11054 (init_linespec_result, destroy_linespec_result)
11055 (make_cleanup_destroy_linespec_result): Don't declare.
11056 * linespec.c (init_linespec_result): Remove.
11057 (linespec_result::~linespec_result): Rename from
11058 destroy_linespec_result. Update.
11059 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11060 Remove.
11061 * breakpoint.c (create_breakpoint, break_range_command)
11062 (decode_location_default): Update.
11063 * ax-gdb.c (agent_command_1): Update.
11064
11065 2017-04-12 Tom Tromey <tom@tromey.com>
11066
11067 * remote.c (remote_download_tracepoint): Update.
11068 * python/py-breakpoint.c (bppy_get_location): Update.
11069 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11070 (gdbscm_breakpoint_location): Update.
11071 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11072 * breakpoint.h (struct breakpoint) <location, location_range_end>:
11073 Change type to event_location_up.
11074 * breakpoint.c (create_overlay_event_breakpoint)
11075 (create_longjmp_master_breakpoint)
11076 (create_std_terminate_master_breakpoint)
11077 (create_exception_master_breakpoint)
11078 (breakpoint_event_location_empty_p, print_breakpoint_location)
11079 (print_one_breakpoint_location, create_thread_event_breakpoint)
11080 (init_breakpoint_sal, create_breakpoint)
11081 (print_recreate_ranged_breakpoint, break_range_command)
11082 (init_ada_exception_breakpoint, say_where): Update.
11083 (base_breakpoint_dtor): Don't call delete_event_location.
11084 (bkpt_print_recreate, tracepoint_print_recreate)
11085 (dprintf_print_recreate, update_static_tracepoint)
11086 (breakpoint_re_set_default): Update.
11087
11088 2017-04-12 Tom Tromey <tom@tromey.com>
11089
11090 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11091 type of "to_do". Update.
11092 (compute_stack_depth): Use std::vector.
11093
11094 2017-04-12 Tom Tromey <tom@tromey.com>
11095
11096 * printcmd.c (find_instruction_backward): Use std::vector.
11097
11098 2017-04-12 Tom Tromey <tom@tromey.com>
11099
11100 * symfile.c (objfilep): Remove typedef.
11101 (reread_symbols): Use a std::vector.
11102
11103 2017-04-12 Tom Tromey <tom@tromey.com>
11104
11105 * mi/mi-main.c (exec_direction_forward): Remove.
11106 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11107 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11108 scoped_restore.
11109 * guile/guile.c (guile_repl_command, guile_command)
11110 (gdbscm_execute_gdb_command): Use scoped_restore.
11111 * go-exp.y (go_parse): Use scoped_restore.
11112 * d-exp.y (d_parse): Use scoped_restore.
11113 * cli/cli-decode.c (cmd_func): Use scoped_restore.
11114 * c-exp.y (c_parse): Use scoped_restore.
11115
11116 2017-04-12 Tom Tromey <tom@tromey.com>
11117
11118 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11119 (mi_parse): Update return type.
11120 (mi_parse_free): Remove.
11121 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11122 (mi_parse::~mi_parse): Rename from mi_parse_free.
11123 (mi_parse_cleanup): Remove.
11124 (mi_parse): Return a unique_ptr. Use new.
11125 * mi/mi-main.c (mi_execute_command): Update.
11126
11127 2017-04-12 Tom Tromey <tom@tromey.com>
11128
11129 * location.c (explicit_location_lex_one): Return a
11130 unique_xmalloc_ptr.
11131 (string_to_explicit_location): Update. Remove cleanups.
11132
11133 2017-04-12 Tom Tromey <tom@tromey.com>
11134
11135 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11136 (compare_value_and_voffset): Change type. Update.
11137 (compute_vtable_size): Change type of "offset_vec".
11138 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
11139 (gnuv3_get_typeid): Remove extraneous declaration.
11140
11141 2017-04-12 Tom Tromey <tom@tromey.com>
11142
11143 * charset.h (wchar_iterator): Fix comment.
11144
11145 2017-04-12 Tom Tromey <tom@tromey.com>
11146
11147 * charset.c (iconv_wrapper): New class.
11148 (cleanup_iconv): Remove.
11149 (convert_between_encodings): Use it.
11150
11151 2017-04-12 Tom Tromey <tom@tromey.com>
11152
11153 * symfile.h (increment_reading_symtab): Update type.
11154 * symfile.c (decrement_reading_symtab): Remove.
11155 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11156 * psymtab.c (psymtab_to_symtab): Update.
11157 * dwarf2read.c (dw2_instantiate_symtab): Update.
11158
11159 2017-04-12 Tom Tromey <tom@tromey.com>
11160
11161 * jit.c (struct jit_reader): Declare separately. Add constructor
11162 and destructor. Change type of "handle".
11163 (loaded_jit_reader): Define separately.
11164 (jit_reader_load): Update. New "new".
11165 (jit_reader_unload_command): Use "delete".
11166 * gdb-dlfcn.h (struct dlclose_deleter): New.
11167 (gdb_dlhandle_up): New typedef.
11168 (gdb_dlopen, gdb_dlsym): Update types.
11169 (gdb_dlclose): Remove.
11170 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11171 (gdb_dlsym): Change type of "handle".
11172 (make_cleanup_dlclose): Remove.
11173 (dlclose_deleter::operator()): Rename from gdb_dlclose.
11174 * compile/compile-c-support.c (load_libcc): Update.
11175
11176 2017-04-12 Tom Tromey <tom@tromey.com>
11177
11178 * symtab.h (find_pcs_for_symtab_line): Change return type.
11179 * symtab.c (find_pcs_for_symtab_line): Change return type.
11180 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11181 type of "vec". Update.
11182 (ltpy_get_pcs_for_line): Update.
11183 * linespec.c (decode_digits_ordinary): Update.
11184
11185 2017-04-12 Tom Tromey <tom@tromey.com>
11186
11187 * tracepoint.c (actions_command): Update.
11188 * python/python.c (python_command, python_interactive_command):
11189 Update.
11190 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11191 * guile/guile.c (guile_command): Update.
11192 * defs.h (read_command_lines, read_command_lines_1): Return
11193 command_line_up.
11194 (command_lines_deleter): New struct.
11195 (command_line_up): New typedef.
11196 * compile/compile.c (compile_code_command)
11197 (compile_print_command): Update.
11198 * cli/cli-script.h (get_command_line, copy_command_lines): Return
11199 command_line_up.
11200 (make_cleanup_free_command_lines): Remove.
11201 * cli/cli-script.c (get_command_line, read_command_lines_1)
11202 (copy_command_lines): Return command_line_up.
11203 (while_command, if_command, read_command_lines, define_command)
11204 (document_command): Update.
11205 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11206 Remove.
11207 * breakpoint.h (breakpoint_set_commands): Change type of
11208 "commands".
11209 * breakpoint.c (breakpoint_set_commands): Change type of
11210 "commands". Update.
11211 (do_map_commands_command, update_dprintf_command_list)
11212 (create_tracepoint_from_upload): Update.
11213
11214 2017-04-12 Tom Tromey <tom@tromey.com>
11215
11216 * tracepoint.c (scope_info): Update.
11217 * spu-tdep.c (spu_catch_start): Update.
11218 * python/python.c (gdbpy_decode_line): Update.
11219 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11220 * python/py-breakpoint.c (bppy_init): Update.
11221 * probe.c (parse_probes): Update.
11222 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11223 * location.h (event_location_deleter): New struct.
11224 (event_location_up): New typedef.
11225 (new_linespec_location, new_address_location, new_probe_location)
11226 (new_explicit_location, copy_event_location)
11227 (string_to_event_location, string_to_event_location_basic)
11228 (string_to_explicit_location): Update return type.
11229 (make_cleanup_delete_event_location): Remove.
11230 * location.c (new_linespec_location, new_address_location)
11231 (new_probe_location, new_explicit_location, copy_event_location):
11232 Return event_location_up.
11233 (delete_event_location_cleanup)
11234 (make_cleanup_delete_event_location): Remove.
11235 (string_to_explicit_location, string_to_event_location_basic)
11236 (string_to_event_location): Return event_location_up.
11237 * linespec.c (canonicalize_linespec, event_location_to_sals)
11238 (decode_line_with_current_source)
11239 (decode_line_with_last_displayed, decode_objc): Update.
11240 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11241 * completer.c (location_completer): Update.
11242 * cli/cli-cmds.c (edit_command, list_command): Update.
11243 * breakpoint.c (create_overlay_event_breakpoint)
11244 (create_longjmp_master_breakpoint)
11245 (create_std_terminate_master_breakpoint)
11246 (create_exception_master_breakpoint)
11247 (create_thread_event_breakpoint): Update.
11248 (init_breakpoint_sal): Update. Remove some dead code.
11249 (create_breakpoint_sal): Change type of "location". Update.
11250 (create_breakpoints_sal, create_breakpoint, break_command_1)
11251 (dprintf_command, break_range_command, until_break_command)
11252 (init_ada_exception_breakpoint)
11253 (strace_marker_create_sals_from_location)
11254 (update_static_tracepoint, trace_command, ftrace_command)
11255 (strace_command, create_tracepoint_from_upload): Update.
11256 * break-catch-throw.c (re_set_exception_catchpoint): Update.
11257 * ax-gdb.c (agent_command_1): Update.
11258
11259 2017-04-12 Pedro Alves <palves@redhat.com>
11260
11261 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11262 * configure.tgt: Handle i[34567]86-*-go32* and
11263 i[34567]86-*-msdosdjgpp*.
11264 * i386-tdep.c (i386_svr4_reg_to_regnum):
11265 Make extern.
11266 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11267 i386-go32-tdep.c.
11268 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11269 * i386-go32-tdep.c: New file.
11270 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11271 declarations.
11272
11273 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
11274
11275 * aix-thread.c (pd_status2str): Change return type to const char *.
11276
11277 2017-04-12 Pedro Alves <palves@redhat.com>
11278
11279 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11280 calls to set_gdbarch_gnu_triplet_regexp.
11281
11282 2017-04-12 Pedro Alves <palves@redhat.com>
11283
11284 PR gdb/21323
11285 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11286 New enum value.
11287 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11288 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11289 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11290 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11291 * gdbarch.h, gdbarch.c: Regenerate.
11292 * aarch64-tdep.c (aarch64_gdbarch_init): Override
11293 gdbarch_wchar_bit and gdbarch_wchar_signed.
11294 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11295 * arm-tdep.c (arm_gdbarch_init): Likewise.
11296 * avr-tdep.c (avr_gdbarch_init): Likewise.
11297 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11298 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
11299 * i386-tdep.c (i386_go32_init_abi): Likewise.
11300 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11301 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11302 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11303 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11304 * sh-tdep.c (sh_gdbarch_init): Likewise.
11305 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11306 * sparc64-tdep.c (sparc64_init_abi): Likewise.
11307 * windows-tdep.c (windows_init_abi): Likewise.
11308 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11309
11310 2017-04-12 Pedro Alves <palves@redhat.com>
11311
11312 PR c++/21323
11313 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
11314 cplus_primitive_type_char32_t>: New enum values.
11315 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
11316 and cplus_primitive_type_char32_t.
11317 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
11318 32, use the archtecture's built-in type for char16_t and char32_t,
11319 respectively. Otherwise, fallback to init_integer_type as before,
11320 but make the type unsigned, and issue a complaint.
11321 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
11322
11323 2017-04-12 Alan Hayward <alan.hayward@arm.com>
11324
11325 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
11326 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
11327
11328 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11329
11330 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
11331 'const char *'.
11332
11333 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
11334
11335 * common/common-utils.c (free_vector_argv): New function.
11336 * common/common-utils.h: Include <vector>.
11337 (free_vector_argv): New prototype.
11338 * darwin-nat.c (darwin_create_inferior): Rewrite function
11339 prototype in order to constify "exec_file" and accept a
11340 "std::string" for "allargs".
11341 * fork-child.c: Include <vector>.
11342 (breakup_args): Rewrite function, using C++.
11343 (fork_inferior): Rewrite function header, constify "exec_file_arg"
11344 and accept "std::string" for "allargs". Update the code to
11345 calculate "argv" based on "allargs". Update calls to "exec_fun"
11346 and "execvp".
11347 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
11348 order to constify "exec_file" and accept a "std::string" for
11349 "allargs".
11350 * go32-nat.c (go32_create_inferior): Likewise.
11351 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
11352 * infcmd.c (run_command_1): Constify "exec_file". Use
11353 "std::string" for inferior arguments.
11354 * inferior.h (fork_inferior): Update prototype.
11355 * linux-nat.c (linux_nat_create_inferior): Rewrite function
11356 prototype in order to constify "exec_file" and accept a
11357 "std::string" for "allargs".
11358 * nto-procfs.c (procfs_create_inferior): Likewise.
11359 * procfs.c (procfs_create_inferior): Likewise.
11360 * remote-sim.c (gdbsim_create_inferior): Likewise.
11361 * remote.c (extended_remote_run): Update code to accept
11362 "std::string" as argument.
11363 (extended_remote_create_inferior): Rewrite function prototype in
11364 order to constify "exec_file" and accept a "std::string" for
11365 "allargs".
11366 * rs6000-nat.c (super_create_inferior): Likewise.
11367 (rs6000_create_inferior): Likewise.
11368 * target.h (struct target_ops) <to_create_inferior>: Likewise.
11369 * windows-nat.c (windows_create_inferior): Likewise.
11370
11371 2017-04-11 Pedro Alves <palves@redhat.com>
11372
11373 * thread.c: Fix whitespace throughout.
11374
11375 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
11376
11377 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11378
11379 2017-04-11 Alan Hayward <alan.hayward@arm.com>
11380
11381 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11382
11383 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
11384
11385 PR gdb/21364
11386 * osdata.c (info_osdata): Check if 'type' is an empty string
11387 instead of NULL.
11388
11389 2017-04-10 Pedro Alves <palves@redhat.com>
11390
11391 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11392 (ptid_to_global_thread_id, in_thread_list)
11393 (do_captured_list_thread_ids, set_resumed, set_running)
11394 (set_executing, set_stop_requested, finish_thread_state)
11395 (validate_registers_access, can_access_registers_ptid)
11396 (print_thread_info_1, switch_to_thread)
11397 (do_restore_current_thread_cleanup)
11398 (make_cleanup_restore_current_thread, thread_command)
11399 (thread_name_command): Use operator== instead of ptid_equal.
11400
11401 2017-04-10 Pedro Alves <palves@redhat.com>
11402
11403 * thread.c (struct current_thread_cleanup) <next>: Delete field.
11404 (current_thread_cleanup_chain): Delete.
11405 (restore_current_thread_cleanup_dtor)
11406 (make_cleanup_restore_current_thread): Remove references to
11407 current_thread_cleanup_chain.
11408
11409 2017-04-10 Alan Hayward <alan.hayward@arm.com>
11410
11411 * msp430-tdep.c (msp430_pseudo_register_read): Never return
11412 REG_UNKNOWN.
11413
11414 2017-04-10 Yao Qi <yao.qi@linaro.org>
11415
11416 PR gdb/19942
11417 * gdbthread.h (thread_info::deletable): New method.
11418 (thread_info::incref): New method.
11419 (thread_info::decref): New method.
11420 (thread_info::refcount): Move it to private.
11421 * infrun.c (save_stop_context): Call inc_refcount.
11422 (release_stop_context_cleanup): Likewise.
11423 * thread.c (set_thread_exited): New function.
11424 (init_thread_list): Delete "tp" only it is deletable, otherwise
11425 call set_thread_exited.
11426 (delete_thread_1): Call set_thread_exited.
11427 (current_thread_cleanup) <inferior_pid>: Remove.
11428 <thread>: New field.
11429 (restore_current_thread_ptid_changed): Removed.
11430 (do_restore_current_thread_cleanup): Adjust.
11431 (restore_current_thread_cleanup_dtor): Don't call
11432 find_thread_ptid.
11433 (set_thread_refcount): Use dec_refcount.
11434 (make_cleanup_restore_current_thread): Adjust.
11435 (thread_apply_all_command): Call inc_refcount.
11436 (_initialize_thread): Don't call
11437 observer_attach_thread_ptid_changed.
11438
11439 2017-04-10 Yao Qi <yao.qi@linaro.org>
11440
11441 * thread.c (delete_thread_1): Hoist code on marking thread as
11442 exited.
11443
11444 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11445
11446 * windows-nat.c (windows_detach): Initialize ptid with
11447 minus_one_ptid.
11448
11449 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
11450
11451 * unittests/ptid-selftests.c: Fix erroneous assert messages.
11452
11453 2017-04-07 Alan Hayward <alan.hayward@arm.com>
11454
11455 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11456 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11457 (bfin_pseudo_register_write): Likewise
11458
11459 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
11460
11461 * common/ptid.h (struct ptid): Change to...
11462 (class ptid_t): ... this.
11463 <ptid_t>: New constructors.
11464 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11465 matches>: New methods.
11466 <make_null, make_minus_one>: New static methods.
11467 <pid>: Rename to...
11468 <m_pid>: ...this.
11469 <lwp>: Rename to...
11470 <m_lwp>: ...this.
11471 <tid>: Rename to...
11472 <m_tid>: ...this.
11473 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11474 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11475 as references, move comment to class ptid_t.
11476 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11477 ptid_t static methods.
11478 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11479 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11480 Take ptid arguments as references, implement using ptid_t methods.
11481 * unittests/ptid-selftests.c: New file.
11482 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11483 unittests/ptid-selftests.c.
11484 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11485
11486 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
11487
11488 * python/python.c (python_run_simple_file): Cast mode literal to
11489 non-const char pointer as expected by PyFile_FromString.
11490
11491 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
11492
11493 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11494 minus_one_ptid and null_ptid.
11495
11496 2017-04-05 Pedro Alves <palves@redhat.com>
11497
11498 * warning.m4 (build_warnings): Remove -Wno-write-strings.
11499 * configure: Regenerate.
11500
11501 2017-04-05 Pedro Alves <palves@redhat.com>
11502
11503 * ada-exp.y (yyerror): Constify.
11504 * ada-lang.c (bound_name, get_selections)
11505 (ada_variant_discrim_type)
11506 (ada_variant_discrim_name, ada_value_struct_elt)
11507 (ada_lookup_struct_elt_type, is_unchecked_variant)
11508 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11509 (catch_ada_exception_command_split)
11510 (catch_ada_assert_command_split, catch_assert_command)
11511 (ada_op_name): Constify.
11512 * ada-lang.h (ada_yyerror, get_selections)
11513 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11514 * arc-tdep.c (arc_print_frame_cache): Constify.
11515 * arm-tdep.c (arm_skip_stub): Constify.
11516 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11517 (gen_aggregate_elt_ref): Constify.
11518 * bcache.c (print_bcache_statistics): Constify.
11519 * bcache.h (print_bcache_statistics): Constify.
11520 * break-catch-throw.c (catch_exception_command_1):
11521 * breakpoint.c (struct ep_type_description::description):
11522 Constify.
11523 (add_solib_catchpoint): Constify.
11524 (catch_fork_command_1): Add cast.
11525 (add_catch_command): Constify.
11526 * breakpoint.h (add_catch_command, add_solib_catchpoint):
11527 Constify.
11528 * bsd-uthread.c (bsd_uthread_state): Constify.
11529 * buildsym.c (patch_subfile_names): Constify.
11530 * buildsym.h (next_symbol_text_func, patch_subfile_names):
11531 Constify.
11532 * c-exp.y (yyerror): Constify.
11533 (token::oper): Constify.
11534 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11535 * c-varobj.c (cplus_describe_child): Constify.
11536 * charset.c (find_charset_names): Add cast.
11537 (find_charset_names): Constify array and add const_cast.
11538 * cli/cli-cmds.c (complete_command, cd_command): Constify.
11539 (edit_command): Constify.
11540 * cli/cli-decode.c (lookup_cmd): Constify.
11541 * cli/cli-dump.c (dump_memory_command, dump_value_command):
11542 Constify.
11543 (struct dump_context): Constify.
11544 (add_dump_command, restore_command): Constify.
11545 * cli/cli-script.c (get_command_line): Constify.
11546 * cli/cli-script.h (get_command_line): Constify.
11547 * cli/cli-utils.c (check_for_argument): Constify.
11548 * cli/cli-utils.h (check_for_argument): Constify.
11549 * coff-pe-read.c (struct read_pe_section_data): Constify.
11550 * command.h (lookup_cmd): Constify.
11551 * common/print-utils.c (decimal2str): Constify.
11552 * completer.c (gdb_print_filename): Constify.
11553 * corefile.c (set_gnutarget): Constify.
11554 * cp-name-parser.y (yyerror): Constify.
11555 * cp-valprint.c (cp_print_class_member): Constify.
11556 * cris-tdep.c (cris_register_name, crisv32_register_name):
11557 Constify.
11558 * d-exp.y (yyerror): Constify.
11559 (struct token::oper): Constify.
11560 * d-lang.h (d_yyerror): Constify.
11561 * dbxread.c (struct header_file_location::name): Constify.
11562 (add_old_header_file, add_new_header_file, last_function_name)
11563 (dbx_next_symbol_text, add_bincl_to_list)
11564 (find_corresponding_bincl_psymtab, set_namestring)
11565 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11566 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11567 * defs.h (command_line_input, print_address_symbolic)
11568 (deprecated_readline_begin_hook): Constify.
11569 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11570 Constify.
11571 * event-top.c (handle_line_of_input): Constify and add cast.
11572 * exceptions.c (catch_errors): Constify.
11573 * exceptions.h (catch_errors): Constify.
11574 * expprint.c (print_subexp_standard, op_string, op_name)
11575 (op_name_standard, dump_raw_expression, dump_raw_expression):
11576 * expression.h (op_name, op_string, dump_raw_expression):
11577 Constify.
11578 * f-exp.y (yyerror): Constify.
11579 (struct token::oper): Constify.
11580 (struct f77_boolean_val::name): Constify.
11581 * f-lang.c (f_word_break_characters): Constify.
11582 * f-lang.h (f_yyerror): Constify.
11583 * fork-child.c (fork_inferior): Add cast.
11584 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11585 (new_variant): Constify.
11586 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11587 * gdbarch.c: Regenerate.
11588 * gdbcore.h (set_gnutarget): Constify.
11589 * go-exp.y (yyerror): Constify.
11590 (token::oper): Constify.
11591 * go-lang.h (go_yyerror): Constify.
11592 * go32-nat.c (go32_sysinfo): Constify.
11593 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11594 * guile/scm-cmd.c (cmdscm_function): Constify.
11595 * guile/scm-param.c (pascm_param_value): Constify.
11596 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11597 (h8300sx_register_name): Constify.
11598 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11599 Constify.
11600 * ia64-tdep.c (ia64_register_names): Constify.
11601 * infcmd.c (construct_inferior_arguments): Constify.
11602 (path_command, attach_post_wait): Constify.
11603 * language.c (show_range_command, show_case_command)
11604 (unk_lang_error): Constify.
11605 * language.h (language_defn::la_error)
11606 (language_defn::la_name_of_this): Constify.
11607 * linespec.c (decode_line_2): Constify.
11608 * linux-thread-db.c (thread_db_err_str): Constify.
11609 * lm32-tdep.c (lm32_register_name): Constify.
11610 * m2-exp.y (yyerror): Constify.
11611 * m2-lang.h (m2_yyerror): Constify.
11612 * m32r-tdep.c (m32r_register_names): Constify and make static.
11613 * m68hc11-tdep.c (m68hc11_register_names): Constify.
11614 * m88k-tdep.c (m88k_register_name): Constify.
11615 * macroexp.c (appendmem): Constify.
11616 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11617 (upgrade_type, parse_external, parse_partial_symbols)
11618 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11619 (new_symbol): Constify.
11620 * memattr.c (mem_info_command): Constify.
11621 * mep-tdep.c (register_name_from_keyword): Constify.
11622 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11623 Constify.
11624 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11625 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11626 * mi/mi-main.c (captured_mi_execute_command): Constify and add
11627 cast.
11628 (mi_execute_async_cli_command): Constify.
11629 * mips-tdep.c (mips_register_name): Constify.
11630 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11631 (am33_register_name, am33_2_register_name)
11632 * moxie-tdep.c (moxie_register_names): Constify.
11633 * nat/linux-osdata.c (osdata_type): Constify fields.
11634 * nto-tdep.c (nto_parse_redirection): Constify.
11635 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11636 (lookup_child_selector): Constify.
11637 (objc_methcall::name): Constify.
11638 * objc-lang.h (lookup_objc_class, lookup_child_selector)
11639 (lookup_struct_typedef): Constify.
11640 * objfiles.c (pc_in_section): Constify.
11641 * objfiles.h (pc_in_section): Constify.
11642 * p-exp.y (struct token::oper): Constify.
11643 (yyerror): Constify.
11644 * p-lang.h (pascal_yyerror): Constify.
11645 * parser-defs.h (op_name_standard): Constify.
11646 (op_print::string): Constify.
11647 (exp_descriptor::op_name): Constify.
11648 * printcmd.c (print_address_symbolic): Constify.
11649 * psymtab.c (print_partial_symbols): Constify.
11650 * python/py-breakpoint.c (stop_func): Constify.
11651 (bppy_get_expression): Constify.
11652 * python/py-cmd.c (cmdpy_completer::name): Constify.
11653 (cmdpy_function): Constify.
11654 * python/py-event.c (evpy_add_attribute)
11655 (gdbpy_initialize_event_generic): Constify.
11656 * python/py-event.h (evpy_add_attribute)
11657 (gdbpy_initialize_event_generic): Constify.
11658 * python/py-evts.c (add_new_registry): Constify.
11659 * python/py-finishbreakpoint.c (outofscope_func): Constify.
11660 * python/py-framefilter.c (get_py_iter_from_func): Constify.
11661 * python/py-inferior.c (get_buffer): Add cast.
11662 * python/py-param.c (parm_constant::name): Constify.
11663 * python/py-unwind.c (fprint_frame_id): Constify.
11664 * python/python.c (gdbpy_parameter_value): Constify.
11665 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11666 * remote.c (memory_packet_config::name): Constify.
11667 (show_packet_config_cmd, remote_write_bytes)
11668 (remote_buffer_add_string):
11669 * reverse.c (exec_reverse_once): Constify.
11670 * rs6000-tdep.c (variant::name, variant::description): Constify.
11671 * rust-exp.y (rustyyerror): Constify.
11672 * rust-lang.c (rust_op_name): Constify.
11673 * rust-lang.h (rustyyerror): Constify.
11674 * serial.h (serial_ops::name): Constify.
11675 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11676 (sh_sh3e_register_name, sh_sh2e_register_name)
11677 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11678 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11679 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11680 (sh_sh4al_dsp_register_name): Constify.
11681 * sh64-tdep.c (sh64_register_name): Constify.
11682 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11683 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11684 * stabsread.c (patch_block_stabs, read_type_number)
11685 (ref_map::stabs, ref_add, process_reference)
11686 (symbol_reference_defined, define_symbol, define_symbol)
11687 (error_type, read_type, read_member_functions, read_cpp_abbrev)
11688 (read_one_struct_field, read_struct_fields, read_baseclasses)
11689 (read_tilde_fields, read_struct_type, read_array_type)
11690 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11691 (read_huge_number, read_range_type, read_args, common_block_start)
11692 (find_name_end): Constify.
11693 * stabsread.h (common_block_start, define_symbol)
11694 (process_one_symbol, symbol_reference_defined, ref_add):
11695 * symfile.c (get_section_index, add_symbol_file_command):
11696 * symfile.h (get_section_index): Constify.
11697 * target-descriptions.c (tdesc_type::name): Constify.
11698 (tdesc_free_type): Add cast.
11699 * target.c (find_default_run_target):
11700 (add_deprecated_target_alias, find_default_run_target)
11701 (target_announce_detach): Constify.
11702 (do_option): Constify.
11703 * target.h (add_deprecated_target_alias): Constify.
11704 * thread.c (print_thread_info_1): Constify.
11705 * top.c (deprecated_readline_begin_hook, command_line_input):
11706 Constify.
11707 (init_main): Add casts.
11708 * top.h (handle_line_of_input): Constify.
11709 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11710 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11711 (tfind_command): Rename to ...
11712 (tfind_command_1): ... this and constify.
11713 (tfind_command): New function.
11714 (tfind_end_command, tfind_start_command): Adjust.
11715 (encode_source_string): Constify.
11716 * tracepoint.h (encode_source_string): Constify.
11717 * tui/tui-data.c (tui_partial_win_by_name): Constify.
11718 * tui/tui-data.h (tui_partial_win_by_name): Constify.
11719 * tui/tui-source.c (tui_set_source_content_nil): Constify.
11720 * tui/tui-source.h (tui_set_source_content_nil): Constify.
11721 * tui/tui-win.c (parse_scrolling_args): Constify.
11722 * tui/tui-windata.c (tui_erase_data_content): Constify.
11723 * tui/tui-windata.h (tui_erase_data_content): Constify.
11724 * tui/tui-winsource.c (tui_erase_source_content): Constify.
11725 * tui/tui.c (tui_enable): Add cast.
11726 * utils.c (defaulted_query): Constify.
11727 (init_page_info): Add cast.
11728 (puts_debug, subset_compare): Constify.
11729 * utils.h (subset_compare): Constify.
11730 * varobj.c (varobj_format_string): Constify.
11731 * varobj.h (varobj_format_string): Constify.
11732 * vax-tdep.c (vax_register_name): Constify.
11733 * windows-nat.c (windows_detach): Constify.
11734 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11735 * xml-support.c (gdb_xml_end_element): Constify.
11736 * xml-tdesc.c (tdesc_start_reg): Constify.
11737 * xstormy16-tdep.c (xstormy16_register_name): Constify.
11738 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11739 * xtensa-tdep.h (xtensa_register_t::name): Constify.
11740
11741 2017-04-05 Pedro Alves <palves@redhat.com>
11742
11743 * proc-api.c (struct trans): Constify.
11744 (procfs_note): Constify.
11745 * proc-events.c (struct trans, syscall_table):
11746 * proc-flags.c (struct trans): Constify.
11747 * proc-utils.h (procfs_note): Constify.
11748 * proc-why.c (struct trans): Constify.
11749 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11750 (procfs_detach): Constify.
11751 * sol-thread.c (struct string_map): Constify.
11752 (td_err_string, td_state_string): Constify.
11753
11754 2017-04-05 Pedro Alves <palves@redhat.com>
11755
11756 * proc-api.c (procfs_filename): Don't initialize
11757 procfs_filename.
11758 (prepare_to_trace): Assume procfs_filename is non-NULL.
11759 (_initialize_proc_api): Give procfs_filename a default value here.
11760
11761 2017-04-05 Pedro Alves <palves@redhat.com>
11762
11763 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11764 'cond_string' parameter.
11765 (extract_exception_regexp): Constify 'string' parameter.
11766 (catch_exception_command_1): Constify.
11767 * breakpoint.c (init_catchpoint)
11768 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11769 parameter.
11770 (ep_parse_optional_if_clause, catch_fork_command_1)
11771 (catch_exec_command_1): Constify.
11772 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11773 parameter.
11774 (ep_parse_optional_if_clause): Constify.
11775 * cli/cli-utils.c (remove_trailing_whitespace)
11776 (check_for_argument): Constify.
11777 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11778 non-const overload.
11779 (check_for_argument): Likewise.
11780
11781 2017-04-05 Pedro Alves <palves@redhat.com>
11782
11783 * event-top.c (command_line_handler): Add cast to execute_command
11784 call.
11785 * record-btrace.c (cmd_record_btrace_bts_start)
11786 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11787 (cmd_record_btrace_start): Add cast to execute_command call.
11788 * record-full.c (record_full_goto_insn):
11789 * record.c (record_start, record_stop): Add cast to
11790 execute_command_to_string calls.
11791 (cmd_record_start): Add cast to execute_command calls.
11792
11793 2017-04-05 Pedro Alves <palves@redhat.com>
11794
11795 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11796 static inline function.
11797 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11798 array and use gdb_PyArg_ParseTupleAndKeywords.
11799 * python/py-cmd.c (cmdpy_init): Likewise.
11800 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11801 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11802 (infpy_search_memory): Likewise.
11803 * python/py-objfile.c (objfpy_add_separate_debug_file)
11804 (gdbpy_lookup_objfile): Likewise.
11805 * python/py-symbol.c (gdbpy_lookup_symbol)
11806 (gdbpy_lookup_global_symbol): Likewise.
11807 * python/py-type.c (gdbpy_lookup_type): Likewise.
11808 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11809 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11810 Likewise.
11811
11812 2017-04-05 Pedro Alves <palves@redhat.com>
11813
11814 * python/python-internal.h (gdb_PyGetSetDef): New type.
11815 * python/py-block.c (block_object_getset)
11816 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11817 * python/py-event.c (event_object_getset)
11818 (finish_breakpoint_object_getset): Likewise.
11819 * python/py-inferior.c (inferior_object_getset): Likewise.
11820 * python/py-infthread.c (thread_object_getset): Likewise.
11821 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11822 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11823 * python/py-objfile.c (objfile_getset): Likewise.
11824 * python/py-progspace.c (pspace_getset): Likewise.
11825 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11826 Likewise.
11827 * python/py-record.c (recpy_record_getset): Likewise.
11828 * python/py-symbol.c (symbol_object_getset): Likewise.
11829 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11830 Likewise.
11831 * python/py-type.c (type_object_getset, field_object_getset):
11832 Likewise.
11833 * python/py-value.c (value_object_getset): Likewise.
11834
11835 2017-04-05 Pedro Alves <palves@redhat.com>
11836
11837 * python/python-internal.h (gdb_PyObject_CallMethod)
11838 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11839 New functions.
11840 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11841 (PySys_GetObject, PySys_SetPath): New macros.
11842
11843 2017-04-05 Pedro Alves <palves@redhat.com>
11844
11845 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11846 info_osdata_command.
11847 * osdata.c (info_osdata_command): Rename to ...
11848 (info_osdata): ... this. Constify 'type' parameter, and remove
11849 the 'from_tty' parameter. Accept NULL TYPE.
11850 (info_osdata_command): New function.
11851 * osdata.h (info_osdata_command): Remove declaration.
11852 (info_osdata): New declaration.
11853
11854 2017-04-05 Pedro Alves <palves@redhat.com>
11855
11856 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11857 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11858 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11859 parameter.
11860 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11861 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11862 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11863 parameter.
11864 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11865 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11866 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11867 (mi_cmd_file_list_exec_source_files)
11868 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11869 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11870 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11871 parameter.
11872 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11873 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11874 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11875 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11876 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11877 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11878 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11879 'command' parameter.
11880 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11881 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11882 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11883 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11884 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11885 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11886 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11887 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11888 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11889 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11890 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11891 parameter.
11892 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11893 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11894 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11895 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11896 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11897 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11898 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11899 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11900 (mi_cmd_data_list_changed_registers)
11901 (mi_cmd_data_write_register_values)
11902 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11903 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11904 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11905 (mi_cmd_list_features, mi_cmd_list_target_features)
11906 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11907 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11908 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11909 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11910 (mi_cmd_trace_frame_collected): Constify 'command'
11911 parameter.
11912 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11913 'command' parameter.
11914
11915 2017-04-05 Pedro Alves <palves@redhat.com>
11916
11917 * ada-lang.c (ada_completer_word_break_characters): Now a const
11918 array.
11919 (ada_get_gdb_completer_word_break_characters): Constify.
11920 * completer.c (gdb_completer_command_word_break_characters)
11921 (gdb_completer_file_name_break_characters)
11922 (gdb_completer_quote_characters): Now const arrays.
11923 (get_gdb_completer_quote_characters): Constify.
11924 (set_rl_completer_word_break_characters): New function.
11925 (set_gdb_completion_word_break_characters)
11926 (complete_line_internal): Use it.
11927 * completer.h (get_gdb_completer_quote_characters): Constify.
11928 (set_rl_completer_word_break_characters): Declare.
11929 * f-lang.c (f_word_break_characters): Constify.
11930 * language.c (default_word_break_characters): Constify.
11931 * language.h (language_defn::la_word_break_characters): Constify.
11932 (default_word_break_characters): Constify.
11933 * top.c (init_main): Use set_rl_completer_word_break_characters.
11934
11935 2017-04-05 Pedro Alves <palves@redhat.com>
11936
11937 * aix-thread.c (aix_thread_pid_to_str)
11938 (aix_thread_extra_thread_info): Constify.
11939 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11940 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11941 (bsd_uthread_pid_to_str): Constify.
11942 * corelow.c (core_pid_to_str): Constify.
11943 * darwin-nat.c (darwin_pid_to_str): Constify.
11944 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11945 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11946 Constify.
11947 * gnu-nat.c (gnu_pid_to_str): Constify.
11948 * go32-nat.c (go32_pid_to_str): Constify.
11949 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11950 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11951 * inferior.c (inferior_pid_to_str): Constify.
11952 * linux-nat.c (linux_nat_pid_to_str): Constify.
11953 * linux-tdep.c (linux_core_pid_to_str): Constify.
11954 * linux-thread-db.c (thread_db_pid_to_str)
11955 (thread_db_extra_thread_info): Constify.
11956 * nto-tdep.c (nto_extra_thread_info): Constify.
11957 * nto-tdep.h (nto_extra_thread_info): Constify.
11958 * obsd-nat.c (obsd_pid_to_str): Constify.
11959 * procfs.c (procfs_pid_to_str): Constify.
11960 * ravenscar-thread.c (ravenscar_extra_thread_info)
11961 (ravenscar_pid_to_str): Constify.
11962 * remote-sim.c (gdbsim_pid_to_str): Constify.
11963 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11964 Constify.
11965 * sol-thread.c (solaris_pid_to_str): Constify.
11966 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11967 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11968 * target.c (default_pid_to_str, target_pid_to_str)
11969 (normal_pid_to_str, default_pid_to_str): Constify.
11970 * target.h (target_ops::to_pid_to_str)
11971 (target_ops::to_extra_thread_info): Constify.
11972 (target_pid_to_str, normal_pid_to_str): Constify.
11973 * windows-nat.c (windows_pid_to_str): Constify.
11974 * gdbarch.sh (core_pid_to_str): Constify.
11975 * target-delegates.c: Regenerate.
11976 * gdbarch.h, gdbarch.c: Regenerate.
11977
11978 2017-04-05 Pedro Alves <palves@redhat.com>
11979
11980 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11981 the memory of the temporary warning_pre_print override.
11982 * utils.c (warning_pre_print): Constify.
11983 * utils.h (warning_pre_print): Constify.
11984
11985 2017-04-05 Pedro Alves <palves@redhat.com>
11986
11987 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11988 (shell_command): New function.
11989 (make_command): Use std::string.
11990 (init_cli_cmds): Register shell_command instead of shell_escape.
11991
11992 2017-04-05 Pedro Alves <palves@redhat.com>
11993
11994 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11995 * tracepoint.c (default_collect): Don't initialize.
11996
11997 2017-04-05 Pedro Alves <palves@redhat.com>
11998
11999 * macroexp.c (macro_buffer::shared): Now a bool.
12000 (init_buffer): Update.
12001 (init_shared_buffer): Constify 'addr' parameter.
12002 (substitute_args, expand, macro_expand, macro_expand_next): Remove
12003 casts.
12004
12005 2017-04-05 Pedro Alves <palves@redhat.com>
12006
12007 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12008 * disasm.c (set_disassembler_options): Constify local.
12009 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12010
12011 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
12012
12013 PR gdb/21352
12014 * tracefile.c (tsave_command): Fix argument parsing for '-r'
12015 option.
12016
12017 2017-04-05 Yao Qi <yao.qi@linaro.org>
12018
12019 * frame.c (frame_unwind_register_unsigned): Call
12020 frame_unwind_register_value.
12021
12022 2017-04-05 Yao Qi <yao.qi@linaro.org>
12023
12024 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12025 Use gdb_test_multiple, and don't match anchor.
12026
12027 2017-04-05 Pedro Alves <palves@redhat.com>
12028
12029 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12030 (Write After Approval): Remove Simon Marchi.
12031
12032 2017-04-05 Pedro Alves <palves@redhat.com>
12033
12034 * common/gdb_optional.h (optional::optional): Make constexpr and
12035 initialize m_dummy.
12036
12037 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12038
12039 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12040 (amd64fbsd_jmp_buf_reg_offset): Remove.
12041 (amd64fbsd_supply_uthread): Remove function.
12042 (amd64fbsd_collect_uthread): Remove function.
12043 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12044 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12045 (x86_64-*-freebsd*): Remove bsd-uthread.o.
12046 (fbsd-nat.c): Update comment.
12047 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12048 (i386fbsd_jmp_buf_reg_offset): Remove.
12049 (i386fbsd_supply_uthread): Remove function.
12050 (i386fbsd_collect_uthread): Remove function.
12051 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12052
12053 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12054
12055 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12056 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12057 * NEWS: Mention that support for FreeBSD/alpha was removed.
12058 * alpha-fbsd-tdep.c: Delete file.
12059 * config/alpha/fbsd.mh: Delete file.
12060 * configure.host: Delete alpha*-*-freebsd* and
12061 alpha*-*-kfreebsd*-gnu.
12062 * configure.tgt: Delete alpha*-*-freebsd* and
12063 alpha*-*-kfreebsd*-gnu.
12064
12065 2017-04-04 John Baldwin <jhb@FreeBSD.org>
12066
12067 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12068 amd64bsd_store_inferior_registers): Use ptid from regcache.
12069
12070 2017-04-04 Pedro Alves <palves@redhat.com>
12071
12072 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
12073 data fields, make them private and add "m_" prefixes.
12074 (lnp_state_machine::lnp_state_machine): New ctor.
12075 (record_line, check_line_address, handle_set_discriminator)
12076 (handle_set_address, handle_advance_pc, handle_special_opcode)
12077 (handle_advance_line, handle_set_file, handle_negate_stmt)
12078 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12079 (end_sequence, advance_line): New methods.
12080 (m_gdbarch, m_record_lines_p): New fields.
12081 (lnp_reader_state): Delete.
12082 (dwarf_record_line): Rename to ...
12083 (lnp_state_machine::record_line): ... adjust.
12084 (init_lnp_state_machine): Delete.
12085 (lnp_state_machine::lnp_state_machine): New.
12086 (check_line_address): Rename to ...
12087 (lnp_state_machine::check_line_address): This.
12088 (dwarf_decode_lines_1): Remove reference to "reader_state".
12089 Adjust lnp_state_machine having a non-default ctor. Use bool.
12090 State machine internal state manipulation moved to
12091 lnp_state_machine methods.
12092
12093 2017-04-04 Pedro Alves <palves@redhat.com>
12094
12095 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12096 unittests/offset-type-selftests.c.
12097 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12098 * common/offset-type.h: New file.
12099 * common/preprocessor.h: New file.
12100 * common/traits.h: New file.
12101 * common/valid-expr.h: New file.
12102 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
12103 sect_offset and cu_offset strong typedefs throughout.
12104 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12105 typedefs throughout.
12106 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
12107 sect_offset and cu_offset strong typedefs throughout.
12108 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12109 typedefs throughout.
12110 * gdbtypes.h: Include "common/offset-type.h".
12111 (cu_offset): Now an offset type (strong typedef) instead of a
12112 struct.
12113 (sect_offset): Likewise.
12114 (union call_site_parameter_u): Rename "param_offset" field to
12115 "param_cu_off".
12116 * unittests/offset-type-selftests.c: New file.
12117
12118 2017-04-04 Pedro Alves <palves@redhat.com>
12119
12120 * common/underlying.h: New file.
12121 * dwarf2read.c: Include "common/gdb_optional.h" and
12122 "common/underlying.h".
12123 (dir_index, file_name_index): New types.
12124 (file_entry): Use them.
12125 (file_entry::include): Use to_underlying.
12126 (line_header::add_file_name): Use dir_index.
12127 (read_formatted_entries): Use gdb::optional. Read form before
12128 writting to file_entry.
12129 (dwarf_decode_line_header): Use dir_index.
12130 (lnp_state_machine::current_file): Use to_underlying.
12131 (lnp_state_machine::file): Change type to file_name_index.
12132 (dwarf_record_line): Use to_underlying.
12133 (init_lnp_state_machine): Use file_name_index.
12134 (dwarf_decode_lines_1): Use dir_index and file_name_index.
12135
12136 2017-04-04 Pedro Alves <palves@redhat.com>
12137
12138 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12139 operator bool, has_value and get methods.
12140
12141 2017-04-04 Pedro Alves <palves@redhat.com>
12142
12143 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12144 fields.
12145 (line_header): Initialize all data fields. Change type of
12146 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12147 Change type of include_dirs to std::vector<const char *>. Remove
12148 num_include_dirs, include_dirs_size. Change type of file_names to
12149 std::vector<file_entry>. Remove num_file_names, file_names_size.
12150 (line_header::line_header): New.
12151 (line_header::add_include_dir, line_header::add_file_name): New
12152 methods.
12153 (line_header::include_dir_at): Remove NULL check.
12154 (line_header::file_name_at): Add const overload.
12155 (line_header_up): New unique_ptr typedef.
12156 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
12157 std::vector. Remove free_line_header call.
12158 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
12159 free_line_header call.
12160 (free_cu_line_header): Delete.
12161 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12162 (setup_type_unit_groups): Use line_header_up instead of cleanups.
12163 Adjust to use std::vector.
12164 (free_line_header): Delete.
12165 (free_line_header_voidp): Use delete.
12166 (add_include_dir): Replace with ...
12167 (line_header::add_include_dir): ... this method. Use std::vector.
12168 (add_file_name): Replace with ...
12169 (line_header::add_file_name): ... this method. Use std::vector.
12170 (add_include_dir_stub): Delete.
12171 (read_formatted_entries): Remove memset.
12172 (dwarf_decode_line_header): Return a line_header_up instead of a
12173 raw pointer. Remove cleanup handling. Pass lambdas to
12174 read_formatted_entries. Adjust to use line_header methods.
12175 (dwarf_decode_lines_1): Adjust to use line_header methods.
12176 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12177 use std::vector.
12178
12179 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
12180
12181 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12182 instead of struct ptid.
12183
12184 2017-05-04 Alan Hayward <alan.hayward@arm.com>
12185
12186 * frame.c (get_frame_register_bytes): Unwind using value.
12187 (put_frame_register_bytes): Likewise.
12188
12189 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
12190
12191 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12192 aggregate-like.
12193
12194 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
12195
12196 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12197
12198 2017-03-29 Yao Qi <yao.qi@linaro.org>
12199
12200 * gdbthread.h (struct thread_info): Declare constructor and
12201 destructor. Add some in-class member initializers.
12202 * thread.c (free_thread): Remove.
12203 (init_thread_list): Call delete instead of free_thread.
12204 (new_thread): Call thread_info constructor.
12205 (thread_info::thread_info): New function.
12206 (thread_info::~thread_info): New function.
12207 (delete_thread_1): Call delete instead of free_thread.
12208 (make_cleanup_restore_current_thread): Move tp and frame to
12209 inner block.
12210
12211 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12212
12213 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12214 (arc_skip_prologue): Likewise.
12215 (arc_make_frame_cache): Likewise.
12216 (arc_pv_get_operand): New function.
12217 (arc_is_in_prologue): Likewise.
12218 (arc_analyze_prologue): Likewise.
12219 (arc_print_frame_cache): Likewise.
12220 (MAX_PROLOGUE_LENGTH): New constant.
12221
12222 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12223
12224 * configure.tgt: Add arc-insn.o.
12225 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12226 (dump_arc_instruction_command): New function.
12227 (arc_fprintf_disasm): Likewise.
12228 (arc_disassemble_info): Likewise.
12229 (arc_insn_get_operand_value): Likewise.
12230 (arc_insn_get_operand_value_signed): Likewise.
12231 (arc_insn_get_memory_base_reg): Likewise.
12232 (arc_insn_get_memory_offset): Likewise.
12233 (arc_insn_get_branch_target): Likewise.
12234 (arc_insn_dump): Likewise.
12235 (arc_insn_get_linear_next_pc): Likewise.
12236 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12237 (arc_disassemble_info): Likewise.
12238 (arc_insn_get_branch_target): Likewise.
12239 (arc_insn_get_linear_next_pc): Likewise.
12240 * NEWS: Mention new "maint print arc arc-instruction".
12241
12242 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12243
12244 * arc-tdep (maintenance_print_arc_list): New variable.
12245 (maintenance_print_arc_command): New function.
12246
12247 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
12248
12249 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12250 Add "limm" and "reserved".
12251 (arc_cannot_fetch_register, arc_cannot_store_register): Add
12252 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12253 * arc-tdep.h (arc_regnum): Likewise.
12254
12255 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12256
12257 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12258 for THREADPTR register.
12259 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12260 register.
12261 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12262 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12263 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12264
12265 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12266
12267 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12268 registers above gdbarch_num_regs (gdbarch) as privileged in
12269 call0 ABI.
12270
12271 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12272
12273 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12274 for a single specified register or for all registers in
12275 a0_base..a0_base + C0_NREGS range.
12276 (supply_gregset_reg): Call regcache_raw_supply for a single
12277 specified register or for all registers in a0_base..a0_base +
12278 C0_NREGS range.
12279
12280 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12281
12282 * arch/xtensa.h (C0_NREGS): Add definition.
12283 * xtensa-tdep.c (C0_NREGS): Remove definition.
12284
12285 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
12286
12287 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12288 Drop xtensa_default_isa initialization.
12289 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12290
12291 2017-03-27 Pedro Alves <palves@redhat.com>
12292
12293 * dwarf2read.c (file_entry) <dir_index>: Add comment.
12294 (file_entry::include_dir): New method.
12295 (line_header::include_dir_at, line_header::file_name_at): New
12296 methods.
12297 (setup_type_unit_groups, setup_type_unit_groups)
12298 (psymtab_include_file_name): Simplify using the new methods.
12299 (lnp_state_machine) <the_line_header>: New field.
12300 <file>: Add comment.
12301 (lnp_state_machine::current_file): New method.
12302 (dwarf_record_line): Simplify using the new methods.
12303 (init_lnp_state_machine): Initialize the "the_line_header" field.
12304 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
12305 Simplify using the new methods.
12306
12307 2017-03-27 Pedro Alves <palves@redhat.com>
12308
12309 * cp-name-parser.y (make_empty): Delete.
12310 (demangler_special, nested_name, ptr_operator, array_indicator)
12311 (direct_declarator, declarator_1): Use fill_comp instead of
12312 make_empty.
12313
12314 2017-03-27 Pedro Alves <palves@redhat.com>
12315
12316 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
12317 to ATTRIBUTE_PRINTF.
12318 * solib-target.c (library_list_start_list): Print "string" not
12319 "version".
12320 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
12321 gdb_xml_error call.
12322
12323 2017-03-27 Pedro Alves <palves@redhat.com>
12324
12325 * dwarf2read.c (struct file_and_directory): New.
12326 (dwarf2_get_dwz_file): Adjust to use std::string.
12327 (dw2_get_file_names_reader): Adjust to use file_and_directory.
12328 (find_file_and_directory): Adjust to return a file_and_directory
12329 object.
12330 (read_file_scope): Adjust to use file_and_directory. Remove
12331 make_cleanup/do_cleanups calls.
12332 (open_and_init_dwp_file): Adjust to use std::string. Remove
12333 make_cleanup/do_cleanups calls.
12334 * python/python.c (do_start_initialization): Adjust to ldirname
12335 returning a std::string.
12336 * utils.c (ldirname): Now returns a std::string.
12337 * utils.h (ldirname): Change return type to std::string.
12338 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
12339 returning a std::string.
12340 * xml-tdesc.c (file_read_description_xml): Likewise.
12341
12342 2017-03-24 Alan Hayward <alan.hayward@arm.com>
12343
12344 * regcache.c (regcache_debug_print_register): New function.
12345 * regcache.h (regcache_debug_print_register): New declaration.
12346 * target.c (debug_print_register): Remove.
12347 (target_fetch_registers): Call regcache_debug_print_register.
12348 (target_store_registers): Likewise.
12349
12350 2017-03-24 Pádraig Brady <pbrady@fb.com>
12351
12352 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
12353 reference beyond the 'lh->include_dirs' array before accessing to
12354 it.
12355 (psymtab_include_file_name): Likewise.
12356 (dwarf_decode_lines_1): Likewise.
12357 (dwarf_decode_lines): Likewise.
12358 (file_file_name): Likewise.
12359
12360 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
12361
12362 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
12363 inferior_ptid.
12364 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12365 ps_lsetfpregs): Likewise.
12366 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12367 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12368 ps_lsetfpregs): Likewise.
12369 * target.c (target_fetch_registers, target_store_registers):
12370 Remove asserts.
12371
12372 2017-03-23 Alan Hayward <alan.hayward@arm.com>
12373
12374 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12375
12376 2017-03-23 Yao Qi <yao.qi@linaro.org>
12377
12378 * aarch64-tdep.c (aarch64_process_record_test): Declare.
12379 (_initialize_aarch64_tdep): Register it.
12380 (aarch64_record_load_store): Handle PRFM instruction.
12381 (aarch64_process_record_test): New function.
12382
12383 2017-03-23 Yao Qi <yao.qi@linaro.org>
12384
12385 * aarch64-tdep.c (aarch64_record_load_store): Fix code
12386 indentation.
12387
12388 2017-03-23 Yao Qi <yao.qi@linaro.org>
12389
12390 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12391
12392 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
12393
12394 python/python.c (do_start_initialization): Fix memory leak.
12395
12396 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12397
12398 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12399 using get_ptrace_pid.
12400 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12401 inferior_ptid.
12402 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12403 inferior_ptid instead of pid.
12404
12405 2017-03-22 Yao Qi <yao.qi@linaro.org>
12406
12407 * aarch64-tdep.c: Wrap locally used classes in anonymous
12408 namespace.
12409 * arm-tdep.c: Likewise.
12410 * linespec.c: Likewise.
12411 * ui-out.c: Likewise.
12412
12413 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
12414
12415 PR gdb/19637
12416 * python/lib/gdb/printer/bound_registers.py: Import sys.
12417
12418 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12419
12420 * windows-nat.c (do_windows_fetch_inferior_registers): Add
12421 windows_thread_info parameter and use it instead of
12422 current_thread.
12423 (windows_fetch_inferior_registers): Don't set current_thread,
12424 pass the thread to do_windows_fetch_inferior_registers. Use
12425 ptid from regcache instead of inferior_ptid.
12426 (do_windows_store_inferior_registers): Add windows_thread_info
12427 parameter and use it instead of current_thread.
12428 (windows_store_inferior_registers): Don't set current_thread,
12429 pass the thread to do_windows_store_inferior_registers. Use
12430 ptid from regcache instead of inferior_ptid.
12431
12432 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
12433
12434 * ser-mingw.c (ser_windows_raw): Remove reference to
12435 struct serial::current_timeout.
12436
12437 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
12438
12439 PR tdep/20928
12440 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12441 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12442 (sparc64_fsr_type): Fix %fsr decoding.
12443
12444 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
12445
12446 * python/py-record-btrace.c (btpy_insn_data): Change return type
12447 for Python 2.
12448
12449 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12450
12451 * spu-linux-nat.c (spu_fetch_inferior_registers,
12452 spu_store_inferior_registers): Use ptid from regcache, set and
12453 restore inferior_ptid.
12454 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12455 Likewise.
12456
12457 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
12458
12459 * i386-linux-nat.c (fetch_register, store_register,
12460 i386_linux_fetch_inferior_registers,
12461 i386_linux_store_inferior_registers): Use ptid from regcache.
12462 * ia64-linux-nat.c (ia64_linux_fetch_register,
12463 ia64_linux_store_register): Likewise.
12464 * inf-ptrace.c (inf_ptrace_fetch_register,
12465 inf_ptrace_store_register): Likewise.
12466 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12467 m32r_linux_store_inferior_registers): Likewise.
12468 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12469 m68kbsd_store_inferior_registers): Likewise.
12470 * m68k-linux-nat.c (fetch_register, store_register,
12471 m68k_linux_fetch_inferior_registers,
12472 m68k_linux_store_inferior_registers): Likewise.
12473 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12474 m88kbsd_store_inferior_registers): Likewise.
12475 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12476 mips_fbsd_store_inferior_registers): Likewise.
12477 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12478 mips64_linux_regsets_store_registers): Likewise.
12479 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12480 mipsnbsd_store_inferior_registers): Likewise.
12481 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12482 mips64obsd_store_inferior_registers): Likewise.
12483 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12484 Likewise.
12485 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12486 ppcfbsd_store_inferior_registers): Likewise.
12487 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12488 ppc_linux_store_inferior_registers): Likewise.
12489 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12490 ppcnbsd_store_inferior_registers): Likewise.
12491 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12492 ppcobsd_store_registers): Likewise.
12493 * procfs.c (procfs_fetch_registers, procfs_store_registers):
12494 Likewise.
12495 * ravenscar-thread.c (ravenscar_fetch_registers,
12496 ravenscar_store_registers, ravenscar_prepare_to_store):
12497 Likewise.
12498 * record-btrace.c (record_btrace_fetch_registers,
12499 record_btrace_store_registers, record_btrace_prepare_to_store):
12500 Likewise.
12501 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12502 Lookup inferior using ptid from regcache, instead of
12503 current_inferior.
12504 * remote.c (remote_fetch_registers, remote_store_registers): Use
12505 ptid from regcache.
12506 * rs6000-nat.c (fetch_register, store_register): Likewise.
12507 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12508 s390_linux_store_inferior_registers): Likewise.
12509 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12510 shnbsd_store_inferior_registers): Likewise.
12511 * sol-thread.c (sol_thread_fetch_registers,
12512 sol_thread_store_registers): Likewise.
12513 * sparc-nat.c (sparc_fetch_inferior_registers,
12514 sparc_store_inferior_registers): Likewise.
12515 * tilegx-linux-nat.c (fetch_inferior_registers,
12516 store_inferior_registers): Likewise.
12517 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12518 vaxbsd_store_inferior_registers): Likewise.
12519 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12520 store_xtregs): Likewise.
12521
12522 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12523
12524 PR gdb/14441
12525 * NEWS: Mention support for rvalue references in GDB and python.
12526 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12527 supports both lvalue and rvalue references.
12528
12529 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12530
12531 PR gdb/14441
12532 * gdbtypes.c (rank_one_type): Implement overloading
12533 resolution rules regarding rvalue references.
12534
12535 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12536
12537 PR gdb/14441
12538 * aarch64-tdep.c (aarch64_type_align)
12539 (aarch64_extract_return_value, aarch64_store_return_value): Change
12540 lvalue reference type checks to general reference type checks.
12541 * amd64-tdep.c (amd64_classify): Likewise.
12542 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12543 Likewise.
12544 * arm-tdep.c (arm_type_align, arm_extract_return_value)
12545 (arm_store_return_value): Likewise.
12546 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12547 * c-typeprint.c (c_print_type): Likewise.
12548 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12549 (cplus_number_of_children, cplus_describe_child): Likewise.
12550 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12551 * completer.c (expression_completer): Likewise.
12552 * cp-support.c (make_symbol_overload_list_adl_namespace):
12553 Likewise.
12554 * darwin-nat-info.c (info_mach_region_command): Likewise.
12555 * dwarf2loc.c (entry_data_value_coerce_ref)
12556 (value_of_dwarf_reg_entry): Likewise.
12557 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12558 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12559 Likewise.
12560 * findvar.c (extract_typed_address, store_typed_address):
12561 Likewise.
12562 * gdbtypes.c (rank_one_type): Likewise.
12563 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12564 * infcall.c (value_arg_coerce): Likewise.
12565 * language.c (pointer_type): Likewise.
12566 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12567 Likewise.
12568 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12569 * mn10300-tdep.c (mn10300_type_align): Likewise.
12570 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12571 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12572 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12573 Likewise.
12574 * printcmd.c (print_formatted, x_command): Likewise.
12575 * python/py-type.c (typy_get_composite, typy_template_argument):
12576 Likewise.
12577 * python/py-value.c (valpy_referenced_value)
12578 (valpy_get_dynamic_type, value_has_field): Likewise.
12579 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12580 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12581 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12582 * spu-tdep.c (spu_scalar_value_p): Likewise.
12583 * symtab.c (lookup_symbol_aux): Likewise.
12584 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12585 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12586 Likewise.
12587 * valops.c (value_cast_pointers, value_cast)
12588 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12589 (value_struct_elt, value_struct_elt_bitpos)
12590 (value_find_oload_method_list, find_overload_match)
12591 (value_rtti_indirect_type): Likewise.
12592 * valprint.c (val_print_scalar_type_p, generic_val_print):
12593 Likewise.
12594 * value.c (value_actual_type, value_as_address, unpack_long)
12595 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12596 (coerce_ref): Likewise.
12597 * varobj.c (varobj_get_value_type): Likewise.
12598
12599 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12600
12601 PR gdb/14441
12602 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12603 table of constants.
12604 * python/lib/gdb/command/explore.py: Support exploring values
12605 of rvalue reference types.
12606 * python/lib/gdb/types.py: Implement get_basic_type() for
12607 rvalue reference types.
12608 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12609 constant.
12610 * python/py-value.c (valpy_getitem): Add an rvalue reference
12611 check.
12612 (valpy_reference_value): Add new parameter "refcode".
12613 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12614 New wrappers for valpy_reference_value().
12615 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12616 (gdbpy_invoke_xmethod): Likewise.
12617
12618 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12619
12620 PR gdb/14441
12621 * dwarf2read.c (process_die, read_type_die_1): Handle the
12622 DW_TAG_rvalue_reference_type DIE.
12623 (read_tag_reference_type): Add new parameter "refcode".
12624
12625 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12626
12627 PR gdb/14441
12628 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12629 (c_type_print_modifier, c_type_print_varspec_suffix)
12630 (c_type_print_base): Support printing rvalue reference types.
12631 * c-valprint.c (c_val_print, c_value_print): Support printing
12632 rvalue reference values.
12633
12634 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12635
12636 PR gdb/14441
12637 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12638 typename.
12639 * cp-support.c (replace_typedefs): Handle
12640 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12641 * python/py-type.c (typy_lookup_type): Likewise.
12642
12643 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12644
12645 PR gdb/14441
12646 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12647 * parse.c (insert_type): Change assert statement.
12648 (follow_types): Handle rvalue reference types.
12649 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12650 constant.
12651
12652 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12653
12654 PR gdb/14441
12655 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12656 value_ref() interface.
12657 * c-valprint.c (c_value_print): Likewise.
12658 * infcall.c (value_arg_coerce): Likewise.
12659 * python/py-value.c (valpy_reference_value): Likewise.
12660 * valops.c (value_cast, value_reinterpret_cast)
12661 (value_dynamic_cast, typecmp): Likewise.
12662 (value_ref): Parameterize by kind of return value reference type.
12663 * value.h (value_ref): Add new parameter "refcode".
12664
12665 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12666
12667 PR gdb/14441
12668 * dwarf2read.c (read_tag_reference_type): Use
12669 lookup_lvalue_reference_type() instead of lookup_reference_type().
12670 * eval.c (evaluate_subexp_standard): Likewise.
12671 * f-exp.y: Likewise.
12672 * gdbtypes.c (make_reference_type, lookup_reference_type):
12673 Generalize with rvalue reference types.
12674 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12675 convenience wrappers for lookup_reference_type().
12676 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12677 reference kind parameter.
12678 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12679 wrappers for lookup_reference_type().
12680 * guile/scm-type.c (gdbscm_type_reference): Use
12681 lookup_lvalue_reference_type() instead of lookup_reference_type().
12682 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12683 * parse.c (follow_types): Likewise.
12684 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12685 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12686 Likewise.
12687 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12688 (gdbpy_invoke_xmethod): Likewise.
12689 * stabsread.c: Provide extra argument to make_reference_type()
12690 call.
12691 * valops.c (value_ref, value_rtti_indirect_type): Use
12692 lookup_lvalue_reference_type() instead of lookup_reference_type().
12693
12694 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
12695
12696 PR gdb/14441
12697 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12698 (TYPE_IS_REFERENCE): New macro.
12699 (struct type): Add rvalue_reference_type field.
12700 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12701
12702 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12703
12704 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12705 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12706 New function definition.
12707 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12708 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12709 New function declaration.
12710 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12711 * mi/mi-interp.h: New file.
12712 * solib.c (info_sharedlibrary_command): Replace for loop with
12713 ALL_SO_LIBS macro
12714 * solib.h (update_solib_list): New function declaration.
12715 (so_list_head): Move macro.
12716 * solist.h (ALL_SO_LIBS): New macro.
12717
12718 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
12719
12720 * infcmd.c (post_create_inferior): Remove unused argument in
12721 call to solib_add.
12722 * remote.c (remote_start_remote): Likewise.
12723 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12724 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12725 (enable_break): Likewise.
12726 * solib.c (update_solib_list): Remove unused target argument
12727 and its documentation.
12728 (solib_add): Remove unused target argument. Remove unused
12729 argument in call to update_solib_list.
12730 (info_sharedlibrary_command): Remove unused argument in call
12731 to update_solib_list.
12732 (sharedlibrary_command): Remove unused argument in call to
12733 solib_add.
12734 (handle_solib_event): Likewise.
12735 (reload_shared_libraries): Likewise.
12736 * solib.h (solib_add): Remove unused target argument.
12737
12738 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
12739
12740 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12741 (s390_displaced_step_fixup): Cover relative branches with the
12742 default fixup handling. This fixes lack of support for some
12743 relative branch instructions.
12744
12745 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12746
12747 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12748 ptid from regcache.
12749
12750 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12751
12752 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12753 i386_darwin_store_inferior_registers): Use ptid from regcache.
12754
12755 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12756
12757 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12758 i386bsd_store_inferior_registers): Use ptid from regcache.
12759
12760 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12761
12762 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12763 hppaobsd_store_registers): Use ptid from regcache.
12764
12765 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12766
12767 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12768 hppanbsd_store_registers): Use ptid from regcache.
12769
12770 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12771
12772 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12773 from regcache. Use get_ptrace_pid.
12774
12775 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12776
12777 * corelow.c (get_core_register_section): Use ptid from regcache,
12778 update doc.
12779
12780 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12781
12782 * bsd-uthread.c (bsd_uthread_fetch_registers,
12783 bsd_uthread_store_registers): Use ptid from regcache, set and
12784 restore inferior_ptid.
12785
12786 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12787
12788 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12789 fetch_fp_regs, store_register, store_regs, store_fp_register,
12790 store_fp_regs): Use ptid from regcache.
12791
12792 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12793
12794 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12795 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12796 store_vfp_regs): Use ptid from regcache.
12797
12798 2017-03-17 Pedro Alves <palves@redhat.com>
12799
12800 PR remote/21188
12801 * ser-base.c (ser_base_wait_for): Add comment.
12802 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12803 version.
12804 * ser-unix.c (hardwire_raw): Remove reference to
12805 scb->current_timeout.
12806 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12807 (hardwire_ops): Install ser_base_readchar instead of
12808 hardwire_readchar.
12809 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12810 Remove fields.
12811
12812 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
12813
12814 PR gdb/19637
12815 * python/lib/gdb/printer/bound_registers.py: Add support for
12816 Python 3.
12817
12818 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12819
12820 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12821 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12822 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12823 byte_offset to subobj_byte_offset. Fix the handling of
12824 DWARF_VALUE_STACK on big-endian targets when coming via an
12825 implicit pointer.
12826 (dwarf2_evaluate_loc_desc): Adjust call to
12827 dwarf2_evaluate_loc_desc_full.
12828 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12829 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12830
12831 2017-03-16 Yao Qi <yao.qi@linaro.org>
12832
12833 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12834 and REVSH instructions.
12835
12836 2017-03-16 Yao Qi <yao.qi@linaro.org>
12837
12838 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12839 (arm_record_test): Declare.
12840 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12841 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12842 align with the manual.
12843 (thumb_record_misc): Adjust the code order to align with the
12844 manual.
12845 (thumb2_record_decode_insn_handler): Fix instruction matching.
12846 (instruction_reader_thumb): New class.
12847 (arm_record_test): New function.
12848
12849 2017-03-16 Yao Qi <yao.qi@linaro.org>
12850
12851 * arm-tdep.c (abstract_memory_reader): New class.
12852 (instruction_reader): New class.
12853 (extract_arm_insn): Add argument 'reader'. Callers updated.
12854 (decode_insn): Likewise.
12855
12856 2017-03-16 Doug Evans <dje@google.com>
12857
12858 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12859 member. Change type of TYPE member to SCM. All uses updated.
12860 (lsscm_make_lazy_string_smob): Add assert.
12861 (lsscm_make_lazy_string): Flag bad length values.
12862 (lsscm_elt_type): New function.
12863 (gdbscm_lazy_string_to_value): Rewrite to use
12864 lsscm_safe_lazy_string_to_value.
12865 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12866 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12867 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12868 in incoming type.
12869 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12870 * guile/scm-type.c (tyscm_scm_to_type): New function.
12871
12872 2017-03-15 Doug Evans <dje@google.com>
12873
12874 PR python/17728, python/18439, python/18779
12875 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12876 member. Change type of TYPE member to PyObject *. All uses updated.
12877 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12878 (gdbpy_create_lazy_string_object): Flag bad length values.
12879 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12880 Handle typedefs in incoming type.
12881 (stpy_lazy_string_elt_type): New function.
12882 (gdbpy_extract_lazy_string): Call it.
12883 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12884 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12885 typedefs in incoming type.
12886
12887 2017-03-16 Doug Evans <dje@google.com>
12888
12889 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12890 * guile/scm-type.c (tyscm_scm_to_type): New function.
12891
12892 2017-03-16 Jiong Wang <jiong.wang@arm.com>
12893
12894 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12895 "ULONGEST" for "skip".
12896
12897 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12898
12899 PR gdb/21220
12900 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12901 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12902 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12903 over ptrace peek/poke until end of buffer or error.
12904
12905 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12906
12907 * parse.c (length_of_subexp): Make static.
12908 * parser-defs.h (length_of_subexp): Remove.
12909
12910 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12911
12912 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12913 as well.
12914
12915 2017-03-14 Pedro Alves <palves@redhat.com>
12916
12917 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12918 (main): Use std::unique_ptr. Remove calls to
12919 cp_demangled_name_parse_free.
12920
12921 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12922
12923 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12924 alphabsd_store_inferior_registers): Use regcache->ptid instead
12925 of inferior_ptid.
12926
12927 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12928
12929 * aix-thread.c (aix_thread_fetch_registers,
12930 aix_thread_store_registers): Use regcache->ptid instead of
12931 inferior_ptid.
12932
12933 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12934
12935 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12936 store_gregs_to_thread, fetch_fpregs_from_thread,
12937 store_fpregs_to_thread): Use regcache->ptid instead of
12938 inferior_ptid.
12939
12940 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12941
12942 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12943 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12944 instead of inferior_ptid.
12945
12946 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12947
12948 * target.c (target_fetch_registers, target_store_registers): Add
12949 assert.
12950
12951 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12952
12953 * regcache.h (regcache_get_ptid): New function.
12954 * regcache.c (regcache_get_ptid): New function.
12955
12956 2017-03-13 Mark Wielaard <mark@klomp.org>
12957
12958 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12959
12960 2017-03-10 Keith Seitz <keiths@redhat.com>
12961
12962 PR c++/8218
12963 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12964
12965 2017-03-08 Pedro Alves <palves@redhat.com>
12966
12967 PR gdb/18360
12968 * infrun.c (start_step_over, do_target_resume, resume)
12969 (restart_threads): Assert we're not resuming a thread that is
12970 meant to be stopped.
12971 (infrun_thread_stop_requested_callback): Delete.
12972 (infrun_thread_stop_requested): If the thread is internally
12973 stopped, queue a pending stop event and clear the thread's
12974 inline-frame state.
12975 (handle_stop_requested): New function.
12976 (handle_syscall_event, handle_inferior_event_1): Use
12977 handle_stop_requested.
12978 (handle_stop_requested): New function.
12979 (handle_signal_stop): Set the thread's stop_signal here instead of
12980 at caller.
12981 (finish_step_over): Clear step over info unconditionally.
12982 (handle_signal_stop): If the user had interrupted the event
12983 thread, consider the stop a random signal.
12984 (handle_signal_stop) <signal arrived while stepping over
12985 breakpoint>: Don't restart threads here.
12986 (stop_waiting): Don't clear step-over info here.
12987
12988 2017-03-08 Pedro Alves <palves@redhat.com>
12989
12990 PR 21206
12991 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12992 goes to argument 2, not 1.
12993
12994 2017-03-08 Pedro Alves <palves@redhat.com>
12995
12996 PR cli/21218
12997 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12998 display_gdb_prompt.
12999 (command_line_input): Add comment.
13000
13001 2017-03-08 Pedro Alves <palves@redhat.com>
13002
13003 PR tui/21216
13004 * tui/tui-file.c (tui_file::write): New.
13005 * tui/tui-file.h (tui_file): Override "write".
13006 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13007 factored out from ...
13008 (tui_puts): ... here.
13009 (tui_putc): Use them.
13010 (tui_write): New function.
13011 * tui/tui-io.h (tui_write): Declare.
13012
13013 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
13014
13015 * Makefile.in (SFILES): Replace "environ.c" with
13016 "common/environ.c".
13017 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13018 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
13019 to...
13020 * common/environ.c: ... here.
13021 * environ.h: Moved to...
13022 * common/environ.h: ... here.
13023
13024 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13025
13026 * gdbarch.sh (pstring_ptr): New static function.
13027 (gdbarch_disassembler_options): Use it.
13028 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13029 not valid_disassembler_option->name.
13030 * gdbarch.c: Regenerate.
13031
13032 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
13033
13034 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13035
13036 2017-03-07 Pedro Alves <palves@redhat.com>
13037
13038 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13039
13040 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
13041
13042 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13043 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13044 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13045 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13046
13047 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
13048
13049 * xtensa-linux-nat.c (fetch_gregs): Remove const.
13050
13051 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
13052
13053 * remote.c (remote_add_target_side_commands): Use range-based
13054 for loop.
13055
13056 2017-03-03 Yao Qi <yao.qi@linaro.org>
13057
13058 PR gdb/21165
13059 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13060 value is lazy.
13061 * valprint.c (common_val_print): Likewise.
13062
13063 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
13064
13065 * NEWS: Mention new set/show disassembler-options commands.
13066 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13067 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13068 (prospective_options): New static variable.
13069 (gdb_disassembler::gdb_disassembler): Initialize
13070 m_di.disassembler_options.
13071 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13072 (get_disassembler_options): New function.
13073 (set_disassembler_options): Likewise.
13074 (set_disassembler_options_sfunc): Likewise.
13075 (show_disassembler_options_sfunc): Likewise.
13076 (disassembler_options_completer): Likewise.
13077 (_initialize_disasm): Likewise.
13078 * disasm.h (get_disassembler_options): New prototype.
13079 (set_disassembler_options): Likewise.
13080 * gdbarch.sh (gdbarch_disassembler_options): New variable.
13081 (gdbarch_verify_disassembler_options): Likewise.
13082 * gdbarch.c: Regenerate.
13083 * gdbarch.h: Likewise.
13084 * arm-tdep.c (num_disassembly_options): Delete.
13085 (set_disassembly_style): Likewise.
13086 (arm_disassembler_options): New static variable.
13087 (set_disassembly_style_sfunc): Convert short style name into long
13088 option name. Call set_disassembler_options.
13089 (show_disassembly_style_sfunc): New function.
13090 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13091 set_gdbarch_verify_disassembler_options.
13092 (_initialize_arm_tdep): Delete regnames variable and update callers.
13093 (arm_disassembler_options): Initialize.
13094 (disasm_options): New variable.
13095 (num_disassembly_options): Rename from this...
13096 (num_disassembly_styles): ...to this. Compute by scanning through
13097 disasm_options.
13098 (valid_disassembly_styles): Initialize using disasm_options.
13099 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13100 set_arm_regname_option.
13101 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13102 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13103 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13104 set_gdbarch_verify_disassembler_options.
13105 * s390-tdep.c (s390_disassembler_options): New static variable.
13106 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13107 set_gdbarch_verify_disassembler_options.
13108
13109 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13110
13111 * remote.c (remote_add_target_side_condition): Remove "struct"
13112 keyword from range-based for loop.
13113
13114 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
13115
13116 * remote.c (remote_add_target_side_condition): Use range-based
13117 for loop. Update comment.
13118
13119 2017-02-27 Yao Qi <yao.qi@linaro.org>
13120
13121 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13122
13123 2017-02-26 Alan Hayward <alan.hayward@arm.com>
13124
13125 * regcache.c (regcache_raw_update): New function.
13126 (regcache_raw_read): Move code to regcache_raw_update.
13127 * regcache.h (regcache_raw_update): New declaration.
13128 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13129
13130 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
13131
13132 * dwarf2read.c (create_debug_type_hash_table): Initialize
13133 header.signature and header.type_offset_in_tu.
13134
13135 2017-02-24 Pedro Alves <palves@redhat.com>
13136
13137 * symtab.c (make_file_symbol_completion_list_1): Use
13138 add_symtab_completions.
13139
13140 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13141
13142 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13143
13144 2017-02-24 Alan Hayward <alan.hayward@arm.com>
13145
13146 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13147 I386_MAX_REGISTER_SIZE.
13148 (i386_pseudo_register_write): Likewise.
13149 (i386_process_record): Likewise.
13150 * i387-tdep.c (i387_supply_xsave): Likewise.
13151 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13152 (store_register): Likewise.
13153
13154 2017-02-23 Pedro Alves <palves@redhat.com>
13155
13156 * ada-lang.c: Include "common/function-view.h".
13157 (ada_iterate_over_symbols): Adjust to use function_view as
13158 callback type.
13159 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13160 (ada_make_symbol_completion_list): Use a lambda.
13161 (ada_exc_search_name_matches): Delete.
13162 (name_matches_regex): New.
13163 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13164 * compile/compile-c-support.c: Include "common/function-view.h".
13165 (print_one_macro): Change prototype to accept a ui_file pointer.
13166 (write_macro_definitions): Use a lambda.
13167 * dwarf2read.c: Include "common/function-view.h".
13168 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13169 (dw2_expand_symtabs_matching): Adjust to use function_view as
13170 callback type.
13171 * language.h: Include "common/function-view.h".
13172 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13173 function_view as callback type.
13174 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13175 * linespec.c: Include "common/function-view.h".
13176 (collect_info::add_symbol): New method.
13177 (struct symbol_and_data_callback, iterate_inline_only, struct
13178 symbol_matcher_data, iterate_name_matcher): Delete.
13179 (iterate_over_all_matching_symtabs): Adjust to use function_view
13180 as callback type and lambdas.
13181 (iterate_over_file_blocks): Adjust to use function_view as
13182 callback type.
13183 (decode_compound_collector): Now a class with private fields.
13184 (decode_compound_collector::release_symbols): New method.
13185 (collect_one_symbol): Rename to...
13186 (decode_compound_collector::operator()): ... this and adjust.
13187 (lookup_prefix_sym): decode_compound_collector construction bits
13188 move to decode_compound_collector ctor. Pass the
13189 decode_compound_collector object directly as callback. Remove
13190 cleanups and use decode_compound_collector::release_symbols
13191 instead.
13192 (symtab_collector): Now a class with private fields.
13193 (symtab_collector::release_symtabs): New method.
13194 (add_symtabs_to_list): Rename to...
13195 (symtab_collector::operator()): ... this and adjust.
13196 (collect_symtabs_from_filename): symtab_collector construction
13197 bits move to symtab_collector ctor. Pass the symtab_collector
13198 object directly as callback. Remove cleanups and use
13199 symtab_collector::release_symtabs instead.
13200 (collect_symbols): Delete.
13201 (add_matching_symbols_to_info): Use lambdas.
13202 * macrocmd.c (print_macro_callback): Delete.
13203 (info_macro_command): Use a lambda.
13204 (info_macros_command): Pass print_macro_definition as callable
13205 directly.
13206 (print_one_macro): Remove 'ignore' parameter.
13207 (macro_list_command): Adjust.
13208 * macrotab.c (macro_for_each_data::fn): Now a function_view.
13209 (macro_for_each_data::user_data): Delete field.
13210 (foreach_macro): Adjust to call the function_view.
13211 (macro_for_each): Adjust to use function_view as callback type.
13212 (foreach_macro_in_scope): Adjust to call the function_view.
13213 (macro_for_each_in_scope): Adjust to use function_view as callback
13214 type.
13215 * macrotab.h: Include "common/function-view.h".
13216 (macro_callback_fn): Declare a prototype instead of a pointer.
13217 Remove "user_data" parameter.
13218 (macro_for_each, macro_for_each_in_scope): Adjust to use
13219 function_view as callback type.
13220 * psymtab.c (partial_map_expand_apply)
13221 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13222 Adjust to use function_view as callback type and to return bool.
13223 (psym_expand_symtabs_matching): Adjust to use function_view as
13224 callback types.
13225 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13226 to use function_view as callback type and to return bool.
13227 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13228 callback types.
13229 * symfile.c (expand_symtabs_matching): Adjust to use function_view
13230 as callback types.
13231 * symfile.h: Include "common/function-view.h".
13232 (expand_symtabs_file_matcher_ftype)
13233 (expand_symtabs_symbol_matcher_ftype)
13234 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13235 return bool.
13236 (quick_symbol_functions::map_symtabs_matching_filename)
13237 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13238 function_view as callback type and return bool.
13239 (expand_symtabs_matching): Adjust to use function_view as callback
13240 type.
13241 (maintenance_expand_name_matcher)
13242 (maintenance_expand_file_matcher): Delete.
13243 (maintenance_expand_symtabs): Use lambdas.
13244 * symtab.c (iterate_over_some_symtabs): Adjust to use
13245 function_view as callback types and return bool.
13246 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
13247 of a cleanup.
13248 (lookup_symtab_callback): Delete.
13249 (lookup_symtab): Use a lambda.
13250 (iterate_over_symbols): Adjust to use function_view as callback
13251 type.
13252 (struct search_symbols_data, search_symbols_file_matches)
13253 (search_symbols_name_matches): Delete.
13254 (search_symbols): Use a pair of lambdas.
13255 (struct add_name_data, add_macro_name, symbol_completion_matcher)
13256 (symtab_expansion_callback): Delete.
13257 (default_make_symbol_completion_list_break_on_1): Use lambdas.
13258 * symtab.h: Include "common/function-view.h".
13259 (iterate_over_some_symtabs): Adjust to use function_view as
13260 callback type and return bool.
13261 (iterate_over_symtabs): Adjust to use function_view as callback
13262 type.
13263 (symbol_found_callback_ftype): Remove 'data' parameter and return
13264 bool.
13265 (iterate_over_symbols): Adjust to use function_view as callback
13266 type.
13267
13268 2017-02-23 Pedro Alves <palves@redhat.com>
13269
13270 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13271 (%.o) <unittests/%.c>: New pattern.
13272 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13273 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13274 * common/function-view.h: New file.
13275 * unittests/function-view-selftests.c: New file.
13276 * configure: Regenerate.
13277
13278 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
13279
13280 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13281 inferior_ptid.
13282 * go32-nat.c (go32_thread_alive): Likewise.
13283
13284 2017-02-23 Yao Qi <yao.qi@linaro.org>
13285
13286 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13287 delete.
13288
13289 2017-02-23 Yao Qi <yao.qi@linaro.org>
13290
13291 * varobj.c (varobj_clear_saved_item): Use delete instead of
13292 xfree.
13293 (update_dynamic_varobj_children): Likewise.
13294
13295 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13296
13297 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13298
13299 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
13300
13301 * common/enum-flags.h (enum_flags::enum_flags): Initialize
13302 m_enum_value to 0 in default constructor.
13303
13304 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
13305
13306 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
13307 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
13308 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
13309 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
13310 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
13311 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
13312 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
13313 IS_STORE_CONDITIONAL_INSN.
13314
13315 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13316
13317 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
13318
13319 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13320
13321 * NEWS (Changes since GDB 7.12): Add DWARF-5.
13322
13323 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13324
13325 * dwarf2read.c (skip_one_die, read_attribute_value)
13326 (dwarf2_const_value_attr, dump_die_shallow)
13327 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
13328 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
13329
13330 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13331
13332 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
13333 (dwarf_parse_macro_header): Accept DWARF version 5.
13334 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
13335
13336 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13337
13338 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
13339 DW_AT_GNU_*.
13340 * common/common-exceptions.h (enum errors): Likewise.
13341 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
13342 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
13343 (dwarf_expr_context::execute_stack_op): Likewise.
13344 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
13345 Likewise.
13346 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
13347 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
13348 (show_entry_values_debug, call_site_to_target_addr)
13349 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
13350 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
13351 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
13352 (value_of_dwarf_block_entry, indirect_pieced_value)
13353 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
13354 (disassemble_dwarf_expression): Likewise.
13355 * dwarf2read.c (process_die, inherit_abstract_dies)
13356 (read_call_site_scope): Likewise.
13357 * gdbtypes.h (struct func_type, struct call_site_parameter)
13358 (struct call_site): Likewise.
13359 * stack.c (read_frame_arg): Likewise.
13360 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
13361
13362 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13363
13364 * defs.h (read_unsigned_leb128): New declaration.
13365 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13366 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13367 (dwarf2_find_location_expression): Call also
13368 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
13369 * dwarf2loc.h (dwarf2_version): New declaration.
13370 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13371 rnglists.
13372 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13373 .debug_rnglists.
13374 (struct dwop_section_names): Add loclists_dwo.
13375 (dwop_section_names): Add .debug_loclists.dwo.
13376 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13377 (struct dwarf2_per_cu_data): Add dwarf_version.
13378 (struct dwo_sections): Add loclists.
13379 (struct attr_abbrev): Add implicit_const.
13380 (read_indirect_line_string): New declaration.
13381 (read_unsigned_leb128): Delete declaration.
13382 (rcuh_kind): New definition.
13383 (read_and_check_comp_unit_head): Change parameter
13384 is_debug_types_section to section_kind.
13385 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13386 (read_comp_unit_head): Change parameter abfd to section, add parameter
13387 section_kind. Handle DWARF-5.
13388 (error_check_comp_unit_head): Accept also DWARF version 5.
13389 (read_and_check_comp_unit_head): Change parameter
13390 is_debug_types_section to section_kind.
13391 (read_and_check_type_unit_head): Delete function.
13392 (read_abbrev_offset): Handle DWARF-5.
13393 (create_debug_type_hash_table): Add parameter section_kind. Process
13394 only DW_UT_type. Use signature and type_offset_in_tu from struct
13395 comp_unit_head.
13396 (create_debug_types_hash_table): Update create_debug_type_hash_table
13397 caller.
13398 (create_all_type_units): Call create_debug_type_hash_table.
13399 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13400 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13401 caller.
13402 (skip_one_die): Handle DW_FORM_implicit_const.
13403 (dwarf2_rnglists_process): New function.
13404 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13405 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13406 (read_attribute_value): Handle DW_FORM_implicit_const,
13407 DW_FORM_line_strp.
13408 (read_attribute): Handle DW_FORM_implicit_const.
13409 (read_indirect_string_at_offset_from): New function from
13410 read_indirect_string_at_offset.
13411 (read_indirect_string_at_offset): Call
13412 read_indirect_string_at_offset_from.
13413 (read_indirect_line_string_at_offset): New function.
13414 (read_indirect_string): New function comment.
13415 (read_indirect_line_string): New function.
13416 (read_unsigned_leb128): Make it global.
13417 (dwarf2_string_attr): Handle DWARF-5.
13418 (add_include_dir_stub, read_formatted_entries): New functions.
13419 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13420 Handle DWARF-5.
13421 (per_cu_header_read_in): Update read_comp_unit_head caller.
13422 (dwarf2_version): New function.
13423 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13424 rnglists.
13425 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13426 fields.
13427
13428 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13429
13430 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13431
13432 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13433
13434 * dwarf2read.c (dwarf2_ranges_process): New function from
13435 dwarf2_ranges_read.
13436 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13437 dwarf2_ranges_process.
13438
13439 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13440
13441 * dwarf2read.c (create_debug_type_hash_table): New function from
13442 create_debug_types_hash_table.
13443 (create_debug_types_hash_table): Call create_debug_type_hash_table.
13444 (create_all_type_units, open_and_init_dwo_file): Update
13445 create_debug_types_hash_table callers.
13446
13447 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13448
13449 PR gdb/16188
13450 * fork-child.c (trace_start_error): Fix thinko. va_end should
13451 refer to 'ap', not 'args'.
13452
13453 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
13454 Pedro Alves <palves@redhat.com>
13455
13456 PR gdb/16188
13457 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13458 calls succeeded.
13459 * fork-child.c (trace_start_error): New function.
13460 (trace_start_error_with_name): Likewise.
13461 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13462 * inf-ptrace.c (inf_ptrace_me): Likewise.
13463 * inferior.h (trace_start_error): New prototype.
13464 (trace_start_error_with_name): Likewise.
13465
13466 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
13467
13468 PR gdb/21164
13469 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13470 NULL before using it.
13471 * symmisc.c (maintenance_print_symbols): Likewise.
13472 (maintenance_print_msymbols): Likewise.
13473
13474 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13475
13476 * NEWS: Add record Python bindings entry.
13477
13478 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13479
13480 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13481 py-record-full.o.
13482 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13483 * python/py-record-btrace.c, python/py-record-btrace.h,
13484 python/py-record-full.c, python/py-record-full.h: New file.
13485 * python/py-record.c: Add include for py-record-btrace.h and
13486 py-record-full.h.
13487 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13488 recpy_instruction_history, recpy_function_call_history, recpy_begin,
13489 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13490 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13491 New definition.
13492 (gdbpy_initialize_btrace): New export.
13493 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13494
13495 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13496
13497 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13498 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13499 * python/py-record.c: New file.
13500 * python/python-internal.h (gdbpy_start_recording,
13501 gdbpy_current_recording, gdpy_stop_recording,
13502 gdbpy_initialize_record): New export.
13503 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13504 (python_GdbMethods): Add gdbpy_start_recording,
13505 gdbpy_current_recording and gdbpy_stop_recording.
13506
13507 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13508
13509 * record-btrace.c (record_btrace_record_method): New function.
13510 (init_record_btrace_ops): Initialize to_record_method.
13511 * record-full.c (record_full_record_method): New function.
13512 (init_record_full_ops, init_record_full_core_ops): Add
13513 record_full_record_method.
13514 * record.h (enum record_method): New enum.
13515 * target-debug.h (target_debug_print_enum_record_method: New define.
13516 * target-delegates.c: Regenerate.
13517 * target.c (target_record_method): New function.
13518 * target.h: Include record.h.
13519 (struct target_ops) <to_record_method>: New field.
13520 (target_record_method): New export.
13521
13522 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13523
13524 * record.h (record_start, record_stop): New export.
13525 * record.c (record_start, record_stop): New function.
13526
13527 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13528
13529 * btrace.c (btrace_fetch): Copy function call segments pointer
13530 into a vector.
13531 (btrace_clear): Clear the vector.
13532 (btrace_find_insn_by_number): Use binary search to find the correct
13533 function call segment.
13534 * btrace.h (brace_fun_p): New typedef.
13535 (struct btrace_thread_info) <functions>: New field.
13536
13537 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13538
13539 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13540 * btrace.c (btrace_decode_error): ... here. New function.
13541 * btrace.h (btrace_decode_error): New export.
13542
13543 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
13544
13545 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13546 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13547 btrace_find_insn_by_number): Remove special case for gaps.
13548 * btrace.h (btrace_insn_get_error): New export.
13549 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13550 * record-btrace.c (btrace_insn_history): Print number for gaps.
13551 (record_btrace_info, record_btrace_goto): Handle gaps.
13552
13553 2017-02-14 Tom Tromey <tom@tromey.com>
13554
13555 PR python/13598:
13556 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13557 event.
13558 * python/py-evts.c (gdbpy_initialize_py_events): Add
13559 before_prompt registry.
13560 * python/py-events.h (events_object) <before_prompt>: New field.
13561
13562 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
13563
13564 * btrace.c (ftrace_new_switch): Preserve up link and flags.
13565
13566 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
13567
13568 * symfile (_initialize_symfile): Add usage text to the load command's
13569 help text.
13570
13571 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
13572
13573 * utils.c (defaulted_query): Don't query on secondary UIs.
13574
13575 2017-02-10 Tom Tromey <tom@tromey.com>
13576
13577 * rust-lang.c (rust_get_disr_info): Remove unused variable.
13578
13579 2017-02-10 Tom Tromey <tom@tromey.com>
13580
13581 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13582 "cleanup" local.
13583 * python/py-type.c (typy_legacy_template_argument): Remove
13584 unnecessary "cleanup" local.
13585
13586 2017-02-10 Tom Tromey <tom@tromey.com>
13587
13588 * python/python.c (do_start_initialization): New function, from
13589 _initialize_python.
13590 (_initialize_python): Call do_start_initialization.
13591 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13592 goto.
13593
13594 2017-02-10 Tom Tromey <tom@tromey.com>
13595
13596 * python/py-prettyprint.c (pretty_print_one_value): Use
13597 gdbpy_ref.
13598
13599 2017-02-10 Tom Tromey <tom@tromey.com>
13600
13601 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13602 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13603 gdbpy_ref.
13604 * python/py-type.c (field_new): Use gdbpy_ref.
13605 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13606 gdbpy_ref.
13607 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13608 (py_free_pspace): Likewise.
13609 (pspace_to_pspace_object): Likewise.
13610 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13611 (py_free_objfile): Likewise.
13612 (objfile_to_objfile_object): Likewise.
13613 * python/py-inferior.c (delete_thread_object): Use
13614 gdbpy_ref.
13615 (infpy_read_memory): Likewise.
13616 (py_free_inferior): Likewise.
13617 * python/py-evtregistry.c (create_eventregistry_object): Use
13618 gdbpy_ref.
13619 * python/py-event.c (create_event_object): Use gdbpy_ref.
13620
13621 2017-02-10 Tom Tromey <tom@tromey.com>
13622
13623 * python/py-ref.h (gdbpy_ref_policy): Now a template.
13624 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13625 used.
13626 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13627 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13628 python/py-exitedevent.c, python/py-finishbreakpoint.c,
13629 python/py-framefilter.c, python/py-function.c,
13630 python/py-inferior.c, python/py-infevents.c,
13631 python/py-linetable.c, python/py-newobjfileevent.c,
13632 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13633 python/py-signalevent.c, python/py-stopevent.c,
13634 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13635 python/py-unwind.c, python/py-utils.c, python/py-value.c,
13636 python/py-varobj.c, python/py-xmethods.c, python/python.c,
13637 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13638
13639 2017-02-10 Tom Tromey <tom@tromey.com>
13640
13641 * ui-out.h (ui_out_emit_type): New class.
13642 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13643 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13644 and ui_out_emit_tuple.
13645 (enumerate_locals): Likewise.
13646 (py_mi_print_variables, py_print_locals, py_print_args): Use
13647 ui_out_emit_list.
13648 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13649 ui_out_emit_list.
13650 * common/gdb_optional.h: New file.
13651
13652 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13653
13654 * MAINTAINERS (Write After Approval): Update my e-mail address.
13655
13656 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
13657
13658 PR gdb/21122
13659 * breakpoint.c (_initialize_breakpoint): Update the help description
13660 of the 'commands' command to indicate that it takes a list argument.
13661
13662 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
13663
13664 * interps.c (current_interp_set_logging): Remove "return".
13665
13666 2017-02-09 Gary Benson <gbenson@redhat.com>
13667
13668 * symtab.c (add_symtab_completions): Prevent NULL pointer
13669 dereference.
13670
13671 2017-02-08 Pedro Alves <palves@redhat.com>
13672
13673 * interps.c (interp::interp): Remove reference to quiet_p.
13674 (interp_set): Make static. Remove dead "Switching to" output
13675 code.
13676 (interp_quiet_p, interp_set_quiet): Delete.
13677 (interpreter_exec_cmd): Don't set the interpreter quiet.
13678 * interps.h (interp_quiet_p): Make static.
13679 (class interp) <quiet_p>: Remove field
13680
13681 2017-02-08 Jerome Guitton <guitton@adacore.com>
13682
13683 * cli/cli-decode.c (find_command_name_length): Make it extern.
13684 * cli/cli-decode.h (find_command_name_length): Declare.
13685 * cli/cli-script.c (command_name_equals, line_first_arg):
13686 New functions.
13687 (process_next_line): Use cli-decode to parse command names.
13688 (build_command_line): Make args a constant pointer.
13689
13690 2017-02-08 Jerome Guitton <guitton@adacore.com>
13691
13692 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13693 Remove case-insensitive search.
13694
13695 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
13696
13697 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13698 at the end of the line. Avoids an ARI warning.
13699
13700 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
13701
13702 * NEWS: Mention support for record/replay of Intel 64 rdrand and
13703 rdseed instructions.
13704 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13705
13706 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
13707
13708 PR tdep/20936
13709 Provide and use sparc32 and sparc64 target description XML files.
13710 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13711 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13712 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13713 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13714 * features/sparc/sparc32-solaris.xml: New file.
13715 * features/sparc/sparc64-solaris.xml: New file.
13716 * features/sparc/sparc32-solaris.c: Generated.
13717 * features/sparc/sparc64-solaris.c: Generated.
13718 * sparc-tdep.h: Account for differences in target descriptions.
13719 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13720 (sparc32_register_type): Use target provided registers.
13721 (validate_tdesc_registers): New function.
13722 (sparc32_gdbarch_init): Use tdesc_has_registers.
13723 Set pseudoregister functions.
13724 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13725 (sparc64_register_type): Use target provided registers.
13726 (sparc64_init_abi): Set pseudoregister functions.
13727
13728 2017-02-03 Tom Tromey <tom@tromey.com>
13729
13730 PR rust/21097:
13731 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13732 with a single member.
13733
13734 2017-02-03 Pedro Alves <palves@redhat.com>
13735
13736 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13737 (cli_interp_base::~cli_interp_base): New.
13738 (cli_interp): New struct.
13739 (as_cli_interp): Cast the interp itself to cli_interp.
13740 (cli_interpreter_pre_command_loop): Rename to ...
13741 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
13742 parameter.
13743 (cli_interpreter_init): Rename to ...
13744 (cli_interp::init): ... this. Remove 'self' parameter. Use
13745 boolean. Make extern.
13746 (cli_interpreter_resume): Rename to ...
13747 (cli_interp::resume): ... this. Remove 'data' parameter. Make
13748 extern.
13749 (cli_interpreter_suspend): Rename to ...
13750 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
13751 extern.
13752 (cli_interpreter_exec): Rename to ...
13753 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13754 extern.
13755 (cli_interpreter_supports_command_editing): Rename to ...
13756 (cli_interp_base::supports_command_editing): ... this. Remove
13757 'interp' parameter. Make extern.
13758 (cli_ui_out): Rename to ...
13759 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13760 Make extern.
13761 (cli_set_logging): Rename to ...
13762 (cli_interp_base::set_logging): ... this. Remove 'interp'
13763 parameter. Make extern.
13764 (cli_interp_procs): Delete.
13765 (cli_interp_factory): Adjust to use "new".
13766 * cli/cli-interp.h: Include "interps.h".
13767 (struct cli_interp_base): New struct.
13768 * interps.c (struct interp): Delete. Fields moved to interps.h.
13769 (interp_new): Delete.
13770 (interp::interp, interp::~interp): New.
13771 (interp_set): Use bool, and return void. Assume the interpreter
13772 has suspend, init and resume methods, and that the all return
13773 void.
13774 (set_top_level_interpreter): interp_set returns void.
13775 (interp_ui_out): Adapt.
13776 (current_interp_set_logging): Adapt.
13777 (interp_data): Delete.
13778 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13779 (interp_exec): Adapt.
13780 (top_level_interpreter_data): Delete.
13781 * interps.h (interp_init_ftype, interp_resume_ftype)
13782 (interp_suspend_ftype, interp_exec_ftype)
13783 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13784 (class interp): New.
13785 (interp_new): Delete.
13786 (interp_set): Now returns void. Use bool.
13787 (interp_data, top_level_interpreter_data): Delete.
13788 * mi/mi-common.h: Include interps.h.
13789 (class mi_interp): Inherit from interp. Define a ctor. Declare
13790 init, resume, suspect, exec, interp_ui_out, set_logging and
13791 pre_command_loop methods.
13792 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13793 (mi_interpreter_init): Rename to ...
13794 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13795 bool, return void and make extern. Adjust.
13796 (mi_interpreter_resume): ... Rename to ...
13797 (mi_interp::resume): ... this. Remove the 'data' parameter,
13798 return void and make extern. Adjust.
13799 (mi_interpreter_suspend): ... Rename to ...
13800 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13801 return void and make extern. Adjust.
13802 (mi_interpreter_exec): ... Rename to ...
13803 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13804 extern. Adjust.
13805 (mi_interpreter_pre_command_loop): ... Rename to ...
13806 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13807 parameter and make extern.
13808 (mi_on_normal_stop_1): Adjust.
13809 (mi_ui_out): Rename to ...
13810 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13811 parameter and make extern. Adjust.
13812 (mi_set_logging): Rename to ...
13813 (mi_interp::set_logging): ... this. Remove the 'interp'
13814 parameter and make extern. Adjust.
13815 (mi_interp_procs): Delete.
13816 (mi_interp_factory): Adjust to use 'new'.
13817 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13818 (mi_print_exception, mi_execute_command, mi_load_progress):
13819 Adjust.
13820 * tui/tui-interp.c (tui_interp): New class.
13821 (as_tui_interp): Return a tui_interp pointer.
13822 (tui_on_normal_stop, tui_on_signal_received)
13823 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13824 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13825 to use interp::interp_ui_out.
13826 (tui_init): Rename to ...
13827 (tui_interp::init): ... this. Remove the 'self' parameter, use
13828 bool, return void and make extern. Adjust.
13829 (tui_resume): Rename to ...
13830 (tui_interp::resume): ... this. Remove the 'data' parameter,
13831 return void and make extern. Adjust.
13832 (tui_suspend): Rename to ...
13833 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13834 return void and make extern. Adjust.
13835 (tui_ui_out): Rename to ...
13836 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13837 parameter, and make extern. Adjust.
13838 (tui_exec): Rename to ...
13839 (tui_interp::exec): ... this. Remove the 'data' parameter and
13840 make extern.
13841 (tui_interp_procs): Delete.
13842 (tui_interp_factory): Use "new".
13843
13844 2017-02-02 Tom Tromey <tom@tromey.com>
13845
13846 * rust-exp.y (ends_raw_string, space_then_number)
13847 (rust_identifier_start_p): Return bool.
13848 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13849 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13850 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13851 (rust_chartype_p): Return bool.
13852 (val_print_struct, rust_print_struct_def, rust_print_type):
13853 Update.
13854 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13855 Return bool.
13856
13857 2017-02-02 Tom Tromey <tom@tromey.com>
13858
13859 * rust-lang.c: Reindent.
13860
13861 2017-02-02 Tom Tromey <tom@tromey.com>
13862
13863 * rust-lang.h (rust_crate_for_block): Update.
13864 * rust-lang.c (rust_crate_for_block): Return std::string.
13865 (rust_get_disr_info): Use std:;string, not
13866 gdb::unique_xmalloc_ptr.
13867 * rust-exp.y (crate_name): Update.
13868
13869 2017-02-02 Pedro Alves <palves@redhat.com>
13870
13871 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13872 field out of gdb_disassembler_test and make it static.
13873
13874 2017-02-02 Pedro Alves <palves@redhat.com>
13875
13876 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13877 mi1_interp and mi_interp fields.
13878
13879 2017-02-02 Pedro Alves <palves@redhat.com>
13880
13881 * cli/cli-interp.c (struct saved_output_files, saved_output):
13882 Moved from cli/cli-logging.c.
13883 (cli_set_logging): New function.
13884 (cli_interp_procs): Install cli_set_logging.
13885 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13886 Declare.
13887 * cli/cli-logging.c (struct saved_output_files, saved_output):
13888 Moved to cli/cli-interp.c.
13889 (pop_output_files): Don't save outputs here.
13890 (make_logging_output): New function.
13891 (handle_redirections): Don't build tee nor save previous outputs
13892 here.
13893 * interps.c (current_interp_set_logging): Change prototype.
13894 Assume there's always a set_logging_proc method installed.
13895 * interps.h (interp_set_logging_ftype): Change prototype.
13896 (current_interp_set_logging): Change prototype and adjust comment.
13897 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13898 use make_logging_output.
13899 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13900 2017-02-02 Pedro Alves <palves@redhat.com>
13901
13902 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13903 from ...
13904 (set_logging_overwrite): ... here.
13905 (logging_no_redirect_file): Delete.
13906 (set_logging_redirect): Don't handle redirection on the fly.
13907 Instead warn that "logging off" / "logging on" is necessary.
13908 (pop_output_files): Delete references to logging_no_redirect_file.
13909 (show_logging_command): Always speak in terms of what will happen
13910 once logging is reenabled.
13911
13912 2017-02-02 Pedro Alves <palves@redhat.com>
13913
13914 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13915
13916 2017-02-02 Pedro Alves <palves@redhat.com>
13917
13918 * disasm.c (gdb_pretty_print_insn): Rename to ...
13919 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13920 Remove gdbarch parameter. Adapt to clear the object's buffers
13921 instead of allocating new buffers, and to print using the object's
13922 gdb_disassembler instead of calling gdb_print_insn.
13923 (dump_insns): Use gdb_pretty_print_disassembler.
13924 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13925 (gdb_pretty_print_disassembler): New class.
13926 * record-btrace.c (btrace_insn_history): Use
13927 gdb_pretty_print_disassembler.
13928
13929 2017-02-02 Pedro Alves <palves@redhat.com>
13930
13931 * ada-lang.c (type_as_string): Use string_file.
13932 * ada-valprint.c (ada_print_floating): Use string_file.
13933 * ada-varobj.c (ada_varobj_scalar_image)
13934 (ada_varobj_get_value_image): Use string_file.
13935 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13936 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13937 * breakpoint.c (update_inserted_breakpoint_locations)
13938 (insert_breakpoint_locations, reattach_breakpoints)
13939 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13940 (print_it_watchpoint): Use string_file.
13941 (save_breakpoints): Use stdio_file.
13942 * c-exp.y (oper): Use string_file.
13943 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13944 tee_file.
13945 (pop_output_files): Use delete.
13946 (handle_redirections): Use stdio_file and tee_file.
13947 * cli/cli-setshow.c (do_show_command): Use string_file.
13948 * compile/compile-c-support.c (c_compute_program): Use
13949 string_file.
13950 * compile/compile-c-symbols.c (generate_vla_size): Take a
13951 'string_file &' instead of a 'ui_file *'.
13952 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13953 of a 'ui_file *'. Use string_file.
13954 (generate_c_for_variable_locations): Take a 'string_file &'
13955 instead of a 'ui_file *'.
13956 * compile/compile-internal.h (generate_c_for_for_one_variable):
13957 Take a 'string_file &' instead of a 'ui_file *'.
13958 * compile/compile-loc2c.c (push, pushf, unary, binary)
13959 (print_label, pushf_register_address, pushf_register)
13960 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13961 'ui_file *'. Adjust.
13962 * compile/compile.c (compile_to_object): Use string_file.
13963 * compile/compile.h (compile_dwarf_expr_to_c)
13964 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13965 'ui_file *'.
13966 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13967 (replace_typedefs_qualified_name): Use string_file and
13968 obstack_copy0.
13969 * disasm.c (gdb_pretty_print_insn): Use string_file.
13970 (gdb_disassembly): Adjust reference the null_stream global.
13971 (do_ui_file_delete): Delete.
13972 (gdb_insn_length): Use null_stream.
13973 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13974 * dwarf2loc.c (dwarf2_compile_property_to_c)
13975 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13976 'string_file &' instead of a 'ui_file *'.
13977 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13978 * dwarf2read.c (do_ui_file_peek_last): Delete.
13979 (dwarf2_compute_name): Use string_file.
13980 * event-top.c (gdb_setup_readline): Use stdio_file.
13981 * gdbarch.sh (verify_gdbarch): Use string_file.
13982 * gdbtypes.c (safe_parse_type): Use null_stream.
13983 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13984 string_file.
13985 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13986 'string_file *' instead of a 'ui_file *'.
13987 (gdbscm_arch_disassemble): Use string_file.
13988 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13989 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13990 inherits from ui_file.
13991 (ioscm_file_port_delete, ioscm_file_port_rewind)
13992 (ioscm_file_port_put): Delete.
13993 (ioscm_file_port_write): Rename to ...
13994 (ioscm_file_port::write): ... this. Remove file_port_magic
13995 checks.
13996 (ioscm_file_port_new): Delete.
13997 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13998 ui_file_up.
13999 * guile/scm-type.c (tyscm_type_name): Use string_file.
14000 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14001 Use string_file.
14002 * infcmd.c (print_return_value_1): Use string_file.
14003 * infrun.c (print_target_wait_results): Use string_file.
14004 * language.c (add_language): Use string_file.
14005 * location.c (explicit_to_string_internal): Use string_file.
14006 * main.c (captured_main_1): Use null_file.
14007 * maint.c (maintenance_print_architecture): Use stdio_file.
14008 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14009 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14010 event_channel>: Change type to mi_console_file pointer.
14011 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14012 (mi_console_file_delete): Delete.
14013 (struct mi_console_file): Delete.
14014 (mi_console_file_magic): Delete.
14015 (mi_console_file_new): Delete.
14016 (mi_console_file::mi_console_file): New.
14017 (mi_console_file_delete): Delete.
14018 (mi_console_file_fputs): Delete.
14019 (mi_console_file::write): New.
14020 (mi_console_raw_packet): Delete.
14021 (mi_console_file::flush): New.
14022 (mi_console_file_flush): Delete.
14023 (mi_console_set_raw): Rename to ...
14024 (mi_console_file::set_raw): ... this.
14025 * mi/mi-console.h (class mi_console_file): New class.
14026 (mi_console_file_new, mi_console_set_raw): Delete.
14027 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14028 (mi_set_logging): Use delete and tee_file. Adjust.
14029 * mi/mi-main.c (output_register): Use string_file.
14030 (mi_cmd_data_evaluate_expression): Use string_file.
14031 (mi_cmd_data_read_memory): Use string_file.
14032 (mi_cmd_execute, print_variable_or_computed): Use string_file.
14033 * mi/mi-out.c (mi_ui_out::main_stream): New.
14034 (mi_ui_out::rewind): Use main_stream and
14035 string_file.
14036 (mi_ui_out::put): Use main_stream and string_file.
14037 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14038 Allocate a 'string_file' instead.
14039 (mi_out_new): Don't allocate a mem_fileopen stream here.
14040 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14041 (mi_ui_out::main_stream): Declare method.
14042 * printcmd.c (eval_command): Use string_file.
14043 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14044 * python/py-arch.c (archpy_disassemble): Use string_file.
14045 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14046 * python/py-frame.c (frapy_str): Use string_file.
14047 * python/py-framefilter.c (py_print_type, py_print_single_arg):
14048 Use string_file.
14049 * python/py-type.c (typy_str): Use string_file.
14050 * python/py-unwind.c (unwind_infopy_str): Use string_file.
14051 * python/py-value.c (valpy_str): Use string_file.
14052 * record-btrace.c (btrace_insn_history): Use string_file.
14053 * regcache.c (regcache_print): Use stdio_file.
14054 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14055 * remote.c (escape_buffer): Use string_file.
14056 * rust-lang.c (rust_get_disr_info): Use string_file.
14057 * serial.c (serial_open_ops_1): Use stdio_file.
14058 (do_serial_close): Use delete.
14059 * stack.c (print_frame_arg): Use string_file.
14060 (print_frame_args): Remove local mem_fileopen stream, not used.
14061 (print_frame): Use string_file.
14062 * symmisc.c (maintenance_print_symbols): Use stdio_file.
14063 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14064 Take a 'string_file *' instead of a 'ui_file *'.
14065 * top.c (new_ui): Use stdio_file and stderr_file.
14066 (free_ui): Use delete.
14067 (execute_command_to_string): Use string_file.
14068 (quit_confirm): Use string_file.
14069 * tracepoint.c (collection_list::append_exp): Use string_file.
14070 * tui/tui-disasm.c (tui_disassemble): Use string_file.
14071 * tui/tui-file.c: Don't include "ui-file.h".
14072 (enum streamtype, struct tui_stream): Delete.
14073 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14074 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14075 (tui_file::tui_file): New method.
14076 (tui_file_fputs): Delete.
14077 (tui_file_get_strbuf): Delete.
14078 (tui_file::puts): New method.
14079 (tui_file_adjust_strbuf): Delete.
14080 (tui_file_flush): Delete.
14081 (tui_file::flush): New method.
14082 * tui/tui-file.h: Tweak intro comment.
14083 Include ui-file.h.
14084 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14085 (tui_file_adjust_strbuf): Delete declarations.
14086 (class tui_file): New class.
14087 * tui/tui-io.c (tui_initialize_io): Use tui_file.
14088 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14089 (tui_register_format): Use string_stream.
14090 * tui/tui-stack.c (tui_make_status_line): Use string_file.
14091 (tui_get_function_from_frame): Use string_file.
14092 * typeprint.c (type_to_string): Use string_file.
14093 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14094 (null_stream): New global.
14095 (ui_file_delete): Delete.
14096 (ui_file::ui_file): New.
14097 (null_file_isatty): Delete.
14098 (ui_file::~ui_file): New.
14099 (null_file_rewind): Delete.
14100 (ui_file::printf): New.
14101 (null_file_put): Delete.
14102 (null_file_flush): Delete.
14103 (ui_file::putstr): New.
14104 (null_file_write): Delete.
14105 (ui_file::putstrn): New.
14106 (null_file_read): Delete.
14107 (ui_file::putc): New.
14108 (null_file_fputs): Delete.
14109 (null_file_write_async_safe): Delete.
14110 (ui_file::vprintf): New.
14111 (null_file_delete): Delete.
14112 (null_file::write): New.
14113 (null_file_fseek): Delete.
14114 (null_file::puts): New.
14115 (ui_file_data): Delete.
14116 (null_file::write_async_safe): New.
14117 (gdb_flush, ui_file_isatty): Adjust.
14118 (ui_file_put, ui_file_rewind): Delete.
14119 (ui_file_write): Adjust.
14120 (ui_file_write_for_put): Delete.
14121 (ui_file_write_async_safe, ui_file_read): Adjust.
14122 (ui_file_fseek): Delete.
14123 (fputs_unfiltered): Adjust.
14124 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14125 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14126 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14127 (set_ui_file_data): Delete.
14128 (string_file::~string_file, string_file::write)
14129 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14130 (do_ui_file_as_string, ui_file_as_string): Delete.
14131 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14132 (struct mem_file): Delete.
14133 (mem_file_new): Delete.
14134 (stdio_file::stdio_file): New.
14135 (mem_file_delete): Delete.
14136 (stdio_file::stdio_file): New.
14137 (mem_fileopen): Delete.
14138 (stdio_file::~stdio_file): New.
14139 (mem_file_rewind): Delete.
14140 (stdio_file::set_stream): New.
14141 (mem_file_put): Delete.
14142 (stdio_file::open): New.
14143 (mem_file_write): Delete.
14144 (stdio_file_magic, struct stdio_file): Delete.
14145 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14146 (stdio_file::flush): New.
14147 (stdio_file_read): Rename to ...
14148 (stdio_file::read): ... this. Adjust.
14149 (stdio_file_write): Rename to ...
14150 (stdio_file::write): ... this. Adjust.
14151 (stdio_file_write_async_safe): Rename to ...
14152 (stdio_file::write_async_safe) ... this. Adjust.
14153 (stdio_file_fputs): Rename to ...
14154 (stdio_file::puts) ... this. Adjust.
14155 (stdio_file_isatty): Delete.
14156 (stdio_file_fseek): Delete.
14157 (stdio_file::isatty): New.
14158 (stderr_file_write): Rename to ...
14159 (stderr_file::write) ... this. Adjust.
14160 (stderr_file_fputs): Rename to ...
14161 (stderr_file::puts) ... this. Adjust.
14162 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14163 (stderr_file::stderr_file): New.
14164 (tee_file_magic): Delete.
14165 (struct tee_file): Delete.
14166 (tee_file::tee_file): New.
14167 (tee_file_new): Delete.
14168 (tee_file::~tee_file): New.
14169 (tee_file_delete): Delete.
14170 (tee_file_flush): Rename to ...
14171 (tee_file::flush): ... this. Adjust.
14172 (tee_file_write): Rename to ...
14173 (tee_file::write): ... this. Adjust.
14174 (tee_file::write_async_safe): New.
14175 (tee_file_fputs): Rename to ...
14176 (tee_file::puts): ... this. Adjust.
14177 (tee_file_isatty): Rename to ...
14178 (tee_file::isatty): ... this. Adjust.
14179 * ui-file.h (struct obstack, struct ui_file): Don't
14180 forward-declare.
14181 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14182 (ui_file_write_ftype)
14183 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14184 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14185 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14186 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14187 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14188 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14189 (set_ui_file_fseek): Delete.
14190 (ui_file_data, ui_file_delete, ui_file_rewind)
14191 (struct ui_file): New.
14192 (ui_file_up): New.
14193 (class null_file): New.
14194 (null_stream): Declare.
14195 (ui_file_write_for_put, ui_file_put): Delete.
14196 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14197 Delete.
14198 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14199 (gdb_fopen, tee_file_new): Delete.
14200 (struct string_file): New.
14201 (struct stdio_file): New.
14202 (stdio_file_up): New.
14203 (struct stderr_file): New.
14204 (class tee_file): New.
14205 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14206 of a 'ui_file *'. Adjust.
14207 * ui-out.h (class ui_out) <field_stream>: Likewise.
14208 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14209 (null_stream): Delete.
14210 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14211 Adjust.
14212 * utils.h (struct ui_file): Delete forward declaration..
14213 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14214 (error_stream): Take a 'string_file &' instead of a
14215 'ui_file *'.
14216 * varobj.c (varobj_value_get_print_value): Use string_file.
14217 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14218 * gdbarch.c: Regenerate.
14219
14220 2017-02-02 Pedro Alves <palves@redhat.com>
14221
14222 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14223 (gdb_pretty_print_insn): ... this. Now a free function. Add back
14224 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
14225 Adjust to call gdb_print_insn instead of
14226 gdb_disassembler::print_insn.
14227 (dump_insns, do_mixed_source_and_assembly_deprecated)
14228 (do_mixed_source_and_assembly, do_assembly_only): Add back a
14229 'gdbarch' parameter. Remove gdb_disassembler parameter.
14230 (gdb_disassembly): Don't allocate a gdb_disassembler here.
14231 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14232 declaration.
14233 (gdb_pretty_print_insn): Re-add declaration.
14234 * record-btrace.c (btrace_insn_history): Don't allocate a
14235 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
14236
14237 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
14238
14239 * disasm.h (gdb_disassembly): Remove file_string parameter.
14240 * disasm.c (gdb_disassembly): Likewise.
14241 * cli/cli-cmds.c (print_disassembly): Adapt.
14242 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14243 * stack.c (do_gdb_disassembly): Likewise.
14244
14245 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
14246
14247 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14248 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14249 targets. And if the implicit value is longer than needed, extract
14250 the first bytes instead of the "least significant" ones.
14251
14252 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14253
14254 * btrace.c (btrace_enable): Do not call btrace_add_pc for
14255 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14256 (btrace_fetch): Assert can_access_registers_ptid.
14257 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14258 validate_registers_access.
14259
14260 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
14261
14262 * gdbthread.h (can_access_registers_ptid): New.
14263 * thread.c (can_access_registers_ptid): New.
14264
14265 2017-02-01 Pedro Alves <palves@redhat.com>
14266
14267 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14268
14269 2017-01-31 Pedro Alves <palves@redhat.com>
14270
14271 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14272 Fix typos.
14273
14274 2017-01-31 Pedro Alves <palves@redhat.com>
14275
14276 * stack.c (print_frame_args): Remove local mem_fileopen stream,
14277 not used.
14278
14279 2017-01-31 Pedro Alves <palves@redhat.com>
14280
14281 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14282
14283 2017-01-31 Pedro Alves <palves@redhat.com>
14284
14285 * common/scoped_restore.h
14286 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14287 change the value's parameter type to T2.
14288 (make_scoped_restore): Likewise.
14289
14290 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14291 Richard Henderson <rth@redhat.com>
14292
14293 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14294 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14295 GS_BASE for older kernels.
14296 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14297 GS_BASE for older kernels.
14298 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
14299 and GS_BASE to the offset table.
14300 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
14301 system register group.
14302 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
14303 for older kernels.
14304 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
14305 amd64 ABI.
14306 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
14307 AMD64_GSBASE_REGNUM.
14308 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
14309 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
14310 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
14311 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
14312 i386/64bit-segments.xml in those rules.
14313 * features/i386/64bit-segments.xml: New file.
14314 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
14315 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
14316 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
14317 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
14318 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
14319 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
14320 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
14321 * features/i386/amd64-avx-linux.c: Regenerated.
14322 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
14323 * features/i386/amd64-avx-mpx.c: Regenerated.
14324 * features/i386/amd64-avx512-linux.c: Regenerated.
14325 * features/i386/amd64-linux.c: Regenerated.
14326 * features/i386/amd64-mpx-linux.c: Regenerated.
14327 * features/i386/i386-avx-mpx-linux.c: Regenerated.
14328 * features/i386/i386-avx-mpx.c: Regenerated.
14329 * features/i386/x32-avx-linux.c: Regenerated.
14330 * features/i386/x32-avx512-linux.c: Regenerated.
14331 * regformats/i386/amd64-avx-linux.dat: Regenerated.
14332 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
14333 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
14334 * regformats/i386/amd64-linux.dat: Regenerated.
14335 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
14336 * regformats/i386/x32-avx-linux.dat: Regenerated.
14337 * regformats/i386/x32-avx512-linux.dat: Regenerated.
14338 * regformats/i386/x32-linux.dat: Regenerated.
14339
14340 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14341
14342 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
14343 Set to AMD64_NUM_REGS.
14344
14345 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
14346
14347 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
14348 that checks validity of a register number.
14349
14350 2017-01-27 Kees Cook <keescook@google.com>
14351
14352 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
14353 fetch_fpregs if target has fpa registers.
14354 (arm_linux_store_inferior_registers): Call store_fpregs if target
14355 has fpa registers.
14356
14357 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
14358
14359 * cris-tdep.c (cris_gdbarch_init): Remove check for
14360 info.byte_order and force it to BFD_ENDIAN_LITTLE.
14361
14362 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
14363
14364 * corelow.c (get_core_register_section): Check for regset
14365 existence before checking for REGSET_VARIABLE_SIZE.
14366
14367 2017-01-26 Yao Qi <yao.qi@linaro.org>
14368 Pedro Alves <palves@redhat.com>
14369
14370 PR gdb/20939
14371 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14372 call memory_error, save memaddr instead.
14373 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14374 negative, cal memory_error.
14375 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14376
14377 2017-01-26 Yao Qi <yao.qi@linaro.org>
14378
14379 * disasm-selftests.c (memory_error_test): New function.
14380 (_initialize_disasm_selftests): Register memory_error_test.
14381
14382 2017-01-26 Yao Qi <yao.qi@linaro.org>
14383
14384 * Makefile.in (SFILES): Add disasm-selftests.c and
14385 selftest-arch.c.
14386 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14387 * disasm-selftests.c: New file.
14388 * selftest-arch.c: New file.
14389 * selftest-arch.h: New file.
14390
14391 2017-01-26 Yao Qi <yao.qi@linaro.org>
14392
14393 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14394 to bfd_arch_mep. Don't return 0 if section is not
14395 found. Call print_insn_mep.
14396
14397 2017-01-26 Pedro Alves <palves@redhat.com>
14398 Yao Qi <yao.qi@linaro.org>
14399
14400 * arm-tdep.c: Include "disasm.h".
14401 (gdb_print_insn_arm): Update code to get gdbarch.
14402 * disasm.c (dis_asm_read_memory): Change it to
14403 gdb_disassembler::dis_asm_read_memory.
14404 (dis_asm_memory_error): Likewise.
14405 (dis_asm_print_address): Likewise.
14406 (gdb_pretty_print_insn): Change it to
14407 gdb_disassembler::pretty_print_insn.
14408 (dump_insns): Add one argument gdb_disassemlber. All
14409 callers updated.
14410 (do_mixed_source_and_assembly_deprecated): Likewise.
14411 (do_mixed_source_and_assembly): Likewise.
14412 (do_assembly_only): Likewise.
14413 (gdb_disassembler::gdb_disassembler): New.
14414 (gdb_disassembler::print_insn): New.
14415 * disasm.h (class gdb_disassembler): New.
14416 (gdb_pretty_print_insn): Remove declaration.
14417 (gdb_disassemble_info): Likewise.
14418 * guile/scm-disasm.c (class gdbscm_disassembler): New.
14419 (gdbscm_disasm_read_memory_worker): Update.
14420 (gdbscm_disasm_read_memory): Update.
14421 (gdbscm_disasm_memory_error): Remove.
14422 (gdbscm_disasm_print_address): Remove.
14423 (gdbscm_disassembler::gdbscm_disassembler): New.
14424 (gdbscm_print_insn_from_port): Update.
14425 * mips-tdep.c: Include disasm.h.
14426 (gdb_print_insn_mips): Update code to get gdbarch.
14427 * record-btrace.c (btrace_insn_history): Update.
14428 * spu-tdep.c: Include disasm.h.
14429 (struct spu_dis_asm_data): Remove.
14430 (struct spu_dis_asm_info): New.
14431 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14432 SPU id.
14433 (gdb_print_insn_spu): Cast disassemble_info to
14434 spu_dis_asm_info.
14435
14436 2017-01-26 Yao Qi <yao.qi@linaro.org>
14437
14438 * disasm.c (do_ui_file_delete): Delete.
14439 (gdb_insn_length): Move code creating stream to ...
14440 * utils.c (null_stream): ... here. New function.
14441 * utils.h (null_stream): Declare.
14442
14443 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
14444
14445 * python/py-inferior.c (find_thread_object): Return directly
14446 from the loop. Remove "found" variable.
14447
14448 2017-01-21 Joel Brobecker <brobecker@adacore.com>
14449
14450 GDB 7.12.1 released.
14451
14452 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14453
14454 * python/py-function.c (fnpy_call): Reorder declarations to have
14455 the gdbpy_enter object declared first.
14456 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14457
14458 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
14459
14460 PR python/21068
14461 * python/python-internal.h (PyMem_RawMalloc): Define for
14462 Python < 3.4.
14463 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14464 PyMem_RawMalloc instead of PyMem_Malloc.
14465
14466 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
14467 Luis Machado <lgustavo@codesourcery.com>
14468
14469 * NEWS (New commands): Mention flash-erase.
14470 (New MI commands): Mention target-flash-erase.
14471 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14472 command.
14473 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14474 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14475 * target.c (flash_erase_command): New function.
14476 (initialize_targets): Add new flash-erase command.
14477 * target.h (flash_erase_command): New declaration.
14478
14479 2017-01-20 Joel Brobecker <brobecker@adacore.com>
14480
14481 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14482 HAVE_SYS_PROCFS_H is defined.
14483
14484 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14485
14486 * remote.c (struct cached_reg): Change data into a pointer.
14487 * (stop_reply_dtr): Free data pointers before deleting vector.
14488 (process_stop_reply): Likewise.
14489 (remote_parse_stop_reply): Allocate space for data
14490
14491 2017-01-18 Alan Hayward <alan.hayward@arm.com>
14492
14493 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14494 MAX_REGISTER_SIZE.
14495 (amd64_pseudo_register_read_value): Likewise.
14496 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14497 (store_register_using_P): Likewise.
14498 * regcache.c (regcache_xfer_part): Likewise.
14499
14500 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
14501
14502 Split real and pseudo registers.
14503 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14504 (sparc32_pseudo_regnum): New enum.
14505 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14506 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14507 (SPARC32_CP0_REGISTERS): New macro.
14508 (sparc32_pseudo_register_name): New function.
14509 (sparc32_register_name): Use sparc32_pseudo_register_name.
14510 (sparc32_pseudo_register_type): New function.
14511 (sparc32_register_type): Use sparc32_pseudo_register_type.
14512 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14513 pseudo register numbers.
14514 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14515 (SPARC64_CP0_REGISTERS): New macro.
14516 (sparc64_pseudo_register_name): New function.
14517 (sparc64_register_name): Use sparc64_pseudo_register_name.
14518 (sparc64_pseudo_register_type): New function.
14519 (sparc64_register_type): Use sparc64_pseudo_register_type.
14520 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14521 pseudo register numbers.
14522 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14523 sparc64_store_arguments): Handle pseudo register numbers.
14524
14525 2017-01-13 Yao Qi <yao.qi@linaro.org>
14526
14527 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14528 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14529 output.
14530 (getpkt_or_notif_sane_1): Likewise.
14531
14532 2017-01-13 Yao Qi <yao.qi@linaro.org>
14533
14534 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14535 of CC. Pass "-x c++-header" instead of "-x c".
14536
14537 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14538
14539 * remote.c (remote_can_async_p): Update comment.
14540
14541 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14542
14543 * linux-nat.c (linux_nat_can_async_p): Update comment.
14544
14545 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
14546
14547 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14548
14549 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
14550
14551 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14552
14553 2017-01-10 Tom Tromey <tom@tromey.com>
14554
14555 * python/py-type.c (typy_legacy_template_argument): Update.
14556 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14557 ~demangle_parse_info): Declare new members.
14558 (cp_demangled_name_to_comp): Return unique_ptr.
14559 (cp_demangled_name_parse_free)
14560 (make_cleanup_cp_demangled_name_parse_free)
14561 (cp_new_demangle_parse_info): Remove.
14562 * cp-support.c (do_demangled_name_parse_free_cleanup)
14563 (make_cleanup_cp_demangled_name_parse_free): Remove.
14564 (inspect_type, cp_canonicalize_string_full)
14565 (cp_canonicalize_string): Update.
14566 (mangled_name_to_comp): Change return type.
14567 (cp_class_name_from_physname, method_name_from_physname)
14568 (cp_func_name, cp_remove_params): Update.
14569 * cp-name-parser.y (demangle_parse_info): New constructor, from
14570 cp_new_demangle_parse_info.
14571 (~demangle_parse_info): New destructor, from
14572 cp_demangled_name_parse_free.
14573 (cp_merge_demangle_parse_infos): Update.
14574 (cp_demangled_name_to_comp): Change return type.
14575
14576 2017-01-10 Tom Tromey <tom@tromey.com>
14577
14578 * top.c (prevent_dont_repeat): Change return type.
14579 * python/python.c (execute_gdb_command): Use std::string.
14580 Update.
14581 * guile/guile.c (gdbscm_execute_gdb_command): Update.
14582 * command.h (prevent_dont_repeat): Change return type.
14583 * breakpoint.c (bpstat_do_actions_1): Update.
14584
14585 2017-01-10 Tom Tromey <tom@tromey.com>
14586
14587 * value.h (scoped_value_mark::~scoped_value_mark): Call
14588 free_to_mark.
14589 (scoped_value_mark::free_to_mark): New method.
14590 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14591 scoped_value_mark.
14592
14593 2017-01-10 Tom Tromey <tom@tromey.com>
14594
14595 * python/py-value.c (valpy_dereference, valpy_referenced_value)
14596 (valpy_reference_value, valpy_const_value, valpy_get_address)
14597 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14598 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14599 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14600 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14601 scoped_value_mark.
14602 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14603 * value.h (scoped_value_mark): New class.
14604
14605 2017-01-10 Tom Tromey <tom@tromey.com>
14606
14607 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14608 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14609 * psymtab.c (discard_psymtabs_upto): Remove.
14610 (make_cleanup_discard_psymtabs): Remove.
14611 (struct psymtab_state): Remove.
14612
14613 2017-01-10 Tom Tromey <tom@tromey.com>
14614
14615 * record-full.c (record_full_save_cleanups): Remove.
14616 (record_full_save): Use gdb::unlinker.
14617 * gcore.c (do_bfd_delete_cleanup): Remove.
14618 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
14619 cleanups.
14620 * dwarf2read.c (unlink_if_set): Remove.
14621 (write_psymtabs_to_index): Use gdb::unlinker.
14622 * common/gdb_unlinker.h: New file.
14623
14624 2017-01-10 Tom Tromey <tom@tromey.com>
14625
14626 * windows-tdep.c (windows_xfer_shared_library): Update.
14627 * windows-nat.c (windows_make_so): Update.
14628 * utils.h (make_cleanup_bfd_unref): Remove.
14629 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14630 * symfile.h (symfile_bfd_open)
14631 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14632 * symfile.c (read_symbols, symbol_file_add)
14633 (separate_debug_file_exists): Update.
14634 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14635 (generic_load, reread_symbols): Update.
14636 * symfile-mem.c (symbol_file_add_from_memory): Update.
14637 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14638 (spu_symbol_file_add_from_memory): Update.
14639 * solist.h (struct target_so_ops) <bfd_open>: Return
14640 gdb_bfd_ref_ptr.
14641 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14642 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14643 gdb_bfd_ref_ptr.
14644 (solib_map_sections, reload_shared_libraries_1): Update.
14645 * solib-svr4.c (enable_break): Update.
14646 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14647 * solib-frv.c (enable_break2): Update.
14648 * solib-dsbt.c (enable_break): Update.
14649 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14650 gdb_bfd_ref_ptr.
14651 (darwin_solib_get_all_image_info_addr_at_init): Update.
14652 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14653 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14654 * record-full.c (record_full_save): Update.
14655 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14656 * procfs.c (insert_dbx_link_bpt_in_file): Update.
14657 * minidebug.c (find_separate_debug_file_in_section): Return
14658 gdb_bfd_ref_ptr.
14659 * machoread.c (macho_add_oso_symfile): Change abfd to
14660 gdb_bfd_ref_ptr.
14661 (macho_symfile_read_all_oso): Update.
14662 (macho_check_dsym): Return gdb_bfd_ref_ptr.
14663 (macho_symfile_read): Update.
14664 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14665 (jit_bfd_try_read_symtab): Update.
14666 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14667 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14668 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14669 gdb_bfd_ref_ptr.
14670 (gdb_bfd_ref_policy): New struct.
14671 (gdb_bfd_ref_ptr): New typedef.
14672 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14673 (gdb_bfd_openw, gdb_bfd_openr_iovec)
14674 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14675 gdb_bfd_ref_ptr.
14676 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14677 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14678 (gcore_command): Update.
14679 * exec.c (exec_file_attach): Update.
14680 * elfread.c (elf_symfile_read): Update.
14681 * dwarf2read.c (dwarf2_get_dwz_file): Update.
14682 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14683 (open_and_init_dwo_file): Update.
14684 (open_dwp_file): Return gdb_bfd_ref_ptr.
14685 (open_and_init_dwp_file): Update.
14686 * corelow.c (core_open): Update.
14687 * compile/compile-object-load.c (compile_object_load): Update.
14688 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14689 * coffread.c (coff_symfile_read): Update.
14690 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14691 gdb_bfd_ref_ptr. Rename.
14692 (dump_bfd_file, restore_command): Update.
14693 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14694 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14695 (find_separate_debug_file_by_buildid): Update.
14696
14697 2017-01-10 Tom Tromey <tom@tromey.com>
14698
14699 * common/gdb_ref_ptr.h: New file.
14700 * python/py-ref.h (struct gdbpy_ref_policy): New.
14701 (gdbpy_ref): Now a typedef.
14702
14703 2017-01-10 Tom Tromey <tom@tromey.com>
14704
14705 * utils.h (make_cleanup_htab_delete): Don't declare.
14706 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14707 Remove.
14708 * linespec.c (decode_compound_collector): Add constructor,
14709 destructor.
14710 (lookup_prefix_sym): Remove cleanup.
14711 (symtab_collector): Add constructor, destructor.
14712 (collect_symtabs_from_filename): Remove cleanup.
14713 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14714 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14715 Use htab_up.
14716 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14717 * dwarf2read.c (dw2_expand_symtabs_matching)
14718 (dw2_map_symbol_filenames, dwarf_decode_macros)
14719 (write_psymtabs_to_index): Use htab_up.
14720 * dwarf2loc.c (func_verify_no_selftailcall)
14721 (call_site_find_chain_1, func_verify_no_selftailcall)
14722 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14723 std::vector, gdb::unique_xmalloc_ptr.
14724 (call_sitep): Remove typedef.
14725 (dwarf2_locexpr_baton_eval): Remove unused variable.
14726
14727 2017-01-10 Tom Tromey <tom@tromey.com>
14728
14729 * python/python-internal.h (make_cleanup_py_decref)
14730 (make_cleanup_py_xdecref): Don't declare.
14731 * python/py-utils.c (py_decref, make_cleanup_py_decref)
14732 (py_xdecref, make_cleanup_py_xdecref): Remove.
14733
14734 2017-01-10 Tom Tromey <tom@tromey.com>
14735
14736 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14737 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14738
14739 2017-01-10 Tom Tromey <tom@tromey.com>
14740
14741 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14742
14743 2017-01-10 Tom Tromey <tom@tromey.com>
14744
14745 * python/py-utils.c (unicode_to_encoded_string)
14746 (python_string_to_target_string)
14747 (python_string_to_target_python_string)
14748 (python_string_to_host_string, gdbpy_obj_to_string)
14749 (get_addr_from_python): Use gdbpy_ref.
14750
14751 2017-01-10 Tom Tromey <tom@tromey.com>
14752
14753 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14754 gdbpy_ref.
14755
14756 2017-01-10 Tom Tromey <tom@tromey.com>
14757
14758 * python/python.c (eval_python_command, gdbpy_decode_line)
14759 (gdbpy_run_events, gdbpy_start_type_printers)
14760 (gdbpy_apply_type_printers): Use gdbpy_ref.
14761
14762 2017-01-10 Tom Tromey <tom@tromey.com>
14763
14764 * python/py-param.c (get_doc_string, compute_enum_values): Use
14765 gdbpy_ref.
14766
14767 2017-01-10 Tom Tromey <tom@tromey.com>
14768
14769 * python/py-inferior.c (find_thread_object, build_inferior_list):
14770 Use gdbpy_ref.
14771
14772 2017-01-10 Tom Tromey <tom@tromey.com>
14773
14774 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14775
14776 2017-01-10 Tom Tromey <tom@tromey.com>
14777
14778 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14779 gdbpy_ref.
14780
14781 2017-01-10 Tom Tromey <tom@tromey.com>
14782
14783 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14784 extra incref.
14785 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14786 Use gdbpy_ref.
14787
14788 2017-01-10 Tom Tromey <tom@tromey.com>
14789
14790 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14791 gdbpy_ref.
14792
14793 2017-01-10 Tom Tromey <tom@tromey.com>
14794
14795 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14796 decref results of PyArg_ParseTupleAndKeywords.
14797
14798 2017-01-10 Tom Tromey <tom@tromey.com>
14799
14800 * python/python.c (python_run_simple_file): Use
14801 unique_xmalloc_ptr, gdbpy_ref.
14802
14803 2017-01-10 Tom Tromey <tom@tromey.com>
14804
14805 * python/py-prettyprint.c (print_stack_unless_memory_error)
14806 (print_string_repr, print_children): Use gdbpy_ref.
14807 (dummy_python_frame): New class.
14808 (dummy_python_frame::dummy_python_frame): Rename from
14809 push_dummy_python_frame.
14810 (py_restore_tstate): Remove.
14811
14812 2017-01-10 Tom Tromey <tom@tromey.com>
14813
14814 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14815
14816 2017-01-10 Tom Tromey <tom@tromey.com>
14817
14818 * python/python.c (ensure_python_env, restore_python_env):
14819 Remove.
14820 * python/python-internal.h (ensure_python_env): Don't declare.
14821 * varobj.h (varobj_ensure_python_env): Don't declare.
14822 * varobj.c (varobj_ensure_python_env): Remove.
14823
14824 2017-01-10 Tom Tromey <tom@tromey.com>
14825
14826 * varobj.c (varobj_value_get_print_value): Use
14827 gdbpy_enter_varobj.
14828
14829 2017-01-10 Tom Tromey <tom@tromey.com>
14830
14831 * python/py-prettyprint.c (print_string_repr, print_children):
14832 Update.
14833 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14834 of "encoding".
14835 * varobj.c (varobj_value_get_print_value): Update.
14836 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14837
14838 2017-01-10 Tom Tromey <tom@tromey.com>
14839
14840 * varobj.c (varobj_get_display_hint)
14841 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14842 (varobj_set_visualizer, free_variable): Use
14843 gdbpy_enter_varobj.
14844
14845 2017-01-10 Tom Tromey <tom@tromey.com>
14846
14847 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14848 (do_finish_initialization): New function. Use gdbpy_ref.
14849 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14850 do_finish_initialization.
14851
14852 2017-01-10 Tom Tromey <tom@tromey.com>
14853
14854 * python/py-param.c (get_set_value, get_show_value): Use
14855 gdbpy_enter, gdbpy_ref.
14856
14857 2017-01-10 Tom Tromey <tom@tromey.com>
14858
14859 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14860
14861 2017-01-10 Tom Tromey <tom@tromey.com>
14862
14863 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14864
14865 2017-01-10 Tom Tromey <tom@tromey.com>
14866
14867 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14868 Use gdbpy_enter_varobj.
14869
14870 2017-01-10 Tom Tromey <tom@tromey.com>
14871
14872 * varobj.c (gdbpy_enter_varobj): New constructor.
14873 * python/python-internal.h (gdbpy_enter_varobj): New class.
14874 * python/py-varobj.c (py_varobj_get_iterator): Use
14875 gdbpy_enter_varobj.
14876
14877 2017-01-10 Tom Tromey <tom@tromey.com>
14878
14879 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14880 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14881 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14882 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14883 unique_xmalloc_ptr.
14884 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14885
14886 2017-01-10 Tom Tromey <tom@tromey.com>
14887
14888 * python/py-xmethods.c (invoke_match_method): Use
14889 gdbpy_ref.
14890
14891 2017-01-10 Tom Tromey <tom@tromey.com>
14892
14893 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14894 gdbpy_enter, gdbpy_ref.
14895
14896 2017-01-10 Tom Tromey <tom@tromey.com>
14897
14898 * python/python.c (python_interactive_command): Use gdbpy_enter.
14899
14900 2017-01-10 Tom Tromey <tom@tromey.com>
14901
14902 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14903 gdbpy_ref.
14904
14905 2017-01-10 Tom Tromey <tom@tromey.com>
14906
14907 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14908 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14909
14910 2017-01-10 Tom Tromey <tom@tromey.com>
14911
14912 * utils.h (htab_deleter): New struct.
14913 (htab_up): New typedef.
14914 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14915 gdbpy_enter, gdbpy_ref, htab_up.
14916
14917 2017-01-10 Tom Tromey <tom@tromey.com>
14918
14919 * python/py-unwind.c (pending_frame_invalidate): Remove.
14920 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14921
14922 2017-01-10 Tom Tromey <tom@tromey.com>
14923
14924 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14925 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14926
14927 2017-01-10 Tom Tromey <tom@tromey.com>
14928
14929 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14930
14931 2017-01-10 Tom Tromey <tom@tromey.com>
14932
14933 * python/python.c (gdbpy_eval_from_control_command)
14934 (gdbpy_source_script, gdbpy_run_events)
14935 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14936 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14937 gdbpy_enter.
14938
14939 2017-01-10 Tom Tromey <tom@tromey.com>
14940
14941 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14942
14943 2017-01-10 Tom Tromey <tom@tromey.com>
14944
14945 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14946
14947 2017-01-10 Tom Tromey <tom@tromey.com>
14948
14949 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14950 (python_on_inferior_call_pre, python_on_inferior_call_post)
14951 (python_on_memory_change, python_on_register_change)
14952 (python_inferior_exit, python_new_objfile, add_thread_object)
14953 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14954
14955 2017-01-10 Tom Tromey <tom@tromey.com>
14956
14957 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14958 (bpfinishpy_handle_exit): Use gdbpy_enter.
14959
14960 2017-01-10 Tom Tromey <tom@tromey.com>
14961
14962 * python/py-cmd.c (cmdpy_destroyer)
14963 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14964 gdbpy_enter.
14965
14966 2017-01-10 Tom Tromey <tom@tromey.com>
14967
14968 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14969 gdbpy_enter.
14970 (gdbpy_breakpoint_has_cond): Likewise.
14971
14972 2017-01-10 Tom Tromey <tom@tromey.com>
14973
14974 * python/python.c (gdbpy_enter): New constructor.
14975 (~gdbpy_enter): New destructor.
14976 (restore_python_env, ensure_python_env): Rewrite.
14977 * python/python-internal.h (gdbpy_enter): New class.
14978
14979 2017-01-10 Tom Tromey <tom@tromey.com>
14980
14981 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14982
14983 2017-01-10 Tom Tromey <tom@tromey.com>
14984
14985 * python/py-value.c (value_has_field, get_field_flag)
14986 (get_field_type, valpy_getitem, convert_value_from_python): Use
14987 gdbpy_ref.
14988
14989 2017-01-10 Tom Tromey <tom@tromey.com>
14990
14991 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14992 gdbpy_ref.
14993
14994 2017-01-10 Tom Tromey <tom@tromey.com>
14995
14996 * python/py-prettyprint.c (search_pp_list)
14997 (find_pretty_printer_from_objfiles)
14998 (find_pretty_printer_from_progspace)
14999 (find_pretty_printer_from_gdb, find_pretty_printer)
15000 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15001 gdbpy_ref.
15002
15003 2017-01-10 Tom Tromey <tom@tromey.com>
15004
15005 * python/py-param.c (call_doc_function): Use gdbpy_ref.
15006
15007 2017-01-10 Tom Tromey <tom@tromey.com>
15008
15009 * python/py-linetable.c (build_line_table_tuple_from_pcs)
15010 (ltpy_get_all_source_lines): Use gdbpy_ref.
15011
15012 2017-01-10 Tom Tromey <tom@tromey.com>
15013
15014 * python/py-framefilter.c (extract_sym, extract_value)
15015 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15016 gdbpy_ref.
15017
15018 2017-01-10 Tom Tromey <tom@tromey.com>
15019
15020 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15021
15022 2017-01-10 Tom Tromey <tom@tromey.com>
15023
15024 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15025
15026 2017-01-10 Tom Tromey <tom@tromey.com>
15027
15028 * python/py-function.c (convert_values_to_python, fnpy_init): Use
15029 gdbpy_ref.
15030
15031 2017-01-10 Tom Tromey <tom@tromey.com>
15032
15033 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15034
15035 2017-01-10 Tom Tromey <tom@tromey.com>
15036
15037 * python/py-type.c (convert_field, make_fielditem, typy_fields)
15038 (typy_range): Use gdbpy_ref.
15039
15040 2017-01-10 Tom Tromey <tom@tromey.com>
15041
15042 * python/py-threadevent.c (create_thread_event_object): Use
15043 gdbpy_ref.
15044 * python/py-stopevent.c (create_stop_event_object): Simplify.
15045 (emit_stop_event): Use gdbpy_ref.
15046 * python/py-signalevent.c (create_signal_event_object): Use
15047 gdbpy_ref.
15048 * python/py-newobjfileevent.c (create_new_objfile_event_object)
15049 (emit_new_objfile_event, create_clear_objfiles_event_object)
15050 (emit_clear_objfiles_event): Use gdbpy_ref.
15051 * python/py-infevents.c (create_inferior_call_event_object)
15052 (create_register_changed_event_object)
15053 (create_memory_changed_event_object, emit_inferior_call_event)
15054 (emit_memory_changed_event, emit_register_changed_event): Use
15055 gdbpy_ref.
15056 * python/py-exitedevent.c (create_exited_event_object)
15057 (emit_exited_event): Use gdbpy_ref.
15058 * python/py-event.h (evpy_emit_event): Remove
15059 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15060 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15061 * python/py-continueevent.c (emit_continue_event): Use
15062 gdbpy_ref.
15063 * python/py-breakpoint.c (gdbpy_breakpoint_created)
15064 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15065 gdbpy_ref.
15066 * python/py-bpevent.c (create_breakpoint_event_object): Use
15067 gdbpy_ref.
15068
15069 2017-01-10 Tom Tromey <tom@tromey.com>
15070
15071 * python/py-ref.h: New file.
15072
15073 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15074
15075 * cli-out.c (cli_ui_out::do_redirect): Change return type to
15076 void.
15077 * cli-out.h (cli_ui_out::do_redirect): Likewise.
15078 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15079 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15080 * ui-out.c (ui_out::redirect): Likewise.
15081 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15082 * cli/cli-logging.c (set_logging_redirect): Update call site of
15083 ui_out::redirect.
15084 (handle_redirections): Likewise.
15085 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15086 * top.c (execute_command_to_string): Likewise.
15087 * utils.c (do_ui_out_redirect_pop): Likewise.
15088
15089 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
15090
15091 * stack.c (_initialize_stack): Update "frame" command help message.
15092
15093 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
15094
15095 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15096
15097 2017-01-06 Yao Qi <yao.qi@linaro.org>
15098
15099 * x86-linux-nat.h: Include gdb_proc_service.h.
15100
15101 2017-01-06 Yao Qi <yao.qi@linaro.org>
15102
15103 * ser-base.h: Include serial.h.
15104
15105 2017-01-06 Yao Qi <yao.qi@linaro.org>
15106
15107 * ppc-linux-tdep.h: Include ppc-tdep.h.
15108
15109 2017-01-06 Yao Qi <yao.qi@linaro.org>
15110
15111 * nat/amd64-linux-siginfo.h: Include signal.h.
15112
15113 2017-01-06 Yao Qi <yao.qi@linaro.org>
15114
15115 * nat/aarch64-linux-hw-point.h: Include break-common.h.
15116
15117 2017-01-06 Yao Qi <yao.qi@linaro.org>
15118
15119 * mi/mi-parse.h: Include mi-cmds.h.
15120
15121 2017-01-06 Yao Qi <yao.qi@linaro.org>
15122
15123 * inf-loop.c: Don't include "target.h".
15124 * inf-loop.h: Include it here.
15125
15126 2017-01-06 Yao Qi <yao.qi@linaro.org>
15127
15128 * dfp.h: Include "dboulest.h" and "expression.h".
15129
15130 2017-01-06 Yao Qi <yao.qi@linaro.org>
15131
15132 * ax-gdb.h: Include "ax.h".
15133
15134 2017-01-06 Yao Qi <yao.qi@linaro.org>
15135
15136 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15137 with nat/gdb_ptrace.h.
15138
15139 2017-01-05 Yao Qi <yao.qi@linaro.org>
15140
15141 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15142 new line.
15143 (mips64_fbsd_sigframe_init): Likewise.
15144
15145 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15146
15147 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15148 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15149
15150 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15151
15152 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15153 * NEWS: Mention new FreeBSD/mips native configuration.
15154 * config/mips/fbsd.mh: New file.
15155 * configure.host: Add mips*-*-freebsd*.
15156 * mips-fbsd-nat.c: New file.
15157
15158 2017-01-04 John Baldwin <jhb@FreeBSD.org>
15159
15160 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15161 (ALLDEPFILES): Add mips-fbsd-tdep.c.
15162 * NEWS: Mention new FreeBSD/mips target.
15163 * configure.tgt: Add mips*-*-freebsd*.
15164 * mips-fbsd-tdep.c: New file.
15165 * mips-fbsd-tdep.h: New file.
15166
15167 2017-01-04 Yao Qi <yao.qi@linaro.org>
15168
15169 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15170 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15171
15172 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15173
15174 Update copyright year range in all GDB files.
15175
15176 2017-01-01 Joel Brobecker <brobecker@adacore.com>
15177
15178 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15179
15180 For older changes see ChangeLog-2016.
15181 \f
15182 Local Variables:
15183 mode: change-log
15184 left-margin: 8
15185 fill-column: 74
15186 version-control: never
15187 coding: utf-8
15188 End:
This page took 0.464518 seconds and 4 git commands to generate.