Change captured_mi_execute_command to use scoped_restore
[external/binutils.git] / gdb / ChangeLog
1 2017-09-29  Tom Tromey  <tom@tromey.com>
2
3         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4
5 2017-09-29  Tom Tromey  <tom@tromey.com>
6
7         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
8         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
9         operator< and operator==.
10         (ada_exceptions_list): Return a std::vector.
11         * ada-lang.c (ada_exc_info::operator<): Rename from
12         compare_ada_exception_info.
13         (ada_exc_info::operator==): New.
14         (sort_remove_dups_ada_exceptions_list): Change type of
15         "exceptions".
16         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
17         (ada_add_global_exceptions): Likewise.
18         (ada_exceptions_list_1): Return a std::vector.
19         (ada_exceptions_list): Likewise.
20
21 2017-09-29  Tom Tromey  <tom@tromey.com>
22
23         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
24         'std::set *'.
25         (print_one_inferior): Update.
26         (free_vector_of_ints): Remove.
27         (list_available_thread_groups): Change "ids" to std::set.
28         (mi_cmd_list_thread_groups): Update.
29         (struct collect_cores_data) <core>: Now a std::set.
30         (collect_cores): Update.
31         (unique): Remove.
32         (print_one_inferior): Update.
33
34 2017-09-29  Tom Tromey  <tom@tromey.com>
35
36         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
37         (mi_execute_async_cli_command): Likewise.
38         (mi_cmd_trace_frame_collected): Use field_fmt.
39
40 2017-09-29  Tom Tromey  <tom@tromey.com>
41
42         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
43         gdb::byte_vector.
44
45 2017-09-29  Tom Tromey  <tom@tromey.com>
46
47         * mi/mi-parse.c (mi_parse): Remove unused declaration.
48
49 2017-09-29  Tom Tromey  <tom@tromey.com>
50
51         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
52
53 2017-09-29  Tom Tromey  <tom@tromey.com>
54
55         * varobj.h (varobj_gen_name): Return std::string.
56         * varobj.c (varobj_gen_name): Return std::string.
57         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
58         (mi_cmd_var_delete): Don't copy "name".
59
60 2017-09-29  Tom Tromey  <tom@tromey.com>
61
62         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
63         (mi_cmd_break_insert_1): Update.
64
65 2017-09-29  Tom Tromey  <tom@tromey.com>
66
67         * target.h (make_scoped_defer_target_commit_resume): Update.
68         * target.c (make_scoped_defer_target_commit_resume): Rename from
69         make_cleanup_defer_target_commit_resume.  Return a
70         scoped_restore.
71         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
72
73 2017-09-29  Tom Tromey  <tom@tromey.com>
74
75         * main.c (captured_main_1): Remove unused declaration.
76         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
77
78 2017-09-29  Tom Tromey  <tom@tromey.com>
79
80         * symtab.c (search_symbols): Remove unused outer cleanup.
81         (make_source_files_completion_list): Remove unused declaration.
82
83 2017-09-29  Tom Tromey  <tom@tromey.com>
84
85         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
86
87 2017-09-29  Tom Tromey  <tom@tromey.com>
88
89         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
90         gdb::byte_vector.
91
92 2017-09-29  Tom Tromey  <tom@tromey.com>
93
94         * complaints.c (vcomplaint): Use std::string.
95
96 2017-09-29  Tom Tromey  <tom@tromey.com>
97
98         * tracepoint.c (trace_variable_command): Use std::string.
99         (encode_actions_1): Remove unused declarations.
100         (create_tsv_from_upload): Use std::string.
101
102 2017-09-29  Tom Tromey  <tom@tromey.com>
103
104         * cp-support.c (gdb_demangle): Use std::string.
105
106 2017-09-29  Tom Tromey  <tom@tromey.com>
107
108         * stack.c (parse_frame_specification): Use std::string
109         (info_frame_command): Use gdb::unique_xmalloc_ptr.
110
111 2017-09-29  Tom Tromey  <tom@tromey.com>
112
113         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
114
115 2017-09-29  Tom Tromey  <tom@tromey.com>
116
117         * utils.c (vfprintf_maybe_filtered): Use std::string.
118         (vfprintf_unfiltered): Likewise.
119
120 2017-09-29  Tom Tromey  <tom@tromey.com>
121
122         * event-top.c (top_level_prompt): Return std::string.
123         (display_gdb_prompt): Update.
124
125 2017-09-29  Tom Tromey  <tom@tromey.com>
126
127         * unittests/common-utils-selftests.c (format): New function.
128         (string_vprintf_tests): New function.
129         (_initialize_common_utils_selftests): Register new tests.
130         * common/common-utils.c (string_vprintf): New function.
131         * common/common-utils.h (string_vprintf): Declare.
132
133 2017-09-29  Pedro Alves  <palves@redhat.com>
134
135         * common/rsp-low.c (unpack_varlen_hex): Constify.
136         * common/rsp-low.h (unpack_varlen_hex): Constify.
137         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
138         Constify.
139         * remote.c (remote_set_permissions, read_ptid)
140         (remote_current_thread, remote_get_threads_with_qthreadinfo)
141         (remote_static_tracepoint_marker_at)
142         (remote_static_tracepoint_markers_by_strid)
143         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
144         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
145         (parse_tracepoint_definition, parse_tsv_definition)
146         (parse_static_tracepoint_marker_definition): Constify.
147         * tracepoint.h (parse_static_tracepoint_marker_definition)
148         (parse_trace_status, parse_tracepoint_status)
149         (parse_tracepoint_definition, parse_tsv_definition): Constify.
150
151 2017-09-29  Pedro Alves  <palves@redhat.com>
152
153         * remote.c (target_buf, target_buf_size): Delete.
154         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
155         Use the connection's packet buffer instead.
156         All callers adjusted.
157         (_initialize_remote): Remove references to target_buf and
158         target_buf_size.
159
160 2017-09-28  Pedro Alves  <palves@redhat.com>
161
162         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
163         unittests/common-utils-selftests.c.
164         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
165         (COMMON_OBS): Remove utils-selftests.o.
166         * utils-selftests.c: Move to ...
167         * unittests/common-utils-selftests.c: ... here and rename self
168         test to "string_printf".
169
170 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
171
172         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
173         having NULL cus or tus.
174
175 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
176
177         * arm-tdep.c: (convert_from_extended): Remove.
178         (convert_to_extended): Likewise.
179         (arm_extract_return_value): Use convert_typed_floating.
180         (arm_store_return_value): Likewise.
181
182         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
183         * sh-tdep.c: Do not include "floatformat.h".
184         (sh_littlebyte_bigword_type): New function.
185         (sh_register_convert_to_virtual): Use convert_typed_floating.
186         (sh_register_convert_to_raw): Likewise.
187         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
188         (sh64_littlebyte_bigword_type): New function.
189         (sh64_extract_return_value): Use convert_typed_floating.
190         (sh64_register_convert_to_virtual): Likewise.
191         (sh64_register_convert_to_raw): Likewise.
192
193 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
194
195         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
196         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
197
198         * gdbtypes.h (union type_specific): Make field floatformat hold
199         just a single struct floatformat, not an array.
200         (floatformat_from_type): Move here.
201         * gdbtypes.c (floatformat_from_type): Move here.  Update to
202         changed TYPE_FLOATFORMAT definition.
203         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
204         (recursive_dump_type): Likewise.
205         (init_float_type): Install correct floatformat for byte order.
206         (arch_float_type): Likewise.
207
208 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
209
210         * gdbtypes.c (init_type): Change incoming argument from
211         length-in-bytes to length-in-bits.  Assert length is a
212         multiple of TARGET_CHAR_BITS.
213         (arch_type, arch_flags_type): Likewise.
214         (init_integer_type): Update call to init_type.
215         (init_character_type): Likewise.
216         (init_boolean_type): Likewise.
217         (init_float_type): Likewise.
218         (init_decfloat_type): Likewise.
219         (init_complex_type): Likewise.
220         (init_pointer_type): Likewise.
221         (objfile_type): Likewise.
222         (arch_integer_type): Update call to arch_type.
223         (arch_character_type): Likewise.
224         (arch_boolean_type): Likewise.
225         (arch_float_type): Likewise.
226         (arch_decfloat_type): Likewise.
227         (arch_complex_type): Likewise.
228         (arch_pointer_type): Likewise.
229         (gdbtypes_post_init): Likewise.
230
231         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
232         (read_base_type): Likewise.
233         * mdebugread.c (basic_type): Likewise.
234         * stabsread.c (dbx_init_float_type): Likewise.
235         (rs6000_builtin_type): Likewise.
236         (read_range_type): Likewise.  Also, fix call to init_integer_type
237         with erroneous length argument.
238
239         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
240         * d-lang.c (build_d_types): Likewise.
241         * f-lang.c (build_fortran_types): Likewise.
242         * go-lang.c (build_go_types): Likewise.
243         * opencl-lang.c (build_opencl_types): Likewise.
244         * jit.c (finalize_symtab): Likewise.
245         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
246         (build_std_type_info_type): Likewise.
247         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
248         update call to arch_flags_type.
249
250         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
251         arch_type.
252         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
253         * windows-tdep.c (windows_get_tlb_type): Likewise.
254
255         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
256         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
257         * m32c-tdep.c (make_types): Likewise.
258         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
259         (rl78_psw_type): Update call to arch_flags_type.
260         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
261         * rx-tdep.c (rx_psw_type): Likewise.
262         (rx_fpsw_type): Likewise.
263         * sparc-tdep.c (sparc_psr_type): Likewise.
264         (sparc_fsr_type): Likewise.
265         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
266         (sparc64_ccr_type): Likewise.
267         (sparc64_fsr_type): Likewise.
268         (sparc64_fprs_type): Likewise.
269
270 2017-09-27  Tom Tromey  <tom@tromey.com>
271
272         * findcmd.c (find_command): Constify.
273
274 2017-09-27  Tom Tromey  <tom@tromey.com>
275
276         * ada-tasks.c (task_command_1, task_command): Constify.
277
278 2017-09-27  Tom Tromey  <tom@tromey.com>
279
280         * symtab.c (maintenance_print_symbol_cache)
281         (maintenance_flush_symbol_cache)
282         (maintenance_print_symbol_cache_statistics): Constify.
283
284 2017-09-27  Tom Tromey  <tom@tromey.com>
285
286         * inferior.c (detach_inferior_command, kill_inferior_command)
287         (inferior_command): Constify.
288
289 2017-09-27  Tom Tromey  <tom@tromey.com>
290
291         * regcache.c (regcache_print, maintenance_print_registers)
292         (maintenance_print_raw_registers)
293         (maintenance_print_cooked_registers)
294         (maintenance_print_register_groups)
295         (maintenance_print_remote_registers): Constify.
296
297 2017-09-27  Tom Tromey  <tom@tromey.com>
298
299         * printcmd.c (map_display_numbers, undisplay_command)
300         (enable_disable_display_command, enable_display_command)
301         (disable_display_command): Constify.
302
303 2017-09-27  Tom Tromey  <tom@tromey.com>
304
305         * breakpoint.h (delete_command): Don't declare.
306         * breakpoint.c (delete_command, enable_once_command)
307         (enable_count_command, enable_delete_command, breakpoint_1)
308         (maintenance_info_breakpoints, stopin_command, stopat_command)
309         (delete_command, delete_trace_command, save_breakpoints)
310         (save_breakpoints_command, save_tracepoints_command): Constify.
311
312 2017-09-27  Tom Tromey  <tom@tromey.com>
313
314         * macrocmd.c (macro_expand_command, macro_expand_once_command)
315         (skip_ws, extract_identifier, macro_define_command)
316         (macro_undef_command, macro_list_command): Constify.
317
318 2017-09-27  Tom Tromey  <tom@tromey.com>
319
320         * infcmd.c (environment_info, set_environment_command)
321         (unset_environment_command, path_info, info_proc_cmd_1)
322         (info_proc_cmd_mappings, info_proc_cmd_stat)
323         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
324         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
325
326 2017-09-27  Tom Tromey  <tom@tromey.com>
327
328         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
329         Constify.
330
331 2017-09-27  Tom Tromey  <tom@tromey.com>
332
333         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
334
335 2017-09-27  Tom Tromey  <tom@tromey.com>
336
337         * demangle.c (demangle_command): Constify.
338
339 2017-09-27  Tom Tromey  <tom@tromey.com>
340
341         * progspace.c (maintenance_info_program_spaces_command):
342         Constify.
343
344 2017-09-27  Tom Tromey  <tom@tromey.com>
345
346         * compile/compile.c (check_raw_argument, compile_file_command)
347         (compile_code_command, compile_print_command): Constify.
348
349 2017-09-27  Tom Tromey  <tom@tromey.com>
350
351         * reggroups.c (maintenance_print_reggroups): Constify.
352
353 2017-09-27  Tom Tromey  <tom@tromey.com>
354
355         * dwarf2read.c (save_gdb_index_command): Constify.
356
357 2017-09-27  Tom Tromey  <tom@tromey.com>
358
359         * stap-probe.c (info_probes_stap_command): Constify.
360
361 2017-09-27  Tom Tromey  <tom@tromey.com>
362
363         * fork-child.c (unset_exec_wrapper_command): Constify.
364
365 2017-09-27  Tom Tromey  <tom@tromey.com>
366
367         * btrace.c (get_uint, get_context_size, no_chunk)
368         (maint_btrace_packet_history_cmd)
369         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
370         (maint_info_btrace_cmd): Constify.
371
372 2017-09-27  Tom Tromey  <tom@tromey.com>
373
374         * reverse.c (delete_bookmark_command): Constify.
375
376 2017-09-27  Tom Tromey  <tom@tromey.com>
377
378         * remote.c (set_memory_packet_size)
379         (set_memory_write_packet_size, show_memory_write_packet_size)
380         (set_memory_read_packet_size, show_memory_read_packet_size)
381         (compare_sections_command, packet_command, remote_put_command)
382         (remote_get_command, remote_delete_command): Constify.
383
384 2017-09-27  Tom Tromey  <tom@tromey.com>
385
386         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
387         (set_mipsfpu_double_command, set_mipsfpu_none_command)
388         (set_mipsfpu_auto_command): Constify.
389
390 2017-09-27  Tom Tromey  <tom@tromey.com>
391
392         * cli/cli-cmds.h (cd_command): Constify.
393         * cli/cli-cmds.c (cd_command): Constify.
394
395 2017-09-27  Tom Tromey  <tom@tromey.com>
396
397         * thread.c (thread_name_command, thread_find_command): Constify.
398
399 2017-09-27  Tom Tromey  <tom@tromey.com>
400
401         * probe.c (enable_probes_command, disable_probes_command):
402         Constify.
403
404 2017-09-27  Tom Tromey  <tom@tromey.com>
405
406         * symfile.c (symbol_file_command): Constify.
407         * gdbcore.h (deprecated_file_changed_hook): Constify.
408         * exec.c (deprecated_file_changed_hook, exec_file_command)
409         (file_command): Constify.
410         * defs.h (symbol_file_command): Constify.
411
412 2017-09-27  Tom Tromey  <tom@tromey.com>
413
414         * remote-fileio.c (set_system_call_allowed)
415         (show_system_call_allowed): Constify.
416
417 2017-09-27  Tom Tromey  <tom@tromey.com>
418
419         * tracepoint.c (delete_trace_variable_command)
420         (tfind_end_command, tfind_start_command, tfind_pc_command)
421         (tfind_tracepoint_command, tfind_line_command)
422         (tfind_range_command, tfind_outside_command): Constify.
423
424 2017-09-27  Tom Tromey  <tom@tromey.com>
425
426         * ax-gdb.c (maint_agent_printf_command, agent_command)
427         (agent_eval_command): Constify.
428
429 2017-09-27  Tom Tromey  <tom@tromey.com>
430
431         * tracepoint.c (info_scope_command): Constify.
432         * python/python.c (gdbpy_decode_line): Constify.
433         * python/py-breakpoint.c (bppy_init): Constify.
434         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
435         * location.h: (new_linespec_location)
436         (string_to_event_location_basic, string_to_event_location):
437         Constify.
438         * location.c (new_linespec_location)
439         (string_to_event_location_basic, string_to_event_location):
440         Constify.
441         * linespec.h (decode_line_with_current_source)
442         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
443         * linespec.c (linespec_lex_to_end)
444         (decode_line_with_current_source)
445         (decode_line_with_last_displayed): Constify.
446         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
447         Constify.
448         * cli/cli-cmds.c (edit_command, list_command): Constify.
449         * breakpoint.h (until_break_command, watch_command_wrapper)
450         (awatch_command_wrapper, rwatch_command_wrapper)
451         (init_ada_exception_breakpoint): Constify.
452         * breakpoint.c (break_command_1, dprintf_command)
453         (break_range_command, watch_command_wrapper)
454         (rwatch_command_wrapper, awatch_command_wrapper)
455         (until_break_command, init_ada_exception_breakpoint)
456         (strace_marker_create_sals_from_location, trace_command)
457         (ftrace_command, strace_command, struct tracepoint): Constify.
458         * ax-gdb.c (agent_command_1): Constify.
459         * ada-lang.c (ada_exception_sal): Constify.
460
461 2017-09-27  Tom Tromey  <tom@tromey.com>
462
463         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
464         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
465         (get_context_size, no_chunk, get_insn_history_modifiers)
466         (cmd_record_insn_history, get_call_history_modifiers)
467         (cmd_record_call_history): Constify.
468
469 2017-09-27  Tom Tromey  <tom@tromey.com>
470
471         * source.c (show_substitute_path_command)
472         (unset_substitute_path_command, set_substitute_path_command):
473         Constify.
474
475 2017-09-27  Tom Tromey  <tom@tromey.com>
476
477         * typeprint.c (maintenance_print_type): Constify.
478         * maint.c (maintenance_dump_me, maintenance_demangle)
479         (maintenance_time_display, maintenance_info_sections)
480         (maintenance_print_statistics, maintenance_deprecate)
481         (maintenance_undeprecate): Constify.
482         (maintenance_do_deprecate): Constify.  Use std::string.
483         (maintenance_selftest): Constify.
484         * gdbtypes.h (maintenance_print_type): Constify.
485
486 2017-09-27  Tom Tromey  <tom@tromey.com>
487
488         * hppa-tdep.c (unwind_command): Constify.
489
490 2017-09-27  Tom Tromey  <tom@tromey.com>
491
492         * target-descriptions.c (unset_tdesc_filename_cmd)
493         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
494         Constify.
495
496 2017-09-27  Tom Tromey  <tom@tromey.com>
497
498         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
499
500 2017-09-27  Tom Tromey  <tom@tromey.com>
501
502         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
503
504 2017-09-27  Tom Tromey  <tom@tromey.com>
505
506         * tui/tui-regs.c (tui_reg_command): Constify.
507
508 2017-09-27  Tom Tromey  <tom@tromey.com>
509
510         * skip.c (skip_file_command, skip_function_command)
511         (skip_enable_command, skip_disable_command, skip_delete_command):
512         Constify.
513
514 2017-09-27  Tom Tromey  <tom@tromey.com>
515
516         * record-btrace.c (cmd_record_btrace_bts_start)
517         (cmd_record_btrace_pt_start): Constify.
518
519 2017-09-27  Tom Tromey  <tom@tromey.com>
520
521         * symmisc.c (maintenance_print_symbols)
522         (maintenance_print_msymbols, maintenance_print_objfiles)
523         (maintenance_info_symtabs, maintenance_check_symtabs)
524         (maintenance_expand_symtabs, maintenance_info_line_tables):
525         Constify.
526
527 2017-09-27  Tom Tromey  <tom@tromey.com>
528
529         * top.c (new_ui_command): Constify.
530
531 2017-09-27  Tom Tromey  <tom@tromey.com>
532
533         * symfile.c (add_symbol_file_command)
534         (remove_symbol_file_command, list_overlays_command)
535         (map_overlay_command, unmap_overlay_command)
536         (overlay_auto_command, overlay_manual_command)
537         (overlay_off_command, overlay_load_command): Constify.
538
539 2017-09-27  Tom Tromey  <tom@tromey.com>
540
541         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
542         (info_spu_mailbox_command, info_spu_dma_command)
543         (info_spu_proxydma_command): Constify.
544
545 2017-09-27  Tom Tromey  <tom@tromey.com>
546
547         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
548
549 2017-09-27  Tom Tromey  <tom@tromey.com>
550
551         * cli/cli-script.c (user_defined_command): Constify.
552
553 2017-09-27  Tom Tromey  <tom@tromey.com>
554
555         * cli/cli-dump.c (dump_memory_command, dump_value_command)
556         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
557         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
558         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
559         (dump_binary_value, append_binary_memory, append_binary_value):
560         Constify.
561         (struct dump_context) <func>: Constify.
562         (add_dump_command): Update.
563
564 2017-09-27  Tom Tromey  <tom@tromey.com>
565
566         * cli/cli-cmds.c (show_version, show_configuration)
567         (source_command, show_user): Constify.
568
569 2017-09-27  Tom Tromey  <tom@tromey.com>
570
571         * target.c (maintenance_print_target_stack): Constify.
572
573 2017-09-27  Tom Tromey  <tom@tromey.com>
574
575         * interps.c (interpreter_exec_cmd): Constify.
576
577 2017-09-27  Tom Tromey  <tom@tromey.com>
578
579         * record-full.c (cmd_record_full_restore): Constify.
580
581 2017-09-27  Tom Tromey  <tom@tromey.com>
582
583         * memattr.c (enable_mem_command, disable_mem_command)
584         (delete_mem_command): Constify.
585
586 2017-09-27  Tom Tromey  <tom@tromey.com>
587
588         * value.c (show_convenience): Constify.
589
590 2017-09-27  Tom Tromey  <tom@tromey.com>
591
592         * gdbcore.h (core_file_command): Update.
593         * corefile.c (core_file_command): Constify.
594
595 2017-09-27  Tom Tromey  <tom@tromey.com>
596
597         * user-regs.c (maintenance_print_user_registers): Constify.
598
599 2017-09-27  Tom Tromey  <tom@tromey.com>
600
601         * cp-namespace.c (maintenance_cplus_namespace): Constify.
602
603 2017-09-27  Tom Tromey  <tom@tromey.com>
604
605         * cp-support.c (first_component_command): Constify.
606
607 2017-09-27  Tom Tromey  <tom@tromey.com>
608
609         * psymtab.c (maintenance_print_psymbols)
610         (maintenance_info_psymtabs, maintenance_check_psymtabs):
611         Constify.
612
613 2017-09-27  Tom Tromey  <tom@tromey.com>
614
615         * windows-tdep.c (display_tib): Constify.
616
617 2017-09-27  Tom Tromey  <tom@tromey.com>
618
619         * linux-fork.c (delete_checkpoint_command)
620         (detach_checkpoint_command): Constify.
621
622 2017-09-27  Tom Tromey  <tom@tromey.com>
623
624         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
625
626 2017-09-27  Tom Tromey  <tom@tromey.com>
627
628         * arc-tdep.c (dump_arc_instruction_command): Constify.
629
630 2017-09-27  Tom Tromey  <tom@tromey.com>
631
632         * valprint.c (set_radix, show_radix): Constify.
633
634 2017-09-27  Tom Tromey  <tom@tromey.com>
635
636         * dtrace-probe.c (info_probes_dtrace_command): Constify.
637
638 2017-09-27  Tom Tromey  <tom@tromey.com>
639
640         * command.h (not_just_help_class_command): Update.
641         * cli/cli-decode.h (not_just_help_class_command): Update.
642         * cli/cli-decode.c (not_just_help_class_command): Constify.
643
644 2017-09-27  Tom Tromey  <tom@tromey.com>
645
646         * gdb_bfd.c (maintenance_info_bfds): Constify.
647
648 2017-09-27  Tom Tromey  <tom@tromey.com>
649
650         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
651         overloads.
652         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
653         (do_const_cfunc): New function.
654         (cmd_cfunc_eq): New overload.
655         (cli_user_command_p): Check do_const_cfunc.
656         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
657         const_cfunc.
658         * command.h (add_cmd): Add const overload and no-function
659         overload.
660         (set_cmd_cfunc): Add const overload.
661         (cmd_const_cfunc_ftype): Declare.
662         (cmd_cfunc_eq): Add const overload.
663         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
664         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
665         overload.
666
667 2017-09-27  Tom Tromey  <tom@tromey.com>
668
669         * macroexp.c (get_next_token_for_substitution): New function.
670         (substitute_args): Call it.  Check for __VA_OPT__.
671
672 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
673             Pedro Alves <palves@redhat.com>
674
675         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
676         producer_is_icc_lt_14.
677         (producer_is_icc_lt_14): New function.
678         (check_producer): Add code for checking version of ICC.
679         (producer_is_icc): Move to producer.c.
680         (read_structure_type): Restrict ICC workaround to ICC<14.
681         * producer.c: Include selftest.h.
682         (producer_is_icc, producer_parsing_tests, _initialize_producer):
683         New functions.
684         * producer.h (producer_is_icc): New declaration.
685
686 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
687
688         * Makefile.in (SFILES): Add producer.c.
689         (COMMON_OBS): Add producer.o
690         * amd64-tdep.c (producer.h): Add new include.
691         * dwarf2read.c (producer.h): Add new include.
692         * producer.c: New file.
693         * producer.h: New file.
694         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
695         producer.c.
696         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
697         producer.h.
698
699 2017-09-26  Matthias Klose  <doko@ubuntu.com>
700
701         * configure.ac: Search ncursesw before ncurses.
702         Check ncursesw/ncurses.h before ncurses/ncurses.h.
703         * gdb_curses.h: Include <ncursesw/ncurses.h>
704         * config.in, configure: Regenerate.
705
706 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
707
708         PR gdb/22185
709         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
710         obsolete.
711         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
712         Remove i386sol2 support.
713         * configure.nat <i386sol2>: Remove.
714         <sol2-64>: Fold into ...
715         <sol2>: ... this.
716         Move common settings to default section.
717         Add sol-thread.o.
718         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
719         x86_64-*-solaris2.1[0-9]*>: Rename to ...
720         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
721         <i[34567]86-*-solaris*>: Remove.
722         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
723
724         * configure.ac: Remove wctype in libw check.
725         (_MSE_INT_H): Don't define on Solaris 7-9.
726         <solaris*>: Remove libthread_db.so.1 check.
727         * configure: Regenerate.
728         * config.in: Regenerate.
729
730         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
731         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
732         (gdb_ps_size_t): Remove.
733         Use base types in users.
734         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
735
736         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
737
738 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
739
740         PR build/22206
741         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
742         (adi_is_addr_mapped): Likewise.
743         (PSR_ICC): Don't redefine.
744         (PSR_IMPL): Likewise.
745
746 2017-09-25  Tom Tromey  <tom@tromey.com>
747
748         * regcache.c (regcache::dump): Use string_printf.
749
750 2017-09-25  Tom Tromey  <tom@tromey.com>
751
752         * regcache.c (class regcache_invalidator): New.
753         (struct register_to_invalidate): Remove.
754         (make_cleanup_regcache_invalidate): Remove.
755         (regcache::raw_write): Use regcache_invalidator.
756
757 2017-09-25  Tom Tromey  <tom@tromey.com>
758
759         * spu-tdep.c (spu2ppu_sniffer): Update.
760         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
761         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
762         Remove.
763         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
764         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
765         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
766         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
767         (frame_pop): Update.
768
769 2017-09-25  Tom Tromey  <tom@tromey.com>
770
771         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
772         * regcache.h (regcache_xfree): Don't declare.
773         * regcache.c (regcache_xfree): Remove.
774         (do_regcache_xfree): Use delete.
775         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
776         * linux-fork.c (free_fork): Use delete.
777         (fork_save_infrun_state): Likewise.
778         * jit.c (jit_dealloc_cache): Use delete.
779         * infrun.c (discard_infcall_suspend_state): Use delete.
780
781 2017-09-25  Tom Tromey  <tom@tromey.com>
782
783         * regcache.h (regcache_xmalloc): Don't declare.
784         (regcache_raw_set_cached_value): Update comment.
785         * regcache.c (regcache_xmalloc): Remove.
786         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
787         * jit.c (jit_frame_sniffer): Use new.
788         * frame.c (frame_save_as_regcache): Use new.
789
790 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
791
792         * NEWS: Advertise support for guarded-storage registers on IBM z.
793
794 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
795
796         * s390-linux-nat.c (have_regset_gs): New static variable.
797         (s390_linux_fetch_inferior_registers): Handle guarded-storage
798         control block and guarded-storage broadcast control regsets.
799         (s390_read_description): Detect whether the target has
800         guarded-storage support, return appropriate tdesc.
801         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
802         (features/s390x-gs-linux64.c): Likewise.
803         (struct gdbarch_tdep) <have_gs>: New field.
804         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
805         (s390_gsbc_regset): New variables.
806         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
807         and s390_gsbc_regset, if applicable.
808         (s390_core_read_description): Check whether core file was from a
809         target with guarded-storage support; include appropriate regsets.
810         (s390_gdbarch_init): Add registers for guarded-storage support.
811         (_initialize_s390_tdep): Initialize new target descriptions that
812         include registers for guarded-storage support.
813         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
814         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
815         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
816         (S390_NUM_REGS): Adjust macro definition.
817         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
818         (tdesc_s390x_gs_linux64): New declarations.
819
820 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
821
822         * features/s390-gs-linux64.xml: New file.
823         * features/s390-gs.xml: New file.
824         * features/s390-gsbc.xml: New file.
825         * features/s390x-gs-linux64.xml: New file.
826         * features/Makefile (WHICH): Add s390-gs-linux64 and
827         s390x-gs-linux64.
828         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
829         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
830         * features/s390-gs-linux64.c: New generated file.
831         * features/s390x-gs-linux64.c: New file.
832         * regformats/s390-gs-linux64.dat: New file.
833         * regformats/s390x-gs-linux64.dat: New file.
834
835 2017-09-23  Tom Tromey  <tom@tromey.com>
836
837         * defs.h (make_cleanup_override_quit_handler): Don't declare.
838
839 2017-09-22  Tom Tromey  <tom@tromey.com>
840
841         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
842         type to scoped_restore_tmpl.
843         <scoped_input_handler>: Initialize m_quit_handler directly.
844
845 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
846
847         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
848         (cd_command): Likewise.  Free "current_directory" before
849         assigning to it.
850         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
851         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
852         * top.c (gdb_dirbuf): Remove global declaration.
853         * top.h (gdb_dirbuf): Likewise.
854
855 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
856
857         * gnulib/aclocal.m4: Regenerate.
858         * gnulib/config.in: Regenerate.
859         * gnulib/configure: Regenerate.
860         * gnulib/import/Makefile.am: Regenerate.
861         * gnulib/import/Makefile.in: Regenerate.
862         * gnulib/import/assure.h: New file.
863         * gnulib/import/at-func.c: Likewise
864         * gnulib/import/chdir-long.c: New file.
865         * gnulib/import/chdir-long.h: New file.
866         * gnulib/import/cloexec.c: New file.
867         * gnulib/import/cloexec.h: New file.
868         * gnulib/import/close.c: New file.
869         * gnulib/import/closedir.c: New file.
870         * gnulib/import/dirent-private.h: New file.
871         * gnulib/import/dup-safer.c: New file.
872         * gnulib/import/dup.c: New file.
873         * gnulib/import/dup2.c: New file.
874         * gnulib/import/error.c: New file.
875         * gnulib/import/error.h: New file.
876         * gnulib/import/exitfail.c: New file.
877         * gnulib/import/exitfail.h: New file.
878         * gnulib/import/fchdir.c: New file.
879         * gnulib/import/fcntl.c: New file.
880         * gnulib/import/fcntl.in.h: New file.
881         * gnulib/import/fd-hook.c: New file.
882         * gnulib/import/fd-hook.h: New file.
883         * gnulib/import/fd-safer.c: New file.
884         * gnulib/import/fdopendir.c: New file.
885         * gnulib/import/filename.h: New file.
886         * gnulib/import/filenamecat-lgpl.c: New file.
887         * gnulib/import/filenamecat.h: New file.
888         * gnulib/import/fstat.c: New file.
889         * gnulib/import/fstatat.c: New file.
890         * gnulib/import/getcwd-lgpl.c: New file.
891         * gnulib/import/getcwd.c: New file.
892         * gnulib/import/getdtablesize.c: New file.
893         * gnulib/import/getlogin_r.c: New file.
894         * gnulib/import/getprogname.c: New file.
895         * gnulib/import/getprogname.h: New file.
896         * gnulib/import/gettext.h: New file.
897         * gnulib/import/glob-libc.h: New file.
898         * gnulib/import/glob.c: New file.
899         * gnulib/import/glob.in.h: New file.
900         * gnulib/import/intprops.h: New file.
901         * gnulib/import/m4/chdir-long.m4: New file.
902         * gnulib/import/m4/close.m4: New file.
903         * gnulib/import/m4/closedir.m4: New file.
904         * gnulib/import/m4/d-ino.m4: New file.
905         * gnulib/import/m4/d-type.m4: New file.
906         * gnulib/import/m4/dup.m4: New file.
907         * gnulib/import/m4/dup2.m4: New file.
908         * gnulib/import/m4/error.m4: New file.
909         * gnulib/import/m4/fchdir.m4: New file.
910         * gnulib/import/m4/fcntl.m4: New file.
911         * gnulib/import/m4/fcntl_h.m4: New file.
912         * gnulib/import/m4/fdopendir.m4: New file.
913         * gnulib/import/m4/filenamecat.m4: New file.
914         * gnulib/import/m4/fstat.m4: New file.
915         * gnulib/import/m4/fstatat.m4: New file.
916         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
917         * gnulib/import/m4/getcwd-path-max.m4: New file.
918         * gnulib/import/m4/getcwd.m4: New file.
919         * gnulib/import/m4/getdtablesize.m4: New file.
920         * gnulib/import/m4/getlogin_r.m4: New file.
921         * gnulib/import/m4/getprogname.m4: New file.
922         * gnulib/import/m4/glob.m4: New file.
923         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
924         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
925         * gnulib/import/m4/mempcpy.m4: New file.
926         * gnulib/import/m4/memrchr.m4: New file.
927         * gnulib/import/m4/mode_t.m4: New file.
928         * gnulib/import/m4/msvc-inval.m4: New file.
929         * gnulib/import/m4/msvc-nothrow.m4: New file.
930         * gnulib/import/m4/open.m4: New file.
931         * gnulib/import/m4/openat.m4: New file.
932         * gnulib/import/m4/opendir.m4: New file.
933         * gnulib/import/m4/readdir.m4: New file.
934         * gnulib/import/m4/realloc.m4: New file.
935         * gnulib/import/m4/rewinddir.m4: New file.
936         * gnulib/import/m4/save-cwd.m4: New file.
937         * gnulib/import/m4/strdup.m4: New file.
938         * gnulib/import/m4/strerror.m4: New file.
939         * gnulib/import/m4/unistd-safer.m4: New file.
940         * gnulib/import/mempcpy.c: New file.
941         * gnulib/import/memrchr.c: New file.
942         * gnulib/import/msvc-inval.c: New file.
943         * gnulib/import/msvc-inval.h: New file.
944         * gnulib/import/msvc-nothrow.c: New file.
945         * gnulib/import/msvc-nothrow.h: New file.
946         * gnulib/import/open.c: New file.
947         * gnulib/import/openat-die.c: New file.
948         * gnulib/import/openat-priv.h: New file.
949         * gnulib/import/openat-proc.c: New file.
950         * gnulib/import/openat.c: New file.
951         * gnulib/import/openat.h: New file.
952         * gnulib/import/opendir.c: New file.
953         * gnulib/import/pipe-safer.c: New file.
954         * gnulib/import/readdir.c: New file.
955         * gnulib/import/realloc.c: New file.
956         * gnulib/import/rewinddir.c: New file.
957         * gnulib/import/save-cwd.c: New file.
958         * gnulib/import/save-cwd.h: New file.
959         * gnulib/import/strdup.c: New file.
960         * gnulib/import/strerror-override.c: New file.
961         * gnulib/import/strerror-override.h: New file.
962         * gnulib/import/strerror.c: New file.
963         * gnulib/import/unistd--.h: New file.
964         * gnulib/import/unistd-safer.h: New file.
965         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
966         "getcwd" and "glob".
967         * ser-tcp.c: Undefine "close" before redefining it.
968
969 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
970
971         * guile/scm-value.c (gdbscm_value_address): Initialize address,
972         get rid of res_val.
973
974 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
975
976         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
977         <sol2,sparc>: Likewise.
978         <sol2-64,i386>: Likewise.
979
980         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
981         -Wdeprecated-declarations on *-*-solaris*.
982         * configure: Regenerate.
983
984         * procfs.c: Include "nat/inferior.h".
985         (procfs_info_proc): Fix typo.
986
987 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
988
989         * remote.c (vector): Include.
990         (struct private_thread_info): Add field, thread_handle.
991         (free_private_thread_info): Deallocate storage associated with
992         thread handle.
993         (get_private_info_thread): Initialize `thread_handle' field.
994         (struct thread_item): Add field, thread_handle.
995         (clear_threads_listing_context): Deallocate storage associated
996         with thread handle.
997         (start_thread): Add support for "handle" attribute.
998         (thread_attributes): Add "handle".
999         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
1000         field.
1001         (remote_update_thread_list): Update thread_handle.
1002         (remote_thread_handle_to_thread_info): New function.
1003         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
1004
1005 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1006
1007         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
1008         function.
1009         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
1010         * python/python-internal.h (thread_object_type): Declare.
1011
1012 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1013
1014         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
1015         (target_thread_handle_to_thread_info): Declare.
1016         * target.c (target_thread_handle_to_thread_info): New function.
1017         * target-delegates.c: Regenerate.
1018         * gdbthread.h (find_thread_by_handle): Declare.
1019         * thread.c (find_thread_by_handle): New function.
1020         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
1021         function.
1022         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
1023
1024 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1025
1026         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
1027
1028 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
1029
1030         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
1031
1032 2017-09-21  Yao Qi  <yao.qi@linaro.org>
1033
1034         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
1035         to gdb_target_obs.
1036
1037 2017-09-20  Tom Tromey  <tom@tromey.com>
1038
1039         * breakpoint.c (struct counted_command_line): Remove.
1040         (breakpoint_commands): Update.
1041         (alloc_counted_command_line, incref_counted_command_line)
1042         (decref_counted_command_line, do_cleanup_counted_command_line)
1043         (make_cleanup_decref_counted_command_line): Remove.
1044         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
1045         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
1046         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
1047         (save_breakpoints): Update.
1048         * breakpoint.h (counted_command_line): Now a typedef to
1049         shared_ptr.
1050         (struct breakpoint) <commands>: Now a counted_command_line.
1051         (struct bpstats) <command>: Likewise.
1052
1053 2017-09-20  Tom Tromey  <tom@tromey.com>
1054
1055         * breakpoint.c (struct commands_info, do_map_commands_command):
1056         Remove.
1057         (commands_command_1): Update.
1058         (iterate_over_related_breakpoints): Take a function_view.
1059         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
1060         (delete_command): Update.
1061         (map_breakpoint_numbers): Take a function_view.
1062         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
1063         (disable_command): Update.
1064         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
1065         (enable_command): Update.
1066         (struct disp_data, do_enable_breakpoint_disp)
1067         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
1068         (do_map_enable_delete_breakpoint): Remove.
1069         (enable_once_command, enable_count_command, enable_delete_command)
1070         (delete_trace_variable_command): Update.
1071
1072 2017-09-20  Tom Tromey  <tom@tromey.com>
1073
1074         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
1075         (bpstat_clear): Use delete.
1076         (bpstats): New constructors.
1077         (bpstat_copy, bpstat_stop_status): Use new.
1078         (dprintf_after_condition_true): Update.
1079         * breakpoint.h (bpstats::bpstats): Add constructors.
1080         (bpstats::~bpstats): Add destructor.
1081
1082 2017-09-20  Pedro Alves  <palves@redhat.com>
1083
1084         * eval.c (make_params): Delete, refactored as ...
1085         (class fake_method): ... this new type's ctor.
1086         (fake_method::~fake_method): New.
1087         (evaluate_subexp_standard): Use 'fake_method'.
1088
1089 2017-09-20  Tom Tromey  <tom@tromey.com>
1090
1091         * windows-nat.c (get_windows_debug_event, windows_wait)
1092         (do_initial_windows_stuff, windows_attach): Update.
1093         * utils.c (vwarning, internal_vproblem): Update.
1094         (ui_unregister_input_event_handler_cleanup)
1095         (prepare_to_handle_input): Remove.
1096         (class scoped_input_handler): New.
1097         (defaulted_query, prompt_for_continue): Update.
1098         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
1099         Update.
1100         * top.c (undo_terminal_modifications_before_exit): Update.
1101         * target/target.h (target_terminal_init, target_terminal_inferior)
1102         (target_terminal_ours): Don't declare.
1103         (class target_terminal): New.
1104         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
1105         (target_terminal_ours_for_output)
1106         (make_cleanup_restore_target_terminal): Don't declare.
1107         (target_terminal_info): Remove.
1108         * target.c (enum terminal_state, terminal_state): Remove.
1109         (target_terminal::terminal_state): Define.
1110         (target_terminal::init): Rename from target_terminal_init.
1111         (target_terminal::inferior): Rename from
1112         target_terminal_inferior.
1113         (target_terminal::ours): Rename from target_terminal_ours.
1114         (target_terminal::ours_for_output): Rename from
1115         target_terminal_ours_for_output.
1116         (target_terminal::info): New method.
1117         (cleanup_restore_target_terminal)
1118         (make_cleanup_restore_target_terminal): Remove.
1119         * solib.c (handle_solib_event): Update.
1120         * remote.c (remote_serial_quit_handler): Update.
1121         (remote_terminal_inferior, remote_wait_as): Update.
1122         * record-full.c (record_full_wait_1): Update.
1123         * nto-procfs.c (procfs_create_inferior): Update.
1124         * nat/fork-inferior.c (startup_inferior): Update.
1125         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
1126         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
1127         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
1128         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
1129         (mi_breakpoint_created, mi_breakpoint_deleted)
1130         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
1131         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
1132         (mi_user_selected_context_changed, report_initial_inferior):
1133         Update.
1134         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
1135         (linux_nat_terminal_inferior): Update.
1136         * infrun.c (follow_fork_inferior)
1137         (handle_vfork_child_exec_or_exit, do_target_resume)
1138         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
1139         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
1140         Update.
1141         * inflow.c (child_terminal_init, info_terminal_command): Update.
1142         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
1143         (attach_command): Update.
1144         * infcall.c (call_thread_fsm_should_stop): Update.
1145         * gnu-nat.c (gnu_attach): Update.
1146         * extension.c (struct active_ext_lang_state)
1147         (restore_active_ext_lang): Update.
1148         * exceptions.c (print_flush): Update.
1149         * event-top.c (async_enable_stdin, default_quit_handler): Update.
1150         (struct quit_handler_cleanup_data, restore_quit_handler)
1151         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
1152         Remove.
1153         * cp-support.c (gdb_demangle): Update.
1154         * breakpoint.c (update_inserted_breakpoint_locations)
1155         (insert_breakpoint_locations, handle_jit_event)
1156         (disable_breakpoints_in_unloaded_shlib): Update.
1157         * annotate.c (annotate_breakpoints_invalid)
1158         (annotate_frames_invalid): Update.
1159
1160 2017-09-20  Tom Tromey  <tom@tromey.com>
1161
1162         * main.c (catch_command_errors): Rename from
1163         catch_command_errors_const.
1164         (captured_main_1): Update.
1165
1166 2017-09-20  Pedro Alves  <palves@redhat.com>
1167
1168         * cli/cli-cmds.c (list_command): Use print_sal_location.
1169         (print_sal_location): New function.
1170         (ambiguous_line_spec): Use print_sal_location.
1171         * linespec.c (symbol_to_sal): Record the symbol in the sal.
1172         * symtab.c (find_function_start_sal): Likewise.
1173         * symtab.h (symtab_and_line::symbol): New field.
1174
1175 2017-09-20  Pedro Alves  <palves@redhat.com>
1176
1177         * linespec.c (minsym_found): Handle non-text minsyms.
1178         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
1179
1180 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1181
1182         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
1183         backslash.
1184
1185 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1186
1187         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
1188         vmovups instead vmovaps.
1189         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
1190
1191 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
1192
1193         * NEWS (Changes since GDB 8.0): Add starti.
1194         * infcmd.c (enum run_break): New.
1195         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
1196         case.
1197         (run_command): Use enum run_how.
1198         (start_command): Likewise.
1199         (starti_command): New function.
1200         (RUN_ARGS_HELP): New macro.
1201         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
1202         commands.  Add starti command.
1203
1204 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1205
1206         * Makefile.in (monitor.o): Remove the rule.
1207
1208 2017-09-19  Yao Qi  <yao.qi@linaro.org>
1209
1210         * annotate.h (struct annotate_arg_emitter): Use
1211         DISABLE_COPY_AND_ASSIGN.
1212         * common/refcounted-object.h (refcounted_object): Likewise.
1213         * completer.h (struct completion_result): Likewise.
1214         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
1215         * filename-seen-cache.h (filename_seen_cache): Likewise.
1216         * gdbcore.h (thread_section_name): Likewise.
1217         * gdb_regex.h (compiled_regex): Likewise.
1218         * gdbthread.h (scoped_restore_current_thread): Likewise.
1219         * inferior.h (scoped_restore_current_inferior): Likewise.
1220         * jit.c (jit_reader): Likewise.
1221         * linespec.h (struct linespec_result): Likewise.
1222         * mi/mi-parse.h (struct mi_parse): Likewise.
1223         * nat/fork-inferior.c (execv_argv): Likewise.
1224         * progspace.h (scoped_restore_current_program_space): Likewise.
1225         * python/python-internal.h (class gdbpy_enter): Likewise.
1226         * regcache.h (regcache): Likewise.
1227         * target-descriptions.c (struct tdesc_reg): Likewise.
1228         (struct tdesc_type): Likewise.
1229         (struct tdesc_feature): Likewise.
1230         * ui-out.h (ui_out_emit_type): Likewise.
1231
1232 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1233
1234         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
1235         label abort_expression.
1236
1237 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1238
1239         * common/buffer.c (buffer_xml_printf): Adjust.
1240         * common/xml-utils.c (xml_escape_text): Change return type to
1241         std::string, update code accordingly.
1242         * common/xml-utils.h (xml_escape_text): Change return type to
1243         std::string.
1244         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
1245         * windows-tdep.c (windows_xfer_shared_library): Adjust.
1246         * unittests/xml-utils-selftests.c (test_xml_escape_text):
1247         Adjust.
1248
1249 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1250
1251         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
1252         (SUBDIR_UNITTESTS_OBS): Add new object file.
1253         * unittests/xml-utils-selftests.c: New file.
1254
1255 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1256
1257         * common/selftest.h (selftest): New struct/interface.
1258         (register_test): Add name parameter, add new overload.
1259         (run_tests): Add filter parameter.
1260         (for_each_selftest_ftype): New typedef.
1261         (for_each_selftest): New declaration.
1262         * common/selftest.c (tests): Change type to
1263         map<string, unique_ptr<selftest>>.
1264         (simple_selftest): New struct.
1265         (register_test): New function.
1266         (register_test): Add name parameter and use it.
1267         (run_tests): Add filter parameter and use it.  Add prints.
1268         Adjust to vector -> map change.
1269         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
1270         registering selftests.
1271         * arm-tdep.c (_initialize_arm_tdep): Likewise.
1272         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
1273         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
1274         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
1275         * findvar.c (_initialize_findvar): Likewise.
1276         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
1277         * maint.c (maintenance_selftest): Update call to run_tests.
1278         (maintenance_info_selftests): New function.
1279         (_initialize_maint_cmds): Register "maintenance info selftests"
1280         command.  Update "maintenance selftest" doc.
1281         * regcache.c (_initialize_regcache): Add names when registering
1282         selftests.
1283         * rust-exp.y (_initialize_rust_exp): Likewise.
1284         * selftest-arch.c (gdbarch_selftest): New struct.
1285         (gdbarch_tests): Remove.
1286         (register_test_foreach_arch): Add name parameter.  Call
1287         register_test.
1288         (tests_with_arch): Remove, move most content to
1289         gdbarch_selftest::operator().
1290         (_initialize_selftests_foreach_arch): Remove.
1291         * selftest-arch.h (register_test_foreach_arch): Add name
1292         parameter.
1293         (run_tests_with_arch): New declaration.
1294         * utils-selftests.c (_initialize_utils_selftests): Add names
1295         when registering selftests.
1296         * utils.c (_initialize_utils): Likewise.
1297         * unittests/array-view-selftests.c
1298         (_initialize_array_view_selftests): Likewise.
1299         * unittests/environ-selftests.c (_initialize_environ_selftests):
1300         Likewise.
1301         * unittests/function-view-selftests.c
1302         (_initialize_function_view_selftests): Likewise.
1303         * unittests/offset-type-selftests.c
1304         (_initialize_offset_type_selftests): Likewise.
1305         * unittests/optional-selftests.c
1306         (_initialize_optional_selftests): Likewise.
1307         * unittests/scoped_restore-selftests.c
1308         (_initialize_scoped_restore_selftests): Likewise.
1309         * NEWS: Document "maintenance selftest" and "maint info
1310         selftests".
1311
1312 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1313
1314         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
1315         scoped_restore.
1316
1317 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1318
1319         * mi/mi-main.c (mi_load_progress): Make uiout variable
1320         a unique_ptr.
1321
1322 2017-09-15  Pedro Alves  <palves@redhat.com>
1323
1324         * compile/compile-c-types.c (convert_enum, convert_int)
1325         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
1326
1327 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1328
1329         * dwarf2read.c (copy_string): Remove.
1330         (parse_macro_definition): Replace copy_string with savestring.
1331
1332 2017-09-15  Yao Qi  <yao.qi@linaro.org>
1333
1334         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
1335         gdb_target_obs.
1336         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
1337         Likewise.
1338         (i[34567]86-*-linux*): Likewise.
1339
1340 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1341
1342         * dwarf2expr.h (dwarf_stack_value): Add constructor.
1343         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
1344         <stack>: Change type to std::vector.
1345         <stack_len, stack_allocated>: Remove.
1346         <grow_stack>: Remove.
1347         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1348         (dwarf_expr_context::~dwarf_expr_context): Remove.
1349         (dwarf_expr_context::grow_stack): Remove.
1350         (dwarf_expr_context::push): Adjust.
1351         (dwarf_expr_context::pop): Adjust.
1352         (dwarf_expr_context::fetch): Adjust.
1353         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
1354         (dwarf_expr_context::stack_empty_p): Adjust.
1355         (dwarf_expr_context::execute_stack_op): Adjust.
1356
1357 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1358
1359         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
1360         return type to bool.
1361         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
1362
1363 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1364
1365         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
1366         Change type to bool.
1367         (dwarf_stack_value) <in_stack_memory>: Likewise.
1368         (dwarf_expr_context) <push_address>: Change parameter type to
1369         bool.
1370         <fetch_in_stack_memory>: Change return type to bool.
1371         <push>: Change parameter type to bool.
1372         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
1373         to bool.
1374         (dwarf_expr_context::push_address): Likewise.
1375         (dwarf_expr_context::fetch_in_stack_memory): Change return type
1376         to bool.
1377         (dwarf_expr_context::execute_stack_op): Adjust.
1378         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
1379
1380 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
1381
1382         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
1383         (struct dwarf_expr_context) <n_pieces>: Remove.
1384         <pieces>: Change type to std::vector.
1385         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
1386         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
1387         pieces.
1388         (dwarf_expr_context::add_piece): Adjust.
1389         * dwarf2loc.c (struct piece_closure): Initialize fields.
1390         <n_pieces>: Remove.
1391         <pieces>: Change type to std::vector.
1392         (allocate_piece_closure): Adjust, change parameter to
1393         std::vector rvalue and std::move it to piece_closure.
1394         (rw_pieced_value): Adjust.
1395         (check_pieced_synthetic_pointer): Adjust.
1396         (indirect_synthetic_pointer): Adjust.
1397         (coerce_pieced_ref): Adjust.
1398         (free_pieced_value_closure):  Adjust.  Use delete to free
1399         piece_closure.
1400         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
1401         to allocate_piece_closure.
1402         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
1403
1404 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1405
1406         * probe.h (probe_ops_cp): Remove typedef.
1407         (DEF_VEC_P (probe_ops_cp)): Remove.
1408         (all_probe_ops): Change type to std::vector.
1409         * probe.c (info_probes_for_ops): Adjust to vector change.
1410         (probe_linespec_to_ops): Likewise.
1411         (all_probe_ops): Change type to std::vector.
1412         (_initialize_probe): Adjust to vector change.
1413         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
1414         * elfread.c (elf_get_probes): Likewise.
1415         * stap-probe.c (_initialize_stap_probe): Likewise.
1416
1417 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1418
1419         * probe.h (struct bound_probe): Define constructors.
1420         * probe.c (bound_probe_s): Remove typedef.
1421         (DEF_VEC_O (bound_probe_s)): Remove VEC.
1422         (collect_probes): Change return type to std::vector, remove
1423         cleanup.
1424         (compare_probes): Return bool, change parameter type.  Change
1425         semantic to "less than".
1426         (gen_ui_out_table_header_info): Change parameter to std::vector
1427         and update.
1428         (exists_probe_with_pops): Likewise.
1429         (info_probes_for_ops): Update to std::vector change.
1430         (enable_probes_command): Likewise.
1431         (disable_probes_command): Likewise.
1432
1433 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1434
1435         * probe.h (struct probe_ops) <get_probes>: Change parameter from
1436         vec to std::vector.
1437         * probe.c (parse_probes_in_pspace): Update.
1438         (find_probes_in_objfile): Update.
1439         (find_probe_by_pc): Update.
1440         (collect_probes): Update.
1441         (probe_any_get_probes): Update.
1442         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
1443         return type to reference to std::vector.
1444         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
1445         std::vector and update.
1446         (dtrace_process_dof): Likewise.
1447         (dtrace_get_probes): Likewise.
1448         * elfread.c (elf_get_probes): Change return type to std::vector,
1449         store an std::vector in bfd_data.
1450         (probe_key_free): Update to std::vector.
1451         * stap-probe.c (handle_stap_probe): Change parameter to
1452         std::vector and update.
1453         (stap_get_probes): Likewise.
1454         * symfile-debug.c (debug_sym_get_probes): Change return type to
1455         std::vector and update.
1456
1457 2017-09-11  Tom Tromey  <tom@tromey.com>
1458
1459         * breakpoint.c (program_breakpoint_here_p): Update.
1460         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
1461         from make_show_memory_breakpoints_cleanup.  Return a
1462         scoped_restore_tmpl<int>.
1463         (restore_show_memory_breakpoints): Remove.
1464         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
1465         * mem-break.c (memory_validate_breakpoint): Update.
1466         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
1467         (ia64_memory_remove_breakpoint): Update.
1468         (ia64_breakpoint_from_pc): Update.
1469         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
1470         from make_show_memory_breakpoints_cleanup.
1471
1472 2017-09-11  Tom Tromey  <tom@tromey.com>
1473
1474         * d-namespace.c (d_lookup_symbol): Use std::string.
1475         (find_symbol_in_baseclass): Likewise.
1476
1477 2017-09-11  Tom Tromey  <tom@tromey.com>
1478
1479         * ctf.c (ctf_start): Use std::string.
1480
1481 2017-09-11  Tom Tromey  <tom@tromey.com>
1482
1483         * ada-lang.c (is_known_support_routine): Update.
1484         (ada_unhandled_exception_name_addr_from_raise): Update.
1485         * guile/scm-frame.c (gdbscm_frame_name): Update.
1486         * python/py-frame.c (frapy_name): Update.
1487         (frapy_function): Update.
1488         * stack.h (find_frame_funname): Update.
1489         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
1490         (print_frame): Update.
1491
1492 2017-09-11  Tom Tromey  <tom@tromey.com>
1493
1494         * findcmd.c (put_bits): Take a gdb::byte_vector.
1495         (parse_find_args): Return gdb::byte_vector.  "args" now const.
1496         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
1497         cleanups.
1498         (find_command): Update.
1499
1500 2017-09-11  Tom Tromey  <tom@tromey.com>
1501
1502         * cli/cli-script.c (class scoped_restore_hook_in): New.
1503         (clear_hook_in_cleanup): Remove.
1504         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
1505         scoped_restore_hook_in.
1506
1507 2017-09-11  Tom Tromey  <tom@tromey.com>
1508
1509         * cli/cli-script.c (restore_interp): Remove.
1510         (read_command_lines): Use scoped_restore_interp.
1511         * interps.c (scoped_restore_interp::set_temp): Rename from
1512         interp_set_temp.
1513         * interps.h (class scoped_restore_interp): New.
1514         (interp_set_temp): Remove.
1515
1516 2017-09-11  Tom Tromey  <tom@tromey.com>
1517
1518         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
1519         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
1520         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
1521         scoped_restore.
1522         (mi_cmd_break_insert_1): Update.
1523         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
1524         scoped_restore.
1525
1526 2017-09-11  Tom Tromey  <tom@tromey.com>
1527
1528         * demangle.c (demangle_command): Update.
1529         * breakpoint.c (disable_command): Update.
1530         (enable_command): Update.
1531         (find_location_by_number): Make "number" const.  Use
1532         get_number_trailer.
1533         * cli/cli-utils.c (extract_arg): Return std::string.
1534         * probe.c (parse_probe_linespec): Update.  Change types.
1535         (collect_probes): Take string arguments.
1536         (parse_probe_linespec): Likewise.
1537         (info_probes_for_ops): Update.
1538         (enable_probes_command): Update.
1539         (disable_probes_command): Update.
1540         * break-catch-sig.c (catch_signal_split_args): Update.
1541         * mi/mi-parse.c (mi_parse): Update.
1542
1543 2017-09-11  Tom Tromey  <tom@tromey.com>
1544
1545         * language.h (language_enum): Make argument const.
1546         * language.c (language_enum): Make argument const.
1547
1548 2017-09-11  Tom Tromey  <tom@tromey.com>
1549
1550         * common/common-utils.h (skip_to_space): Remove macro, redeclare
1551         as function.
1552         (skip_to_space): Rename from skip_to_space_const.
1553         * common/common-utils.c (skip_to_space): New function.
1554         (skip_to_space): Rename from skip_to_space_const.
1555         * cli/cli-utils.h (get_number): Rename from get_number_const.
1556         (extract_arg): Rename from extract_arg_const.
1557         * cli/cli-utils.c (get_number): Rename from get_number_const.
1558         (extract_arg): Rename from extract_arg_const.
1559         (number_or_range_parser::get_number): Use ::get_number.
1560         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
1561         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
1562         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
1563         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
1564         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
1565         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
1566         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
1567         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
1568
1569 2017-09-11  Tom Tromey  <tom@tromey.com>
1570
1571         * python/python.c (do_start_initialization): Use
1572         py-event-types.def to initialize types.
1573         Define all object type structures.
1574         * python/python-internal.h: Don't declare event initialization
1575         functions.
1576         * python/py-threadevent.c (thread_event_object_type): Don't
1577         define.
1578         * python/py-stopevent.c (stop_event_object_type): Don't define.
1579         * python/py-signalevent.c (signal_event_object_type): Don't
1580         declare or define.
1581         * python/py-newobjfileevent.c (new_objfile_event_object_type)
1582         (clear_objfiles_event_object_type): Don't declare or define.
1583         * python/py-infevents.c (inferior_call_pre_event_object_type)
1584         (inferior_call_post_event_object_type)
1585         (register_changed_event_object_type)
1586         (memory_changed_event_object_type): Don't declare or define.
1587         * python/py-inferior.c (new_thread_event_object_type)
1588         (new_inferior_event_object_type)
1589         (inferior_deleted_event_object_type): Don't declare or define.
1590         * python/py-exitedevent.c (exited_event_object_type): Don't
1591         declare or define.
1592         * python/py-evts.c (gdbpy_initialize_py_events): Use
1593         py-all-events.def.
1594         * python/py-events.h (thread_event_object_type): Don't declare.
1595         (events_object): Use py-all-events.def.
1596         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
1597         py-event-types.def.
1598         * python/py-event-types.def: New file.
1599         * python/py-continueevent.c (create_continue_event_object): Don't
1600         declare or define.
1601         * python/py-bpevent.c (breakpoint_event_object_type): Don't
1602         declare or define.
1603         * python/py-all-events.def: New file.
1604
1605 2017-09-11  Tom Tromey  <tom@tromey.com>
1606
1607         * python/py-threadevent.c (create_thread_event_object): Return
1608         gdbpy_ref.
1609         * python/py-stopevent.h (create_stop_event_object)
1610         (create_breakpoint_event_object, create_signal_event_object):
1611         Update.
1612         * python/py-stopevent.c (create_stop_event_object): Return
1613         gdbpy_ref.
1614         (emit_stop_event): Update.
1615         * python/py-signalevent.c (create_signal_event_object): Return
1616         gdbpy_ref.
1617         * python/py-infevents.c (create_inferior_call_event_object):
1618         Update.
1619         * python/py-event.h (create_event_object)
1620         (create_thread_event_object): Update.
1621         * python/py-event.c (create_event_object): Return gdbpy_ref.
1622         * python/py-continueevent.c: Return gdbpy_ref.
1623         * python/py-bpevent.c (create_breakpoint_event_object): Return
1624         gdbpy_ref.
1625
1626 2017-09-11  Tom Tromey  <tom@tromey.com>
1627
1628         PR python/15622:
1629         * NEWS: Add entry.
1630         * python/python.c (do_start_initialization): Initialize new event
1631         types.
1632         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
1633         (gdbpy_initialize_inferior_deleted_event)
1634         (gdbpy_initialize_new_thread_event): Declare.
1635         * python/py-threadevent.c (create_thread_event_object): Add option
1636         "thread" parameter.
1637         * python/py-inferior.c (new_thread_event_object_type)
1638         (new_inferior_event_object_type)
1639         (inferior_deleted_event_object_type): Declare.
1640         (python_new_inferior, python_inferior_deleted): New functions.
1641         (add_thread_object): Emit new_thread event.
1642         (gdbpy_initialize_inferior): Attach new functions to corresponding
1643         observers.
1644         (new_thread, new_inferior, inferior_deleted): Define new event
1645         types.
1646         * python/py-evts.c (gdbpy_initialize_py_events): Add new
1647         registries.
1648         * python/py-events.h (events_object) <new_inferior,
1649         inferior_deleted, new_thread>: New fields.
1650         * python/py-event.h (create_thread_event_breakpoint): Add optional
1651         "thread" parameter.
1652
1653 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1654
1655         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
1656         check current_ui instead.
1657         (internal_vproblem): Likewise.
1658
1659 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1660
1661         * thread.c (print_thread_info_1): Remove unnecessary calls to
1662         uiout->is_mi_like_p.
1663
1664 2017-09-09  Tom Tromey  <tom@tromey.com>
1665
1666         * namespace.h (add_using_directive): Update.
1667         * namespace.c (add_using_directive): Change type of excludes to
1668         std::vector.
1669         * dwarf2read.c (read_import_statement): Use std::vector.
1670         (read_namespace): Update.
1671         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1672
1673 2017-09-09  Tom Tromey  <tom@tromey.com>
1674
1675         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1676
1677 2017-09-09  Tom Tromey  <tom@tromey.com>
1678
1679         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1680
1681 2017-09-09  Tom Tromey  <tom@tromey.com>
1682
1683         * stack.c (func_command): Use gdb::def_vector.
1684
1685 2017-09-09  Tom Tromey  <tom@tromey.com>
1686
1687         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1688         ui_out_emit_list, ui_out_emit_tuple.
1689         (mi_cmd_var_update): Likewise.
1690
1691 2017-09-09  Tom Tromey  <tom@tromey.com>
1692
1693         * mi/mi-interp.c (mi_user_selected_context_changed): Use
1694         ui_out_redirect_pop.
1695         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1696         ui_out_redirect_pop.
1697         * utils.c (do_ui_out_redirect_pop)
1698         (make_cleanup_ui_out_redirect_pop): Remove.
1699         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1700         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1701         * ui-out.h (ui_out_redirect_pop): New class.
1702
1703 2017-09-09  Tom Tromey  <tom@tromey.com>
1704
1705         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1706         (list_available_thread_groups, mi_cmd_list_thread_groups)
1707         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1708         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1709         Likewise.
1710
1711 2017-09-09  Tom Tromey  <tom@tromey.com>
1712
1713         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1714         ui_out_emit_tuple.
1715
1716 2017-09-09  Tom Tromey  <tom@tromey.com>
1717
1718         * target.c (flash_erase_command): Use ui_out_emit_tuple.
1719         * stack.c (print_frame): Use ui_out_emit_tuple.
1720         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1721         (info_spu_mailbox_command, info_spu_dma_command)
1722         (info_spu_proxydma_command): Likewise.
1723         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1724         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1725         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1726         ui_out_emit_tuple.
1727         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1728
1729 2017-09-09  Tom Tromey  <tom@tromey.com>
1730
1731         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1732         (class ui_out_emit_table): Update comment.
1733         * ui-out.c (do_cleanup_table_end)
1734         (make_cleanup_ui_out_table_begin_end): Remove.
1735         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1736         (info_spu_dma_cmdlist): Likewise.
1737         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1738         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1739         ui_out_emit_table.
1740
1741 2017-09-09  Tom Tromey  <tom@tromey.com>
1742
1743         * thread.c (print_thread_info_1): Use ui_out_emit_table,
1744         ui_out_emit_list, gdb::optional.
1745
1746 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
1747
1748         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1749         prototype.
1750         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1751         prototype.
1752         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1753         prototype.
1754         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1755         * ada-exp.y: Remove _initialize_ada_exp prototype.
1756         * ada-lang.c: Remove _initialize_ada_language prototype.
1757         * ada-tasks.c: Remove _initialize_tasks prototype.
1758         * addrmap.c: Remove _initialize_addrmap prototype.
1759         * agent.c: Remove _initialize_agent prototype.
1760         * aix-thread.c: Remove _initialize_aix_thread prototype.
1761         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1762         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1763         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1764         prototype.
1765         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1766         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1767         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1768         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1769         prototype.
1770         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1771         prototype.
1772         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1773         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1774         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1775         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1776         prototype.
1777         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1778         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1779         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1780         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1781         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1782         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1783         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1784         prototype.
1785         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1786         prototype.
1787         * annotate.c: Remove _initialize_annotate prototype.
1788         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1789         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1790         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1791         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1792         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1793         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1794         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1795         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1796         prototype.
1797         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1798         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1799         * auto-load.c: Remove _initialize_auto_load prototype.
1800         * auxv.c: Remove _initialize_auxv prototype.
1801         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1802         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1803         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1804         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1805         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1806         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1807         prototype.
1808         * break-catch-throw.c: Remove _initialize_break_catch_throw
1809         prototype.
1810         * breakpoint.c: Remove _initialize_breakpoint prototype.
1811         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1812         * btrace.c: Remove _initialize_btrace prototype.
1813         * charset.c: Remove _initialize_charset prototype.
1814         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1815         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1816         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1817         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1818         * cli/cli-script.c: Remove _initialize_cli_script prototype.
1819         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1820         * coffread.c: Remove _initialize_coffread prototype.
1821         * compile/compile.c: Remove _initialize_compile prototype.
1822         * complaints.c: Remove _initialize_complaints prototype.
1823         * completer.c: Remove _initialize_completer prototype.
1824         * copying.awk: Remove _initialize_copying prototype.
1825         * copying.c: Regenerate.
1826         * core-regset.c: Remove _initialize_core_regset prototype.
1827         * corefile.c: Remove _initialize_core prototype.
1828         * corelow.c: Remove _initialize_corelow prototype.
1829         * cp-abi.c: Remove _initialize_cp_abi prototype.
1830         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1831         * cp-support.c: Remove _initialize_cp_support prototype.
1832         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1833         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1834         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1835         * ctf.c: Remove _initialize_ctf prototype.
1836         * d-lang.c: Remove _initialize_d_language prototype.
1837         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1838         prototype.
1839         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1840         * dbxread.c: Remove _initialize_dbxread prototype.
1841         * dcache.c: Remove _initialize_dcache prototype.
1842         * demangle.c: Remove _initialize_demangler prototype.
1843         * disasm-selftests.c: Remove _initialize_disasm_selftests
1844         prototype.
1845         * disasm.c: Remove _initialize_disasm prototype.
1846         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1847         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1848         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1849         prototype.
1850         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1851         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1852         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1853         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1854         * elfread.c: Remove _initialize_elfread prototype.
1855         * exec.c: Remove _initialize_exec prototype.
1856         * extension.c: Remove _initialize_extension prototype.
1857         * f-lang.c: Remove _initialize_f_language prototype.
1858         * f-valprint.c: Remove _initialize_f_valprint prototype.
1859         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1860         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1861         * filesystem.c: Remove _initialize_filesystem prototype.
1862         * findcmd.c: Remove _initialize_mem_search prototype.
1863         * fork-child.c: Remove _initialize_fork_child prototype.
1864         * frame-base.c: Remove _initialize_frame_base prototype.
1865         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1866         * frame.c: Remove _initialize_frame prototype.
1867         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1868         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1869         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1870         * gcore.c: Remove _initialize_gcore prototype.
1871         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1872         * gdbarch.c: Regenerate.
1873         * gdbarch.sh: Remove _initialize_gdbarch prototype.
1874         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1875         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1876         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1877         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1878         * go-lang.c: Remove _initialize_go_language prototype.
1879         * go32-nat.c: Remove _initialize_go32_nat prototype.
1880         * guile/guile.c: Remove _initialize_guile prototype.
1881         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1882         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1883         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1884         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1885         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1886         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1887         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1888         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1889         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1890         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1891         prototype.
1892         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1893         prototype.
1894         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1895         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1896         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1897         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1898         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1899         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1900         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1901         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1902         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1903         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1904         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1905         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1906         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1907         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1908         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1909         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1910         prototype.
1911         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1912         prototype.
1913         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1914         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1915         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1916         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1917         * infcall.c: Remove _initialize_infcall prototype.
1918         * infcmd.c: Remove _initialize_infcmd prototype.
1919         * inferior.c: Remove _initialize_inferiors prototype.
1920         * inflow.c: Remove _initialize_inflow prototype.
1921         * infrun.c: Remove _initialize_infrun prototype.
1922         * interps.c: Remove _initialize_interpreter prototype.
1923         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1924         * jit.c: Remove _initialize_jit prototype.
1925         * language.c: Remove _initialize_language prototype.
1926         * linux-fork.c: Remove _initialize_linux_fork prototype.
1927         * linux-nat.c: Remove _initialize_linux_nat prototype.
1928         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1929         * linux-thread-db.c: Remove _initialize_thread_db prototype.
1930         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1931         * m2-lang.c: Remove _initialize_m2_language prototype.
1932         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1933         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1934         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1935         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1936         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1937         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1938         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1939         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1940         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1941         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1942         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1943         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1944         * machoread.c: Remove _initialize_machoread prototype.
1945         * macrocmd.c: Remove _initialize_macrocmd prototype.
1946         * macroscope.c: Remove _initialize_macroscope prototype.
1947         * maint.c: Remove _initialize_maint_cmds prototype.
1948         * mdebugread.c: Remove _initialize_mdebugread prototype.
1949         * memattr.c: Remove _initialize_mem prototype.
1950         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1951         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1952         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1953         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1954         * mi/mi-main.c: Remove _initialize_mi_main prototype.
1955         * microblaze-linux-tdep.c: Remove
1956         _initialize_microblaze_linux_tdep prototype.
1957         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1958         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1959         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1960         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1961         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1962         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1963         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1964         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1965         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1966         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1967         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1968         prototype.
1969         * mipsread.c: Remove _initialize_mipsread prototype.
1970         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1971         prototype.
1972         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1973         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1974         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1975         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1976         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1977         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1978         prototype.
1979         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1980         * nto-procfs.c: Remove _initialize_procfs prototype.
1981         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1982         * objc-lang.c: Remove _initialize_objc_language prototype.
1983         * objfiles.c: Remove _initialize_objfiles prototype.
1984         * observer.c: Remove observer_test_first_notification_function,
1985         observer_test_second_notification_function,
1986         observer_test_third_notification_function, and
1987         _initialize_observer prototypes.
1988         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1989         * osabi.c: Remove _initialize_gdb_osabi prototype.
1990         * osdata.c: Remove _initialize_osdata prototype.
1991         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1992         * parse.c: Remove _initialize_parse prototype.
1993         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1994         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1995         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1996         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1997         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1998         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1999         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
2000         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
2001         * printcmd.c: Remove _initialize_printcmd prototype.
2002         * probe.c: Remove _initialize_probe prototype.
2003         * proc-api.c: Remove _initialize_proc_api prototype.
2004         * proc-events.c: Remove _initialize_proc_events prototype.
2005         * proc-service.c: Remove _initialize_proc_service prototype.
2006         * procfs.c: Remove _initialize_procfs prototype.
2007         * psymtab.c: Remove _initialize_psymtab prototype.
2008         * python/python.c: Remove _initialize_python prototype.
2009         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
2010         * record-btrace.c: Remove _initialize_record_btrace prototype.
2011         * record-full.c: Remove _initialize_record_full prototype.
2012         * record.c: Remove _initialize_record prototype.
2013         * regcache.c: Remove _initialize_regcache prototype.
2014         * reggroups.c: Remove _initialize_reggroup prototype.
2015         * remote-notif.c: Remove _initialize_notif prototype.
2016         * remote-sim.c: Remove _initialize_remote_sim prototype.
2017         * remote.c: Remove _initialize_remote prototype.
2018         * reverse.c: Remove _initialize_reverse prototype.
2019         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
2020         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
2021         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
2022         prototype.
2023         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
2024         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
2025         * rust-exp.y: Remove _initialize_rust_exp prototype.
2026         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
2027         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
2028         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
2029         * score-tdep.c: Remove _initialize_score_tdep prototype.
2030         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
2031         prototype.
2032         * ser-go32.c: Remove _initialize_ser_dos prototype.
2033         * ser-mingw.c: Remove _initialize_ser_windows prototype.
2034         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
2035         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
2036         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
2037         * serial.c: Remove _initialize_serial prototype.
2038         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
2039         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
2040         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
2041         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
2042         * skip.c: Remove _initialize_step_skip prototype.
2043         * sol-thread.c: Remove _initialize_sol_thread prototype.
2044         * solib-aix.c: Remove _initialize_solib_aix prototype.
2045         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
2046         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
2047         * solib-frv.c: Remove _initialize_frv_solib prototype.
2048         * solib-spu.c: Remove _initialize_spu_solib prototype.
2049         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
2050         * solib-target.c: Remove _initialize_solib_target prototype.
2051         * solib.c: Remove _initialize_solib prototype.
2052         * source.c: Remove _initialize_source prototype.
2053         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
2054         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
2055         prototype.
2056         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
2057         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
2058         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
2059         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
2060         prototype.
2061         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
2062         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
2063         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
2064         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
2065         prototype.
2066         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
2067         prototype.
2068         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
2069         prototype.
2070         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
2071         prototype.
2072         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
2073         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
2074         prototype.
2075         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
2076         prototype.
2077         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
2078         prototype.
2079         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
2080         prototype.
2081         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
2082         prototype.
2083         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
2084         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
2085         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
2086         * stabsread.c: Remove _initialize_stabsread prototype.
2087         * stack.c: Remove _initialize_stack prototype.
2088         * stap-probe.c: Remove _initialize_stap_probe prototype.
2089         * std-regs.c: Remove _initialize_frame_reg prototype.
2090         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
2091         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
2092         * symfile.c: Remove _initialize_symfile prototype.
2093         * symmisc.c: Remove _initialize_symmisc prototype.
2094         * symtab.c: Remove _initialize_symtab prototype.
2095         * target-dcache.c: Remove _initialize_target_dcache prototype.
2096         * target-descriptions.c: Remove _initialize_target_descriptions
2097         prototype.
2098         * thread.c: Remove _initialize_thread prototype.
2099         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
2100         prototype.
2101         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
2102         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
2103         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
2104         prototype.
2105         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
2106         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
2107         * tracefile.c: Remove _initialize_tracefile prototype.
2108         * tracepoint.c: Remove _initialize_tracepoint prototype.
2109         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
2110         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
2111         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
2112         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
2113         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
2114         * tui/tui-win.c: Remove _initialize_tui_win prototype.
2115         * tui/tui.c: Remove _initialize_tui prototype.
2116         * typeprint.c: Remove _initialize_typeprint prototype.
2117         * user-regs.c: Remove _initialize_user_regs prototype.
2118         * utils.c: Remove _initialize_utils prototype.
2119         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
2120         * valarith.c: Remove _initialize_valarith prototype.
2121         * valops.c: Remove _initialize_valops prototype.
2122         * valprint.c: Remove _initialize_valprint prototype.
2123         * value.c: Remove _initialize_values prototype.
2124         * varobj.c: Remove _initialize_varobj prototype.
2125         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
2126         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
2127         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
2128         * windows-nat.c: Remove _initialize_windows_nat,
2129         _initialize_check_for_gdb_ini, and _initialize_loadable
2130         prototypes.
2131         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
2132         * xcoffread.c: Remove _initialize_xcoffread prototype.
2133         * xml-support.c: Remove _initialize_xml_support prototype.
2134         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
2135         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
2136         prototype.
2137         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
2138         prototype.
2139         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
2140
2141 2017-09-08  Keith Seitz  <keiths@redhat.com>
2142
2143         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
2144         field.
2145
2146 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
2147
2148         * f-valprint.c (f_val_print): Remove check for one byte
2149         sized integers. Remove printing of character type.
2150
2151 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
2152             Christoph Weinmann  <christoph.t.weinmann@intel.com>
2153             Bernhard Heckel  <bernhard.heckel@intel.com>
2154
2155         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
2156         to maintain proper indentation when printing pointers/refs.
2157
2158 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2159
2160         GDB 8.0.1 released.
2161
2162 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
2163
2164         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
2165
2166 2017-09-05  Tom Tromey  <tom@tromey.com>
2167
2168         * parse.c (funcall_chain): Now a std::vector.
2169         (start_arglist, end_arglist): Simplify.
2170         (free_funcalls): Remove.
2171         (parse_exp_in_context_1): Remove cleanup.
2172
2173 2017-09-05  Tom Tromey  <tom@tromey.com>
2174
2175         * go-exp.y (go_parse): Don't create a cleanup.
2176
2177 2017-09-05  Tom Tromey  <tom@tromey.com>
2178
2179         * d-exp.y (PrimaryExpression): Use std::string.
2180         (d_parse): Don't create a cleanup.
2181
2182 2017-09-05  Tom Tromey  <tom@tromey.com>
2183
2184         * utils.c (do_clear_parser_state): Remove.
2185         (make_cleanup_clear_parser_state): Remove.
2186         * p-exp.y (pascal_parse): Use scoped_restore.
2187         * m2-exp.y (m2_parse): Use scoped_restore.
2188         * f-exp.y (f_parse): Use scoped_restore.
2189         * d-exp.y (d_parse): Use scoped_restore.
2190         * c-exp.y (c_parse): Use scoped_restore.
2191         * ada-exp.y (ada_parse): Use scoped_restore.
2192         * utils.h (make_cleanup_clear_parser_state): Remove.
2193
2194 2017-09-06  Keith Seitz  <keiths@redhat.com>
2195
2196         * dwarf2read.c (dw2_linkage_name_attr): New function.
2197         (dw2_linkage_name): New function.
2198         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
2199         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
2200         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
2201
2202 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2203
2204         * config/djgpp/djconfig.sh: Correct shell portability issue.
2205
2206 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2207
2208         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
2209
2210 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2211
2212         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2213         * NEWS: Mention new FreeBSD/mips native configuration.
2214         * configure.host: Add aarch64*-*-freebsd*.
2215         * configure.nat: Likewise.
2216         * aarch64-fbsd-nat.c: New file.
2217
2218 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
2219
2220         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
2221         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
2222         * NEWS: Mention new FreeBSD/aarch64 target.
2223         * configure.tgt: Add aarch64*-*-freebsd*.
2224         * aarch64-fbsd-tdep.c: New file.
2225         * aarch64-fbsd-tdep.h: New file.
2226
2227 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
2228
2229         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
2230
2231 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2232
2233         * parse.c (find_minsym_type_and_address): Don't relocate addresses
2234         of TLS symbols.
2235
2236 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2237
2238         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
2239         call.
2240
2241 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2242
2243         * infrun.c (follow_exec): Call add_thread after
2244         target_find_description.
2245
2246 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2247
2248         * infrun.c (handle_inferior_event_1): When exec'ing, read
2249         stop_pc after follow_exec.
2250
2251 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2252
2253         * remote.c (process_g_packet): Update error message.
2254
2255 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2256
2257         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
2258         targets.
2259
2260 2017-09-05  Pedro Alves  <palves@redhat.com>
2261
2262         * eval.c (eval_call, evaluate_funcall): New functions, factored
2263         out from ...
2264         (evaluate_subexp_standard): ... this.
2265
2266 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2267
2268         * amd64-tdep.c (amd64_target_description): Create target
2269         descriptions.
2270         (_initialize_amd64_tdep): Don't call functions
2271         initialize_tdesc_amd64_*.  Add self tests.
2272         * arch/amd64.c (amd64_create_target_description): Add parameter
2273         is_linux.  Call set_tdesc_osabi if is_linux is true.
2274         * arch/amd64.h (amd64_create_target_description): Update the
2275         declaration.
2276         * arch/i386.c (i386_create_target_description): Add parameter
2277         is_linux.  Call set_tdesc_osabi if is_linux is true.
2278         * arch/i386.h (i386_create_target_description): Update
2279         declaration.
2280         * configure.tgt: Add i386.o to gdb_target_obs.
2281         * features/Makefile (XMLTOC): Remove i386/*.xml.
2282         * features/i386/amd64-avx-avx512.c: Remove.
2283         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
2284         * features/i386/amd64-avx-mpx.c: Remove.
2285         * features/i386/amd64-avx.c: Remove.
2286         * features/i386/amd64-mpx.c: Remove.
2287         * features/i386/amd64.c: Remove.
2288         * features/i386/i386-avx-avx512.c: Remove.
2289         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
2290         * features/i386/i386-avx-mpx.c: Remove.
2291         * features/i386/i386-avx.c: Remove.
2292         * features/i386/i386-mmx.c: Remove.
2293         * features/i386/i386-mpx.c: Remove.
2294         * features/i386/i386.c: Remove.
2295         * i386-tdep.c: Don't include features/i386/i386*.c., include
2296         target-descriptions.h and arch/i386.h.
2297         (i386_target_description): Create target descriptions.
2298         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
2299         functions.  Do self tests.
2300
2301 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2302
2303         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
2304         * features/i386/amd64-avx-avx512-linux.c: Removed.
2305         * features/i386/amd64-avx-linux.c: Removed.
2306         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
2307         * features/i386/amd64-avx-mpx-linux.c: Removed.
2308         * features/i386/amd64-linux.c: Removed.
2309         * features/i386/amd64-mpx-linux.c: Removed.
2310         * features/i386/x32-avx-avx512-linux.c: Removed.
2311         * features/i386/x32-avx-linux.c: Removed.
2312         * features/i386/x32-linux.c: Removed.
2313
2314 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2315
2316         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
2317         features/i386/*.c.
2318         (amd64_linux_read_description): Call
2319         amd64_create_target_description.
2320         * arch/amd64.c: New file.
2321         * arch/amd64.h: New file.
2322         * configure.tgt (x86_64-*-linux*): Append amd64.o.
2323         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
2324
2325 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2326
2327         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
2328         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
2329         (amd64_linux_read_description): Create target descriptions.
2330         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
2331         functions.  Add unit tests.
2332         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
2333         x32-core.xml.
2334         * features/i386/64bit-avx.c: Generated.
2335         * features/i386/64bit-avx512.c: Generated.
2336         * features/i386/64bit-core.c: Generated.
2337         * features/i386/64bit-linux.c: Generated.
2338         * features/i386/64bit-mpx.c: Generated.
2339         * features/i386/64bit-pkeys.c: Generated.
2340         * features/i386/64bit-segments.c: Generated.
2341         * features/i386/64bit-sse.c: Generated.
2342         * features/i386/x32-core.c: Generated.
2343         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
2344         c files for amd64-linux and x32-linux.
2345
2346 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2347
2348         * amd64-linux-tdep.c (amd64_linux_read_description): New
2349         function.
2350         (amd64_linux_core_read_description): Call
2351         amd64_linux_read_description.
2352         (amd64_linux_init_abi): Likewise.
2353         (amd64_x32_linux_init_abi): Likewise.
2354         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
2355         * x86-linux-nat.c (x86_linux_read_description): Call
2356         amd64_linux_read_description.
2357
2358 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2359
2360         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
2361         comments.
2362
2363 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2364
2365         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
2366         * features/i386/i386-avx-avx512-linux.c: Remove.
2367         * features/i386/i386-avx-linux.c: Remove.
2368         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
2369         * features/i386/i386-avx-mpx-linux.c: Remove.
2370         * features/i386/i386-linux.c: Remove.
2371         * features/i386/i386-mmx-linux.c: Remove.
2372         * features/i386/i386-mpx-linux.c: Remove.
2373
2374 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2375
2376         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
2377         (SFILES): Add arch/i386.c.
2378         (HFILES_NO_SRCDIR): Add arch/i386.h.
2379         * arch/i386.c: New file.
2380         * arch/i386.h: New file.
2381         * arch/tdesc.h (allocate_target_description): Declare.
2382         (set_tdesc_architecture): Declare.
2383         (set_tdesc_osabi): Declare.
2384         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
2385         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
2386         include arch/i386.h.
2387         (i386_linux_read_description): Remove code and call
2388         i386_create_target_description.
2389         (set_tdesc_architecture): New function.
2390         (set_tdesc_osabi): New function.
2391         * target-descriptions.h (allocate_target_description): Remove.
2392
2393 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2394
2395         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
2396         * target-descriptions.c (tdesc_create_feature): Likewise, and
2397         adjust code.
2398         * features/i386/32bit-avx.c: Re-generated.
2399         * features/i386/32bit-avx512.c: Re-generated.
2400         * features/i386/32bit-core.c: Re-generated.
2401         * features/i386/32bit-linux.c: Re-generated.
2402         * features/i386/32bit-mpx.c: Re-generated.
2403         * features/i386/32bit-pkeys.c: Re-generated.
2404         * features/i386/32bit-sse.c: Re-generated.
2405
2406 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2407
2408         * regformats/regdef.h (struct reg): Override operator == and !=.
2409
2410 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2411
2412         * arch/tdesc.h: New file.
2413         * regformats/regdat.sh: Generate code using tdesc_create_reg.
2414         * target-descriptions.c: Update comments.
2415         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
2416         declarations.
2417         * features/i386/32bit-avx.c: Re-generated.
2418         * features/i386/32bit-avx512.c: Re-generated.
2419         * features/i386/32bit-core.c: Re-generated.
2420         * features/i386/32bit-linux.c: Re-generated.
2421         * features/i386/32bit-mpx.c: Re-generated.
2422         * features/i386/32bit-pkeys.c: Re-generated.
2423         * features/i386/32bit-sse.c: Re-generated.
2424
2425 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2426
2427         * regformats/regdat.sh: Update generated code.
2428
2429 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2430
2431         * regformats/regdat.sh: Adjust code order.
2432
2433 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2434
2435         * expprint.c (dump_subexp_body_standard): Use constant format
2436         string in fprintf_filtered call.
2437
2438 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2439
2440         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
2441         NetBSD/i386.
2442         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
2443
2444 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2445
2446         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
2447
2448 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2449
2450         * bsd-kvm.o: Define _KMEMUSER.
2451         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
2452         * configure: Regenerate.
2453
2454 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2455
2456         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
2457         * i386-fbsd-nat.c: Likewise.
2458
2459 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2460
2461         * unittests/array-view-selftests.c: Add include of <array>.
2462
2463 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
2464
2465         * spu-tdep.c (flush_ea_cache): Add missing argument to
2466         call_function_by_hand.
2467
2468 2017-09-04  Pedro Alves  <palves@redhat.com>
2469
2470         * NEWS (Safer support for debugging with no debug info): New.
2471
2472 2017-09-04  Pedro Alves  <palves@redhat.com>
2473
2474         * c-exp.y (function_method, function_method_void): Add current
2475         instance flags to TYPE_INSTANCE.
2476         * dwarf2read.c (check_modifier): New.
2477         (compute_delayed_physnames): Assert that only C++ adds delayed
2478         physnames.  Mark fn_fields as const/volatile depending on
2479         physname.
2480         * eval.c (make_params): New type_instance_flags parameter.  Use
2481         it as the new type's instance flags.
2482         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
2483         flags element and pass it to make_params.
2484         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
2485         instance flags element.
2486         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
2487         * gdbtypes.h: Include "enum-flags.h".
2488         (type_instance_flags): New enum-flags type.
2489         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
2490         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
2491         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
2492         (follow_type_instance_flags): New function.
2493         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
2494         * parser-defs.h (follow_type_instance_flags): Declare.
2495         * valops.c (value_struct_elt_for_reference): const/volatile must
2496         match too.
2497
2498 2017-09-04  Pedro Alves  <palves@redhat.com>
2499
2500         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
2501         function/method scopes; lookup the nested name as a function local
2502         static variable.
2503
2504 2017-09-04  Pedro Alves  <palves@redhat.com>
2505
2506         (%type <voidval>): Add function_method.
2507         * c-exp.y (exp): New production for calls with no arguments.
2508         (function_method, function_method_void_or_typelist): New
2509         productions.
2510         (exp): New production for "method()::static_var".
2511         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
2512         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2513         Handle OP_FUNC_STATIC_VAR.
2514         * parse.c (operator_length_standard):
2515         Handle OP_FUNC_STATIC_VAR.
2516
2517 2017-09-04  Pedro Alves  <palves@redhat.com>
2518
2519         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
2520         handling.
2521         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2522         Ditto.
2523         * parse.c (operator_length_standard, operator_check_standard):
2524         Ditto.
2525         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
2526
2527 2017-09-04  Pedro Alves  <palves@redhat.com>
2528
2529         * ax-gdb.c: Include "typeprint.h".
2530         (gen_expr_for_cast): New function.
2531         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
2532         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
2533         type is unknown.
2534         * dwarf2read.c (new_symbol_full): Fallback to int instead of
2535         nodebug_data_symbol.
2536         * eval.c: Include "typeprint.h".
2537         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
2538         Error out if symbol has unknown type.
2539         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
2540         evaluate_subexp_for_cast.
2541         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
2542         OP_VAR_MSYM_VALUE.
2543         (evaluate_subexp_for_cast): New function.
2544         * gdbtypes.c (init_nodebug_var_type): New function.
2545         (objfile_type): Use it to initialize types of variables with no
2546         debug info.
2547         * typeprint.c (error_unknown_type): New.
2548         * typeprint.h (error_unknown_type): New declaration.
2549         * compile/compile-c-types.c (convert_type_basic): Handle
2550         TYPE_CODE_ERROR; warn and fallback to int for variables with
2551         unknown type.
2552
2553 2017-09-04  Pedro Alves  <palves@redhat.com>
2554
2555         * eval.c (evaluate_var_value): New function, factored out from ...
2556         (evaluate_subexp_standard): ... here.
2557
2558 2017-09-04  Pedro Alves  <palves@redhat.com>
2559
2560         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
2561         Remove useless assignments to 'op'.
2562
2563 2017-09-04  Pedro Alves  <palves@redhat.com>
2564
2565         * eval.c (eval_skip_value): New function.
2566         (evaluate_subexp_standard): Use it.
2567
2568 2017-09-04  Pedro Alves  <palves@redhat.com>
2569
2570         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
2571         function name from symbol/minsym and pass it to
2572         error_call_unknown_return_type.
2573
2574 2017-09-04  Pedro Alves  <palves@redhat.com>
2575
2576         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
2577         * ax-gdb.c (gen_msym_var_ref): New function.
2578         (gen_expr): Handle OP_VAR_MSYM_VALUE.
2579         * eval.c (evaluate_var_msym_value): New function.
2580         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
2581         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
2582         to call_function_by_hand.
2583         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
2584         Handle OP_VAR_MSYM_VALUE.
2585         (union exp_element) <msymbol>: New field.
2586         * minsyms.h (struct type): Forward declare.
2587         (find_minsym_type_and_address): Declare.
2588         * parse.c (write_exp_elt_msym): New function.
2589         (write_exp_msymbol): Delete, refactored as ...
2590         (find_minsym_type_and_address): ... this new function.
2591         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
2592         (operator_length_standard, operator_check_standard): Handle
2593         OP_VAR_MSYM_VALUE.
2594         * std-operator.def (OP_VAR_MSYM_VALUE): New.
2595
2596 2017-09-04  Pedro Alves  <palves@redhat.com>
2597
2598         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
2599         TYPE_GNU_IFUNC specially here.  Throw error if return type is
2600         unknown.
2601         * ada-typeprint.c (print_func_type): Handle functions with unknown
2602         return type.
2603         * c-typeprint.c (c_type_print_base): Handle functions and methods
2604         with unknown return type.
2605         * compile/compile-c-symbols.c (convert_symbol_bmsym)
2606         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
2607         * compile/compile-c-types.c: Include "objfiles.h".
2608         (convert_func): For functions with unknown return type, warn and
2609         default to int.
2610         * compile/compile-object-run.c (compile_object_run): Adjust call
2611         to call_function_by_hand_dummy.
2612         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
2613         call_function_by_hand.
2614         * eval.c (evaluate_subexp_standard): Adjust calls to
2615         call_function_by_hand.  Handle functions and methods with unknown
2616         return type.  Pass expect_type to call_function_by_hand.
2617         * f-typeprint.c (f_type_print_base): Handle functions with unknown
2618         return type.
2619         * gcore.c (call_target_sbrk): Adjust call to
2620         call_function_by_hand.
2621         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
2622         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
2623         an integer address type instead of nodebug.
2624         * guile/scm-value.c (gdbscm_value_call): Adjust call to
2625         call_function_by_hand.
2626         * infcall.c (error_call_unknown_return_type): New function.
2627         (call_function_by_hand): New "default_return_type" parameter.
2628         Pass it down.
2629         (call_function_by_hand_dummy): New "default_return_type"
2630         parameter.  Use it instead of defaulting to int.  If there's no
2631         default and the return type is unknown, throw an error.  If
2632         there's a default return type, and the called function has no
2633         debug info, then assume the function is prototyped.
2634         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
2635         New "default_return_type" parameter.
2636         (error_call_unknown_return_type): New declaration.
2637         * linux-fork.c (call_lseek): Cast return type of lseek.
2638         (inferior_call_waitpid, checkpoint_command): Adjust calls to
2639         call_function_by_hand.
2640         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
2641         calls to call_function_by_hand.
2642         * m2-typeprint.c (m2_procedure): Handle functions with unknown
2643         return type.
2644         * objc-lang.c (lookup_objc_class, lookup_child_selector)
2645         (value_nsstring, print_object_command): Adjust calls to
2646         call_function_by_hand.
2647         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
2648         functions with unknown return type.
2649         (pascal_type_print_func_varspec_suffix): New function.
2650         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
2651         TYPE_CODE_METHOD>: Use it.
2652         * python/py-value.c (valpy_call): Adjust call to
2653         call_function_by_hand.
2654         * rust-lang.c (rust_evaluate_funcall): Adjust call to
2655         call_function_by_hand.
2656         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
2657         call_function_by_hand.
2658         * valops.c (value_allocate_space_in_inferior): Adjust call to
2659         call_function_by_hand.
2660         * typeprint.c (type_print_unknown_return_type): New function.
2661         * typeprint.h (type_print_unknown_return_type): New declaration.
2662
2663 2017-09-04  Pedro Alves  <palves@redhat.com>
2664
2665         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
2666         types with more than one parameter as prototyped.
2667
2668 2017-09-04  Pedro Alves  <palves@redhat.com>
2669
2670         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2671         (disassemble_command): Use gdb_disassembly_flags instead of bare
2672         int.
2673         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2674         (dump_insns, do_mixed_source_and_assembly_deprecated)
2675         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2676         Use gdb_disassembly_flags instead of bare int.
2677         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2678         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2679         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2680         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
2681         (enum gdb_disassembly_flag): ... values of this new enumeration.
2682         (gdb_disassembly_flags): Define.
2683         (gdb_disassembly)
2684         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2685         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2686         gdb_disassembly_flags instead of bare int.
2687         * record-btrace.c (btrace_insn_history)
2688         (record_btrace_insn_history, record_btrace_insn_history_range)
2689         (record_btrace_insn_history_from): Use gdb_disassembly_flags
2690         instead of bare int.
2691         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2692         Use gdb_disassembly_flags instead of bare int.
2693         * target-debug.h (target_debug_print_gdb_disassembly_flags):
2694         Define.
2695         * target-delegates.c: Regenerate.
2696         * target.c (target_insn_history, target_insn_history_from)
2697         (target_insn_history_range): Use gdb_disassembly_flags instead of
2698         bare int.
2699         * target.h: Include "disasm.h".
2700         (struct target_ops) <to_insn_history, to_insn_history_from,
2701         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2702         int.
2703         (target_insn_history, target_insn_history_from)
2704         (target_insn_history_range): Use gdb_disassembly_flags instead of
2705         bare int.
2706
2707 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2708
2709         * cli/cli-script.c (build_command_line): For if/while commands,
2710         check whether args is empty.
2711
2712 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2713
2714         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2715         (enum command_control_type): Likewise.
2716         (struct command_line): Likewise.
2717         (free_command_lines): Likewise.
2718         (struct command_lines_deleter): Likewise.
2719         (command_line_up): Likewise.
2720         (read_command_lines): Likewise.
2721         (read_command_lines_1): Likewise.
2722         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2723         (enum command_control_type): Likewise.
2724         (struct command_line): Likewise.
2725         (free_command_lines): Likewise.
2726         (struct command_lines_deleter): Likewise.
2727         (command_line_up): Likewise.
2728         (read_command_lines): Likewise.
2729         (read_command_lines_1): Likewise.
2730         * breakpoint.h: Include cli/cli-script.h.
2731         * extension-priv.h: Likewise.
2732         * gdbcmd.h: Likewise.
2733
2734 2017-09-04  Pedro Alves  <palves@redhat.com>
2735
2736         * ada-lang.c (is_known_support_routine): Move sal declaration to
2737         where it is initialized.
2738         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2739         (parse_breakpoint_sals, decode_static_tracepoint_spec)
2740         (clear_command, update_static_tracepoint): Remove init_sal
2741         references.  Move declarations closer to initializations.
2742         * cli/cli-cmds.c (list_command): Move sal declarations closer to
2743         initializations.
2744         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2745         references.  Move sal declarations closer to initializations.
2746         * frame.c (find_frame_sal): Return a symtab_and_line via function
2747         return instead of output parameter.  Remove init_sal references.
2748         * frame.h (find_frame_sal): Return a symtab_and_line via function
2749         return instead of output parameter.
2750         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2751         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2752         instead of memset.
2753         (gdbscm_find_pc_line): Remove init_sal reference.
2754         * infcall.c (call_function_by_hand_dummy): Remove init_sal
2755         references.  Move declarations closer to initializations.
2756         * infcmd.c (set_step_frame): Update.  Move declarations closer to
2757         initializations.
2758         (finish_backward): Remove init_sal references.  Move declarations
2759         closer to initializations.
2760         * infrun.c (process_event_stop_test, handle_step_into_function)
2761         (insert_hp_step_resume_breakpoint_at_frame)
2762         (insert_step_resume_breakpoint_at_caller): Likewise.
2763         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2764         (symbol_to_sal): Likewise.
2765         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2766         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2767         to its initialization.
2768         * reverse.c (save_bookmark_command): Use new/delete.  Remove
2769         init_sal references.  Move declarations closer to initializations.
2770         * source.c (get_current_source_symtab_and_line): Remove brace
2771         initialization.
2772         (set_current_source_symtab_and_line): Now takes the sal by const
2773         reference.  Remove brace initialization.
2774         (line_info): Remove init_sal reference.
2775         * source.h (set_current_source_symtab_and_line): Now takes a
2776         symtab_and_line via const reference.
2777         * stack.c (set_current_sal_from_frame): Adjust.
2778         (print_frame_info): Adjust.
2779         (get_last_displayed_sal): Return the sal via function return
2780         instead of via output parameter.  Simplify.
2781         (frame_info): Adjust.
2782         * stack.h (get_last_displayed_sal): Return the sal via function
2783         return instead of via output parameter.
2784         * symtab.c (init_sal): Delete.
2785         (find_pc_sect_line): Remove init_sal references.  Move
2786         declarations closer to initializations.
2787         (find_function_start_sal): Remove init_sal references.  Move
2788         declarations closer to initializations.
2789         * symtab.h (struct symtab_and_line): In-class initialize all
2790         fields.
2791         * tracepoint.c (set_traceframe_context)
2792         (print_one_static_tracepoint_marker): Remove init_sal references.
2793         Move declarations closer to initializations.
2794         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2795         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
2796         declarations closer to initializations.
2797         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2798         init_sal references.  Adjust.
2799
2800 2017-09-04  Pedro Alves  <palves@redhat.com>
2801
2802         * ax-gdb.c (agent_command_1): Use range-for.
2803         * break-catch-throw.c (re_set_exception_catchpoint): Update.
2804         * breakpoint.c: Include "common/array-view.h".
2805         (init_breakpoint_sal, create_breakpoint_sal): Change sals
2806         parameter from struct symtabs_and_lines to
2807         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
2808         (breakpoint_sals_to_pc): Change sals parameter from struct
2809         symtabs_and_lines to std::vector reference.
2810         (check_fast_tracepoint_sals): Change sals parameter from struct
2811         symtabs_and_lines to std::array_view.  Use range-for.
2812         (decode_static_tracepoint_spec): Return a std::vector instead of
2813         symtabs_and_lines.  Update.
2814         (create_breakpoint): Update.
2815         (break_range_command, until_break_command, clear_command): Update.
2816         (base_breakpoint_decode_location, bkpt_decode_location)
2817         (bkpt_probe_create_sals_from_location)
2818         (bkpt_probe_decode_location, tracepoint_decode_location)
2819         (tracepoint_probe_decode_location)
2820         (strace_marker_create_sals_from_location): Return a std::vector
2821         instead of symtabs_and_lines.
2822         (strace_marker_create_breakpoints_sal): Update.
2823         (strace_marker_decode_location): Return a std::vector instead of
2824         symtabs_and_lines.  Update.
2825         (update_breakpoint_locations): Change struct symtabs_and_lines
2826         parameters to gdb::array_view.  Adjust.
2827         (location_to_sals): Return a std::vector instead of
2828         symtabs_and_lines.  Update.
2829         (breakpoint_re_set_default): Use std::vector instead of struct
2830         symtabs_and_lines.
2831         (decode_location_default): Return a std::vector instead of
2832         symtabs_and_lines.  Update.
2833         * breakpoint.h: Include "common/array-view.h".
2834         (struct breakpoint_ops) <decode_location>: Now returns a
2835         std::vector instead of returning a symtabs_and_lines via output
2836         parameter.
2837         (update_breakpoint_locations): Change sals parameters to use
2838         gdb::array_view.
2839         * cli/cli-cmds.c (edit_command, list_command): Update to use
2840         std::vector and gdb::array_view.
2841         (ambiguous_line_spec): Adjust to use gdb::array_view and
2842         range-for.
2843         (compare_symtabs): Rename to ...
2844         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
2845         const reference and adjust.
2846         (filter_sals): Rewrite using std::vector and standard algorithms.
2847         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2848         (jump_command): Update to use std::vector.
2849         * linespec.c (struct linespec_state) <canonical_names>: Update
2850         comment.
2851         (add_sal_to_sals_basic): Delete.
2852         (add_sal_to_sals, filter_results, convert_results_to_lsals)
2853         (decode_line_2, create_sals_line_offset)
2854         (convert_address_location_to_sals, convert_linespec_to_sals)
2855         (convert_explicit_location_to_sals, parse_linespec)
2856         (event_location_to_sals, decode_line_full, decode_line_1)
2857         (decode_line_with_current_source)
2858         (decode_line_with_last_displayed, decode_objc)
2859         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2860         (linespec_result::~linespec_result): Adjust to use std::vector
2861         instead of symtabs_and_lines.
2862         * linespec.h (linespec_sals::sals): Now a std::vector.
2863         (struct linespec_result): Use std::vector, bool, and in-class
2864         initialization.
2865         (decode_line_1, decode_line_with_current_source)
2866         (decode_line_with_last_displayed): Return std::vector.
2867         * macrocmd.c (info_macros_command): Use std::vector.
2868         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2869         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2870         std::vector.
2871         * probe.h (parse_probes): Return a std::vector.
2872         * python/python.c (gdbpy_decode_line): Use std::vector and
2873         gdb::array_view.
2874         * source.c (select_source_symtab, line_info): Use std::vector.
2875         * stack.c (func_command): Use std::vector.
2876         * symtab.h (struct symtabs_and_lines): Delete.
2877         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2878
2879 2017-09-04  Pedro Alves  <palves@redhat.com>
2880
2881         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2882         unittests/array-view-selftests.c.
2883         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2884         * common/array-view.h: New file.
2885         * unittests/array-view-selftests.c: New file.
2886
2887 2017-09-04  Pedro Alves  <palves@redhat.com>
2888
2889         * cli/cli-cmds.c (edit_command): Pass message to
2890         ambiguous_line_spec.
2891         (list_command): Pass message to ambiguous_line_spec.  Say
2892         "first"/"last" instead of "start" and "end" to be consistent with
2893         the manual.
2894         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
2895         them to print formatted message.
2896
2897 2017-09-04  Pedro Alves  <palves@redhat.com>
2898
2899         * btrace.c (ftrace_add_pt): Pass btrace_insn to
2900         ftrace_update_insns by reference instead of pointer.
2901
2902 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2903
2904         * i386-go32-tdep.c: Include x86-xstate.h.
2905         (i386_go32_init_abi): Call i386_target_description.
2906         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2907         if xcr0 is X86_XSTATE_X87_MASK.
2908         * i386-tdep.h (tdesc_i386): Remove the declaration.
2909         (tdesc_i386_mmx): Likewise.
2910
2911 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2912
2913         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2914         X86_XSTATE_SSE_MASK instead of 0.
2915
2916 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2917
2918         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2919         i386_target_description.
2920         * i386-fbsd-nat.c (i386fbsd_read_description): Call
2921         i386_target_description.
2922         * i386-tdep.c (i386_gdbarch_init): Likewise.
2923
2924 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2925
2926         * amd64-darwin-tdep.c: Include "x86-xstate.h".
2927         (x86_darwin_init_abi_64): Call amd64_target_description.
2928         * amd64-dicos-tdep.c: Likewise.
2929         * amd64-fbsd-nat.c: Likewise.
2930         * amd64-fbsd-tdep.c: Likewise.
2931         * amd64-nbsd-tdep.c: Likewise.
2932         * amd64-obsd-tdep.c: Likewise.
2933         * amd64-sol2-tdep.c: Likewise.
2934         * amd64-windows-tdep.c: Likewise.
2935         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2936
2937 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2938
2939         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2940         (btrace_function) <insn>: Change type to use std::vector.
2941         * btrace.c (ftrace_debug, ftrace_call_num_insn,
2942         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2943         ftrace_update_insns, ftrace_compute_global_level_offset,
2944         btrace_stitch_bts, btrace_clear, btrace_insn_get,
2945         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2946         change to std::vector.
2947         (ftrace_update_insns): Adjust to change to std::vector, change
2948         type of INSN parameter.
2949         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2950         * record-btrace.c (btrace_call_history_insn_range,
2951         btrace_compute_src_line_range,
2952         record_btrace_frame_prev_register): Adjust to change to
2953         std::vector.
2954         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2955         to change to std::vector.
2956
2957 2017-09-03  Tom Tromey  <tom@tromey.com>
2958
2959         * corefile.c (reopen_exec_file): Use std::string.
2960
2961 2017-09-03  Tom Tromey  <tom@tromey.com>
2962
2963         * compile/compile.c (compile_register_name_mangled): Return
2964         std::string.
2965         * compile/compile-loc2c.c (pushf_register_address): Update.
2966         (pushf_register): Update.
2967         * compile/compile-c-types.c (convert_array): Update.
2968         * compile/compile-c-symbols.c (generate_vla_size): Update.
2969         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2970         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2971         (convert_one_symbol): Update.
2972         (generate_c_for_for_one_variable): Update.
2973         * compile/compile-c-support.c (c_get_range_decl_name): Return a
2974         std::string.
2975         (generate_register_struct): Update.
2976         * compile/compile-internal.h (c_get_range_decl_name): Return a
2977         std::string.
2978         (compile_register_name_mangled): Return std::string.
2979
2980 2017-09-03  Tom Tromey  <tom@tromey.com>
2981
2982         * utils.c (perror_string): Return a std::string.
2983         (throw_perror_with_name, perror_warning_with_name): Update.
2984
2985 2017-09-03  Tom Tromey  <tom@tromey.com>
2986
2987         * demangle.c (demangle_command): Use std::string,
2988         unique_xmalloc_ptr.
2989
2990 2017-09-03  Tom Tromey  <tom@tromey.com>
2991
2992         * cli/cli-setshow.c (do_set_command): Use std::string.
2993
2994 2017-09-03  Tom Tromey  <tom@tromey.com>
2995
2996         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2997
2998 2017-09-03  Tom Tromey  <tom@tromey.com>
2999
3000         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
3001
3002 2017-09-03  Tom Tromey  <tom@tromey.com>
3003
3004         * mi/mi-cmd-env.c (env_execute_cli_command): Use
3005         gdb::unique_xmalloc_ptr.
3006
3007 2017-09-03  Tom Tromey  <tom@tromey.com>
3008
3009         * thread.c (print_thread_info_1): Use string_printf.
3010         (thread_apply_command, thread_apply_all_command): Use
3011         std::string.
3012
3013 2017-09-03  Tom Tromey  <tom@tromey.com>
3014
3015         * valprint.c (val_print_string): Update.
3016         * gdbcore.h (memory_error_message): Return std::string.
3017         * corefile.c (memory_error_message): Return std::string.
3018         (memory_error): Update.
3019         * breakpoint.c (insert_bp_location): Update.
3020
3021 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
3022
3023         * target/waitstatus.h (target_waitstatus_to_string): Change
3024         return type to std::string.
3025         * target/waitstatus.c (target_waitstatus_to_string): Return
3026         std::string.
3027         * target.h (target_waitstatus_to_string): Remove declaration.
3028         * infrun.c (resume, clear_proceed_status_thread,
3029         print_target_wait_results, do_target_wait, save_waitstatus,
3030         stop_all_threads): Adjust.
3031         * record-btrace.c (record_btrace_wait): Adjust.
3032         * target-debug.h
3033         (target_debug_print_struct_target_waitstatus_p): Adjust.
3034
3035 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3036
3037         PR gdb/22046
3038         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
3039         detection.
3040
3041 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3042
3043         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
3044         for setting/unsetting environment variables on the remote target.
3045         (New remote packets): Add entries for QEnvironmentHexEncoded,
3046         QEnvironmentUnset and QEnvironmentReset.
3047         * common/environ.c (gdb_environ::operator=): Extend method to
3048         handle m_user_set_env_list and m_user_unset_env_list.
3049         (gdb_environ::clear): Likewise.
3050         (match_var_in_string): Change type of first parameter from 'char
3051         *' to 'const char *'.
3052         (gdb_environ::set): Extend method to handle
3053         m_user_set_env_list and m_user_unset_env_list.
3054         (gdb_environ::unset): Likewise.
3055         (gdb_environ::clear_user_set_env): New method.
3056         (gdb_environ::user_set_envp): Likewise.
3057         (gdb_environ::user_unset_envp): Likewise.
3058         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
3059         m_user_unset_env_list on move constructor/assignment.
3060         (unset): Add new default parameter 'update_unset_list = true'.
3061         (clear_user_set_env): New method.
3062         (user_set_envp): Likewise.
3063         (user_unset_envp): Likewise.
3064         (m_user_set_env_list): New std::set.
3065         (m_user_unset_env_list): Likewise.
3066         * common/rsp-low.c (hex2str): New function.
3067         (bin2hex): New overload for bin2hex function.
3068         * common/rsp-low.c (hex2str): New prototype.
3069         (str2hex): New overload prototype.
3070         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
3071         QEnvironmentUnset and QEnvironmentReset.
3072         (remote_protocol_features): Add QEnvironmentHexEncoded,
3073         QEnvironmentUnset and QEnvironmentReset packets.
3074         (send_environment_packet): New function.
3075         (extended_remote_environment_support): Likewise.
3076         (extended_remote_create_inferior): Call
3077         extended_remote_environment_support.
3078         (_initialize_remote): Add QEnvironmentHexEncoded,
3079         QEnvironmentUnset and QEnvironmentReset packet configs.
3080         * unittests/environ-selftests.c (gdb_selftest_env_var):
3081         New variable.
3082         (test_vector_initialization): New function.
3083         (test_init_from_host_environ): Likewise.
3084         (test_reinit_from_host_environ): Likewise.
3085         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
3086         Likewise.
3087         (test_unset_set_empty_vector): Likewise.
3088         (test_vector_clear): Likewise.
3089         (test_std_move): Likewise.
3090         (test_move_constructor):
3091         (test_self_move): Likewise.
3092         (test_set_unset_reset): Likewise.
3093         (run_tests): Rewrite in terms of the functions above.
3094
3095 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
3096
3097         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
3098         (adi_available): Use a temp variable of type CORE_ADDR as argument
3099         3 when calling target_auxv_search.
3100         (adi_normalize_address): Use masks and xor operators to calculate
3101         normalized address.
3102         (adi_read_versions, adi_write_versions, adi_print_versions)
3103         (do_examine, do_assign): Use paddress.
3104
3105 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
3106
3107         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
3108         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
3109         out of loop and add supply of FIR.
3110         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
3111         add collect of FIR.
3112
3113 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3114
3115         PR gdb/21827
3116         * cli/cli-script.c (define_command): Don't convert command name
3117         to lower case.
3118
3119 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
3120
3121         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
3122         Update all callers accordingly. Remove all code blocks handling
3123         the case where DISPP is not NULL.
3124
3125 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3126
3127         PR symtab/22003
3128         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
3129         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3130         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
3131
3132 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
3133
3134         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
3135         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
3136         (read_comp_units_from_section): New parameter abbrev_section, use
3137         read_and_check_comp_unit_head, allocate signatured_type if needed.
3138         (create_all_comp_units): Update read_comp_units_from_section caller.
3139
3140 2017-08-23  Pedro Alves  <palves@redhat.com>
3141
3142         PR remote/21852
3143         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
3144         to null_ptid and switch to thread without reading the registers
3145         after adding the inferior.
3146
3147 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3148
3149         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
3150         compile-gcc.
3151         * compile/compile.c (compile_gcc, show_compile_gcc): New.
3152         (compile_to_object): Implement compile_gcc.
3153         (_initialize_compile): Install "set compile-gcc".  Initialize
3154         compile_gcc.
3155
3156 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3157
3158         * compile/compile.c (compile_to_object): Conditionally call
3159         set_verbose.  Conditionally call compile or compile_v0.
3160
3161 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
3162
3163         * sparc64-tdep.h: (adi_normalize_address): New export.
3164         * sparc-nat.h: (open_adi_tag_fd): New export.
3165         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
3166         * sparc64-linux-tdep.c:
3167         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
3168         (sparc64_linux_handle_segmentation_fault): New function.
3169         (sparc64_linux_init_abi): Register
3170         sparc64_linux_handle_segmentation_fault
3171         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
3172         (sparc64_addr_bits_remove): New function.
3173         (sparc64_init_abi): Register sparc64_addr_bits_remove.
3174         (MAX_PROC_NAME_SIZE): New macro.
3175         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
3176         (sparc64adilist): New variable.
3177         (adi_proc_list): New variable.
3178         (find_adi_info): New function.
3179         (add_adi_info): New function.
3180         (get_adi_info_proc): New function.
3181         (get_adi_info): New function.
3182         (info_adi_command): New function.
3183         (read_maps_entry): New function.
3184         (adi_available): New function.
3185         (adi_normalize_address): New function.
3186         (adi_align_address): New function.
3187         (adi_convert_byte_count): New function.
3188         (adi_tag_fd): New function.
3189         (adi_is_addr_mapped): New function.
3190         (adi_read_versions): New function.
3191         (adi_write_versions): New function.
3192         (adi_print_versions): New function.
3193         (do_examine): New function.
3194         (do_assign): New function.
3195         (adi_examine_command): New function.
3196         (adi_assign_command): New function.
3197         (_initialize_sparc64_adi_tdep): New function.
3198
3199 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
3200
3201         * breakpoint.c (breakpoints_info): Rename to ...
3202         (info_breakpoints_command): ... this.
3203         (watchpoints_info): Rename to ...
3204         (info_watchpoints_command): ... this.
3205         (tracepoints_info): Rename to ...
3206         (info_tracepoints_command): ... this.
3207         (_initialize_breakpoint): Adjust.
3208         * dcache.c (dcache_info): Rename to ...
3209         (info_display_command): ... this.
3210         (_initialize_dcache): Adjust.
3211         * frame.h (args_info): Rename to ...
3212         (info_args_command): ... this.
3213         (locals_info): Rename to ...
3214         (info_locals_command): ... this.
3215         * infcmd.c (nofp_registers_info): Rename to ...
3216         (info_registers_command): ... this.
3217         (float_info): Rename to ...
3218         (info_float_command): ... this.
3219         (program_info): Rename to ...
3220         (info_program_command): ... this.
3221         (all_registers_info): Rename to ...
3222         (info_all_registers_command): ... this.
3223         (vector_info): Rename to ...
3224         (info_vector_command): ... this.
3225         (float_info): Rename to ...
3226         (info_float_command): ... this.
3227         (_initialize_infcmd): Adjust.
3228         * inferior.h (term_info): Rename to ...
3229         (info_terminal_command): ... this.
3230         * inflow.c (term_info): Rename to ...
3231         (info_terminal_command): ... this.
3232         (_initialize_inflow): Adjust.
3233         * infrun.c (signals_info): Rename to ...
3234         (info_signals_command): ... this.
3235         (_initialize_infrun): Adjust.
3236         * objc-lang.c (classes_info): Rename to ...
3237         (info_classes_command): ... this.
3238         (selectors_info): Rename to ...
3239         (info_selectors_command): ... this.
3240         (_initialize_objc_language): Adjust.
3241         * printcmd.c (sym_info): Rename to ...
3242         (info_symbol_command): ... this.
3243         (address_info): Rename to ...
3244         (info_address_command): ... this.
3245         (display_info): Rename to ...
3246         (info_display_command): ... this.
3247         (_initialize_printcmd): Adjust.
3248         * reverse.c (bookmarks_info): Rename to ...
3249         (info_breakpoints_command): ... this.
3250         (_initialize_reverse): Adjust.
3251         * ser-go32.c (dos_info): Rename to ...
3252         (info_serial_command): ... this.
3253         (_initialize_ser_dos): Adjust.
3254         * skip.c (skip_info): Rename to ...
3255         (info_skip_command): ... this.
3256         (_initialize_step_skip): Adjust.
3257         * source.c (line_info): Rename to ...
3258         (info_line_command): ... this.
3259         (source_info): Rename to ...
3260         (info_source_command)
3261         * stack.c (frame_info): Rename to ...
3262         (info_frame_command): ... this.
3263         (locals_info): Rename to ...
3264         (info_locals_command): ... this.
3265         (args_info): Rename to ...
3266         (info_args_command): ... this.
3267         (_initialize_stack): Adjust.
3268         * symtab.c (sources_info): Rename to ...
3269         (info_sources_command): ... this.
3270         (variables_info): Rename to ...
3271         (info_variables_command): ... this.
3272         (functions_info): Rename to ...
3273         (info_functions_command): ... this.
3274         (types_info): Rename to ...
3275         (info_types_command): ... this.
3276         (_initialize_symtab): Adjust.
3277         * target.c (target_info): Rename to ...
3278         (info_target_command): ... this.
3279         (initialize_targets): Adjust.
3280         * tracepoint.c (tvariables_info): Rename to ...
3281         (info_tvariables_command): ... this.
3282         (scope_info): Rename to ...
3283         (info_scope_command): ... this.
3284         (trace_dump_actions): Adjust.
3285         (_initialize_tracepoint): Adjust.
3286
3287 2017-08-22  Tom Tromey  <tom@tromey.com>
3288
3289         * breakpoint.h (install_breakpoint): Update.
3290         * breakpoint.c (add_solib_catchpoint): Update.
3291         (install_breakpoint): Change argument to a std::unique_ptr.
3292         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
3293         (create_breakpoint_sal, create_breakpoint): Update.
3294         (watch_command_1, catch_exec_command_1)
3295         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
3296         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
3297         Return the breakpoint.
3298         (set_raw_breakpoint_without_location, set_raw_breakpoint)
3299         (new_single_step_breakpoint): Update.
3300         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
3301         std::unique_ptr.
3302         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3303         std::unique_ptr.
3304         * break-catch-sig.c (create_signal_catchpoint): Use
3305         std::unique_ptr.
3306         * ada-lang.c (create_ada_exception_catchpoint): Use
3307         std::unique_ptr.
3308
3309 2017-08-22  Tom Tromey  <tom@tromey.com>
3310
3311         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
3312
3313 2017-08-22  Tom Tromey  <tom@tromey.com>
3314
3315         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
3316         (lookup_partial_symbol): Update.
3317
3318 2017-08-22  Tom Tromey  <tom@tromey.com>
3319
3320         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
3321         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
3322         (find_and_open_source, symtab_to_fullname): Update.
3323         * psymtab.c (psymtab_to_fullname): Update.
3324
3325 2017-08-22  Tom Tromey  <tom@tromey.com>
3326
3327         * exec.c (exec_file_attach): Update.
3328         * linux-thread-db.c (try_thread_db_load): Update.
3329         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
3330         * utils.c (gdb_realpath): Change return type.
3331         (gdb_realpath_keepfile): Update.
3332         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
3333         (_initialize_utils): Register the new self test.
3334         * source.c (openp): Update.
3335         (find_and_open_source): Update.
3336         * nto-tdep.c (nto_find_and_open_solib): Update.
3337         * main.c (set_gdb_data_directory): Update.
3338         (captured_main_1): Update.
3339         * dwarf2read.c (dwarf2_get_dwz_file): Update
3340         (dw2_map_symbol_filenames): Update.
3341         * auto-load.c (auto_load_safe_path_vec_update): Update.
3342         (filename_is_in_auto_load_safe_path_vec): Change type of
3343         "filename_realp".
3344         (auto_load_objfile_script): Update.
3345         (file_is_auto_load_safe): Update.  Use std::string.
3346         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
3347
3348 2017-08-22  Tom Tromey  <tom@tromey.com>
3349
3350         * utils.c (gdb_realpath_keepfile): Return a
3351         gdb::unique_xmalloc_ptr.
3352         * exec.c (exec_file_attach): Update.
3353         * utils.h (gdb_realpath_keepfile): Return a
3354         gdb::unique_xmalloc_ptr.
3355
3356 2017-08-22  Tom Tromey  <tom@tromey.com>
3357
3358         * compile/compile.c (compile_file_command): Use
3359         gdb::unique_xmalloc_ptr, std::string.
3360         * utils.c (gdb_abspath): Change return type.
3361         * source.c (openp): Update.
3362         * objfiles.c (allocate_objfile): Update.
3363         * main.c (set_gdb_data_directory): Update.
3364         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
3365
3366 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
3367
3368         * cli-cmds.c (list_commands): List actual code around more than
3369         one location.
3370
3371 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
3372
3373         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
3374
3375 2017-08-21  Pedro Alves  <palves@redhat.com>
3376
3377         PR gdb/19487
3378         * c-exp.y (variable production): Handle function aliases.
3379         * minsyms.c (msymbol_is_text): New function.
3380         * minsyms.h (msymbol_is_text): Declare.
3381         * symtab.c (find_function_alias_target): New function.
3382         * symtab.h (find_function_alias_target): Declare.
3383
3384 2017-08-21  Pedro Alves  <palves@redhat.com>
3385
3386         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
3387         typedefs.
3388         * typeprint.c (whatis_exp): If handling "whatis", and expression
3389         is OP_TYPE, strip one typedef level.  Otherwise don't strip
3390         typedefs here.
3391         * valops.c (value_cast): Save "to" type before resolving
3392         stubs/typedefs.  Use that type as resulting value's type.
3393
3394 2017-08-18  Tom Tromey  <tom@tromey.com>
3395             Pedro Alves  <palves@redhat.com>
3396
3397         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
3398         * sol-thread.c (sol_thread_resume, sol_thread_wait)
3399         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
3400         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
3401         * proc-service.c (ps_xfer_memory): Use scoped_restore.
3402         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
3403         (linux_get_siginfo_data): Add "thread" argument.  Use
3404         scoped_restore.
3405         * linux-nat.c (linux_child_follow_fork)
3406         (check_stopped_by_watchpoint): Use scoped_restore.
3407         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
3408         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
3409         (restore_inferior_ptid, save_inferior_ptid): Remove.
3410         * btrace.c (btrace_fetch): Use scoped_restore.
3411         * bsd-uthread.c (bsd_uthread_fetch_registers)
3412         (bsd_uthread_store_registers): Use scoped_restore.
3413         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
3414         scoped_restore.
3415         * aix-thread.c (aix_thread_resume, aix_thread_wait)
3416         (aix_thread_xfer_partial): Use scoped_restore.
3417         * inferior.h (save_inferior_ptid): Remove.
3418
3419 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3420
3421         PR tdep/21818
3422         * arm-tdep.c (gdb_print_insn_arm): Mark
3423         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
3424
3425 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3426
3427         * NEWS: Mention GDBserver's new option "--selftest".
3428         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
3429         * selftest.c: Move it to common/selftest.c.
3430         * selftest.h: Move it to common/selftest.h.
3431         * selftest-arch.c (reset): New function.
3432         (tests_with_arch): Call reset.
3433
3434 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3435
3436         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
3437         instead of exception_fprintf and printf_filtered.
3438
3439 2017-08-18  Yao Qi  <yao.qi@linaro.org>
3440
3441         * selftest.c (register_self_test): Rename it to
3442         selftests::register_test.
3443         (run_self_tests): selftest::run_tests.
3444         * selftest.h: Update declarations.
3445         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
3446         selftests::register_test_foreach_arch.
3447         * selftest-arch.h: Update declaration.
3448         * aarch64-tdep.c: Update.
3449         * arm-tdep.c: Likewise.
3450         * disasm-selftests.c: Likewise.
3451         * dwarf2loc.c: Likewise.
3452         * dwarf2-frame.c: Likewise.
3453         * findvar.c: Likewise.
3454         * gdbarch-selftests.c: Likewise.
3455         * maint.c (maintenance_selftest): Likewise.
3456         * regcache.c: Likewise.
3457         * rust-exp.y: Likewise.
3458         * selftest-arch.c: Likewise.
3459         * unittests/environ-selftests.c: Likewise.
3460         * unittests/function-view-selftests.c: Likewise.
3461         * unittests/offset-type-selftests.c: Likewise.
3462         * unittests/optional-selftests.c: Likewise.
3463         * unittests/scoped_restore-selftests.c: Likewise.
3464         * utils-selftests.c: Likewise.
3465
3466 2017-08-17  Pedro Alves  <palves@redhat.com>
3467
3468         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
3469         local.
3470
3471 2017-08-17  Pedro Alves  <palves@redhat.com>
3472
3473         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
3474         field.
3475         (reset_die_in_process): Delete, replaced by ...
3476         (process_die_scope): ... this new class.  Make it responsible for
3477         freeing cu->line_header too.
3478         (process_die): Use process_die_scope.
3479         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
3480         cu->line_header_die_owner.  Don't release the line header if it's
3481         owned by the CU.
3482         (setup_type_unit_groups): Make the CU/DIE own the line header.
3483         Don't release the line header here.
3484
3485 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
3486
3487         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
3488
3489 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3490
3491         * NEWS: Mention new shortcuts for nexti and stepi in TUI
3492         Single-Key mode
3493
3494 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3495
3496         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
3497         mode command list.
3498
3499 2017-08-15  Stafford Horne  <shorne@gmail.com>
3500
3501         * MAINTAINERS (Write After Approval): Add Stafford Horne.
3502
3503 2017-08-15  Stafford Horne  <shorne@gmail.com>
3504
3505         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
3506
3507 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3508
3509         PR gdb/21954
3510         * infcmd.c (unset_environment_command): Use the 'clear' method on
3511         the environment instead of resetting it.
3512
3513 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
3514
3515         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
3516         platforms.
3517
3518 2017-08-14  Tom Tromey  <tom@tromey.com>
3519
3520         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
3521         (print_binary_chars): Likewise.
3522         (BITS_IN_BYTES): Remove.
3523
3524 2017-08-14  Tom Tromey  <tom@tromey.com>
3525
3526         PR gdb/21675
3527         * valprint.c (LOW_ZERO): Change value to 034.
3528         (print_octal_chars): Add static_asserts for octal constants.
3529         * printcmd.c (print_scalar_formatted): Add 'd' case.
3530
3531 2017-08-11  Tom Tromey  <tom@tromey.com>
3532
3533         * symfile.c (add_symbol_file_command): Use std::vector.
3534
3535 2017-08-14  Tom Tromey  <tom@tromey.com>
3536
3537         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
3538         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
3539         std::move.
3540         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
3541
3542 2017-08-11  Pedro Alves  <palves@redhat.com>
3543
3544         * infrun.c (process_event_stop_test): Adjust
3545         function_name_is_marked_for_skip call.
3546         * skip.c: Include <list>.
3547         (skiplist_entry): Make it a class with private fields, and
3548         getters/setters.
3549         (skiplist_entry_chain): Delete.
3550         (skiplist_entries): New.
3551         (skiplist_entry_count): Delete.
3552         (highest_skiplist_entry_num): New.
3553         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
3554         (add_skiplist_entry): Delete.
3555         (skiplist_entry::skiplist_entry): New.
3556         (skiplist_entry::add_entry): New.
3557         (skip_file_command, skip_function): Adjust.
3558         (compile_skip_regexp): Delete.
3559         (skip_command): Don't compile regexp here.  Adjust to use
3560         skiplist_entry::add_entry.
3561         (skip_info): Adjust to use range-for and getters.
3562         (skip_enable_command, skip_disable_command): Adjust to use
3563         range-for and setters.
3564         (skip_delete_command): Adjust to use std::list.
3565         (add_skiplist_entry): Delete.
3566         (skip_file_p): Delete, refactored as ...
3567         (skiplist_entry::do_skip_file_p): ... this new method.
3568         (skip_gfile_p): Delete, refactored as ...
3569         (skiplist_entry::do_gskip_file_p): ... this new method.
3570         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
3571         (skiplist_entry::skip_function_p): ... this new method.
3572         (function_name_is_marked_for_skip): Now returns bool, and takes
3573         the function sal by const reference.  Adjust to use range-for and
3574         skiplist_entry methods.
3575         (_initialize_step_skip): Remove references to
3576         skiplist_entry_chain, skiplist_entry_count.
3577         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
3578         takes the function sal by const reference.
3579
3580 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3581
3582         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
3583         (dwarf2_frame_cache): Remove reset_cache_cleanup.
3584         (dwarf2_frame_cache):
3585         * frame-unwind.c (frame_unwind_try_unwinder): Catch
3586         RETURN_MASK_ALL and set *this_case to NULL.
3587         * frame-unwind.h: Update comments.
3588
3589 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3590
3591         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
3592         (dwarf2_frame_state_copy_regs): Remove.
3593         (dwarf2_frame_state_free_regs): Remove.
3594         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
3595         (dwarf2_restore_rule): Call method .alloc_regs instead of
3596         dwarf2_frame_state_alloc_regs.
3597         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
3598         constructor.  Call std::move.
3599         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
3600         (dwarf2_frame_cache): Likewise.
3601
3602         [GDB_SELF_TEST]: Include selftest.h and
3603         selftest-arch.h.
3604         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
3605         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
3606         execute_cfa_program_test.
3607
3608         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
3609         copy ctor, assignment operator, move assignment.
3610         <alloc_regs>: New method.
3611         <swap>: New method.
3612         (struct dwarf2_frame_state): Delete dtor.
3613         (dwarf2_frame_state_alloc_regs): Remove declaration.
3614         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
3615         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
3616
3617 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3618
3619         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
3620         (dwarf2_frame_state::dwarf2_frame_state): New.
3621         (dwarf2_frame_state::~dwarf2_frame_state): New.
3622         (dwarf2_fetch_cfa_info): Update.
3623         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
3624         rather than a pointer.  Update code.
3625         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
3626         dtor.
3627         <data_align, code_align, retaddr_column>: Change them to const.
3628         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
3629         to bool.
3630
3631 2017-08-11  Yao Qi  <yao.qi@linaro.org>
3632
3633         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
3634         <loc.exp>: New field.
3635         * dwarf2-frame.c (execute_cfa_program): Update.
3636         (dwarf2_frame_prev_register): Update.
3637
3638 2017-08-10  Pedro Alves  <palves@redhat.com>
3639
3640         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
3641
3642 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3643
3644         * fbsd-nat.c (struct fbsd_fork_info): Remove.
3645         (fbsd_pending_children): Use std::list.
3646         (fbsd_remember_child): Likewise.
3647         (fbsd_is_child_pending): Likewise.
3648         (fbsd_pending_vfork_done): Use std::forward_list.
3649         (fbsd_add_vfork_done): Likewise.
3650         (fbsd_is_vfork_done_pending): Likewise.
3651         (fbsd_next_vfork_done): Likewise.
3652
3653 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3654
3655         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
3656         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
3657         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
3658         for `mapfilename'.
3659         (fbsd_xfer_partial): Use gdb::byte_vector.
3660         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
3661
3662 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
3663
3664         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
3665         "filestuff.h".
3666         (fbsd_find_memory_regions): Fix `mapfile' initialization.
3667
3668 2017-08-09  Tom Tromey  <tom@tromey.com>
3669
3670         * skip.c (skiplist_entry): New constructor.
3671         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3672         (skiplist_entry::file_is_glob): Now bool.
3673         (skiplist_entry::file, skiplist_entry::function): Now
3674         std::string.
3675         (make_skip_entry): Return a unique_ptr.  Use new.
3676         (free_skiplist_entry, free_skiplist_entry_cleanup)
3677         (make_free_skiplist_entry_cleanup): Remove.
3678         (skip_command, skip_disable_command, add_skiplist_entry)
3679         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3680         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3681         (function_name_is_marked_for_skip): Update.
3682         (skip_delete_command): Update.  Use delete.
3683
3684 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
3685
3686         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3687         (aarch64_linux_core_read_description): New function.
3688         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3689
3690 2017-08-09  Pedro Alves  <palves@redhat.com>
3691
3692         * cp-name-parser.y (cp_comp_to_string): Return a
3693         gdb::unique_xmalloc_ptr<char>.
3694         * cp-support.c (replace_typedefs_qualified_name)
3695         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3696         (cp_canonicalize_string_full): Use op= instead of explicit
3697         convertion.
3698         (cp_class_name_from_physname, method_name_from_physname)
3699         (cp_func_name, cp_remove_params): Adjust to use
3700         gdb::unique_xmalloc_ptr<char>.
3701         * cp-support.h (cp_comp_to_string): Return a
3702         gdb::unique_xmalloc_ptr<char>.
3703         * python/py-type.c (typy_lookup_type): Adjust to use
3704         gdb::unique_xmalloc_ptr<char>.
3705
3706 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3707
3708         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3709
3710 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
3711             Yao Qi  <yao.qi@linaro.org>
3712
3713         * cp-support.c (cp_canonicalize_string_full): Use
3714         gdb::unique_xmalloc_ptr<char>.
3715         (cp_canonicalize_string): Likewise.
3716
3717 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3718
3719         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3720         * regformats/i386/amd64-avx-avx512.dat: Remove.
3721         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3722         * regformats/i386/amd64-avx-mpx.dat:Remove.
3723         * regformats/i386/amd64-avx.dat: Remove.
3724         * regformats/i386/amd64-mpx.dat: Remove.
3725         * regformats/i386/i386-avx-avx512.dat: Remove.
3726         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3727         * regformats/i386/i386-avx-mpx.dat: Remove.
3728         * regformats/i386/i386-mmx.dat: Remove.
3729         * regformats/i386/i386-mpx.dat: Remove.
3730
3731 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3732
3733         * amd64-tdep.h (tdesc_x32): Remove the declaration.
3734         * amd64-tdep.c: Don't include features/i386/x32*.c.
3735         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3736         functions.
3737         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3738         and i386/x32-avx-avx512.
3739         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3740         and i386/x32.xml.
3741         * features/i386/x32-avx-avx512.c: Removed.
3742         * features/i386/x32-avx-avx512.xml: Removed.
3743         * features/i386/x32-avx.c: Removed.
3744         * features/i386/x32-avx.xml: Removed.
3745         * features/i386/x32.c: Removed.
3746         * features/i386/x32.xml: Removed.
3747         * regformats/i386/x32-avx-avx512.dat: Removed.
3748         * regformats/i386/x32-avx.dat: Removed.
3749         * regformats/i386/x32.dat: Removed.
3750
3751 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3752
3753         PR breakpoints/21886
3754         * mem-break.c (default_memory_insert_breakpoint): Use
3755         `->placed_address' rather than `->reqstd_address' for the
3756         breakpoint location.
3757
3758 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3759
3760         * arch-utils.c (default_print_insn): Remove arch/mach/endian
3761         assertions.
3762
3763 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3764
3765         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3766         a union of `tdep_info', `tdesc_data' and `id'.
3767         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3768         rather than `info.tdep_info'.
3769         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3770         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3771         * i386-tdep.c (i386_gdbarch_init): Likewise.
3772         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3773         * mips-tdep.c (mips_gdbarch_init): Likewise.
3774         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3775         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3776         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3777         `info.tdep_info'.
3778         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3779         `info.tdep_info'.
3780         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3781         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3782         `info.tdep_info'.
3783         * spu-tdep.c (spu_gdbarch_init): Likewise.
3784         * gdbarch.h: Regenerate.
3785
3786 2017-08-07  Leszek Swirski  <leszeks@google.com>
3787
3788         PR symtab/20899
3789         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3790
3791 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3792
3793         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3794         (gdbsim_open): Rename gdb_argv args object to argv.
3795
3796 2017-08-05  Tom Tromey  <tom@tromey.com>
3797
3798         * compile/compile-object-load.c (compile_object_load): Use
3799         gdb::unique_xmalloc_ptr.
3800         * cli/cli-dump.c (scan_filename): Rename from
3801         scan_filename_with_cleanup.  Change return type.
3802         (scan_expression): Rename from scan_expression_with_cleanup.
3803         Change return type.
3804         (dump_memory_to_file, dump_value_to_file, restore_command):
3805         Use gdb::unique_xmalloc_ptr.  Update.
3806         * cli/cli-cmds.c (find_and_open_script): Use
3807         gdb::unique_xmalloc_ptr.
3808         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3809         * symmisc.c (maintenance_print_symbols)
3810         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3811         * symfile.c (symfile_bfd_open, generic_load)
3812         (add_symbol_file_command, remove_symbol_file_command): Use
3813         gdb::unique_xmalloc_ptr.
3814         * source.c (openp): Use gdb::unique_xmalloc_ptr.
3815         * psymtab.c (maintenance_print_psymbols): Use
3816         gdb::unique_xmalloc_ptr.
3817         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3818         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3819         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3820         (reload_shared_libraries_1): Likewise.
3821
3822 2017-08-05  Tom Tromey  <tom@tromey.com>
3823
3824         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3825         (rust_op_vector, rust_set_vector): New typedefs.
3826         (current_parser): New global.
3827         (work_obstack): Change to pointer type.  Update all users.
3828         (rust_ast, pstate): Remove globals.
3829         (struct rust_parser): New.
3830         (%union) <params, field_inits>: Change type.
3831         (start, tuple_expr, unit_expr, struct_expr_list, literal)
3832         (field_expr, expr_list, maybe_expr_list, type_list): Update.
3833         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3834         (convert_params_to_types, convert_params_to_expression): Change
3835         type of "params".
3836         (ast_string): Change type of "fields".
3837         (rust_parse): Make a rust_parser.  Remove cleanups.
3838         (rust_lex_tests): Make and install an auto_obstack.
3839
3840 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3841
3842         * configure.srv (ipa_x32_linux_regobj): New.
3843         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3844         instead of X86_TDESC_AVX512.
3845         (initialize_low_tracepoint): Call
3846         init_registers_x32_avx_avx512_linux.
3847
3848 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3849
3850         * utils.h (gdb_argv): Add namespace std for nullptr_t.
3851
3852 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3853
3854         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3855
3856 2017-08-03  Tom Tromey  <tom@tromey.com>
3857
3858         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3859         Remove.
3860         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3861
3862 2017-08-03  Tom Tromey  <tom@tromey.com>
3863
3864         * python/py-param.c (compute_enum_values): Use gdb_argv.
3865
3866 2017-08-03  Tom Tromey  <tom@tromey.com>
3867
3868         * utils.h (struct gdb_argv_deleter): New.
3869         (gdb_argv): New class.
3870         * utils.c (gdb_argv::reset): New method.
3871         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3872         * tracefile.c (tsave_command): Use gdb_argv.
3873         * top.c (new_ui_command): Use gdb_argv.
3874         * symmisc.c (maintenance_print_symbols)
3875         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3876         * symfile.c (symbol_file_command, generic_load)
3877         (remove_symbol_file_command): Use gdb_argv.
3878         * stack.c (backtrace_command): Use gdb_argv.
3879         * source.c (add_path, show_substitute_path_command)
3880         (unset_substitute_path_command, set_substitute_path_command):
3881         Use gdb_argv.
3882         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
3883         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3884         * remote.c (extended_remote_run, remote_put_command)
3885         (remote_get_command, remote_delete_command): Use gdb_argv.
3886         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3887         (gdbsim_open): Use gdb_argv.
3888         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3889         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3890         * procfs.c (procfs_info_proc): Use gdb_argv.
3891         * interps.c (interpreter_exec_cmd): Use gdb_argv.
3892         * infrun.c (handle_command): Use gdb_argv.
3893         * inferior.c (add_inferior_command, clone_inferior_command):
3894         Use gdb_argv.
3895         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3896         * exec.c (exec_file_command): Use gdb_argv.
3897         * cli/cli-cmds.c (alias_command): Use gdb_argv.
3898         * compile/compile.c (build_argc_argv): Use gdb_argv.
3899
3900 2017-08-03  Tom Tromey  <tom@tromey.com>
3901
3902         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3903
3904 2017-08-03  Tom Tromey  <tom@tromey.com>
3905
3906         * python/python.c (compute_python_string): Return std::string.
3907         (gdbpy_eval_from_control_command): Update.
3908         (do_start_initialization): Use std::string.
3909         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3910         xstrprintf.
3911         * python/py-breakpoint.c (local_setattro): Use string_printf, not
3912         xstrprintf.
3913
3914 2017-08-03  Tom Tromey  <tom@tromey.com>
3915
3916         * top.h (do_restore_instream_cleanup): Remove.
3917         * top.c (do_restore_instream_cleanup): Remove.
3918         (read_command_file): Use scoped_restore.
3919         * cli/cli-script.c (execute_user_command): Use scoped_restore.
3920
3921 2017-08-03  Tom Tromey  <tom@tromey.com>
3922
3923         * cli/cli-script.c (execute_user_command)
3924         (execute_control_command): Use scoped_restore.
3925
3926 2017-08-03  Tom Tromey  <tom@tromey.com>
3927
3928         * cli/cli-script.c (do_restore_user_call_depth): Remove.
3929         (execute_user_command): Remove user_call_depth; use
3930         user_args_stack's size instead.
3931
3932 2017-08-03  Tom Tromey  <tom@tromey.com>
3933
3934         * top.h (in_user_command): Remove.
3935         * top.c (in_user_command): Remove.
3936         * cli/cli-script.c (do_restore_user_call_depth)
3937         (execute_user_command): Update.
3938
3939 2017-08-03  Tom Tromey  <tom@tromey.com>
3940
3941         * valops.c (search_struct_method): Use gdb::byte_vector.
3942         * valarith.c (value_concat): Use std::vector.
3943         * target.c (memory_xfer_partial): Use gdb::byte_vector.
3944         (simple_search_memory): Likewise.
3945         * printcmd.c (find_string_backward): Use gdb::byte_vector.
3946         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3947         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3948         * elfread.c (elf_rel_plt_read): Use std::string.
3949         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3950         * cli/cli-dump.c (restore_section_callback): Use
3951         gdb::byte_vector.
3952
3953 2017-08-03  Tom Tromey  <tom@tromey.com>
3954
3955         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3956
3957 2017-08-03  Tom Tromey  <tom@tromey.com>
3958
3959         * tui/tui-regs.c (tui_restore_gdbout): Remove.
3960         (tui_register_format): Use scoped_restore.
3961
3962 2017-08-03  Tom Tromey  <tom@tromey.com>
3963
3964         * reverse.c (exec_direction_default): Remove.
3965         (exec_reverse_once): Use scoped_restore.
3966         * remote.c (restore_remote_timeout): Remove.
3967         (remote_flash_erase, remote_flash_write, remote_flash_done)
3968         (readchar, remote_serial_write): Use scoped_restore.
3969         * cli/cli-script.c (struct source_cleanup_lines_args)
3970         (source_cleanup_lines): Remove.
3971         (script_from_file): Use scoped_restore.
3972         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3973         (source_command): Use scoped_restore.
3974
3975 2017-08-03  Tom Tromey  <tom@tromey.com>
3976
3977         * utils.h (make_cleanup_free_so): Remove.
3978         * utils.c (do_free_so, make_cleanup_free_so): Remove.
3979         * solist.h (struct so_deleter): New.
3980         (so_list_up): New typedef.
3981         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3982
3983 2017-08-03  Tom Tromey  <tom@tromey.com>
3984
3985         * utils.h (make_cleanup_restore_current_language): Remove.
3986         * utils.c (do_restore_current_language)
3987         (make_cleanup_restore_current_language): Remove.
3988         * parse.c (parse_exp_in_context_1)
3989         (parse_expression_with_language): Use
3990         scoped_restore_current_language.
3991         * mi/mi-main.c (mi_cmd_execute): Use
3992         scoped_restore_current_language.
3993         * language.h (scoped_restore_current_language): New class.
3994
3995 2017-08-03  Tom Tromey  <tom@tromey.com>
3996
3997         * compile/compile.c (cleanup_unlink_file): Remove.
3998         (compile_to_object): Use gdb::unlinker.
3999         (eval_compile_command): Likewise.
4000
4001 2017-08-03  Tom Tromey  <tom@tromey.com>
4002
4003         * utils.h (make_cleanup_fclose): Remove.
4004         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
4005
4006 2017-08-03  Tom Tromey  <tom@tromey.com>
4007
4008         * top.c (open_terminal_stream): Return gdb_file_up.
4009         (new_ui_command): Update.
4010
4011 2017-08-03  Tom Tromey  <tom@tromey.com>
4012
4013         * source.c (print_source_lines_base, forward_search_command)
4014         (reverse_search_command): Use gdb_file_up.
4015
4016 2017-08-03  Tom Tromey  <tom@tromey.com>
4017
4018         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4019
4020 2017-08-03  Tom Tromey  <tom@tromey.com>
4021
4022         * cli/cli-cmds.c (find_and_open_script): Change return type.
4023         Remove "streamp" and "full_path" parameters.
4024         (source_script_with_search): Update.
4025         * auto-load.c (source_script_file): Update.
4026         * cli/cli-cmds.h (find_and_open_script): Change type.
4027         (open_script): New struct.
4028
4029 2017-08-03  Tom Tromey  <tom@tromey.com>
4030
4031         * xml-support.c (xml_fetch_content_from_file): Update.
4032         * ui-file.c (stdio_file::open): Update.
4033         * tracefile-tfile.c (tfile_start): Update.
4034         * remote.c (remote_file_put, remote_file_get): Update.
4035         * nat/linux-procfs.c (linux_proc_get_int)
4036         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
4037         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
4038         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
4039         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
4040         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
4041         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
4042         * linux-nat.c (linux_proc_pending_signals): Update.
4043         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
4044         (file_closer): Remove.
4045         * compile/compile.c (compile_to_object): Update.
4046         * common/filestuff.h (struct gdb_file_deleter): New.
4047         (gdb_file_up): New typedef.
4048         (gdb_fopen_cloexec): Change return type.
4049         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
4050         * cli/cli-dump.c (fopen_with_cleanup): Remove.
4051         (dump_binary_file, restore_binary_file): Update.
4052         * auto-load.c (auto_load_objfile_script_1): Update.
4053
4054 2017-08-03  Tom Tromey  <tom@tromey.com>
4055
4056         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
4057         (info_static_tracepoint_markers_command): Likewise.
4058         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
4059         * skip.c (skip_info): Use ui_out_emit_table.
4060         * progspace.c (print_program_space): Use ui_out_emit_table.
4061         * osdata.c (info_osdata): Use ui_out_emit_table.
4062         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
4063         ui_out_emit_table.
4064         * linux-thread-db.c (info_auto_load_libthread_db): Use
4065         ui_out_emit_table.
4066         * inferior.c (print_inferior): Use ui_out_emit_table.
4067         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
4068         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
4069         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
4070         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
4071         * ui-out.h (class ui_out_emit_table): New.
4072
4073 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
4074
4075         * mips-tdep.c (mips_fpu_type_str): New function.
4076         (mips_dump_tdep): Call it.
4077
4078 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
4079
4080         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
4081         `->mips_fpu_type'.
4082
4083 2017-07-31  Xavier Roirand  <roirand@adacore.com>
4084
4085         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
4086
4087 2017-07-27  Xavier Roirand  <roirand@adacore.com>
4088
4089         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
4090
4091 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4092
4093         * cli/cli-cmds.c (maintenancechecklist): New variable.
4094         * gdbcmd.h (maintenancechecklist): Declare it.
4095         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
4096         Call i386_linux_read_description with different masks.
4097         * maint.c (maintenance_check_command): New function.
4098         (_initialize_maint_cmds): Call add_prefix_cmd.
4099         * target-descriptions.c (tdesc_reg): override operator != and ==.
4100         (tdesc_type): Likewise.
4101         (tdesc_feature): Likewise.
4102         (target_desc): Likewise.
4103         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
4104         (maintenance_check_xml_descriptions): New function.
4105         (_initialize_target_descriptions) Add command "xml-descriptions".
4106         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
4107
4108 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4109
4110         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
4111         Include features/i386/32bit-*.c.
4112         (i386_linux_read_description): Generate target description if it
4113         doesn't exist.
4114         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
4115         functions.
4116         * features/i386/32bit-linux.c: Re-generated.
4117         * features/i386/32bit-sse.c: Likewise.
4118         * target-descriptions.c (print_c_feature::visit): Print code to
4119         set register number if needed.
4120         (print_c_feature) <m_next_regnum>: New field.
4121
4122 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4123
4124         * features/Makefile (CFILES): Rename with TDESC_CFILES.
4125         (FEATURE_XMLFILES): New.
4126         (FEATURE_CFILES): New.
4127         New rules.
4128         (clean-cfiles): Remove generated c files.
4129         * features/i386/32bit-avx.c: Generated.
4130         * features/i386/32bit-avx512.c: Generated.
4131         * features/i386/32bit-core.c: Generated.
4132         * features/i386/32bit-linux.c: Generated.
4133         * features/i386/32bit-mpx.c: Generated.
4134         * features/i386/32bit-pkeys.c: Generated.
4135         * features/i386/32bit-sse.c: Generated.
4136         * target-descriptions.c: Include algorithm.
4137         (tdesc_element_visitor): Add method visit_end.
4138         (print_c_tdesc): Implement visit_end.
4139         (print_c_tdesc:: m_filename_after_features): Move it to
4140         protected.
4141         (print_c_feature): New class.
4142         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
4143         name starts with "i386/32bit-".
4144
4145 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4146
4147         * target-descriptions.c (tdesc_element_visitor): New class.
4148         (tdesc_element): New class.
4149         (tdesc_reg): Inherit from tdesc_element.
4150         (tdesc_reg::accept): New function.
4151         (tdesc_type): Inherit from tdesc_element.
4152         (tdesc_type::accept): New function.
4153         (tdesc_feature): Inherit from tdesc_element.
4154         (tdesc_feature::accept): New function.
4155         (target_desc): Inherit from tdesc_element.
4156         (target_desc::target_desc): New.
4157         (target_desc::~target_desc): New.
4158         (target_desc::accept): New.
4159         (allocate_target_description): Use new.
4160         (free_target_description): Use delete.
4161         (print_c_tdesc): New class.
4162         (maint_print_c_tdesc_cmd): Adjust.
4163
4164         * features/aarch64.c: Re-generated.
4165         * features/arc-arcompact.c: Re-generated.
4166         * features/arc-v2.c: Re-generated.
4167         * features/arm/arm-with-iwmmxt.c: Re-generated.
4168         * features/arm/arm-with-m.c: Re-generated.
4169         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
4170         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
4171         * features/arm/arm-with-neon.c: Re-generated.
4172         * features/arm/arm-with-vfpv2.c: Re-generated.
4173         * features/arm/arm-with-vfpv3.c: Re-generated.
4174         * features/i386/amd64-avx-avx512.c: Re-generated.
4175         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4176         * features/i386/amd64-avx.c: Re-generated.
4177         * features/i386/amd64-avx-linux.c: Re-generated.
4178         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
4179         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4180         * features/i386/amd64-avx-mpx.c: Re-generated.
4181         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
4182         * features/i386/amd64.c: Re-generated.
4183         * features/i386/amd64-linux.c: Re-generated.
4184         * features/i386/amd64-mpx.c: Re-generated.
4185         * features/i386/amd64-mpx-linux.c: Re-generated.
4186         * features/i386/i386-avx-avx512.c: Re-generated.
4187         * features/i386/i386-avx-avx512-linux.c: Re-generated.
4188         * features/i386/i386-avx.c: Re-generated.
4189         * features/i386/i386-avx-linux.c: Re-generated.
4190         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
4191         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
4192         * features/i386/i386-avx-mpx.c: Re-generated.
4193         * features/i386/i386-avx-mpx-linux.c: Re-generated.
4194         * features/i386/i386.c: Re-generated.
4195         * features/i386/i386-linux.c: Re-generated.
4196         * features/i386/i386-mmx.c: Re-generated.
4197         * features/i386/i386-mmx-linux.c: Re-generated.
4198         * features/i386/i386-mpx.c: Re-generated.
4199         * features/i386/i386-mpx-linux.c: Re-generated.
4200         * features/i386/x32-avx-avx512.c: Re-generated.
4201         * features/i386/x32-avx-avx512-linux.c: Re-generated.
4202         * features/i386/x32-avx.c: Re-generated.
4203         * features/i386/x32-avx-linux.c: Re-generated.
4204         * features/i386/x32.c: Re-generated.
4205         * features/i386/x32-linux.c: Re-generated.
4206         * features/microblaze.c: Re-generated.
4207         * features/microblaze-with-stack-protect.c: Re-generated.
4208         * features/mips64-dsp-linux.c: Re-generated.
4209         * features/mips64-linux.c: Re-generated.
4210         * features/mips-dsp-linux.c: Re-generated.
4211         * features/mips-linux.c: Re-generated.
4212         * features/nds32.c: Re-generated.
4213         * features/nios2.c: Re-generated.
4214         * features/nios2-linux.c: Re-generated.
4215         * features/rs6000/powerpc-32.c: Re-generated.
4216         * features/rs6000/powerpc-32l.c: Re-generated.
4217         * features/rs6000/powerpc-403.c: Re-generated.
4218         * features/rs6000/powerpc-403gc.c : Re-generated.
4219         * features/rs6000/powerpc-405.c: Re-generated.
4220         * features/rs6000/powerpc-505.c: Re-generated.
4221         * features/rs6000/powerpc-601.c: Re-generated.
4222         * features/rs6000/powerpc-602.c: Re-generated.
4223         * features/rs6000/powerpc-603.c: Re-generated.
4224         * features/rs6000/powerpc-604.c: Re-generated.
4225         * features/rs6000/powerpc-64.c: Re-generated.
4226         * features/rs6000/powerpc-64l.c: Re-generated.
4227         * features/rs6000/powerpc-7400.c: Re-generated.
4228         * features/rs6000/powerpc-750.c: Re-generated.
4229         * features/rs6000/powerpc-860.c: Re-generated.
4230         * features/rs6000/powerpc-altivec32.c: Re-generated.
4231         * features/rs6000/powerpc-altivec32l.c: Re-generated.
4232         * features/rs6000/powerpc-altivec64.c: Re-generated.
4233         * features/rs6000/powerpc-altivec64l.c: Re-generated.
4234         * features/rs6000/powerpc-cell32l.c: Re-generated.
4235         * features/rs6000/powerpc-cell64l.c: Re-generated.
4236         * features/rs6000/powerpc-e500.c: Re-generated.
4237         * features/rs6000/powerpc-e500l.c: Re-generated.
4238         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
4239         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
4240         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
4241         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
4242         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
4243         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
4244         * features/rs6000/powerpc-vsx32.c: Re-generated.
4245         * features/rs6000/powerpc-vsx32l.c: Re-generated.
4246         * features/rs6000/powerpc-vsx64.c: Re-generated.
4247         * features/rs6000/powerpc-vsx64l.c: Re-generated.
4248         * features/rs6000/rs6000.c: Re-generated.
4249         * features/s390-linux32.c: Re-generated.
4250         * features/s390-linux32v1.c: Re-generated.
4251         * features/s390-linux32v2.c: Re-generated.
4252         * features/s390-linux64.c: Re-generated.
4253         * features/s390-linux64v1.c: Re-generated.
4254         * features/s390-linux64v2.c: Re-generated.
4255         * features/s390-te-linux64.c: Re-generated.
4256         * features/s390-tevx-linux64.c: Re-generated.
4257         * features/s390-vx-linux64.c: Re-generated.
4258         * features/s390x-linux64.c: Re-generated.
4259         * features/s390x-linux64v1.c: Re-generated.
4260         * features/s390x-linux64v2.c: Re-generated.
4261         * features/s390x-te-linux64.c: Re-generated.
4262         * features/s390x-tevx-linux64.c: Re-generated.
4263         * features/s390x-vx-linux64.c: Re-generated.
4264         * features/sparc/sparc32-solaris.c: Re-generated.
4265         * features/sparc/sparc64-solaris.c: Re-generated.
4266         * features/tic6x-c62x.c: Re-generated.
4267         * features/tic6x-c62x-linux.c: Re-generated.
4268         * features/tic6x-c64x.c: Re-generated.
4269         * features/tic6x-c64x-linux.c: Re-generated.
4270         * features/tic6x-c64xp.c: Re-generated.
4271         * features/tic6x-c64xp-linux.c: Re-generated.
4272
4273 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4274
4275         * i386-linux-tdep.c (i386_linux_read_description): New function.
4276         (i386_linux_core_read_description): Call
4277         i386_linux_read_description.
4278         * i386-linux-tdep.h (i386_linux_read_description): Declare.
4279         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
4280         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
4281         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
4282         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
4283         * x86-linux-nat.c (x86_linux_read_description): Call
4284         i386_linux_read_description.
4285
4286 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4287
4288         * NEWS: Mention it.
4289         * features/Makefile (%.c: %.xml): Pass the xml file name to
4290         command "maint print c-tdesc".
4291         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
4292         name from 'arg'.
4293
4294 2017-07-26  Yao Qi  <yao.qi@linaro.org>
4295
4296         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
4297         in-class initialization.
4298         (tdesc_create_feature): Call new instead of XCNEW.
4299         (free_target_description): Ue delete.
4300
4301 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
4302
4303         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
4304
4305 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4306
4307         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
4308         constant.
4309         (amd64_x32_init_abi): Likewise.
4310         * amd64-tdep.h (amd64_init_abi): Update declaration.
4311         (amd64_x32_init_abi): Likewise.
4312
4313 2017-07-25  Yao Qi  <yao.qi@linaro.org>
4314
4315         PR tdep/21717
4316         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
4317         condition for FPSCR.
4318         (arm_linux_store_inferior_registers): Likewise.
4319
4320 2017-07-22  Tom Tromey  <tom@tromey.com>
4321
4322         * break-catch-syscall.c (struct catch_syscall_inferior_data)
4323         <syscalls_counts>: Now a std::vector.
4324         (get_catch_syscall_inferior_data): Use "new".
4325         (catch_syscall_inferior_data_cleanup): Use "delete".
4326         (insert_catch_syscall, remove_catch_syscall)
4327         (clear_syscall_counts): Update.
4328
4329 2017-07-22  Tom Tromey  <tom@tromey.com>
4330
4331         * break-catch-syscall.c (syscall_catchpoint)
4332         <syscalls_to_be_caught>: Now a std::vector<int>
4333         (~syscall_catchpoint): Remove.
4334         (insert_catch_syscall, remove_catch_syscall)
4335         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
4336         (print_mention_catch_syscall, print_recreate_catch_syscall):
4337         Update.
4338         (create_syscall_event_catchpoint): Change type of "filter"
4339         parameter.
4340         (catch_syscall_split_args): Return a std::vector.
4341         (catch_syscall_command_1, catching_syscall_number_1): Update.
4342
4343 2017-07-22  Tom Tromey  <tom@tromey.com>
4344
4345         * break-catch-throw.c (struct exception_catchpoint)
4346         <exception_rx>: Now a std::string.
4347         (~exception_catchpoint): Remove.
4348         (print_one_detail_exception_catchpoint): Update.
4349         (handle_gnu_v3_exceptions): Change type of except_rx.
4350         (extract_exception_regexp): Return a std::string.
4351         (catch_exception_command_1): Update.
4352
4353 2017-07-22  Tom Tromey  <tom@tromey.com>
4354
4355         * break-catch-sig.c (gdb_signal_type): Remove typedef.
4356         (struct signal_catchpoint) <signals_to_be_caught>: Now a
4357         std::vector.
4358         <catch_all>: Now a bool.
4359         (~signal_catchpoint): Remove.
4360         (signal_catchpoint_insert_location)
4361         (signal_catchpoint_remove_location)
4362         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
4363         (signal_catchpoint_print_mention)
4364         (signal_catchpoint_print_recreate)
4365         (signal_catchpoint_explains_signal): Update.
4366         (create_signal_catchpoint): Change type of "filter" and
4367         "catch_all".
4368         (catch_signal_split_args): Return a std::vector.  Change type of
4369         "catch_all".
4370         (catch_signal_command): Update.
4371
4372 2017-07-20  Pedro Alves  <palves@redhat.com>
4373
4374         * ada-lang.c (ada_language_defn): Make extern.
4375         (_initialize_ada_language): Remove add_language call.
4376         * c-lang.c (c_language_defn, cplus_language_defn)
4377         (asm_language_defn, minimal_language_defn): Make extern.
4378         (_initialize_c_language): Delete.
4379         * completer.c (compare_cstrings): Delete, moved to utils.h.
4380         * d-lang.c (d_language_defn): Make extern.
4381         (_initialize_d_language): Remove add_language calls.
4382         * defs.h (enum language): Add comment.
4383         * f-lang.c (f_language_defn): Make extern.
4384         (_initialize_f_language): Remove add_language call.
4385         * go-lang.c (go_language_defn): Make extern.
4386         (_initialize_go_language): Remove add_language call.
4387         * language.c: Include <algorithm>.
4388         (languages): Redefine as const array.
4389         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
4390         (set_language_command): Handle "local".  Use for-range loop.
4391         (set_language): Remove loop.
4392         (language_enum): Rewrite.
4393         (language_def, language_str): Remove loops.
4394         (add_language): Delete.
4395         (add_set_language_command): New, based on add_languages.
4396         (skip_language_trampoline): Adjust.
4397         (local_language_defn): Delete.
4398         (language_gdbarch_post_init): Adjust.
4399         (_initialize_language): Remove add_language calls.  Call
4400         add_set_language_command.
4401         * language.h (add_language): Delete.
4402         (auto_language_defn)
4403         (unknown_language_defn, minimal_language_defn, ada_language_defn)
4404         (asm_language_defn, c_language_defn, cplus_language_defn)
4405         (d_language_defn, f_language_defn, go_language_defn)
4406         (m2_language_defn, objc_language_defn, opencl_language_defn)
4407         (pascal_language_defn, rust_language_defn): Declare.
4408         * m2-lang.c (m2_language_defn): Make extern.
4409         (_initialize_m2_language): Remove add_language call.
4410         * objc-lang.c (objc_language_defn): Make extern.
4411         (_initialize_objc_language): Remove add_language call.
4412         * opencl-lang.c (opencl_language_defn): Make extern.
4413         (_initialize_opencl_language): Remove add_language call.
4414         * p-lang.c (pascal_language_defn): Make extern.
4415         (_initialize_pascal_language): Delete.
4416         * rust-lang.c (rust_language_defn): Make extern.
4417         (_initialize_rust_language): Delete.
4418         * utils.h (compare_cstrings): New static inline function.
4419
4420 2017-07-20  Pedro Alves  <palves@redhat.com>
4421
4422         * ada-lang.c (ada_to_fixed_type_1): Adjust.
4423         (get_var_value): Constify parameters.
4424         (get_int_var_value): Change prototype.
4425         (to_fixed_range_type): Adjust.
4426         * ada-lang.h (get_int_var_value): Change prototype.
4427
4428 2017-07-20  Pedro Alves  <palves@redhat.com>
4429
4430         * dwarf2read.c (dw2_lookup_symbol): Use
4431         SYMBOL_MATCHES_SEARCH_NAME.
4432         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
4433
4434 2017-07-20  Pedro Alves  <palves@redhat.com>
4435
4436         * block.c (block_iter_name_step, block_iter_name_first)
4437         (block_iter_name_next): Delete.
4438         (block_lookup_symbol_primary): Adjust to use
4439         dict_iter_match_first/dict_iter_match_next.
4440         * block.h (block_iter_name_first, block_iter_name_next): Delete
4441         declarations.
4442         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
4443         dict_iter_match_first/dict_iter_match_next.
4444
4445 2017-07-20  Pedro Alves  <palves@redhat.com>
4446
4447         * cp-support.c (cp_find_first_component_aux): Add missing case for
4448         end of string.
4449
4450 2017-07-18  David Blaikie  <dblaikie@gmail.com>
4451
4452         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
4453         of dwo_cu's dwo_file.
4454
4455 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4456
4457         * remote.c (store_registers_using_G): Remove one line comment.
4458
4459 2017-07-18  Yao Qi  <yao.qi@linaro.org>
4460
4461         * regcache.c (regcache_cpy): Simplify it.
4462         (regcache::cpy_no_passthrough): Remove it.
4463         * regcache.h (cpy_no_passthrough): Remove it.
4464         (regcache_dup, regcache_cpy): Update comments.
4465
4466 2017-07-18  Pedro Alves  <palves@redhat.com>
4467
4468         * remote-sim.c (sim_command_completer): Adjust to work with a
4469         completion_tracker instead of a VEC.
4470
4471 2017-07-17  Pedro Alves  <palves@redhat.com>
4472
4473         * completer.c (complete_source_filenames): New function.
4474         (complete_address_and_linespec_locations): New function.
4475         (location_completer): Use complete_address_and_linespec_locations.
4476         (completion_tracker::build_completion_result): Honor the tracker's
4477         request to suppress append.
4478         * completer.h (completion_tracker::suppress_append_ws)
4479         (completion_tracker::set_suppress_append_ws): New methods.
4480         (completion_tracker::m_suppress_append_ws): New field.
4481         (complete_source_filenames): New declaration.
4482         * linespec.c (linespec_complete_what): New.
4483         (struct ls_parser) <complete_what, completion_word,
4484         completion_quote_char, completion_quote_end, completion_tracker>:
4485         New fields.
4486         (string_find_incomplete_keyword_at_end): New.
4487         (linespec_lexer_lex_string): Record quote char.  If in completion
4488         mode, don't throw.
4489         (linespec_lexer_consume_token): Advance the completion word point.
4490         (linespec_lexer_peek_token): Save/restore completion info.
4491         (save_stream_and_consume_token): New.
4492         (set_completion_after_number): New.
4493         (linespec_parse_basic): Set what to complete next depending on
4494         token.  Handle function and label completions specially.
4495         (parse_linespec): Disable objc shortcut in completion mode.  Set
4496         what to complete next depending on token type.  Skip keyword if in
4497         completion mode.
4498         (complete_linespec_component, linespec_complete): New.
4499         * linespec.h (linespec_complete): Declare.
4500
4501 2017-07-17  Pedro Alves  <palves@redhat.com>
4502
4503         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
4504         Handle 'operator<' / 'operator<<'.
4505
4506 2017-07-17  Pedro Alves  <palves@redhat.com>
4507
4508         * completer.c (collect_explicit_location_matches): Handle
4509         MATCH_LABEL.
4510         (convert_explicit_location_to_linespec): New, factored out from
4511         ...
4512         (convert_explicit_location_to_sals): ... this.
4513         (complete_label): New.
4514         (linespec_complete_label, find_label_symbols_in_block): New.
4515         (find_label_symbols): Add completion_mode parameter and adjust to
4516         call find_label_symbols_in_block.
4517         * linespec.h (linespec_complete_label): Declare.
4518
4519 2017-07-17  Pedro Alves  <palves@redhat.com>
4520
4521         * ada-lang.c (ada_collect_symbol_completion_matches): Add
4522         complete_symbol_mode parameter.
4523         * cli/cli-cmds.c (complete_command): Get the completion result out
4524         of the handle_brkchars tracker if used a custom word point.
4525         * completer.c: Include "linespec.h".
4526         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
4527         (advance_to_expression_complete_word_point): New.
4528         (completion_tracker::completes_to_completion_word): New.
4529         (complete_files_symbols): Pass down
4530         complete_symbol_mode::EXPRESSION.
4531         (explicit_options, probe_options): New.
4532         (collect_explicit_location_matches): Complete on the
4533         explictit_loc->foo instead of word.  Use
4534         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
4535         keyword and options completions.
4536         (backup_text_ptr): Delete.
4537         (skip_keyword): New.
4538         (complete_explicit_location): Remove 'word' parameter.  Add
4539         language, quoted_arg_start and quoted_arg_end parameters.
4540         Rewrite, parsing left to right.
4541         (location_completer): Rewrite.
4542         (location_completer_handle_brkchars): New function.
4543         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
4544         (enum complete_line_internal_reason): Adjust comments.
4545         (completion_tracker::discard_completions): New.
4546         (completer_handle_brkchars_func_for_completer): Handle
4547         location_completer.
4548         (gdb_custom_word_point_brkchars)
4549         (gdb_org_rl_basic_quote_characters): New.
4550         (gdb_completion_word_break_characters_throw)
4551         (completion_find_completion_word): Handle trackers that use a
4552         custom word point.
4553         (completion_tracker::advance_custom_word_point_by): New.
4554         (completion_tracker::build_completion_result): Don't rely on
4555         readline appending the quote char.
4556         (gdb_rl_attempted_completion_function_throw): Handle trackers that
4557         use a custom word point.
4558         (gdb_rl_attempted_completion_function): Restore
4559         rl_basic_quote_characters.
4560         * completer.h (class completion_tracker): Extend intro comment.
4561         (completion_tracker::set_quote_char)
4562         (completion_tracker::quote_char)
4563         (completion_tracker::set_use_custom_word_point)
4564         (completion_tracker::use_custom_word_point)
4565         (completion_tracker::custom_word_point)
4566         (completion_tracker::set_custom_word_point)
4567         (completion_tracker::advance_custom_word_point_by)
4568         (completion_tracker::completes_to_completion_word)
4569         (completion_tracker::discard_completions): New methods.
4570         (completion_tracker::m_quote_char)
4571         (completion_tracker::m_use_custom_word_point)
4572         (completion_tracker::m_custom_word_point): New fields.
4573         (advance_to_expression_complete_word_point): Declare.
4574         * f-lang.c (f_collect_symbol_completion_matches): Add
4575         complete_symbol_mode parameter.
4576         * language.h (struct language_defn)
4577         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
4578         parameter.
4579         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
4580         (linespec_complete_function): New function.
4581         (linespec_lexer_lex_keyword): Adjust.
4582         * linespec.h (linespec_keywords, linespec_complete_function): New
4583         declarations.
4584         * location.c (find_end_quote): New function.
4585         (explicit_location_lex_one): Add explicit_completion_info
4586         parameter.  Save quoting info.  Don't throw if being called for
4587         completion.  Don't handle Ada operators here.
4588         (is_cp_operator, skip_op_false_positives, first_of)
4589         (explicit_location_lex_one_function): New function.
4590         (string_to_explicit_location): Replace 'dont_throw' parameter with
4591         an explicit_completion_info pointer parameter.  Handle it.  Don't
4592         use explicit_location_lex_one to lex function names.  Use
4593         explicit_location_lex_one_function instead.
4594         * location.h (struct explicit_completion_info): New.
4595         (string_to_explicit_location): Replace 'dont_throw' parameter with
4596         an explicit_completion_info pointer parameter.
4597         * symtab.c (default_collect_symbol_completion_matches_break_on):
4598         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
4599         (default_collect_symbol_completion_matches)
4600         (collect_symbol_completion_matches): Add complete_symbol_mode
4601         parameter.
4602         (collect_symbol_completion_matches_type): Pass down
4603         complete_symbol_mode::EXPRESSION.
4604         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4605         parameter.  Handle LINESPEC mode.
4606         * symtab.h (complete_symbol_mode): New.
4607         (default_collect_symbol_completion_matches_break_on)
4608         (default_collect_symbol_completion_matches)
4609         (collect_symbol_completion_matches)
4610         (collect_file_symbol_completion_matches): Add complete_symbol_mode
4611         parameter.
4612
4613 2017-07-17  Pedro Alves  <palves@redhat.com>
4614
4615         * utils.c (enum class strncmp_iw_mode): New.
4616         (strcmp_iw): Rename to ...
4617         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
4618         parameters.  Handle them.
4619         (strncmp_iw): New.
4620         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
4621         * utils.h (strncmp_iw): Declare.
4622         (strcmp_iw): Move describing comments here.
4623
4624 2017-07-17  Pedro Alves  <palves@redhat.com>
4625
4626         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
4627         CP_OPERATOR_STR.
4628         * c-typeprint.c (is_type_conversion_operator): Use
4629         CP_OPERATOR_STR.
4630         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
4631         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
4632         CP_OPERATOR_LEN.
4633         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
4634         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
4635         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
4636         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
4637         CP_OPERATOR_STR.
4638         * location.c: Include "cp-support.h".
4639         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
4640         CP_OPERATOR_STR.
4641         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
4642         CP_OPERATOR_LEN.
4643
4644 2017-07-17  Pedro Alves  <palves@redhat.com>
4645
4646         * cli/cli-cmds.c (complete_command): Use a completion tracker
4647         along with completion_find_completion_word for handle_brkchars
4648         phase.
4649         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
4650         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
4651         (struct gdb_rl_completion_word_info): New.
4652         (gdb_rl_find_completion_word): New.
4653         (completion_find_completion_word): New.
4654         * completer.h (completion_find_completion_word): Declare.
4655
4656 2017-07-17  Pedro Alves  <palves@redhat.com>
4657
4658         * ada-lang.c (symbol_completion_match): Adjust comments.
4659         (symbol_completion_add): Replace vector parameter with
4660         completion_tracker parameter.  Use it.
4661         (ada_make_symbol_completion_list): Rename to...
4662         (ada_collect_symbol_completion_matches): ... this.  Add
4663         completion_tracker parameter and use it.
4664         (ada_language_defn): Adjust.
4665         * break-catch-syscall.c (catch_syscall_completer): Adjust
4666         prototype and work with completion_tracker instead of VEC.
4667         * breakpoint.c (condition_completer): Adjust prototype and work
4668         with completion_tracker instead of VEC.
4669         * c-lang.c (c_language_defn, cplus_language_defn)
4670         (asm_language_defn, minimal_language_defn): Adjust to renames.
4671         * cli/cli-cmds.c (complete_command): Rework using
4672         completion_tracker.  Catch exceptions when completing.
4673         * cli/cli-decode.c (integer_unlimited_completer)
4674         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4675         with completion_tracker instead of VEC.
4676         * command.h (struct completion_tracker): Forward declare.
4677         (completer_ftype, completer_handle_brkchars_ftype): Change
4678         types.
4679         (complete_on_cmdlist, complete_on_enum): Adjust.
4680         * completer.c: Include <algorithm>.
4681         (struct gdb_completer_state): New.
4682         (current_completion): New global.
4683         (readline_line_completion_function): Delete.
4684         (noop_completer, filename_completer)
4685         (filename_completer_handle_brkchars, complete_files_symbols)
4686         (linespec_location_completer): Adjust to work with a
4687         completion_tracker instead of a VEC.
4688         (string_or_empty): New.
4689         (collect_explicit_location_matches): Adjust to work with a
4690         completion_tracker instead of a VEC.
4691         (explicit_location_completer): Rename to ...
4692         (complete_explicit_location): ... this and adjust to work with a
4693         completion_tracker instead of a VEC.
4694         (location_completer): Adjust to work with a completion_tracker
4695         instead of a VEC.
4696         (add_struct_fields): Adjust to work with a completion_list instead
4697         of VEC.
4698         (expression_completer): Rename to ...
4699         (complete_expression): ... this and adjust to work with a
4700         completion_tracker instead of a VEC.  Use complete_files_symbols.
4701         (expression_completer): Reimplement on top of complete_expression.
4702         (symbol_completer): Adjust to work with a completion_tracker
4703         instead of a VEC.
4704         (enum complete_line_internal_reason): Add describing comments.
4705         (complete_line_internal_normal_command): Adjust to work with a
4706         completion_tracker instead of a VEC.
4707         (complete_line_internal): Rename to ...
4708         (complete_line_internal_1): ... this and adjust to work with a
4709         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
4710         handle_brkchars phase.
4711         (new_completion_tracker): Delete.
4712         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4713         complete_line_internal_1.
4714         (free_completion_tracker): Delete.
4715         (INITIAL_COMPLETION_HTAB_SIZE): New.
4716         (completion_tracker::completion_tracker)
4717         (completion_tracker::~completion_tracker): New.
4718         (maybe_add_completion): Delete.
4719         (completion_tracker::maybe_add_completion)
4720         (completion_tracker::add_completion)
4721         (completion_tracker::add_completions): New.
4722         (throw_max_completions_reached_error): Delete.
4723         (complete_line): Adjust to work with a completion_tracker instead
4724         of a VEC.  Don't create a completion_tracker_t or check for max
4725         completions here.
4726         (command_completer, command_completer_handle_brkchars)
4727         (signal_completer, reg_or_group_completer_1)
4728         (reg_or_group_completer, default_completer_handle_brkchars):
4729         Adjust to work with a completion_tracker.
4730         (gdb_completion_word_break_characters_throw): New.
4731         (gdb_completion_word_break_characters): Reimplement.
4732         (line_completion_function): Delete.
4733         (completion_tracker::recompute_lowest_common_denominator)
4734         (expand_preserving_ws)
4735         (completion_tracker::build_completion_result)
4736         (completion_result::completion_result)
4737         (completion_result::completion_result)
4738         (completion_result::~completion_result)
4739         (completion_result::completion_result)
4740         (completion_result::release_match_list, compare_cstrings)
4741         (completion_result::sort_match_list)
4742         (completion_result::reset_match_list)
4743         (gdb_rl_attempted_completion_function_throw)
4744         (gdb_rl_attempted_completion_function): New.
4745         * completer.h (completion_list, struct completion_result)
4746         (class completion_tracker): New.
4747         (complete_line): Add completion_tracker parameter.
4748         (readline_line_completion_function): Delete.
4749         (gdb_rl_attempted_completion_function): New.
4750         (noop_completer, filename_completer, expression_completer)
4751         (location_completer, symbol_completer, command_completer)
4752         (signal_completer, reg_or_group_completer): Update prototypes.
4753         (completion_tracker_t, new_completion_tracker)
4754         (make_cleanup_free_completion_tracker): Delete.
4755         (enum maybe_add_completion_enum): Delete.
4756         (maybe_add_completion): Delete.
4757         (throw_max_completions_reached_error): Delete.
4758         * corefile.c (complete_set_gnutarget): Adjust to work with a
4759         completion_tracker instead of a VEC.
4760         * cp-abi.c (cp_abi_completer): Adjust to work with a
4761         completion_tracker instead of a VEC.
4762         * d-lang.c (d_language_defn): Adjust.
4763         * disasm.c (disassembler_options_completer): Adjust to work with a
4764         completion_tracker instead of a VEC.
4765         * f-lang.c (f_make_symbol_completion_list): Rename to ...
4766         (f_collect_symbol_completion_matches): ... this.  Adjust to work
4767         with a completion_tracker instead of a VEC.
4768         (f_language_defn): Adjust.
4769         * go-lang.c (go_language_defn): Adjust.
4770         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4771         Adjust to work with a completion_tracker instead of a VEC.
4772         * infrun.c (handle_completer): Likewise.
4773         * interps.c (interpreter_completer): Likewise.
4774         * interps.h (interpreter_completer): Likewise.
4775         * language.c (unknown_language_defn, auto_language_defn)
4776         (local_language_defn): Adjust.
4777         * language.h (language_defn::la_make_symbol_completion_list):
4778         Rename to ...
4779         (language_defn::la_collect_symbol_completion_matches): ... this
4780         and adjust to work with a completion_tracker instead of a VEC.
4781         * m2-lang.c (m2_language_defn): Adjust.
4782         * objc-lang.c (objc_language_defn): Adjust.
4783         * opencl-lang.c (opencl_language_defn): Adjust.
4784         * p-lang.c (pascal_language_defn): Adjust.
4785         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4786         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4787         with a completion_tracker.
4788         * rust-lang.c (rust_language_defn): Adjust.
4789         * symtab.c (free_completion_list, do_free_completion_list)
4790         (return_val, completion_tracker): Delete.
4791         (completion_list_add_name, completion_list_add_symbol)
4792         (completion_list_add_msymbol, completion_list_objc_symbol)
4793         (completion_list_add_fields, add_symtab_completions): Add
4794         completion_tracker parameter and use it.
4795         (default_make_symbol_completion_list_break_on_1): Rename to...
4796         (default_collect_symbol_completion_matches_break_on): ... this.
4797         Add completion_tracker parameter and use it instead of allocating
4798         a completion tracker here.
4799         (default_make_symbol_completion_list_break_on): Delete old
4800         implementation.
4801         (default_make_symbol_completion_list): Delete.
4802         (default_collect_symbol_completion_matches): New.
4803         (make_symbol_completion_list): Delete.
4804         (collect_symbol_completion_matches): New.
4805         (make_symbol_completion_type): Rename to ...
4806         (collect_symbol_completion_matches_type): ... this.  Add
4807         completion_tracker parameter and use it instead of VEC.
4808         (make_file_symbol_completion_list_1): Rename to...
4809         (collect_file_symbol_completion_matches): ... this.  Add
4810         completion_tracker parameter and use it instead of VEC.
4811         (make_file_symbol_completion_list): Delete.
4812         (add_filename_to_list): Use completion_list instead of a VEC.
4813         (add_partial_filename_data::list): Now a completion_list.
4814         (make_source_files_completion_list): Work with a completion_list
4815         instead of a VEC.
4816         * symtab.h: Include "completer.h".
4817         (default_make_symbol_completion_list_break_on)
4818         (default_make_symbol_completion_list, make_symbol_completion_list)
4819         (make_symbol_completion_type, make_file_symbol_completion_list)
4820         (make_source_files_completion_list): Delete.
4821         (default_collect_symbol_completion_matches_break_on)
4822         (default_collect_symbol_completion_matches)
4823         (collect_symbol_completion_matches)
4824         (collect_symbol_completion_matches_type)
4825         (collect_file_symbol_completion_matches)
4826         (make_source_files_completion_list): New.
4827         * top.c (init_main): Don't install a rl_completion_entry_function
4828         hook.  Install a rl_attempted_completion_function hook instead.
4829         * tui/tui-layout.c (layout_completer): Adjust to work with a
4830         completion_tracker.
4831         * tui/tui-regs.c (tui_reggroup_completer):
4832         * tui/tui-win.c (window_name_completer, focus_completer)
4833         (winheight_completer): Adjust to work with a completion_tracker.
4834         * value.c: Include "completer.h".
4835         (complete_internalvar): Adjust to work with a completion_tracker.
4836         * value.h (complete_internalvar): Likewise.
4837
4838 2017-07-17  Pedro Alves  <palves@redhat.com>
4839
4840         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4841         renames.
4842         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4843         comments to completer_ftype's declaration.
4844         <completer_handle_brkchars>: Change type to
4845         completer_handle_brkchars_ftype.
4846         * command.h (completer_ftype): Add describing comment and give
4847         names to parameters.
4848         (completer_ftype_void): Rename to ...
4849         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
4850         (set_cmd_completer_handle_brkchars): Adjust.
4851         * completer.c (filename_completer_handle_brkchars): New function.
4852         (complete_line_internal_normal_command): New function, factored
4853         out from ...
4854         (complete_line_internal): ... here.
4855         (command_completer_handle_brkchars)
4856         (default_completer_handle_brkchars)
4857         (completer_handle_brkchars_func_for_completer): New functions.
4858         * completer.h (set_gdb_completion_word_break_characters): Delete
4859         declaration.
4860         (completer_handle_brkchars_func_for_completer): New declaration.
4861         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4862         completer_handle_brkchars_func_for_completer.
4863
4864 2017-07-17  Pedro Alves  <palves@redhat.com>
4865
4866         * completer.c (symbol_completer): New function, based on
4867         make_symbol_completion_list_fn.
4868         * completer.h (symbol_completer): New declaration.
4869         * guile/scm-cmd.c (cmdscm_completers): Adjust.
4870         * python/py-cmd.c (completers): Adjust.
4871         * symtab.c (make_symbol_completion_list_fn): Delete.
4872         * symtab.h (make_symbol_completion_list_fn): Delete.
4873         * cli/cli-decode.c (add_cmd): Adjust.
4874
4875 2017-07-17  Pedro Alves  <palves@redhat.com>
4876
4877         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4878         * dwarf2read.c: Include "filename-seen-cache.h".
4879         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4880         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4881         * filename-seen-cache.c: New file.
4882         * filename-seen-cache.h: New file.
4883         * symtab.c: Include "filename-seen-cache.h".
4884         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4885         (create_filename_seen_cache, clear_filename_seen_cache)
4886         (delete_filename_seen_cache, filename_seen): Delete, parts moved
4887         to filename-seen-cache.h/filename-seen-cache.c.
4888         (output_source_filename, sources_info)
4889         (maybe_add_partial_symtab_filename)
4890         (make_source_files_completion_list): Adjust to use
4891         filename_seen_cache.
4892
4893 2017-07-17  Pedro Alves  <palves@redhat.com>
4894
4895         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4896         fields.
4897         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4898         dwarf2_debug_sections*)): New.
4899         (dwarf2_per_objfile::dwarf2_per_objfile(const
4900         dwarf2_per_objfile&)): Declare as deleted.
4901         (dwarf2_per_objfile::operator=): Declare as deleted.
4902         (dwarf2_per_objfile::dwarf2_per_objfile)
4903         (dwarf2_per_objfile::~dwarf2_per_objfile)
4904         (dwarf2_per_objfile::free_cached_comp_units): New.
4905         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4906         ctor.  Call dwarf2_per_objfile's ctor manually.
4907         (dwarf2_locate_sections): Deleted/refactored as ...
4908         (dwarf2_per_objfile::locate_sections): ... this new method.
4909         (free_cached_comp_units): Defer to
4910         dwarf2_per_objfile::free_cached_comp_units.
4911         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4912
4913 2017-07-14  Tom Tromey  <tom@tromey.com>
4914
4915         PR rust/21764:
4916         * rust-exp.y (convert_ast_to_expression): Add "want_type"
4917         parameter.
4918         <UNOP_SIZEOF>: Split into separate case.
4919         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
4920
4921 2017-07-14  Tom Tromey  <tom@tromey.com>
4922
4923         PR rust/21763:
4924         * symtab.c (symbol_matches_domain): Add language_rust to special
4925         case.
4926         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4927         treat LOC_TYPEDEF symbols as variables.
4928
4929 2017-07-14  Pedro Alves  <palves@redhat.com>
4930
4931         * symtab.c (make_file_symbol_completion_list_1): Iterate over
4932         symtabs matching all symtabs with SRCFILE as file name instead of
4933         only considering the first hit, with lookup_symtab.
4934
4935 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4936
4937         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4938         operator_name parameters.
4939         (gen_expr): Update function call.
4940
4941 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4942
4943         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4944         parameter.
4945         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4946         Likewise.
4947         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4948         parameter, use agent_expr::gdbarch instead, update function
4949         calls.
4950         (locexpr_tracepoint_var_ref): Likewise.
4951         (loclist_tracepoint_var_ref): Likewise.
4952         * ax-gdb.c (gen_trace_static_fields): Likewise.
4953         (gen_traced_pop): Likewise.
4954         (gen_frame_args_address): Likewise.
4955         (gen_frame_locals_address): Likewise.
4956         (gen_var_ref): Likewise.
4957         (gen_struct_ref_recursive): Likewise.
4958         (gen_static_field): Likewise.
4959         (gen_maybe_namespace_elt): Likewise.
4960         (gen_expr): Likewise.
4961         (gen_trace_for_var): Likewise.
4962         (gen_trace_for_expr): Likewise.
4963         (gen_trace_for_return_address): Likewise.
4964
4965 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4966
4967         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4968         parameter.
4969         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4970
4971 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4972
4973         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4974         from ax, update calls.
4975         (gen_usual_arithmetic): Likewise.
4976         (gen_integral_promotions): Likewise.
4977         (gen_bitfield_ref): Likewise.
4978         (gen_primitive_field): Likewise.
4979         (gen_struct_ref_recursive): Likewise.
4980         (gen_struct_ref): Likewise.
4981         (gen_maybe_namespace_elt): Likewise.
4982         (gen_struct_elt_for_reference): Likewise.
4983         (gen_namespace_elt): Likewise.
4984         (gen_aggregate_elt_ref): Likewise.
4985         (gen_expr): Get gdbarch from ax, update calls.
4986         (gen_expr_binop_rest): Likewise.
4987
4988 2017-07-13  Pedro Alves  <palves@redhat.com>
4989
4990         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4991         as default tdesc.
4992         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4993         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4994         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4995         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
4996         tdep.
4997         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4998         Get final tdesc from the tdep.
4999         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
5000         default tdesc.
5001         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5002         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5003         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
5004         Use it as default tdesc.
5005         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
5006         down to amd_init_abi.  No longer handle fallback tdesc here.
5007         * amd64-tdep.h (tdesc_x32): Declare.
5008         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
5009         parameter.
5010         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
5011         as default tdesc.
5012
5013 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5014
5015         * s390-linux-tdep.c (s390_process_record): Add support for
5016         instructions new in arch12.
5017
5018 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5019
5020         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
5021         PT_GETFSBASE and PT_GETGSBASE.
5022         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
5023         PT_SETGSBASE.
5024
5025 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
5026
5027         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
5028         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
5029         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
5030         those rules.
5031         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
5032         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
5033         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
5034         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
5035         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
5036         * features/i386/amd64.xml: Add 64bit-segments.xml.
5037         * features/i386/amd64-avx-avx512.c: Regenerated.
5038         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
5039         * features/i386/amd64-avx-mpx.c: Regenerated.
5040         * features/i386/amd64-avx.c: Regenerated.
5041         * features/i386/amd64-mpx.c: Regenerated.
5042         * features/i386/amd64.c: Regenerated.
5043         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
5044         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5045         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
5046         * regformats/i386/amd64-avx.dat: Regenerated.
5047         * regformats/i386/amd64-mpx.dat: Regenerated.
5048         * regformats/i386/amd64.dat: Regenerated.
5049
5050 2017-07-10  Yao Qi  <yao.qi@linaro.org>
5051
5052         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5053         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5054
5055 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5056
5057         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
5058         unsetenv.
5059         * gnulib/aclocal.m4: Regenerate.
5060         * gnulib/config.in: Regenerate.
5061         * gnulib/configure: Regenerate.
5062         * gnulib/import/Makefile.am: Regenerate.
5063         * gnulib/import/Makefile.in: Regenerate.
5064         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5065         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5066         * gnulib/import/m4/environ.m4: New file.
5067         * gnulib/import/m4/setenv.m4: New file.
5068         * gnulib/import/setenv.c: New file.
5069         * gnulib/import/unsetenv.c: New file.
5070
5071 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
5072
5073         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
5074         address when op is DW_OP_addr.
5075
5076 2017-07-09  Tom Tromey  <tom@tromey.com>
5077
5078         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
5079         check and apply to outer type.
5080
5081 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5082
5083         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
5084         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
5085         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
5086         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
5087
5088 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5089
5090         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
5091
5092 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5093
5094         * corelow.c (get_core_siginfo): Remove.
5095         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
5096         instead of get_core_siginfo.
5097         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
5098         * gdbarch.h: Re-generate.
5099         * gdbarch.c: Re-generate.
5100         * linux-tdep.c (linux_core_xfer_siginfo): New.
5101         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
5102
5103 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5104
5105         * corelow.c (thread_section_name): Move to ...
5106         * gdbcore.h (thread_section_name): ... here.
5107
5108 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5109
5110         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
5111         (struct siginfo32): New.
5112         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
5113         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
5114         via ptrace(PT_LWPINFO).
5115
5116 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
5117
5118         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
5119         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
5120         (fbsd_get_siginfo_type): New.
5121         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
5122         (_initialize_fbsd_tdep): New.
5123
5124 2017-07-06  David Blaikie  <dblaikie@gmail.com>
5125
5126         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
5127         a singular dwo_unit*) to support multiple CUs in the same way that
5128         multiple TUs are supported.
5129         (create_cus_hash_table): Replace create_dwo_cu with a function for
5130         parsing multiple CUs from a DWO file.
5131         (open_and_init_dwo_file): Use create_cus_hash_table rather than
5132         create_dwo_cu.
5133         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
5134         htab_find, rather than comparing the signature to a singleton CU in
5135         the dwo_file.
5136
5137 2017-07-06  Pedro Alves  <palves@redhat.com>
5138
5139         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
5140
5141 2017-07-04  Pedro Alves  <palves@redhat.com>
5142
5143         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
5144         * gdbtypes.h (TYPE_STATIC): Delete.
5145         (struct fn_field) <is_public, is_abstract, is_static, is_final,
5146         is_synchronized, is_native>: Delete.
5147         <dummy>: Bump.
5148         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
5149         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
5150         (TYPE_FN_FIELD_ABSTRACT): Delete.
5151
5152 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
5153
5154         * buffer.h (buffer_finish): Fix spelling mistakes.
5155
5156 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
5157
5158         * .dir-locals.el: Automatically switch to C-style comments in
5159         versions of Emacs that support the feature.
5160
5161 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5162             Pedro Alves  <palves@redhat.com>
5163
5164         PR cli/21688
5165         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
5166         (process_next_line): New variable 'inline_cmd'.
5167         Adjust 'if' clauses for "python", "compile" and "guile" to use
5168         'command_name_equals' and check for '!inline_cmd'.
5169
5170 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
5171
5172         PR cli/21688
5173         * cli/cli-script.c (command_name_equals_not_inline): New function.
5174         (process_next_line): Adjust 'if' clauses for "python", "compile"
5175         and "guile" to use command_name_equals_not_inline.
5176
5177 2017-06-29  Pedro Alves  <palves@redhat.com>
5178
5179         * completer.c (expression_completer): Call
5180         linespec_location_completer instead of location_completer.
5181
5182 2017-06-29  Pedro Alves  <palves@redhat.com>
5183
5184         * completer.c (expression_completer): Remove code that recomputes
5185         'text' from 'word'.
5186
5187 2017-06-29  Yao Qi  <yao.qi@linaro.org>
5188
5189         * regformats/regdat.sh: Generate code with
5190         "ifndef IN_PROCESS_AGENT".
5191
5192 2017-06-28  Pedro Alves  <palves@redhat.com>
5193
5194         * command.h: Include "common/scoped_restore.h".
5195
5196 2017-06-28  Yao Qi  <yao.qi@linaro.org>
5197
5198         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
5199         instead of obstack_grow.
5200
5201 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
5202
5203         PR gdb/21337
5204         * symfile.c (reread_symbols): Call objfiles_changed just before
5205         read_symbols.
5206
5207 2017-06-27  Pedro Alves  <palves@redhat.com>
5208
5209         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
5210         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
5211         (completion_list_add_symbol, completion_list_add_msymbol):
5212         ... these new functions.
5213         (add_symtab_completions)
5214         (default_make_symbol_completion_list_break_on_1): Adjust.
5215
5216 2017-06-27  Pedro Alves  <palves@redhat.com>
5217
5218         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
5219         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
5220         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
5221         dtor.
5222         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
5223         'storage_obstack' field an auto_obstack.  In-class initialize all
5224         non-bitfield fields.  Make minsyms_read bool.
5225         * symfile.c (read_symbols): Adjust.
5226
5227 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
5228
5229         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
5230         (gdbsim_store_register): Likewise.
5231
5232 2017-06-27  Pedro Alves  <palves@redhat.com>
5233
5234         * c-exp.y (name_obstack): Now an auto_obstack.
5235         (yylex): Use auto_obstack::clear.
5236         (c_parse): Use auto_obstack::clear instead of reinitializing and
5237         freeing the obstack.
5238         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
5239         * d-exp.y (name_obstack): Now an auto_obstack.
5240         (yylex): Use auto_obstack::clear.
5241         (d_parse): Use auto_obstack::clear instead of reinitializing and
5242         freeing the obstack.
5243         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
5244         auto_obstack.
5245         * dwarf2read.c (create_addrmap_from_index)
5246         (dwarf2_build_psymtabs_hard)
5247         (update_enumeration_type_from_children): Likewise.
5248         * gdb_obstack.h (auto_obstack): New type.
5249         * go-exp.y (name_obstack): Now an auto_obstack.
5250         (build_packaged_name): Use auto_obstack::clear.
5251         (go_parse): Use auto_obstack::clear instead of reinitializing and
5252         freeing the obstack.
5253         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
5254         auto_obstack.
5255         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
5256         * rust-exp.y (work_obstack): Now an auto_obstack.
5257         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
5258         reinitializing and freeing the obstack.
5259         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
5260         (host_char_to_target): Use auto_obstack.
5261         * utils.h (make_cleanup_obstack_free): Delete declaration.
5262         * valprint.c (generic_emit_char, generic_printstr): Use
5263         auto_obstack.
5264
5265 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5266
5267         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
5268         thread.
5269         (darwin_init_thread_list): Don't update dummy thread.
5270         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
5271
5272 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5273
5274         * record-full.c (netorder16): Remove.
5275
5276 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5277
5278         * common/diagnostics.h: Define macros for GCC.
5279         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
5280         * common/vec.h: Include diagnostics.h.
5281         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
5282         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
5283         warning.
5284
5285 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
5286
5287         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
5288         New macro.
5289         * ada-lex.l: Ignore deprecated register warnings.
5290
5291 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5292
5293         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
5294         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
5295
5296 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5297
5298         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
5299         its own line.
5300
5301 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
5302
5303         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
5304
5305 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
5306
5307         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
5308         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
5309         (xtensa_register_read_masked): Likewise.
5310
5311 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
5312
5313         * common/environ.c (gdb_environ::unset): Update comment.
5314
5315 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5316
5317         * python/py-unwind.c (pyuw_sniffer): Allocate space for
5318         registers.
5319
5320 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5321
5322         * record-full.c (record_full_exec_insn): Use byte_vector.
5323
5324 2017-06-22  Yao Qi  <yao.qi@linaro.org>
5325
5326         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
5327         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
5328
5329 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
5330
5331         * remote.c (cached_reg): Move from here...
5332         * regcache.h (cached_reg): ...to here.
5333         * python/py-unwind.c (struct reg_info): Remove.
5334         (cached_frame_info): Use cached_reg_t.
5335         (pyuw_prev_register): Likewise.
5336         (pyuw_sniffer): Use cached_reg_t and allocate registers.
5337         (pyuw_dealloc_cache): Free all registers.
5338
5339 2017-06-22  Pedro Alves  <palves@redhat.com>
5340             Simon Marchi  <simon.marchi@ericsson.com>
5341
5342         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
5343         warning.
5344         * common/diagnostics.h: New file.
5345
5346 2017-06-22  Pedro Alves  <palves@redhat.com>
5347
5348         * common/agent.h: Add include guards.
5349
5350 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
5351
5352         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
5353         talk about addressable units instead of bytes.
5354
5355 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5356
5357         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
5358         of '::const_iterator'.
5359
5360 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
5361
5362         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5363         'unittests/environ-selftests.c'.
5364         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
5365         * charset.c (find_charset_names): Declare object 'iconv_env'.
5366         Update code to use 'iconv_env' object.  Remove call to
5367         'free_environ'.
5368         * common/environ.c: Include <utility>.
5369         (make_environ): Delete function.
5370         (free_environ): Delete function.
5371         (gdb_environ::clear): New function.
5372         (gdb_environ::operator=): New function.
5373         (gdb_environ::get): Likewise.
5374         (environ_vector): Delete function.
5375         (set_in_environ): Delete function.
5376         (gdb_environ::set): New function.
5377         (unset_in_environ): Delete function.
5378         (gdb_environ::unset): New function.
5379         (gdb_environ::envp): Likewise.
5380         * common/environ.h: Include <vector>.
5381         (struct gdb_environ): Delete; transform into...
5382         (class gdb_environ): ... this class.
5383         (free_environ): Delete prototype.
5384         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
5385         environ_vector): Likewise.
5386         * infcmd.c (run_command_1): Update code to call
5387         'envp' from 'gdb_environ' class.
5388         (environment_info): Update code to call methods from 'gdb_environ'
5389         class.
5390         (unset_environment_command): Likewise.
5391         (path_info): Likewise.
5392         (path_command): Likewise.
5393         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
5394         (inferior::inferior): Initialize 'environment' using the host's
5395         information.
5396         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
5397         Include "environ.h".
5398         (class inferior) <environment>: Change type from 'struct
5399         gdb_environ' to 'gdb_environ'.
5400         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
5401         methods from 'gdb_environ' class.
5402         * solib.c (solib_find_1): Likewise
5403         * unittests/environ-selftests.c: New file.
5404
5405 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5406
5407         * features/i386/i386-linux.xml: Exchange the order of including
5408         32bit-linux.xml and 32bit-sse.xml.
5409         * features/i386/i386-linux.c: Regenerated.
5410
5411 2017-06-20  Yao Qi  <yao.qi@linaro.org>
5412
5413         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
5414         Delete copy ctor and assignment operator.
5415         (tdesc_type): Likewise.
5416         (tdesc_feature): Likewise.
5417         (tdesc_free_reg): Remove.
5418         (tdesc_create_reg): Use new.
5419         (tdesc_free_type): Remove.
5420         (tdesc_create_vector): Use new.
5421         (tdesc_create_union): Likewise.
5422         (tdesc_create_flags): Likewise.
5423         (tdesc_create_enum): Likewise.
5424         (tdesc_free_feature): Delete.
5425         (free_target_description): Use delete.
5426
5427 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
5428
5429         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
5430         registers.
5431
5432 2017-06-19  Pedro Alves  <palves@redhat.com>
5433
5434         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
5435         after gdb::unlinker.
5436
5437 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
5438
5439         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
5440         gdb_environ to access an environment variable.
5441
5442 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
5443
5444         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
5445         gdb_byte*.
5446
5447 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5448
5449         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
5450
5451 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5452
5453         * configure: Re-generate.
5454         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
5455
5456 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5457
5458         * configure: Re-generate.
5459         * warning.m4: Pass -Werror to compiler when checking for
5460         supported warning flags.
5461
5462 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
5463
5464         * Makefile.in (COMPILE.pre): Add "-x c++".
5465
5466 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
5467             Pedro Alves  <palves@redhat.com>
5468             Yao Qi  <yao.qi@linaro.org>
5469
5470         * defs.h (RequireLongest): New.
5471         (extract_integer): Declare function template.
5472         (extract_signed_integer): Remove the declaration, but define it
5473         static inline.
5474         (extract_unsigned_integer): Likewise.
5475         (store_integer): Declare function template.
5476         (store_signed_integer): Remove the declaration, but define it
5477         static inline.
5478         (store_unsigned_integer): Likewise.
5479         * findvar.c (extract_integer): New function template.
5480         (extract_signed_integer): Remove.
5481         (extract_unsigned_integer): Remove.
5482         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
5483         instantiations.
5484         (store_integer): New function template.
5485         (store_signed_integer): Remove.
5486         (store_unsigned_integer): Remove.
5487         (store_integer): Explicit instantiations.
5488         * regcache.c (regcache_raw_read_signed): Update.
5489         (regcache::raw_read): New function.
5490         (regcache::raw_read_signed): Remove.
5491         (regcache::raw_read_unsigned): Remove.
5492         (regcache_raw_read_unsigned): Update.
5493         (regcache_raw_write_unsigned): Update.
5494         (regcache::raw_write_signed): Remove.
5495         (regcache::raw_write): New function.
5496         (regcache_cooked_read_signed): Update.
5497         (regcache::raw_write_unsigned): Remove.
5498         (regcache::cooked_read_signed): Remove.
5499         (regcache_cooked_read_unsigned): Update.
5500         (regcache::cooked_read_unsigned): Remove.
5501         (regcache_cooked_write_signed): Update.
5502         (regcache_cooked_write_unsigned): Update.
5503         * regcache.h (regcache) <raw_read_signed>: Remove.
5504         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
5505         <raw_read, raw_write>: New.
5506         <cooked_read_signed, cooked_write_signed>: Remove.
5507         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
5508         <cooked_read, cooked_write>: New.
5509         * sh64-tdep.c (sh64_pseudo_register_read): Update.
5510         (sh64_pseudo_register_write): Update.
5511
5512 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
5513
5514         * arc-tdep.c (arc_disassembler_options): New variable.
5515         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
5516         of default_print_insn.
5517         (arc_delayed_print_insn): Set info->section when needed,
5518         use default_print_insn to retrieve a disassembler.
5519
5520 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5521
5522         PR gdb/21574
5523         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
5524         to mention $SHELL and startup-with-shell.
5525
5526 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
5527
5528         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
5529
5530 2017-06-14  Yao Qi  <yao.qi@linaro.org>
5531
5532         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
5533         default_print_insn instead of print_insn_aarch64.
5534         * arm-tdep.c (gdb_print_insn_arm): Call
5535         default_print_insn instead of print_insn_big_arm
5536         and print_insn_little_arm.
5537         * i386-tdep.c (i386_print_insn): Call default_print_insn
5538         instead of print_insn_i386.
5539         * ia64-tdep.c (ia64_print_insn): Call
5540         default_print_insn instead of print_insn_ia64.
5541         * mips-tdep.c (gdb_print_insn_mips): Call
5542         default_print_insn instead of print_insn_big_mips
5543         and print_insn_little_mips.
5544         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
5545         instead of print_insn_spu.
5546
5547 2017-06-14  Pedro Alves  <palves@redhat.com>
5548
5549         * ada-lang.c: Include "common/byte-vector.h".
5550         (ada_value_primitive_packed_val): Use gdb::byte_vector.
5551         * charset.c (wchar_iterator::iterate): Resize the vector instead
5552         of reserving it.
5553         * common/byte-vector.h: Include "common/def-vector.h".
5554         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
5555         * cli/cli-dump.c: Include "common/byte-vector.h".
5556         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
5557         * common/byte-vector.h: New file.
5558         * common/def-vector.h: New file.
5559         * common/default-init-alloc.h: New file.
5560         * dwarf2loc.c: Include "common/byte-vector.h".
5561         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
5562         instead of reserving it.
5563         * dwarf2read.c: Include "common/byte-vector.h".
5564         (data_buf::m_vec): Now a gdb::byte_vector.
5565         * gdb_regex.c: Include "common/def-vector.h".
5566         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
5567         * mi/mi-main.c: Include "common/byte-vector.h".
5568         (mi_cmd_data_read_memory): Use gdb::byte_vector.
5569         * printcmd.c: Include "common/byte-vector.h".
5570         (print_scalar_formatted): Use gdb::byte_vector.
5571         * valprint.c: Include "common/byte-vector.h".
5572         (maybe_negate_by_bytes, print_decimal_chars): Use
5573         gdb::byte_vector.
5574
5575 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5576
5577         * darwin-nat.c: Include "nat/fork-inferior.h".
5578
5579 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5580
5581         * configure.nat: Factor out Darwin bits that are not
5582         architecture-specific.  Add fork-inferior.o.
5583
5584 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5585
5586         * configure.nat: Factor out AIX bits that are not
5587         architecture-specific.  Add fork-inferior.o.
5588
5589 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5590
5591         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
5592         (read_pieced_value, write_pieced_value): ...here.  Reduce to
5593         wrappers that just call rw_pieced_value.
5594
5595 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5596
5597         * dwarf2loc.c (write_pieced_value): When writing the data for a
5598         memory piece, use write_memory_with_notification instead of
5599         write_memory.
5600
5601 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5602
5603         * valops.c (read_value_memory): Change embedded_offset to
5604         represent a bit offset instead of a byte offset.
5605         * value.h (read_value_memory): Adjust comment.
5606
5607 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5608
5609         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
5610         dest_offset_bits and source_offset_bits.
5611         (write_pieced_value): Likewise.
5612
5613 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5614
5615         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
5616         given by DW_OP_bit_piece.
5617         (write_pieced_value): Likewise.
5618
5619 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5620
5621         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
5622         some other preparations to the places where sufficient information
5623         is available.
5624         (write_pieced_value): Likewise.
5625
5626 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5627
5628         * dwarf2loc.c (bits_to_bytes): New function.
5629         (read_pieced_value): Fix offset calculations for register pieces
5630         on big-endian targets.
5631         (write_pieced_value): Likewise.
5632
5633 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5634
5635         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
5636         (write_pieced_value): Likewise.
5637
5638 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5639
5640         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
5641         transfer the source value's least significant bits, instead of its
5642         lowest-addressed ones.  Rename type_len to max_offset.
5643         (read_pieced_value): Mirror above changes to write_pieced_value as
5644         applicable.
5645
5646 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5647
5648         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
5649         truncate full bytes from dest_offset_bits before using it as an
5650         offset into the buffer.
5651
5652 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5653
5654         * dwarf2loc.c (write_pieced_value): Include transfer size in
5655         byte-wise check.
5656
5657 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5658
5659         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
5660         calculation of this_size.
5661
5662 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5663
5664         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
5665         when targeting a bit-field.
5666         (write_pieced_value): Likewise.
5667
5668 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5669
5670         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5671         (allocate_piece_closure): Drop addr_size parameter.
5672         (dwarf2_evaluate_loc_desc_full): Adjust call to
5673         allocate_piece_closure.
5674
5675 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5676
5677         PR gdb/21226
5678         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5679         the LSB end, independent of endianness.
5680
5681 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5682
5683         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5684         size capping.
5685
5686 2017-06-13  Yao Qi  <yao.qi@linaro.org>
5687
5688         * mips-linux-nat.c: Move include features/mips*-linux.c to
5689         mips-linux-tdep.c.
5690         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5691         to mips-linux-tdep.c.
5692         * mips-linux-tdep.c: Include features/mips*-linux.c
5693         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5694         functions.
5695         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5696         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5697         (tdesc_mips64_dsp_linux): Declare.
5698
5699 2017-06-12  Tom Tromey  <tom@tromey.com>
5700
5701         * valprint.h (val_print_type_code_int): Remove.
5702         * valprint.c (generic_val_print_int): Always call
5703         val_print_scalar_formatted.
5704         (val_print_type_code_int): Remove.
5705         * printcmd.c (print_scalar_formatted): Handle options->format==0.
5706         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5707         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5708         * ada-valprint.c (ada_val_print_num): Use
5709         val_print_scalar_formatted.
5710
5711 2017-06-12  Tom Tromey  <tom@tromey.com>
5712
5713         * printcmd.c (print_scalar_formatted): Unify the two switches.
5714         Don't convert scalars to LONGEST.
5715
5716 2017-06-12  Tom Tromey  <tom@tromey.com>
5717
5718         PR exp/16225:
5719         * valprint.h (print_decimal_chars): Update.
5720         * valprint.c (maybe_negate_by_bytes): New function.
5721         (print_decimal_chars): Add "is_signed" argument.
5722         * printcmd.c (print_scalar_formatted): Update.
5723
5724 2017-06-12  Tom Tromey  <tom@tromey.com>
5725
5726         PR exp/16225:
5727         * valprint.h (print_binary_chars, print_hex_chars): Update.
5728         * valprint.c (val_print_type_code_int): Update.
5729         (print_binary_chars): Add "zero_pad" argument.
5730         (emit_octal_digit): New function.
5731         (print_octal_chars): Don't zero-pad.
5732         (print_decimal_chars): Likewise.
5733         (print_hex_chars): Add "zero_pad" argument.
5734         * sh64-tdep.c (sh64_do_fp_register): Update.
5735         * regcache.c (regcache::dump): Update.
5736         * printcmd.c (print_scalar_formatted): Update.
5737         * infcmd.c (default_print_one_register_info): Update.
5738
5739 2017-06-12  Pedro Alves  <palves@redhat.com>
5740             Alan Hayward  <alan.hayward@arm.com>
5741
5742         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5743         (mips_eabi_push_dummy_call): Rename local 'regsize' to
5744         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
5745         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5746         Assert that abi_regsize bytes fit in 'ref_valbuf'.
5747
5748 2017-06-12  Pedro Alves  <palves@redhat.com>
5749
5750         * dwarf2read.c (mapped_symtab::data): Now a vector of
5751         symtab_index_entry instead of vector of
5752         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
5753         whether an element's name is NULL instead of checking whether the
5754         element itself is NULL.
5755         (find_slot): Change return type.  Adjust.
5756         (hash_expand, , add_index_entry, uniquify_cu_indices)
5757         (write_hash_table): Adjust.
5758
5759 2017-06-12  Pedro Alves  <palves@redhat.com>
5760
5761         * dwarf2read.c (recursively_count_psymbols): New function.
5762         (write_psymtabs_to_index): Call it to compute number of psyms and
5763         pass estimate size of psyms_seen to unordered_set's ctor.
5764
5765 2017-06-12  Pedro Alves  <palves@redhat.com>
5766
5767         * dwarf2read.c (write_hash_table): Check if key already exists
5768         before emplacing.
5769
5770 2017-06-12  Pedro Alves  <palves@redhat.com>
5771
5772         * dwarf2read.c (data_buf::append_space): Rename to...
5773         (data_buf::grow): ... this, and make private.  Adjust all callers.
5774         (data_buf::append_uint): New method.
5775         (add_address_entry, write_one_signatured_type)
5776         (write_psymtabs_to_index): Use it.
5777
5778 2017-06-12  Pedro Alves  <palves@redhat.com>
5779
5780         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5781         (file_write (FILE *, const std::vector<Elem>&)): Delete.
5782         (data_buf::file_write): Call ::fwrite directly.
5783
5784 2017-06-12  Pedro Alves  <palves@redhat.com>
5785
5786         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5787         std::vector::erase.
5788
5789 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
5790
5791         Code cleanup: C++ify .gdb_index producer.
5792         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5793         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5794         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5795         (create_strtab, add_string): Remove.
5796         (file_write, data_buf): New.
5797         (struct symtab_index_entry): Use std::vector for cu_indices.
5798         (struct mapped_symtab): Use std::vector for data.
5799         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5800         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5801         Remove.
5802         (find_slot): Change return type.  Update it to the new data structures.
5803         (hash_expand, add_index_entry): Update it to the new data structures.
5804         (offset_type_compare): Remove.
5805         (uniquify_cu_indices): Update it to the new data structures.
5806         (c_str_view, c_str_view_hasher, vector_hasher): New.
5807         (add_indices_to_cpool): Remove.
5808         (write_hash_table): Update it to the new data structures.
5809         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5810         (eq_psymtab_cu_index): Remove.
5811         (psym_index_map): New typedef.
5812         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5813         reference and std::unordered_map for cu_index_htab.
5814         (add_address_entry, add_address_entry_worker, write_address_map)
5815         (write_psymbols): Update it to the new data structures.
5816         (write_obstack): Remove.
5817         (struct signatured_type_index_data): Change types_list to a data_buf
5818         reference and psyms_seen to a std::unordered_set reference.
5819         (write_one_signatured_type, recursively_write_psymbols)
5820         (write_psymtabs_to_index): Update it to the new data structures.
5821
5822 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5823
5824         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5825         separate-debug-file commands.
5826         * symfile.h (separate_debug_file_debug): New global.
5827         * symfile.c (separate_debug_file_debug): New global.
5828         (separate_debug_file_exists, find_separate_debug_file): Add
5829         debug output.
5830         (_initialize_symfile): Add "set debug separate-debug-file"
5831         command.
5832         * build-id.c (build_id_to_debug_bfd,
5833         find_separate_debug_file_by_buildid): Add debug output.
5834
5835 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5836
5837         * gdbarch.sh (displaced_step_free_closure): Remove.
5838         * gdbarch.h, gdbarch.c: Re-generate.
5839         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5840         displaced_step_free_closure.
5841         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5842         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5843         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5844         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5845         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5846         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5847         * arch-utils.h (simple_displaced_step_free_closure): Remove.
5848         * arch-utils.c (simple_displaced_step_free_closure): Remove.
5849         * infrun.c (displaced_step_clear): Call xfree instead of
5850         gdbarch_displaced_step_free_closure.
5851
5852 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
5853
5854         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5855         NULL".
5856
5857 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
5858
5859         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5860         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5861         (mn10300_push_dummy_call): Likewise.
5862
5863 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5864
5865         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5866
5867 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5868
5869         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5870
5871 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5872
5873         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5874         able to start inferiors using a shell.
5875         (New remote packets): Announce new packet "QStartupWithShell".
5876         * remote.c: Add PACKET_QStartupWithShell.
5877         (extended_remote_create_inferior): Handle new
5878         PACKET_QStartupWithShell.
5879         (remote_protocol_features) <QStartupWithShell>: New entry for
5880         PACKET_QStartupWithShell.
5881         (_initialize_remote): Call "add_packet_config_cmd" for
5882         QStartupShell.
5883
5884 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5885             Pedro Alves  <palves@redhat.com>
5886
5887         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5888         and "nat/fork-inferior.h".
5889         * common/common-inferior.h: New file, with contents from
5890         "gdb/inferior.h".
5891         * commom/common-utils.c: Include "common-utils.h".
5892         (stringify_argv): New function.
5893         * common/common-utils.h (stringify_argv): New prototype.
5894         * configure.nat: Add "fork-inferior.o" as a dependency for
5895         "*linux*", "fbsd*" and "nbsd*" hosts.
5896         * corefile.c (get_exec_file): Update comment.
5897         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5898         instead of "startup_inferior".
5899         (darwin_create_inferior): Call "add_thread_silent" after
5900         "fork_inferior".
5901         * fork-child.c: Cleanup unnecessary includes.
5902         (SHELL_FILE): Move to "common/common-fork-child.c".
5903         (environ): Likewise.
5904         (exec_wrapper): Initialize.
5905         (get_exec_wrapper): New function.
5906         (breakup_args): Move to "common/common-fork-child.c"; rename to
5907         "breakup_args_for_exec".
5908         (escape_bang_in_quoted_argument): Move to
5909         "common/common-fork-child.c".
5910         (saved_ui): New variable.
5911         (prefork_hook): New function.
5912         (postfork_hook): Likewise.
5913         (postfork_child_hook): Likewise.
5914         (gdb_startup_inferior): Likewise.
5915         (fork_inferior): Move to "common/common-fork-child.c".  Update
5916         function to support gdbserver.
5917         (startup_inferior): Likewise.
5918         * gdbcore.h (get_exec_file): Remove declaration.
5919         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5920         instead of "startup_inferior".  Call "add_thread_silent" after
5921         "fork_inferior".
5922         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5923         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5924         instead of "startup_inferior".  Call "add_thread_silent" after
5925         "fork_inferior".
5926         * inferior.h: Include "common-inferior.h".
5927         (trace_start_error): Move to "common/common-utils.h".
5928         (trace_start_error_with_name): Likewise.
5929         (fork_inferior): Move prototype to "nat/fork-inferior.h".
5930         (startup_inferior): Likewise.
5931         (gdb_startup_inferior): New prototype.
5932         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5933         * nat/fork-inferior.h: New file.
5934         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5935         instead of "startup_inferior".  Call "add_thread_silent" after
5936         "fork_inferior".
5937         * target.h (target_terminal_init): Move prototype to
5938         "target/target.h".
5939         (target_terminal_inferior): Likewise.
5940         (target_terminal_ours): Likewise.
5941         * target/target.h (target_terminal_init): New prototype, moved
5942         from "target.h".
5943         (target_terminal_inferior): Likewise.
5944         (target_terminal_ours): Likewise.
5945         * utils.c (gdb_flush_out_err): New function.
5946
5947 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5948
5949         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5950         * common/common-gdbthread.h: New file, with parts from
5951         "gdb/gdbthread.h".
5952         * gdbthread.h: Include "common-gdbthread.h".
5953         (switch_to_thread): Moved to "common/common-gdbthread.h".
5954
5955 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5956
5957         * Makefile.in (SFILES): Add "common/job-control.c".
5958         (HFILES_NO_SRCDIR): Add "common/job-control.h".
5959         (COMMON_OBS): Add "job-control.o".
5960         * common/job-control.c: New file, with contents from
5961         "gdb/inflow.c".
5962         * common/job-control.h: New file, with contents from "terminal.h".
5963         * fork-child.c: Include "job-control.h".
5964         * inflow.c: Include "job-control.h".
5965         (gdb_setpgid): Move to "common/common-inflow.c".
5966         (_initialize_inflow): Move setting of "job_control" to
5967         "handle_job_control".
5968         * terminal.h (job_control): Moved to "common/common-terminal.h".
5969         (gdb_setpgid): Likewise.
5970         * top.c: Include "job_control.h".
5971         * utils.c: Likewise.
5972         (job_control): Moved to "job-control.c".
5973
5974 2017-06-07  Pedro Alves  <palves@redhat.com>
5975
5976         * Makefile.in (SFILES): Add gdb_regex.c.
5977         (COMMON_OBS): Add gdb_regex.o.
5978         * ada-lang.c (ada_add_standard_exceptions)
5979         (ada_add_exceptions_from_frame, name_matches_regex)
5980         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5981         parameter type to compiled_regex.  Adjust.
5982         (ada_exceptions_list): Use compiled_regex.
5983         * break-catch-throw.c (exception_catchpoint::pattern): Now a
5984         std::unique_ptr<compiled_regex>.
5985         (exception_catchpoint::~exception_catchpoint): Remove regfree
5986         call.
5987         (check_status_exception_catchpoint): Adjust to use compiled_regex.
5988         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5989         * breakpoint.c (solib_catchpoint::compiled): Now a
5990         std::unique_ptr<compiled_regex>.
5991         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5992         (check_status_catch_solib): Adjust to use compiled_regex.
5993         (add_solib_catchpoint): Adjust to use compiled_regex.
5994         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5995         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5996         compiled_regex reference.  Adjust to use it.
5997         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5998         declaration.  Include "gdb_regex.h".
5999         (apropos_cmd): Change regex parameter to compiled_regex reference.
6000         * gdb_regex.c: New file.
6001         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
6002         declarations.
6003         (class compiled_regex): New.
6004         * linux-tdep.c: Include "common/gdb_optional.h".
6005         (struct mapping_regexes): New, factored out from
6006         mapping_is_anonymous_p, and adjusted to use compiled_regex.
6007         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
6008         gdb::optional and remove cleanups.  Adjust to compiled_regex.
6009         * probe.c: Include "common/gdb_optional.h".
6010         (collect_probes): Use compiled_regex and gdb::optional and remove
6011         cleanups.
6012         * skip.c: Include "common/gdb_optional.h".
6013         (skiplist_entry::compiled_function_regexp): Now a
6014         gdb::optional<compiled_regex>.
6015         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
6016         (free_skiplist_entry): Remove regfree call.
6017         (compile_skip_regexp, skip_rfunction_p): Adjust to use
6018         compiled_regex and gdb::optional.
6019         * symtab.c: Include "common/gdb_optional.h".
6020         (search_symbols): Use compiled_regex and gdb::optional.
6021         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
6022         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
6023         to gdb_regex.c.
6024
6025 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6026
6027         * regcache.c (regcache::save): Avoid buffer use.
6028         (regcache::dump): Likewise.
6029
6030 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6031
6032         * sh-tdep.c (sh_pseudo_register_read): Remove
6033         MAX_REGISTER_SIZE.
6034         (sh_pseudo_register_write): Likewise.
6035         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
6036         (sh64_pseudo_register_write): Likewise
6037
6038 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
6039
6040         * aarch64-tdep.c (aarch64_store_return_value): Use
6041         V_REGISTER_SIZE.
6042         (aarch64_pseudo_read_value): Likewise.
6043         (aarch64_pseudo_write): Likewise.
6044
6045 2017-06-06  Yao Qi  <yao.qi@linaro.org>
6046
6047         * regformats/regdef.h (set_register_cache): Remove the
6048         declaration.
6049
6050 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
6051
6052         * frame.c (frame_unwind_register_signed): Use
6053         frame_unwind_register_value.
6054
6055 2017-06-06  Pedro Alves  <palves@redhat.com>
6056
6057         PR breakpoints/21553
6058         * breakpoint.c (create_breakpoints_sal_default)
6059         (init_breakpoint_sal, create_breakpoint_sal): Use
6060         gdb::unique_xmalloc_ptr for string parameters.
6061         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6062         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
6063         (base_breakpoint_create_breakpoints_sal)
6064         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
6065         (strace_marker_create_breakpoints_sal)
6066         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
6067         string parameters.
6068         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
6069         gdb::unique_xmalloc_ptr for string parameters.
6070         (create_breakpoint): Constify 'extra_string' and 'cond_string'
6071         parameters.
6072
6073 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6074
6075         * alpha-tdep.c (alpha_register_to_value): Use
6076         get_frame_register_value.
6077         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
6078
6079 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
6080
6081         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
6082         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
6083         (ia64_value_to_register): Likewise.
6084         (ia64_extract_return_value): Likewise.
6085         (ia64_store_return_value): Likewise.
6086         (ia64_push_dummy_call): Likewise.
6087
6088 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
6089
6090         GDB 8.0 released.
6091
6092 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
6093
6094         * x86-linux-nat.c (struct arch_lwp_info): Remove.
6095
6096 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
6097
6098         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
6099         parameter.
6100         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
6101
6102 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6103
6104         * event-loop.c (poll_timers): Unallocate timer using delete
6105         instead of xfree.
6106
6107 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6108
6109         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
6110         (struct breakpoint) <~breakpoint>: New.
6111         (struct watchpoint): Inherit from breakpoint.
6112         <~watchpoint>: New.
6113         <base>: Remove.
6114         (struct tracepoint): Inherit from breakpoint.
6115         <base>: Remove.
6116         * breakpoint.c (longjmp_breakpoint_ops): Remove.
6117         (struct longjmp_breakpoint): Inherit from breakpoint.
6118         <~longjmp_breakpoint>: New.
6119         <base>: Remove.
6120         (new_breakpoint_from_type): Remove casts.
6121         (watchpoint_in_thread_scope): Remove reference to base field.
6122         (watchpoint_del_at_next_stop): Likewise.
6123         (update_watchpoint): Likewise.
6124         (watchpoint_check): Likewise.
6125         (bpstat_check_watchpoint): Likewise.
6126         (set_longjmp_breakpoint): Likewise.
6127         (struct fork_catchpoint): Inherit from breakpoint.
6128         <base>: Remove.
6129         (struct solib_catchpoint): Inherit from breakpoint.
6130         <~solib_catchpoint>: New.
6131         <base>: Remove.
6132         (dtor_catch_solib): Change to ...
6133         (solib_catchpoint::~solib_catchpoint): ... this.
6134         (breakpoint_hit_catch_solib): Remove reference to base field.
6135         (add_solib_catchpoint): Likewise.
6136         (create_fork_vfork_event_catchpoint): Likewise.
6137         (struct exec_catchpoint): Inherit from breakpoint.
6138         <~exec_catchpoint>: New.
6139         <base>: Remove.
6140         (dtor_catch_exec): Change to ...
6141         (exec_catchpoint::~exec_catchpoint): ... this.
6142         (dtor_watchpoint): Change to ...
6143         (watchpoint::~watchpoint): ... this.
6144         (watch_command_1): Remove reference to base field.
6145         (catch_exec_command_1): Likewise.
6146         (base_breakpoint_dtor): Change to ...
6147         (breakpoint::~breakpoint): ... this.
6148         (base_breakpoint_ops): Remove dtor field value.
6149         (longjmp_bkpt_dtor): Change to ...
6150         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
6151         (strace_marker_create_breakpoints_sal): Remove reference to base
6152         field.
6153         (delete_breakpoint): Don't manually call breakpoint destructor.
6154         (create_tracepoint_from_upload): Remove reference to base field.
6155         (trace_pass_set_count): Likewise.
6156         (initialize_breakpoint_ops): Don't initialize
6157         momentary_breakpoint_ops, don't set dtors.
6158         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
6159         <~ada_catchpoint>: New.
6160         <base>: Remove.
6161         (create_excep_cond_exprs): Remove reference to base field.
6162         (dtor_exception): Change to ...
6163         (ada_catchpoint::~ada_catchpoint): ... this.
6164         (dtor_catch_exception): Remove.
6165         (dtor_catch_exception_unhandled): Remove.
6166         (dtor_catch_assert): Remove.
6167         (create_ada_exception_catchpoint): Remove reference to base
6168         field.
6169         (initialize_ada_catchpoint_ops): Don't set dtors.
6170         * break-catch-sig.c (struct signal_catchpoint): Inherit from
6171         breakpoint.
6172         <~signal_catchpoint>: New.
6173         <base>: Remove.
6174         (signal_catchpoint_dtor): Change to ...
6175         (signal_catchpoint::~signal_catchpoint): ... this.
6176         (create_signal_catchpoint): Remove reference to base field.
6177         (initialize_signal_catchpoint_ops): Don't set dtor.
6178         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
6179         from breakpoint.
6180         <~syscall_catchpoint>: New.
6181         <base>: Remove.
6182         (dtor_catch_syscall): Change to ...
6183         (syscall_catchpoint::~syscall_catchpoint): ... this.
6184         (create_syscall_event_catchpoint): Remove reference to base
6185         field.
6186         (initialize_syscall_catchpoint_ops): Don't set dtor.
6187         * break-catch-throw.c (struct exception_catchpoint): Inherit
6188         from breakpoint.
6189         <~exception_catchpoint>: New.
6190         <base>: Remove.
6191         (dtor_exception_catchpoint): Change to ...
6192         (exception_catchpoint::~exception_catchpoint): ... this.
6193         (handle_gnu_v3_exceptions): Remove reference to base field.
6194         (initialize_throw_catchpoint_ops): Don't set dtor.
6195         * ctf.c (ctf_get_traceframe_address): Remove reference to base
6196         field.
6197         * remote.c (remote_get_tracepoint_status): Likewise.
6198         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
6199         * tracefile.c (tracefile_fetch_registers): Likewise.
6200         * tracepoint.c (actions_command): Likewise.
6201         (validate_actionline): Likewise.
6202         (tfind_1): Likewise.
6203         (get_traceframe_location): Likewise.
6204         (find_matching_tracepoint_location): Likewise.
6205         (parse_tracepoint_status): Likewise.
6206         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
6207
6208 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6209
6210         * breakpoint.c (struct longjmp_breakpoint): New struct.
6211         (is_tracepoint_type): Change return type to bool.
6212         (is_longjmp_type): New function.
6213         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
6214         (set_raw_breakpoint_without_location): Use
6215         new_breakpoint_from_type.
6216         (set_raw_breakpoint): Likewise.
6217
6218 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
6219
6220         * breakpoint.c (new_breakpoint_from_type): New function.
6221         (create_breakpoint_sal): Use new_breakpoint_from_type and
6222         unique_ptr.
6223         (create_breakpoint): Likewise.
6224
6225 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
6226
6227         * memattr.c (mem_info_command): Rename to ...
6228         (info_mem_command): ... this.
6229         (mem_enable_command): Rename to ...
6230         (enable_mem_command): ... this.
6231         (mem_disable_command): Rename to ...
6232         (disable_mem_command): ... this.
6233         (mem_delete_command): Rename to ...
6234         (delete_mem_command): ... this.
6235         (_initialize_mem): Adjust function names.
6236
6237 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6238
6239         * btrace.c (handle_pt_insn_events): New.
6240         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
6241         STATUS.  Split into this and ...
6242         (handle_pt_insn_event_flags): ... this.
6243
6244 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
6245
6246         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
6247         and struct pt_insn.resynced.
6248         * configure: Regenerated.
6249         * config.in: Regenerated.
6250
6251 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6252
6253         * btrace.c (ftrace_find_call_by_number): New function.
6254         (ftrace_new_function): Store objects, not pointers.
6255         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
6256         ftrace_new_gap, ftrace_update_function,
6257         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
6258         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
6259         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
6260         btrace_ends_with_single_insn, btrace_call_get): Account for
6261         btrace_thread_info::functions now storing objects.
6262         * btrace.h (struct btrace_thread_info): Add constructor.
6263         (struct btrace_thread_info) <functions>: Make std::vector.
6264         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
6265         Initialize with default values.
6266         * record-btrace.c (record_btrace_frame_sniffer): Account for
6267         btrace_thread_info::functions now storing objects.
6268
6269 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6270
6271         * btrace.c: Remove typedef bfun_s.
6272         (ftrace_new_gap): Directly add gaps to the list of gaps.
6273         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
6274         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
6275         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
6276         instead of gdb VEC.
6277
6278 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6279
6280         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
6281         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
6282         with btrace_thread_info::next_segment and
6283         btrace_thread_info::prev_segment.
6284         * btrace.h: Remove struct btrace_func_link.
6285         (struct btrace_function): Replace pair of function segment pointers
6286         with pair of indices.
6287         * python/py-record-btrace.c (btpy_call_prev_sibling,
6288         btpy_call_next_sibling): Replace references to
6289         btrace_thread_info::segment with btrace_thread_info::next_segment and
6290         btrace_thread_info::prev_segment.
6291         * record-btrace.c (record_btrace_frame_this_id): Use
6292         btrace_find_call_by_number.
6293
6294 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6295
6296         * btrace.c (ftrace_new_function, ftrace_fixup_level,
6297         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
6298         btrace_insn_next, btrace_insn_prev): Remove references to
6299         btrace_thread_info::flow.
6300         * btrace.h (struct btrace_function): Remove FLOW.
6301
6302 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6303
6304         * btrace.c (ftrace_find_call_by_number): New function.
6305         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
6306         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
6307         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
6308         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
6309         index.
6310         * btrace.h (struct btrace_function): Turn UP into an index.
6311         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
6312         as an index.
6313         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
6314         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
6315         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
6316
6317 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6318
6319         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6320         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6321         ftrace_update_function, ftrace_compute_global_level_offset,
6322         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
6323         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
6324         btrace_insn_end, btrace_is_empty): Remove references to
6325         btrace_thread_info::begin and btrace_thread_info::end.
6326         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
6327         (struct btrace_thread_info) <functions>: Adjust comment.
6328         * record-btrace.c (record_btrace_start_replaying): Remove reference to
6329         btrace_thread_info::begin.
6330
6331 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6332
6333         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
6334         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
6335         ftrace_update_function): Remove arguments that implicitly were always
6336         BTINFO->END.
6337         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
6338         Don't pass BTINFO->END.
6339
6340 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6341
6342         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
6343         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
6344         btrace_find_insn_by_number): Replace function segment pointer with
6345         index.
6346         (btrace_insn_cmp): Simplify.
6347         * btrace.h: (struct btrace_insn_iterator) Rename index to
6348         insn_index.  Replace function segment pointer with index into function
6349         segment vector.
6350         * record-btrace.c (record_btrace_call_history): Replace function
6351         segment pointer use with index.
6352         (record_btrace_frame_sniffer): Retrieve function call segment through
6353         vector.
6354         (record_btrace_set_replay): Remove defunc't safety check.
6355
6356 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6357
6358         * btrace.c (btrace_ends_with_single_insn): New function.
6359         (btrace_call_get, btrace_call_number, btrace_call_begin,
6360         btrace_call_end, btrace_call_next, btrace_call_prev,
6361         btrace_find_call_by_number): Use index into call segment vector
6362         instead of pointer.
6363         (btrace_call_cmp): Simplify.
6364         * btrace.h (struct btrace_call_iterator): Replace function call segment
6365         pointer with index into vector.
6366         * record-btrace.c (record_btrace_call_history): Use index instead of
6367         pointer.
6368
6369 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6370
6371         * btrace.c (btrace_insn_begin, btrace_insn_end,
6372         btrace_find_insn_by_number): Add btinfo to iterator.
6373         * btrace.h (struct btrace_insn_iterator): Add btinfo.
6374
6375 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6376
6377         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
6378         and save pointers directly.
6379         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
6380         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
6381         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
6382         changed signature of functions.
6383         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
6384         (btrace_fetch): Remove code that adds btrace_function pointers to
6385         vector of btrace_functions.
6386         (btrace_clear): Simplify freeing vector of btrace_functions.
6387
6388 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
6389
6390         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
6391         Replace VEC_* with std::vector functions.
6392         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
6393         (struct btrace_thread_info)<functions>: Change type to std::vector.
6394
6395 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6396
6397         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
6398         "Removed targets and native configurations" up.  Merge duplicate
6399         "New commands" sub-sections.  Add "New options" sub-sections.
6400
6401 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
6402
6403         * defs.h (copy_integer_to_size): New declaration.
6404         * findvar.c (copy_integer_to_size): New function.
6405         (do_cint_test): New selftest function.
6406         (copy_integer_to_size_test): Likewise.
6407         (_initialize_findvar): Likewise.
6408         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
6409         (mips_fbsd_collect_reg): Use raw_collect_integer.
6410         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
6411         (mips64_fill_gregset): Use raw_collect_integer
6412         (mips64_fill_fpregset): Use raw_supply_integer.
6413         * regcache.c (regcache::raw_supply_integer): New function.
6414         (regcache::raw_collect_integer): Likewise.
6415         * regcache.h: (regcache::raw_supply_integer): New declaration.
6416         (regcache::raw_collect_integer): Likewise.
6417
6418 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6419
6420         * Makefile.in (SFILES): Add gdbarch-selftests.c.
6421         (COMMON_OBS): Add gdbarch-selftests.o.
6422         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
6423         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
6424         * gdbarch-selftests.c: New file.
6425         * regcache.h (regcache) <~regcache>: Mark it virtual if
6426         GDB_SELF_TEST.
6427         <raw_write>: Likewise.
6428
6429 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6430
6431         * regcache.c (current_regcache): Change it to
6432         regcache::current_regcache.
6433         (regcache_observer_target_changed): Update.
6434         (regcache_thread_ptid_changed): Make it a regcache static
6435         method.
6436         (regcache_thread_ptid_changed): Update.
6437         (class regcache_access): New.
6438         (current_regcache_test): Update.
6439         (_initialize_regcache): Update.
6440         * regcache.h: Include forward_list.
6441         (regcache): Declare regcache_thread_ptid_changed and declare
6442         registers_changed_ptid as friend.
6443
6444 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6445
6446         * i387-tdep.c (i387_register_to_value): Use register_size
6447         instead of TYPE_LENGTH.
6448         * m68k-tdep.c (m68k_register_to_value): Likewise.
6449
6450 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6451
6452         * i387-tdep.c (i387_convert_register_p): Return false if type
6453         code isn't TYPE_CODE_FLT.
6454
6455 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6456
6457         * alpha-tdep.c (alpha_convert_register_p): Return true if type
6458         length is 4.
6459         (alpha_register_to_value): Remove type length check.
6460         (alpha_value_to_register): Likewise.
6461
6462 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6463
6464         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
6465         TYPE_CODE_FLT.
6466
6467 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6468
6469         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
6470         TYPE_CODE_FLT or not.
6471
6472 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6473
6474         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
6475         * avr-tdep.c (avr_gdbarch_init): Likewise.
6476         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6477         * cris-tdep.c (cris_gdbarch_init): Likewise.
6478         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6479         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6480         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6481         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
6482         * mep-tdep.c (mep_gdbarch_init): Likewise.
6483         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6484         * mips-tdep.c (mips_gdbarch_init): Likewise.
6485         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6486         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6487         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6488         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6489         * v850-tdep.c (v850_gdbarch_init): Likewise.
6490
6491 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6492
6493         * selftest-arch.c (tests_with_arch): Call registers_changed
6494         and reinit_frame_cache.
6495         * selftest.c (run_self_tests): Likewise.
6496
6497 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6498
6499         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
6500         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
6501
6502 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6503
6504         * rl78-tdep.c (rl78_gdbarch_init): Don't call
6505         set_gdbarch_print_insn.
6506
6507 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6508
6509         * h8300-tdep.c (h8300_gdbarch_init): Don't call
6510         set_gdbarch_print_insn.
6511
6512 2017-05-24  Yao Qi  <yao.qi@linaro.org>
6513
6514         * alpha-tdep.c (alpha_gdbarch_init): Don't call
6515         set_gdbarch_print_insn.
6516         * arc-tdep.c (arc_gdbarch_init): Likewise.
6517         * arch-utils.c: include dis-asm.h.
6518         (default_print_insn): New function.
6519         * arch-utils.h (default_print_insn): Declare.
6520         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
6521         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
6522         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
6523         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
6524         * frv-tdep.c (frv_gdbarch_init): Likewise.
6525         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6526         * gdbarch.sh (print_insn): Use default_print_insn.
6527         * gdbarch.c: Regenerated.
6528         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
6529         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
6530         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
6531         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
6532         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6533         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
6534         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
6535         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
6536         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
6537         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
6538         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
6539         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6540         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
6541         * mt-tdep.c (mt_gdbarch_init): Likewise.
6542         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6543         * nios2-tdep.c (nios2_print_insn): Remove.
6544         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
6545         * rx-tdep.c (rx_gdbarch_init): Likewise.
6546         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6547         * score-tdep.c (score_print_insn): Remove.
6548         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
6549         * sh-tdep.c (sh_gdbarch_init): Likewise.
6550         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
6551         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6552         * tic6x-tdep.c (tic6x_print_insn): Remove.
6553         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
6554         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
6555         * v850-tdep.c (v850_gdbarch_init): Likewise.
6556         * vax-tdep.c (vax_gdbarch_init): Likewise.
6557         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6558         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
6559
6560 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6561
6562         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
6563         (MIPS_FP0_REGNUM): Remove.
6564         (MIPS_FSR_REGNUM): Remove.
6565         (mips_fbsd_supply_fpregs): Use mips_regnum.
6566         (mips_fbsd_supply_gregs): Likewise.
6567         (mips_fbsd_collect_fpregs): Likewise.
6568         (mips_fbsd_collect_gregs): Likewise.
6569
6570 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
6571
6572         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
6573         (getpfpregs_supplies): New function.
6574         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
6575         getfpregs_supplies.
6576         (mips_fbsd_store_inferior_registers): Likewise.
6577
6578 2017-05-22  Pedro Alves <palves@redhat.com>
6579
6580         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
6581         maintainer.
6582
6583 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
6584
6585         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
6586         (store_register): Likewise.
6587         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
6588         (get_decimal_float_return_value): Likewise.
6589         (do_ppc_sysv_return_value): Likewise.
6590         (ppc64_sysv_abi_push_integer): Likewise.
6591         (ppc64_sysv_abi_push_freg): Likewise.
6592         (ppc64_sysv_abi_return_value_base): Likewise.
6593         (ppc64_sysv_abi_return_value): Likewise.
6594         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
6595         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
6596         * rs6000-nat.c: Likewise.
6597         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
6598         (rs6000_value_to_register): Likewise.
6599         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
6600
6601 2017-05-21  Tom Tromey  <tom@tromey.com>
6602
6603         PR rust/21466:
6604         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
6605         arrays as "[T]", not "[T; ]".
6606
6607 2017-05-19  Tom Tromey  <tom@tromey.com>
6608
6609         PR rust/21484:
6610         * rust-lang.c (exp_descriptor_rust): New function.
6611         (rust_language_defn): Use it.
6612         * p-lang.c (pascal_language_defn): Update.
6613         * opencl-lang.c (opencl_language_defn): Update.
6614         * objc-lang.c (objc_language_defn): Update.
6615         * m2-lang.c (m2_language_defn): Update.
6616         * language.h (struct language_defn)
6617         <la_watch_location_expression>: New member.
6618         * language.c (unknown_language_defn, auto_language_defn)
6619         (local_language_defn): Update.
6620         * go-lang.c (go_language_defn): Update.
6621         * f-lang.c (f_language_defn): Update.
6622         * d-lang.c (d_language_defn): Update.
6623         * c-lang.h (c_watch_location_expression): Declare.
6624         * c-lang.c (c_watch_location_expression): New function.
6625         (c_language_defn, cplus_language_defn, asm_language_defn)
6626         (minimal_language_defn): Use it.
6627         * breakpoint.c (watch_command_1): Call
6628         la_watch_location_expression.
6629         * ada-lang.c (ada_language_defn): Update.
6630
6631 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6632
6633         PR tui/21482
6634         * gdb_curses.h (NOMACROS): Define.
6635         (NCURSES_NOMACROS): Define.
6636
6637 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6638
6639         PR tui/21482
6640         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
6641         arg to char *.
6642         * tui/tui-wingeneral.c (box_win): Likewise.
6643         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
6644         (tui_show_source_line): Likewise.
6645         (tui_show_exec_info_content): Likewise.
6646
6647 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
6648
6649         * sparc-tdep.c (sparc_structure_return_p)
6650         (sparc_arg_on_registers_p): New functions.
6651         (sparc32_store_arguments): Use them.
6652         * sparc64-tdep.c (sparc64_16_byte_align_p)
6653         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
6654         Handle TYPE_CODE_ARRAY.
6655
6656 2017-05-17  Yao Qi  <yao.qi@linaro.org>
6657
6658         * cli/cli-decode.c (add_alias_cmd): New function.
6659         * command.h (add_alias_cmd): Declare.
6660         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
6661         instead call add_alias_cmd.
6662
6663 2017-05-17  Pedro Alves  <palves@redhat.com>
6664
6665         * Makefile.in (nat_extra_makefile_frag): Rename to ...
6666         (nat_makefile_frag): ... this.  All references updated.
6667         * configure.ac: Likewise.
6668         * configure.nat: Likewise.  Enhance comments.
6669         * configure: Regenerate.
6670
6671 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6672
6673         * procfs.c (procfs_create_inferior): Change prototype to match
6674         definition.
6675
6676 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
6677
6678         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6679         C++ compiler warning.
6680
6681 2017-05-12  Tom Tromey  <tom@tromey.com>
6682
6683         PR rust/21483:
6684         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6685         recurse, just call value_struct_elt directly.
6686
6687 2017-05-12  Tom Tromey  <tom@tromey.com>
6688
6689         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6690         OP_RUST_ARRAY>: Fix.
6691
6692 2017-05-12  Tom Tromey  <tom@tromey.com>
6693
6694         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6695
6696 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6697
6698         * regcache.c: Include <forward_list>.
6699         (struct regcache_list): Remove.
6700         (current_regcache): Update.
6701         (get_thread_arch_aspace_regcache): Update for std::forward_list.
6702         (regcache_thread_ptid_changed): Likewise.
6703         (registers_changed_ptid): Likewise.
6704         (current_regcache_size): Likewise.
6705
6706 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6707
6708         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6709         (current_regcache_size): New function.
6710         (current_regcache_test): New function.
6711         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6712
6713 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6714
6715         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6716         (print_gp_register_row): Use get_frame_register_value.
6717
6718 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6719
6720         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6721         (mips_supply_fpregset): Likewise.
6722         (mips64_supply_gregset): Likewise.
6723
6724 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6725
6726         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
6727         regcache->raw_supply_zeroed.
6728
6729 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6730
6731         * configure.nat: Rearrange 'case' statements to match
6732         host before cpu.
6733
6734 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6735
6736         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
6737         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6738         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
6739         "@nat_extra_makefile_frag@".
6740         (Makefile): Remove dependency on "@frags@".
6741         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6742         (data-directory/Makefile): Likewise.
6743         * config/aarch64/linux.mh: Deleted; moved contents to
6744         "gdb/configure.nat".
6745         * config/alpha/alpha-linux.mh: Likewise.
6746         * config/alpha/nbsd.mh: Likewise.
6747         * config/arm/linux.mh: Likewise.
6748         * config/arm/nbsdelf.mh: Likewise.
6749         * config/i386/cygwin.mh: Likewise.
6750         * config/i386/cygwin64.mh: Likewise.
6751         * config/i386/darwin.mh: Likewise.
6752         * config/i386/fbsd.mh: Likewise.
6753         * config/i386/fbsd64.mh: Likewise.
6754         * config/i386/go32.mh: Likewise.
6755         * config/i386/i386gnu.mh: Likewise.
6756         * config/i386/i386sol2.mh: Likewise.
6757         * config/i386/linux.mh: Likewise.
6758         * config/i386/linux64.mh: Likewise.
6759         * config/i386/mingw.mh: Likewise.
6760         * config/i386/mingw64.mh: Likewise.
6761         * config/i386/nbsd64.mh: Likewise.
6762         * config/i386/nbsdelf.mh: Likewise.
6763         * config/i386/nto.mh: Likewise.
6764         * config/i386/obsd.mh: Likewise.
6765         * config/i386/obsd64.mh: Likewise.
6766         * config/i386/sol2-64.mh: Likewise.
6767         * config/ia64/linux.mh: Likewise.
6768         * config/m32r/linux.mh: Likewise.
6769         * config/m68k/linux.mh: Likewise.
6770         * config/m68k/nbsdelf.mh: Likewise.
6771         * config/m68k/obsd.mh: Likewise.
6772         * config/m88k/obsd.mh: Likewise.
6773         * config/mips/fbsd.mh: Likewise.
6774         * config/mips/linux.mh: Likewise.
6775         * config/mips/nbsd.mh: Likewise.
6776         * config/mips/obsd64.mh: Likewise.
6777         * config/pa/linux.mh: Likewise.
6778         * config/pa/nbsd.mh: Likewise.
6779         * config/pa/obsd.mh: Likewise.
6780         * config/powerpc/aix.mh: Likewise.
6781         * config/powerpc/fbsd.mh: Likewise.
6782         * config/powerpc/linux.mh: Likewise.
6783         * config/powerpc/nbsd.mh: Likewise.
6784         * config/powerpc/obsd.mh: Likewise.
6785         * config/powerpc/ppc64-linux.mh: Likewise.
6786         * config/powerpc/spu-linux.mh: Likewise.
6787         * config/s390/linux.mh: Likewise.
6788         * config/sh/nbsd.mh: Likewise.
6789         * config/sparc/fbsd.mh: Likewise.
6790         * config/sparc/linux.mh: Likewise.
6791         * config/sparc/linux64.mh: Likewise.
6792         * config/sparc/nbsd64.mh: Likewise.
6793         * config/sparc/nbsdelf.mh: Likewise.
6794         * config/sparc/obsd64.mh: Likewise.
6795         * config/sparc/sol2.mh: Likewise.
6796         * config/tilegx/linux.mh: Likewise.
6797         * config/vax/nbsdelf.mh: Likewise.
6798         * config/vax/obsd.mh: Likewise.
6799         * config/xtensa/linux.mh: Likewise.
6800         * config/i386/i386gnu.mn: New file, with excerpts from
6801         "config/i386/i386gnu.mh".
6802         * configure: Regenerate.
6803         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6804         *.mh files under "gdb/config".
6805         * configure.nat: New file, with contents from the
6806         "gdb/config/*/*.mh" files.
6807
6808 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
6809
6810         * btrace.c (btrace_clear): Free insn vector.
6811
6812 2017-05-05  Pedro Alves  <palves@redhat.com>
6813
6814         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6815         * configure: Regenerate.
6816
6817 2017-05-04  Pedro Alves  <palves@redhat.com>
6818
6819         * Makefile.in (SFILES): Add progspace-and-thread.c.
6820         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6821         (COMMON_OBS): Add progspace-and-thread.o.
6822         * breakpoint.c: Include "progspace-and-thread.h".
6823         (update_inserted_breakpoint_locations)
6824         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6825         Use scoped_restore_current_pspace_and_thread.
6826         (create_std_terminate_master_breakpoint): Use
6827         scoped_restore_current_program_space.
6828         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6829         (print_breakpoint_location): Use
6830         scoped_restore_current_program_space.
6831         (bp_loc_is_permanent): Use
6832         scoped_restore_current_pspace_and_thread.
6833         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6834         (download_tracepoint_locations): Use
6835         scoped_restore_current_pspace_and_thread.
6836         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6837         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6838         (enum step_over_calls_kind): Moved from inferior.h.
6839         (class scoped_restore_current_thread): New class.
6840         * gdbthread.h (make_cleanup_restore_current_thread): Delete
6841         declaration.
6842         (scoped_restore_current_thread): New class.
6843         * infcmd.c: Include "common/gdb_optional.h".
6844         (continue_1, proceed_after_attach): Use
6845         scoped_restore_current_thread.
6846         (notice_new_inferior): Use scoped_restore_current_thread.
6847         * inferior.c: Include "progspace-and-thread.h".
6848         (restore_inferior, save_current_inferior): Delete.
6849         (add_inferior_command, clone_inferior_command): Use
6850         scoped_restore_current_pspace_and_thread.
6851         * inferior.h (scoped_restore_current_inferior): New class.
6852         * infrun.c: Include "progspace-and-thread.h" and
6853         "common/gdb_optional.h".
6854         (follow_fork_inferior): Use
6855         scoped_restore_current_pspace_and_thread.
6856         (scoped_restore_exited_inferior): New class.
6857         (handle_vfork_child_exec_or_exit): Use
6858         scoped_restore_exited_inferior,
6859         scoped_restore_current_pspace_and_thread,
6860         scoped_restore_current_thread and scoped_restore.
6861         (fetch_inferior_event): Use scoped_restore_current_thread.
6862         * linespec.c (decode_line_full, decode_line_1): Use
6863         scoped_restore_current_program_space.
6864         * mi/mi-main.c: Include "progspace-and-thread.h".
6865         (exec_continue): Use scoped_restore_current_thread.
6866         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6867         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6868         * proc-service.c (ps_pglobal_lookup): Use
6869         scoped_restore_current_program_space.
6870         * progspace-and-thread.c: New file.
6871         * progspace-and-thread.h: New file.
6872         * progspace.c (release_program_space, clone_program_space): Use
6873         scoped_restore_current_program_space.
6874         (restore_program_space, save_current_program_space)
6875         (save_current_space_and_thread): Delete.
6876         (switch_to_program_space_and_thread): Moved to
6877         progspace-and-thread.c.
6878         * progspace.h (save_current_program_space)
6879         (save_current_space_and_thread): Delete declarations.
6880         (scoped_restore_current_program_space): New class.
6881         * remote.c (remote_btrace_maybe_reopen): Use
6882         scoped_restore_current_thread.
6883         * symtab.c: Include "progspace-and-thread.h".
6884         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6885         * thread.c (print_thread_info_1): Use
6886         scoped_restore_current_thread.
6887         (struct current_thread_cleanup): Delete.
6888         (do_restore_current_thread_cleanup)
6889         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6890         (scoped_restore_current_thread::~scoped_restore_current_thread):
6891         ... this new dtor.
6892         (make_cleanup_restore_current_thread): Rename/convert to ...
6893         (scoped_restore_current_thread::scoped_restore_current_thread):
6894         ... this new ctor.
6895         (thread_apply_all_command): Use scoped_restore_current_thread.
6896         (thread_apply_command): Use scoped_restore_current_thread.
6897         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6898         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6899
6900 2017-05-04  Pedro Alves  <palves@redhat.com>
6901
6902         * thread.c (make_cleanup_restore_current_thread): Move
6903         find_thread_ptid call before the is_stopped call.  Assert that the
6904         thread is found.  Replace is_stopped call by checking the thread's
6905         state directly.  Remove unnecessary NULL-thread check.
6906
6907 2017-05-04  Pedro Alves  <palves@redhat.com>
6908
6909         * corelow.c (thread_section_name): New class.
6910         (get_core_register_section, get_core_siginfo): Use it.
6911
6912 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6913
6914         * corelow.c (sniff_core_bfd): Remove extra semicolon.
6915         (get_core_register_section): Remove xfree of NULL pointer.
6916
6917 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
6918
6919         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6920         * regcache.c (regcache::raw_supply_zeroed): New function.
6921         * regcache.h (regcache::raw_supply_zeroed): New declaration.
6922
6923 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6924
6925         * gdbarch.sh: Remove commented out definition of
6926         TARGET_CHAR_BIT.
6927         * gdbarch.h: Re-generate.
6928
6929 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
6930
6931         * configure: Regenerate.
6932
6933 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
6934
6935         * solib-target.c (solib_target_relocate_section_addresses):
6936         Remove num_section_bases, num_bases, segment_bases variables.
6937
6938 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6939
6940         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6941
6942 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6943
6944         * solib-target.c: Include <vector>
6945         (struct lm_info_target) <~lm_info_target>: Remove.
6946         <segment_bases, section_bases>: Change type to
6947         std::vector<CORE_ADDR>.
6948         (library_list_start_segment, library_list_start_section,
6949         library_list_end_library,
6950         solib_target_relocate_section_addresses): Adjust.
6951
6952 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6953
6954         * gdbarch.sh (software_single_step): Change return type to
6955         std::vector<CORE_ADDR>.
6956         * gdbarch.c, gdbarch.h: Re-generate.
6957         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6958         Adjust.
6959         (arm_deal_with_atomic_sequence_raw): Adjust.
6960         (thumb_get_next_pcs_raw): Adjust.
6961         (arm_get_next_pcs_raw): Adjust.
6962         (arm_get_next_pcs): Adjust.
6963         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6964         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6965         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6966         (alpha_software_single_step): Adjust.
6967         * alpha-tdep.h (alpha_software_single_step): Adjust.
6968         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6969         * arm-tdep.c (arm_software_single_step): Adjust.
6970         (arm_breakpoint_kind_from_current_state): Adjust.
6971         * arm-tdep.h (arm_software_single_step): Adjust.
6972         * breakpoint.c (insert_single_step_breakpoint): Adjust.
6973         * cris-tdep.c (cris_software_single_step): Adjust.
6974         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6975         (micromips_deal_with_atomic_sequence): Adjust.
6976         (deal_with_atomic_sequence): Adjust.
6977         (mips_software_single_step): Adjust.
6978         * mips-tdep.h (mips_software_single_step): Adjust.
6979         * moxie-tdep.c (moxie_software_single_step): Adjust.
6980         * nios2-tdep.c (nios2_software_single_step): Adjust.
6981         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6982         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6983         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6984         * s390-linux-tdep.c (s390_software_single_step): Adjust.
6985         * sparc-tdep.c (sparc_software_single_step): Adjust.
6986         * spu-tdep.c (spu_software_single_step): Adjust.
6987         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6988
6989 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6990
6991         * gdbarch.sh: Use semi-colon as field separator instead of colon.
6992         * gdbarch.h: Re-generate.
6993
6994 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6995
6996         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6997         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6998         * python/py-instruction.c, python/py-instruction.h: New file.
6999         * python/py-record.c: Add py-instruction.h include.
7000         (gdbpy_initialize_record): Make gdb.Instruction a super class of
7001         gdb.RecordInstruction.
7002         * python/python-internal.h: Add gdbpy_initialize_instruction
7003         declaration.
7004         * python/python.c (do_start_initialization): Add
7005         gdbpy_initialize_instruction.
7006
7007 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7008
7009         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
7010         Remove.
7011         (btrace_func_from_recpy_func): New function.
7012         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
7013         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
7014         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
7015         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
7016         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
7017         Also, use new helper functions.
7018         (btpy_list_item): Use new helper functions.
7019         (recpy_bt_function_call_history): Use new type name.
7020         (btpy_call_getset): Remove.
7021         (gdbpy_initialize_btrace): Remove code to initialize
7022         gdb.BtraceFunctionCall.
7023         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
7024         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
7025         recpy_bt_func_prev, recpy_bt_func_next): New export.
7026         * python/py-record.c (recpy_func_type): New static object.
7027         (recpy_func_new, recpy_func_level, recpy_func_symbol,
7028         recpy_func_instructions, recpy_func_up, recpy_func_prev,
7029         recpy_func_next): New function.
7030         (recpy_element_hash, recpy_element_richcompare): Updated comment.
7031         (recpy_func_getset): New static object.
7032         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
7033         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
7034
7035 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7036
7037         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
7038         (btpy_object, btpy_insn_type, btpy_new): Remove.
7039         (btpy_list_object): Use gdb.RecordInstruction type instead of
7040         gdb.BtraceInstruction type.
7041         (btrace_insn_from_recpy_insn): New function.
7042         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
7043         btpy_new.
7044         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
7045         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
7046         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
7047         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
7048         instead of btpy_object.
7049         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7050         btpy_insn_data, btpy_insn_decode): Rename to ...
7051         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
7052         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
7053         recpy_bt_insn_decode): This.  Also, use new helper functions.
7054         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
7055         recpy_insn_type.
7056         (btpy_insn_getset): Remove.
7057         (gdbpy_initialize_btrace): Remove code to initialize
7058         gdb.BtraceInstruction.  Use recpy_element_object.
7059         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
7060         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
7061         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
7062         * python/py-record.c (recpy_insn_type): New static object.
7063         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
7064         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
7065         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
7066         New function.
7067         (recpy_insn_getset): New static object.
7068         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
7069         * python/py-record.h (recpy_element_object): New typedef.
7070         (recpy_insn_type, recpy_insn_new): New export.
7071
7072 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7073
7074         * py-record-btrace.c (btpy_insn_new): Removed.
7075         (btpy_insn_or_gap_new): New function.
7076         (btpy_insn_error): Removed.
7077         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
7078         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
7079         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
7080         btpy_insn_or_gap_new instead of btpy_insn_new.
7081         (btpy_insn_getset): Remove btpy_insn_error.
7082         * py-record.c (recpy_gap_type): New static object.
7083         (recpy_gap_object): New typedef.
7084         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
7085         recpy_gap_reason_string): New function.
7086         (recpy_gap_getset): New static object.
7087         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
7088         * py-record.h (recpy_gap_new): New export.
7089
7090 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7091
7092         * python/py-record.c (recpy_ptid): Remove.
7093         (recpy_record_getset): Remove recpy_ptid.
7094
7095 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7096
7097         * btrace.c (btrace_fetch): Set inferior_ptid.
7098         * python/py-record-btrace.c: Add "py-record.h" include.
7099         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
7100         recpy_bt_end, recpy_bt_instruction_history,
7101         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
7102         in gdb.Record object instead of current ptid.
7103         * python/py-record.c: Include new "py-record.h" file.
7104         (recpy_record_object): Moved to py-record.h.
7105         * python/py-record.h: New file.
7106
7107 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
7108
7109         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
7110         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
7111         indentation.
7112
7113 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
7114
7115         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
7116         the past maintainers section.
7117
7118 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7119
7120         * infcmd.c (get_return_value): Use regcache ctor, and remove
7121         cleanup.
7122
7123 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7124             Pedro Alves  <palves@redhat.com>
7125
7126         * regcache.c (regcache::regcache): New tag dispatch ctor.
7127         (do_cooked_read): Moved above.
7128         (regcache_dup): Use the tag dispatch ctor..
7129         * regcache.h (regcache): Declare ctor, delete copy ctor and
7130         assignment operator, remove friend regcache_dup.
7131
7132 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7133
7134         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
7135         call method save instead of regcache_cpy.
7136         * regcache.h (struct regcache): Make regcache_dup a friend.
7137
7138 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7139
7140         * regcache.c (struct regcache): Move to regcache.h
7141         (regcache::arch): New method.
7142         (regcache_get_ptid): Update.
7143         (get_regcache_arch): Call arch method.
7144         (get_regcache_aspace): Call method aspace.
7145         (register_buffer): Change it to method.
7146         (regcache_save): Change it to regcache::save.
7147         (regcache_restore): Likewise.
7148         (regcache_cpy_no_passthrough): Remove the declaration.
7149         (regcache_cpy): Call methods restore and cpy_no_passthrough.
7150         (regcache_cpy_no_passthrough): Change it to method
7151         cpy_no_passthrough.
7152         (regcache_register_status): Change it to method
7153         get_register_status.
7154         (regcache_invalidate): Change it to method invalidate.
7155         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
7156         (regcache_raw_update): Change it to method raw_update.
7157         (regcache_raw_read): Likewise.
7158         (regcache_raw_read_signed): Likewise.
7159         (regcache_raw_read_unsigned): Likewise.
7160         (regcache_raw_write_signed): Likewise.
7161         (regcache_raw_write_unsigned): Likewise.
7162         (regcache_cooked_read): Likewise.
7163         (regcache_cooked_read_value): Likewise.
7164         (regcache_cooked_read_signed): Likewise.
7165         (regcache_cooked_read_unsigned): Likewise.
7166         (regcache_cooked_write_signed): Likewise.
7167         (regcache_cooked_write_unsigned): Likewise.
7168         (regcache_raw_set_cached_value): Likewise.
7169         (regcache_raw_write): Likewise.
7170         (regcache_cooked_write): Likewise.
7171         (regcache_xfer_part): Likewise.
7172         (regcache_raw_read_part): Likewise.
7173         (regcache_raw_write_part): Likewise.
7174         (regcache_cooked_read_part): Likewise.
7175         (regcache_cooked_write_part): Likewise.
7176         (regcache_raw_supply): Likewise.
7177         (regcache_raw_collect): Likewise.
7178         (regcache_transfer_regset): Likewise.
7179         (regcache_supply_regset): Likewise.
7180         (regcache_collect_regset): Likewise.
7181         (regcache_debug_print_register): Likewise.
7182         (enum regcache_dump_what): Move it to regcache.h.
7183         (regcache_dump): Change it to method dump.
7184         * regcache.h (enum regcache_dump_what): New.
7185         (class regcache): New.
7186         * target.c (target_fetch_registers): Call method
7187         debug_print_register.
7188         (target_store_registers): Likewise.
7189
7190 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7191
7192         * windows-nat.c (struct lm_info_windows): Initialize field.
7193         (windows_make_so): Allocate lm_info_windows with new.
7194         (windows_free_so): Free lm_info_windows with delete.
7195
7196 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7197
7198         * solib-darwin.c (struct lm_info_darwin): Initialize field.
7199         (darwin_current_sos): Allocate lm_info_darwin with new, remove
7200         cleanup.
7201         (darwin_free_so): Free lm_info_darwin with delete.
7202
7203 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7204
7205         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
7206         <l_addr_p>: Change type to bool.
7207         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
7208         (svr4_free_so): Free lm_info_svr4 with delete.
7209         (svr4_copy_library_list): Replace memcpy with call to copy
7210         constructor.
7211         (library_list_start_library, svr4_default_sos): Allocate
7212         lm_info_svr4 with new.
7213
7214 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7215
7216         * solib-target.c (struct lm_info_target): Add destructor,
7217         initialize fields.
7218         <name>: Change type to std::string.
7219         (library_list_start_library): Allocate lm_info_target with new.
7220         (solib_target_free_library_list): Free lm_info_target with
7221         delete.
7222         (solib_target_current_sos): Adapt to std::string.
7223         (solib_target_free_so): Free lm_info_target with delete.
7224
7225 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7226
7227         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
7228         fields.
7229         (frv_current_sos): Allocate lm_info_frv with new.
7230         (frv_relocate_main_executable): Free lm_info_frv with delete,
7231         allocate with new.
7232         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
7233
7234 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7235
7236         * solib-frv.c (struct lm_info_frv): Fix indentation.
7237
7238 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7239
7240         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
7241         map field.
7242         (dsbt_current_sos): Allocate lm_info_dsbt with new.
7243         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
7244         and allocate with new.
7245         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
7246
7247 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7248
7249         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
7250         <filename, member_name>: Change type to std::string.
7251         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
7252         (library_list_start_library): Allocate lm_info_aix with new.
7253         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
7254         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
7255         with copy constructor.
7256
7257 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7258
7259         * solist.h (struct lm_info): Remove.
7260         (struct lm_info_base): New class.
7261         (struct so_list) <lm_info>: Change type to lm_info_base *.
7262         * nto-tdep.c (struct lm_info): Remove.
7263         (lm_addr): Adjust.
7264         * solib-aix.c (struct lm_info): Rename to ...
7265         (struct lm_info_aix): ... this.  Extend lm_info_base.
7266         (lm_info_p): Rename to ...
7267         (lm_info_aix_p): ... this, and adjust.
7268         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
7269         solib_aix_parse_libraries, library_list_start_library,
7270         solib_aix_free_library_list, solib_aix_parse_libraries,
7271         solib_aix_get_library_list,
7272         solib_aix_relocate_section_addresses, solib_aix_free_so,
7273         solib_aix_get_section_offsets,
7274         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
7275         Adjust.
7276         (struct solib_aix_inferior_data) <library_list>: Adjust.
7277         * solib-darwin.c (struct lm_info): Rename to ...
7278         (struct lm_info_darwin): ... this.  Extend lm_info_base.
7279         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
7280         * solib-dsbt.c (struct lm_info): Rename to ...
7281         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
7282         (struct dsbt_info) <main_executable_lm_info): Adjust.
7283         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
7284         dsbt_relocate_section_addresses): Adjust.
7285         * solib-frv.c (struct lm_info): Rename to ...
7286         (struct lm_info_frv): ... this.  Extend lm_info_base.
7287         (main_executable_lm_info): Adjust.
7288         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
7289         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
7290         find_canonical_descriptor_in_load_object,
7291         frv_fdpic_find_canonical_descriptor): Adjust.
7292         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
7293         to lm_info_svr4.
7294         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
7295         svr4_clear_so, svr4_copy_library_list,
7296         library_list_start_library, svr4_default_sos, svr4_read_so_list,
7297         svr4_current_sos, svr4_fetch_objfile_link_map,
7298         solist_update_incremental): Adjust.
7299         * solib-svr4.h (struct lm_info_svr4): Move here from
7300         solib-svr4.c.
7301         * solib-target.c (struct lm_info): Rename to ...
7302         (struct lm_info_target): ... this.  Extend lm_info_base.
7303         (lm_info_p): Rename to ...
7304         (lm_info_target_p): ... this.
7305         (solib_target_parse_libraries, library_list_start_segment,
7306         library_list_start_section, library_list_start_library,
7307         library_list_end_library, solib_target_free_library_list,
7308         solib_target_current_sos, solib_target_free_so,
7309         solib_target_relocate_section_addresses): Adjust.
7310         * windows-nat.c (struct lm_info): Rename to ...
7311         (struct lm_info_windows): ... this.  Extend lm_info_base.
7312         (windows_make_so, handle_load_dll, handle_unload_dll,
7313         windows_xfer_shared_libraries): Adjust.
7314
7315 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
7316
7317         * solib-darwin.c (struct darwin_so_list): Remove.
7318         (darwin_current_sos): Allocate an so_list object instead of a
7319         darwin_so_list, separately allocate an lm_info object.
7320         (darwin_free_so): Free lm_info.
7321
7322 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
7323
7324         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
7325         with fprintf_filtered.
7326
7327 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7328
7329         * regcache.c (regcache::regcache): New function.
7330         (regcache::~regcache): New function.
7331         (regcache_xmalloc_1): Remove.
7332         (regcache_xmalloc): Call new regcache.
7333         (regcache_xfree): Call delete regcache.
7334         (get_thread_arch_aspace_regcache): Call new regcache.
7335
7336 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7337
7338         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
7339         lwp instead of ptid_get_lwp.
7340
7341 2017-04-28  Yao Qi  <yao.qi@linaro.org>
7342
7343         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
7344         lwp_info instead of getting from inferior_ptid.
7345
7346 2017-04-27  Keith Seitz  <keiths@redhat.com>
7347
7348         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
7349         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
7350         (CV_CONVERSION_BADNESS): Define.
7351         (rank_one_type): Remove overly restrictive rvalue reference
7352         rank checks.
7353         Add cv-qualifier checks and subranks for type equality.
7354         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
7355         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
7356         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
7357
7358 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
7359
7360         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
7361         count when creating the object.
7362
7363 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
7364             Ulrich Weigand  <uweigand@de.ibm.com>
7365
7366         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
7367         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
7368         is used in AIX.
7369         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
7370         (process_xcoff_symbol): Likewise.
7371         (scan_xcoff_symtab): Likewise.
7372
7373 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7374
7375         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
7376         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
7377         (ia64_access_reg): Use get_frame_register_unsigned.
7378         (ia64_access_rse_reg): Likewise.
7379         (ia64_libunwind_frame_prev_register): Likewise.
7380
7381 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
7382
7383         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
7384         * gdbarch.c: Regenerated.
7385         * gdbarch.h: Regenerated.
7386         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
7387         visibility external.
7388         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
7389         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
7390         (enum cfa_how_kind): Move to ...
7391         (struct dwarf2_frame_state_reg_info): Likewise.
7392         (struct dwarf2_frame_state): Likewise.
7393         * dwarf2-frame.h: ... here.
7394         (dwarf2_frame_state_alloc_regs): New declaration.
7395         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
7396         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
7397
7398 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7399
7400         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
7401         regcache_raw_read_unsigned.
7402         (xtensa_pseudo_register_write): Likewise.
7403
7404 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
7405
7406         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
7407         (nds32_pseudo_register_write): Likewise.
7408
7409 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7410
7411         * regcache.c (struct regcache) <readonly_p>: Change its type
7412         to bool.
7413         (regcache_xmalloc_1): Update parameter type and callers update.
7414
7415 2017-04-25  Yao Qi  <yao.qi@linaro.org>
7416
7417         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
7418         set_gdbarch_wchar_bit.
7419         * arm-tdep.c (arm_gdbarch_init): Likewise.
7420
7421 2017-04-25  Pedro Alves  <palves@redhat.com>
7422
7423         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
7424         (BothAreRelocatable, memcopy, memmove): Don't define.
7425         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
7426         macros.
7427
7428 2017-04-25  Pedro Alves  <palves@redhat.com>
7429
7430         * common/common-defs.h: Include "common/poison.h".
7431         * common/function-view.h: (Not, Or, Requires): Move to traits.h
7432         and adjust.
7433         * common/poison.h: New file.
7434         * common/traits.h: Include <type_traits>.
7435         (Not, Or, Requires): New, moved from common/function-view.h.
7436
7437 2017-04-25  Pedro Alves  <palves@redhat.com>
7438
7439         * breakpoint.h (struct breakpoint): In-class initialize all
7440         fields.  Make boolean fields "bool".
7441         * breakpoint.c (init_raw_breakpoint_without_location): Remove
7442         memset call and initializations no longer necessary.
7443
7444 2017-04-25  Pedro Alves  <palves@redhat.com>
7445
7446         * btrace.c (pt_btrace_insn_flags): Change parameter type to
7447         reference.
7448         (pt_btrace_insn): New function.
7449         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
7450
7451 2017-04-25  Pedro Alves  <palves@redhat.com>
7452
7453         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
7454         "base" field and inherit from "bp_location" instead.  Add
7455         non-default ctor.
7456         (allocate_location_exception): Use new non-default ctor.
7457         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
7458         (init_bp_location): Convert to ...
7459         (bp_location::bp_location): ... this new ctor, and remove memset
7460         call.
7461         (base_breakpoint_allocate_location): Use the new non-default ctor.
7462         * breakpoint.h (bp_location): Now a class.  Declare default and
7463         non-default ctors.  In-class initialize all members.
7464         (init_bp_location): Remove declaration.
7465
7466 2017-04-25  Pedro Alves  <palves@redhat.com>
7467
7468         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
7469         assignment operator.
7470
7471 2017-04-24  Yao Qi  <yao.qi@linaro.org>
7472
7473         * doublest.c (convert_doublest_to_floatformat): Call
7474         floatformat_totalsize_bytes.
7475
7476 2017-04-22  Tom Tromey  <tom@tromey.com>
7477
7478         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7479         ui_out_emit_list.
7480         * stack.c (print_frame): Use ui_out_emit_list.
7481         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7482         ui_out_emit_list.
7483         * mi/mi-main.c (print_one_inferior)
7484         (mi_cmd_data_list_register_names)
7485         (mi_cmd_data_list_register_values, mi_cmd_list_features)
7486         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
7487         ui_out_emit_list.
7488         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
7489         (mi_output_solib_attribs): Use ui_out_emit_list,
7490         ui_out_emit_tuple.
7491         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
7492         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
7493         (mi_cmd_stack_list_args, list_args_or_locals): Use
7494         ui_out_emit_list.
7495         * disasm.c (do_assembly_only): Use ui_out_emit_list.
7496         * breakpoint.c (print_solib_event, output_thread_groups): Use
7497         ui_out_emit_list.
7498
7499 2017-04-22  Tom Tromey  <tom@tromey.com>
7500
7501         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
7502         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
7503         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
7504
7505 2017-04-22  Tom Tromey  <tom@tromey.com>
7506
7507         * tracepoint.c (tvariables_info_1)
7508         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
7509
7510 2017-04-22  Tom Tromey  <tom@tromey.com>
7511
7512         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
7513         annotate_arg_emitter.
7514         * breakpoint.c (print_mention_watchpoint)
7515         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7516         * annotate.h (struct annotate_arg_emitter): New.
7517
7518 2017-04-22  Tom Tromey  <tom@tromey.com>
7519
7520         * record-btrace.c (record_btrace_insn_history)
7521         (record_btrace_insn_history_range, record_btrace_call_history)
7522         (record_btrace_call_history_range): Use ui_out_emit_tuple.
7523         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
7524         ui_out_emit_tuple.
7525         * stack.c (print_frame_info): Use ui_out_emit_tuple.
7526         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
7527         * skip.c (skip_info): Use ui_out_emit_tuple.
7528         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
7529         * progspace.c (print_program_space): Use ui_out_emit_tuple.
7530         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
7531         * osdata.c (info_osdata): Use ui_out_emit_tuple.
7532         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
7533         ui_out_emit_tuple.
7534         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
7535         (output_register, mi_cmd_data_read_memory)
7536         (mi_cmd_data_read_memory_bytes, mi_load_progress)
7537         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
7538         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
7539         Use ui_out_emit_tuple.
7540         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
7541         ui_out_emit_tuple.
7542         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7543         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
7544         * linux-thread-db.c (info_auto_load_libthread_db): Use
7545         ui_out_emit_tuple.
7546         * inferior.c (print_inferior): Use ui_out_emit_tuple.
7547         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
7548         * disasm.c (do_mixed_source_and_assembly_deprecated)
7549         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
7550         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
7551         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
7552         * breakpoint.c (print_one_breakpoint_location)
7553         (print_one_breakpoint): Use ui_out_emit_tuple.
7554         * auto-load.c (print_script, info_auto_load_cmd): Use
7555         ui_out_emit_tuple.
7556         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
7557
7558 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
7559
7560         * thread.c (print_thread_info_1): Remove dead code.
7561
7562 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7563
7564         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
7565         GDB_SELF_TEST.
7566         * arm-tdep.c (selftests::arm_record_test): Likewise.
7567
7568 2017-04-21  Yao Qi  <yao.qi@linaro.org>
7569
7570         * regcache.c (regcache_restore): Remove argument 2.  Replace
7571         argument 3 with regcache.  Get register status from
7572         src->register_status and get register contents from
7573         register_buffer (src, regnum).
7574         (regcache_cpy): Update.
7575
7576 2017-04-19  Pedro Alves  <palves@redhat.com>
7577
7578         * gdbthread.h (thread): Add missing closing parenthesis in
7579         comment.
7580
7581 2017-04-19  Pedro Alves  <palves@redhat.com>
7582
7583         * common/refcounted-object.h: New file.
7584         * gdbthread.h: Include "common/refcounted-object.h".
7585         (thread_info): Inherit from refcounted_object and add comments.
7586         (thread_info::incref, thread_info::decref)
7587         (thread_info::m_refcount): Delete.
7588         (thread_info::deletable): Use the refcounted_object::refcount()
7589         method.
7590         * inferior.c (current_inferior_): Add comment.
7591         (set_current_inferior): Increment/decrement refcounts.
7592         (prune_inferiors, remove_inferior_command): Skip inferiors marked
7593         not-deletable instead of comparing with the current inferior.
7594         (initialize_inferiors): Increment the initial inferior's refcount.
7595         * inferior.h (struct inferior): Forward declare.
7596         Include "common/refcounted-object.h".
7597         (current_inferior, set_current_inferior): Move declaration to
7598         before struct inferior's definition, and fix comment.
7599         (inferior): Inherit from refcounted_object.  Add comments.
7600         * thread.c (switch_to_thread_no_regs): Reference the thread's
7601         inferior pointer directly instead of doing a ptid lookup.
7602         (switch_to_no_thread): New function.
7603         (switch_to_thread(thread_info *)): New function, factored out
7604         from ...
7605         (switch_to_thread(ptid_t)): ... this.
7606         (restore_current_thread): Delete.
7607         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
7608         fields, and add 'inf' field.
7609         (do_restore_current_thread_cleanup): Check whether old->inf is
7610         alive instead of looking up an inferior by ptid.  Use
7611         switch_to_thread and switch_to_no_thread.
7612         (restore_current_thread_cleanup_dtor): Use old->inf directly
7613         instead of lookup up an inferior by id.  Decref the inferior.
7614         Don't restore 'removable'.
7615         (make_cleanup_restore_current_thread): Same the inferior pointer
7616         in old, instead of the inferior number.  Incref the inferior.
7617         Don't save/clear 'removable'.
7618
7619 2017-04-19  Pedro Alves  <palves@redhat.com>
7620
7621         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7622         unittests/scoped_restore-selftests.c.
7623         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
7624         * common/scoped_restore.h (scoped_restore_base): Make "class".
7625         (scoped_restore_base::release): New public method.
7626         (scoped_restore_base::scoped_restore_base): New protected ctor.
7627         (scoped_restore_base::m_saved_var): New protected field.
7628         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
7629         scoped_restore_base base class instead of m_saved_var directly.
7630         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
7631         (scoped_restore_tmpl::scoped_restore_tmpl(const
7632         scoped_restore_tmpl<T>&)): Likewise.
7633         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
7634         method.
7635         (scoped_restore_tmpl::saved_var): New method.
7636         (scoped_restore_tmpl::m_saved_var): Delete.
7637         * inferior.h (inferior::detaching): Now a bool.
7638         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
7639         cleanup.
7640         * unittests/scoped_restore-selftests.c: New file.
7641
7642 2017-04-19  Pedro Alves  <palves@redhat.com>
7643
7644         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
7645         Re-sort in alphabetic order.
7646
7647 2017-04-18  Pedro Alves  <palves@redhat.com>
7648
7649         * xml-support.c (obstack_xml_printf): Delete.
7650         * xml-support.h (obstack_xml_printf): Delete.
7651
7652 2017-04-18  Pedro Alves  <palves@redhat.com>
7653
7654         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
7655         vdebug, verror, body_text, start_element, end_element, name,
7656         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
7657         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
7658         is_xinclude>: Make private and add m_ prefix.
7659         (gdb_xml_parser::body_text): New method, based on ...
7660         (gdb_xml_body_text): ... this.  Adjust.
7661         (gdb_xml_parser::vdebug): New method, based on ...
7662         (gdb_xml_debug): ... this.  Adjust.
7663         (gdb_xml_parser::verror): New method, based on ...
7664         (gdb_xml_error): ... this.  Adjust.
7665         (gdb_xml_parser::start_element): New method, based on ...
7666         (gdb_xml_start_element): ... this.  Adjust.
7667         (gdb_xml_start_element_wrapper): Defer to
7668         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
7669         (gdb_xml_parser::end_element): New method, based on ...
7670         (gdb_xml_end_element_wrapper): ... this.  Adjust.
7671         (gdb_xml_parser::~gdb_xml_parser): Adjust.
7672         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7673         (gdb_xml_parser::use_dtd): New method, based on ...
7674         (gdb_xml_use_dtd): ... this.  Adjust.
7675         (gdb_xml_parser::parse): New method, based on ...
7676         (gdb_xml_parse): ... this.  Adjust.
7677         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7678         (xinclude_start_include): Adjust to call the parser's name method.
7679         (xml_xinclude_default, xml_xinclude_start_doctype)
7680         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7681         method.
7682         (xml_process_xincludes): Adjust to call parser methods.
7683         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7684         declarations.
7685
7686 2017-04-18  Pedro Alves  <palves@redhat.com>
7687
7688         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7689         gdb::optional<std::string>.
7690         * xml-support.c: Include <string>.
7691         (scope_level::scope_level(scope_level &&))
7692         (scope_level::~scope_level): Delete.
7693         (scope_level::body): Now a std::string.
7694         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7695         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7696         parameter.
7697         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7698         (xinclude_parsing_data::output): Now a std::string reference.
7699         (xinclude_start_include): Adjust.
7700         (xml_xinclude_default): Adjust.
7701         (xml_process_xincludes): Add 'output' parameter, and return bool.
7702         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7703         and return bool.
7704         * xml-tdesc.c: Include <unordered_map> and <string>.
7705         (tdesc_xml_cache): Delete.
7706         (tdesc_xml_cache_s): Delete.
7707         (xml_cache): Now an std::unordered_map.
7708         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7709         (target_fetch_description_xml): Change return type to
7710         gdb::optional<std::string>, and adjust.
7711         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7712         (target_fetch_description_xml): Change return type to
7713         gdb::optional<std::string>.
7714
7715 2017-04-18  Pedro Alves  <palves@redhat.com>
7716
7717         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7718         unittests/optional-selftests.c.
7719         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7720         * unittests/optional-selftests.c: New file.
7721         * unittests/optional/assignment/1.cc: New file.
7722         * unittests/optional/assignment/2.cc: New file.
7723         * unittests/optional/assignment/3.cc: New file.
7724         * unittests/optional/assignment/4.cc: New file.
7725         * unittests/optional/assignment/5.cc: New file.
7726         * unittests/optional/assignment/6.cc: New file.
7727         * unittests/optional/assignment/7.cc: New file.
7728         * unittests/optional/cons/copy.cc: New file.
7729         * unittests/optional/cons/default.cc: New file.
7730         * unittests/optional/cons/move.cc: New file.
7731         * unittests/optional/cons/value.cc: New file.
7732         * unittests/optional/in_place.cc: New file.
7733         * unittests/optional/observers/1.cc: New file.
7734         * unittests/optional/observers/2.cc: New file.
7735
7736 2017-04-18  Pedro Alves  <palves@redhat.com>
7737
7738         * common/gdb_optional.h: Include common/traits.h.
7739         (in_place_t): New type.
7740         (in_place): New constexpr variable.
7741         (optional::optional): Remove member initialization of
7742         m_instantiated.
7743         (optional::optional(in_place_t...)): New constructor.
7744         (optional::~optional): Use reset.
7745         (optional::optional(const optional&)): New.
7746         (optional::optional(const optional&&)): New.
7747         (optional::optional(T &)): New.
7748         (optional::optional(T &&)): New.
7749         (operator::operator=(const optional &)): New.
7750         (operator::operator=(optional &&)): New.
7751         (operator::operator= (const T &))
7752         (operator::operator= (T &&))
7753         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
7754         (operator::reset): New.
7755         (operator::m_instantiated):: Add in-class initializer.
7756         * common/traits.h: Include <type_traits>.
7757         (struct And): New types.
7758
7759 2017-04-18  Pedro Alves  <palves@redhat.com>
7760
7761         * xml-support.c: Include <vector>.
7762         (scope_level::scope_level(const gdb_xml_element *))
7763         (scope_level::scope_level(scope_level&&)): New.
7764         (scope_level::~scope_level): New.
7765         (scope_level_s): Delete.
7766         (gdb_xml_parser::scopes): Now a std::vector.
7767         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7768         Use std::vector.
7769         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7770         scope cleanup code.
7771         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7772         of the scopes member.  Use std::vector::emplace_back.
7773
7774 2017-04-18  Pedro Alves  <palves@redhat.com>
7775
7776         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
7777         a bool.
7778         (gdb_xml_end_element): Change type of first parameter.
7779         (gdb_xml_cleanup): Rename to ...
7780         (gdb_xml_parser::~gdb_xml_parser): ... this.
7781         (gdb_xml_create_parser_and_cleanup): Delete with ...
7782         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7783         to this new ctor.
7784         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7785         using gdb_xml_create_parser_and_cleanup.
7786         (xinclude_parsing_data): Add ctor/dtor.
7787         (xml_xinclude_cleanup): Delete.
7788         (xml_process_xincludes): Create a local xinclude_parsing_data
7789         instead of heap-allocating one.  Create a local gdb_xml_parser
7790         instead of heap-allocating one with
7791         gdb_xml_create_parser_and_cleanup.
7792
7793 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
7794
7795         PR threads/20743
7796         * fbsd-nat.c (resume_one_thread_cb): Remove.
7797         (resume_all_threads_cb): Remove.
7798         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7799         iterate_over_threads.
7800
7801 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7802
7803         * NEWS: Create a new section for the next release branch.
7804         Rename the section of the current branch, now that it has
7805         been cut.
7806
7807 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7808
7809         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7810         * version.in: Bump version to 8.0.50.DATE-git.
7811
7812 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
7813
7814         PR gdb/21385
7815         * windows-nat.c (windows_create_inferior): Declare 'allargs'
7816         independently of the host, and fix build breakage on Cygwin.
7817
7818 2017-04-13  Pedro Alves  <palves@redhat.com>
7819
7820         * inferior.c (free_inferior): Convert to ...
7821         (inferior::~inferior): ... this dtor.
7822         (inferior::inferior): New ctor, factored out from ...
7823         (add_inferior_silent): ... here.  Allocate the inferior with a new
7824         expression.
7825         (delete_inferior): Call delete instead of free_inferior.
7826         * inferior.h (gdb_environ, continuation): Forward declare.
7827         (inferior): Now a class.  Add in-class initialization to all
7828         members.  Make boolean fields bool, except 'detaching'.
7829         (inferior::inferior): New explicit ctor.
7830         (inferior::~inferior): New.
7831
7832 2017-04-13  Pedro Alves  <palves@redhat.com>
7833
7834         * inferior.c (init_inferior_list): Delete.
7835         * inferior.h (init_inferior_list): Delete.
7836
7837 2017-04-13  Pedro Alves  <palves@redhat.com>
7838
7839         PR threads/13217
7840         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7841         (top level): Call it twice, with different thread sets.
7842
7843 2017-04-13  Pedro Alves  <palves@redhat.com>
7844
7845         * thread.c: Include <algorithm>.
7846         (thread_array_cleanup): Delete.
7847         (scoped_inc_dec_ref): New class.
7848         (live_threads_count): New function.
7849         (set_thread_refcount): Delete.
7850         (tp_array_compar_ascending): Now a bool.
7851         (tp_array_compar): Convert to a std::sort comparison function.
7852         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7853         and live_threads_count.
7854
7855 2017-04-13  Pedro Alves  <palves@redhat.com>
7856
7857         * infrun.c (follow_fork_inferior): Also switch the current
7858         inferior.
7859
7860 2017-04-13  Pedro Alves  <palves@redhat.com>
7861
7862         * breakpoint.c (watch_command_1): Save watchpoint-frame info
7863         before calling create_internal_breakpoint.
7864
7865 2017-04-13  Pedro Alves  <palves@redhat.com>
7866
7867         * fork-child.c (execv_argv): New class.
7868         (breakup_args): Refactored as ...
7869         (execv_argv::init_for_no_shell): .. this method of execv_argv.
7870         Copy arguments to storage and replace separators with NULL
7871         terminators in place.
7872         (escape_bang_in_quoted_argument): Adjust to return bool.
7873         (execv_argv::execv_argv): New ctor.
7874         (execv_argv::init_for_shell): New method, factored out from
7875         fork_inferior.  Don't strdup strings into the vector.
7876         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
7877         Remove free_vector_argv call.
7878
7879 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7880
7881         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7882         tdep->rx_psw_type.
7883
7884 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7885
7886         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7887         * rx-tdep.c (rx_gdbarch_init): Likewise.
7888
7889 2017-04-13  Pedro Alves  <palves@redhat.com>
7890
7891         * breakpoint.h (struct breakpoint): Reindent.
7892
7893 2017-04-13  Pedro Alves  <palves@redhat.com>
7894
7895         * breakpoint.c (bp_location): Rename to ...
7896         (bp_locations): ... this.  All references updated.
7897         (bp_location_count): Rename to ...
7898         (bp_locations_count): ... this.  All references updated.
7899         (bp_location_placed_address_before_address_max): Rename to ...
7900         (bp_locations_placed_address_before_address_max): ... this.  All
7901         references updated.
7902         (bp_location_shadow_len_after_address_max): Rename to ...
7903         (bp_locations_shadow_len_after_address_max): ... this.  All
7904         references updated.
7905         (bp_location_compare_addrs): Rename to ...
7906         (bp_locations_compare_addrs): ... this.  All references updated.
7907         (bp_location_compare):Rename to ...
7908         (bp_locations_compare): ... this.  All references updated.
7909         (bp_location_target_extensions_update): Rename to ...
7910         (bp_locations_target_extensions_update): ... this.  All references
7911         updated.
7912
7913 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7914
7915         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7916         * common/common.m4: Check headers 'termios.h', 'termio.h' and
7917         'sgtty.h'.
7918         * common/gdb_termios.h: New file, with parts of "terminal.h".
7919         * inflow.c: Include "gdb_termios.h".
7920         * ser-unix.c: Include "gdb_termios.h".
7921         * terminal.h: Move terminal-related defines to
7922         "common/gdb_termios.h".
7923
7924 2017-04-12  Tom Tromey  <tom@tromey.com>
7925
7926         * probe.c (parse_probes): Update.
7927         * location.h (delete_event_location): Don't declare.
7928         (event_location_deleter::operator()): Update.
7929         * location.c (event_location_deleter::operator()): Rename from
7930         delete_event_location.
7931         * linespec.h (linespec_result) <location>: Change type to
7932         event_location_up.
7933         * linespec.c (canonicalize_linespec, event_location_to_sals)
7934         (decode_objc): Update.
7935         (linespec_result): Don't call delete_event_location.
7936         * breakpoint.c (create_breakpoints_sal)
7937         (bkpt_probe_create_sals_from_location)
7938         (strace_marker_create_sals_from_location): Update.
7939
7940 2017-04-12  Tom Tromey  <tom@tromey.com>
7941
7942         * linespec.h (struct linespec_result): Add constructor and
7943         destructor.
7944         (init_linespec_result, destroy_linespec_result)
7945         (make_cleanup_destroy_linespec_result): Don't declare.
7946         * linespec.c (init_linespec_result): Remove.
7947         (linespec_result::~linespec_result): Rename from
7948         destroy_linespec_result.  Update.
7949         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7950         Remove.
7951         * breakpoint.c (create_breakpoint, break_range_command)
7952         (decode_location_default): Update.
7953         * ax-gdb.c (agent_command_1): Update.
7954
7955 2017-04-12  Tom Tromey  <tom@tromey.com>
7956
7957         * remote.c (remote_download_tracepoint): Update.
7958         * python/py-breakpoint.c (bppy_get_location): Update.
7959         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7960         (gdbscm_breakpoint_location): Update.
7961         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7962         * breakpoint.h (struct breakpoint) <location, location_range_end>:
7963         Change type to event_location_up.
7964         * breakpoint.c (create_overlay_event_breakpoint)
7965         (create_longjmp_master_breakpoint)
7966         (create_std_terminate_master_breakpoint)
7967         (create_exception_master_breakpoint)
7968         (breakpoint_event_location_empty_p, print_breakpoint_location)
7969         (print_one_breakpoint_location, create_thread_event_breakpoint)
7970         (init_breakpoint_sal, create_breakpoint)
7971         (print_recreate_ranged_breakpoint, break_range_command)
7972         (init_ada_exception_breakpoint, say_where): Update.
7973         (base_breakpoint_dtor): Don't call delete_event_location.
7974         (bkpt_print_recreate, tracepoint_print_recreate)
7975         (dprintf_print_recreate, update_static_tracepoint)
7976         (breakpoint_re_set_default): Update.
7977
7978 2017-04-12  Tom Tromey  <tom@tromey.com>
7979
7980         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7981         type of "to_do".  Update.
7982         (compute_stack_depth): Use std::vector.
7983
7984 2017-04-12  Tom Tromey  <tom@tromey.com>
7985
7986         * printcmd.c (find_instruction_backward): Use std::vector.
7987
7988 2017-04-12  Tom Tromey  <tom@tromey.com>
7989
7990         * symfile.c (objfilep): Remove typedef.
7991         (reread_symbols): Use a std::vector.
7992
7993 2017-04-12  Tom Tromey  <tom@tromey.com>
7994
7995         * mi/mi-main.c (exec_direction_forward): Remove.
7996         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7997         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7998         scoped_restore.
7999         * guile/guile.c (guile_repl_command, guile_command)
8000         (gdbscm_execute_gdb_command): Use scoped_restore.
8001         * go-exp.y (go_parse): Use scoped_restore.
8002         * d-exp.y (d_parse): Use scoped_restore.
8003         * cli/cli-decode.c (cmd_func): Use scoped_restore.
8004         * c-exp.y (c_parse): Use scoped_restore.
8005
8006 2017-04-12  Tom Tromey  <tom@tromey.com>
8007
8008         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
8009         (mi_parse): Update return type.
8010         (mi_parse_free): Remove.
8011         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
8012         (mi_parse::~mi_parse): Rename from mi_parse_free.
8013         (mi_parse_cleanup): Remove.
8014         (mi_parse): Return a unique_ptr.  Use new.
8015         * mi/mi-main.c (mi_execute_command): Update.
8016
8017 2017-04-12  Tom Tromey  <tom@tromey.com>
8018
8019         * location.c (explicit_location_lex_one): Return a
8020         unique_xmalloc_ptr.
8021         (string_to_explicit_location): Update.  Remove cleanups.
8022
8023 2017-04-12  Tom Tromey  <tom@tromey.com>
8024
8025         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
8026         (compare_value_and_voffset): Change type.  Update.
8027         (compute_vtable_size): Change type of "offset_vec".
8028         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
8029         (gnuv3_get_typeid): Remove extraneous declaration.
8030
8031 2017-04-12  Tom Tromey  <tom@tromey.com>
8032
8033         * charset.h (wchar_iterator): Fix comment.
8034
8035 2017-04-12  Tom Tromey  <tom@tromey.com>
8036
8037         * charset.c (iconv_wrapper): New class.
8038         (cleanup_iconv): Remove.
8039         (convert_between_encodings): Use it.
8040
8041 2017-04-12  Tom Tromey  <tom@tromey.com>
8042
8043         * symfile.h (increment_reading_symtab): Update type.
8044         * symfile.c (decrement_reading_symtab): Remove.
8045         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
8046         * psymtab.c (psymtab_to_symtab): Update.
8047         * dwarf2read.c (dw2_instantiate_symtab): Update.
8048
8049 2017-04-12  Tom Tromey  <tom@tromey.com>
8050
8051         * jit.c (struct jit_reader): Declare separately.  Add constructor
8052         and destructor.  Change type of "handle".
8053         (loaded_jit_reader): Define separately.
8054         (jit_reader_load): Update.  New "new".
8055         (jit_reader_unload_command): Use "delete".
8056         * gdb-dlfcn.h (struct dlclose_deleter): New.
8057         (gdb_dlhandle_up): New typedef.
8058         (gdb_dlopen, gdb_dlsym): Update types.
8059         (gdb_dlclose): Remove.
8060         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
8061         (gdb_dlsym): Change type of "handle".
8062         (make_cleanup_dlclose): Remove.
8063         (dlclose_deleter::operator()): Rename from gdb_dlclose.
8064         * compile/compile-c-support.c (load_libcc): Update.
8065
8066 2017-04-12  Tom Tromey  <tom@tromey.com>
8067
8068         * symtab.h (find_pcs_for_symtab_line): Change return type.
8069         * symtab.c (find_pcs_for_symtab_line): Change return type.
8070         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
8071         type of "vec".  Update.
8072         (ltpy_get_pcs_for_line): Update.
8073         * linespec.c (decode_digits_ordinary): Update.
8074
8075 2017-04-12  Tom Tromey  <tom@tromey.com>
8076
8077         * tracepoint.c (actions_command): Update.
8078         * python/python.c (python_command, python_interactive_command):
8079         Update.
8080         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8081         * guile/guile.c (guile_command): Update.
8082         * defs.h (read_command_lines, read_command_lines_1): Return
8083         command_line_up.
8084         (command_lines_deleter): New struct.
8085         (command_line_up): New typedef.
8086         * compile/compile.c (compile_code_command)
8087         (compile_print_command): Update.
8088         * cli/cli-script.h (get_command_line, copy_command_lines): Return
8089         command_line_up.
8090         (make_cleanup_free_command_lines): Remove.
8091         * cli/cli-script.c (get_command_line, read_command_lines_1)
8092         (copy_command_lines): Return command_line_up.
8093         (while_command, if_command, read_command_lines, define_command)
8094         (document_command): Update.
8095         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
8096         Remove.
8097         * breakpoint.h (breakpoint_set_commands): Change type of
8098         "commands".
8099         * breakpoint.c (breakpoint_set_commands): Change type of
8100         "commands".  Update.
8101         (do_map_commands_command, update_dprintf_command_list)
8102         (create_tracepoint_from_upload): Update.
8103
8104 2017-04-12  Tom Tromey  <tom@tromey.com>
8105
8106         * tracepoint.c (scope_info): Update.
8107         * spu-tdep.c (spu_catch_start): Update.
8108         * python/python.c (gdbpy_decode_line): Update.
8109         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
8110         * python/py-breakpoint.c (bppy_init): Update.
8111         * probe.c (parse_probes): Update.
8112         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
8113         * location.h (event_location_deleter): New struct.
8114         (event_location_up): New typedef.
8115         (new_linespec_location, new_address_location, new_probe_location)
8116         (new_explicit_location, copy_event_location)
8117         (string_to_event_location, string_to_event_location_basic)
8118         (string_to_explicit_location): Update return type.
8119         (make_cleanup_delete_event_location): Remove.
8120         * location.c (new_linespec_location, new_address_location)
8121         (new_probe_location, new_explicit_location, copy_event_location):
8122         Return event_location_up.
8123         (delete_event_location_cleanup)
8124         (make_cleanup_delete_event_location): Remove.
8125         (string_to_explicit_location, string_to_event_location_basic)
8126         (string_to_event_location): Return event_location_up.
8127         * linespec.c (canonicalize_linespec, event_location_to_sals)
8128         (decode_line_with_current_source)
8129         (decode_line_with_last_displayed, decode_objc): Update.
8130         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
8131         * completer.c (location_completer): Update.
8132         * cli/cli-cmds.c (edit_command, list_command): Update.
8133         * breakpoint.c (create_overlay_event_breakpoint)
8134         (create_longjmp_master_breakpoint)
8135         (create_std_terminate_master_breakpoint)
8136         (create_exception_master_breakpoint)
8137         (create_thread_event_breakpoint): Update.
8138         (init_breakpoint_sal): Update.  Remove some dead code.
8139         (create_breakpoint_sal): Change type of "location".  Update.
8140         (create_breakpoints_sal, create_breakpoint, break_command_1)
8141         (dprintf_command, break_range_command, until_break_command)
8142         (init_ada_exception_breakpoint)
8143         (strace_marker_create_sals_from_location)
8144         (update_static_tracepoint, trace_command, ftrace_command)
8145         (strace_command, create_tracepoint_from_upload): Update.
8146         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8147         * ax-gdb.c (agent_command_1): Update.
8148
8149 2017-04-12  Pedro Alves  <palves@redhat.com>
8150
8151         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
8152         * configure.tgt: Handle i[34567]86-*-go32* and
8153         i[34567]86-*-msdosdjgpp*.
8154         * i386-tdep.c (i386_svr4_reg_to_regnum):
8155         Make extern.
8156         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
8157         i386-go32-tdep.c.
8158         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
8159         * i386-go32-tdep.c: New file.
8160         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
8161         declarations.
8162
8163 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
8164
8165         * aix-thread.c (pd_status2str): Change return type to const char *.
8166
8167 2017-04-12  Pedro Alves  <palves@redhat.com>
8168
8169         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
8170         calls to set_gdbarch_gnu_triplet_regexp.
8171
8172 2017-04-12  Pedro Alves  <palves@redhat.com>
8173
8174         PR gdb/21323
8175         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
8176         New enum value.
8177         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
8178         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
8179         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
8180         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
8181         * gdbarch.h, gdbarch.c: Regenerate.
8182         * aarch64-tdep.c (aarch64_gdbarch_init): Override
8183         gdbarch_wchar_bit and gdbarch_wchar_signed.
8184         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
8185         * arm-tdep.c (arm_gdbarch_init): Likewise.
8186         * avr-tdep.c (avr_gdbarch_init): Likewise.
8187         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
8188         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
8189         * i386-tdep.c (i386_go32_init_abi): Likewise.
8190         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8191         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8192         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8193         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8194         * sh-tdep.c (sh_gdbarch_init): Likewise.
8195         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8196         * sparc64-tdep.c (sparc64_init_abi): Likewise.
8197         * windows-tdep.c (windows_init_abi): Likewise.
8198         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8199
8200 2017-04-12  Pedro Alves  <palves@redhat.com>
8201
8202         PR c++/21323
8203         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
8204         cplus_primitive_type_char32_t>: New enum values.
8205         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
8206         and cplus_primitive_type_char32_t.
8207         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
8208         32, use the archtecture's built-in type for char16_t and char32_t,
8209         respectively.  Otherwise, fallback to init_integer_type as before,
8210         but make the type unsigned, and issue a complaint.
8211         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
8212
8213 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
8214
8215         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
8216         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
8217
8218 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8219
8220         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
8221         'const char *'.
8222
8223 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8224
8225         * common/common-utils.c (free_vector_argv): New function.
8226         * common/common-utils.h: Include <vector>.
8227         (free_vector_argv): New prototype.
8228         * darwin-nat.c (darwin_create_inferior): Rewrite function
8229         prototype in order to constify "exec_file" and accept a
8230         "std::string" for "allargs".
8231         * fork-child.c: Include <vector>.
8232         (breakup_args): Rewrite function, using C++.
8233         (fork_inferior): Rewrite function header, constify "exec_file_arg"
8234         and accept "std::string" for "allargs".  Update the code to
8235         calculate "argv" based on "allargs".  Update calls to "exec_fun"
8236         and "execvp".
8237         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
8238         order to constify "exec_file" and accept a "std::string" for
8239         "allargs".
8240         * go32-nat.c (go32_create_inferior): Likewise.
8241         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
8242         * infcmd.c (run_command_1): Constify "exec_file".  Use
8243         "std::string" for inferior arguments.
8244         * inferior.h (fork_inferior): Update prototype.
8245         * linux-nat.c (linux_nat_create_inferior): Rewrite function
8246         prototype in order to constify "exec_file" and accept a
8247         "std::string" for "allargs".
8248         * nto-procfs.c (procfs_create_inferior): Likewise.
8249         * procfs.c (procfs_create_inferior): Likewise.
8250         * remote-sim.c (gdbsim_create_inferior): Likewise.
8251         * remote.c (extended_remote_run): Update code to accept
8252         "std::string" as argument.
8253         (extended_remote_create_inferior): Rewrite function prototype in
8254         order to constify "exec_file" and accept a "std::string" for
8255         "allargs".
8256         * rs6000-nat.c (super_create_inferior): Likewise.
8257         (rs6000_create_inferior): Likewise.
8258         * target.h (struct target_ops) <to_create_inferior>: Likewise.
8259         * windows-nat.c (windows_create_inferior): Likewise.
8260
8261 2017-04-11  Pedro Alves  <palves@redhat.com>
8262
8263         * thread.c: Fix whitespace throughout.
8264
8265 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8266
8267         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
8268
8269 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
8270
8271         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
8272
8273 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
8274
8275         PR gdb/21364
8276         * osdata.c (info_osdata): Check if 'type' is an empty string
8277         instead of NULL.
8278
8279 2017-04-10  Pedro Alves  <palves@redhat.com>
8280
8281         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
8282         (ptid_to_global_thread_id, in_thread_list)
8283         (do_captured_list_thread_ids, set_resumed, set_running)
8284         (set_executing, set_stop_requested, finish_thread_state)
8285         (validate_registers_access, can_access_registers_ptid)
8286         (print_thread_info_1, switch_to_thread)
8287         (do_restore_current_thread_cleanup)
8288         (make_cleanup_restore_current_thread, thread_command)
8289         (thread_name_command): Use operator== instead of ptid_equal.
8290
8291 2017-04-10  Pedro Alves  <palves@redhat.com>
8292
8293         * thread.c (struct current_thread_cleanup) <next>: Delete field.
8294         (current_thread_cleanup_chain): Delete.
8295         (restore_current_thread_cleanup_dtor)
8296         (make_cleanup_restore_current_thread): Remove references to
8297         current_thread_cleanup_chain.
8298
8299 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
8300
8301         * msp430-tdep.c (msp430_pseudo_register_read): Never return
8302         REG_UNKNOWN.
8303
8304 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8305
8306         PR gdb/19942
8307         * gdbthread.h (thread_info::deletable): New method.
8308         (thread_info::incref): New method.
8309         (thread_info::decref): New method.
8310         (thread_info::refcount): Move it to private.
8311         * infrun.c (save_stop_context): Call inc_refcount.
8312         (release_stop_context_cleanup): Likewise.
8313         * thread.c (set_thread_exited): New function.
8314         (init_thread_list): Delete "tp" only it is deletable, otherwise
8315         call set_thread_exited.
8316         (delete_thread_1): Call set_thread_exited.
8317         (current_thread_cleanup) <inferior_pid>: Remove.
8318         <thread>: New field.
8319         (restore_current_thread_ptid_changed): Removed.
8320         (do_restore_current_thread_cleanup): Adjust.
8321         (restore_current_thread_cleanup_dtor): Don't call
8322         find_thread_ptid.
8323         (set_thread_refcount): Use dec_refcount.
8324         (make_cleanup_restore_current_thread): Adjust.
8325         (thread_apply_all_command): Call inc_refcount.
8326         (_initialize_thread): Don't call
8327         observer_attach_thread_ptid_changed.
8328
8329 2017-04-10  Yao Qi  <yao.qi@linaro.org>
8330
8331         * thread.c (delete_thread_1): Hoist code on marking thread as
8332         exited.
8333
8334 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8335
8336         * windows-nat.c (windows_detach): Initialize ptid with
8337         minus_one_ptid.
8338
8339 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8340
8341         * unittests/ptid-selftests.c: Fix erroneous assert messages.
8342
8343 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
8344
8345         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
8346         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
8347         (bfin_pseudo_register_write): Likewise
8348
8349 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
8350
8351         * common/ptid.h (struct ptid): Change to...
8352         (class ptid_t): ... this.
8353         <ptid_t>: New constructors.
8354         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
8355         matches>: New methods.
8356         <make_null, make_minus_one>: New static methods.
8357         <pid>: Rename to...
8358         <m_pid>: ...this.
8359         <lwp>: Rename to...
8360         <m_lwp>: ...this.
8361         <tid>: Rename to...
8362         <m_tid>: ...this.
8363         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
8364         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
8365         as references, move comment to class ptid_t.
8366         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
8367         ptid_t static methods.
8368         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
8369         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
8370         Take ptid arguments as references, implement using ptid_t methods.
8371         * unittests/ptid-selftests.c: New file.
8372         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8373         unittests/ptid-selftests.c.
8374         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
8375
8376 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8377
8378         * python/python.c (python_run_simple_file): Cast mode literal to
8379         non-const char pointer as expected by PyFile_FromString.
8380
8381 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
8382
8383         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
8384         minus_one_ptid and null_ptid.
8385
8386 2017-04-05  Pedro Alves  <palves@redhat.com>
8387
8388         * warning.m4 (build_warnings): Remove -Wno-write-strings.
8389         * configure: Regenerate.
8390
8391 2017-04-05  Pedro Alves  <palves@redhat.com>
8392
8393         * ada-exp.y (yyerror): Constify.
8394         * ada-lang.c (bound_name, get_selections)
8395         (ada_variant_discrim_type)
8396         (ada_variant_discrim_name, ada_value_struct_elt)
8397         (ada_lookup_struct_elt_type, is_unchecked_variant)
8398         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
8399         (catch_ada_exception_command_split)
8400         (catch_ada_assert_command_split, catch_assert_command)
8401         (ada_op_name): Constify.
8402         * ada-lang.h (ada_yyerror, get_selections)
8403         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
8404         * arc-tdep.c (arc_print_frame_cache): Constify.
8405         * arm-tdep.c (arm_skip_stub): Constify.
8406         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
8407         (gen_aggregate_elt_ref): Constify.
8408         * bcache.c (print_bcache_statistics): Constify.
8409         * bcache.h (print_bcache_statistics): Constify.
8410         * break-catch-throw.c (catch_exception_command_1):
8411         * breakpoint.c (struct ep_type_description::description):
8412         Constify.
8413         (add_solib_catchpoint): Constify.
8414         (catch_fork_command_1): Add cast.
8415         (add_catch_command): Constify.
8416         * breakpoint.h (add_catch_command, add_solib_catchpoint):
8417         Constify.
8418         * bsd-uthread.c (bsd_uthread_state): Constify.
8419         * buildsym.c (patch_subfile_names): Constify.
8420         * buildsym.h (next_symbol_text_func, patch_subfile_names):
8421         Constify.
8422         * c-exp.y (yyerror): Constify.
8423         (token::oper): Constify.
8424         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
8425         * c-varobj.c (cplus_describe_child): Constify.
8426         * charset.c (find_charset_names): Add cast.
8427         (find_charset_names): Constify array and add const_cast.
8428         * cli/cli-cmds.c (complete_command, cd_command): Constify.
8429         (edit_command): Constify.
8430         * cli/cli-decode.c (lookup_cmd): Constify.
8431         * cli/cli-dump.c (dump_memory_command, dump_value_command):
8432         Constify.
8433         (struct dump_context): Constify.
8434         (add_dump_command, restore_command): Constify.
8435         * cli/cli-script.c (get_command_line): Constify.
8436         * cli/cli-script.h (get_command_line): Constify.
8437         * cli/cli-utils.c (check_for_argument): Constify.
8438         * cli/cli-utils.h (check_for_argument): Constify.
8439         * coff-pe-read.c (struct read_pe_section_data): Constify.
8440         * command.h (lookup_cmd): Constify.
8441         * common/print-utils.c (decimal2str): Constify.
8442         * completer.c (gdb_print_filename): Constify.
8443         * corefile.c (set_gnutarget): Constify.
8444         * cp-name-parser.y (yyerror): Constify.
8445         * cp-valprint.c (cp_print_class_member): Constify.
8446         * cris-tdep.c (cris_register_name, crisv32_register_name):
8447         Constify.
8448         * d-exp.y (yyerror): Constify.
8449         (struct token::oper): Constify.
8450         * d-lang.h (d_yyerror): Constify.
8451         * dbxread.c (struct header_file_location::name): Constify.
8452         (add_old_header_file, add_new_header_file, last_function_name)
8453         (dbx_next_symbol_text, add_bincl_to_list)
8454         (find_corresponding_bincl_psymtab, set_namestring)
8455         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
8456         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
8457         * defs.h (command_line_input, print_address_symbolic)
8458         (deprecated_readline_begin_hook): Constify.
8459         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
8460         Constify.
8461         * event-top.c (handle_line_of_input): Constify and add cast.
8462         * exceptions.c (catch_errors): Constify.
8463         * exceptions.h (catch_errors): Constify.
8464         * expprint.c (print_subexp_standard, op_string, op_name)
8465         (op_name_standard, dump_raw_expression, dump_raw_expression):
8466         * expression.h (op_name, op_string, dump_raw_expression):
8467         Constify.
8468         * f-exp.y (yyerror): Constify.
8469         (struct token::oper): Constify.
8470         (struct f77_boolean_val::name): Constify.
8471         * f-lang.c (f_word_break_characters): Constify.
8472         * f-lang.h (f_yyerror): Constify.
8473         * fork-child.c (fork_inferior): Add cast.
8474         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
8475         (new_variant): Constify.
8476         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
8477         * gdbarch.c: Regenerate.
8478         * gdbcore.h (set_gnutarget): Constify.
8479         * go-exp.y (yyerror): Constify.
8480         (token::oper): Constify.
8481         * go-lang.h (go_yyerror): Constify.
8482         * go32-nat.c (go32_sysinfo): Constify.
8483         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
8484         * guile/scm-cmd.c (cmdscm_function): Constify.
8485         * guile/scm-param.c (pascm_param_value): Constify.
8486         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
8487         (h8300sx_register_name): Constify.
8488         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
8489         Constify.
8490         * ia64-tdep.c (ia64_register_names): Constify.
8491         * infcmd.c (construct_inferior_arguments): Constify.
8492         (path_command, attach_post_wait): Constify.
8493         * language.c (show_range_command, show_case_command)
8494         (unk_lang_error): Constify.
8495         * language.h (language_defn::la_error)
8496         (language_defn::la_name_of_this): Constify.
8497         * linespec.c (decode_line_2): Constify.
8498         * linux-thread-db.c (thread_db_err_str): Constify.
8499         * lm32-tdep.c (lm32_register_name): Constify.
8500         * m2-exp.y (yyerror): Constify.
8501         * m2-lang.h (m2_yyerror): Constify.
8502         * m32r-tdep.c (m32r_register_names): Constify and make static.
8503         * m68hc11-tdep.c (m68hc11_register_names): Constify.
8504         * m88k-tdep.c (m88k_register_name): Constify.
8505         * macroexp.c (appendmem): Constify.
8506         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
8507         (upgrade_type, parse_external, parse_partial_symbols)
8508         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
8509         (new_symbol): Constify.
8510         * memattr.c (mem_info_command): Constify.
8511         * mep-tdep.c (register_name_from_keyword): Constify.
8512         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
8513         Constify.
8514         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
8515         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
8516         * mi/mi-main.c (captured_mi_execute_command): Constify and add
8517         cast.
8518         (mi_execute_async_cli_command): Constify.
8519         * mips-tdep.c (mips_register_name): Constify.
8520         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
8521         (am33_register_name, am33_2_register_name)
8522         * moxie-tdep.c (moxie_register_names): Constify.
8523         * nat/linux-osdata.c (osdata_type): Constify fields.
8524         * nto-tdep.c (nto_parse_redirection): Constify.
8525         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
8526         (lookup_child_selector): Constify.
8527         (objc_methcall::name): Constify.
8528         * objc-lang.h (lookup_objc_class, lookup_child_selector)
8529         (lookup_struct_typedef): Constify.
8530         * objfiles.c (pc_in_section): Constify.
8531         * objfiles.h (pc_in_section): Constify.
8532         * p-exp.y (struct token::oper): Constify.
8533         (yyerror): Constify.
8534         * p-lang.h (pascal_yyerror): Constify.
8535         * parser-defs.h (op_name_standard): Constify.
8536         (op_print::string): Constify.
8537         (exp_descriptor::op_name): Constify.
8538         * printcmd.c (print_address_symbolic): Constify.
8539         * psymtab.c (print_partial_symbols): Constify.
8540         * python/py-breakpoint.c (stop_func): Constify.
8541         (bppy_get_expression): Constify.
8542         * python/py-cmd.c (cmdpy_completer::name): Constify.
8543         (cmdpy_function): Constify.
8544         * python/py-event.c (evpy_add_attribute)
8545         (gdbpy_initialize_event_generic): Constify.
8546         * python/py-event.h (evpy_add_attribute)
8547         (gdbpy_initialize_event_generic): Constify.
8548         * python/py-evts.c (add_new_registry): Constify.
8549         * python/py-finishbreakpoint.c (outofscope_func): Constify.
8550         * python/py-framefilter.c (get_py_iter_from_func): Constify.
8551         * python/py-inferior.c (get_buffer): Add cast.
8552         * python/py-param.c (parm_constant::name): Constify.
8553         * python/py-unwind.c (fprint_frame_id): Constify.
8554         * python/python.c (gdbpy_parameter_value): Constify.
8555         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
8556         * remote.c (memory_packet_config::name): Constify.
8557         (show_packet_config_cmd, remote_write_bytes)
8558         (remote_buffer_add_string):
8559         * reverse.c (exec_reverse_once): Constify.
8560         * rs6000-tdep.c (variant::name, variant::description): Constify.
8561         * rust-exp.y (rustyyerror): Constify.
8562         * rust-lang.c (rust_op_name): Constify.
8563         * rust-lang.h (rustyyerror): Constify.
8564         * serial.h (serial_ops::name): Constify.
8565         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
8566         (sh_sh3e_register_name, sh_sh2e_register_name)
8567         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
8568         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
8569         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
8570         (sh_sh4al_dsp_register_name): Constify.
8571         * sh64-tdep.c (sh64_register_name): Constify.
8572         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
8573         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
8574         * stabsread.c (patch_block_stabs, read_type_number)
8575         (ref_map::stabs, ref_add, process_reference)
8576         (symbol_reference_defined, define_symbol, define_symbol)
8577         (error_type, read_type, read_member_functions, read_cpp_abbrev)
8578         (read_one_struct_field, read_struct_fields, read_baseclasses)
8579         (read_tilde_fields, read_struct_type, read_array_type)
8580         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
8581         (read_huge_number, read_range_type, read_args, common_block_start)
8582         (find_name_end): Constify.
8583         * stabsread.h (common_block_start, define_symbol)
8584         (process_one_symbol, symbol_reference_defined, ref_add):
8585         * symfile.c (get_section_index, add_symbol_file_command):
8586         * symfile.h (get_section_index): Constify.
8587         * target-descriptions.c (tdesc_type::name): Constify.
8588         (tdesc_free_type): Add cast.
8589         * target.c (find_default_run_target):
8590         (add_deprecated_target_alias, find_default_run_target)
8591         (target_announce_detach): Constify.
8592         (do_option): Constify.
8593         * target.h (add_deprecated_target_alias): Constify.
8594         * thread.c (print_thread_info_1): Constify.
8595         * top.c (deprecated_readline_begin_hook, command_line_input):
8596         Constify.
8597         (init_main): Add casts.
8598         * top.h (handle_line_of_input): Constify.
8599         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
8600         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
8601         (tfind_command): Rename to ...
8602         (tfind_command_1): ... this and constify.
8603         (tfind_command): New function.
8604         (tfind_end_command, tfind_start_command): Adjust.
8605         (encode_source_string): Constify.
8606         * tracepoint.h (encode_source_string): Constify.
8607         * tui/tui-data.c (tui_partial_win_by_name): Constify.
8608         * tui/tui-data.h (tui_partial_win_by_name): Constify.
8609         * tui/tui-source.c (tui_set_source_content_nil): Constify.
8610         * tui/tui-source.h (tui_set_source_content_nil): Constify.
8611         * tui/tui-win.c (parse_scrolling_args): Constify.
8612         * tui/tui-windata.c (tui_erase_data_content): Constify.
8613         * tui/tui-windata.h (tui_erase_data_content): Constify.
8614         * tui/tui-winsource.c (tui_erase_source_content): Constify.
8615         * tui/tui.c (tui_enable): Add cast.
8616         * utils.c (defaulted_query): Constify.
8617         (init_page_info): Add cast.
8618         (puts_debug, subset_compare): Constify.
8619         * utils.h (subset_compare): Constify.
8620         * varobj.c (varobj_format_string): Constify.
8621         * varobj.h (varobj_format_string): Constify.
8622         * vax-tdep.c (vax_register_name): Constify.
8623         * windows-nat.c (windows_detach): Constify.
8624         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
8625         * xml-support.c (gdb_xml_end_element): Constify.
8626         * xml-tdesc.c (tdesc_start_reg): Constify.
8627         * xstormy16-tdep.c (xstormy16_register_name): Constify.
8628         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
8629         * xtensa-tdep.h (xtensa_register_t::name): Constify.
8630
8631 2017-04-05  Pedro Alves  <palves@redhat.com>
8632
8633         * proc-api.c (struct trans): Constify.
8634         (procfs_note): Constify.
8635         * proc-events.c (struct trans, syscall_table):
8636         * proc-flags.c (struct trans): Constify.
8637         * proc-utils.h (procfs_note): Constify.
8638         * proc-why.c (struct trans): Constify.
8639         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
8640         (procfs_detach): Constify.
8641         * sol-thread.c (struct string_map): Constify.
8642         (td_err_string, td_state_string): Constify.
8643
8644 2017-04-05  Pedro Alves  <palves@redhat.com>
8645
8646         * proc-api.c (procfs_filename): Don't initialize
8647         procfs_filename.
8648         (prepare_to_trace): Assume procfs_filename is non-NULL.
8649         (_initialize_proc_api): Give procfs_filename a default value here.
8650
8651 2017-04-05  Pedro Alves  <palves@redhat.com>
8652
8653         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
8654         'cond_string' parameter.
8655         (extract_exception_regexp): Constify 'string' parameter.
8656         (catch_exception_command_1): Constify.
8657         * breakpoint.c (init_catchpoint)
8658         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
8659         parameter.
8660         (ep_parse_optional_if_clause, catch_fork_command_1)
8661         (catch_exec_command_1): Constify.
8662         * breakpoint.h (init_catchpoint): Constify 'cond_string'
8663         parameter.
8664         (ep_parse_optional_if_clause): Constify.
8665         * cli/cli-utils.c (remove_trailing_whitespace)
8666         (check_for_argument): Constify.
8667         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
8668         non-const overload.
8669         (check_for_argument): Likewise.
8670
8671 2017-04-05  Pedro Alves  <palves@redhat.com>
8672
8673         * event-top.c (command_line_handler): Add cast to execute_command
8674         call.
8675         * record-btrace.c (cmd_record_btrace_bts_start)
8676         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8677         (cmd_record_btrace_start): Add cast to execute_command call.
8678         * record-full.c (record_full_goto_insn):
8679         * record.c (record_start, record_stop): Add cast to
8680         execute_command_to_string calls.
8681         (cmd_record_start): Add cast to execute_command calls.
8682
8683 2017-04-05  Pedro Alves  <palves@redhat.com>
8684
8685         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8686         static inline function.
8687         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8688         array and use gdb_PyArg_ParseTupleAndKeywords.
8689         * python/py-cmd.c (cmdpy_init): Likewise.
8690         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8691         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8692         (infpy_search_memory): Likewise.
8693         * python/py-objfile.c (objfpy_add_separate_debug_file)
8694         (gdbpy_lookup_objfile): Likewise.
8695         * python/py-symbol.c (gdbpy_lookup_symbol)
8696         (gdbpy_lookup_global_symbol): Likewise.
8697         * python/py-type.c (gdbpy_lookup_type): Likewise.
8698         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8699         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8700         Likewise.
8701
8702 2017-04-05  Pedro Alves  <palves@redhat.com>
8703
8704         * python/python-internal.h (gdb_PyGetSetDef): New type.
8705         * python/py-block.c (block_object_getset)
8706         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8707         * python/py-event.c (event_object_getset)
8708         (finish_breakpoint_object_getset): Likewise.
8709         * python/py-inferior.c (inferior_object_getset): Likewise.
8710         * python/py-infthread.c (thread_object_getset): Likewise.
8711         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8712         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8713         * python/py-objfile.c (objfile_getset): Likewise.
8714         * python/py-progspace.c (pspace_getset): Likewise.
8715         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8716         Likewise.
8717         * python/py-record.c (recpy_record_getset): Likewise.
8718         * python/py-symbol.c (symbol_object_getset): Likewise.
8719         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8720         Likewise.
8721         * python/py-type.c (type_object_getset, field_object_getset):
8722         Likewise.
8723         * python/py-value.c (value_object_getset): Likewise.
8724
8725 2017-04-05  Pedro Alves  <palves@redhat.com>
8726
8727         * python/python-internal.h (gdb_PyObject_CallMethod)
8728         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8729         New functions.
8730         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8731         (PySys_GetObject, PySys_SetPath): New macros.
8732
8733 2017-04-05  Pedro Alves  <palves@redhat.com>
8734
8735         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8736         info_osdata_command.
8737         * osdata.c (info_osdata_command): Rename to ...
8738         (info_osdata): ... this.  Constify 'type' parameter, and remove
8739         the 'from_tty' parameter.  Accept NULL TYPE.
8740         (info_osdata_command): New function.
8741         * osdata.h (info_osdata_command): Remove declaration.
8742         (info_osdata): New declaration.
8743
8744 2017-04-05  Pedro Alves  <palves@redhat.com>
8745
8746         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8747         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8748         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8749         parameter.
8750         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8751         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8752         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8753         parameter.
8754         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8755         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8756         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8757         (mi_cmd_file_list_exec_source_files)
8758         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8759         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8760         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8761         parameter.
8762         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8763         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8764         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8765         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8766         (mi_cmd_stack_info_frame): Constify 'command' parameter.
8767         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8768         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8769         'command' parameter.
8770         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8771         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8772         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8773         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8774         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8775         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8776         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8777         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8778         (mi_cmd_var_set_update_range): Constify 'command' parameter.
8779         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8780         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8781         parameter.
8782         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8783         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8784         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8785         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8786         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8787         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8788         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8789         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8790         (mi_cmd_data_list_changed_registers)
8791         (mi_cmd_data_write_register_values)
8792         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8793         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8794         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8795         (mi_cmd_list_features, mi_cmd_list_target_features)
8796         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8797         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8798         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8799         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8800         (mi_cmd_trace_frame_collected): Constify 'command'
8801         parameter.
8802         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8803         'command' parameter.
8804
8805 2017-04-05  Pedro Alves  <palves@redhat.com>
8806
8807         * ada-lang.c (ada_completer_word_break_characters): Now a const
8808         array.
8809         (ada_get_gdb_completer_word_break_characters): Constify.
8810         * completer.c (gdb_completer_command_word_break_characters)
8811         (gdb_completer_file_name_break_characters)
8812         (gdb_completer_quote_characters): Now const arrays.
8813         (get_gdb_completer_quote_characters): Constify.
8814         (set_rl_completer_word_break_characters): New function.
8815         (set_gdb_completion_word_break_characters)
8816         (complete_line_internal): Use it.
8817         * completer.h (get_gdb_completer_quote_characters): Constify.
8818         (set_rl_completer_word_break_characters): Declare.
8819         * f-lang.c (f_word_break_characters): Constify.
8820         * language.c (default_word_break_characters): Constify.
8821         * language.h (language_defn::la_word_break_characters): Constify.
8822         (default_word_break_characters): Constify.
8823         * top.c (init_main): Use set_rl_completer_word_break_characters.
8824
8825 2017-04-05  Pedro Alves  <palves@redhat.com>
8826
8827         * aix-thread.c (aix_thread_pid_to_str)
8828         (aix_thread_extra_thread_info): Constify.
8829         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8830         * bsd-uthread.c (bsd_uthread_extra_thread_info)
8831         (bsd_uthread_pid_to_str): Constify.
8832         * corelow.c (core_pid_to_str): Constify.
8833         * darwin-nat.c (darwin_pid_to_str): Constify.
8834         * fbsd-nat.c (fbsd_pid_to_str): Constify.
8835         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8836         Constify.
8837         * gnu-nat.c (gnu_pid_to_str): Constify.
8838         * go32-nat.c (go32_pid_to_str): Constify.
8839         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8840         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8841         * inferior.c (inferior_pid_to_str): Constify.
8842         * linux-nat.c (linux_nat_pid_to_str): Constify.
8843         * linux-tdep.c (linux_core_pid_to_str): Constify.
8844         * linux-thread-db.c (thread_db_pid_to_str)
8845         (thread_db_extra_thread_info): Constify.
8846         * nto-tdep.c (nto_extra_thread_info): Constify.
8847         * nto-tdep.h (nto_extra_thread_info): Constify.
8848         * obsd-nat.c (obsd_pid_to_str): Constify.
8849         * procfs.c (procfs_pid_to_str): Constify.
8850         * ravenscar-thread.c (ravenscar_extra_thread_info)
8851         (ravenscar_pid_to_str): Constify.
8852         * remote-sim.c (gdbsim_pid_to_str): Constify.
8853         * remote.c (remote_threads_extra_info, remote_pid_to_str):
8854         Constify.
8855         * sol-thread.c (solaris_pid_to_str): Constify.
8856         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8857         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8858         * target.c (default_pid_to_str, target_pid_to_str)
8859         (normal_pid_to_str, default_pid_to_str): Constify.
8860         * target.h (target_ops::to_pid_to_str)
8861         (target_ops::to_extra_thread_info): Constify.
8862         (target_pid_to_str, normal_pid_to_str): Constify.
8863         * windows-nat.c (windows_pid_to_str): Constify.
8864         * gdbarch.sh (core_pid_to_str): Constify.
8865         * target-delegates.c: Regenerate.
8866         * gdbarch.h, gdbarch.c: Regenerate.
8867
8868 2017-04-05  Pedro Alves  <palves@redhat.com>
8869
8870         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8871         the memory of the temporary warning_pre_print override.
8872         * utils.c (warning_pre_print): Constify.
8873         * utils.h (warning_pre_print): Constify.
8874
8875 2017-04-05  Pedro Alves  <palves@redhat.com>
8876
8877         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8878         (shell_command): New function.
8879         (make_command): Use std::string.
8880         (init_cli_cmds): Register shell_command instead of shell_escape.
8881
8882 2017-04-05  Pedro Alves  <palves@redhat.com>
8883
8884         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8885         * tracepoint.c (default_collect): Don't initialize.
8886
8887 2017-04-05  Pedro Alves  <palves@redhat.com>
8888
8889         * macroexp.c (macro_buffer::shared): Now a bool.
8890         (init_buffer): Update.
8891         (init_shared_buffer): Constify 'addr' parameter.
8892         (substitute_args, expand, macro_expand, macro_expand_next): Remove
8893         casts.
8894
8895 2017-04-05  Pedro Alves  <palves@redhat.com>
8896
8897         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8898         * disasm.c (set_disassembler_options): Constify local.
8899         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8900
8901 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
8902
8903         PR gdb/21352
8904         * tracefile.c (tsave_command): Fix argument parsing for '-r'
8905         option.
8906
8907 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8908
8909         * frame.c (frame_unwind_register_unsigned): Call
8910         frame_unwind_register_value.
8911
8912 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8913
8914         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8915         Use gdb_test_multiple, and don't match anchor.
8916
8917 2017-04-05  Pedro Alves  <palves@redhat.com>
8918
8919         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8920         (Write After Approval): Remove Simon Marchi.
8921
8922 2017-04-05  Pedro Alves  <palves@redhat.com>
8923
8924         * common/gdb_optional.h (optional::optional): Make constexpr and
8925         initialize m_dummy.
8926
8927 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8928
8929         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8930         (amd64fbsd_jmp_buf_reg_offset): Remove.
8931         (amd64fbsd_supply_uthread): Remove function.
8932         (amd64fbsd_collect_uthread): Remove function.
8933         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8934         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8935         (x86_64-*-freebsd*): Remove bsd-uthread.o.
8936         (fbsd-nat.c): Update comment.
8937         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8938         (i386fbsd_jmp_buf_reg_offset): Remove.
8939         (i386fbsd_supply_uthread): Remove function.
8940         (i386fbsd_collect_uthread): Remove function.
8941         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8942
8943 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8944
8945         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8946         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8947         * NEWS: Mention that support for FreeBSD/alpha was removed.
8948         * alpha-fbsd-tdep.c: Delete file.
8949         * config/alpha/fbsd.mh: Delete file.
8950         * configure.host: Delete alpha*-*-freebsd* and
8951         alpha*-*-kfreebsd*-gnu.
8952         * configure.tgt: Delete alpha*-*-freebsd* and
8953         alpha*-*-kfreebsd*-gnu.
8954
8955 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8956
8957         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8958         amd64bsd_store_inferior_registers): Use ptid from regcache.
8959
8960 2017-04-04  Pedro Alves  <palves@redhat.com>
8961
8962         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
8963         data fields, make them private and add "m_" prefixes.
8964         (lnp_state_machine::lnp_state_machine): New ctor.
8965         (record_line, check_line_address, handle_set_discriminator)
8966         (handle_set_address, handle_advance_pc, handle_special_opcode)
8967         (handle_advance_line, handle_set_file, handle_negate_stmt)
8968         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8969         (end_sequence, advance_line): New methods.
8970         (m_gdbarch, m_record_lines_p): New fields.
8971         (lnp_reader_state): Delete.
8972         (dwarf_record_line): Rename to ...
8973         (lnp_state_machine::record_line): ... adjust.
8974         (init_lnp_state_machine): Delete.
8975         (lnp_state_machine::lnp_state_machine): New.
8976         (check_line_address): Rename to ...
8977         (lnp_state_machine::check_line_address): This.
8978         (dwarf_decode_lines_1): Remove reference to "reader_state".
8979         Adjust lnp_state_machine having a non-default ctor.  Use bool.
8980         State machine internal state manipulation moved to
8981         lnp_state_machine methods.
8982
8983 2017-04-04  Pedro Alves  <palves@redhat.com>
8984
8985         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8986         unittests/offset-type-selftests.c.
8987         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8988         * common/offset-type.h: New file.
8989         * common/preprocessor.h: New file.
8990         * common/traits.h: New file.
8991         * common/valid-expr.h: New file.
8992         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
8993         sect_offset and cu_offset strong typedefs throughout.
8994         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8995         typedefs throughout.
8996         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
8997         sect_offset and cu_offset strong typedefs throughout.
8998         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8999         typedefs throughout.
9000         * gdbtypes.h: Include "common/offset-type.h".
9001         (cu_offset): Now an offset type (strong typedef) instead of a
9002         struct.
9003         (sect_offset): Likewise.
9004         (union call_site_parameter_u): Rename "param_offset" field to
9005         "param_cu_off".
9006         * unittests/offset-type-selftests.c: New file.
9007
9008 2017-04-04  Pedro Alves  <palves@redhat.com>
9009
9010         * common/underlying.h: New file.
9011         * dwarf2read.c: Include "common/gdb_optional.h" and
9012         "common/underlying.h".
9013         (dir_index, file_name_index): New types.
9014         (file_entry): Use them.
9015         (file_entry::include): Use to_underlying.
9016         (line_header::add_file_name): Use dir_index.
9017         (read_formatted_entries): Use gdb::optional.  Read form before
9018         writting to file_entry.
9019         (dwarf_decode_line_header): Use dir_index.
9020         (lnp_state_machine::current_file): Use to_underlying.
9021         (lnp_state_machine::file): Change type to file_name_index.
9022         (dwarf_record_line): Use to_underlying.
9023         (init_lnp_state_machine): Use file_name_index.
9024         (dwarf_decode_lines_1): Use dir_index and file_name_index.
9025
9026 2017-04-04  Pedro Alves  <palves@redhat.com>
9027
9028         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
9029         operator bool, has_value and get methods.
9030
9031 2017-04-04  Pedro Alves  <palves@redhat.com>
9032
9033         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
9034         fields.
9035         (line_header): Initialize all data fields.  Change type of
9036         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
9037         Change type of include_dirs to std::vector<const char *>.  Remove
9038         num_include_dirs, include_dirs_size.  Change type of file_names to
9039         std::vector<file_entry>.  Remove num_file_names, file_names_size.
9040         (line_header::line_header): New.
9041         (line_header::add_include_dir, line_header::add_file_name): New
9042         methods.
9043         (line_header::include_dir_at): Remove NULL check.
9044         (line_header::file_name_at): Add const overload.
9045         (line_header_up): New unique_ptr typedef.
9046         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
9047         std::vector.  Remove free_line_header call.
9048         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
9049         free_line_header call.
9050         (free_cu_line_header): Delete.
9051         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
9052         (setup_type_unit_groups): Use line_header_up instead of cleanups.
9053         Adjust to use std::vector.
9054         (free_line_header): Delete.
9055         (free_line_header_voidp): Use delete.
9056         (add_include_dir): Replace with ...
9057         (line_header::add_include_dir): ... this method.  Use std::vector.
9058         (add_file_name): Replace with ...
9059         (line_header::add_file_name): ... this method.  Use std::vector.
9060         (add_include_dir_stub): Delete.
9061         (read_formatted_entries): Remove memset.
9062         (dwarf_decode_line_header): Return a line_header_up instead of a
9063         raw pointer.  Remove cleanup handling.  Pass lambdas to
9064         read_formatted_entries.  Adjust to use line_header methods.
9065         (dwarf_decode_lines_1): Adjust to use line_header methods.
9066         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
9067         use std::vector.
9068
9069 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
9070
9071         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
9072         instead of struct ptid.
9073
9074 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
9075
9076         * frame.c (get_frame_register_bytes): Unwind using value.
9077         (put_frame_register_bytes): Likewise.
9078
9079 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
9080
9081         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
9082         aggregate-like.
9083
9084 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
9085
9086         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
9087
9088 2017-03-29  Yao Qi  <yao.qi@linaro.org>
9089
9090         * gdbthread.h (struct thread_info): Declare constructor and
9091         destructor.  Add some in-class member initializers.
9092         * thread.c (free_thread): Remove.
9093         (init_thread_list): Call delete instead of free_thread.
9094         (new_thread): Call thread_info constructor.
9095         (thread_info::thread_info): New function.
9096         (thread_info::~thread_info): New function.
9097         (delete_thread_1): Call delete instead of free_thread.
9098         (make_cleanup_restore_current_thread): Move tp and frame to
9099         inner block.
9100
9101 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9102
9103         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
9104         (arc_skip_prologue): Likewise.
9105         (arc_make_frame_cache): Likewise.
9106         (arc_pv_get_operand): New function.
9107         (arc_is_in_prologue): Likewise.
9108         (arc_analyze_prologue): Likewise.
9109         (arc_print_frame_cache): Likewise.
9110         (MAX_PROLOGUE_LENGTH): New constant.
9111
9112 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9113
9114         * configure.tgt: Add arc-insn.o.
9115         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
9116         (dump_arc_instruction_command): New function.
9117         (arc_fprintf_disasm): Likewise.
9118         (arc_disassemble_info): Likewise.
9119         (arc_insn_get_operand_value): Likewise.
9120         (arc_insn_get_operand_value_signed): Likewise.
9121         (arc_insn_get_memory_base_reg): Likewise.
9122         (arc_insn_get_memory_offset): Likewise.
9123         (arc_insn_get_branch_target): Likewise.
9124         (arc_insn_dump): Likewise.
9125         (arc_insn_get_linear_next_pc): Likewise.
9126         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
9127         (arc_disassemble_info): Likewise.
9128         (arc_insn_get_branch_target): Likewise.
9129         (arc_insn_get_linear_next_pc): Likewise.
9130         * NEWS: Mention new "maint print arc arc-instruction".
9131
9132 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9133
9134         * arc-tdep (maintenance_print_arc_list): New variable.
9135         (maintenance_print_arc_command): New function.
9136
9137 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
9138
9139         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
9140         Add "limm" and "reserved".
9141         (arc_cannot_fetch_register, arc_cannot_store_register): Add
9142         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
9143         * arc-tdep.h (arc_regnum): Likewise.
9144
9145 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9146
9147         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9148         for THREADPTR register.
9149         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
9150         register.
9151         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
9152         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
9153         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
9154
9155 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9156
9157         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
9158         registers above gdbarch_num_regs (gdbarch) as privileged in
9159         call0 ABI.
9160
9161 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9162
9163         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
9164         for a single specified register or for all registers in
9165         a0_base..a0_base + C0_NREGS range.
9166         (supply_gregset_reg): Call regcache_raw_supply for a single
9167         specified register or for all registers in a0_base..a0_base +
9168         C0_NREGS range.
9169
9170 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9171
9172         * arch/xtensa.h (C0_NREGS): Add definition.
9173         * xtensa-tdep.c (C0_NREGS): Remove definition.
9174
9175 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
9176
9177         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
9178         Drop xtensa_default_isa initialization.
9179         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
9180
9181 2017-03-27  Pedro Alves  <palves@redhat.com>
9182
9183         * dwarf2read.c (file_entry) <dir_index>: Add comment.
9184         (file_entry::include_dir): New method.
9185         (line_header::include_dir_at, line_header::file_name_at): New
9186         methods.
9187         (setup_type_unit_groups, setup_type_unit_groups)
9188         (psymtab_include_file_name): Simplify using the new methods.
9189         (lnp_state_machine) <the_line_header>: New field.
9190         <file>: Add comment.
9191         (lnp_state_machine::current_file): New method.
9192         (dwarf_record_line): Simplify using the new methods.
9193         (init_lnp_state_machine): Initialize the "the_line_header" field.
9194         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
9195         Simplify using the new methods.
9196
9197 2017-03-27  Pedro Alves  <palves@redhat.com>
9198
9199         * cp-name-parser.y (make_empty): Delete.
9200         (demangler_special, nested_name, ptr_operator, array_indicator)
9201         (direct_declarator, declarator_1): Use fill_comp instead of
9202         make_empty.
9203
9204 2017-03-27  Pedro Alves  <palves@redhat.com>
9205
9206         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
9207         to ATTRIBUTE_PRINTF.
9208         * solib-target.c (library_list_start_list): Print "string" not
9209         "version".
9210         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
9211         gdb_xml_error call.
9212
9213 2017-03-27  Pedro Alves  <palves@redhat.com>
9214
9215         * dwarf2read.c (struct file_and_directory): New.
9216         (dwarf2_get_dwz_file): Adjust to use std::string.
9217         (dw2_get_file_names_reader): Adjust to use file_and_directory.
9218         (find_file_and_directory): Adjust to return a file_and_directory
9219         object.
9220         (read_file_scope): Adjust to use file_and_directory.  Remove
9221         make_cleanup/do_cleanups calls.
9222         (open_and_init_dwp_file): Adjust to use std::string.  Remove
9223         make_cleanup/do_cleanups calls.
9224         * python/python.c (do_start_initialization): Adjust to ldirname
9225         returning a std::string.
9226         * utils.c (ldirname): Now returns a std::string.
9227         * utils.h (ldirname): Change return type to std::string.
9228         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
9229         returning a std::string.
9230         * xml-tdesc.c (file_read_description_xml): Likewise.
9231
9232 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
9233
9234         * regcache.c (regcache_debug_print_register): New function.
9235         * regcache.h (regcache_debug_print_register): New declaration.
9236         * target.c (debug_print_register): Remove.
9237         (target_fetch_registers): Call regcache_debug_print_register.
9238         (target_store_registers): Likewise.
9239
9240 2017-03-24  Pádraig Brady  <pbrady@fb.com>
9241
9242         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
9243         reference beyond the 'lh->include_dirs' array before accessing to
9244         it.
9245         (psymtab_include_file_name): Likewise.
9246         (dwarf_decode_lines_1): Likewise.
9247         (dwarf_decode_lines): Likewise.
9248         (file_file_name): Likewise.
9249
9250 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
9251
9252         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
9253         inferior_ptid.
9254         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9255         ps_lsetfpregs): Likewise.
9256         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
9257         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
9258         ps_lsetfpregs): Likewise.
9259         * target.c (target_fetch_registers, target_store_registers):
9260         Remove asserts.
9261
9262 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
9263
9264         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
9265
9266 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9267
9268         * aarch64-tdep.c (aarch64_process_record_test): Declare.
9269         (_initialize_aarch64_tdep): Register it.
9270         (aarch64_record_load_store): Handle PRFM instruction.
9271         (aarch64_process_record_test): New function.
9272
9273 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9274
9275         * aarch64-tdep.c (aarch64_record_load_store): Fix code
9276         indentation.
9277
9278 2017-03-23  Yao Qi  <yao.qi@linaro.org>
9279
9280         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
9281
9282 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9283
9284         python/python.c (do_start_initialization): Fix memory leak.
9285
9286 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9287
9288         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
9289         using get_ptrace_pid.
9290         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
9291         inferior_ptid.
9292         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
9293         inferior_ptid instead of pid.
9294
9295 2017-03-22  Yao Qi  <yao.qi@linaro.org>
9296
9297         * aarch64-tdep.c: Wrap locally used classes in anonymous
9298         namespace.
9299         * arm-tdep.c: Likewise.
9300         * linespec.c: Likewise.
9301         * ui-out.c: Likewise.
9302
9303 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
9304
9305         PR gdb/19637
9306         * python/lib/gdb/printer/bound_registers.py: Import sys.
9307
9308 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9309
9310         * windows-nat.c (do_windows_fetch_inferior_registers): Add
9311         windows_thread_info parameter and use it instead of
9312         current_thread.
9313         (windows_fetch_inferior_registers): Don't set current_thread,
9314         pass the thread to do_windows_fetch_inferior_registers.  Use
9315         ptid from regcache instead of inferior_ptid.
9316         (do_windows_store_inferior_registers): Add windows_thread_info
9317         parameter and use it instead of current_thread.
9318         (windows_store_inferior_registers): Don't set current_thread,
9319         pass the thread to do_windows_store_inferior_registers.  Use
9320         ptid from regcache instead of inferior_ptid.
9321
9322 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
9323
9324         * ser-mingw.c (ser_windows_raw): Remove reference to
9325         struct serial::current_timeout.
9326
9327 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
9328
9329         PR tdep/20928
9330         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
9331         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
9332         (sparc64_fsr_type): Fix %fsr decoding.
9333
9334 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
9335
9336         * python/py-record-btrace.c (btpy_insn_data): Change return type
9337         for Python 2.
9338
9339 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9340
9341         * spu-linux-nat.c (spu_fetch_inferior_registers,
9342         spu_store_inferior_registers): Use ptid from regcache, set and
9343         restore inferior_ptid.
9344         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
9345         Likewise.
9346
9347 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
9348
9349         * i386-linux-nat.c (fetch_register, store_register,
9350         i386_linux_fetch_inferior_registers,
9351         i386_linux_store_inferior_registers): Use ptid from regcache.
9352         * ia64-linux-nat.c (ia64_linux_fetch_register,
9353         ia64_linux_store_register): Likewise.
9354         * inf-ptrace.c (inf_ptrace_fetch_register,
9355         inf_ptrace_store_register): Likewise.
9356         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
9357         m32r_linux_store_inferior_registers): Likewise.
9358         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
9359         m68kbsd_store_inferior_registers): Likewise.
9360         * m68k-linux-nat.c (fetch_register, store_register,
9361         m68k_linux_fetch_inferior_registers,
9362         m68k_linux_store_inferior_registers): Likewise.
9363         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
9364         m88kbsd_store_inferior_registers): Likewise.
9365         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
9366         mips_fbsd_store_inferior_registers): Likewise.
9367         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
9368         mips64_linux_regsets_store_registers): Likewise.
9369         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
9370         mipsnbsd_store_inferior_registers): Likewise.
9371         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
9372         mips64obsd_store_inferior_registers): Likewise.
9373         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
9374         Likewise.
9375         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
9376         ppcfbsd_store_inferior_registers): Likewise.
9377         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
9378         ppc_linux_store_inferior_registers): Likewise.
9379         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
9380         ppcnbsd_store_inferior_registers): Likewise.
9381         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
9382         ppcobsd_store_registers): Likewise.
9383         * procfs.c (procfs_fetch_registers, procfs_store_registers):
9384         Likewise.
9385         * ravenscar-thread.c (ravenscar_fetch_registers,
9386         ravenscar_store_registers, ravenscar_prepare_to_store):
9387         Likewise.
9388         * record-btrace.c (record_btrace_fetch_registers,
9389         record_btrace_store_registers, record_btrace_prepare_to_store):
9390         Likewise.
9391         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
9392         Lookup inferior using ptid from regcache, instead of
9393         current_inferior.
9394         * remote.c (remote_fetch_registers, remote_store_registers): Use
9395         ptid from regcache.
9396         * rs6000-nat.c (fetch_register, store_register): Likewise.
9397         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
9398         s390_linux_store_inferior_registers): Likewise.
9399         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
9400         shnbsd_store_inferior_registers): Likewise.
9401         * sol-thread.c (sol_thread_fetch_registers,
9402         sol_thread_store_registers): Likewise.
9403         * sparc-nat.c (sparc_fetch_inferior_registers,
9404         sparc_store_inferior_registers): Likewise.
9405         * tilegx-linux-nat.c (fetch_inferior_registers,
9406         store_inferior_registers): Likewise.
9407         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
9408         vaxbsd_store_inferior_registers): Likewise.
9409         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
9410         store_xtregs): Likewise.
9411
9412 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9413
9414         PR gdb/14441
9415         * NEWS: Mention support for rvalue references in GDB and python.
9416         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
9417         supports both lvalue and rvalue references.
9418
9419 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9420
9421         PR gdb/14441
9422         * gdbtypes.c (rank_one_type): Implement overloading
9423         resolution rules regarding rvalue references.
9424
9425 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9426
9427         PR gdb/14441
9428         * aarch64-tdep.c (aarch64_type_align)
9429         (aarch64_extract_return_value, aarch64_store_return_value): Change
9430         lvalue reference type checks to general reference type checks.
9431         * amd64-tdep.c (amd64_classify): Likewise.
9432         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
9433         Likewise.
9434         * arm-tdep.c (arm_type_align, arm_extract_return_value)
9435         (arm_store_return_value): Likewise.
9436         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
9437         * c-typeprint.c (c_print_type): Likewise.
9438         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
9439         (cplus_number_of_children, cplus_describe_child): Likewise.
9440         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
9441         * completer.c (expression_completer): Likewise.
9442         * cp-support.c (make_symbol_overload_list_adl_namespace):
9443         Likewise.
9444         * darwin-nat-info.c (info_mach_region_command): Likewise.
9445         * dwarf2loc.c (entry_data_value_coerce_ref)
9446         (value_of_dwarf_reg_entry): Likewise.
9447         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
9448         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
9449         Likewise.
9450         * findvar.c (extract_typed_address, store_typed_address):
9451         Likewise.
9452         * gdbtypes.c (rank_one_type): Likewise.
9453         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
9454         * infcall.c (value_arg_coerce): Likewise.
9455         * language.c (pointer_type): Likewise.
9456         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
9457         Likewise.
9458         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
9459         * mn10300-tdep.c (mn10300_type_align): Likewise.
9460         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
9461         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
9462         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
9463         Likewise.
9464         * printcmd.c (print_formatted, x_command): Likewise.
9465         * python/py-type.c (typy_get_composite, typy_template_argument):
9466         Likewise.
9467         * python/py-value.c (valpy_referenced_value)
9468         (valpy_get_dynamic_type, value_has_field): Likewise.
9469         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
9470         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
9471         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
9472         * spu-tdep.c (spu_scalar_value_p): Likewise.
9473         * symtab.c (lookup_symbol_aux): Likewise.
9474         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
9475         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
9476         Likewise.
9477         * valops.c (value_cast_pointers, value_cast)
9478         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
9479         (value_struct_elt, value_struct_elt_bitpos)
9480         (value_find_oload_method_list, find_overload_match)
9481         (value_rtti_indirect_type): Likewise.
9482         * valprint.c (val_print_scalar_type_p, generic_val_print):
9483         Likewise.
9484         * value.c (value_actual_type, value_as_address, unpack_long)
9485         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
9486         (coerce_ref): Likewise.
9487         * varobj.c (varobj_get_value_type): Likewise.
9488
9489 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9490
9491         PR gdb/14441
9492         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
9493         table of constants.
9494         * python/lib/gdb/command/explore.py: Support exploring values
9495         of rvalue reference types.
9496         * python/lib/gdb/types.py: Implement get_basic_type() for
9497         rvalue reference types.
9498         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
9499         constant.
9500         * python/py-value.c (valpy_getitem): Add an rvalue reference
9501         check.
9502         (valpy_reference_value): Add new parameter "refcode".
9503         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
9504         New wrappers for valpy_reference_value().
9505         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9506         (gdbpy_invoke_xmethod): Likewise.
9507
9508 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9509
9510         PR gdb/14441
9511         * dwarf2read.c (process_die, read_type_die_1): Handle the
9512         DW_TAG_rvalue_reference_type DIE.
9513         (read_tag_reference_type): Add new parameter "refcode".
9514
9515 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9516
9517         PR gdb/14441
9518         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
9519         (c_type_print_modifier, c_type_print_varspec_suffix)
9520         (c_type_print_base): Support printing rvalue reference types.
9521         * c-valprint.c (c_val_print, c_value_print): Support printing
9522         rvalue reference values.
9523
9524 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9525
9526         PR gdb/14441
9527         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
9528         typename.
9529         * cp-support.c (replace_typedefs): Handle
9530         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
9531         * python/py-type.c (typy_lookup_type): Likewise.
9532
9533 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9534
9535         PR gdb/14441
9536         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
9537         * parse.c (insert_type): Change assert statement.
9538         (follow_types): Handle rvalue reference types.
9539         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
9540         constant.
9541
9542 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9543
9544         PR gdb/14441
9545         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
9546         value_ref() interface.
9547         * c-valprint.c (c_value_print): Likewise.
9548         * infcall.c (value_arg_coerce): Likewise.
9549         * python/py-value.c (valpy_reference_value): Likewise.
9550         * valops.c (value_cast, value_reinterpret_cast)
9551         (value_dynamic_cast, typecmp): Likewise.
9552         (value_ref): Parameterize by kind of return value reference type.
9553         * value.h (value_ref): Add new parameter "refcode".
9554
9555 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9556
9557         PR gdb/14441
9558         * dwarf2read.c (read_tag_reference_type): Use
9559         lookup_lvalue_reference_type() instead of lookup_reference_type().
9560         * eval.c (evaluate_subexp_standard): Likewise.
9561         * f-exp.y: Likewise.
9562         * gdbtypes.c (make_reference_type, lookup_reference_type):
9563         Generalize with rvalue reference types.
9564         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
9565         convenience wrappers for lookup_reference_type().
9566         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
9567         reference kind parameter.
9568         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
9569         wrappers for lookup_reference_type().
9570         * guile/scm-type.c (gdbscm_type_reference): Use
9571         lookup_lvalue_reference_type() instead of lookup_reference_type().
9572         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
9573         * parse.c (follow_types): Likewise.
9574         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
9575         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
9576         Likewise.
9577         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
9578         (gdbpy_invoke_xmethod): Likewise.
9579         * stabsread.c: Provide extra argument to make_reference_type()
9580         call.
9581         * valops.c (value_ref, value_rtti_indirect_type): Use
9582         lookup_lvalue_reference_type() instead of lookup_reference_type().
9583
9584 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
9585
9586         PR gdb/14441
9587         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
9588         (TYPE_IS_REFERENCE): New macro.
9589         (struct type): Add rvalue_reference_type field.
9590         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
9591
9592 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9593
9594         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
9595         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
9596         New function definition.
9597         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
9598         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
9599         New function declaration.
9600         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
9601         * mi/mi-interp.h: New file.
9602         * solib.c (info_sharedlibrary_command): Replace for loop with
9603         ALL_SO_LIBS macro
9604         * solib.h (update_solib_list): New function declaration.
9605         (so_list_head): Move macro.
9606         * solist.h (ALL_SO_LIBS): New macro.
9607
9608 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
9609
9610         * infcmd.c (post_create_inferior): Remove unused argument in
9611         call to solib_add.
9612         * remote.c (remote_start_remote): Likewise.
9613         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
9614         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
9615         (enable_break): Likewise.
9616         * solib.c (update_solib_list): Remove unused target argument
9617         and its documentation.
9618         (solib_add): Remove unused target argument.  Remove unused
9619         argument in call to update_solib_list.
9620         (info_sharedlibrary_command): Remove unused argument in call
9621         to update_solib_list.
9622         (sharedlibrary_command): Remove unused argument in call to
9623         solib_add.
9624         (handle_solib_event): Likewise.
9625         (reload_shared_libraries): Likewise.
9626         * solib.h (solib_add): Remove unused target argument.
9627
9628 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9629
9630         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
9631         (s390_displaced_step_fixup): Cover relative branches with the
9632         default fixup handling.  This fixes lack of support for some
9633         relative branch instructions.
9634
9635 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9636
9637         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
9638         ptid from regcache.
9639
9640 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9641
9642         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
9643         i386_darwin_store_inferior_registers): Use ptid from regcache.
9644
9645 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9646
9647         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
9648         i386bsd_store_inferior_registers): Use ptid from regcache.
9649
9650 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9651
9652         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
9653         hppaobsd_store_registers): Use ptid from regcache.
9654
9655 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9656
9657         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
9658         hppanbsd_store_registers): Use ptid from regcache.
9659
9660 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9661
9662         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
9663         from regcache.  Use get_ptrace_pid.
9664
9665 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9666
9667         * corelow.c (get_core_register_section): Use ptid from regcache,
9668         update doc.
9669
9670 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9671
9672         * bsd-uthread.c (bsd_uthread_fetch_registers,
9673         bsd_uthread_store_registers): Use ptid from regcache, set and
9674         restore inferior_ptid.
9675
9676 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9677
9678         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9679         fetch_fp_regs, store_register, store_regs, store_fp_register,
9680         store_fp_regs): Use ptid from regcache.
9681
9682 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9683
9684         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9685         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9686         store_vfp_regs): Use ptid from regcache.
9687
9688 2017-03-17  Pedro Alves  <palves@redhat.com>
9689
9690         PR remote/21188
9691         * ser-base.c (ser_base_wait_for): Add comment.
9692         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9693         version.
9694         * ser-unix.c (hardwire_raw): Remove reference to
9695         scb->current_timeout.
9696         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9697         (hardwire_ops): Install ser_base_readchar instead of
9698         hardwire_readchar.
9699         * serial.h (struct serial) <current_timeout, timeout_remaining>:
9700         Remove fields.
9701
9702 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
9703
9704         PR gdb/19637
9705         * python/lib/gdb/printer/bound_registers.py: Add support for
9706         Python 3.
9707
9708 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9709
9710         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9711         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9712         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9713         byte_offset to subobj_byte_offset.  Fix the handling of
9714         DWARF_VALUE_STACK on big-endian targets when coming via an
9715         implicit pointer.
9716         (dwarf2_evaluate_loc_desc): Adjust call to
9717         dwarf2_evaluate_loc_desc_full.
9718         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9719         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9720
9721 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9722
9723         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9724         and REVSH instructions.
9725
9726 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9727
9728         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9729         (arm_record_test): Declare.
9730         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9731         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9732         align with the manual.
9733         (thumb_record_misc): Adjust the code order to align with the
9734         manual.
9735         (thumb2_record_decode_insn_handler): Fix instruction matching.
9736         (instruction_reader_thumb): New class.
9737         (arm_record_test): New function.
9738
9739 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9740
9741         * arm-tdep.c (abstract_memory_reader): New class.
9742         (instruction_reader): New class.
9743         (extract_arm_insn): Add argument 'reader'.  Callers updated.
9744         (decode_insn): Likewise.
9745
9746 2017-03-16  Doug Evans  <dje@google.com>
9747
9748         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9749         member.  Change type of TYPE member to SCM.  All uses updated.
9750         (lsscm_make_lazy_string_smob): Add assert.
9751         (lsscm_make_lazy_string): Flag bad length values.
9752         (lsscm_elt_type): New function.
9753         (gdbscm_lazy_string_to_value): Rewrite to use
9754         lsscm_safe_lazy_string_to_value.
9755         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9756         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9757         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
9758         in incoming type.
9759         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9760         * guile/scm-type.c (tyscm_scm_to_type): New function.
9761
9762 2017-03-15  Doug Evans  <dje@google.com>
9763
9764         PR python/17728, python/18439, python/18779
9765         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9766         member.  Change type of TYPE member to PyObject *.  All uses updated.
9767         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9768         (gdbpy_create_lazy_string_object): Flag bad length values.
9769         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9770         Handle typedefs in incoming type.
9771         (stpy_lazy_string_elt_type): New function.
9772         (gdbpy_extract_lazy_string): Call it.
9773         * python/py-value.c (valpy_lazy_string): Flag bad length values.
9774         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
9775         typedefs in incoming type.
9776
9777 2017-03-16  Doug Evans  <dje@google.com>
9778
9779         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9780         * guile/scm-type.c (tyscm_scm_to_type): New function.
9781
9782 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
9783
9784         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9785         "ULONGEST" for "skip".
9786
9787 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9788
9789         PR gdb/21220
9790         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9791         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9792         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
9793         over ptrace peek/poke until end of buffer or error.
9794
9795 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
9796
9797         * parse.c (length_of_subexp): Make static.
9798         * parser-defs.h (length_of_subexp): Remove.
9799
9800 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9801
9802         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9803         as well.
9804
9805 2017-03-14  Pedro Alves  <palves@redhat.com>
9806
9807         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9808         (main): Use std::unique_ptr.  Remove calls to
9809         cp_demangled_name_parse_free.
9810
9811 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9812
9813         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9814         alphabsd_store_inferior_registers): Use regcache->ptid instead
9815         of inferior_ptid.
9816
9817 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9818
9819         * aix-thread.c (aix_thread_fetch_registers,
9820         aix_thread_store_registers): Use regcache->ptid instead of
9821         inferior_ptid.
9822
9823 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9824
9825         * aarch64-linux-nat.c (fetch_gregs_from_thread,
9826         store_gregs_to_thread, fetch_fpregs_from_thread,
9827         store_fpregs_to_thread): Use regcache->ptid instead of
9828         inferior_ptid.
9829
9830 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9831
9832         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9833         amd64_linux_fetch_inferior_registers): Use regcache->ptid
9834         instead of inferior_ptid.
9835
9836 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9837
9838         * target.c (target_fetch_registers, target_store_registers): Add
9839         assert.
9840
9841 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9842
9843         * regcache.h (regcache_get_ptid): New function.
9844         * regcache.c (regcache_get_ptid): New function.
9845
9846 2017-03-13  Mark Wielaard  <mark@klomp.org>
9847
9848         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9849
9850 2017-03-10  Keith Seitz  <keiths@redhat.com>
9851
9852         PR c++/8218
9853         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9854
9855 2017-03-08  Pedro Alves  <palves@redhat.com>
9856
9857         PR gdb/18360
9858         * infrun.c (start_step_over, do_target_resume, resume)
9859         (restart_threads): Assert we're not resuming a thread that is
9860         meant to be stopped.
9861         (infrun_thread_stop_requested_callback): Delete.
9862         (infrun_thread_stop_requested): If the thread is internally
9863         stopped, queue a pending stop event and clear the thread's
9864         inline-frame state.
9865         (handle_stop_requested): New function.
9866         (handle_syscall_event, handle_inferior_event_1): Use
9867         handle_stop_requested.
9868         (handle_stop_requested): New function.
9869         (handle_signal_stop): Set the thread's stop_signal here instead of
9870         at caller.
9871         (finish_step_over): Clear step over info unconditionally.
9872         (handle_signal_stop): If the user had interrupted the event
9873         thread, consider the stop a random signal.
9874         (handle_signal_stop) <signal arrived while stepping over
9875         breakpoint>: Don't restart threads here.
9876         (stop_waiting): Don't clear step-over info here.
9877
9878 2017-03-08  Pedro Alves  <palves@redhat.com>
9879
9880         PR 21206
9881         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9882         goes to argument 2, not 1.
9883
9884 2017-03-08  Pedro Alves  <palves@redhat.com>
9885
9886         PR cli/21218
9887         * top.c (gdb_readline_wrapper): Avoid passing NULL to
9888         display_gdb_prompt.
9889         (command_line_input): Add comment.
9890
9891 2017-03-08  Pedro Alves  <palves@redhat.com>
9892
9893         PR tui/21216
9894         * tui/tui-file.c (tui_file::write): New.
9895         * tui/tui-file.h (tui_file): Override "write".
9896         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9897         factored out from ...
9898         (tui_puts): ... here.
9899         (tui_putc): Use them.
9900         (tui_write): New function.
9901         * tui/tui-io.h (tui_write): Declare.
9902
9903 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9904
9905         * Makefile.in (SFILES): Replace "environ.c" with
9906         "common/environ.c".
9907         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9908         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
9909         to...
9910         * common/environ.c: ... here.
9911         * environ.h: Moved to...
9912         * common/environ.h: ... here.
9913
9914 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9915
9916         * gdbarch.sh (pstring_ptr): New static function.
9917         (gdbarch_disassembler_options): Use it.
9918         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9919         not valid_disassembler_option->name.
9920         * gdbarch.c: Regenerate.
9921
9922 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9923
9924         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9925
9926 2017-03-07  Pedro Alves  <palves@redhat.com>
9927
9928         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9929
9930 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9931
9932         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9933         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9934         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9935         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9936
9937 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
9938
9939         * xtensa-linux-nat.c (fetch_gregs): Remove const.
9940
9941 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
9942
9943         * remote.c (remote_add_target_side_commands): Use range-based
9944         for loop.
9945
9946 2017-03-03  Yao Qi  <yao.qi@linaro.org>
9947
9948         PR gdb/21165
9949         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9950         value is lazy.
9951         * valprint.c (common_val_print): Likewise.
9952
9953 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
9954
9955         * NEWS: Mention new set/show disassembler-options commands.
9956         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9957         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9958         (prospective_options): New static variable.
9959         (gdb_disassembler::gdb_disassembler): Initialize
9960         m_di.disassembler_options.
9961         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9962         (get_disassembler_options): New function.
9963         (set_disassembler_options): Likewise.
9964         (set_disassembler_options_sfunc): Likewise.
9965         (show_disassembler_options_sfunc): Likewise.
9966         (disassembler_options_completer): Likewise.
9967         (_initialize_disasm): Likewise.
9968         * disasm.h (get_disassembler_options): New prototype.
9969         (set_disassembler_options): Likewise.
9970         * gdbarch.sh (gdbarch_disassembler_options): New variable.
9971         (gdbarch_verify_disassembler_options): Likewise.
9972         * gdbarch.c: Regenerate.
9973         * gdbarch.h: Likewise.
9974         * arm-tdep.c (num_disassembly_options): Delete.
9975         (set_disassembly_style): Likewise.
9976         (arm_disassembler_options): New static variable.
9977         (set_disassembly_style_sfunc): Convert short style name into long
9978         option name.  Call set_disassembler_options.
9979         (show_disassembly_style_sfunc): New function.
9980         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9981         set_gdbarch_verify_disassembler_options.
9982         (_initialize_arm_tdep): Delete regnames variable and update callers.
9983         (arm_disassembler_options): Initialize.
9984         (disasm_options): New variable.
9985         (num_disassembly_options): Rename from this...
9986         (num_disassembly_styles): ...to this.  Compute by scanning through
9987         disasm_options.
9988         (valid_disassembly_styles): Initialize using disasm_options.
9989         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9990         set_arm_regname_option.
9991         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9992         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9993         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9994         set_gdbarch_verify_disassembler_options.
9995         * s390-tdep.c (s390_disassembler_options): New static variable.
9996         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9997         set_gdbarch_verify_disassembler_options.
9998
9999 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10000
10001         * remote.c (remote_add_target_side_condition): Remove "struct"
10002         keyword from range-based for loop.
10003
10004 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
10005
10006         * remote.c (remote_add_target_side_condition): Use range-based
10007         for loop.  Update comment.
10008
10009 2017-02-27  Yao Qi  <yao.qi@linaro.org>
10010
10011         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
10012
10013 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
10014
10015         * regcache.c (regcache_raw_update): New function.
10016         (regcache_raw_read): Move code to regcache_raw_update.
10017         * regcache.h (regcache_raw_update): New declaration.
10018         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
10019
10020 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
10021
10022         * dwarf2read.c (create_debug_type_hash_table): Initialize
10023         header.signature and header.type_offset_in_tu.
10024
10025 2017-02-24  Pedro Alves  <palves@redhat.com>
10026
10027         * symtab.c (make_file_symbol_completion_list_1): Use
10028         add_symtab_completions.
10029
10030 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10031
10032         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
10033
10034 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
10035
10036         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
10037         I386_MAX_REGISTER_SIZE.
10038         (i386_pseudo_register_write): Likewise.
10039         (i386_process_record): Likewise.
10040         * i387-tdep.c (i387_supply_xsave): Likewise.
10041         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
10042         (store_register): Likewise.
10043
10044 2017-02-23  Pedro Alves  <palves@redhat.com>
10045
10046         * ada-lang.c: Include "common/function-view.h".
10047         (ada_iterate_over_symbols): Adjust to use function_view as
10048         callback type.
10049         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
10050         (ada_make_symbol_completion_list): Use a lambda.
10051         (ada_exc_search_name_matches): Delete.
10052         (name_matches_regex): New.
10053         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
10054         * compile/compile-c-support.c: Include "common/function-view.h".
10055         (print_one_macro): Change prototype to accept a ui_file pointer.
10056         (write_macro_definitions): Use a lambda.
10057         * dwarf2read.c: Include "common/function-view.h".
10058         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
10059         (dw2_expand_symtabs_matching): Adjust to use function_view as
10060         callback type.
10061         * language.h: Include "common/function-view.h".
10062         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
10063         function_view as callback type.
10064         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
10065         * linespec.c: Include "common/function-view.h".
10066         (collect_info::add_symbol): New method.
10067         (struct symbol_and_data_callback, iterate_inline_only, struct
10068         symbol_matcher_data, iterate_name_matcher): Delete.
10069         (iterate_over_all_matching_symtabs): Adjust to use function_view
10070         as callback type and lambdas.
10071         (iterate_over_file_blocks): Adjust to use function_view as
10072         callback type.
10073         (decode_compound_collector): Now a class with private fields.
10074         (decode_compound_collector::release_symbols): New method.
10075         (collect_one_symbol): Rename to...
10076         (decode_compound_collector::operator()): ... this and adjust.
10077         (lookup_prefix_sym): decode_compound_collector construction bits
10078         move to decode_compound_collector ctor.  Pass the
10079         decode_compound_collector object directly as callback.  Remove
10080         cleanups and use decode_compound_collector::release_symbols
10081         instead.
10082         (symtab_collector): Now a class with private fields.
10083         (symtab_collector::release_symtabs): New method.
10084         (add_symtabs_to_list): Rename to...
10085         (symtab_collector::operator()): ... this and adjust.
10086         (collect_symtabs_from_filename): symtab_collector construction
10087         bits move to symtab_collector ctor.  Pass the symtab_collector
10088         object directly as callback.  Remove cleanups and use
10089         symtab_collector::release_symtabs instead.
10090         (collect_symbols): Delete.
10091         (add_matching_symbols_to_info): Use lambdas.
10092         * macrocmd.c (print_macro_callback): Delete.
10093         (info_macro_command): Use a lambda.
10094         (info_macros_command): Pass print_macro_definition as callable
10095         directly.
10096         (print_one_macro): Remove 'ignore' parameter.
10097         (macro_list_command): Adjust.
10098         * macrotab.c (macro_for_each_data::fn): Now a function_view.
10099         (macro_for_each_data::user_data): Delete field.
10100         (foreach_macro): Adjust to call the function_view.
10101         (macro_for_each): Adjust to use function_view as callback type.
10102         (foreach_macro_in_scope): Adjust to call the function_view.
10103         (macro_for_each_in_scope): Adjust to use function_view as callback
10104         type.
10105         * macrotab.h: Include "common/function-view.h".
10106         (macro_callback_fn): Declare a prototype instead of a pointer.
10107         Remove "user_data" parameter.
10108         (macro_for_each, macro_for_each_in_scope): Adjust to use
10109         function_view as callback type.
10110         * psymtab.c (partial_map_expand_apply)
10111         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
10112         Adjust to use function_view as callback type and to return bool.
10113         (psym_expand_symtabs_matching): Adjust to use function_view as
10114         callback types.
10115         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
10116         to use function_view as callback type and to return bool.
10117         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
10118         callback types.
10119         * symfile.c (expand_symtabs_matching): Adjust to use function_view
10120         as callback types.
10121         * symfile.h: Include "common/function-view.h".
10122         (expand_symtabs_file_matcher_ftype)
10123         (expand_symtabs_symbol_matcher_ftype)
10124         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
10125         return bool.
10126         (quick_symbol_functions::map_symtabs_matching_filename)
10127         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
10128         function_view as callback type and return bool.
10129         (expand_symtabs_matching): Adjust to use function_view as callback
10130         type.
10131         (maintenance_expand_name_matcher)
10132         (maintenance_expand_file_matcher): Delete.
10133         (maintenance_expand_symtabs): Use lambdas.
10134         * symtab.c (iterate_over_some_symtabs): Adjust to use
10135         function_view as callback types and return bool.
10136         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
10137         of a cleanup.
10138         (lookup_symtab_callback): Delete.
10139         (lookup_symtab): Use a lambda.
10140         (iterate_over_symbols): Adjust to use function_view as callback
10141         type.
10142         (struct search_symbols_data, search_symbols_file_matches)
10143         (search_symbols_name_matches): Delete.
10144         (search_symbols): Use a pair of lambdas.
10145         (struct add_name_data, add_macro_name, symbol_completion_matcher)
10146         (symtab_expansion_callback): Delete.
10147         (default_make_symbol_completion_list_break_on_1): Use lambdas.
10148         * symtab.h: Include "common/function-view.h".
10149         (iterate_over_some_symtabs): Adjust to use function_view as
10150         callback type and return bool.
10151         (iterate_over_symtabs): Adjust to use function_view as callback
10152         type.
10153         (symbol_found_callback_ftype): Remove 'data' parameter and return
10154         bool.
10155         (iterate_over_symbols): Adjust to use function_view as callback
10156         type.
10157
10158 2017-02-23  Pedro Alves  <palves@redhat.com>
10159
10160         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
10161         (%.o) <unittests/%.c>: New pattern.
10162         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
10163         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
10164         * common/function-view.h: New file.
10165         * unittests/function-view-selftests.c: New file.
10166         * configure: Regenerate.
10167
10168 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
10169
10170         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
10171         inferior_ptid.
10172         * go32-nat.c (go32_thread_alive): Likewise.
10173
10174 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10175
10176         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
10177         delete.
10178
10179 2017-02-23  Yao Qi  <yao.qi@linaro.org>
10180
10181         * varobj.c (varobj_clear_saved_item): Use delete instead of
10182         xfree.
10183         (update_dynamic_varobj_children): Likewise.
10184
10185 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10186
10187         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
10188
10189 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
10190
10191         * common/enum-flags.h (enum_flags::enum_flags): Initialize
10192         m_enum_value to 0 in default constructor.
10193
10194 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
10195
10196         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
10197         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
10198         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
10199         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
10200         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
10201         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
10202         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
10203         IS_STORE_CONDITIONAL_INSN.
10204
10205 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10206
10207         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
10208
10209 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10210
10211         * NEWS (Changes since GDB 7.12): Add DWARF-5.
10212
10213 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10214
10215         * dwarf2read.c (skip_one_die, read_attribute_value)
10216         (dwarf2_const_value_attr, dump_die_shallow)
10217         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
10218         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
10219
10220 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10221
10222         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
10223         (dwarf_parse_macro_header): Accept DWARF version 5.
10224         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
10225
10226 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10227
10228         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
10229         DW_AT_GNU_*.
10230         * common/common-exceptions.h (enum errors): Likewise.
10231         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
10232         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
10233         (dwarf_expr_context::execute_stack_op): Likewise.
10234         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
10235         Likewise.
10236         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
10237         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
10238         (show_entry_values_debug, call_site_to_target_addr)
10239         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
10240         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
10241         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
10242         (value_of_dwarf_block_entry, indirect_pieced_value)
10243         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
10244         (disassemble_dwarf_expression): Likewise.
10245         * dwarf2read.c (process_die, inherit_abstract_dies)
10246         (read_call_site_scope): Likewise.
10247         * gdbtypes.h (struct func_type, struct call_site_parameter)
10248         (struct call_site): Likewise.
10249         * stack.c (read_frame_arg): Likewise.
10250         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
10251
10252 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10253
10254         * defs.h (read_unsigned_leb128): New declaration.
10255         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
10256         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
10257         (dwarf2_find_location_expression): Call also
10258         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
10259         * dwarf2loc.h (dwarf2_version): New declaration.
10260         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
10261         rnglists.
10262         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
10263         .debug_rnglists.
10264         (struct dwop_section_names): Add loclists_dwo.
10265         (dwop_section_names): Add .debug_loclists.dwo.
10266         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
10267         (struct dwarf2_per_cu_data): Add dwarf_version.
10268         (struct dwo_sections): Add loclists.
10269         (struct attr_abbrev): Add implicit_const.
10270         (read_indirect_line_string): New declaration.
10271         (read_unsigned_leb128): Delete declaration.
10272         (rcuh_kind): New definition.
10273         (read_and_check_comp_unit_head): Change parameter
10274         is_debug_types_section to section_kind.
10275         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
10276         (read_comp_unit_head): Change parameter abfd to section, add parameter
10277         section_kind.  Handle DWARF-5.
10278         (error_check_comp_unit_head): Accept also DWARF version 5.
10279         (read_and_check_comp_unit_head): Change parameter
10280         is_debug_types_section to section_kind.
10281         (read_and_check_type_unit_head): Delete function.
10282         (read_abbrev_offset): Handle DWARF-5.
10283         (create_debug_type_hash_table): Add parameter section_kind.  Process
10284         only DW_UT_type.  Use signature and type_offset_in_tu from struct
10285         comp_unit_head.
10286         (create_debug_types_hash_table): Update create_debug_type_hash_table
10287         caller.
10288         (create_all_type_units): Call create_debug_type_hash_table.
10289         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
10290         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
10291         caller.
10292         (skip_one_die): Handle DW_FORM_implicit_const.
10293         (dwarf2_rnglists_process): New function.
10294         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
10295         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
10296         (read_attribute_value): Handle DW_FORM_implicit_const,
10297         DW_FORM_line_strp.
10298         (read_attribute): Handle DW_FORM_implicit_const.
10299         (read_indirect_string_at_offset_from): New function from
10300         read_indirect_string_at_offset.
10301         (read_indirect_string_at_offset): Call
10302         read_indirect_string_at_offset_from.
10303         (read_indirect_line_string_at_offset): New function.
10304         (read_indirect_string): New function comment.
10305         (read_indirect_line_string): New function.
10306         (read_unsigned_leb128): Make it global.
10307         (dwarf2_string_attr): Handle DWARF-5.
10308         (add_include_dir_stub, read_formatted_entries): New functions.
10309         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
10310         Handle DWARF-5.
10311         (per_cu_header_read_in): Update read_comp_unit_head caller.
10312         (dwarf2_version): New function.
10313         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
10314         rnglists.
10315         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
10316         fields.
10317
10318 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10319
10320         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
10321
10322 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10323
10324         * dwarf2read.c (dwarf2_ranges_process): New function from
10325         dwarf2_ranges_read.
10326         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
10327         dwarf2_ranges_process.
10328
10329 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10330
10331         * dwarf2read.c (create_debug_type_hash_table): New function from
10332         create_debug_types_hash_table.
10333         (create_debug_types_hash_table): Call create_debug_type_hash_table.
10334         (create_all_type_units, open_and_init_dwo_file): Update
10335         create_debug_types_hash_table callers.
10336
10337 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10338
10339         PR gdb/16188
10340         * fork-child.c (trace_start_error): Fix thinko.  va_end should
10341         refer to 'ap', not 'args'.
10342
10343 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10344             Pedro Alves  <palves@redhat.com>
10345
10346         PR gdb/16188
10347         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
10348         calls succeeded.
10349         * fork-child.c (trace_start_error): New function.
10350         (trace_start_error_with_name): Likewise.
10351         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
10352         * inf-ptrace.c (inf_ptrace_me): Likewise.
10353         * inferior.h (trace_start_error): New prototype.
10354         (trace_start_error_with_name): Likewise.
10355
10356 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
10357
10358         PR gdb/21164
10359         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
10360         NULL before using it.
10361         * symmisc.c (maintenance_print_symbols): Likewise.
10362         (maintenance_print_msymbols): Likewise.
10363
10364 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10365
10366         * NEWS: Add record Python bindings entry.
10367
10368 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10369
10370         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
10371         py-record-full.o.
10372         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
10373         * python/py-record-btrace.c, python/py-record-btrace.h,
10374         python/py-record-full.c, python/py-record-full.h: New file.
10375         * python/py-record.c: Add include for py-record-btrace.h and
10376         py-record-full.h.
10377         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
10378         recpy_instruction_history, recpy_function_call_history, recpy_begin,
10379         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
10380         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
10381         New definition.
10382         (gdbpy_initialize_btrace): New export.
10383         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
10384
10385 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10386
10387         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
10388         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
10389         * python/py-record.c: New file.
10390         * python/python-internal.h (gdbpy_start_recording,
10391         gdbpy_current_recording, gdpy_stop_recording,
10392         gdbpy_initialize_record): New export.
10393         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
10394         (python_GdbMethods): Add gdbpy_start_recording,
10395         gdbpy_current_recording and gdbpy_stop_recording.
10396
10397 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10398
10399         * record-btrace.c (record_btrace_record_method): New function.
10400         (init_record_btrace_ops): Initialize to_record_method.
10401         * record-full.c (record_full_record_method): New function.
10402         (init_record_full_ops, init_record_full_core_ops): Add
10403         record_full_record_method.
10404         * record.h (enum record_method): New enum.
10405         * target-debug.h (target_debug_print_enum_record_method: New define.
10406         * target-delegates.c: Regenerate.
10407         * target.c (target_record_method): New function.
10408         * target.h: Include record.h.
10409         (struct target_ops) <to_record_method>: New field.
10410         (target_record_method): New export.
10411
10412 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10413
10414         * record.h (record_start, record_stop): New export.
10415         * record.c (record_start, record_stop): New function.
10416
10417 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10418
10419         * btrace.c (btrace_fetch): Copy function call segments pointer
10420         into a vector.
10421         (btrace_clear): Clear the vector.
10422         (btrace_find_insn_by_number): Use binary search to find the correct
10423         function call segment.
10424         * btrace.h (brace_fun_p): New typedef.
10425         (struct btrace_thread_info) <functions>: New field.
10426
10427 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10428
10429         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
10430         * btrace.c (btrace_decode_error): ... here.  New function.
10431         * btrace.h (btrace_decode_error): New export.
10432
10433 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
10434
10435         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
10436         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
10437         btrace_find_insn_by_number): Remove special case for gaps.
10438         * btrace.h (btrace_insn_get_error): New export.
10439         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
10440         * record-btrace.c (btrace_insn_history): Print number for gaps.
10441         (record_btrace_info, record_btrace_goto): Handle gaps.
10442
10443 2017-02-14  Tom Tromey  <tom@tromey.com>
10444
10445         PR python/13598:
10446         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
10447         event.
10448         * python/py-evts.c (gdbpy_initialize_py_events): Add
10449         before_prompt registry.
10450         * python/py-events.h (events_object) <before_prompt>: New field.
10451
10452 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
10453
10454         * btrace.c (ftrace_new_switch): Preserve up link and flags.
10455
10456 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
10457
10458         * symfile (_initialize_symfile): Add usage text to the load command's
10459         help text.
10460
10461 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
10462
10463         * utils.c (defaulted_query): Don't query on secondary UIs.
10464
10465 2017-02-10  Tom Tromey  <tom@tromey.com>
10466
10467         * rust-lang.c (rust_get_disr_info): Remove unused variable.
10468
10469 2017-02-10  Tom Tromey  <tom@tromey.com>
10470
10471         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
10472         "cleanup" local.
10473         * python/py-type.c (typy_legacy_template_argument): Remove
10474         unnecessary "cleanup" local.
10475
10476 2017-02-10  Tom Tromey  <tom@tromey.com>
10477
10478         * python/python.c (do_start_initialization): New function, from
10479         _initialize_python.
10480         (_initialize_python): Call do_start_initialization.
10481         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
10482         goto.
10483
10484 2017-02-10  Tom Tromey  <tom@tromey.com>
10485
10486         * python/py-prettyprint.c (pretty_print_one_value): Use
10487         gdbpy_ref.
10488
10489 2017-02-10  Tom Tromey  <tom@tromey.com>
10490
10491         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
10492         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
10493         gdbpy_ref.
10494         * python/py-type.c (field_new): Use gdbpy_ref.
10495         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
10496         gdbpy_ref.
10497         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
10498         (py_free_pspace): Likewise.
10499         (pspace_to_pspace_object): Likewise.
10500         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
10501         (py_free_objfile): Likewise.
10502         (objfile_to_objfile_object): Likewise.
10503         * python/py-inferior.c (delete_thread_object): Use
10504         gdbpy_ref.
10505         (infpy_read_memory): Likewise.
10506         (py_free_inferior): Likewise.
10507         * python/py-evtregistry.c (create_eventregistry_object): Use
10508         gdbpy_ref.
10509         * python/py-event.c (create_event_object): Use gdbpy_ref.
10510
10511 2017-02-10  Tom Tromey  <tom@tromey.com>
10512
10513         * python/py-ref.h (gdbpy_ref_policy): Now a template.
10514         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
10515         used.
10516         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
10517         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
10518         python/py-exitedevent.c, python/py-finishbreakpoint.c,
10519         python/py-framefilter.c, python/py-function.c,
10520         python/py-inferior.c, python/py-infevents.c,
10521         python/py-linetable.c, python/py-newobjfileevent.c,
10522         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
10523         python/py-signalevent.c, python/py-stopevent.c,
10524         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
10525         python/py-unwind.c, python/py-utils.c, python/py-value.c,
10526         python/py-varobj.c, python/py-xmethods.c, python/python.c,
10527         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
10528
10529 2017-02-10  Tom Tromey  <tom@tromey.com>
10530
10531         * ui-out.h (ui_out_emit_type): New class.
10532         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
10533         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
10534         and ui_out_emit_tuple.
10535         (enumerate_locals): Likewise.
10536         (py_mi_print_variables, py_print_locals, py_print_args): Use
10537         ui_out_emit_list.
10538         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
10539         ui_out_emit_list.
10540         * common/gdb_optional.h: New file.
10541
10542 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10543
10544         * MAINTAINERS (Write After Approval): Update my e-mail address.
10545
10546 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
10547
10548         PR gdb/21122
10549         * breakpoint.c (_initialize_breakpoint): Update the help description
10550         of the 'commands' command to indicate that it takes a list argument.
10551
10552 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
10553
10554         * interps.c (current_interp_set_logging): Remove "return".
10555
10556 2017-02-09  Gary Benson  <gbenson@redhat.com>
10557
10558         * symtab.c (add_symtab_completions): Prevent NULL pointer
10559         dereference.
10560
10561 2017-02-08  Pedro Alves  <palves@redhat.com>
10562
10563         * interps.c (interp::interp): Remove reference to quiet_p.
10564         (interp_set): Make static.  Remove dead "Switching to" output
10565         code.
10566         (interp_quiet_p, interp_set_quiet): Delete.
10567         (interpreter_exec_cmd): Don't set the interpreter quiet.
10568         * interps.h (interp_quiet_p): Make static.
10569         (class interp) <quiet_p>: Remove field
10570
10571 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10572
10573         * cli/cli-decode.c (find_command_name_length): Make it extern.
10574         * cli/cli-decode.h (find_command_name_length): Declare.
10575         * cli/cli-script.c (command_name_equals, line_first_arg):
10576         New functions.
10577         (process_next_line): Use cli-decode to parse command names.
10578         (build_command_line): Make args a constant pointer.
10579
10580 2017-02-08  Jerome Guitton  <guitton@adacore.com>
10581
10582         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
10583         Remove case-insensitive search.
10584
10585 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
10586
10587         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
10588         at the end of the line.  Avoids an ARI warning.
10589
10590 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
10591
10592         * NEWS: Mention support for record/replay of Intel 64 rdrand and
10593         rdseed instructions.
10594         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
10595
10596 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
10597
10598         PR tdep/20936
10599         Provide and use sparc32 and sparc64 target description XML files.
10600         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
10601         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
10602         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
10603         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
10604         * features/sparc/sparc32-solaris.xml: New file.
10605         * features/sparc/sparc64-solaris.xml: New file.
10606         * features/sparc/sparc32-solaris.c: Generated.
10607         * features/sparc/sparc64-solaris.c: Generated.
10608         * sparc-tdep.h: Account for differences in target descriptions.
10609         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
10610         (sparc32_register_type): Use target provided registers.
10611         (validate_tdesc_registers): New function.
10612         (sparc32_gdbarch_init): Use tdesc_has_registers.
10613         Set pseudoregister functions.
10614         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
10615         (sparc64_register_type): Use target provided registers.
10616         (sparc64_init_abi): Set pseudoregister functions.
10617
10618 2017-02-03  Tom Tromey  <tom@tromey.com>
10619
10620         PR rust/21097:
10621         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
10622         with a single member.
10623
10624 2017-02-03  Pedro Alves  <palves@redhat.com>
10625
10626         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
10627         (cli_interp_base::~cli_interp_base): New.
10628         (cli_interp): New struct.
10629         (as_cli_interp): Cast the interp itself to cli_interp.
10630         (cli_interpreter_pre_command_loop): Rename to ...
10631         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
10632         parameter.
10633         (cli_interpreter_init): Rename to ...
10634         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
10635         boolean.  Make extern.
10636         (cli_interpreter_resume): Rename to ...
10637         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
10638         extern.
10639         (cli_interpreter_suspend): Rename to ...
10640         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
10641         extern.
10642         (cli_interpreter_exec): Rename to ...
10643         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
10644         extern.
10645         (cli_interpreter_supports_command_editing): Rename to ...
10646         (cli_interp_base::supports_command_editing): ... this.  Remove
10647         'interp' parameter.  Make extern.
10648         (cli_ui_out): Rename to ...
10649         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
10650         Make extern.
10651         (cli_set_logging): Rename to ...
10652         (cli_interp_base::set_logging): ... this.  Remove 'interp'
10653         parameter.  Make extern.
10654         (cli_interp_procs): Delete.
10655         (cli_interp_factory): Adjust to use "new".
10656         * cli/cli-interp.h: Include "interps.h".
10657         (struct cli_interp_base): New struct.
10658         * interps.c (struct interp): Delete.  Fields moved to interps.h.
10659         (interp_new): Delete.
10660         (interp::interp, interp::~interp): New.
10661         (interp_set): Use bool, and return void.  Assume the interpreter
10662         has suspend, init and resume methods, and that the all return
10663         void.
10664         (set_top_level_interpreter): interp_set returns void.
10665         (interp_ui_out): Adapt.
10666         (current_interp_set_logging): Adapt.
10667         (interp_data): Delete.
10668         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
10669         (interp_exec): Adapt.
10670         (top_level_interpreter_data): Delete.
10671         * interps.h (interp_init_ftype, interp_resume_ftype)
10672         (interp_suspend_ftype, interp_exec_ftype)
10673         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10674         (class interp): New.
10675         (interp_new): Delete.
10676         (interp_set): Now returns void.  Use bool.
10677         (interp_data, top_level_interpreter_data): Delete.
10678         * mi/mi-common.h: Include interps.h.
10679         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
10680         init, resume, suspect, exec, interp_ui_out, set_logging and
10681         pre_command_loop methods.
10682         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10683         (mi_interpreter_init): Rename to ...
10684         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
10685         bool, return void and make extern.  Adjust.
10686         (mi_interpreter_resume): ... Rename to ...
10687         (mi_interp::resume): ... this.  Remove the 'data' parameter,
10688         return void and make extern.  Adjust.
10689         (mi_interpreter_suspend): ... Rename to ...
10690         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
10691         return void and make extern.  Adjust.
10692         (mi_interpreter_exec): ... Rename to ...
10693         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
10694         extern.  Adjust.
10695         (mi_interpreter_pre_command_loop): ... Rename to ...
10696         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
10697         parameter and make extern.
10698         (mi_on_normal_stop_1): Adjust.
10699         (mi_ui_out): Rename to ...
10700         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
10701         parameter and make extern.  Adjust.
10702         (mi_set_logging): Rename to ...
10703         (mi_interp::set_logging): ... this.  Remove the 'interp'
10704         parameter and make extern.  Adjust.
10705         (mi_interp_procs): Delete.
10706         (mi_interp_factory): Adjust to use 'new'.
10707         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10708         (mi_print_exception, mi_execute_command, mi_load_progress):
10709         Adjust.
10710         * tui/tui-interp.c (tui_interp): New class.
10711         (as_tui_interp): Return a tui_interp pointer.
10712         (tui_on_normal_stop, tui_on_signal_received)
10713         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10714         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10715         to use interp::interp_ui_out.
10716         (tui_init): Rename to ...
10717         (tui_interp::init): ... this.  Remove the 'self' parameter, use
10718         bool, return void and make extern.  Adjust.
10719         (tui_resume): Rename to ...
10720         (tui_interp::resume): ... this.  Remove the 'data' parameter,
10721         return void and make extern.  Adjust.
10722         (tui_suspend): Rename to ...
10723         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
10724         return void and make extern.  Adjust.
10725         (tui_ui_out): Rename to ...
10726         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
10727         parameter, and make extern.  Adjust.
10728         (tui_exec): Rename to ...
10729         (tui_interp::exec): ... this.  Remove the 'data' parameter and
10730         make extern.
10731         (tui_interp_procs): Delete.
10732         (tui_interp_factory): Use "new".
10733
10734 2017-02-02  Tom Tromey  <tom@tromey.com>
10735
10736         * rust-exp.y (ends_raw_string, space_then_number)
10737         (rust_identifier_start_p): Return bool.
10738         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10739         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10740         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10741         (rust_chartype_p): Return bool.
10742         (val_print_struct, rust_print_struct_def, rust_print_type):
10743         Update.
10744         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10745         Return bool.
10746
10747 2017-02-02  Tom Tromey  <tom@tromey.com>
10748
10749         * rust-lang.c: Reindent.
10750
10751 2017-02-02  Tom Tromey  <tom@tromey.com>
10752
10753         * rust-lang.h (rust_crate_for_block): Update.
10754         * rust-lang.c (rust_crate_for_block): Return std::string.
10755         (rust_get_disr_info): Use std:;string, not
10756         gdb::unique_xmalloc_ptr.
10757         * rust-exp.y (crate_name): Update.
10758
10759 2017-02-02  Pedro Alves  <palves@redhat.com>
10760
10761         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10762         field out of gdb_disassembler_test and make it static.
10763
10764 2017-02-02  Pedro Alves  <palves@redhat.com>
10765
10766         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10767         mi1_interp and mi_interp fields.
10768
10769 2017-02-02  Pedro Alves  <palves@redhat.com>
10770
10771         * cli/cli-interp.c (struct saved_output_files, saved_output):
10772         Moved from cli/cli-logging.c.
10773         (cli_set_logging): New function.
10774         (cli_interp_procs): Install cli_set_logging.
10775         * cli/cli-interp.h (make_logging_output, cli_set_logging):
10776         Declare.
10777         * cli/cli-logging.c (struct saved_output_files, saved_output):
10778         Moved to cli/cli-interp.c.
10779         (pop_output_files): Don't save outputs here.
10780         (make_logging_output): New function.
10781         (handle_redirections): Don't build tee nor save previous outputs
10782         here.
10783         * interps.c (current_interp_set_logging): Change prototype.
10784         Assume there's always a set_logging_proc method installed.
10785         * interps.h (interp_set_logging_ftype): Change prototype.
10786         (current_interp_set_logging): Change prototype and adjust comment.
10787         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
10788         use make_logging_output.
10789         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10790 2017-02-02  Pedro Alves  <palves@redhat.com>
10791
10792         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10793         from ...
10794         (set_logging_overwrite): ... here.
10795         (logging_no_redirect_file): Delete.
10796         (set_logging_redirect): Don't handle redirection on the fly.
10797         Instead warn that "logging off" / "logging on" is necessary.
10798         (pop_output_files): Delete references to logging_no_redirect_file.
10799         (show_logging_command): Always speak in terms of what will happen
10800         once logging is reenabled.
10801
10802 2017-02-02  Pedro Alves  <palves@redhat.com>
10803
10804         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10805
10806 2017-02-02  Pedro Alves  <palves@redhat.com>
10807
10808         * disasm.c (gdb_pretty_print_insn): Rename to ...
10809         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10810         Remove gdbarch parameter.  Adapt to clear the object's buffers
10811         instead of allocating new buffers, and to print using the object's
10812         gdb_disassembler instead of calling gdb_print_insn.
10813         (dump_insns): Use gdb_pretty_print_disassembler.
10814         * disasm.h (gdb_pretty_print_insn): Delete declaration.
10815         (gdb_pretty_print_disassembler): New class.
10816         * record-btrace.c (btrace_insn_history): Use
10817         gdb_pretty_print_disassembler.
10818
10819 2017-02-02  Pedro Alves  <palves@redhat.com>
10820
10821         * ada-lang.c (type_as_string): Use string_file.
10822         * ada-valprint.c (ada_print_floating): Use string_file.
10823         * ada-varobj.c (ada_varobj_scalar_image)
10824         (ada_varobj_get_value_image): Use string_file.
10825         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10826         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10827         * breakpoint.c (update_inserted_breakpoint_locations)
10828         (insert_breakpoint_locations, reattach_breakpoints)
10829         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10830         (print_it_watchpoint): Use string_file.
10831         (save_breakpoints): Use stdio_file.
10832         * c-exp.y (oper): Use string_file.
10833         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10834         tee_file.
10835         (pop_output_files): Use delete.
10836         (handle_redirections): Use stdio_file and tee_file.
10837         * cli/cli-setshow.c (do_show_command): Use string_file.
10838         * compile/compile-c-support.c (c_compute_program): Use
10839         string_file.
10840         * compile/compile-c-symbols.c (generate_vla_size): Take a
10841         'string_file &' instead of a 'ui_file *'.
10842         (generate_c_for_for_one_variable): Take a 'string_file &' instead
10843         of a 'ui_file *'.  Use string_file.
10844         (generate_c_for_variable_locations): Take a 'string_file &'
10845         instead of a 'ui_file *'.
10846         * compile/compile-internal.h (generate_c_for_for_one_variable):
10847         Take a 'string_file &' instead of a 'ui_file *'.
10848         * compile/compile-loc2c.c (push, pushf, unary, binary)
10849         (print_label, pushf_register_address, pushf_register)
10850         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10851         'ui_file *'.  Adjust.
10852         * compile/compile.c (compile_to_object): Use string_file.
10853         * compile/compile.h (compile_dwarf_expr_to_c)
10854         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10855         'ui_file *'.
10856         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10857         (replace_typedefs_qualified_name): Use string_file and
10858         obstack_copy0.
10859         * disasm.c (gdb_pretty_print_insn): Use string_file.
10860         (gdb_disassembly): Adjust reference the null_stream global.
10861         (do_ui_file_delete): Delete.
10862         (gdb_insn_length): Use null_stream.
10863         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10864         * dwarf2loc.c (dwarf2_compile_property_to_c)
10865         (locexpr_generate_c_location, loclist_generate_c_location): Take a
10866         'string_file &' instead of a 'ui_file *'.
10867         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10868         * dwarf2read.c (do_ui_file_peek_last): Delete.
10869         (dwarf2_compute_name): Use string_file.
10870         * event-top.c (gdb_setup_readline): Use stdio_file.
10871         * gdbarch.sh (verify_gdbarch): Use string_file.
10872         * gdbtypes.c (safe_parse_type): Use null_stream.
10873         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10874         string_file.
10875         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10876         'string_file *' instead of a 'ui_file *'.
10877         (gdbscm_arch_disassemble): Use string_file.
10878         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10879         * guile/scm-ports.c (class ioscm_file_port): Now a class that
10880         inherits from ui_file.
10881         (ioscm_file_port_delete, ioscm_file_port_rewind)
10882         (ioscm_file_port_put): Delete.
10883         (ioscm_file_port_write): Rename to ...
10884         (ioscm_file_port::write): ... this.  Remove file_port_magic
10885         checks.
10886         (ioscm_file_port_new): Delete.
10887         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10888         ui_file_up.
10889         * guile/scm-type.c (tyscm_type_name): Use string_file.
10890         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10891         Use string_file.
10892         * infcmd.c (print_return_value_1): Use string_file.
10893         * infrun.c (print_target_wait_results): Use string_file.
10894         * language.c (add_language): Use string_file.
10895         * location.c (explicit_to_string_internal): Use string_file.
10896         * main.c (captured_main_1): Use null_file.
10897         * maint.c (maintenance_print_architecture): Use stdio_file.
10898         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10899         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10900         event_channel>: Change type to mi_console_file pointer.
10901         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10902         (mi_console_file_delete): Delete.
10903         (struct mi_console_file): Delete.
10904         (mi_console_file_magic): Delete.
10905         (mi_console_file_new): Delete.
10906         (mi_console_file::mi_console_file): New.
10907         (mi_console_file_delete): Delete.
10908         (mi_console_file_fputs): Delete.
10909         (mi_console_file::write): New.
10910         (mi_console_raw_packet): Delete.
10911         (mi_console_file::flush): New.
10912         (mi_console_file_flush): Delete.
10913         (mi_console_set_raw): Rename to ...
10914         (mi_console_file::set_raw): ... this.
10915         * mi/mi-console.h (class mi_console_file): New class.
10916         (mi_console_file_new, mi_console_set_raw): Delete.
10917         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10918         (mi_set_logging): Use delete and tee_file.  Adjust.
10919         * mi/mi-main.c (output_register): Use string_file.
10920         (mi_cmd_data_evaluate_expression): Use string_file.
10921         (mi_cmd_data_read_memory): Use string_file.
10922         (mi_cmd_execute, print_variable_or_computed): Use string_file.
10923         * mi/mi-out.c (mi_ui_out::main_stream): New.
10924         (mi_ui_out::rewind): Use main_stream and
10925         string_file.
10926         (mi_ui_out::put): Use main_stream and string_file.
10927         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10928         Allocate a 'string_file' instead.
10929         (mi_out_new): Don't allocate a mem_fileopen stream here.
10930         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10931         (mi_ui_out::main_stream): Declare method.
10932         * printcmd.c (eval_command): Use string_file.
10933         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10934         * python/py-arch.c (archpy_disassemble): Use string_file.
10935         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10936         * python/py-frame.c (frapy_str): Use string_file.
10937         * python/py-framefilter.c (py_print_type, py_print_single_arg):
10938         Use string_file.
10939         * python/py-type.c (typy_str): Use string_file.
10940         * python/py-unwind.c (unwind_infopy_str): Use string_file.
10941         * python/py-value.c (valpy_str): Use string_file.
10942         * record-btrace.c (btrace_insn_history): Use string_file.
10943         * regcache.c (regcache_print): Use stdio_file.
10944         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10945         * remote.c (escape_buffer): Use string_file.
10946         * rust-lang.c (rust_get_disr_info): Use string_file.
10947         * serial.c (serial_open_ops_1): Use stdio_file.
10948         (do_serial_close): Use delete.
10949         * stack.c (print_frame_arg): Use string_file.
10950         (print_frame_args): Remove local mem_fileopen stream, not used.
10951         (print_frame): Use string_file.
10952         * symmisc.c (maintenance_print_symbols): Use stdio_file.
10953         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10954         Take a 'string_file *' instead of a 'ui_file *'.
10955         * top.c (new_ui): Use stdio_file and stderr_file.
10956         (free_ui): Use delete.
10957         (execute_command_to_string): Use string_file.
10958         (quit_confirm): Use string_file.
10959         * tracepoint.c (collection_list::append_exp): Use string_file.
10960         * tui/tui-disasm.c (tui_disassemble): Use string_file.
10961         * tui/tui-file.c: Don't include "ui-file.h".
10962         (enum streamtype, struct tui_stream): Delete.
10963         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10964         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10965         (tui_file::tui_file): New method.
10966         (tui_file_fputs): Delete.
10967         (tui_file_get_strbuf): Delete.
10968         (tui_file::puts): New method.
10969         (tui_file_adjust_strbuf): Delete.
10970         (tui_file_flush): Delete.
10971         (tui_file::flush): New method.
10972         * tui/tui-file.h: Tweak intro comment.
10973         Include ui-file.h.
10974         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10975         (tui_file_adjust_strbuf): Delete declarations.
10976         (class tui_file): New class.
10977         * tui/tui-io.c (tui_initialize_io): Use tui_file.
10978         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10979         (tui_register_format): Use string_stream.
10980         * tui/tui-stack.c (tui_make_status_line): Use string_file.
10981         (tui_get_function_from_frame): Use string_file.
10982         * typeprint.c (type_to_string): Use string_file.
10983         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10984         (null_stream): New global.
10985         (ui_file_delete): Delete.
10986         (ui_file::ui_file): New.
10987         (null_file_isatty): Delete.
10988         (ui_file::~ui_file): New.
10989         (null_file_rewind): Delete.
10990         (ui_file::printf): New.
10991         (null_file_put): Delete.
10992         (null_file_flush): Delete.
10993         (ui_file::putstr): New.
10994         (null_file_write): Delete.
10995         (ui_file::putstrn): New.
10996         (null_file_read): Delete.
10997         (ui_file::putc): New.
10998         (null_file_fputs): Delete.
10999         (null_file_write_async_safe): Delete.
11000         (ui_file::vprintf): New.
11001         (null_file_delete): Delete.
11002         (null_file::write): New.
11003         (null_file_fseek): Delete.
11004         (null_file::puts): New.
11005         (ui_file_data): Delete.
11006         (null_file::write_async_safe): New.
11007         (gdb_flush, ui_file_isatty): Adjust.
11008         (ui_file_put, ui_file_rewind): Delete.
11009         (ui_file_write): Adjust.
11010         (ui_file_write_for_put): Delete.
11011         (ui_file_write_async_safe, ui_file_read): Adjust.
11012         (ui_file_fseek): Delete.
11013         (fputs_unfiltered): Adjust.
11014         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
11015         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
11016         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
11017         (set_ui_file_data): Delete.
11018         (string_file::~string_file, string_file::write)
11019         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
11020         (do_ui_file_as_string, ui_file_as_string): Delete.
11021         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
11022         (struct mem_file): Delete.
11023         (mem_file_new): Delete.
11024         (stdio_file::stdio_file): New.
11025         (mem_file_delete): Delete.
11026         (stdio_file::stdio_file): New.
11027         (mem_fileopen): Delete.
11028         (stdio_file::~stdio_file): New.
11029         (mem_file_rewind): Delete.
11030         (stdio_file::set_stream): New.
11031         (mem_file_put): Delete.
11032         (stdio_file::open): New.
11033         (mem_file_write): Delete.
11034         (stdio_file_magic, struct stdio_file): Delete.
11035         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
11036         (stdio_file::flush): New.
11037         (stdio_file_read): Rename to ...
11038         (stdio_file::read): ... this.  Adjust.
11039         (stdio_file_write): Rename to ...
11040         (stdio_file::write): ... this.  Adjust.
11041         (stdio_file_write_async_safe): Rename to ...
11042         (stdio_file::write_async_safe) ... this.  Adjust.
11043         (stdio_file_fputs): Rename to ...
11044         (stdio_file::puts) ... this.  Adjust.
11045         (stdio_file_isatty): Delete.
11046         (stdio_file_fseek): Delete.
11047         (stdio_file::isatty): New.
11048         (stderr_file_write): Rename to ...
11049         (stderr_file::write) ... this.  Adjust.
11050         (stderr_file_fputs): Rename to ...
11051         (stderr_file::puts) ... this.  Adjust.
11052         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
11053         (stderr_file::stderr_file): New.
11054         (tee_file_magic): Delete.
11055         (struct tee_file): Delete.
11056         (tee_file::tee_file): New.
11057         (tee_file_new): Delete.
11058         (tee_file::~tee_file): New.
11059         (tee_file_delete): Delete.
11060         (tee_file_flush): Rename to ...
11061         (tee_file::flush): ... this.  Adjust.
11062         (tee_file_write): Rename to ...
11063         (tee_file::write): ... this.  Adjust.
11064         (tee_file::write_async_safe): New.
11065         (tee_file_fputs): Rename to ...
11066         (tee_file::puts): ... this.  Adjust.
11067         (tee_file_isatty): Rename to ...
11068         (tee_file::isatty): ... this.  Adjust.
11069         * ui-file.h (struct obstack, struct ui_file): Don't
11070         forward-declare.
11071         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
11072         (ui_file_write_ftype)
11073         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
11074         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
11075         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
11076         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
11077         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
11078         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
11079         (set_ui_file_fseek): Delete.
11080         (ui_file_data, ui_file_delete, ui_file_rewind)
11081         (struct ui_file): New.
11082         (ui_file_up): New.
11083         (class null_file): New.
11084         (null_stream): Declare.
11085         (ui_file_write_for_put, ui_file_put): Delete.
11086         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
11087         Delete.
11088         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
11089         (gdb_fopen, tee_file_new): Delete.
11090         (struct string_file): New.
11091         (struct stdio_file): New.
11092         (stdio_file_up): New.
11093         (struct stderr_file): New.
11094         (class tee_file): New.
11095         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
11096         of a 'ui_file *'.  Adjust.
11097         * ui-out.h (class ui_out) <field_stream>: Likewise.
11098         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
11099         (null_stream): Delete.
11100         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
11101         Adjust.
11102         * utils.h (struct ui_file): Delete forward declaration..
11103         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
11104         (error_stream): Take a 'string_file &' instead of a
11105         'ui_file *'.
11106         * varobj.c (varobj_value_get_print_value): Use string_file.
11107         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
11108         * gdbarch.c: Regenerate.
11109
11110 2017-02-02  Pedro Alves  <palves@redhat.com>
11111
11112         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
11113         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
11114         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
11115         Adjust to call gdb_print_insn instead of
11116         gdb_disassembler::print_insn.
11117         (dump_insns, do_mixed_source_and_assembly_deprecated)
11118         (do_mixed_source_and_assembly, do_assembly_only): Add back a
11119         'gdbarch' parameter.  Remove gdb_disassembler parameter.
11120         (gdb_disassembly): Don't allocate a gdb_disassembler here.
11121         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
11122         declaration.
11123         (gdb_pretty_print_insn): Re-add declaration.
11124         * record-btrace.c (btrace_insn_history): Don't allocate a
11125         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
11126
11127 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
11128
11129         * disasm.h (gdb_disassembly): Remove file_string parameter.
11130         * disasm.c (gdb_disassembly): Likewise.
11131         * cli/cli-cmds.c (print_disassembly): Adapt.
11132         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
11133         * stack.c (do_gdb_disassembly): Likewise.
11134
11135 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11136
11137         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
11138         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
11139         targets.  And if the implicit value is longer than needed, extract
11140         the first bytes instead of the "least significant" ones.
11141
11142 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11143
11144         * btrace.c (btrace_enable): Do not call btrace_add_pc for
11145         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
11146         (btrace_fetch): Assert can_access_registers_ptid.
11147         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
11148         validate_registers_access.
11149
11150 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
11151
11152         * gdbthread.h (can_access_registers_ptid): New.
11153         * thread.c (can_access_registers_ptid): New.
11154
11155 2017-02-01  Pedro Alves  <palves@redhat.com>
11156
11157         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
11158
11159 2017-01-31  Pedro Alves  <palves@redhat.com>
11160
11161         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
11162         Fix typos.
11163
11164 2017-01-31  Pedro Alves  <palves@redhat.com>
11165
11166         * stack.c (print_frame_args): Remove local mem_fileopen stream,
11167         not used.
11168
11169 2017-01-31  Pedro Alves  <palves@redhat.com>
11170
11171         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
11172
11173 2017-01-31  Pedro Alves  <palves@redhat.com>
11174
11175         * common/scoped_restore.h
11176         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
11177         change the value's parameter type to T2.
11178         (make_scoped_restore): Likewise.
11179
11180 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11181             Richard Henderson  <rth@redhat.com>
11182
11183         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
11184         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
11185         GS_BASE for older kernels.
11186         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
11187         GS_BASE for older kernels.
11188         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
11189         and GS_BASE to the offset table.
11190         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
11191         system register group.
11192         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
11193         for older kernels.
11194         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
11195         amd64 ABI.
11196         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
11197         AMD64_GSBASE_REGNUM.
11198         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
11199         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
11200         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
11201         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
11202         i386/64bit-segments.xml in those rules.
11203         * features/i386/64bit-segments.xml: New file.
11204         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
11205         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
11206         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
11207         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
11208         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
11209         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
11210         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
11211         * features/i386/amd64-avx-linux.c: Regenerated.
11212         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
11213         * features/i386/amd64-avx-mpx.c: Regenerated.
11214         * features/i386/amd64-avx512-linux.c: Regenerated.
11215         * features/i386/amd64-linux.c: Regenerated.
11216         * features/i386/amd64-mpx-linux.c: Regenerated.
11217         * features/i386/i386-avx-mpx-linux.c: Regenerated.
11218         * features/i386/i386-avx-mpx.c: Regenerated.
11219         * features/i386/x32-avx-linux.c: Regenerated.
11220         * features/i386/x32-avx512-linux.c: Regenerated.
11221         * regformats/i386/amd64-avx-linux.dat: Regenerated.
11222         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
11223         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
11224         * regformats/i386/amd64-linux.dat: Regenerated.
11225         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
11226         * regformats/i386/x32-avx-linux.dat: Regenerated.
11227         * regformats/i386/x32-avx512-linux.dat: Regenerated.
11228         * regformats/i386/x32-linux.dat: Regenerated.
11229
11230 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11231
11232         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
11233         Set to AMD64_NUM_REGS.
11234
11235 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
11236
11237         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
11238         that checks validity of a register number.
11239
11240 2017-01-27  Kees Cook  <keescook@google.com>
11241
11242         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
11243         fetch_fpregs if target has fpa registers.
11244         (arm_linux_store_inferior_registers): Call store_fpregs if target
11245         has fpa registers.
11246
11247 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11248
11249         * cris-tdep.c (cris_gdbarch_init): Remove check for
11250         info.byte_order and force it to BFD_ENDIAN_LITTLE.
11251
11252 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
11253
11254         * corelow.c (get_core_register_section): Check for regset
11255         existence before checking for REGSET_VARIABLE_SIZE.
11256
11257 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11258             Pedro Alves  <palves@redhat.com>
11259
11260         PR gdb/20939
11261         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
11262         call memory_error, save memaddr instead.
11263         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
11264         negative, cal memory_error.
11265         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
11266
11267 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11268
11269         * disasm-selftests.c (memory_error_test): New function.
11270         (_initialize_disasm_selftests): Register memory_error_test.
11271
11272 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11273
11274         * Makefile.in (SFILES): Add disasm-selftests.c and
11275         selftest-arch.c.
11276         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
11277         * disasm-selftests.c: New file.
11278         * selftest-arch.c: New file.
11279         * selftest-arch.h: New file.
11280
11281 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11282
11283         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
11284         to bfd_arch_mep.  Don't return 0 if section is not
11285         found.  Call print_insn_mep.
11286
11287 2017-01-26  Pedro Alves  <palves@redhat.com>
11288             Yao Qi  <yao.qi@linaro.org>
11289
11290         * arm-tdep.c: Include "disasm.h".
11291         (gdb_print_insn_arm): Update code to get gdbarch.
11292         * disasm.c (dis_asm_read_memory): Change it to
11293         gdb_disassembler::dis_asm_read_memory.
11294         (dis_asm_memory_error): Likewise.
11295         (dis_asm_print_address): Likewise.
11296         (gdb_pretty_print_insn): Change it to
11297         gdb_disassembler::pretty_print_insn.
11298         (dump_insns): Add one argument gdb_disassemlber.  All
11299         callers updated.
11300         (do_mixed_source_and_assembly_deprecated): Likewise.
11301         (do_mixed_source_and_assembly): Likewise.
11302         (do_assembly_only): Likewise.
11303         (gdb_disassembler::gdb_disassembler): New.
11304         (gdb_disassembler::print_insn): New.
11305         * disasm.h (class gdb_disassembler): New.
11306         (gdb_pretty_print_insn): Remove declaration.
11307         (gdb_disassemble_info): Likewise.
11308         * guile/scm-disasm.c (class gdbscm_disassembler): New.
11309         (gdbscm_disasm_read_memory_worker): Update.
11310         (gdbscm_disasm_read_memory): Update.
11311         (gdbscm_disasm_memory_error): Remove.
11312         (gdbscm_disasm_print_address): Remove.
11313         (gdbscm_disassembler::gdbscm_disassembler): New.
11314         (gdbscm_print_insn_from_port): Update.
11315         * mips-tdep.c: Include disasm.h.
11316         (gdb_print_insn_mips): Update code to get gdbarch.
11317         * record-btrace.c (btrace_insn_history): Update.
11318         * spu-tdep.c: Include disasm.h.
11319         (struct spu_dis_asm_data): Remove.
11320         (struct spu_dis_asm_info): New.
11321         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
11322         SPU id.
11323         (gdb_print_insn_spu): Cast disassemble_info to
11324         spu_dis_asm_info.
11325
11326 2017-01-26  Yao Qi  <yao.qi@linaro.org>
11327
11328         * disasm.c (do_ui_file_delete): Delete.
11329         (gdb_insn_length): Move code creating stream to ...
11330         * utils.c (null_stream): ... here.  New function.
11331         * utils.h (null_stream): Declare.
11332
11333 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
11334
11335         * python/py-inferior.c (find_thread_object): Return directly
11336         from the loop.  Remove "found" variable.
11337
11338 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
11339
11340         GDB 7.12.1 released.
11341
11342 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11343
11344         * python/py-function.c (fnpy_call): Reorder declarations to have
11345         the gdbpy_enter object declared first.
11346         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
11347
11348 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
11349
11350         PR python/21068
11351         * python/python-internal.h (PyMem_RawMalloc): Define for
11352         Python < 3.4.
11353         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
11354         PyMem_RawMalloc instead of PyMem_Malloc.
11355
11356 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
11357             Luis Machado  <lgustavo@codesourcery.com>
11358
11359         * NEWS (New commands): Mention flash-erase.
11360         (New MI commands): Mention target-flash-erase.
11361         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
11362         command.
11363         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
11364         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
11365         * target.c (flash_erase_command): New function.
11366         (initialize_targets): Add new flash-erase command.
11367         * target.h (flash_erase_command): New declaration.
11368
11369 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
11370
11371         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
11372         HAVE_SYS_PROCFS_H is defined.
11373
11374 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11375
11376         * remote.c (struct cached_reg): Change data into a pointer.
11377         * (stop_reply_dtr): Free data pointers before deleting vector.
11378         (process_stop_reply): Likewise.
11379         (remote_parse_stop_reply): Allocate space for data
11380
11381 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
11382
11383         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
11384         MAX_REGISTER_SIZE.
11385         (amd64_pseudo_register_read_value): Likewise.
11386         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
11387         (store_register_using_P): Likewise.
11388         * regcache.c (regcache_xfer_part): Likewise.
11389
11390 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
11391
11392         Split real and pseudo registers.
11393         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
11394         (sparc32_pseudo_regnum): New enum.
11395         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
11396         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
11397         (SPARC32_CP0_REGISTERS): New macro.
11398         (sparc32_pseudo_register_name): New function.
11399         (sparc32_register_name): Use sparc32_pseudo_register_name.
11400         (sparc32_pseudo_register_type): New function.
11401         (sparc32_register_type): Use sparc32_pseudo_register_type.
11402         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
11403         pseudo register numbers.
11404         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
11405         (SPARC64_CP0_REGISTERS): New macro.
11406         (sparc64_pseudo_register_name): New function.
11407         (sparc64_register_name): Use sparc64_pseudo_register_name.
11408         (sparc64_pseudo_register_type): New function.
11409         (sparc64_register_type): Use sparc64_pseudo_register_type.
11410         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
11411         pseudo register numbers.
11412         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
11413         sparc64_store_arguments): Handle pseudo register numbers.
11414
11415 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11416
11417         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
11418         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
11419         output.
11420         (getpkt_or_notif_sane_1): Likewise.
11421
11422 2017-01-13  Yao Qi  <yao.qi@linaro.org>
11423
11424         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
11425         of CC.  Pass "-x c++-header" instead of "-x c".
11426
11427 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11428
11429         * remote.c (remote_can_async_p): Update comment.
11430
11431 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11432
11433         * linux-nat.c (linux_nat_can_async_p): Update comment.
11434
11435 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
11436
11437         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
11438
11439 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
11440
11441         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
11442
11443 2017-01-10  Tom Tromey  <tom@tromey.com>
11444
11445         * python/py-type.c (typy_legacy_template_argument): Update.
11446         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
11447         ~demangle_parse_info): Declare new members.
11448         (cp_demangled_name_to_comp): Return unique_ptr.
11449         (cp_demangled_name_parse_free)
11450         (make_cleanup_cp_demangled_name_parse_free)
11451         (cp_new_demangle_parse_info): Remove.
11452         * cp-support.c (do_demangled_name_parse_free_cleanup)
11453         (make_cleanup_cp_demangled_name_parse_free): Remove.
11454         (inspect_type, cp_canonicalize_string_full)
11455         (cp_canonicalize_string): Update.
11456         (mangled_name_to_comp): Change return type.
11457         (cp_class_name_from_physname, method_name_from_physname)
11458         (cp_func_name, cp_remove_params): Update.
11459         * cp-name-parser.y (demangle_parse_info): New constructor, from
11460         cp_new_demangle_parse_info.
11461         (~demangle_parse_info): New destructor, from
11462         cp_demangled_name_parse_free.
11463         (cp_merge_demangle_parse_infos): Update.
11464         (cp_demangled_name_to_comp): Change return type.
11465
11466 2017-01-10  Tom Tromey  <tom@tromey.com>
11467
11468         * top.c (prevent_dont_repeat): Change return type.
11469         * python/python.c (execute_gdb_command): Use std::string.
11470         Update.
11471         * guile/guile.c (gdbscm_execute_gdb_command): Update.
11472         * command.h (prevent_dont_repeat): Change return type.
11473         * breakpoint.c (bpstat_do_actions_1): Update.
11474
11475 2017-01-10  Tom Tromey  <tom@tromey.com>
11476
11477         * value.h (scoped_value_mark::~scoped_value_mark): Call
11478         free_to_mark.
11479         (scoped_value_mark::free_to_mark): New method.
11480         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
11481         scoped_value_mark.
11482
11483 2017-01-10  Tom Tromey  <tom@tromey.com>
11484
11485         * python/py-value.c (valpy_dereference, valpy_referenced_value)
11486         (valpy_reference_value, valpy_const_value, valpy_get_address)
11487         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
11488         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
11489         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
11490         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
11491         scoped_value_mark.
11492         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
11493         * value.h (scoped_value_mark): New class.
11494
11495 2017-01-10  Tom Tromey  <tom@tromey.com>
11496
11497         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
11498         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
11499         * psymtab.c (discard_psymtabs_upto): Remove.
11500         (make_cleanup_discard_psymtabs): Remove.
11501         (struct psymtab_state): Remove.
11502
11503 2017-01-10  Tom Tromey  <tom@tromey.com>
11504
11505         * record-full.c (record_full_save_cleanups): Remove.
11506         (record_full_save): Use gdb::unlinker.
11507         * gcore.c (do_bfd_delete_cleanup): Remove.
11508         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
11509         cleanups.
11510         * dwarf2read.c (unlink_if_set): Remove.
11511         (write_psymtabs_to_index): Use gdb::unlinker.
11512         * common/gdb_unlinker.h: New file.
11513
11514 2017-01-10  Tom Tromey  <tom@tromey.com>
11515
11516         * windows-tdep.c (windows_xfer_shared_library): Update.
11517         * windows-nat.c (windows_make_so): Update.
11518         * utils.h (make_cleanup_bfd_unref): Remove.
11519         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
11520         * symfile.h (symfile_bfd_open)
11521         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
11522         * symfile.c (read_symbols, symbol_file_add)
11523         (separate_debug_file_exists): Update.
11524         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
11525         (generic_load, reread_symbols): Update.
11526         * symfile-mem.c (symbol_file_add_from_memory): Update.
11527         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
11528         (spu_symbol_file_add_from_memory): Update.
11529         * solist.h (struct target_so_ops) <bfd_open>: Return
11530         gdb_bfd_ref_ptr.
11531         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
11532         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
11533         gdb_bfd_ref_ptr.
11534         (solib_map_sections, reload_shared_libraries_1): Update.
11535         * solib-svr4.c (enable_break): Update.
11536         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
11537         * solib-frv.c (enable_break2): Update.
11538         * solib-dsbt.c (enable_break): Update.
11539         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
11540         gdb_bfd_ref_ptr.
11541         (darwin_solib_get_all_image_info_addr_at_init): Update.
11542         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
11543         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
11544         * record-full.c (record_full_save): Update.
11545         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
11546         * procfs.c (insert_dbx_link_bpt_in_file): Update.
11547         * minidebug.c (find_separate_debug_file_in_section): Return
11548         gdb_bfd_ref_ptr.
11549         * machoread.c (macho_add_oso_symfile): Change abfd to
11550         gdb_bfd_ref_ptr.
11551         (macho_symfile_read_all_oso): Update.
11552         (macho_check_dsym): Return gdb_bfd_ref_ptr.
11553         (macho_symfile_read): Update.
11554         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
11555         (jit_bfd_try_read_symtab): Update.
11556         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11557         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11558         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11559         gdb_bfd_ref_ptr.
11560         (gdb_bfd_ref_policy): New struct.
11561         (gdb_bfd_ref_ptr): New typedef.
11562         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11563         (gdb_bfd_openw, gdb_bfd_openr_iovec)
11564         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
11565         gdb_bfd_ref_ptr.
11566         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11567         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
11568         (gcore_command): Update.
11569         * exec.c (exec_file_attach): Update.
11570         * elfread.c (elf_symfile_read): Update.
11571         * dwarf2read.c (dwarf2_get_dwz_file): Update.
11572         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
11573         (open_and_init_dwo_file): Update.
11574         (open_dwp_file): Return gdb_bfd_ref_ptr.
11575         (open_and_init_dwp_file): Update.
11576         * corelow.c (core_open): Update.
11577         * compile/compile-object-load.c (compile_object_load): Update.
11578         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
11579         * coffread.c (coff_symfile_read): Update.
11580         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
11581         gdb_bfd_ref_ptr.  Rename.
11582         (dump_bfd_file, restore_command): Update.
11583         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11584         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
11585         (find_separate_debug_file_by_buildid): Update.
11586
11587 2017-01-10  Tom Tromey  <tom@tromey.com>
11588
11589         * common/gdb_ref_ptr.h: New file.
11590         * python/py-ref.h (struct gdbpy_ref_policy): New.
11591         (gdbpy_ref): Now a typedef.
11592
11593 2017-01-10  Tom Tromey  <tom@tromey.com>
11594
11595         * utils.h (make_cleanup_htab_delete): Don't declare.
11596         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
11597         Remove.
11598         * linespec.c (decode_compound_collector): Add constructor,
11599         destructor.
11600         (lookup_prefix_sym): Remove cleanup.
11601         (symtab_collector): Add constructor, destructor.
11602         (collect_symtabs_from_filename): Remove cleanup.
11603         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
11604         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
11605         Use htab_up.
11606         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
11607         * dwarf2read.c (dw2_expand_symtabs_matching)
11608         (dw2_map_symbol_filenames, dwarf_decode_macros)
11609         (write_psymtabs_to_index): Use htab_up.
11610         * dwarf2loc.c (func_verify_no_selftailcall)
11611         (call_site_find_chain_1, func_verify_no_selftailcall)
11612         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
11613         std::vector, gdb::unique_xmalloc_ptr.
11614         (call_sitep): Remove typedef.
11615         (dwarf2_locexpr_baton_eval): Remove unused variable.
11616
11617 2017-01-10  Tom Tromey  <tom@tromey.com>
11618
11619         * python/python-internal.h (make_cleanup_py_decref)
11620         (make_cleanup_py_xdecref): Don't declare.
11621         * python/py-utils.c (py_decref, make_cleanup_py_decref)
11622         (py_xdecref, make_cleanup_py_xdecref): Remove.
11623
11624 2017-01-10  Tom Tromey  <tom@tromey.com>
11625
11626         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
11627         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
11628
11629 2017-01-10  Tom Tromey  <tom@tromey.com>
11630
11631         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
11632
11633 2017-01-10  Tom Tromey  <tom@tromey.com>
11634
11635         * python/py-utils.c (unicode_to_encoded_string)
11636         (python_string_to_target_string)
11637         (python_string_to_target_python_string)
11638         (python_string_to_host_string, gdbpy_obj_to_string)
11639         (get_addr_from_python): Use gdbpy_ref.
11640
11641 2017-01-10  Tom Tromey  <tom@tromey.com>
11642
11643         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
11644         gdbpy_ref.
11645
11646 2017-01-10  Tom Tromey  <tom@tromey.com>
11647
11648         * python/python.c (eval_python_command, gdbpy_decode_line)
11649         (gdbpy_run_events, gdbpy_start_type_printers)
11650         (gdbpy_apply_type_printers): Use gdbpy_ref.
11651
11652 2017-01-10  Tom Tromey  <tom@tromey.com>
11653
11654         * python/py-param.c (get_doc_string, compute_enum_values): Use
11655         gdbpy_ref.
11656
11657 2017-01-10  Tom Tromey  <tom@tromey.com>
11658
11659         * python/py-inferior.c (find_thread_object, build_inferior_list):
11660         Use gdbpy_ref.
11661
11662 2017-01-10  Tom Tromey  <tom@tromey.com>
11663
11664         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11665
11666 2017-01-10  Tom Tromey  <tom@tromey.com>
11667
11668         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
11669         gdbpy_ref.
11670
11671 2017-01-10  Tom Tromey  <tom@tromey.com>
11672
11673         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
11674         extra incref.
11675         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11676         Use gdbpy_ref.
11677
11678 2017-01-10  Tom Tromey  <tom@tromey.com>
11679
11680         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11681         gdbpy_ref.
11682
11683 2017-01-10  Tom Tromey  <tom@tromey.com>
11684
11685         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
11686         decref results of PyArg_ParseTupleAndKeywords.
11687
11688 2017-01-10  Tom Tromey  <tom@tromey.com>
11689
11690         * python/python.c (python_run_simple_file): Use
11691         unique_xmalloc_ptr, gdbpy_ref.
11692
11693 2017-01-10  Tom Tromey  <tom@tromey.com>
11694
11695         * python/py-prettyprint.c (print_stack_unless_memory_error)
11696         (print_string_repr, print_children): Use gdbpy_ref.
11697         (dummy_python_frame): New class.
11698         (dummy_python_frame::dummy_python_frame): Rename from
11699         push_dummy_python_frame.
11700         (py_restore_tstate): Remove.
11701
11702 2017-01-10  Tom Tromey  <tom@tromey.com>
11703
11704         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11705
11706 2017-01-10  Tom Tromey  <tom@tromey.com>
11707
11708         * python/python.c (ensure_python_env, restore_python_env):
11709         Remove.
11710         * python/python-internal.h (ensure_python_env): Don't declare.
11711         * varobj.h (varobj_ensure_python_env): Don't declare.
11712         * varobj.c (varobj_ensure_python_env): Remove.
11713
11714 2017-01-10  Tom Tromey  <tom@tromey.com>
11715
11716         * varobj.c (varobj_value_get_print_value): Use
11717         gdbpy_enter_varobj.
11718
11719 2017-01-10  Tom Tromey  <tom@tromey.com>
11720
11721         * python/py-prettyprint.c (print_string_repr, print_children):
11722         Update.
11723         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11724         of "encoding".
11725         * varobj.c (varobj_value_get_print_value): Update.
11726         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11727
11728 2017-01-10  Tom Tromey  <tom@tromey.com>
11729
11730         * varobj.c (varobj_get_display_hint)
11731         (dynamic_varobj_has_child_method, install_new_value_visualizer)
11732         (varobj_set_visualizer, free_variable): Use
11733         gdbpy_enter_varobj.
11734
11735 2017-01-10  Tom Tromey  <tom@tromey.com>
11736
11737         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11738         (do_finish_initialization): New function.  Use gdbpy_ref.
11739         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
11740         do_finish_initialization.
11741
11742 2017-01-10  Tom Tromey  <tom@tromey.com>
11743
11744         * python/py-param.c (get_set_value, get_show_value): Use
11745         gdbpy_enter, gdbpy_ref.
11746
11747 2017-01-10  Tom Tromey  <tom@tromey.com>
11748
11749         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11750
11751 2017-01-10  Tom Tromey  <tom@tromey.com>
11752
11753         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11754
11755 2017-01-10  Tom Tromey  <tom@tromey.com>
11756
11757         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11758         Use gdbpy_enter_varobj.
11759
11760 2017-01-10  Tom Tromey  <tom@tromey.com>
11761
11762         * varobj.c (gdbpy_enter_varobj): New constructor.
11763         * python/python-internal.h (gdbpy_enter_varobj): New class.
11764         * python/py-varobj.c (py_varobj_get_iterator): Use
11765         gdbpy_enter_varobj.
11766
11767 2017-01-10  Tom Tromey  <tom@tromey.com>
11768
11769         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11770         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11771         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11772         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11773         unique_xmalloc_ptr.
11774         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11775
11776 2017-01-10  Tom Tromey  <tom@tromey.com>
11777
11778         * python/py-xmethods.c (invoke_match_method): Use
11779         gdbpy_ref.
11780
11781 2017-01-10  Tom Tromey  <tom@tromey.com>
11782
11783         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11784         gdbpy_enter, gdbpy_ref.
11785
11786 2017-01-10  Tom Tromey  <tom@tromey.com>
11787
11788         * python/python.c (python_interactive_command): Use gdbpy_enter.
11789
11790 2017-01-10  Tom Tromey  <tom@tromey.com>
11791
11792         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11793         gdbpy_ref.
11794
11795 2017-01-10  Tom Tromey  <tom@tromey.com>
11796
11797         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11798         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11799
11800 2017-01-10  Tom Tromey  <tom@tromey.com>
11801
11802         * utils.h (htab_deleter): New struct.
11803         (htab_up): New typedef.
11804         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11805         gdbpy_enter, gdbpy_ref, htab_up.
11806
11807 2017-01-10  Tom Tromey  <tom@tromey.com>
11808
11809         * python/py-unwind.c (pending_frame_invalidate): Remove.
11810         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11811
11812 2017-01-10  Tom Tromey  <tom@tromey.com>
11813
11814         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11815         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11816
11817 2017-01-10  Tom Tromey  <tom@tromey.com>
11818
11819         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11820
11821 2017-01-10  Tom Tromey  <tom@tromey.com>
11822
11823         * python/python.c (gdbpy_eval_from_control_command)
11824         (gdbpy_source_script, gdbpy_run_events)
11825         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11826         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11827         gdbpy_enter.
11828
11829 2017-01-10  Tom Tromey  <tom@tromey.com>
11830
11831         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11832
11833 2017-01-10  Tom Tromey  <tom@tromey.com>
11834
11835         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11836
11837 2017-01-10  Tom Tromey  <tom@tromey.com>
11838
11839         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11840         (python_on_inferior_call_pre, python_on_inferior_call_post)
11841         (python_on_memory_change, python_on_register_change)
11842         (python_inferior_exit, python_new_objfile, add_thread_object)
11843         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11844
11845 2017-01-10  Tom Tromey  <tom@tromey.com>
11846
11847         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11848         (bpfinishpy_handle_exit): Use gdbpy_enter.
11849
11850 2017-01-10  Tom Tromey  <tom@tromey.com>
11851
11852         * python/py-cmd.c (cmdpy_destroyer)
11853         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11854         gdbpy_enter.
11855
11856 2017-01-10  Tom Tromey  <tom@tromey.com>
11857
11858         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11859         gdbpy_enter.
11860         (gdbpy_breakpoint_has_cond): Likewise.
11861
11862 2017-01-10  Tom Tromey  <tom@tromey.com>
11863
11864         * python/python.c (gdbpy_enter): New constructor.
11865         (~gdbpy_enter): New destructor.
11866         (restore_python_env, ensure_python_env): Rewrite.
11867         * python/python-internal.h (gdbpy_enter): New class.
11868
11869 2017-01-10  Tom Tromey  <tom@tromey.com>
11870
11871         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11872
11873 2017-01-10  Tom Tromey  <tom@tromey.com>
11874
11875         * python/py-value.c (value_has_field, get_field_flag)
11876         (get_field_type, valpy_getitem, convert_value_from_python): Use
11877         gdbpy_ref.
11878
11879 2017-01-10  Tom Tromey  <tom@tromey.com>
11880
11881         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11882         gdbpy_ref.
11883
11884 2017-01-10  Tom Tromey  <tom@tromey.com>
11885
11886         * python/py-prettyprint.c (search_pp_list)
11887         (find_pretty_printer_from_objfiles)
11888         (find_pretty_printer_from_progspace)
11889         (find_pretty_printer_from_gdb, find_pretty_printer)
11890         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11891         gdbpy_ref.
11892
11893 2017-01-10  Tom Tromey  <tom@tromey.com>
11894
11895         * python/py-param.c (call_doc_function): Use gdbpy_ref.
11896
11897 2017-01-10  Tom Tromey  <tom@tromey.com>
11898
11899         * python/py-linetable.c (build_line_table_tuple_from_pcs)
11900         (ltpy_get_all_source_lines): Use gdbpy_ref.
11901
11902 2017-01-10  Tom Tromey  <tom@tromey.com>
11903
11904         * python/py-framefilter.c (extract_sym, extract_value)
11905         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11906         gdbpy_ref.
11907
11908 2017-01-10  Tom Tromey  <tom@tromey.com>
11909
11910         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11911
11912 2017-01-10  Tom Tromey  <tom@tromey.com>
11913
11914         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11915
11916 2017-01-10  Tom Tromey  <tom@tromey.com>
11917
11918         * python/py-function.c (convert_values_to_python, fnpy_init): Use
11919         gdbpy_ref.
11920
11921 2017-01-10  Tom Tromey  <tom@tromey.com>
11922
11923         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11924
11925 2017-01-10  Tom Tromey  <tom@tromey.com>
11926
11927         * python/py-type.c (convert_field, make_fielditem, typy_fields)
11928         (typy_range): Use gdbpy_ref.
11929
11930 2017-01-10  Tom Tromey  <tom@tromey.com>
11931
11932         * python/py-threadevent.c (create_thread_event_object): Use
11933         gdbpy_ref.
11934         * python/py-stopevent.c (create_stop_event_object): Simplify.
11935         (emit_stop_event): Use gdbpy_ref.
11936         * python/py-signalevent.c (create_signal_event_object): Use
11937         gdbpy_ref.
11938         * python/py-newobjfileevent.c (create_new_objfile_event_object)
11939         (emit_new_objfile_event, create_clear_objfiles_event_object)
11940         (emit_clear_objfiles_event): Use gdbpy_ref.
11941         * python/py-infevents.c (create_inferior_call_event_object)
11942         (create_register_changed_event_object)
11943         (create_memory_changed_event_object, emit_inferior_call_event)
11944         (emit_memory_changed_event, emit_register_changed_event): Use
11945         gdbpy_ref.
11946         * python/py-exitedevent.c (create_exited_event_object)
11947         (emit_exited_event): Use gdbpy_ref.
11948         * python/py-event.h (evpy_emit_event): Remove
11949         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11950         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11951         * python/py-continueevent.c (emit_continue_event): Use
11952         gdbpy_ref.
11953         * python/py-breakpoint.c (gdbpy_breakpoint_created)
11954         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11955         gdbpy_ref.
11956         * python/py-bpevent.c (create_breakpoint_event_object): Use
11957         gdbpy_ref.
11958
11959 2017-01-10  Tom Tromey  <tom@tromey.com>
11960
11961         * python/py-ref.h: New file.
11962
11963 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
11964
11965         * cli-out.c (cli_ui_out::do_redirect): Change return type to
11966         void.
11967         * cli-out.h (cli_ui_out::do_redirect): Likewise.
11968         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11969         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11970         * ui-out.c (ui_out::redirect): Likewise.
11971         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11972         * cli/cli-logging.c (set_logging_redirect): Update call site of
11973         ui_out::redirect.
11974         (handle_redirections): Likewise.
11975         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11976         * top.c (execute_command_to_string): Likewise.
11977         * utils.c (do_ui_out_redirect_pop): Likewise.
11978
11979 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
11980
11981         * stack.c (_initialize_stack): Update "frame" command help message.
11982
11983 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
11984
11985         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11986
11987 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11988
11989         * x86-linux-nat.h: Include gdb_proc_service.h.
11990
11991 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11992
11993         * ser-base.h: Include serial.h.
11994
11995 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11996
11997         * ppc-linux-tdep.h: Include ppc-tdep.h.
11998
11999 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12000
12001         * nat/amd64-linux-siginfo.h: Include signal.h.
12002
12003 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12004
12005         * nat/aarch64-linux-hw-point.h: Include break-common.h.
12006
12007 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12008
12009         * mi/mi-parse.h: Include mi-cmds.h.
12010
12011 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12012
12013         * inf-loop.c: Don't include "target.h".
12014         * inf-loop.h: Include it here.
12015
12016 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12017
12018         * dfp.h: Include "dboulest.h" and "expression.h".
12019
12020 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12021
12022         * ax-gdb.h: Include "ax.h".
12023
12024 2017-01-06  Yao Qi  <yao.qi@linaro.org>
12025
12026         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
12027         with nat/gdb_ptrace.h.
12028
12029 2017-01-05  Yao Qi  <yao.qi@linaro.org>
12030
12031         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
12032         new line.
12033         (mips64_fbsd_sigframe_init): Likewise.
12034
12035 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12036
12037         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
12038         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
12039
12040 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12041
12042         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
12043         * NEWS: Mention new FreeBSD/mips native configuration.
12044         * config/mips/fbsd.mh: New file.
12045         * configure.host: Add mips*-*-freebsd*.
12046         * mips-fbsd-nat.c: New file.
12047
12048 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
12049
12050         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
12051         (ALLDEPFILES): Add mips-fbsd-tdep.c.
12052         * NEWS: Mention new FreeBSD/mips target.
12053         * configure.tgt: Add mips*-*-freebsd*.
12054         * mips-fbsd-tdep.c: New file.
12055         * mips-fbsd-tdep.h: New file.
12056
12057 2017-01-04  Yao Qi  <yao.qi@linaro.org>
12058
12059         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
12060         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
12061
12062 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12063
12064         Update copyright year range in all GDB files.
12065
12066 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
12067
12068         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
12069
12070 For older changes see ChangeLog-2016.
12071 \f
12072 Local Variables:
12073 mode: change-log
12074 left-margin: 8
12075 fill-column: 74
12076 version-control: never
12077 coding: utf-8
12078 End: